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