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