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 sur les mesures utilisées dans le calcul d'une mesure
33 */
34 // HibernateEntity.vsl annotations merge-point
35 public abstract class ComputeMeasurement
36 implements Serializable, Comparable<ComputeMeasurement>
37 {
38 /**
39 * The serial version UID of this class. Needed for serialization.
40 */
41 private static final long serialVersionUID = 7358143345844603802L;
42
43 // Generate 6 attributes
44 private Integer compMeasId;
45
46 /**
47 * Identifiant des informations sur le calcul
48 * @return this.compMeasId Integer
49 */
50 public Integer getCompMeasId()
51 {
52 return this.compMeasId;
53 }
54
55 /**
56 * Identifiant des informations sur le calcul
57 * @param compMeasIdIn Integer
58 */
59 public void setCompMeasId(Integer compMeasIdIn)
60 {
61 this.compMeasId = compMeasIdIn;
62 }
63
64 private Integer measId;
65
66 /**
67 * Identifiant interne du résultat calculé
68 * @return this.measId Integer
69 */
70 public Integer getMeasId()
71 {
72 return this.measId;
73 }
74
75 /**
76 * Identifiant interne du résultat calculé
77 * @param measIdIn Integer
78 */
79 public void setMeasId(Integer measIdIn)
80 {
81 this.measId = measIdIn;
82 }
83
84 private Integer taxonMeasId;
85
86 /**
87 * Identifiant interne du résultat de dénombrement calculé
88 * @return this.taxonMeasId Integer
89 */
90 public Integer getTaxonMeasId()
91 {
92 return this.taxonMeasId;
93 }
94
95 /**
96 * Identifiant interne du résultat de dénombrement calculé
97 * @param taxonMeasIdIn Integer
98 */
99 public void setTaxonMeasId(Integer taxonMeasIdIn)
100 {
101 this.taxonMeasId = taxonMeasIdIn;
102 }
103
104 private Integer depMeasId;
105
106 /**
107 * Identifiant interne du résultat intervenant dans le calcul
108 * @return this.depMeasId Integer
109 */
110 public Integer getDepMeasId()
111 {
112 return this.depMeasId;
113 }
114
115 /**
116 * Identifiant interne du résultat intervenant dans le calcul
117 * @param depMeasIdIn Integer
118 */
119 public void setDepMeasId(Integer depMeasIdIn)
120 {
121 this.depMeasId = depMeasIdIn;
122 }
123
124 private Integer depTaxonMeasId;
125
126 /**
127 * Identifiant interne du résultat de dénombrement intervenant dans le calcul
128 * @return this.depTaxonMeasId Integer
129 */
130 public Integer getDepTaxonMeasId()
131 {
132 return this.depTaxonMeasId;
133 }
134
135 /**
136 * Identifiant interne du résultat de dénombrement intervenant dans le calcul
137 * @param depTaxonMeasIdIn Integer
138 */
139 public void setDepTaxonMeasId(Integer depTaxonMeasIdIn)
140 {
141 this.depTaxonMeasId = depTaxonMeasIdIn;
142 }
143
144 private Timestamp updateDt;
145
146 /**
147 * Date de mise à jour
148 * @return this.updateDt Timestamp
149 */
150 public Timestamp getUpdateDt()
151 {
152 return this.updateDt;
153 }
154
155 /**
156 * Date de mise à jour
157 * @param updateDtIn Timestamp
158 */
159 public void setUpdateDt(Timestamp updateDtIn)
160 {
161 this.updateDt = updateDtIn;
162 }
163
164 // Generate 1 associations
165 private ComputeFunction compFunctionCd;
166
167 /**
168 * Contient les différentes fonction de calcul pour les paramètres
169 * @return this.compFunctionCd ComputeFunction
170 */
171 public ComputeFunction getCompFunctionCd()
172 {
173 return this.compFunctionCd;
174 }
175
176 /**
177 * Contient les différentes fonction de calcul pour les paramètres
178 * @param compFunctionCdIn ComputeFunction
179 */
180 public void setCompFunctionCd(ComputeFunction compFunctionCdIn)
181 {
182 this.compFunctionCd = compFunctionCdIn;
183 }
184
185 /**
186 * Returns <code>true</code> if the argument is an ComputeMeasurement instance and all identifiers for this entity
187 * equal the identifiers of the argument entity. Returns <code>false</code> otherwise.
188 */
189 @Override
190 public boolean equals(Object object)
191 {
192 if (this == object)
193 {
194 return true;
195 }
196 if (!(object instanceof ComputeMeasurement))
197 {
198 return false;
199 }
200 final ComputeMeasurement that = (ComputeMeasurement)object;
201 if (this.compMeasId == null || that.getCompMeasId() == null || !this.compMeasId.equals(that.getCompMeasId()))
202 {
203 return false;
204 }
205 return true;
206 }
207
208 /**
209 * Returns a hash code based on this entity's identifiers.
210 */
211 @Override
212 public int hashCode()
213 {
214 int hashCode = 0;
215 hashCode = 29 * hashCode + (this.compMeasId == null ? 0 : this.compMeasId.hashCode());
216
217 return hashCode;
218 }
219
220 /**
221 * Constructs new instances of {@link ComputeMeasurement}.
222 */
223 public static final class Factory
224 {
225 /**
226 * Constructs a new instance of {@link ComputeMeasurement}.
227 * @return new ComputeMeasurementImpl()
228 */
229 public static ComputeMeasurement newInstance()
230 {
231 return new ComputeMeasurementImpl();
232 }
233
234 /**
235 * Constructs a new instance of {@link ComputeMeasurement}, taking all required and/or
236 * read-only properties as arguments, except for identifiers.
237 * @param compFunctionCd ComputeFunction
238 * @return newInstance
239 */
240 public static ComputeMeasurement newInstance(ComputeFunction compFunctionCd)
241 {
242 final ComputeMeasurement entity = new ComputeMeasurementImpl();
243 entity.setCompFunctionCd(compFunctionCd);
244 return entity;
245 }
246
247 /**
248 * Constructs a new instance of {@link ComputeMeasurement}, taking all possible properties
249 * (except the identifier(s))as arguments.
250 * @param measId Integer
251 * @param taxonMeasId Integer
252 * @param depMeasId Integer
253 * @param depTaxonMeasId Integer
254 * @param updateDt Timestamp
255 * @param compFunctionCd ComputeFunction
256 * @return newInstance ComputeMeasurement
257 */
258 public static ComputeMeasurement newInstance(Integer measId, Integer taxonMeasId, Integer depMeasId, Integer depTaxonMeasId, Timestamp updateDt, ComputeFunction compFunctionCd)
259 {
260 final ComputeMeasurement entity = new ComputeMeasurementImpl();
261 entity.setMeasId(measId);
262 entity.setTaxonMeasId(taxonMeasId);
263 entity.setDepMeasId(depMeasId);
264 entity.setDepTaxonMeasId(depTaxonMeasId);
265 entity.setUpdateDt(updateDt);
266 entity.setCompFunctionCd(compFunctionCd);
267 return entity;
268 }
269 }
270
271 /**
272 * @see Comparable#compareTo
273 */
274 public int compareTo(ComputeMeasurement o)
275 {
276 int cmp = 0;
277 if (this.getCompMeasId() != null)
278 {
279 cmp = this.getCompMeasId().compareTo(o.getCompMeasId());
280 }
281 else
282 {
283 if (this.getMeasId() != null)
284 {
285 cmp = (cmp != 0 ? cmp : this.getMeasId().compareTo(o.getMeasId()));
286 }
287 if (this.getTaxonMeasId() != null)
288 {
289 cmp = (cmp != 0 ? cmp : this.getTaxonMeasId().compareTo(o.getTaxonMeasId()));
290 }
291 if (this.getDepMeasId() != null)
292 {
293 cmp = (cmp != 0 ? cmp : this.getDepMeasId().compareTo(o.getDepMeasId()));
294 }
295 if (this.getDepTaxonMeasId() != null)
296 {
297 cmp = (cmp != 0 ? cmp : this.getDepTaxonMeasId().compareTo(o.getDepTaxonMeasId()));
298 }
299 if (this.getUpdateDt() != null)
300 {
301 cmp = (cmp != 0 ? cmp : this.getUpdateDt().compareTo(o.getUpdateDt()));
302 }
303 }
304 return cmp;
305 }
306 // HibernateEntity.vsl merge-point
307 // ComputeMeasurement.java merge-point
308 }