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.quadrige3.core.dao.referential.transcribing;
7
8 /*-
9 * #%L
10 * Quadrige3 Core :: Client API
11 * %%
12 * Copyright (C) 2017 - 2024 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 import java.io.Serializable;
29 import java.sql.Timestamp;
30
31 /**
32 * Entité transcodée
33 */
34 // HibernateEntity.vsl annotations merge-point
35 public abstract class TranscribingItem
36 implements Serializable, Comparable<TranscribingItem>
37 {
38 /**
39 * The serial version UID of this class. Needed for serialization.
40 */
41 private static final long serialVersionUID = 1334609956803911300L;
42
43 // Generate 6 attributes
44 private Integer transcItemId;
45
46 /**
47 *
48 * @return this.transcItemId Integer
49 */
50 public Integer getTranscItemId()
51 {
52 return this.transcItemId;
53 }
54
55 /**
56 *
57 * @param transcItemIdIn Integer
58 */
59 public void setTranscItemId(Integer transcItemIdIn)
60 {
61 this.transcItemId = transcItemIdIn;
62 }
63
64 private Integer objectId;
65
66 /**
67 * Identifiant interne de l'objet (si la table correspondante a une colonne numérique ID).
68 * @return this.objectId Integer
69 */
70 public Integer getObjectId()
71 {
72 return this.objectId;
73 }
74
75 /**
76 * Identifiant interne de l'objet (si la table correspondante a une colonne numérique ID).
77 * @param objectIdIn Integer
78 */
79 public void setObjectId(Integer objectIdIn)
80 {
81 this.objectId = objectIdIn;
82 }
83
84 private String objectCd;
85
86 /**
87 * Code de l'objet (si la table correspondante a une colonne alphanumérique CODE).
88 * @return this.objectCd String
89 */
90 public String getObjectCd()
91 {
92 return this.objectCd;
93 }
94
95 /**
96 * Code de l'objet (si la table correspondante a une colonne alphanumérique CODE).
97 * @param objectCdIn String
98 */
99 public void setObjectCd(String objectCdIn)
100 {
101 this.objectCd = objectCdIn;
102 }
103
104 private String transcItemExternalCd;
105
106 /**
107 *
108 * @return this.transcItemExternalCd String
109 */
110 public String getTranscItemExternalCd()
111 {
112 return this.transcItemExternalCd;
113 }
114
115 /**
116 *
117 * @param transcItemExternalCdIn String
118 */
119 public void setTranscItemExternalCd(String transcItemExternalCdIn)
120 {
121 this.transcItemExternalCd = transcItemExternalCdIn;
122 }
123
124 private String transcItemCm;
125
126 /**
127 * Commentaire décrivant le rang taxinomique
128 * @return this.transcItemCm String
129 */
130 public String getTranscItemCm()
131 {
132 return this.transcItemCm;
133 }
134
135 /**
136 * Commentaire décrivant le rang taxinomique
137 * @param transcItemCmIn String
138 */
139 public void setTranscItemCm(String transcItemCmIn)
140 {
141 this.transcItemCm = transcItemCmIn;
142 }
143
144 private Timestamp updateDt;
145
146 /**
147 *
148 * @return this.updateDt Timestamp
149 */
150 public Timestamp getUpdateDt()
151 {
152 return this.updateDt;
153 }
154
155 /**
156 *
157 * @param updateDtIn Timestamp
158 */
159 public void setUpdateDt(Timestamp updateDtIn)
160 {
161 this.updateDt = updateDtIn;
162 }
163
164 // Generate 1 associations
165 private TranscribingItemType transcribingItemType;
166
167 /**
168 * Système de transcodage utilisé
169 * @return this.transcribingItemType TranscribingItemType
170 */
171 public TranscribingItemType getTranscribingItemType()
172 {
173 return this.transcribingItemType;
174 }
175
176 /**
177 * Système de transcodage utilisé
178 * @param transcribingItemTypeIn TranscribingItemType
179 */
180 public void setTranscribingItemType(TranscribingItemType transcribingItemTypeIn)
181 {
182 this.transcribingItemType = transcribingItemTypeIn;
183 }
184
185 /**
186 * Returns <code>true</code> if the argument is an TranscribingItem instance and all identifiers for this entity
187 * equal the identifiers of the argument entity. Returns <code>false</code> otherwise.
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 * Returns a hash code based on this entity's identifiers.
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 * Constructs new instances of {@link TranscribingItem}.
222 */
223 public static final class Factory
224 {
225 /**
226 * Constructs a new instance of {@link TranscribingItem}.
227 * @return new TranscribingItemImpl()
228 */
229 public static TranscribingItem newInstance()
230 {
231 return new TranscribingItemImpl();
232 }
233
234 /**
235 * Constructs a new instance of {@link TranscribingItem}, taking all required and/or
236 * read-only properties as arguments, except for identifiers.
237 * @param transcItemExternalCd String
238 * @param transcribingItemType TranscribingItemType
239 * @return newInstance
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 * Constructs a new instance of {@link TranscribingItem}, taking all possible properties
251 * (except the identifier(s))as arguments.
252 * @param objectId Integer
253 * @param objectCd String
254 * @param transcItemExternalCd String
255 * @param transcItemCm String
256 * @param updateDt Timestamp
257 * @param transcribingItemType TranscribingItemType
258 * @return newInstance TranscribingItem
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 * @see Comparable#compareTo
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 // HibernateEntity.vsl merge-point
309 // TranscribingItem.java merge-point
310 }