1
2
3
4
5
6 package fr.ifremer.quadrige3.core.dao.referential;
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 import java.util.Date;
31
32
33
34
35
36 public abstract class AnalysisInstrument
37 implements Serializable, Comparable<AnalysisInstrument>
38 {
39
40
41
42 private static final long serialVersionUID = 7181556740685380495L;
43
44
45 private Integer analInstId;
46
47
48
49
50
51 public Integer getAnalInstId()
52 {
53 return this.analInstId;
54 }
55
56
57
58
59
60 public void setAnalInstId(Integer analInstIdIn)
61 {
62 this.analInstId = analInstIdIn;
63 }
64
65 private String analInstNm;
66
67
68
69
70
71 public String getAnalInstNm()
72 {
73 return this.analInstNm;
74 }
75
76
77
78
79
80 public void setAnalInstNm(String analInstNmIn)
81 {
82 this.analInstNm = analInstNmIn;
83 }
84
85 private String analInstDc;
86
87
88
89
90
91 public String getAnalInstDc()
92 {
93 return this.analInstDc;
94 }
95
96
97
98
99
100 public void setAnalInstDc(String analInstDcIn)
101 {
102 this.analInstDc = analInstDcIn;
103 }
104
105 private Timestamp updateDt;
106
107
108
109
110
111 public Timestamp getUpdateDt()
112 {
113 return this.updateDt;
114 }
115
116
117
118
119
120 public void setUpdateDt(Timestamp updateDtIn)
121 {
122 this.updateDt = updateDtIn;
123 }
124
125 private String analInstCm;
126
127
128
129
130
131 public String getAnalInstCm()
132 {
133 return this.analInstCm;
134 }
135
136
137
138
139
140 public void setAnalInstCm(String analInstCmIn)
141 {
142 this.analInstCm = analInstCmIn;
143 }
144
145 private Date creationDt;
146
147
148
149
150
151 public Date getCreationDt()
152 {
153 return this.creationDt;
154 }
155
156
157
158
159
160 public void setCreationDt(Date creationDtIn)
161 {
162 this.creationDt = creationDtIn;
163 }
164
165
166 private Status status;
167
168
169
170
171
172 public Status getStatus()
173 {
174 return this.status;
175 }
176
177
178
179
180
181 public void setStatus(Status statusIn)
182 {
183 this.status = statusIn;
184 }
185
186
187
188
189
190 @Override
191 public boolean equals(Object object)
192 {
193 if (this == object)
194 {
195 return true;
196 }
197 if (!(object instanceof AnalysisInstrument))
198 {
199 return false;
200 }
201 final AnalysisInstrument that = (AnalysisInstrument)object;
202 if (this.analInstId == null || that.getAnalInstId() == null || !this.analInstId.equals(that.getAnalInstId()))
203 {
204 return false;
205 }
206 return true;
207 }
208
209
210
211
212 @Override
213 public int hashCode()
214 {
215 int hashCode = 0;
216 hashCode = 29 * hashCode + (this.analInstId == null ? 0 : this.analInstId.hashCode());
217
218 return hashCode;
219 }
220
221
222
223
224 public static final class Factory
225 {
226
227
228
229
230 public static AnalysisInstrument newInstance()
231 {
232 return new AnalysisInstrumentImpl();
233 }
234
235
236
237
238
239
240
241
242 public static AnalysisInstrument newInstance(String analInstNm, Status status)
243 {
244 final AnalysisInstrument entity = new AnalysisInstrumentImpl();
245 entity.setAnalInstNm(analInstNm);
246 entity.setStatus(status);
247 return entity;
248 }
249
250
251
252
253
254
255
256
257
258
259
260
261 public static AnalysisInstrument newInstance(String analInstNm, String analInstDc, Timestamp updateDt, String analInstCm, Date creationDt, Status status)
262 {
263 final AnalysisInstrument entity = new AnalysisInstrumentImpl();
264 entity.setAnalInstNm(analInstNm);
265 entity.setAnalInstDc(analInstDc);
266 entity.setUpdateDt(updateDt);
267 entity.setAnalInstCm(analInstCm);
268 entity.setCreationDt(creationDt);
269 entity.setStatus(status);
270 return entity;
271 }
272 }
273
274
275
276
277 public int compareTo(AnalysisInstrument o)
278 {
279 int cmp = 0;
280 if (this.getAnalInstId() != null)
281 {
282 cmp = this.getAnalInstId().compareTo(o.getAnalInstId());
283 }
284 else
285 {
286 if (this.getAnalInstNm() != null)
287 {
288 cmp = (cmp != 0 ? cmp : this.getAnalInstNm().compareTo(o.getAnalInstNm()));
289 }
290 if (this.getAnalInstDc() != null)
291 {
292 cmp = (cmp != 0 ? cmp : this.getAnalInstDc().compareTo(o.getAnalInstDc()));
293 }
294 if (this.getUpdateDt() != null)
295 {
296 cmp = (cmp != 0 ? cmp : this.getUpdateDt().compareTo(o.getUpdateDt()));
297 }
298 if (this.getAnalInstCm() != null)
299 {
300 cmp = (cmp != 0 ? cmp : this.getAnalInstCm().compareTo(o.getAnalInstCm()));
301 }
302 if (this.getCreationDt() != null)
303 {
304 cmp = (cmp != 0 ? cmp : this.getCreationDt().compareTo(o.getCreationDt()));
305 }
306 }
307 return cmp;
308 }
309
310
311 }