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