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