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