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