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.referential;
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 * Zones classées
33 */
34 // HibernateEntity.vsl annotations merge-point
35 public abstract class ClassifiedShellfishArea
36 implements Serializable, Comparable<ClassifiedShellfishArea>
37 {
38 /**
39 * The serial version UID of this class. Needed for serialization.
40 */
41 private static final long serialVersionUID = 5973716272819293126L;
42
43 // Generate 3 attributes
44 private Integer clasShellfishAreaId;
45
46 /**
47 * Identifiant de la zone classée
48 * @return this.clasShellfishAreaId Integer
49 */
50 public Integer getClasShellfishAreaId()
51 {
52 return this.clasShellfishAreaId;
53 }
54
55 /**
56 * Identifiant de la zone classée
57 * @param clasShellfishAreaIdIn Integer
58 */
59 public void setClasShellfishAreaId(Integer clasShellfishAreaIdIn)
60 {
61 this.clasShellfishAreaId = clasShellfishAreaIdIn;
62 }
63
64 private String clasShellfishAreaNm;
65
66 /**
67 * Libellé de la zone classée
68 * @return this.clasShellfishAreaNm String
69 */
70 public String getClasShellfishAreaNm()
71 {
72 return this.clasShellfishAreaNm;
73 }
74
75 /**
76 * Libellé de la zone classée
77 * @param clasShellfishAreaNmIn String
78 */
79 public void setClasShellfishAreaNm(String clasShellfishAreaNmIn)
80 {
81 this.clasShellfishAreaNm = clasShellfishAreaNmIn;
82 }
83
84 private Timestamp updateDt;
85
86 /**
87 * Date de modification de l'objet, mise à jour par le système
88 * @return this.updateDt Timestamp
89 */
90 public Timestamp getUpdateDt()
91 {
92 return this.updateDt;
93 }
94
95 /**
96 * Date de modification de l'objet, mise à jour par le système
97 * @param updateDtIn Timestamp
98 */
99 public void setUpdateDt(Timestamp updateDtIn)
100 {
101 this.updateDt = updateDtIn;
102 }
103
104 // Generate 0 associations
105 /**
106 * Returns <code>true</code> if the argument is an ClassifiedShellfishArea instance and all identifiers for this entity
107 * equal the identifiers of the argument entity. Returns <code>false</code> otherwise.
108 */
109 @Override
110 public boolean equals(Object object)
111 {
112 if (this == object)
113 {
114 return true;
115 }
116 if (!(object instanceof ClassifiedShellfishArea))
117 {
118 return false;
119 }
120 final ClassifiedShellfishArea that = (ClassifiedShellfishArea)object;
121 if (this.clasShellfishAreaId == null || that.getClasShellfishAreaId() == null || !this.clasShellfishAreaId.equals(that.getClasShellfishAreaId()))
122 {
123 return false;
124 }
125 return true;
126 }
127
128 /**
129 * Returns a hash code based on this entity's identifiers.
130 */
131 @Override
132 public int hashCode()
133 {
134 int hashCode = 0;
135 hashCode = 29 * hashCode + (this.clasShellfishAreaId == null ? 0 : this.clasShellfishAreaId.hashCode());
136
137 return hashCode;
138 }
139
140 /**
141 * Constructs new instances of {@link ClassifiedShellfishArea}.
142 */
143 public static final class Factory
144 {
145 /**
146 * Constructs a new instance of {@link ClassifiedShellfishArea}.
147 * @return new ClassifiedShellfishAreaImpl()
148 */
149 public static ClassifiedShellfishArea newInstance()
150 {
151 return new ClassifiedShellfishAreaImpl();
152 }
153
154 /**
155 * Constructs a new instance of {@link ClassifiedShellfishArea}, taking all required and/or
156 * read-only properties as arguments, except for identifiers.
157 * @param clasShellfishAreaNm String
158 * @return newInstance
159 */
160 public static ClassifiedShellfishArea newInstance(String clasShellfishAreaNm)
161 {
162 final ClassifiedShellfishArea entity = new ClassifiedShellfishAreaImpl();
163 entity.setClasShellfishAreaNm(clasShellfishAreaNm);
164 return entity;
165 }
166
167 /**
168 * Constructs a new instance of {@link ClassifiedShellfishArea}, taking all possible properties
169 * (except the identifier(s))as arguments.
170 * @param clasShellfishAreaNm String
171 * @param updateDt Timestamp
172 * @return newInstance ClassifiedShellfishArea
173 */
174 public static ClassifiedShellfishArea newInstance(String clasShellfishAreaNm, Timestamp updateDt)
175 {
176 final ClassifiedShellfishArea entity = new ClassifiedShellfishAreaImpl();
177 entity.setClasShellfishAreaNm(clasShellfishAreaNm);
178 entity.setUpdateDt(updateDt);
179 return entity;
180 }
181 }
182
183 /**
184 * @see Comparable#compareTo
185 */
186 public int compareTo(ClassifiedShellfishArea o)
187 {
188 int cmp = 0;
189 if (this.getClasShellfishAreaId() != null)
190 {
191 cmp = this.getClasShellfishAreaId().compareTo(o.getClasShellfishAreaId());
192 }
193 else
194 {
195 if (this.getClasShellfishAreaNm() != null)
196 {
197 cmp = (cmp != 0 ? cmp : this.getClasShellfishAreaNm().compareTo(o.getClasShellfishAreaNm()));
198 }
199 if (this.getUpdateDt() != null)
200 {
201 cmp = (cmp != 0 ? cmp : this.getUpdateDt().compareTo(o.getUpdateDt()));
202 }
203 }
204 return cmp;
205 }
206 // HibernateEntity.vsl merge-point
207 // ClassifiedShellfishArea.java merge-point
208 }