1
2
3
4
5
6 package fr.ifremer.quadrige2.core.dao.referential.transcribing;
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 TranscribingItem
37 implements Serializable, Comparable<TranscribingItem>
38 {
39
40
41
42 private static final long serialVersionUID = 1334609956803911300L;
43
44
45 private Integer transcItemId;
46
47
48
49
50
51 public Integer getTranscItemId()
52 {
53 return this.transcItemId;
54 }
55
56
57
58
59
60 public void setTranscItemId(Integer transcItemIdIn)
61 {
62 this.transcItemId = transcItemIdIn;
63 }
64
65 private Integer objectId;
66
67
68
69
70
71 public Integer getObjectId()
72 {
73 return this.objectId;
74 }
75
76
77
78
79
80 public void setObjectId(Integer objectIdIn)
81 {
82 this.objectId = objectIdIn;
83 }
84
85 private String objectCd;
86
87
88
89
90
91 public String getObjectCd()
92 {
93 return this.objectCd;
94 }
95
96
97
98
99
100 public void setObjectCd(String objectCdIn)
101 {
102 this.objectCd = objectCdIn;
103 }
104
105 private String transcItemExternalCd;
106
107
108
109
110
111 public String getTranscItemExternalCd()
112 {
113 return this.transcItemExternalCd;
114 }
115
116
117
118
119
120 public void setTranscItemExternalCd(String transcItemExternalCdIn)
121 {
122 this.transcItemExternalCd = transcItemExternalCdIn;
123 }
124
125 private String transcItemCm;
126
127
128
129
130
131 public String getTranscItemCm()
132 {
133 return this.transcItemCm;
134 }
135
136
137
138
139
140 public void setTranscItemCm(String transcItemCmIn)
141 {
142 this.transcItemCm = transcItemCmIn;
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 TranscribingItemType transcribingItemType;
167
168
169
170
171
172 public TranscribingItemType getTranscribingItemType()
173 {
174 return this.transcribingItemType;
175 }
176
177
178
179
180
181 public void setTranscribingItemType(TranscribingItemType transcribingItemTypeIn)
182 {
183 this.transcribingItemType = transcribingItemTypeIn;
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 TranscribingItem))
198 {
199 return false;
200 }
201 final TranscribingItem that = (TranscribingItem)object;
202 if (this.transcItemId == null || that.getTranscItemId() == null || !this.transcItemId.equals(that.getTranscItemId()))
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.transcItemId == null ? 0 : this.transcItemId.hashCode());
217
218 return hashCode;
219 }
220
221
222
223
224 public static final class Factory
225 {
226
227
228
229
230 public static TranscribingItem newInstance()
231 {
232 return new TranscribingItemImpl();
233 }
234
235
236
237
238
239
240
241
242
243 public static TranscribingItem newInstance(String transcItemExternalCd, Timestamp updateDt, TranscribingItemType transcribingItemType)
244 {
245 final TranscribingItem entity = new TranscribingItemImpl();
246 entity.setTranscItemExternalCd(transcItemExternalCd);
247 entity.setUpdateDt(updateDt);
248 entity.setTranscribingItemType(transcribingItemType);
249 return entity;
250 }
251
252
253
254
255
256
257
258
259
260
261
262
263 public static TranscribingItem newInstance(Integer objectId, String objectCd, String transcItemExternalCd, String transcItemCm, Timestamp updateDt, TranscribingItemType transcribingItemType)
264 {
265 final TranscribingItem entity = new TranscribingItemImpl();
266 entity.setObjectId(objectId);
267 entity.setObjectCd(objectCd);
268 entity.setTranscItemExternalCd(transcItemExternalCd);
269 entity.setTranscItemCm(transcItemCm);
270 entity.setUpdateDt(updateDt);
271 entity.setTranscribingItemType(transcribingItemType);
272 return entity;
273 }
274 }
275
276
277
278
279 public int compareTo(TranscribingItem o)
280 {
281 int cmp = 0;
282 if (this.getTranscItemId() != null)
283 {
284 cmp = this.getTranscItemId().compareTo(o.getTranscItemId());
285 }
286 else
287 {
288 if (this.getObjectId() != null)
289 {
290 cmp = (cmp != 0 ? cmp : this.getObjectId().compareTo(o.getObjectId()));
291 }
292 if (this.getObjectCd() != null)
293 {
294 cmp = (cmp != 0 ? cmp : this.getObjectCd().compareTo(o.getObjectCd()));
295 }
296 if (this.getTranscItemExternalCd() != null)
297 {
298 cmp = (cmp != 0 ? cmp : this.getTranscItemExternalCd().compareTo(o.getTranscItemExternalCd()));
299 }
300 if (this.getTranscItemCm() != null)
301 {
302 cmp = (cmp != 0 ? cmp : this.getTranscItemCm().compareTo(o.getTranscItemCm()));
303 }
304 if (this.getUpdateDt() != null)
305 {
306 cmp = (cmp != 0 ? cmp : this.getUpdateDt().compareTo(o.getUpdateDt()));
307 }
308 }
309 return cmp;
310 }
311
312
313 }