1
2
3
4
5
6 package fr.ifremer.quadrige3.core.dao.data.measurement;
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 import fr.ifremer.quadrige3.core.dao.administration.program.Program;
29 import fr.ifremer.quadrige3.core.dao.administration.user.Department;
30 import fr.ifremer.quadrige3.core.dao.data.sample.Sample;
31 import fr.ifremer.quadrige3.core.dao.data.samplingoperation.SamplingOperation;
32 import fr.ifremer.quadrige3.core.dao.data.survey.Survey;
33 import fr.ifremer.quadrige3.core.dao.referential.AnalysisInstrument;
34 import fr.ifremer.quadrige3.core.dao.referential.NumericalPrecision;
35 import fr.ifremer.quadrige3.core.dao.referential.ObjectType;
36 import fr.ifremer.quadrige3.core.dao.referential.PrecisionType;
37 import fr.ifremer.quadrige3.core.dao.referential.QualityFlag;
38 import fr.ifremer.quadrige3.core.dao.referential.pmfm.Pmfm;
39 import fr.ifremer.quadrige3.core.dao.referential.pmfm.QualitativeValue;
40 import fr.ifremer.quadrige3.core.dao.referential.taxon.ReferenceTaxon;
41 import fr.ifremer.quadrige3.core.dao.referential.taxon.TaxonGroup;
42 import java.io.Serializable;
43 import java.sql.Timestamp;
44 import java.util.Collection;
45 import java.util.Date;
46 import java.util.HashSet;
47
48
49
50
51
52
53 public abstract class TaxonMeasurement
54 implements Serializable, Comparable<TaxonMeasurement>
55 {
56
57
58
59 private static final long serialVersionUID = -6971564363273451404L;
60
61
62 private Integer taxonMeasId;
63
64
65
66
67
68 public Integer getTaxonMeasId()
69 {
70 return this.taxonMeasId;
71 }
72
73
74
75
76
77 public void setTaxonMeasId(Integer taxonMeasIdIn)
78 {
79 this.taxonMeasId = taxonMeasIdIn;
80 }
81
82 private Integer objectId;
83
84
85
86
87
88 public Integer getObjectId()
89 {
90 return this.objectId;
91 }
92
93
94
95
96
97 public void setObjectId(Integer objectIdIn)
98 {
99 this.objectId = objectIdIn;
100 }
101
102 private Integer taxonMeasIndivId;
103
104
105
106
107
108 public Integer getTaxonMeasIndivId()
109 {
110 return this.taxonMeasIndivId;
111 }
112
113
114
115
116
117 public void setTaxonMeasIndivId(Integer taxonMeasIndivIdIn)
118 {
119 this.taxonMeasIndivId = taxonMeasIndivIdIn;
120 }
121
122 private Float taxonMeasNumerValue;
123
124
125
126
127
128 public Float getTaxonMeasNumerValue()
129 {
130 return this.taxonMeasNumerValue;
131 }
132
133
134
135
136
137 public void setTaxonMeasNumerValue(Float taxonMeasNumerValueIn)
138 {
139 this.taxonMeasNumerValue = taxonMeasNumerValueIn;
140 }
141
142 private Float taxonMeasPrecisionValue;
143
144
145
146
147
148 public Float getTaxonMeasPrecisionValue()
149 {
150 return this.taxonMeasPrecisionValue;
151 }
152
153
154
155
156
157 public void setTaxonMeasPrecisionValue(Float taxonMeasPrecisionValueIn)
158 {
159 this.taxonMeasPrecisionValue = taxonMeasPrecisionValueIn;
160 }
161
162 private Integer taxonMeasDigitNumber;
163
164
165
166
167
168
169 public Integer getTaxonMeasDigitNumber()
170 {
171 return this.taxonMeasDigitNumber;
172 }
173
174
175
176
177
178
179 public void setTaxonMeasDigitNumber(Integer taxonMeasDigitNumberIn)
180 {
181 this.taxonMeasDigitNumber = taxonMeasDigitNumberIn;
182 }
183
184 private Date taxonMeasControlDt;
185
186
187
188
189
190 public Date getTaxonMeasControlDt()
191 {
192 return this.taxonMeasControlDt;
193 }
194
195
196
197
198
199 public void setTaxonMeasControlDt(Date taxonMeasControlDtIn)
200 {
201 this.taxonMeasControlDt = taxonMeasControlDtIn;
202 }
203
204 private Date taxonMeasValidDt;
205
206
207
208
209
210 public Date getTaxonMeasValidDt()
211 {
212 return this.taxonMeasValidDt;
213 }
214
215
216
217
218
219 public void setTaxonMeasValidDt(Date taxonMeasValidDtIn)
220 {
221 this.taxonMeasValidDt = taxonMeasValidDtIn;
222 }
223
224 private Date taxonMeasQualifDt;
225
226
227
228
229
230 public Date getTaxonMeasQualifDt()
231 {
232 return this.taxonMeasQualifDt;
233 }
234
235
236
237
238
239 public void setTaxonMeasQualifDt(Date taxonMeasQualifDtIn)
240 {
241 this.taxonMeasQualifDt = taxonMeasQualifDtIn;
242 }
243
244 private String taxonMeasQualifCm;
245
246
247
248
249
250
251 public String getTaxonMeasQualifCm()
252 {
253 return this.taxonMeasQualifCm;
254 }
255
256
257
258
259
260
261 public void setTaxonMeasQualifCm(String taxonMeasQualifCmIn)
262 {
263 this.taxonMeasQualifCm = taxonMeasQualifCmIn;
264 }
265
266 private String taxonMeasCm;
267
268
269
270
271
272 public String getTaxonMeasCm()
273 {
274 return this.taxonMeasCm;
275 }
276
277
278
279
280
281 public void setTaxonMeasCm(String taxonMeasCmIn)
282 {
283 this.taxonMeasCm = taxonMeasCmIn;
284 }
285
286 private Timestamp updateDt;
287
288
289
290
291
292 public Timestamp getUpdateDt()
293 {
294 return this.updateDt;
295 }
296
297
298
299
300
301 public void setUpdateDt(Timestamp updateDtIn)
302 {
303 this.updateDt = updateDtIn;
304 }
305
306 private Integer taxonNameId;
307
308
309
310
311
312
313 public Integer getTaxonNameId()
314 {
315 return this.taxonNameId;
316 }
317
318
319
320
321
322
323 public void setTaxonNameId(Integer taxonNameIdIn)
324 {
325 this.taxonNameId = taxonNameIdIn;
326 }
327
328 private String taxonNameNm;
329
330
331
332
333
334
335 public String getTaxonNameNm()
336 {
337 return this.taxonNameNm;
338 }
339
340
341
342
343
344
345 public void setTaxonNameNm(String taxonNameNmIn)
346 {
347 this.taxonNameNm = taxonNameNmIn;
348 }
349
350 private Integer remoteId;
351
352
353
354
355
356 public Integer getRemoteId()
357 {
358 return this.remoteId;
359 }
360
361
362
363
364
365 public void setRemoteId(Integer remoteIdIn)
366 {
367 this.remoteId = remoteIdIn;
368 }
369
370
371 private Sample sample;
372
373
374
375
376
377 public Sample getSample()
378 {
379 return this.sample;
380 }
381
382
383
384
385
386 public void setSample(Sample sampleIn)
387 {
388 this.sample = sampleIn;
389 }
390
391 private TaxonGroup taxonGroup;
392
393
394
395
396
397 public TaxonGroup getTaxonGroup()
398 {
399 return this.taxonGroup;
400 }
401
402
403
404
405
406 public void setTaxonGroup(TaxonGroup taxonGroupIn)
407 {
408 this.taxonGroup = taxonGroupIn;
409 }
410
411 private Pmfm pmfm;
412
413
414
415
416
417 public Pmfm getPmfm()
418 {
419 return this.pmfm;
420 }
421
422
423
424
425
426 public void setPmfm(Pmfm pmfmIn)
427 {
428 this.pmfm = pmfmIn;
429 }
430
431 private ReferenceTaxon referenceTaxon;
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469 public ReferenceTaxon getReferenceTaxon()
470 {
471 return this.referenceTaxon;
472 }
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510 public void setReferenceTaxon(ReferenceTaxon referenceTaxonIn)
511 {
512 this.referenceTaxon = referenceTaxonIn;
513 }
514
515 private Department recorderDepartment;
516
517
518
519
520
521 public Department getRecorderDepartment()
522 {
523 return this.recorderDepartment;
524 }
525
526
527
528
529
530 public void setRecorderDepartment(Department recorderDepartmentIn)
531 {
532 this.recorderDepartment = recorderDepartmentIn;
533 }
534
535 private QualityFlag qualityFlag;
536
537
538
539
540
541 public QualityFlag getQualityFlag()
542 {
543 return this.qualityFlag;
544 }
545
546
547
548
549
550 public void setQualityFlag(QualityFlag qualityFlagIn)
551 {
552 this.qualityFlag = qualityFlagIn;
553 }
554
555 private Collection<Program> programs = new HashSet<Program>();
556
557
558
559
560
561 public Collection<Program> getPrograms()
562 {
563 return this.programs;
564 }
565
566
567
568
569
570 public void setPrograms(Collection<Program> programsIn)
571 {
572 this.programs = programsIn;
573 }
574
575
576
577
578
579
580
581 public boolean addPrograms(Program elementToAdd)
582 {
583 return this.programs.add(elementToAdd);
584 }
585
586
587
588
589
590
591
592 public boolean removePrograms(Program elementToRemove)
593 {
594 return this.programs.remove(elementToRemove);
595 }
596
597 private NumericalPrecision numericalPrecision;
598
599
600
601
602
603 public NumericalPrecision getNumericalPrecision()
604 {
605 return this.numericalPrecision;
606 }
607
608
609
610
611
612 public void setNumericalPrecision(NumericalPrecision numericalPrecisionIn)
613 {
614 this.numericalPrecision = numericalPrecisionIn;
615 }
616
617 private PrecisionType precisionType;
618
619
620
621
622
623 public PrecisionType getPrecisionType()
624 {
625 return this.precisionType;
626 }
627
628
629
630
631
632 public void setPrecisionType(PrecisionType precisionTypeIn)
633 {
634 this.precisionType = precisionTypeIn;
635 }
636
637 private Department department;
638
639
640
641
642
643 public Department getDepartment()
644 {
645 return this.department;
646 }
647
648
649
650
651
652 public void setDepartment(Department departmentIn)
653 {
654 this.department = departmentIn;
655 }
656
657 private ObjectType objectType;
658
659
660
661
662
663
664
665 public ObjectType getObjectType()
666 {
667 return this.objectType;
668 }
669
670
671
672
673
674
675
676 public void setObjectType(ObjectType objectTypeIn)
677 {
678 this.objectType = objectTypeIn;
679 }
680
681 private AnalysisInstrument analysisInstrument;
682
683
684
685
686
687 public AnalysisInstrument getAnalysisInstrument()
688 {
689 return this.analysisInstrument;
690 }
691
692
693
694
695
696 public void setAnalysisInstrument(AnalysisInstrument analysisInstrumentIn)
697 {
698 this.analysisInstrument = analysisInstrumentIn;
699 }
700
701 private QualitativeValue qualitativeValue;
702
703
704
705
706
707 public QualitativeValue getQualitativeValue()
708 {
709 return this.qualitativeValue;
710 }
711
712
713
714
715
716 public void setQualitativeValue(QualitativeValue qualitativeValueIn)
717 {
718 this.qualitativeValue = qualitativeValueIn;
719 }
720
721 private Survey survey;
722
723
724
725
726
727
728 public Survey getSurvey()
729 {
730 return this.survey;
731 }
732
733
734
735
736
737
738 public void setSurvey(Survey surveyIn)
739 {
740 this.survey = surveyIn;
741 }
742
743 private SamplingOperation samplingOperation;
744
745
746
747
748
749 public SamplingOperation getSamplingOperation()
750 {
751 return this.samplingOperation;
752 }
753
754
755
756
757
758 public void setSamplingOperation(SamplingOperation samplingOperationIn)
759 {
760 this.samplingOperation = samplingOperationIn;
761 }
762
763
764
765
766
767 @Override
768 public boolean equals(Object object)
769 {
770 if (this == object)
771 {
772 return true;
773 }
774 if (!(object instanceof TaxonMeasurement))
775 {
776 return false;
777 }
778 final TaxonMeasurement that = (TaxonMeasurement)object;
779 if (this.taxonMeasId == null || that.getTaxonMeasId() == null || !this.taxonMeasId.equals(that.getTaxonMeasId()))
780 {
781 return false;
782 }
783 return true;
784 }
785
786
787
788
789 @Override
790 public int hashCode()
791 {
792 int hashCode = 0;
793 hashCode = 29 * hashCode + (this.taxonMeasId == null ? 0 : this.taxonMeasId.hashCode());
794
795 return hashCode;
796 }
797
798
799
800
801 public static final class Factory
802 {
803
804
805
806
807 public static TaxonMeasurement newInstance()
808 {
809 return new TaxonMeasurementImpl();
810 }
811
812
813
814
815
816
817
818
819
820
821 public static TaxonMeasurement newInstance(Integer objectId, Pmfm pmfm, QualityFlag qualityFlag, ObjectType objectType)
822 {
823 final TaxonMeasurement entity = new TaxonMeasurementImpl();
824 entity.setObjectId(objectId);
825 entity.setPmfm(pmfm);
826 entity.setQualityFlag(qualityFlag);
827 entity.setObjectType(objectType);
828 return entity;
829 }
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865 public static TaxonMeasurement newInstance(Integer objectId, Integer taxonMeasIndivId, Float taxonMeasNumerValue, Float taxonMeasPrecisionValue, Integer taxonMeasDigitNumber, Date taxonMeasControlDt, Date taxonMeasValidDt, Date taxonMeasQualifDt, String taxonMeasQualifCm, String taxonMeasCm, Timestamp updateDt, Integer taxonNameId, String taxonNameNm, Integer remoteId, Sample sample, TaxonGroup taxonGroup, Pmfm pmfm, ReferenceTaxon referenceTaxon, Department recorderDepartment, QualityFlag qualityFlag, Collection<Program> programs, NumericalPrecision numericalPrecision, PrecisionType precisionType, Department department, ObjectType objectType, AnalysisInstrument analysisInstrument, QualitativeValue qualitativeValue, Survey survey, SamplingOperation samplingOperation)
866 {
867 final TaxonMeasurement entity = new TaxonMeasurementImpl();
868 entity.setObjectId(objectId);
869 entity.setTaxonMeasIndivId(taxonMeasIndivId);
870 entity.setTaxonMeasNumerValue(taxonMeasNumerValue);
871 entity.setTaxonMeasPrecisionValue(taxonMeasPrecisionValue);
872 entity.setTaxonMeasDigitNumber(taxonMeasDigitNumber);
873 entity.setTaxonMeasControlDt(taxonMeasControlDt);
874 entity.setTaxonMeasValidDt(taxonMeasValidDt);
875 entity.setTaxonMeasQualifDt(taxonMeasQualifDt);
876 entity.setTaxonMeasQualifCm(taxonMeasQualifCm);
877 entity.setTaxonMeasCm(taxonMeasCm);
878 entity.setUpdateDt(updateDt);
879 entity.setTaxonNameId(taxonNameId);
880 entity.setTaxonNameNm(taxonNameNm);
881 entity.setRemoteId(remoteId);
882 entity.setSample(sample);
883 entity.setTaxonGroup(taxonGroup);
884 entity.setPmfm(pmfm);
885 entity.setReferenceTaxon(referenceTaxon);
886 entity.setRecorderDepartment(recorderDepartment);
887 entity.setQualityFlag(qualityFlag);
888 entity.setPrograms(programs);
889 entity.setNumericalPrecision(numericalPrecision);
890 entity.setPrecisionType(precisionType);
891 entity.setDepartment(department);
892 entity.setObjectType(objectType);
893 entity.setAnalysisInstrument(analysisInstrument);
894 entity.setQualitativeValue(qualitativeValue);
895 entity.setSurvey(survey);
896 entity.setSamplingOperation(samplingOperation);
897 return entity;
898 }
899 }
900
901
902
903
904 public int compareTo(TaxonMeasurement o)
905 {
906 int cmp = 0;
907 if (this.getTaxonMeasId() != null)
908 {
909 cmp = this.getTaxonMeasId().compareTo(o.getTaxonMeasId());
910 }
911 else
912 {
913 if (this.getObjectId() != null)
914 {
915 cmp = (cmp != 0 ? cmp : this.getObjectId().compareTo(o.getObjectId()));
916 }
917 if (this.getTaxonMeasIndivId() != null)
918 {
919 cmp = (cmp != 0 ? cmp : this.getTaxonMeasIndivId().compareTo(o.getTaxonMeasIndivId()));
920 }
921 if (this.getTaxonMeasNumerValue() != null)
922 {
923 cmp = (cmp != 0 ? cmp : this.getTaxonMeasNumerValue().compareTo(o.getTaxonMeasNumerValue()));
924 }
925 if (this.getTaxonMeasPrecisionValue() != null)
926 {
927 cmp = (cmp != 0 ? cmp : this.getTaxonMeasPrecisionValue().compareTo(o.getTaxonMeasPrecisionValue()));
928 }
929 if (this.getTaxonMeasDigitNumber() != null)
930 {
931 cmp = (cmp != 0 ? cmp : this.getTaxonMeasDigitNumber().compareTo(o.getTaxonMeasDigitNumber()));
932 }
933 if (this.getTaxonMeasControlDt() != null)
934 {
935 cmp = (cmp != 0 ? cmp : this.getTaxonMeasControlDt().compareTo(o.getTaxonMeasControlDt()));
936 }
937 if (this.getTaxonMeasValidDt() != null)
938 {
939 cmp = (cmp != 0 ? cmp : this.getTaxonMeasValidDt().compareTo(o.getTaxonMeasValidDt()));
940 }
941 if (this.getTaxonMeasQualifDt() != null)
942 {
943 cmp = (cmp != 0 ? cmp : this.getTaxonMeasQualifDt().compareTo(o.getTaxonMeasQualifDt()));
944 }
945 if (this.getTaxonMeasQualifCm() != null)
946 {
947 cmp = (cmp != 0 ? cmp : this.getTaxonMeasQualifCm().compareTo(o.getTaxonMeasQualifCm()));
948 }
949 if (this.getTaxonMeasCm() != null)
950 {
951 cmp = (cmp != 0 ? cmp : this.getTaxonMeasCm().compareTo(o.getTaxonMeasCm()));
952 }
953 if (this.getUpdateDt() != null)
954 {
955 cmp = (cmp != 0 ? cmp : this.getUpdateDt().compareTo(o.getUpdateDt()));
956 }
957 if (this.getTaxonNameId() != null)
958 {
959 cmp = (cmp != 0 ? cmp : this.getTaxonNameId().compareTo(o.getTaxonNameId()));
960 }
961 if (this.getTaxonNameNm() != null)
962 {
963 cmp = (cmp != 0 ? cmp : this.getTaxonNameNm().compareTo(o.getTaxonNameNm()));
964 }
965 if (this.getRemoteId() != null)
966 {
967 cmp = (cmp != 0 ? cmp : this.getRemoteId().compareTo(o.getRemoteId()));
968 }
969 }
970 return cmp;
971 }
972
973
974 }