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