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