1
2
3
4
5
6 package fr.ifremer.quadrige2.core.dao.system;
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 import java.io.Serializable;
30 import java.util.Date;
31
32
33
34
35
36
37
38 public abstract class BugReport
39 implements Serializable, Comparable<BugReport>
40 {
41
42
43
44 private static final long serialVersionUID = -2116166496329761755L;
45
46
47 private Integer bugId;
48
49
50
51
52
53 public Integer getBugId()
54 {
55 return this.bugId;
56 }
57
58
59
60
61
62 public void setBugId(Integer bugIdIn)
63 {
64 this.bugId = bugIdIn;
65 }
66
67 private String bugSummary;
68
69
70
71
72
73 public String getBugSummary()
74 {
75 return this.bugSummary;
76 }
77
78
79
80
81
82 public void setBugSummary(String bugSummaryIn)
83 {
84 this.bugSummary = bugSummaryIn;
85 }
86
87 private String bugDescription;
88
89
90
91
92
93 public String getBugDescription()
94 {
95 return this.bugDescription;
96 }
97
98
99
100
101
102 public void setBugDescription(String bugDescriptionIn)
103 {
104 this.bugDescription = bugDescriptionIn;
105 }
106
107 private String bugReporterName;
108
109
110
111
112
113 public String getBugReporterName()
114 {
115 return this.bugReporterName;
116 }
117
118
119
120
121
122 public void setBugReporterName(String bugReporterNameIn)
123 {
124 this.bugReporterName = bugReporterNameIn;
125 }
126
127 private String bugStatus;
128
129
130
131
132
133 public String getBugStatus()
134 {
135 return this.bugStatus;
136 }
137
138
139
140
141
142 public void setBugStatus(String bugStatusIn)
143 {
144 this.bugStatus = bugStatusIn;
145 }
146
147 private String bugCategory;
148
149
150
151
152
153 public String getBugCategory()
154 {
155 return this.bugCategory;
156 }
157
158
159
160
161
162 public void setBugCategory(String bugCategoryIn)
163 {
164 this.bugCategory = bugCategoryIn;
165 }
166
167 private String bugPriority;
168
169
170
171
172
173 public String getBugPriority()
174 {
175 return this.bugPriority;
176 }
177
178
179
180
181
182 public void setBugPriority(String bugPriorityIn)
183 {
184 this.bugPriority = bugPriorityIn;
185 }
186
187 private String bugSeverity;
188
189
190
191
192
193 public String getBugSeverity()
194 {
195 return this.bugSeverity;
196 }
197
198
199
200
201
202 public void setBugSeverity(String bugSeverityIn)
203 {
204 this.bugSeverity = bugSeverityIn;
205 }
206
207 private Date bugSubmittedDate;
208
209
210
211
212
213 public Date getBugSubmittedDate()
214 {
215 return this.bugSubmittedDate;
216 }
217
218
219
220
221
222 public void setBugSubmittedDate(Date bugSubmittedDateIn)
223 {
224 this.bugSubmittedDate = bugSubmittedDateIn;
225 }
226
227 private Date bugUpdatedDate;
228
229
230
231
232
233 public Date getBugUpdatedDate()
234 {
235 return this.bugUpdatedDate;
236 }
237
238
239
240
241
242 public void setBugUpdatedDate(Date bugUpdatedDateIn)
243 {
244 this.bugUpdatedDate = bugUpdatedDateIn;
245 }
246
247 private Date bugWishedDate;
248
249
250
251
252
253 public Date getBugWishedDate()
254 {
255 return this.bugWishedDate;
256 }
257
258
259
260
261
262 public void setBugWishedDate(Date bugWishedDateIn)
263 {
264 this.bugWishedDate = bugWishedDateIn;
265 }
266
267 private Date bugClosedDate;
268
269
270
271
272
273 public Date getBugClosedDate()
274 {
275 return this.bugClosedDate;
276 }
277
278
279
280
281
282 public void setBugClosedDate(Date bugClosedDateIn)
283 {
284 this.bugClosedDate = bugClosedDateIn;
285 }
286
287 private String bugProductVersion;
288
289
290
291
292
293 public String getBugProductVersion()
294 {
295 return this.bugProductVersion;
296 }
297
298
299
300
301
302 public void setBugProductVersion(String bugProductVersionIn)
303 {
304 this.bugProductVersion = bugProductVersionIn;
305 }
306
307 private String bugFixedVersion;
308
309
310
311
312
313 public String getBugFixedVersion()
314 {
315 return this.bugFixedVersion;
316 }
317
318
319
320
321
322 public void setBugFixedVersion(String bugFixedVersionIn)
323 {
324 this.bugFixedVersion = bugFixedVersionIn;
325 }
326
327
328
329
330
331
332 @Override
333 public boolean equals(Object object)
334 {
335 if (this == object)
336 {
337 return true;
338 }
339 if (!(object instanceof BugReport))
340 {
341 return false;
342 }
343 final BugReport that = (BugReport)object;
344 if (this.bugId == null || that.getBugId() == null || !this.bugId.equals(that.getBugId()))
345 {
346 return false;
347 }
348 return true;
349 }
350
351
352
353
354 @Override
355 public int hashCode()
356 {
357 int hashCode = 0;
358 hashCode = 29 * hashCode + (this.bugId == null ? 0 : this.bugId.hashCode());
359
360 return hashCode;
361 }
362
363
364
365
366 public static final class Factory
367 {
368
369
370
371
372 public static BugReport newInstance()
373 {
374 return new BugReportImpl();
375 }
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396 public static BugReport newInstance(String bugSummary, String bugDescription, String bugReporterName, String bugStatus, String bugCategory, String bugPriority, String bugSeverity, Date bugSubmittedDate, Date bugUpdatedDate, Date bugWishedDate, Date bugClosedDate, String bugProductVersion, String bugFixedVersion)
397 {
398 final BugReport entity = new BugReportImpl();
399 entity.setBugSummary(bugSummary);
400 entity.setBugDescription(bugDescription);
401 entity.setBugReporterName(bugReporterName);
402 entity.setBugStatus(bugStatus);
403 entity.setBugCategory(bugCategory);
404 entity.setBugPriority(bugPriority);
405 entity.setBugSeverity(bugSeverity);
406 entity.setBugSubmittedDate(bugSubmittedDate);
407 entity.setBugUpdatedDate(bugUpdatedDate);
408 entity.setBugWishedDate(bugWishedDate);
409 entity.setBugClosedDate(bugClosedDate);
410 entity.setBugProductVersion(bugProductVersion);
411 entity.setBugFixedVersion(bugFixedVersion);
412 return entity;
413 }
414 }
415
416
417
418
419 public int compareTo(BugReport o)
420 {
421 int cmp = 0;
422 if (this.getBugId() != null)
423 {
424 cmp = this.getBugId().compareTo(o.getBugId());
425 }
426 else
427 {
428 if (this.getBugSummary() != null)
429 {
430 cmp = (cmp != 0 ? cmp : this.getBugSummary().compareTo(o.getBugSummary()));
431 }
432 if (this.getBugDescription() != null)
433 {
434 cmp = (cmp != 0 ? cmp : this.getBugDescription().compareTo(o.getBugDescription()));
435 }
436 if (this.getBugReporterName() != null)
437 {
438 cmp = (cmp != 0 ? cmp : this.getBugReporterName().compareTo(o.getBugReporterName()));
439 }
440 if (this.getBugStatus() != null)
441 {
442 cmp = (cmp != 0 ? cmp : this.getBugStatus().compareTo(o.getBugStatus()));
443 }
444 if (this.getBugCategory() != null)
445 {
446 cmp = (cmp != 0 ? cmp : this.getBugCategory().compareTo(o.getBugCategory()));
447 }
448 if (this.getBugPriority() != null)
449 {
450 cmp = (cmp != 0 ? cmp : this.getBugPriority().compareTo(o.getBugPriority()));
451 }
452 if (this.getBugSeverity() != null)
453 {
454 cmp = (cmp != 0 ? cmp : this.getBugSeverity().compareTo(o.getBugSeverity()));
455 }
456 if (this.getBugSubmittedDate() != null)
457 {
458 cmp = (cmp != 0 ? cmp : this.getBugSubmittedDate().compareTo(o.getBugSubmittedDate()));
459 }
460 if (this.getBugUpdatedDate() != null)
461 {
462 cmp = (cmp != 0 ? cmp : this.getBugUpdatedDate().compareTo(o.getBugUpdatedDate()));
463 }
464 if (this.getBugWishedDate() != null)
465 {
466 cmp = (cmp != 0 ? cmp : this.getBugWishedDate().compareTo(o.getBugWishedDate()));
467 }
468 if (this.getBugClosedDate() != null)
469 {
470 cmp = (cmp != 0 ? cmp : this.getBugClosedDate().compareTo(o.getBugClosedDate()));
471 }
472 if (this.getBugProductVersion() != null)
473 {
474 cmp = (cmp != 0 ? cmp : this.getBugProductVersion().compareTo(o.getBugProductVersion()));
475 }
476 if (this.getBugFixedVersion() != null)
477 {
478 cmp = (cmp != 0 ? cmp : this.getBugFixedVersion().compareTo(o.getBugFixedVersion()));
479 }
480 }
481 return cmp;
482 }
483
484
485 }