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.data.survey;
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 fr.ifremer.quadrige3.core.dao.referential.QualityFlag;
29 import java.io.Serializable;
30 import java.sql.Timestamp;
31 import java.util.Date;
32
33 /**
34 * Liste des vidéos sur un passage.
35 */
36 // HibernateEntity.vsl annotations merge-point
37 public abstract class Video
38 implements Serializable, Comparable<Video>
39 {
40 /**
41 * The serial version UID of this class. Needed for serialization.
42 */
43 private static final long serialVersionUID = 569288576586187046L;
44
45 // Generate 9 attributes
46 private Integer videoId;
47
48 /**
49 * Identifiant interne de la vidéo.
50 * @return this.videoId Integer
51 */
52 public Integer getVideoId()
53 {
54 return this.videoId;
55 }
56
57 /**
58 * Identifiant interne de la vidéo.
59 * @param videoIdIn Integer
60 */
61 public void setVideoId(Integer videoIdIn)
62 {
63 this.videoId = videoIdIn;
64 }
65
66 private String videoNm;
67
68 /**
69 * Libellé de la vidéo
70 * @return this.videoNm String
71 */
72 public String getVideoNm()
73 {
74 return this.videoNm;
75 }
76
77 /**
78 * Libellé de la vidéo
79 * @param videoNmIn String
80 */
81 public void setVideoNm(String videoNmIn)
82 {
83 this.videoNm = videoNmIn;
84 }
85
86 private String videoCm;
87
88 /**
89 * Commentaire de la vidéo
90 * @return this.videoCm String
91 */
92 public String getVideoCm()
93 {
94 return this.videoCm;
95 }
96
97 /**
98 * Commentaire de la vidéo
99 * @param videoCmIn String
100 */
101 public void setVideoCm(String videoCmIn)
102 {
103 this.videoCm = videoCmIn;
104 }
105
106 private String videoLk;
107
108 /**
109 * Lien vers le serveur SISMER de vidéo. Probablement une URL
110 * @return this.videoLk String
111 */
112 public String getVideoLk()
113 {
114 return this.videoLk;
115 }
116
117 /**
118 * Lien vers le serveur SISMER de vidéo. Probablement une URL
119 * @param videoLkIn String
120 */
121 public void setVideoLk(String videoLkIn)
122 {
123 this.videoLk = videoLkIn;
124 }
125
126 private Date videoValidDt;
127
128 /**
129 * Date de validation
130 * @return this.videoValidDt Date
131 */
132 public Date getVideoValidDt()
133 {
134 return this.videoValidDt;
135 }
136
137 /**
138 * Date de validation
139 * @param videoValidDtIn Date
140 */
141 public void setVideoValidDt(Date videoValidDtIn)
142 {
143 this.videoValidDt = videoValidDtIn;
144 }
145
146 private Date videoQualifDt;
147
148 /**
149 * Date de qualification
150 * @return this.videoQualifDt Date
151 */
152 public Date getVideoQualifDt()
153 {
154 return this.videoQualifDt;
155 }
156
157 /**
158 * Date de qualification
159 * @param videoQualifDtIn Date
160 */
161 public void setVideoQualifDt(Date videoQualifDtIn)
162 {
163 this.videoQualifDt = videoQualifDtIn;
164 }
165
166 private String videoQualifCm;
167
168 /**
169 * Commentaire de qualification
170 * @return this.videoQualifCm String
171 */
172 public String getVideoQualifCm()
173 {
174 return this.videoQualifCm;
175 }
176
177 /**
178 * Commentaire de qualification
179 * @param videoQualifCmIn String
180 */
181 public void setVideoQualifCm(String videoQualifCmIn)
182 {
183 this.videoQualifCm = videoQualifCmIn;
184 }
185
186 private Timestamp updateDt;
187
188 /**
189 * Date de modification de l'objet, mise à jour par le système
190 * @return this.updateDt Timestamp
191 */
192 public Timestamp getUpdateDt()
193 {
194 return this.updateDt;
195 }
196
197 /**
198 * Date de modification de l'objet, mise à jour par le système
199 * @param updateDtIn Timestamp
200 */
201 public void setUpdateDt(Timestamp updateDtIn)
202 {
203 this.updateDt = updateDtIn;
204 }
205
206 private Integer remoteId;
207
208 /**
209 *
210 * @return this.remoteId Integer
211 */
212 public Integer getRemoteId()
213 {
214 return this.remoteId;
215 }
216
217 /**
218 *
219 * @param remoteIdIn Integer
220 */
221 public void setRemoteId(Integer remoteIdIn)
222 {
223 this.remoteId = remoteIdIn;
224 }
225
226 // Generate 2 associations
227 private QualityFlag qualFlagCd;
228
229 /**
230 * Liste des niveaux de qualification.
231 * @return this.qualFlagCd QualityFlag
232 */
233 public QualityFlag getQualFlagCd()
234 {
235 return this.qualFlagCd;
236 }
237
238 /**
239 * Liste des niveaux de qualification.
240 * @param qualFlagCdIn QualityFlag
241 */
242 public void setQualFlagCd(QualityFlag qualFlagCdIn)
243 {
244 this.qualFlagCd = qualFlagCdIn;
245 }
246
247 private Survey survey;
248
249 /**
250 * Liste les différents passages effectués sur un lieu de surveillance.
251 * Liste les différents passages effectués sur un lieu de surveillance.
252 * @return this.survey Survey
253 */
254 public Survey getSurvey()
255 {
256 return this.survey;
257 }
258
259 /**
260 * Liste les différents passages effectués sur un lieu de surveillance.
261 * Liste les différents passages effectués sur un lieu de surveillance.
262 * @param surveyIn Survey
263 */
264 public void setSurvey(Survey surveyIn)
265 {
266 this.survey = surveyIn;
267 }
268
269 /**
270 * Returns <code>true</code> if the argument is an Video instance and all identifiers for this entity
271 * equal the identifiers of the argument entity. Returns <code>false</code> otherwise.
272 */
273 @Override
274 public boolean equals(Object object)
275 {
276 if (this == object)
277 {
278 return true;
279 }
280 if (!(object instanceof Video))
281 {
282 return false;
283 }
284 final Video that = (Video)object;
285 if (this.videoId == null || that.getVideoId() == null || !this.videoId.equals(that.getVideoId()))
286 {
287 return false;
288 }
289 return true;
290 }
291
292 /**
293 * Returns a hash code based on this entity's identifiers.
294 */
295 @Override
296 public int hashCode()
297 {
298 int hashCode = 0;
299 hashCode = 29 * hashCode + (this.videoId == null ? 0 : this.videoId.hashCode());
300
301 return hashCode;
302 }
303
304 /**
305 * Constructs new instances of {@link Video}.
306 */
307 public static final class Factory
308 {
309 /**
310 * Constructs a new instance of {@link Video}.
311 * @return new VideoImpl()
312 */
313 public static Video newInstance()
314 {
315 return new VideoImpl();
316 }
317
318
319 /**
320 * Constructs a new instance of {@link Video}, taking all possible properties
321 * (except the identifier(s))as arguments.
322 * @param videoNm String
323 * @param videoCm String
324 * @param videoLk String
325 * @param videoValidDt Date
326 * @param videoQualifDt Date
327 * @param videoQualifCm String
328 * @param updateDt Timestamp
329 * @param remoteId Integer
330 * @param qualFlagCd QualityFlag
331 * @param survey Survey
332 * @return newInstance Video
333 */
334 public static Video newInstance(String videoNm, String videoCm, String videoLk, Date videoValidDt, Date videoQualifDt, String videoQualifCm, Timestamp updateDt, Integer remoteId, QualityFlag qualFlagCd, Survey survey)
335 {
336 final Video entity = new VideoImpl();
337 entity.setVideoNm(videoNm);
338 entity.setVideoCm(videoCm);
339 entity.setVideoLk(videoLk);
340 entity.setVideoValidDt(videoValidDt);
341 entity.setVideoQualifDt(videoQualifDt);
342 entity.setVideoQualifCm(videoQualifCm);
343 entity.setUpdateDt(updateDt);
344 entity.setRemoteId(remoteId);
345 entity.setQualFlagCd(qualFlagCd);
346 entity.setSurvey(survey);
347 return entity;
348 }
349 }
350
351 /**
352 * @see Comparable#compareTo
353 */
354 public int compareTo(Video o)
355 {
356 int cmp = 0;
357 if (this.getVideoId() != null)
358 {
359 cmp = this.getVideoId().compareTo(o.getVideoId());
360 }
361 else
362 {
363 if (this.getVideoNm() != null)
364 {
365 cmp = (cmp != 0 ? cmp : this.getVideoNm().compareTo(o.getVideoNm()));
366 }
367 if (this.getVideoCm() != null)
368 {
369 cmp = (cmp != 0 ? cmp : this.getVideoCm().compareTo(o.getVideoCm()));
370 }
371 if (this.getVideoLk() != null)
372 {
373 cmp = (cmp != 0 ? cmp : this.getVideoLk().compareTo(o.getVideoLk()));
374 }
375 if (this.getVideoValidDt() != null)
376 {
377 cmp = (cmp != 0 ? cmp : this.getVideoValidDt().compareTo(o.getVideoValidDt()));
378 }
379 if (this.getVideoQualifDt() != null)
380 {
381 cmp = (cmp != 0 ? cmp : this.getVideoQualifDt().compareTo(o.getVideoQualifDt()));
382 }
383 if (this.getVideoQualifCm() != null)
384 {
385 cmp = (cmp != 0 ? cmp : this.getVideoQualifCm().compareTo(o.getVideoQualifCm()));
386 }
387 if (this.getUpdateDt() != null)
388 {
389 cmp = (cmp != 0 ? cmp : this.getUpdateDt().compareTo(o.getUpdateDt()));
390 }
391 if (this.getRemoteId() != null)
392 {
393 cmp = (cmp != 0 ? cmp : this.getRemoteId().compareTo(o.getRemoteId()));
394 }
395 }
396 return cmp;
397 }
398 // HibernateEntity.vsl merge-point
399 // Video.java merge-point
400 }