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