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