1
2
3
4
5
6 package fr.ifremer.quadrige2.core.dao.data.samplingoperation;
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.aquaculture.Batch;
32 import fr.ifremer.quadrige2.core.dao.data.survey.Survey;
33 import fr.ifremer.quadrige2.core.dao.referential.DepthLevel;
34 import fr.ifremer.quadrige2.core.dao.referential.QualityFlag;
35 import fr.ifremer.quadrige2.core.dao.referential.SamplingEquipment;
36 import fr.ifremer.quadrige2.core.dao.referential.Unit;
37 import fr.ifremer.quadrige2.core.dao.referential.monitoringLocation.PositionningSystem;
38 import fr.ifremer.quadrige2.core.dao.system.SamplingOperArea;
39 import fr.ifremer.quadrige2.core.dao.system.SamplingOperLine;
40 import fr.ifremer.quadrige2.core.dao.system.SamplingOperPoint;
41 import java.io.Serializable;
42 import java.sql.Timestamp;
43 import java.util.Collection;
44 import java.util.Date;
45 import java.util.HashSet;
46
47
48
49
50
51 public abstract class SamplingOperation
52 implements Serializable, Comparable<SamplingOperation>
53 {
54
55
56
57 private static final long serialVersionUID = -627386421001503458L;
58
59
60 private Integer samplingOperId;
61
62
63
64
65
66 public Integer getSamplingOperId()
67 {
68 return this.samplingOperId;
69 }
70
71
72
73
74
75 public void setSamplingOperId(Integer samplingOperIdIn)
76 {
77 this.samplingOperId = samplingOperIdIn;
78 }
79
80 private String samplingOperLb;
81
82
83
84
85
86 public String getSamplingOperLb()
87 {
88 return this.samplingOperLb;
89 }
90
91
92
93
94
95 public void setSamplingOperLb(String samplingOperLbIn)
96 {
97 this.samplingOperLb = samplingOperLbIn;
98 }
99
100 private Float samplingOperDepth;
101
102
103
104
105
106
107 public Float getSamplingOperDepth()
108 {
109 return this.samplingOperDepth;
110 }
111
112
113
114
115
116
117 public void setSamplingOperDepth(Float samplingOperDepthIn)
118 {
119 this.samplingOperDepth = samplingOperDepthIn;
120 }
121
122 private Float samplingOperMaxDepth;
123
124
125
126
127
128 public Float getSamplingOperMaxDepth()
129 {
130 return this.samplingOperMaxDepth;
131 }
132
133
134
135
136
137 public void setSamplingOperMaxDepth(Float samplingOperMaxDepthIn)
138 {
139 this.samplingOperMaxDepth = samplingOperMaxDepthIn;
140 }
141
142 private Float samplingOperMinDepth;
143
144
145
146
147
148 public Float getSamplingOperMinDepth()
149 {
150 return this.samplingOperMinDepth;
151 }
152
153
154
155
156
157 public void setSamplingOperMinDepth(Float samplingOperMinDepthIn)
158 {
159 this.samplingOperMinDepth = samplingOperMinDepthIn;
160 }
161
162 private Float samplingOperSize;
163
164
165
166
167
168 public Float getSamplingOperSize()
169 {
170 return this.samplingOperSize;
171 }
172
173
174
175
176
177 public void setSamplingOperSize(Float samplingOperSizeIn)
178 {
179 this.samplingOperSize = samplingOperSizeIn;
180 }
181
182 private Double samplingOperTime;
183
184
185
186
187
188
189 public Double getSamplingOperTime()
190 {
191 return this.samplingOperTime;
192 }
193
194
195
196
197
198
199 public void setSamplingOperTime(Double samplingOperTimeIn)
200 {
201 this.samplingOperTime = samplingOperTimeIn;
202 }
203
204 private Double samplingOperNumberIndiv;
205
206
207
208
209
210
211
212 public Double getSamplingOperNumberIndiv()
213 {
214 return this.samplingOperNumberIndiv;
215 }
216
217
218
219
220
221
222
223 public void setSamplingOperNumberIndiv(Double samplingOperNumberIndivIn)
224 {
225 this.samplingOperNumberIndiv = samplingOperNumberIndivIn;
226 }
227
228 private String samplingOperCm;
229
230
231
232
233
234 public String getSamplingOperCm()
235 {
236 return this.samplingOperCm;
237 }
238
239
240
241
242
243 public void setSamplingOperCm(String samplingOperCmIn)
244 {
245 this.samplingOperCm = samplingOperCmIn;
246 }
247
248 private Double samplingOperUtFormat;
249
250
251
252
253
254 public Double getSamplingOperUtFormat()
255 {
256 return this.samplingOperUtFormat;
257 }
258
259
260
261
262
263 public void setSamplingOperUtFormat(Double samplingOperUtFormatIn)
264 {
265 this.samplingOperUtFormat = samplingOperUtFormatIn;
266 }
267
268 private Date samplingOperQualifDt;
269
270
271
272
273
274 public Date getSamplingOperQualifDt()
275 {
276 return this.samplingOperQualifDt;
277 }
278
279
280
281
282
283 public void setSamplingOperQualifDt(Date samplingOperQualifDtIn)
284 {
285 this.samplingOperQualifDt = samplingOperQualifDtIn;
286 }
287
288 private String samplingOperQualifCm;
289
290
291
292
293
294 public String getSamplingOperQualifCm()
295 {
296 return this.samplingOperQualifCm;
297 }
298
299
300
301
302
303 public void setSamplingOperQualifCm(String samplingOperQualifCmIn)
304 {
305 this.samplingOperQualifCm = samplingOperQualifCmIn;
306 }
307
308 private Date samplingOperControlDt;
309
310
311
312
313
314 public Date getSamplingOperControlDt()
315 {
316 return this.samplingOperControlDt;
317 }
318
319
320
321
322
323 public void setSamplingOperControlDt(Date samplingOperControlDtIn)
324 {
325 this.samplingOperControlDt = samplingOperControlDtIn;
326 }
327
328 private Date samplingOperValidDt;
329
330
331
332
333
334 public Date getSamplingOperValidDt()
335 {
336 return this.samplingOperValidDt;
337 }
338
339
340
341
342
343 public void setSamplingOperValidDt(Date samplingOperValidDtIn)
344 {
345 this.samplingOperValidDt = samplingOperValidDtIn;
346 }
347
348 private String samplingOperActualPosition;
349
350
351
352
353
354 public String getSamplingOperActualPosition()
355 {
356 return this.samplingOperActualPosition;
357 }
358
359
360
361
362
363 public void setSamplingOperActualPosition(String samplingOperActualPositionIn)
364 {
365 this.samplingOperActualPosition = samplingOperActualPositionIn;
366 }
367
368 private String samplingOperPositionCm;
369
370
371
372
373
374 public String getSamplingOperPositionCm()
375 {
376 return this.samplingOperPositionCm;
377 }
378
379
380
381
382
383 public void setSamplingOperPositionCm(String samplingOperPositionCmIn)
384 {
385 this.samplingOperPositionCm = samplingOperPositionCmIn;
386 }
387
388 private Date samplingOperGeomValidDt;
389
390
391
392
393
394 public Date getSamplingOperGeomValidDt()
395 {
396 return this.samplingOperGeomValidDt;
397 }
398
399
400
401
402
403 public void setSamplingOperGeomValidDt(Date samplingOperGeomValidDtIn)
404 {
405 this.samplingOperGeomValidDt = samplingOperGeomValidDtIn;
406 }
407
408 private String samplingOperScope;
409
410
411
412
413
414
415 public String getSamplingOperScope()
416 {
417 return this.samplingOperScope;
418 }
419
420
421
422
423
424
425 public void setSamplingOperScope(String samplingOperScopeIn)
426 {
427 this.samplingOperScope = samplingOperScopeIn;
428 }
429
430 private String samplingOperHasMeas;
431
432
433
434
435
436 public String getSamplingOperHasMeas()
437 {
438 return this.samplingOperHasMeas;
439 }
440
441
442
443
444
445 public void setSamplingOperHasMeas(String samplingOperHasMeasIn)
446 {
447 this.samplingOperHasMeas = samplingOperHasMeasIn;
448 }
449
450 private Timestamp updateDt;
451
452
453
454
455
456 public Timestamp getUpdateDt()
457 {
458 return this.updateDt;
459 }
460
461
462
463
464
465 public void setUpdateDt(Timestamp updateDtIn)
466 {
467 this.updateDt = updateDtIn;
468 }
469
470
471 private DepthLevel depthLevel;
472
473
474
475
476
477 public DepthLevel getDepthLevel()
478 {
479 return this.depthLevel;
480 }
481
482
483
484
485
486 public void setDepthLevel(DepthLevel depthLevelIn)
487 {
488 this.depthLevel = depthLevelIn;
489 }
490
491 private Collection<SamplingOperPoint> samplingOperPoints = new HashSet<SamplingOperPoint>();
492
493
494
495
496
497 public Collection<SamplingOperPoint> getSamplingOperPoints()
498 {
499 return this.samplingOperPoints;
500 }
501
502
503
504
505
506 public void setSamplingOperPoints(Collection<SamplingOperPoint> samplingOperPointsIn)
507 {
508 this.samplingOperPoints = samplingOperPointsIn;
509 }
510
511
512
513
514
515
516
517 public boolean addSamplingOperPoints(SamplingOperPoint elementToAdd)
518 {
519 return this.samplingOperPoints.add(elementToAdd);
520 }
521
522
523
524
525
526
527
528 public boolean removeSamplingOperPoints(SamplingOperPoint elementToRemove)
529 {
530 return this.samplingOperPoints.remove(elementToRemove);
531 }
532
533 private QualityFlag qualityFlag;
534
535
536
537
538
539 public QualityFlag getQualityFlag()
540 {
541 return this.qualityFlag;
542 }
543
544
545
546
547
548 public void setQualityFlag(QualityFlag qualityFlagIn)
549 {
550 this.qualityFlag = qualityFlagIn;
551 }
552
553 private Collection<SamplingOperArea> samplingOperAreas = new HashSet<SamplingOperArea>();
554
555
556
557
558
559 public Collection<SamplingOperArea> getSamplingOperAreas()
560 {
561 return this.samplingOperAreas;
562 }
563
564
565
566
567
568 public void setSamplingOperAreas(Collection<SamplingOperArea> samplingOperAreasIn)
569 {
570 this.samplingOperAreas = samplingOperAreasIn;
571 }
572
573
574
575
576
577
578
579 public boolean addSamplingOperAreas(SamplingOperArea elementToAdd)
580 {
581 return this.samplingOperAreas.add(elementToAdd);
582 }
583
584
585
586
587
588
589
590 public boolean removeSamplingOperAreas(SamplingOperArea elementToRemove)
591 {
592 return this.samplingOperAreas.remove(elementToRemove);
593 }
594
595 private Collection<Program> programs = new HashSet<Program>();
596
597
598
599
600
601 public Collection<Program> getPrograms()
602 {
603 return this.programs;
604 }
605
606
607
608
609
610 public void setPrograms(Collection<Program> programsIn)
611 {
612 this.programs = programsIn;
613 }
614
615
616
617
618
619
620
621 public boolean addPrograms(Program elementToAdd)
622 {
623 return this.programs.add(elementToAdd);
624 }
625
626
627
628
629
630
631
632 public boolean removePrograms(Program elementToRemove)
633 {
634 return this.programs.remove(elementToRemove);
635 }
636
637 private Unit depthUnit;
638
639
640
641
642
643 public Unit getDepthUnit()
644 {
645 return this.depthUnit;
646 }
647
648
649
650
651
652 public void setDepthUnit(Unit depthUnitIn)
653 {
654 this.depthUnit = depthUnitIn;
655 }
656
657 private Batch batch;
658
659
660
661
662
663
664
665
666
667
668
669 public Batch getBatch()
670 {
671 return this.batch;
672 }
673
674
675
676
677
678
679
680
681
682
683
684 public void setBatch(Batch batchIn)
685 {
686 this.batch = batchIn;
687 }
688
689 private Survey survey;
690
691
692
693
694
695
696 public Survey getSurvey()
697 {
698 return this.survey;
699 }
700
701
702
703
704
705
706 public void setSurvey(Survey surveyIn)
707 {
708 this.survey = surveyIn;
709 }
710
711 private Department recorderDepartment;
712
713
714
715
716
717 public Department getRecorderDepartment()
718 {
719 return this.recorderDepartment;
720 }
721
722
723
724
725
726 public void setRecorderDepartment(Department recorderDepartmentIn)
727 {
728 this.recorderDepartment = recorderDepartmentIn;
729 }
730
731 private Collection<SamplingOperLine> samplingOperLines = new HashSet<SamplingOperLine>();
732
733
734
735
736
737 public Collection<SamplingOperLine> getSamplingOperLines()
738 {
739 return this.samplingOperLines;
740 }
741
742
743
744
745
746 public void setSamplingOperLines(Collection<SamplingOperLine> samplingOperLinesIn)
747 {
748 this.samplingOperLines = samplingOperLinesIn;
749 }
750
751
752
753
754
755
756
757 public boolean addSamplingOperLines(SamplingOperLine elementToAdd)
758 {
759 return this.samplingOperLines.add(elementToAdd);
760 }
761
762
763
764
765
766
767
768 public boolean removeSamplingOperLines(SamplingOperLine elementToRemove)
769 {
770 return this.samplingOperLines.remove(elementToRemove);
771 }
772
773 private Unit sizeUnit;
774
775
776
777
778
779 public Unit getSizeUnit()
780 {
781 return this.sizeUnit;
782 }
783
784
785
786
787
788 public void setSizeUnit(Unit sizeUnitIn)
789 {
790 this.sizeUnit = sizeUnitIn;
791 }
792
793 private SamplingEquipment samplingEquipment;
794
795
796
797
798
799 public SamplingEquipment getSamplingEquipment()
800 {
801 return this.samplingEquipment;
802 }
803
804
805
806
807
808 public void setSamplingEquipment(SamplingEquipment samplingEquipmentIn)
809 {
810 this.samplingEquipment = samplingEquipmentIn;
811 }
812
813 private PositionningSystem positionningSystem;
814
815
816
817
818
819 public PositionningSystem getPositionningSystem()
820 {
821 return this.positionningSystem;
822 }
823
824
825
826
827
828 public void setPositionningSystem(PositionningSystem positionningSystemIn)
829 {
830 this.positionningSystem = positionningSystemIn;
831 }
832
833 private Department department;
834
835
836
837
838
839 public Department getDepartment()
840 {
841 return this.department;
842 }
843
844
845
846
847
848 public void setDepartment(Department departmentIn)
849 {
850 this.department = departmentIn;
851 }
852
853
854
855
856
857 @Override
858 public boolean equals(Object object)
859 {
860 if (this == object)
861 {
862 return true;
863 }
864 if (!(object instanceof SamplingOperation))
865 {
866 return false;
867 }
868 final SamplingOperation that = (SamplingOperation)object;
869 if (this.samplingOperId == null || that.getSamplingOperId() == null || !this.samplingOperId.equals(that.getSamplingOperId()))
870 {
871 return false;
872 }
873 return true;
874 }
875
876
877
878
879 @Override
880 public int hashCode()
881 {
882 int hashCode = 0;
883 hashCode = 29 * hashCode + (this.samplingOperId == null ? 0 : this.samplingOperId.hashCode());
884
885 return hashCode;
886 }
887
888
889
890
891 public static final class Factory
892 {
893
894
895
896
897 public static SamplingOperation newInstance()
898 {
899 return new SamplingOperationImpl();
900 }
901
902
903
904
905
906
907
908
909
910
911
912
913 public static SamplingOperation newInstance(Timestamp updateDt, QualityFlag qualityFlag, Survey survey, Department recorderDepartment, SamplingEquipment samplingEquipment, Department department)
914 {
915 final SamplingOperation entity = new SamplingOperationImpl();
916 entity.setUpdateDt(updateDt);
917 entity.setQualityFlag(qualityFlag);
918 entity.setSurvey(survey);
919 entity.setRecorderDepartment(recorderDepartment);
920 entity.setSamplingEquipment(samplingEquipment);
921 entity.setDepartment(department);
922 return entity;
923 }
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963 public static SamplingOperation newInstance(String samplingOperLb, Float samplingOperDepth, Float samplingOperMaxDepth, Float samplingOperMinDepth, Float samplingOperSize, Double samplingOperTime, Double samplingOperNumberIndiv, String samplingOperCm, Double samplingOperUtFormat, Date samplingOperQualifDt, String samplingOperQualifCm, Date samplingOperControlDt, Date samplingOperValidDt, String samplingOperActualPosition, String samplingOperPositionCm, Date samplingOperGeomValidDt, String samplingOperScope, String samplingOperHasMeas, Timestamp updateDt, DepthLevel depthLevel, Collection<SamplingOperPoint> samplingOperPoints, QualityFlag qualityFlag, Collection<SamplingOperArea> samplingOperAreas, Collection<Program> programs, Unit depthUnit, Batch batch, Survey survey, Department recorderDepartment, Collection<SamplingOperLine> samplingOperLines, Unit sizeUnit, SamplingEquipment samplingEquipment, PositionningSystem positionningSystem, Department department)
964 {
965 final SamplingOperation entity = new SamplingOperationImpl();
966 entity.setSamplingOperLb(samplingOperLb);
967 entity.setSamplingOperDepth(samplingOperDepth);
968 entity.setSamplingOperMaxDepth(samplingOperMaxDepth);
969 entity.setSamplingOperMinDepth(samplingOperMinDepth);
970 entity.setSamplingOperSize(samplingOperSize);
971 entity.setSamplingOperTime(samplingOperTime);
972 entity.setSamplingOperNumberIndiv(samplingOperNumberIndiv);
973 entity.setSamplingOperCm(samplingOperCm);
974 entity.setSamplingOperUtFormat(samplingOperUtFormat);
975 entity.setSamplingOperQualifDt(samplingOperQualifDt);
976 entity.setSamplingOperQualifCm(samplingOperQualifCm);
977 entity.setSamplingOperControlDt(samplingOperControlDt);
978 entity.setSamplingOperValidDt(samplingOperValidDt);
979 entity.setSamplingOperActualPosition(samplingOperActualPosition);
980 entity.setSamplingOperPositionCm(samplingOperPositionCm);
981 entity.setSamplingOperGeomValidDt(samplingOperGeomValidDt);
982 entity.setSamplingOperScope(samplingOperScope);
983 entity.setSamplingOperHasMeas(samplingOperHasMeas);
984 entity.setUpdateDt(updateDt);
985 entity.setDepthLevel(depthLevel);
986 entity.setSamplingOperPoints(samplingOperPoints);
987 entity.setQualityFlag(qualityFlag);
988 entity.setSamplingOperAreas(samplingOperAreas);
989 entity.setPrograms(programs);
990 entity.setDepthUnit(depthUnit);
991 entity.setBatch(batch);
992 entity.setSurvey(survey);
993 entity.setRecorderDepartment(recorderDepartment);
994 entity.setSamplingOperLines(samplingOperLines);
995 entity.setSizeUnit(sizeUnit);
996 entity.setSamplingEquipment(samplingEquipment);
997 entity.setPositionningSystem(positionningSystem);
998 entity.setDepartment(department);
999 return entity;
1000 }
1001 }
1002
1003
1004
1005
1006 public int compareTo(SamplingOperation o)
1007 {
1008 int cmp = 0;
1009 if (this.getSamplingOperId() != null)
1010 {
1011 cmp = this.getSamplingOperId().compareTo(o.getSamplingOperId());
1012 }
1013 else
1014 {
1015 if (this.getSamplingOperLb() != null)
1016 {
1017 cmp = (cmp != 0 ? cmp : this.getSamplingOperLb().compareTo(o.getSamplingOperLb()));
1018 }
1019 if (this.getSamplingOperDepth() != null)
1020 {
1021 cmp = (cmp != 0 ? cmp : this.getSamplingOperDepth().compareTo(o.getSamplingOperDepth()));
1022 }
1023 if (this.getSamplingOperMaxDepth() != null)
1024 {
1025 cmp = (cmp != 0 ? cmp : this.getSamplingOperMaxDepth().compareTo(o.getSamplingOperMaxDepth()));
1026 }
1027 if (this.getSamplingOperMinDepth() != null)
1028 {
1029 cmp = (cmp != 0 ? cmp : this.getSamplingOperMinDepth().compareTo(o.getSamplingOperMinDepth()));
1030 }
1031 if (this.getSamplingOperSize() != null)
1032 {
1033 cmp = (cmp != 0 ? cmp : this.getSamplingOperSize().compareTo(o.getSamplingOperSize()));
1034 }
1035 if (this.getSamplingOperTime() != null)
1036 {
1037 cmp = (cmp != 0 ? cmp : this.getSamplingOperTime().compareTo(o.getSamplingOperTime()));
1038 }
1039 if (this.getSamplingOperNumberIndiv() != null)
1040 {
1041 cmp = (cmp != 0 ? cmp : this.getSamplingOperNumberIndiv().compareTo(o.getSamplingOperNumberIndiv()));
1042 }
1043 if (this.getSamplingOperCm() != null)
1044 {
1045 cmp = (cmp != 0 ? cmp : this.getSamplingOperCm().compareTo(o.getSamplingOperCm()));
1046 }
1047 if (this.getSamplingOperUtFormat() != null)
1048 {
1049 cmp = (cmp != 0 ? cmp : this.getSamplingOperUtFormat().compareTo(o.getSamplingOperUtFormat()));
1050 }
1051 if (this.getSamplingOperQualifDt() != null)
1052 {
1053 cmp = (cmp != 0 ? cmp : this.getSamplingOperQualifDt().compareTo(o.getSamplingOperQualifDt()));
1054 }
1055 if (this.getSamplingOperQualifCm() != null)
1056 {
1057 cmp = (cmp != 0 ? cmp : this.getSamplingOperQualifCm().compareTo(o.getSamplingOperQualifCm()));
1058 }
1059 if (this.getSamplingOperControlDt() != null)
1060 {
1061 cmp = (cmp != 0 ? cmp : this.getSamplingOperControlDt().compareTo(o.getSamplingOperControlDt()));
1062 }
1063 if (this.getSamplingOperValidDt() != null)
1064 {
1065 cmp = (cmp != 0 ? cmp : this.getSamplingOperValidDt().compareTo(o.getSamplingOperValidDt()));
1066 }
1067 if (this.getSamplingOperActualPosition() != null)
1068 {
1069 cmp = (cmp != 0 ? cmp : this.getSamplingOperActualPosition().compareTo(o.getSamplingOperActualPosition()));
1070 }
1071 if (this.getSamplingOperPositionCm() != null)
1072 {
1073 cmp = (cmp != 0 ? cmp : this.getSamplingOperPositionCm().compareTo(o.getSamplingOperPositionCm()));
1074 }
1075 if (this.getSamplingOperGeomValidDt() != null)
1076 {
1077 cmp = (cmp != 0 ? cmp : this.getSamplingOperGeomValidDt().compareTo(o.getSamplingOperGeomValidDt()));
1078 }
1079 if (this.getSamplingOperScope() != null)
1080 {
1081 cmp = (cmp != 0 ? cmp : this.getSamplingOperScope().compareTo(o.getSamplingOperScope()));
1082 }
1083 if (this.getSamplingOperHasMeas() != null)
1084 {
1085 cmp = (cmp != 0 ? cmp : this.getSamplingOperHasMeas().compareTo(o.getSamplingOperHasMeas()));
1086 }
1087 if (this.getUpdateDt() != null)
1088 {
1089 cmp = (cmp != 0 ? cmp : this.getUpdateDt().compareTo(o.getUpdateDt()));
1090 }
1091 }
1092 return cmp;
1093 }
1094
1095
1096 }