1
2
3
4
5
6 package fr.ifremer.quadrige2.core.dao.system;
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 import java.io.Serializable;
30 import java.sql.Timestamp;
31
32
33
34
35
36 public abstract class ComputeMeasurement
37 implements Serializable, Comparable<ComputeMeasurement>
38 {
39
40
41
42 private static final long serialVersionUID = 7358143345844603802L;
43
44
45 private Integer compMeasId;
46
47
48
49
50
51 public Integer getCompMeasId()
52 {
53 return this.compMeasId;
54 }
55
56
57
58
59
60 public void setCompMeasId(Integer compMeasIdIn)
61 {
62 this.compMeasId = compMeasIdIn;
63 }
64
65 private Integer measId;
66
67
68
69
70
71 public Integer getMeasId()
72 {
73 return this.measId;
74 }
75
76
77
78
79
80 public void setMeasId(Integer measIdIn)
81 {
82 this.measId = measIdIn;
83 }
84
85 private Integer taxonMeasId;
86
87
88
89
90
91 public Integer getTaxonMeasId()
92 {
93 return this.taxonMeasId;
94 }
95
96
97
98
99
100 public void setTaxonMeasId(Integer taxonMeasIdIn)
101 {
102 this.taxonMeasId = taxonMeasIdIn;
103 }
104
105 private Integer depMeasId;
106
107
108
109
110
111 public Integer getDepMeasId()
112 {
113 return this.depMeasId;
114 }
115
116
117
118
119
120 public void setDepMeasId(Integer depMeasIdIn)
121 {
122 this.depMeasId = depMeasIdIn;
123 }
124
125 private Integer depTaxonMeasId;
126
127
128
129
130
131 public Integer getDepTaxonMeasId()
132 {
133 return this.depTaxonMeasId;
134 }
135
136
137
138
139
140 public void setDepTaxonMeasId(Integer depTaxonMeasIdIn)
141 {
142 this.depTaxonMeasId = depTaxonMeasIdIn;
143 }
144
145 private Timestamp updateDt;
146
147
148
149
150
151 public Timestamp getUpdateDt()
152 {
153 return this.updateDt;
154 }
155
156
157
158
159
160 public void setUpdateDt(Timestamp updateDtIn)
161 {
162 this.updateDt = updateDtIn;
163 }
164
165
166 private ComputeFunction compFunctionCd;
167
168
169
170
171
172 public ComputeFunction getCompFunctionCd()
173 {
174 return this.compFunctionCd;
175 }
176
177
178
179
180
181 public void setCompFunctionCd(ComputeFunction compFunctionCdIn)
182 {
183 this.compFunctionCd = compFunctionCdIn;
184 }
185
186
187
188
189
190 @Override
191 public boolean equals(Object object)
192 {
193 if (this == object)
194 {
195 return true;
196 }
197 if (!(object instanceof ComputeMeasurement))
198 {
199 return false;
200 }
201 final ComputeMeasurement that = (ComputeMeasurement)object;
202 if (this.compMeasId == null || that.getCompMeasId() == null || !this.compMeasId.equals(that.getCompMeasId()))
203 {
204 return false;
205 }
206 return true;
207 }
208
209
210
211
212 @Override
213 public int hashCode()
214 {
215 int hashCode = 0;
216 hashCode = 29 * hashCode + (this.compMeasId == null ? 0 : this.compMeasId.hashCode());
217
218 return hashCode;
219 }
220
221
222
223
224 public static final class Factory
225 {
226
227
228
229
230 public static ComputeMeasurement newInstance()
231 {
232 return new ComputeMeasurementImpl();
233 }
234
235
236
237
238
239
240
241
242 public static ComputeMeasurement newInstance(Timestamp updateDt, ComputeFunction compFunctionCd)
243 {
244 final ComputeMeasurement entity = new ComputeMeasurementImpl();
245 entity.setUpdateDt(updateDt);
246 entity.setCompFunctionCd(compFunctionCd);
247 return entity;
248 }
249
250
251
252
253
254
255
256
257
258
259
260
261 public static ComputeMeasurement newInstance(Integer measId, Integer taxonMeasId, Integer depMeasId, Integer depTaxonMeasId, Timestamp updateDt, ComputeFunction compFunctionCd)
262 {
263 final ComputeMeasurement entity = new ComputeMeasurementImpl();
264 entity.setMeasId(measId);
265 entity.setTaxonMeasId(taxonMeasId);
266 entity.setDepMeasId(depMeasId);
267 entity.setDepTaxonMeasId(depTaxonMeasId);
268 entity.setUpdateDt(updateDt);
269 entity.setCompFunctionCd(compFunctionCd);
270 return entity;
271 }
272 }
273
274
275
276
277 public int compareTo(ComputeMeasurement o)
278 {
279 int cmp = 0;
280 if (this.getCompMeasId() != null)
281 {
282 cmp = this.getCompMeasId().compareTo(o.getCompMeasId());
283 }
284 else
285 {
286 if (this.getMeasId() != null)
287 {
288 cmp = (cmp != 0 ? cmp : this.getMeasId().compareTo(o.getMeasId()));
289 }
290 if (this.getTaxonMeasId() != null)
291 {
292 cmp = (cmp != 0 ? cmp : this.getTaxonMeasId().compareTo(o.getTaxonMeasId()));
293 }
294 if (this.getDepMeasId() != null)
295 {
296 cmp = (cmp != 0 ? cmp : this.getDepMeasId().compareTo(o.getDepMeasId()));
297 }
298 if (this.getDepTaxonMeasId() != null)
299 {
300 cmp = (cmp != 0 ? cmp : this.getDepTaxonMeasId().compareTo(o.getDepTaxonMeasId()));
301 }
302 if (this.getUpdateDt() != null)
303 {
304 cmp = (cmp != 0 ? cmp : this.getUpdateDt().compareTo(o.getUpdateDt()));
305 }
306 }
307 return cmp;
308 }
309
310
311 }