Subversion Repositories SmartDukaan

Rev

Rev 24417 | Rev 24500 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 24417 Rev 24439
Line 47... Line 47...
47
	private LocalDateTime updateTimestamp;
47
	private LocalDateTime updateTimestamp;
48
	
48
	
49
	@Column(name="close_timestamp")
49
	@Column(name="close_timestamp")
50
	private LocalDateTime closeTimestamp;
50
	private LocalDateTime closeTimestamp;
51
	
51
	
-
 
52
	@Column(name="l1_auth_user")
-
 
53
	private int l1AuthUser;
-
 
54
	
-
 
55
	@Column(name="l2_auth_user")
-
 
56
	private int l2AuthUser;
-
 
57
	
-
 
58
	@Column(name="l3_auth_user")
-
 
59
	private int l3AuthUser;
-
 
60
	
52
	@Column(name="happy_code")
61
	@Column(name="happy_code")
53
	private String happyCode;
62
	private String happyCode;
54
 
63
 
55
	@Column(name="last_activity")
64
	@Column(name="last_activity")
56
	@Enumerated(EnumType.STRING)
65
	@Enumerated(EnumType.STRING)
Line 62... Line 71...
62
	@Column(name="l3_escalation_timestamp")
71
	@Column(name="l3_escalation_timestamp")
63
	private LocalDateTime l3EscalationTimestamp;
72
	private LocalDateTime l3EscalationTimestamp;
64
	
73
	
65
	@Column(name="last_escalation_timestamp")
74
	@Column(name="last_escalation_timestamp")
66
	private LocalDateTime lastEscalationTimestamp;
75
	private LocalDateTime lastEscalationTimestamp;
67
 
-
 
68
	
76
	
69
	@Override
-
 
70
	public int hashCode() {
77
	public String getFormattedCreateTimestamp(){
71
		final int prime = 31;
78
		if(createTimestamp == null){
72
		int result = 1;
-
 
73
		result = prime * result + assigneeId;
-
 
74
		result = prime * result + ((closeTimestamp == null) ? 0 : closeTimestamp.hashCode());
-
 
75
		result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
-
 
76
		result = prime * result + fofoId;
-
 
77
		result = prime * result + ((happyCode == null) ? 0 : happyCode.hashCode());
-
 
78
		result = prime * result + id;
-
 
79
		result = prime * result + ((l2EscalationTimestamp == null) ? 0 : l2EscalationTimestamp.hashCode());
-
 
80
		result = prime * result + ((l3EscalationTimestamp == null) ? 0 : l3EscalationTimestamp.hashCode());
-
 
81
		result = prime * result + ((lastActivity == null) ? 0 : lastActivity.hashCode());
-
 
82
		result = prime * result + ((lastEscalationTimestamp == null) ? 0 : lastEscalationTimestamp.hashCode());
-
 
83
		result = prime * result + subCategoryId;
-
 
84
		result = prime * result + ((updateTimestamp == null) ? 0 : updateTimestamp.hashCode());
-
 
85
		return result;
79
			return null;
86
	}
80
		}
87
 
-
 
88
 
-
 
89
	@Override
-
 
90
	public boolean equals(Object obj) {
-
 
91
		if (this == obj)
-
 
92
			return true;
-
 
93
		if (obj == null)
-
 
94
			return false;
-
 
95
		if (getClass() != obj.getClass())
-
 
96
			return false;
-
 
97
		Ticket other = (Ticket) obj;
-
 
98
		if (assigneeId != other.assigneeId)
-
 
99
			return false;
-
 
100
		if (closeTimestamp == null) {
-
 
101
			if (other.closeTimestamp != null)
-
 
102
				return false;
-
 
103
		} else if (!closeTimestamp.equals(other.closeTimestamp))
81
		DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MM-yyyy HH:mm");
104
			return false;
-
 
105
		if (createTimestamp == null) {
-
 
106
			if (other.createTimestamp != null)
-
 
107
				return false;
-
 
108
		} else if (!createTimestamp.equals(other.createTimestamp))
82
		return createTimestamp.format(formatter);
109
			return false;
-
 
110
		if (fofoId != other.fofoId)
-
 
111
			return false;
-
 
112
		if (happyCode == null) {
-
 
113
			if (other.happyCode != null)
-
 
114
				return false;
-
 
115
		} else if (!happyCode.equals(other.happyCode))
-
 
116
			return false;
-
 
117
		if (id != other.id)
-
 
118
			return false;
83
    }
119
		if (l2EscalationTimestamp == null) {
-
 
120
			if (other.l2EscalationTimestamp != null)
84
	public String getFormattedCloseTimestamp(){
121
				return false;
-
 
122
		} else if (!l2EscalationTimestamp.equals(other.l2EscalationTimestamp))
-
 
123
			return false;
-
 
124
		if (l3EscalationTimestamp == null) {
85
		if(closeTimestamp == null){
125
			if (other.l3EscalationTimestamp != null)
-
 
126
				return false;
-
 
127
		} else if (!l3EscalationTimestamp.equals(other.l3EscalationTimestamp))
-
 
128
			return false;
86
			return null;
129
		if (lastActivity != other.lastActivity)
-
 
130
			return false;
87
		}
131
		if (lastEscalationTimestamp == null) {
-
 
132
			if (other.lastEscalationTimestamp != null)
-
 
133
				return false;
-
 
134
		} else if (!lastEscalationTimestamp.equals(other.lastEscalationTimestamp))
88
		DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MM-yyyy HH:mm");
135
			return false;
-
 
136
		if (subCategoryId != other.subCategoryId)
-
 
137
			return false;
-
 
138
		if (updateTimestamp == null) {
-
 
139
			if (other.updateTimestamp != null)
-
 
140
				return false;
-
 
141
		} else if (!updateTimestamp.equals(other.updateTimestamp))
89
		return closeTimestamp.format(formatter);
142
			return false;
-
 
143
		return true;
-
 
144
	}
90
    }
145
 
91
	
146
 
92
 
147
	public int getId() {
93
	public int getId() {
148
		return id;
94
		return id;
149
	}
95
	}
150
 
96
 
151
 
-
 
152
	public void setId(int id) {
97
	public void setId(int id) {
153
		this.id = id;
98
		this.id = id;
154
	}
99
	}
155
 
100
 
156
 
-
 
157
	public int getFofoId() {
101
	public int getFofoId() {
158
		return fofoId;
102
		return fofoId;
159
	}
103
	}
160
 
104
 
161
 
-
 
162
	public void setFofoId(int fofoId) {
105
	public void setFofoId(int fofoId) {
163
		this.fofoId = fofoId;
106
		this.fofoId = fofoId;
164
	}
107
	}
165
 
108
 
166
 
-
 
167
	public int getAssigneeId() {
109
	public int getAssigneeId() {
168
		return assigneeId;
110
		return assigneeId;
169
	}
111
	}
170
 
112
 
171
 
-
 
172
	public void setAssigneeId(int assigneeId) {
113
	public void setAssigneeId(int assigneeId) {
173
		this.assigneeId = assigneeId;
114
		this.assigneeId = assigneeId;
174
	}
115
	}
175
 
116
 
176
 
-
 
177
	public int getSubCategoryId() {
117
	public int getSubCategoryId() {
178
		return subCategoryId;
118
		return subCategoryId;
179
	}
119
	}
180
 
120
 
181
 
-
 
182
	public void setSubCategoryId(int subCategoryId) {
121
	public void setSubCategoryId(int subCategoryId) {
183
		this.subCategoryId = subCategoryId;
122
		this.subCategoryId = subCategoryId;
184
	}
123
	}
185
 
124
 
186
 
-
 
187
	public LocalDateTime getCreateTimestamp() {
125
	public LocalDateTime getCreateTimestamp() {
188
		return createTimestamp;
126
		return createTimestamp;
189
	}
127
	}
190
 
128
 
191
 
-
 
192
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
129
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
193
		this.createTimestamp = createTimestamp;
130
		this.createTimestamp = createTimestamp;
194
	}
131
	}
195
 
132
 
196
 
-
 
197
	public LocalDateTime getUpdateTimestamp() {
133
	public LocalDateTime getUpdateTimestamp() {
198
		return updateTimestamp;
134
		return updateTimestamp;
199
	}
135
	}
200
 
136
 
201
 
-
 
202
	public void setUpdateTimestamp(LocalDateTime updateTimestamp) {
137
	public void setUpdateTimestamp(LocalDateTime updateTimestamp) {
203
		this.updateTimestamp = updateTimestamp;
138
		this.updateTimestamp = updateTimestamp;
204
	}
139
	}
205
 
140
 
206
 
-
 
207
	public LocalDateTime getCloseTimestamp() {
141
	public LocalDateTime getCloseTimestamp() {
208
		return closeTimestamp;
142
		return closeTimestamp;
209
	}
143
	}
210
 
144
 
211
 
-
 
212
	public void setCloseTimestamp(LocalDateTime closeTimestamp) {
145
	public void setCloseTimestamp(LocalDateTime closeTimestamp) {
213
		this.closeTimestamp = closeTimestamp;
146
		this.closeTimestamp = closeTimestamp;
214
	}
147
	}
215
 
148
 
-
 
149
	public int getL1AuthUser() {
-
 
150
		return l1AuthUser;
-
 
151
	}
-
 
152
 
-
 
153
	public void setL1AuthUser(int l1AuthUser) {
-
 
154
		this.l1AuthUser = l1AuthUser;
-
 
155
	}
-
 
156
 
-
 
157
	public int getL2AuthUser() {
-
 
158
		return l2AuthUser;
-
 
159
	}
-
 
160
 
-
 
161
	public void setL2AuthUser(int l2AuthUser) {
-
 
162
		this.l2AuthUser = l2AuthUser;
-
 
163
	}
-
 
164
 
-
 
165
	public int getL3AuthUser() {
-
 
166
		return l3AuthUser;
-
 
167
	}
-
 
168
 
-
 
169
	public void setL3AuthUser(int l3AuthUser) {
-
 
170
		this.l3AuthUser = l3AuthUser;
-
 
171
	}
216
 
172
 
217
	public String getHappyCode() {
173
	public String getHappyCode() {
218
		return happyCode;
174
		return happyCode;
219
	}
175
	}
220
 
176
 
221
 
-
 
222
	public void setHappyCode(String happyCode) {
177
	public void setHappyCode(String happyCode) {
223
		this.happyCode = happyCode;
178
		this.happyCode = happyCode;
224
	}
179
	}
225
 
180
 
226
 
-
 
227
	public ActivityType getLastActivity() {
181
	public ActivityType getLastActivity() {
228
		return lastActivity;
182
		return lastActivity;
229
	}
183
	}
230
 
184
 
231
 
-
 
232
	public void setLastActivity(ActivityType lastActivity) {
185
	public void setLastActivity(ActivityType lastActivity) {
233
		this.lastActivity = lastActivity;
186
		this.lastActivity = lastActivity;
234
	}
187
	}
235
 
188
 
236
 
-
 
237
	public LocalDateTime getL2EscalationTimestamp() {
189
	public LocalDateTime getL2EscalationTimestamp() {
238
		return l2EscalationTimestamp;
190
		return l2EscalationTimestamp;
239
	}
191
	}
240
 
192
 
241
 
-
 
242
	public void setL2EscalationTimestamp(LocalDateTime l2EscalationTimestamp) {
193
	public void setL2EscalationTimestamp(LocalDateTime l2EscalationTimestamp) {
243
		this.l2EscalationTimestamp = l2EscalationTimestamp;
194
		this.l2EscalationTimestamp = l2EscalationTimestamp;
244
	}
195
	}
245
 
196
 
246
 
-
 
247
	public LocalDateTime getL3EscalationTimestamp() {
197
	public LocalDateTime getL3EscalationTimestamp() {
248
		return l3EscalationTimestamp;
198
		return l3EscalationTimestamp;
249
	}
199
	}
250
 
200
 
251
 
-
 
252
	public void setL3EscalationTimestamp(LocalDateTime l3EscalationTimestamp) {
201
	public void setL3EscalationTimestamp(LocalDateTime l3EscalationTimestamp) {
253
		this.l3EscalationTimestamp = l3EscalationTimestamp;
202
		this.l3EscalationTimestamp = l3EscalationTimestamp;
254
	}
203
	}
255
 
204
 
256
 
-
 
257
	public LocalDateTime getLastEscalationTimestamp() {
205
	public LocalDateTime getLastEscalationTimestamp() {
258
		return lastEscalationTimestamp;
206
		return lastEscalationTimestamp;
259
	}
207
	}
260
 
208
 
261
 
-
 
262
	public void setLastEscalationTimestamp(LocalDateTime lastEscalationTimestamp) {
209
	public void setLastEscalationTimestamp(LocalDateTime lastEscalationTimestamp) {
263
		this.lastEscalationTimestamp = lastEscalationTimestamp;
210
		this.lastEscalationTimestamp = lastEscalationTimestamp;
264
	}
211
	}
265
 
212
 
266
 
-
 
267
	public static int getL2escalationdays() {
213
	public static int getL2escalationdays() {
268
		return L2EscalationDays;
214
		return L2EscalationDays;
269
	}
215
	}
270
 
216
 
271
 
-
 
272
	public static int getL3escalationdays() {
217
	public static int getL3escalationdays() {
273
		return L3EscalationDays;
218
		return L3EscalationDays;
274
	}
219
	}
275
 
220
 
276
 
-
 
277
	public static int getFinalescalationdays() {
221
	public static int getFinalescalationdays() {
278
		return FinalEscalationDays;
222
		return FinalEscalationDays;
279
	}
223
	}
280
 
224
 
-
 
225
	@Override
281
	public String getFormattedCreateTimestamp(){
226
	public int hashCode() {
282
		if(createTimestamp == null){
227
		final int prime = 31;
-
 
228
		int result = 1;
-
 
229
		result = prime * result + assigneeId;
-
 
230
		result = prime * result + ((closeTimestamp == null) ? 0 : closeTimestamp.hashCode());
-
 
231
		result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
-
 
232
		result = prime * result + fofoId;
-
 
233
		result = prime * result + ((happyCode == null) ? 0 : happyCode.hashCode());
-
 
234
		result = prime * result + id;
-
 
235
		result = prime * result + l1AuthUser;
-
 
236
		result = prime * result + l2AuthUser;
-
 
237
		result = prime * result + ((l2EscalationTimestamp == null) ? 0 : l2EscalationTimestamp.hashCode());
-
 
238
		result = prime * result + l3AuthUser;
-
 
239
		result = prime * result + ((l3EscalationTimestamp == null) ? 0 : l3EscalationTimestamp.hashCode());
-
 
240
		result = prime * result + ((lastActivity == null) ? 0 : lastActivity.hashCode());
-
 
241
		result = prime * result + ((lastEscalationTimestamp == null) ? 0 : lastEscalationTimestamp.hashCode());
-
 
242
		result = prime * result + subCategoryId;
-
 
243
		result = prime * result + ((updateTimestamp == null) ? 0 : updateTimestamp.hashCode());
283
			return null;
244
		return result;
284
		}
245
	}
-
 
246
 
-
 
247
	@Override
-
 
248
	public boolean equals(Object obj) {
-
 
249
		if (this == obj)
-
 
250
			return true;
-
 
251
		if (obj == null)
-
 
252
			return false;
-
 
253
		if (getClass() != obj.getClass())
-
 
254
			return false;
-
 
255
		Ticket other = (Ticket) obj;
-
 
256
		if (assigneeId != other.assigneeId)
-
 
257
			return false;
-
 
258
		if (closeTimestamp == null) {
-
 
259
			if (other.closeTimestamp != null)
-
 
260
				return false;
285
		DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MM-yyyy HH:mm");
261
		} else if (!closeTimestamp.equals(other.closeTimestamp))
-
 
262
			return false;
-
 
263
		if (createTimestamp == null) {
-
 
264
			if (other.createTimestamp != null)
-
 
265
				return false;
286
		return createTimestamp.format(formatter);
266
		} else if (!createTimestamp.equals(other.createTimestamp))
-
 
267
			return false;
-
 
268
		if (fofoId != other.fofoId)
-
 
269
			return false;
-
 
270
		if (happyCode == null) {
-
 
271
			if (other.happyCode != null)
-
 
272
				return false;
-
 
273
		} else if (!happyCode.equals(other.happyCode))
-
 
274
			return false;
-
 
275
		if (id != other.id)
-
 
276
			return false;
-
 
277
		if (l1AuthUser != other.l1AuthUser)
-
 
278
			return false;
-
 
279
		if (l2AuthUser != other.l2AuthUser)
287
    }
280
			return false;
-
 
281
		if (l2EscalationTimestamp == null) {
288
	public String getFormattedCloseTimestamp(){
282
			if (other.l2EscalationTimestamp != null)
-
 
283
				return false;
-
 
284
		} else if (!l2EscalationTimestamp.equals(other.l2EscalationTimestamp))
-
 
285
			return false;
-
 
286
		if (l3AuthUser != other.l3AuthUser)
-
 
287
			return false;
289
		if(closeTimestamp == null){
288
		if (l3EscalationTimestamp == null) {
-
 
289
			if (other.l3EscalationTimestamp != null)
-
 
290
				return false;
-
 
291
		} else if (!l3EscalationTimestamp.equals(other.l3EscalationTimestamp))
290
			return null;
292
			return false;
-
 
293
		if (lastActivity != other.lastActivity)
291
		}
294
			return false;
-
 
295
		if (lastEscalationTimestamp == null) {
-
 
296
			if (other.lastEscalationTimestamp != null)
-
 
297
				return false;
292
		DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MM-yyyy HH:mm");
298
		} else if (!lastEscalationTimestamp.equals(other.lastEscalationTimestamp))
-
 
299
			return false;
-
 
300
		if (subCategoryId != other.subCategoryId)
-
 
301
			return false;
-
 
302
		if (updateTimestamp == null) {
-
 
303
			if (other.updateTimestamp != null)
-
 
304
				return false;
293
		return closeTimestamp.format(formatter);
305
		} else if (!updateTimestamp.equals(other.updateTimestamp))
-
 
306
			return false;
-
 
307
		return true;
294
    }
308
	}
-
 
309
 
295
	@Override
310
	@Override
296
	public String toString() {
311
	public String toString() {
297
		return "Ticket [id=" + id + ", fofoId=" + fofoId + ", assigneeId=" + assigneeId + ", subCategoryId="
312
		return "Ticket [id=" + id + ", fofoId=" + fofoId + ", assigneeId=" + assigneeId + ", subCategoryId="
298
				+ subCategoryId + ", createTimestamp=" + createTimestamp + ", updateTimestamp=" + updateTimestamp
313
				+ subCategoryId + ", createTimestamp=" + createTimestamp + ", updateTimestamp=" + updateTimestamp
-
 
314
				+ ", closeTimestamp=" + closeTimestamp + ", l1AuthUser=" + l1AuthUser + ", l2AuthUser=" + l2AuthUser
299
				+ ", closeTimestamp=" + closeTimestamp + ", happyCode=" + happyCode + ", lastActivity=" + lastActivity
315
				+ ", l3AuthUser=" + l3AuthUser + ", happyCode=" + happyCode + ", lastActivity=" + lastActivity
300
				+ ", l2EscalationTimestamp=" + l2EscalationTimestamp + ", l3EscalationTimestamp="
316
				+ ", l2EscalationTimestamp=" + l2EscalationTimestamp + ", l3EscalationTimestamp="
301
				+ l3EscalationTimestamp + ", lastEscalationTimestamp=" + lastEscalationTimestamp + "]";
317
				+ l3EscalationTimestamp + ", lastEscalationTimestamp=" + lastEscalationTimestamp + "]";
302
	}
318
	}
303
	
-
 
304
	
319
 
305
	
320
	
306
	
321
	
307
	
322
	
308
}
323
}