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.administration.strategy;
30
31 import java.io.Serializable;
32 import java.sql.Timestamp;
33 import java.util.Arrays;
34 import org.apache.commons.lang3.builder.CompareToBuilder;
35 import org.apache.commons.lang3.builder.EqualsBuilder;
36 import org.apache.commons.lang3.builder.HashCodeBuilder;
37 import org.apache.commons.lang3.builder.ToStringBuilder;
38
39
40
41
42
43 public class PmfmStrategyVO
44 implements Serializable, Comparable<PmfmStrategyVO>
45 {
46
47 private static final long serialVersionUID = -9052718545281058833L;
48
49
50
51 protected Integer pmfmStratId;
52
53
54
55
56
57 protected Double pmfmStratParAcquisNumber;
58
59
60
61 protected Integer pmfmStratPresRk;
62
63
64
65 protected String pmfmStratParIsIndiv;
66
67 protected String pmfmStratIsUniqueByTaxon;
68
69
70
71 protected Timestamp updateDt;
72
73 protected Integer pmfmId;
74
75
76
77 protected Integer precTypeId;
78
79
80
81 protected String[] acquisLevelCds;
82
83 protected String[] uiFunctionCds;
84
85
86
87 protected Integer stratId;
88
89 protected Integer[] qualValueIds;
90
91
92
93
94
95 protected StrategyVO strategyVO;
96
97
98 public PmfmStrategyVO()
99 {
100
101 }
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116 public PmfmStrategyVO(final Integer pmfmStratIdIn, final Double pmfmStratParAcquisNumberIn, final Integer pmfmIdIn, final Integer precTypeIdIn, final String[] acquisLevelCdsIn, final String[] uiFunctionCdsIn, final Integer stratIdIn, final Integer[] qualValueIdsIn, final StrategyVO strategyVOIn)
117 {
118 this.pmfmStratId = pmfmStratIdIn;
119 this.pmfmStratParAcquisNumber = pmfmStratParAcquisNumberIn;
120 this.pmfmId = pmfmIdIn;
121 this.precTypeId = precTypeIdIn;
122 this.acquisLevelCds = acquisLevelCdsIn;
123 this.uiFunctionCds = uiFunctionCdsIn;
124 this.stratId = stratIdIn;
125 this.qualValueIds = qualValueIdsIn;
126 this.strategyVO = strategyVOIn;
127 }
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145 public PmfmStrategyVO(final Integer pmfmStratIdIn, final Double pmfmStratParAcquisNumberIn, final Integer pmfmStratPresRkIn, final String pmfmStratParIsIndivIn, final String pmfmStratIsUniqueByTaxonIn, final Timestamp updateDtIn, final Integer pmfmIdIn, final Integer precTypeIdIn, final String[] acquisLevelCdsIn, final String[] uiFunctionCdsIn, final Integer stratIdIn, final Integer[] qualValueIdsIn, final StrategyVO strategyVOIn)
146 {
147 this.pmfmStratId = pmfmStratIdIn;
148 this.pmfmStratParAcquisNumber = pmfmStratParAcquisNumberIn;
149 this.pmfmStratPresRk = pmfmStratPresRkIn;
150 this.pmfmStratParIsIndiv = pmfmStratParIsIndivIn;
151 this.pmfmStratIsUniqueByTaxon = pmfmStratIsUniqueByTaxonIn;
152 this.updateDt = updateDtIn;
153 this.pmfmId = pmfmIdIn;
154 this.precTypeId = precTypeIdIn;
155 this.acquisLevelCds = acquisLevelCdsIn;
156 this.uiFunctionCds = uiFunctionCdsIn;
157 this.stratId = stratIdIn;
158 this.qualValueIds = qualValueIdsIn;
159 this.strategyVO = strategyVOIn;
160 }
161
162
163
164
165
166
167
168 public PmfmStrategyVO(final PmfmStrategyVO otherBean)
169 {
170 this.pmfmStratId = otherBean.getPmfmStratId();
171 this.pmfmStratParAcquisNumber = otherBean.getPmfmStratParAcquisNumber();
172 this.pmfmStratPresRk = otherBean.getPmfmStratPresRk();
173 this.pmfmStratParIsIndiv = otherBean.getPmfmStratParIsIndiv();
174 this.pmfmStratIsUniqueByTaxon = otherBean.getPmfmStratIsUniqueByTaxon();
175 this.updateDt = otherBean.getUpdateDt();
176 this.pmfmId = otherBean.getPmfmId();
177 this.precTypeId = otherBean.getPrecTypeId();
178 this.acquisLevelCds = otherBean.getAcquisLevelCds();
179 this.uiFunctionCds = otherBean.getUiFunctionCds();
180 this.stratId = otherBean.getStratId();
181 this.qualValueIds = otherBean.getQualValueIds();
182 this.strategyVO = otherBean.getStrategyVO();
183 }
184
185
186
187
188
189 public void copy(final PmfmStrategyVO otherBean)
190 {
191 if (null != otherBean)
192 {
193 this.setPmfmStratId(otherBean.getPmfmStratId());
194 this.setPmfmStratParAcquisNumber(otherBean.getPmfmStratParAcquisNumber());
195 this.setPmfmStratPresRk(otherBean.getPmfmStratPresRk());
196 this.setPmfmStratParIsIndiv(otherBean.getPmfmStratParIsIndiv());
197 this.setPmfmStratIsUniqueByTaxon(otherBean.getPmfmStratIsUniqueByTaxon());
198 this.setUpdateDt(otherBean.getUpdateDt());
199 this.setPmfmId(otherBean.getPmfmId());
200 this.setPrecTypeId(otherBean.getPrecTypeId());
201 this.setAcquisLevelCds(otherBean.getAcquisLevelCds());
202 this.setUiFunctionCds(otherBean.getUiFunctionCds());
203 this.setStratId(otherBean.getStratId());
204 this.setQualValueIds(otherBean.getQualValueIds());
205 this.setStrategyVO(otherBean.getStrategyVO());
206 }
207 }
208
209
210
211
212
213
214 public Integer getPmfmStratId()
215 {
216 return this.pmfmStratId;
217 }
218
219
220
221
222
223 public void setPmfmStratId(final Integer value)
224 {
225 this.pmfmStratId = value;
226 }
227
228
229
230
231
232
233
234
235 public Double getPmfmStratParAcquisNumber()
236 {
237 return this.pmfmStratParAcquisNumber;
238 }
239
240
241
242
243
244
245
246 public void setPmfmStratParAcquisNumber(final Double value)
247 {
248 this.pmfmStratParAcquisNumber = value;
249 }
250
251
252
253
254
255
256 public Integer getPmfmStratPresRk()
257 {
258 return this.pmfmStratPresRk;
259 }
260
261
262
263
264
265 public void setPmfmStratPresRk(final Integer value)
266 {
267 this.pmfmStratPresRk = value;
268 }
269
270
271
272
273
274
275 public String getPmfmStratParIsIndiv()
276 {
277 return this.pmfmStratParIsIndiv;
278 }
279
280
281
282
283
284 public void setPmfmStratParIsIndiv(final String value)
285 {
286 this.pmfmStratParIsIndiv = value;
287 }
288
289
290
291
292
293
294 public String getPmfmStratIsUniqueByTaxon()
295 {
296 return this.pmfmStratIsUniqueByTaxon;
297 }
298
299
300
301
302
303 public void setPmfmStratIsUniqueByTaxon(final String value)
304 {
305 this.pmfmStratIsUniqueByTaxon = value;
306 }
307
308
309
310
311
312
313 public Timestamp getUpdateDt()
314 {
315 return this.updateDt;
316 }
317
318
319
320
321
322 public void setUpdateDt(final Timestamp value)
323 {
324 this.updateDt = value;
325 }
326
327
328
329
330
331
332 public Integer getPmfmId()
333 {
334 return this.pmfmId;
335 }
336
337
338
339
340
341 public void setPmfmId(final Integer value)
342 {
343 this.pmfmId = value;
344 }
345
346
347
348
349
350
351 public Integer getPrecTypeId()
352 {
353 return this.precTypeId;
354 }
355
356
357
358
359
360 public void setPrecTypeId(final Integer value)
361 {
362 this.precTypeId = value;
363 }
364
365
366
367
368
369
370 public String[] getAcquisLevelCds()
371 {
372 return this.acquisLevelCds;
373 }
374
375
376
377
378
379 public void setAcquisLevelCds(final String[] value)
380 {
381 this.acquisLevelCds = value;
382 }
383
384
385
386
387
388
389 public String[] getUiFunctionCds()
390 {
391 return this.uiFunctionCds;
392 }
393
394
395
396
397
398 public void setUiFunctionCds(final String[] value)
399 {
400 this.uiFunctionCds = value;
401 }
402
403
404
405
406
407
408 public Integer getStratId()
409 {
410 return this.stratId;
411 }
412
413
414
415
416
417 public void setStratId(final Integer value)
418 {
419 this.stratId = value;
420 }
421
422
423
424
425
426
427 public Integer[] getQualValueIds()
428 {
429 return this.qualValueIds;
430 }
431
432
433
434
435
436 public void setQualValueIds(final Integer[] value)
437 {
438 this.qualValueIds = value;
439 }
440
441
442
443
444
445
446 public StrategyVO getStrategyVO()
447 {
448 return this.strategyVO;
449 }
450
451
452
453
454
455 public void setStrategyVO(StrategyVO value)
456 {
457 this.strategyVO = value;
458 }
459
460
461
462
463
464
465 @Override
466 public boolean equals(final Object object)
467 {
468 if (object==null || object.getClass() != this.getClass())
469 {
470 return false;
471 }
472
473 if (object==this)
474 {
475 return true;
476 }
477 PmfmStrategyVO rhs = (PmfmStrategyVO) object;
478 return new EqualsBuilder()
479 .append(this.getPmfmStratId(), rhs.getPmfmStratId())
480 .append(this.getPmfmStratParAcquisNumber(), rhs.getPmfmStratParAcquisNumber())
481 .append(this.getPmfmStratPresRk(), rhs.getPmfmStratPresRk())
482 .append(this.getPmfmStratParIsIndiv(), rhs.getPmfmStratParIsIndiv())
483 .append(this.getPmfmStratIsUniqueByTaxon(), rhs.getPmfmStratIsUniqueByTaxon())
484 .append(this.getUpdateDt(), rhs.getUpdateDt())
485 .append(this.getPmfmId(), rhs.getPmfmId())
486 .append(this.getPrecTypeId(), rhs.getPrecTypeId())
487 .append(this.getAcquisLevelCds(), rhs.getAcquisLevelCds())
488 .append(this.getUiFunctionCds(), rhs.getUiFunctionCds())
489 .append(this.getStratId(), rhs.getStratId())
490 .append(this.getQualValueIds(), rhs.getQualValueIds())
491 .append(this.getStrategyVO(), rhs.getStrategyVO())
492 .isEquals();
493 }
494
495
496
497
498
499
500 public int compareTo(final PmfmStrategyVO object)
501 {
502 if (object==null)
503 {
504 return -1;
505 }
506
507 if (object==this)
508 {
509 return 0;
510 }
511 return new CompareToBuilder()
512 .append(this.getPmfmStratId(), object.getPmfmStratId())
513 .append(this.getPmfmStratParAcquisNumber(), object.getPmfmStratParAcquisNumber())
514 .append(this.getPmfmStratPresRk(), object.getPmfmStratPresRk())
515 .append(this.getPmfmStratParIsIndiv(), object.getPmfmStratParIsIndiv())
516 .append(this.getPmfmStratIsUniqueByTaxon(), object.getPmfmStratIsUniqueByTaxon())
517 .append(this.getUpdateDt(), object.getUpdateDt())
518 .append(this.getPmfmId(), object.getPmfmId())
519 .append(this.getPrecTypeId(), object.getPrecTypeId())
520 .append(this.getAcquisLevelCds(), object.getAcquisLevelCds())
521 .append(this.getUiFunctionCds(), object.getUiFunctionCds())
522 .append(this.getStratId(), object.getStratId())
523 .append(this.getQualValueIds(), object.getQualValueIds())
524 .append(this.getStrategyVO(), object.getStrategyVO())
525 .toComparison();
526 }
527
528
529
530
531
532 @Override
533 public int hashCode()
534 {
535 return new HashCodeBuilder(1249046965, -82296885)
536 .append(this.getPmfmStratId())
537 .append(this.getPmfmStratParAcquisNumber())
538 .append(this.getPmfmStratPresRk())
539 .append(this.getPmfmStratParIsIndiv())
540 .append(this.getPmfmStratIsUniqueByTaxon())
541 .append(this.getUpdateDt())
542 .append(this.getPmfmId())
543 .append(this.getPrecTypeId())
544 .append(this.getAcquisLevelCds())
545 .append(this.getUiFunctionCds())
546 .append(this.getStratId())
547 .append(this.getQualValueIds())
548 .append(this.getStrategyVO())
549 .toHashCode();
550 }
551
552
553
554
555
556 @Override
557 public String toString()
558 {
559 return new ToStringBuilder(this)
560 .append("pmfmStratId", this.getPmfmStratId())
561 .append("pmfmStratParAcquisNumber", this.getPmfmStratParAcquisNumber())
562 .append("pmfmStratPresRk", this.getPmfmStratPresRk())
563 .append("pmfmStratParIsIndiv", this.getPmfmStratParIsIndiv())
564 .append("pmfmStratIsUniqueByTaxon", this.getPmfmStratIsUniqueByTaxon())
565 .append("updateDt", this.getUpdateDt())
566 .append("pmfmId", this.getPmfmId())
567 .append("precTypeId", this.getPrecTypeId())
568 .append("acquisLevelCds", this.getAcquisLevelCds())
569 .append("uiFunctionCds", this.getUiFunctionCds())
570 .append("stratId", this.getStratId())
571 .append("qualValueIds", this.getQualValueIds())
572 .append("strategyVO", this.getStrategyVO())
573 .toString();
574 }
575
576
577
578
579
580
581
582
583
584
585
586
587
588 protected static boolean equal(final Object first, final Object second)
589 {
590 final boolean equal;
591
592 if (first == null)
593 {
594 equal = (second == null);
595 }
596 else if (first.getClass().isArray() && (second != null) && second.getClass().isArray())
597 {
598 equal = Arrays.equals((Object[])first, (Object[])second);
599 }
600 else
601 {
602 equal = first.equals(second);
603 }
604
605 return equal;
606 }
607
608
609 }