1 // license-header java merge-point
2 //
3 // Attention: Generated code! Do not modify by hand!
4 // Generated by: hibernate/HibernateEntity.vsl in andromda-hibernate-cartridge.
5 //
6 package fr.ifremer.quadrige3.core.dao.system;
7
8 /*-
9 * #%L
10 * Quadrige3 Core :: Client API
11 * %%
12 * Copyright (C) 2017 - 2024 Ifremer
13 * %%
14 * This program is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Affero General Public License as published by
16 * the Free Software Foundation, either version 3 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU Affero General Public License
25 * along with this program. If not, see <http://www.gnu.org/licenses/>.
26 * #L%
27 */
28 import java.io.Serializable;
29 import java.sql.Timestamp;
30
31 /**
32 * Contient les informations de copyright et de sources de données pour les couches stockées dans la
33 * base SEXTANT et accessible depuis Quadrige
34 */
35 // HibernateEntity.vsl annotations merge-point
36 public abstract class SextantLayer
37 implements Serializable, Comparable<SextantLayer>
38 {
39 /**
40 * The serial version UID of this class. Needed for serialization.
41 */
42 private static final long serialVersionUID = 5342183700174823212L;
43
44 // Generate 6 attributes
45 private String sextantLayerCd;
46
47 /**
48 * Code de la couche dans Sextant (pas une séquence)
49 * @return this.sextantLayerCd String
50 */
51 public String getSextantLayerCd()
52 {
53 return this.sextantLayerCd;
54 }
55
56 /**
57 * Code de la couche dans Sextant (pas une séquence)
58 * @param sextantLayerCdIn String
59 */
60 public void setSextantLayerCd(String sextantLayerCdIn)
61 {
62 this.sextantLayerCd = sextantLayerCdIn;
63 }
64
65 private String sextantLayerNm;
66
67 /**
68 * Libellé de la couche
69 * @return this.sextantLayerNm String
70 */
71 public String getSextantLayerNm()
72 {
73 return this.sextantLayerNm;
74 }
75
76 /**
77 * Libellé de la couche
78 * @param sextantLayerNmIn String
79 */
80 public void setSextantLayerNm(String sextantLayerNmIn)
81 {
82 this.sextantLayerNm = sextantLayerNmIn;
83 }
84
85 private String sextantLayerCopyright;
86
87 /**
88 * Copyright de la couche
89 * @return this.sextantLayerCopyright String
90 */
91 public String getSextantLayerCopyright()
92 {
93 return this.sextantLayerCopyright;
94 }
95
96 /**
97 * Copyright de la couche
98 * @param sextantLayerCopyrightIn String
99 */
100 public void setSextantLayerCopyright(String sextantLayerCopyrightIn)
101 {
102 this.sextantLayerCopyright = sextantLayerCopyrightIn;
103 }
104
105 private String sextantLayerOrigin;
106
107 /**
108 * Sources de la couche
109 * @return this.sextantLayerOrigin String
110 */
111 public String getSextantLayerOrigin()
112 {
113 return this.sextantLayerOrigin;
114 }
115
116 /**
117 * Sources de la couche
118 * @param sextantLayerOriginIn String
119 */
120 public void setSextantLayerOrigin(String sextantLayerOriginIn)
121 {
122 this.sextantLayerOrigin = sextantLayerOriginIn;
123 }
124
125 private String sextantLayerRef;
126
127 /**
128 * Références de la couche
129 * @return this.sextantLayerRef String
130 */
131 public String getSextantLayerRef()
132 {
133 return this.sextantLayerRef;
134 }
135
136 /**
137 * Références de la couche
138 * @param sextantLayerRefIn String
139 */
140 public void setSextantLayerRef(String sextantLayerRefIn)
141 {
142 this.sextantLayerRef = sextantLayerRefIn;
143 }
144
145 private Timestamp updateDt;
146
147 /**
148 * Date de mise à jour
149 * @return this.updateDt Timestamp
150 */
151 public Timestamp getUpdateDt()
152 {
153 return this.updateDt;
154 }
155
156 /**
157 * Date de mise à jour
158 * @param updateDtIn Timestamp
159 */
160 public void setUpdateDt(Timestamp updateDtIn)
161 {
162 this.updateDt = updateDtIn;
163 }
164
165 // Generate 0 associations
166 /**
167 * Returns <code>true</code> if the argument is an SextantLayer instance and all identifiers for this entity
168 * equal the identifiers of the argument entity. Returns <code>false</code> otherwise.
169 */
170 @Override
171 public boolean equals(Object object)
172 {
173 if (this == object)
174 {
175 return true;
176 }
177 if (!(object instanceof SextantLayer))
178 {
179 return false;
180 }
181 final SextantLayer that = (SextantLayer)object;
182 if (this.sextantLayerCd == null || that.getSextantLayerCd() == null || !this.sextantLayerCd.equals(that.getSextantLayerCd()))
183 {
184 return false;
185 }
186 return true;
187 }
188
189 /**
190 * Returns a hash code based on this entity's identifiers.
191 */
192 @Override
193 public int hashCode()
194 {
195 int hashCode = 0;
196 hashCode = 29 * hashCode + (this.sextantLayerCd == null ? 0 : this.sextantLayerCd.hashCode());
197
198 return hashCode;
199 }
200
201 /**
202 * Constructs new instances of {@link SextantLayer}.
203 */
204 public static final class Factory
205 {
206 /**
207 * Constructs a new instance of {@link SextantLayer}.
208 * @return new SextantLayerImpl()
209 */
210 public static SextantLayer newInstance()
211 {
212 return new SextantLayerImpl();
213 }
214
215 /**
216 * Constructs a new instance of {@link SextantLayer}, taking all required and/or
217 * read-only properties as arguments, except for identifiers.
218 * @param sextantLayerNm String
219 * @return newInstance
220 */
221 public static SextantLayer newInstance(String sextantLayerNm)
222 {
223 final SextantLayer entity = new SextantLayerImpl();
224 entity.setSextantLayerNm(sextantLayerNm);
225 return entity;
226 }
227
228 /**
229 * Constructs a new instance of {@link SextantLayer}, taking all possible properties
230 * (except the identifier(s))as arguments.
231 * @param sextantLayerNm String
232 * @param sextantLayerCopyright String
233 * @param sextantLayerOrigin String
234 * @param sextantLayerRef String
235 * @param updateDt Timestamp
236 * @return newInstance SextantLayer
237 */
238 public static SextantLayer newInstance(String sextantLayerNm, String sextantLayerCopyright, String sextantLayerOrigin, String sextantLayerRef, Timestamp updateDt)
239 {
240 final SextantLayer entity = new SextantLayerImpl();
241 entity.setSextantLayerNm(sextantLayerNm);
242 entity.setSextantLayerCopyright(sextantLayerCopyright);
243 entity.setSextantLayerOrigin(sextantLayerOrigin);
244 entity.setSextantLayerRef(sextantLayerRef);
245 entity.setUpdateDt(updateDt);
246 return entity;
247 }
248 }
249
250 /**
251 * @see Comparable#compareTo
252 */
253 public int compareTo(SextantLayer o)
254 {
255 int cmp = 0;
256 if (this.getSextantLayerCd() != null)
257 {
258 cmp = this.getSextantLayerCd().compareTo(o.getSextantLayerCd());
259 }
260 else
261 {
262 if (this.getSextantLayerNm() != null)
263 {
264 cmp = (cmp != 0 ? cmp : this.getSextantLayerNm().compareTo(o.getSextantLayerNm()));
265 }
266 if (this.getSextantLayerCopyright() != null)
267 {
268 cmp = (cmp != 0 ? cmp : this.getSextantLayerCopyright().compareTo(o.getSextantLayerCopyright()));
269 }
270 if (this.getSextantLayerOrigin() != null)
271 {
272 cmp = (cmp != 0 ? cmp : this.getSextantLayerOrigin().compareTo(o.getSextantLayerOrigin()));
273 }
274 if (this.getSextantLayerRef() != null)
275 {
276 cmp = (cmp != 0 ? cmp : this.getSextantLayerRef().compareTo(o.getSextantLayerRef()));
277 }
278 if (this.getUpdateDt() != null)
279 {
280 cmp = (cmp != 0 ? cmp : this.getUpdateDt().compareTo(o.getUpdateDt()));
281 }
282 }
283 return cmp;
284 }
285 // HibernateEntity.vsl merge-point
286 // SextantLayer.java merge-point
287 }