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