1 // license-header java merge-point
2 //
3 // Attention: Generated code! Do not modify by hand!
4 // Generated by: hibernate/HibernateEntity.vsl in andromda-hibernate-cartridge.
5 //
6 package fr.ifremer.quadrige2.core.dao.referential.transcribing;
7
8 /*-
9 * #%L
10 * Quadrige2 Core :: Server API
11 * %%
12 * Copyright (C) 2017 Ifremer
13 * %%
14 * This program is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Affero General Public License as published by
16 * the Free Software Foundation, either version 3 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU Affero General Public License
25 * along with this program. If not, see <http://www.gnu.org/licenses/>.
26 * #L%
27 */
28
29 import java.io.Serializable;
30 import java.sql.Timestamp;
31
32 /**
33 * Entité transcodée
34 */
35 // HibernateEntity.vsl annotations merge-point
36 public abstract class TranscribingItem
37 implements Serializable, Comparable<TranscribingItem>
38 {
39 /**
40 * The serial version UID of this class. Needed for serialization.
41 */
42 private static final long serialVersionUID = 1334609956803911300L;
43
44 // Generate 6 attributes
45 private Integer transcItemId;
46
47 /**
48 *
49 * @return this.transcItemId Integer
50 */
51 public Integer getTranscItemId()
52 {
53 return this.transcItemId;
54 }
55
56 /**
57 *
58 * @param transcItemIdIn Integer
59 */
60 public void setTranscItemId(Integer transcItemIdIn)
61 {
62 this.transcItemId = transcItemIdIn;
63 }
64
65 private Integer objectId;
66
67 /**
68 * Identifiant interne de l'objet (si la table correspondante a une colonne numérique ID).
69 * @return this.objectId Integer
70 */
71 public Integer getObjectId()
72 {
73 return this.objectId;
74 }
75
76 /**
77 * Identifiant interne de l'objet (si la table correspondante a une colonne numérique ID).
78 * @param objectIdIn Integer
79 */
80 public void setObjectId(Integer objectIdIn)
81 {
82 this.objectId = objectIdIn;
83 }
84
85 private String objectCd;
86
87 /**
88 * Code de l'objet (si la table correspondante a une colonne alphanumérique CODE).
89 * @return this.objectCd String
90 */
91 public String getObjectCd()
92 {
93 return this.objectCd;
94 }
95
96 /**
97 * Code de l'objet (si la table correspondante a une colonne alphanumérique CODE).
98 * @param objectCdIn String
99 */
100 public void setObjectCd(String objectCdIn)
101 {
102 this.objectCd = objectCdIn;
103 }
104
105 private String transcItemExternalCd;
106
107 /**
108 *
109 * @return this.transcItemExternalCd String
110 */
111 public String getTranscItemExternalCd()
112 {
113 return this.transcItemExternalCd;
114 }
115
116 /**
117 *
118 * @param transcItemExternalCdIn String
119 */
120 public void setTranscItemExternalCd(String transcItemExternalCdIn)
121 {
122 this.transcItemExternalCd = transcItemExternalCdIn;
123 }
124
125 private String transcItemCm;
126
127 /**
128 * Commentaire décrivant le rang taxinomique
129 * @return this.transcItemCm String
130 */
131 public String getTranscItemCm()
132 {
133 return this.transcItemCm;
134 }
135
136 /**
137 * Commentaire décrivant le rang taxinomique
138 * @param transcItemCmIn String
139 */
140 public void setTranscItemCm(String transcItemCmIn)
141 {
142 this.transcItemCm = transcItemCmIn;
143 }
144
145 private Timestamp updateDt;
146
147 /**
148 *
149 * @return this.updateDt Timestamp
150 */
151 public Timestamp getUpdateDt()
152 {
153 return this.updateDt;
154 }
155
156 /**
157 *
158 * @param updateDtIn Timestamp
159 */
160 public void setUpdateDt(Timestamp updateDtIn)
161 {
162 this.updateDt = updateDtIn;
163 }
164
165 // Generate 1 associations
166 private TranscribingItemType transcribingItemType;
167
168 /**
169 * Système de transcodage utilisé
170 * @return this.transcribingItemType TranscribingItemType
171 */
172 public TranscribingItemType getTranscribingItemType()
173 {
174 return this.transcribingItemType;
175 }
176
177 /**
178 * Système de transcodage utilisé
179 * @param transcribingItemTypeIn TranscribingItemType
180 */
181 public void setTranscribingItemType(TranscribingItemType transcribingItemTypeIn)
182 {
183 this.transcribingItemType = transcribingItemTypeIn;
184 }
185
186 /**
187 * Returns <code>true</code> if the argument is an TranscribingItem instance and all identifiers for this entity
188 * equal the identifiers of the argument entity. Returns <code>false</code> otherwise.
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 * Returns a hash code based on this entity's identifiers.
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 * Constructs new instances of {@link TranscribingItem}.
223 */
224 public static final class Factory
225 {
226 /**
227 * Constructs a new instance of {@link TranscribingItem}.
228 * @return new TranscribingItemImpl()
229 */
230 public static TranscribingItem newInstance()
231 {
232 return new TranscribingItemImpl();
233 }
234
235 /**
236 * Constructs a new instance of {@link TranscribingItem}, taking all required and/or
237 * read-only properties as arguments, except for identifiers.
238 * @param transcItemExternalCd String
239 * @param updateDt Timestamp
240 * @param transcribingItemType TranscribingItemType
241 * @return newInstance
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 * Constructs a new instance of {@link TranscribingItem}, taking all possible properties
254 * (except the identifier(s))as arguments.
255 * @param objectId Integer
256 * @param objectCd String
257 * @param transcItemExternalCd String
258 * @param transcItemCm String
259 * @param updateDt Timestamp
260 * @param transcribingItemType TranscribingItemType
261 * @return newInstance TranscribingItem
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 * @see Comparable#compareTo
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 // HibernateEntity.vsl merge-point
312 // TranscribingItem.java merge-point
313 }