1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 package fr.ifremer.quadrige3.core.vo.data.survey;
30
31 import java.io.Serializable;
32 import java.sql.Timestamp;
33 import java.util.Arrays;
34 import java.util.Date;
35 import org.apache.commons.lang3.builder.CompareToBuilder;
36 import org.apache.commons.lang3.builder.EqualsBuilder;
37 import org.apache.commons.lang3.builder.HashCodeBuilder;
38 import org.apache.commons.lang3.builder.ToStringBuilder;
39
40
41
42
43 public class OccasionVO
44 implements Serializable, Comparable<OccasionVO>
45 {
46
47 private static final long serialVersionUID = -6676910731940990828L;
48
49
50
51 protected Integer occasId;
52
53 protected Date occasDt;
54
55 protected String occasNm;
56
57 protected String occasCm;
58
59 protected String occasPositionCm;
60
61 protected Timestamp updateDt;
62
63 protected Integer campaignId;
64
65 protected Integer[] quserIds;
66
67 protected Integer recDepId;
68
69 protected Integer posSystemId;
70
71 protected Integer shipId;
72
73
74
75 protected CampaignVO campaignVO;
76
77
78 public OccasionVO()
79 {
80
81 }
82
83
84
85
86
87
88
89
90
91
92 public OccasionVO(final Integer occasIdIn, final Date occasDtIn, final String occasNmIn, final Integer[] quserIdsIn, final Integer recDepIdIn, final CampaignVO campaignVOIn)
93 {
94 this.occasId = occasIdIn;
95 this.occasDt = occasDtIn;
96 this.occasNm = occasNmIn;
97 this.quserIds = quserIdsIn;
98 this.recDepId = recDepIdIn;
99 this.campaignVO = campaignVOIn;
100 }
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117 public OccasionVO(final Integer occasIdIn, final Date occasDtIn, final String occasNmIn, final String occasCmIn, final String occasPositionCmIn, final Timestamp updateDtIn, final Integer campaignIdIn, final Integer[] quserIdsIn, final Integer recDepIdIn, final Integer posSystemIdIn, final Integer shipIdIn, final CampaignVO campaignVOIn)
118 {
119 this.occasId = occasIdIn;
120 this.occasDt = occasDtIn;
121 this.occasNm = occasNmIn;
122 this.occasCm = occasCmIn;
123 this.occasPositionCm = occasPositionCmIn;
124 this.updateDt = updateDtIn;
125 this.campaignId = campaignIdIn;
126 this.quserIds = quserIdsIn;
127 this.recDepId = recDepIdIn;
128 this.posSystemId = posSystemIdIn;
129 this.shipId = shipIdIn;
130 this.campaignVO = campaignVOIn;
131 }
132
133
134
135
136
137
138
139 public OccasionVO(final OccasionVO otherBean)
140 {
141 this.occasId = otherBean.getOccasId();
142 this.occasDt = otherBean.getOccasDt();
143 this.occasNm = otherBean.getOccasNm();
144 this.occasCm = otherBean.getOccasCm();
145 this.occasPositionCm = otherBean.getOccasPositionCm();
146 this.updateDt = otherBean.getUpdateDt();
147 this.campaignId = otherBean.getCampaignId();
148 this.quserIds = otherBean.getQuserIds();
149 this.recDepId = otherBean.getRecDepId();
150 this.posSystemId = otherBean.getPosSystemId();
151 this.shipId = otherBean.getShipId();
152 this.campaignVO = otherBean.getCampaignVO();
153 }
154
155
156
157
158
159 public void copy(final OccasionVO otherBean)
160 {
161 if (null != otherBean)
162 {
163 this.setOccasId(otherBean.getOccasId());
164 this.setOccasDt(otherBean.getOccasDt());
165 this.setOccasNm(otherBean.getOccasNm());
166 this.setOccasCm(otherBean.getOccasCm());
167 this.setOccasPositionCm(otherBean.getOccasPositionCm());
168 this.setUpdateDt(otherBean.getUpdateDt());
169 this.setCampaignId(otherBean.getCampaignId());
170 this.setQuserIds(otherBean.getQuserIds());
171 this.setRecDepId(otherBean.getRecDepId());
172 this.setPosSystemId(otherBean.getPosSystemId());
173 this.setShipId(otherBean.getShipId());
174 this.setCampaignVO(otherBean.getCampaignVO());
175 }
176 }
177
178
179
180
181
182
183 public Integer getOccasId()
184 {
185 return this.occasId;
186 }
187
188
189
190
191
192 public void setOccasId(final Integer value)
193 {
194 this.occasId = value;
195 }
196
197
198
199
200
201
202 public Date getOccasDt()
203 {
204 return this.occasDt;
205 }
206
207
208
209
210
211 public void setOccasDt(final Date value)
212 {
213 this.occasDt = value;
214 }
215
216
217
218
219
220
221 public String getOccasNm()
222 {
223 return this.occasNm;
224 }
225
226
227
228
229
230 public void setOccasNm(final String value)
231 {
232 this.occasNm = value;
233 }
234
235
236
237
238
239
240 public String getOccasCm()
241 {
242 return this.occasCm;
243 }
244
245
246
247
248
249 public void setOccasCm(final String value)
250 {
251 this.occasCm = value;
252 }
253
254
255
256
257
258
259 public String getOccasPositionCm()
260 {
261 return this.occasPositionCm;
262 }
263
264
265
266
267
268 public void setOccasPositionCm(final String value)
269 {
270 this.occasPositionCm = value;
271 }
272
273
274
275
276
277
278 public Timestamp getUpdateDt()
279 {
280 return this.updateDt;
281 }
282
283
284
285
286
287 public void setUpdateDt(final Timestamp value)
288 {
289 this.updateDt = value;
290 }
291
292
293
294
295
296
297 public Integer getCampaignId()
298 {
299 return this.campaignId;
300 }
301
302
303
304
305
306 public void setCampaignId(final Integer value)
307 {
308 this.campaignId = value;
309 }
310
311
312
313
314
315
316 public Integer[] getQuserIds()
317 {
318 return this.quserIds;
319 }
320
321
322
323
324
325 public void setQuserIds(final Integer[] value)
326 {
327 this.quserIds = value;
328 }
329
330
331
332
333
334
335 public Integer getRecDepId()
336 {
337 return this.recDepId;
338 }
339
340
341
342
343
344 public void setRecDepId(final Integer value)
345 {
346 this.recDepId = value;
347 }
348
349
350
351
352
353
354 public Integer getPosSystemId()
355 {
356 return this.posSystemId;
357 }
358
359
360
361
362
363 public void setPosSystemId(final Integer value)
364 {
365 this.posSystemId = value;
366 }
367
368
369
370
371
372
373 public Integer getShipId()
374 {
375 return this.shipId;
376 }
377
378
379
380
381
382 public void setShipId(final Integer value)
383 {
384 this.shipId = value;
385 }
386
387
388
389
390
391
392 public CampaignVO getCampaignVO()
393 {
394 return this.campaignVO;
395 }
396
397
398
399
400
401 public void setCampaignVO(CampaignVO value)
402 {
403 this.campaignVO = value;
404 }
405
406
407
408
409
410
411 @Override
412 public boolean equals(final Object object)
413 {
414 if (object==null || object.getClass() != this.getClass())
415 {
416 return false;
417 }
418
419 if (object==this)
420 {
421 return true;
422 }
423 OccasionVO rhs = (OccasionVO) object;
424 return new EqualsBuilder()
425 .append(this.getOccasId(), rhs.getOccasId())
426 .append(this.getOccasDt(), rhs.getOccasDt())
427 .append(this.getOccasNm(), rhs.getOccasNm())
428 .append(this.getOccasCm(), rhs.getOccasCm())
429 .append(this.getOccasPositionCm(), rhs.getOccasPositionCm())
430 .append(this.getUpdateDt(), rhs.getUpdateDt())
431 .append(this.getCampaignId(), rhs.getCampaignId())
432 .append(this.getQuserIds(), rhs.getQuserIds())
433 .append(this.getRecDepId(), rhs.getRecDepId())
434 .append(this.getPosSystemId(), rhs.getPosSystemId())
435 .append(this.getShipId(), rhs.getShipId())
436 .append(this.getCampaignVO(), rhs.getCampaignVO())
437 .isEquals();
438 }
439
440
441
442
443
444
445 public int compareTo(final OccasionVO object)
446 {
447 if (object==null)
448 {
449 return -1;
450 }
451
452 if (object==this)
453 {
454 return 0;
455 }
456 return new CompareToBuilder()
457 .append(this.getOccasId(), object.getOccasId())
458 .append(this.getOccasDt(), object.getOccasDt())
459 .append(this.getOccasNm(), object.getOccasNm())
460 .append(this.getOccasCm(), object.getOccasCm())
461 .append(this.getOccasPositionCm(), object.getOccasPositionCm())
462 .append(this.getUpdateDt(), object.getUpdateDt())
463 .append(this.getCampaignId(), object.getCampaignId())
464 .append(this.getQuserIds(), object.getQuserIds())
465 .append(this.getRecDepId(), object.getRecDepId())
466 .append(this.getPosSystemId(), object.getPosSystemId())
467 .append(this.getShipId(), object.getShipId())
468 .append(this.getCampaignVO(), object.getCampaignVO())
469 .toComparison();
470 }
471
472
473
474
475
476 @Override
477 public int hashCode()
478 {
479 return new HashCodeBuilder(1249046965, -82296885)
480 .append(this.getOccasId())
481 .append(this.getOccasDt())
482 .append(this.getOccasNm())
483 .append(this.getOccasCm())
484 .append(this.getOccasPositionCm())
485 .append(this.getUpdateDt())
486 .append(this.getCampaignId())
487 .append(this.getQuserIds())
488 .append(this.getRecDepId())
489 .append(this.getPosSystemId())
490 .append(this.getShipId())
491 .append(this.getCampaignVO())
492 .toHashCode();
493 }
494
495
496
497
498
499 @Override
500 public String toString()
501 {
502 return new ToStringBuilder(this)
503 .append("occasId", this.getOccasId())
504 .append("occasDt", this.getOccasDt())
505 .append("occasNm", this.getOccasNm())
506 .append("occasCm", this.getOccasCm())
507 .append("occasPositionCm", this.getOccasPositionCm())
508 .append("updateDt", this.getUpdateDt())
509 .append("campaignId", this.getCampaignId())
510 .append("quserIds", this.getQuserIds())
511 .append("recDepId", this.getRecDepId())
512 .append("posSystemId", this.getPosSystemId())
513 .append("shipId", this.getShipId())
514 .append("campaignVO", this.getCampaignVO())
515 .toString();
516 }
517
518
519
520
521
522
523
524
525
526
527
528
529
530 protected static boolean equal(final Object first, final Object second)
531 {
532 final boolean equal;
533
534 if (first == null)
535 {
536 equal = (second == null);
537 }
538 else if (first.getClass().isArray() && (second != null) && second.getClass().isArray())
539 {
540 equal = Arrays.equals((Object[])first, (Object[])second);
541 }
542 else
543 {
544 equal = first.equals(second);
545 }
546
547 return equal;
548 }
549
550
551 }