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