1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 package fr.ifremer.quadrige3.core.vo.administration.strategy;
30
31 import java.io.Serializable;
32 import java.sql.Timestamp;
33 import java.util.Arrays;
34 import org.apache.commons.lang3.builder.CompareToBuilder;
35 import org.apache.commons.lang3.builder.EqualsBuilder;
36 import org.apache.commons.lang3.builder.HashCodeBuilder;
37 import org.apache.commons.lang3.builder.ToStringBuilder;
38
39
40
41
42 public class PmfmAppliedStrategyVO
43 implements Serializable, Comparable<PmfmAppliedStrategyVO>
44 {
45
46 private static final long serialVersionUID = -5760269556011704032L;
47
48
49
50
51
52 protected Timestamp updateDt;
53
54
55
56 protected Integer analInstId;
57
58
59
60 protected Integer depId;
61
62 protected Integer appliedStratId;
63
64 protected Integer pmfmStratId;
65
66
67
68
69
70 protected AppliedStrategyVO appliedStrategyVO;
71
72
73
74
75
76 protected PmfmStrategyVO pmfmStrategyVO;
77
78
79 public PmfmAppliedStrategyVO()
80 {
81
82 }
83
84
85
86
87
88
89
90
91
92 public PmfmAppliedStrategyVO(final Integer appliedStratIdIn, final Integer pmfmStratIdIn, final AppliedStrategyVO appliedStrategyVOIn, final PmfmStrategyVO pmfmStrategyVOIn)
93 {
94 this.appliedStratId = appliedStratIdIn;
95 this.pmfmStratId = pmfmStratIdIn;
96 this.appliedStrategyVO = appliedStrategyVOIn;
97 this.pmfmStrategyVO = pmfmStrategyVOIn;
98 }
99
100
101
102
103
104
105
106
107
108
109
110 public PmfmAppliedStrategyVO(final Timestamp updateDtIn, final Integer analInstIdIn, final Integer depIdIn, final Integer appliedStratIdIn, final Integer pmfmStratIdIn, final AppliedStrategyVO appliedStrategyVOIn, final PmfmStrategyVO pmfmStrategyVOIn)
111 {
112 this.updateDt = updateDtIn;
113 this.analInstId = analInstIdIn;
114 this.depId = depIdIn;
115 this.appliedStratId = appliedStratIdIn;
116 this.pmfmStratId = pmfmStratIdIn;
117 this.appliedStrategyVO = appliedStrategyVOIn;
118 this.pmfmStrategyVO = pmfmStrategyVOIn;
119 }
120
121
122
123
124
125
126
127 public PmfmAppliedStrategyVO(final PmfmAppliedStrategyVO otherBean)
128 {
129 this.updateDt = otherBean.getUpdateDt();
130 this.analInstId = otherBean.getAnalInstId();
131 this.depId = otherBean.getDepId();
132 this.appliedStratId = otherBean.getAppliedStratId();
133 this.pmfmStratId = otherBean.getPmfmStratId();
134 this.appliedStrategyVO = otherBean.getAppliedStrategyVO();
135 this.pmfmStrategyVO = otherBean.getPmfmStrategyVO();
136 }
137
138
139
140
141
142 public void copy(final PmfmAppliedStrategyVO otherBean)
143 {
144 if (null != otherBean)
145 {
146 this.setUpdateDt(otherBean.getUpdateDt());
147 this.setAnalInstId(otherBean.getAnalInstId());
148 this.setDepId(otherBean.getDepId());
149 this.setAppliedStratId(otherBean.getAppliedStratId());
150 this.setPmfmStratId(otherBean.getPmfmStratId());
151 this.setAppliedStrategyVO(otherBean.getAppliedStrategyVO());
152 this.setPmfmStrategyVO(otherBean.getPmfmStrategyVO());
153 }
154 }
155
156
157
158
159
160
161 public Timestamp getUpdateDt()
162 {
163 return this.updateDt;
164 }
165
166
167
168
169
170 public void setUpdateDt(final Timestamp value)
171 {
172 this.updateDt = value;
173 }
174
175
176
177
178
179
180 public Integer getAnalInstId()
181 {
182 return this.analInstId;
183 }
184
185
186
187
188
189 public void setAnalInstId(final Integer value)
190 {
191 this.analInstId = value;
192 }
193
194
195
196
197
198
199 public Integer getDepId()
200 {
201 return this.depId;
202 }
203
204
205
206
207
208 public void setDepId(final Integer value)
209 {
210 this.depId = value;
211 }
212
213
214
215
216
217
218 public Integer getAppliedStratId()
219 {
220 return this.appliedStratId;
221 }
222
223
224
225
226
227 public void setAppliedStratId(final Integer value)
228 {
229 this.appliedStratId = value;
230 }
231
232
233
234
235
236
237 public Integer getPmfmStratId()
238 {
239 return this.pmfmStratId;
240 }
241
242
243
244
245
246 public void setPmfmStratId(final Integer value)
247 {
248 this.pmfmStratId = value;
249 }
250
251
252
253
254
255
256 public AppliedStrategyVO getAppliedStrategyVO()
257 {
258 return this.appliedStrategyVO;
259 }
260
261
262
263
264
265 public void setAppliedStrategyVO(AppliedStrategyVO value)
266 {
267 this.appliedStrategyVO = value;
268 }
269
270
271
272
273
274
275
276 public PmfmStrategyVO getPmfmStrategyVO()
277 {
278 return this.pmfmStrategyVO;
279 }
280
281
282
283
284
285 public void setPmfmStrategyVO(PmfmStrategyVO value)
286 {
287 this.pmfmStrategyVO = value;
288 }
289
290
291
292
293
294
295 @Override
296 public boolean equals(final Object object)
297 {
298 if (object==null || object.getClass() != this.getClass())
299 {
300 return false;
301 }
302
303 if (object==this)
304 {
305 return true;
306 }
307 PmfmAppliedStrategyVO rhs = (PmfmAppliedStrategyVO) object;
308 return new EqualsBuilder()
309 .append(this.getUpdateDt(), rhs.getUpdateDt())
310 .append(this.getAnalInstId(), rhs.getAnalInstId())
311 .append(this.getDepId(), rhs.getDepId())
312 .append(this.getAppliedStratId(), rhs.getAppliedStratId())
313 .append(this.getPmfmStratId(), rhs.getPmfmStratId())
314 .append(this.getAppliedStrategyVO(), rhs.getAppliedStrategyVO())
315 .append(this.getPmfmStrategyVO(), rhs.getPmfmStrategyVO())
316 .isEquals();
317 }
318
319
320
321
322
323
324 public int compareTo(final PmfmAppliedStrategyVO object)
325 {
326 if (object==null)
327 {
328 return -1;
329 }
330
331 if (object==this)
332 {
333 return 0;
334 }
335 return new CompareToBuilder()
336 .append(this.getUpdateDt(), object.getUpdateDt())
337 .append(this.getAnalInstId(), object.getAnalInstId())
338 .append(this.getDepId(), object.getDepId())
339 .append(this.getAppliedStratId(), object.getAppliedStratId())
340 .append(this.getPmfmStratId(), object.getPmfmStratId())
341 .append(this.getAppliedStrategyVO(), object.getAppliedStrategyVO())
342 .append(this.getPmfmStrategyVO(), object.getPmfmStrategyVO())
343 .toComparison();
344 }
345
346
347
348
349
350 @Override
351 public int hashCode()
352 {
353 return new HashCodeBuilder(1249046965, -82296885)
354 .append(this.getUpdateDt())
355 .append(this.getAnalInstId())
356 .append(this.getDepId())
357 .append(this.getAppliedStratId())
358 .append(this.getPmfmStratId())
359 .append(this.getAppliedStrategyVO())
360 .append(this.getPmfmStrategyVO())
361 .toHashCode();
362 }
363
364
365
366
367
368 @Override
369 public String toString()
370 {
371 return new ToStringBuilder(this)
372 .append("updateDt", this.getUpdateDt())
373 .append("analInstId", this.getAnalInstId())
374 .append("depId", this.getDepId())
375 .append("appliedStratId", this.getAppliedStratId())
376 .append("pmfmStratId", this.getPmfmStratId())
377 .append("appliedStrategyVO", this.getAppliedStrategyVO())
378 .append("pmfmStrategyVO", this.getPmfmStrategyVO())
379 .toString();
380 }
381
382
383
384
385
386
387
388
389
390
391
392
393
394 protected static boolean equal(final Object first, final Object second)
395 {
396 final boolean equal;
397
398 if (first == null)
399 {
400 equal = (second == null);
401 }
402 else if (first.getClass().isArray() && (second != null) && second.getClass().isArray())
403 {
404 equal = Arrays.equals((Object[])first, (Object[])second);
405 }
406 else
407 {
408 equal = first.equals(second);
409 }
410
411 return equal;
412 }
413
414
415 }