1
2
3
4
5
6 package fr.ifremer.quadrige2.core.dao.referential.eunis;
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 import java.io.Serializable;
30 import java.sql.Timestamp;
31
32
33
34
35
36 public abstract class EunisEquivalence
37 implements Serializable, Comparable<EunisEquivalence>
38 {
39
40
41
42 private static final long serialVersionUID = -6565558200307778057L;
43
44
45 private Integer eunisEquivId;
46
47
48
49
50
51 public Integer getEunisEquivId()
52 {
53 return this.eunisEquivId;
54 }
55
56
57
58
59
60 public void setEunisEquivId(Integer eunisEquivIdIn)
61 {
62 this.eunisEquivId = eunisEquivIdIn;
63 }
64
65 private String eunisEquivCm;
66
67
68
69
70
71 public String getEunisEquivCm()
72 {
73 return this.eunisEquivCm;
74 }
75
76
77
78
79
80 public void setEunisEquivCm(String eunisEquivCmIn)
81 {
82 this.eunisEquivCm = eunisEquivCmIn;
83 }
84
85 private Timestamp updateDt;
86
87
88
89
90
91 public Timestamp getUpdateDt()
92 {
93 return this.updateDt;
94 }
95
96
97
98
99
100 public void setUpdateDt(Timestamp updateDtIn)
101 {
102 this.updateDt = updateDtIn;
103 }
104
105
106 private EunisEquivCodeTypology eunisEquivCodeTypCd;
107
108
109
110
111
112 public EunisEquivCodeTypology getEunisEquivCodeTypCd()
113 {
114 return this.eunisEquivCodeTypCd;
115 }
116
117
118
119
120
121 public void setEunisEquivCodeTypCd(EunisEquivCodeTypology eunisEquivCodeTypCdIn)
122 {
123 this.eunisEquivCodeTypCd = eunisEquivCodeTypCdIn;
124 }
125
126 private EunisTypology oldEunisTypId;
127
128
129
130
131
132 public EunisTypology getOldEunisTypId()
133 {
134 return this.oldEunisTypId;
135 }
136
137
138
139
140
141 public void setOldEunisTypId(EunisTypology oldEunisTypIdIn)
142 {
143 this.oldEunisTypId = oldEunisTypIdIn;
144 }
145
146 private EunisTypology newEunisTypId;
147
148
149
150
151
152 public EunisTypology getNewEunisTypId()
153 {
154 return this.newEunisTypId;
155 }
156
157
158
159
160
161 public void setNewEunisTypId(EunisTypology newEunisTypIdIn)
162 {
163 this.newEunisTypId = newEunisTypIdIn;
164 }
165
166
167
168
169
170 @Override
171 public boolean equals(Object object)
172 {
173 if (this == object)
174 {
175 return true;
176 }
177 if (!(object instanceof EunisEquivalence))
178 {
179 return false;
180 }
181 final EunisEquivalence that = (EunisEquivalence)object;
182 if (this.eunisEquivId == null || that.getEunisEquivId() == null || !this.eunisEquivId.equals(that.getEunisEquivId()))
183 {
184 return false;
185 }
186 return true;
187 }
188
189
190
191
192 @Override
193 public int hashCode()
194 {
195 int hashCode = 0;
196 hashCode = 29 * hashCode + (this.eunisEquivId == null ? 0 : this.eunisEquivId.hashCode());
197
198 return hashCode;
199 }
200
201
202
203
204 public static final class Factory
205 {
206
207
208
209
210 public static EunisEquivalence newInstance()
211 {
212 return new EunisEquivalenceImpl();
213 }
214
215
216
217
218
219
220
221
222
223
224 public static EunisEquivalence newInstance(Timestamp updateDt, EunisEquivCodeTypology eunisEquivCodeTypCd, EunisTypology oldEunisTypId, EunisTypology newEunisTypId)
225 {
226 final EunisEquivalence entity = new EunisEquivalenceImpl();
227 entity.setUpdateDt(updateDt);
228 entity.setEunisEquivCodeTypCd(eunisEquivCodeTypCd);
229 entity.setOldEunisTypId(oldEunisTypId);
230 entity.setNewEunisTypId(newEunisTypId);
231 return entity;
232 }
233
234
235
236
237
238
239
240
241
242
243
244 public static EunisEquivalence newInstance(String eunisEquivCm, Timestamp updateDt, EunisEquivCodeTypology eunisEquivCodeTypCd, EunisTypology oldEunisTypId, EunisTypology newEunisTypId)
245 {
246 final EunisEquivalence entity = new EunisEquivalenceImpl();
247 entity.setEunisEquivCm(eunisEquivCm);
248 entity.setUpdateDt(updateDt);
249 entity.setEunisEquivCodeTypCd(eunisEquivCodeTypCd);
250 entity.setOldEunisTypId(oldEunisTypId);
251 entity.setNewEunisTypId(newEunisTypId);
252 return entity;
253 }
254 }
255
256
257
258
259 public int compareTo(EunisEquivalence o)
260 {
261 int cmp = 0;
262 if (this.getEunisEquivId() != null)
263 {
264 cmp = this.getEunisEquivId().compareTo(o.getEunisEquivId());
265 }
266 else
267 {
268 if (this.getEunisEquivCm() != null)
269 {
270 cmp = (cmp != 0 ? cmp : this.getEunisEquivCm().compareTo(o.getEunisEquivCm()));
271 }
272 if (this.getUpdateDt() != null)
273 {
274 cmp = (cmp != 0 ? cmp : this.getUpdateDt().compareTo(o.getUpdateDt()));
275 }
276 }
277 return cmp;
278 }
279
280
281 }