1
2
3
4
5
6 package fr.ifremer.quadrige3.core.dao.data.survey;
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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
35
36
37 public abstract class Video
38 implements Serializable, Comparable<Video>
39 {
40
41
42
43 private static final long serialVersionUID = 569288576586187046L;
44
45
46 private Integer videoId;
47
48
49
50
51
52 public Integer getVideoId()
53 {
54 return this.videoId;
55 }
56
57
58
59
60
61 public void setVideoId(Integer videoIdIn)
62 {
63 this.videoId = videoIdIn;
64 }
65
66 private String videoNm;
67
68
69
70
71
72 public String getVideoNm()
73 {
74 return this.videoNm;
75 }
76
77
78
79
80
81 public void setVideoNm(String videoNmIn)
82 {
83 this.videoNm = videoNmIn;
84 }
85
86 private String videoCm;
87
88
89
90
91
92 public String getVideoCm()
93 {
94 return this.videoCm;
95 }
96
97
98
99
100
101 public void setVideoCm(String videoCmIn)
102 {
103 this.videoCm = videoCmIn;
104 }
105
106 private String videoLk;
107
108
109
110
111
112 public String getVideoLk()
113 {
114 return this.videoLk;
115 }
116
117
118
119
120
121 public void setVideoLk(String videoLkIn)
122 {
123 this.videoLk = videoLkIn;
124 }
125
126 private Date videoValidDt;
127
128
129
130
131
132 public Date getVideoValidDt()
133 {
134 return this.videoValidDt;
135 }
136
137
138
139
140
141 public void setVideoValidDt(Date videoValidDtIn)
142 {
143 this.videoValidDt = videoValidDtIn;
144 }
145
146 private Date videoQualifDt;
147
148
149
150
151
152 public Date getVideoQualifDt()
153 {
154 return this.videoQualifDt;
155 }
156
157
158
159
160
161 public void setVideoQualifDt(Date videoQualifDtIn)
162 {
163 this.videoQualifDt = videoQualifDtIn;
164 }
165
166 private String videoQualifCm;
167
168
169
170
171
172 public String getVideoQualifCm()
173 {
174 return this.videoQualifCm;
175 }
176
177
178
179
180
181 public void setVideoQualifCm(String videoQualifCmIn)
182 {
183 this.videoQualifCm = videoQualifCmIn;
184 }
185
186 private Timestamp updateDt;
187
188
189
190
191
192 public Timestamp getUpdateDt()
193 {
194 return this.updateDt;
195 }
196
197
198
199
200
201 public void setUpdateDt(Timestamp updateDtIn)
202 {
203 this.updateDt = updateDtIn;
204 }
205
206 private Integer remoteId;
207
208
209
210
211
212 public Integer getRemoteId()
213 {
214 return this.remoteId;
215 }
216
217
218
219
220
221 public void setRemoteId(Integer remoteIdIn)
222 {
223 this.remoteId = remoteIdIn;
224 }
225
226
227 private QualityFlag qualFlagCd;
228
229
230
231
232
233 public QualityFlag getQualFlagCd()
234 {
235 return this.qualFlagCd;
236 }
237
238
239
240
241
242 public void setQualFlagCd(QualityFlag qualFlagCdIn)
243 {
244 this.qualFlagCd = qualFlagCdIn;
245 }
246
247 private Survey survey;
248
249
250
251
252
253
254 public Survey getSurvey()
255 {
256 return this.survey;
257 }
258
259
260
261
262
263
264 public void setSurvey(Survey surveyIn)
265 {
266 this.survey = surveyIn;
267 }
268
269
270
271
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
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
306
307 public static final class Factory
308 {
309
310
311
312
313 public static Video newInstance()
314 {
315 return new VideoImpl();
316 }
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
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
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
399
400 }