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 informations des tables utilisées pour l'extraction pour pouvoir les
33 * supprimer par un batch
34 */
35 // HibernateEntity.vsl annotations merge-point
36 public abstract class ExtractTable
37 implements Serializable, Comparable<ExtractTable>
38 {
39 /**
40 * The serial version UID of this class. Needed for serialization.
41 */
42 private static final long serialVersionUID = -88638764911295868L;
43
44 // Generate 4 attributes
45 private String extractTableName;
46
47 /**
48 * Nom de la table contenant les données pour l'extraction
49 * @return this.extractTableName String
50 */
51 public String getExtractTableName()
52 {
53 return this.extractTableName;
54 }
55
56 /**
57 * Nom de la table contenant les données pour l'extraction
58 * @param extractTableNameIn String
59 */
60 public void setExtractTableName(String extractTableNameIn)
61 {
62 this.extractTableName = extractTableNameIn;
63 }
64
65 private String extractTableUser;
66
67 /**
68 * Identifiant de l'utilisateur qui a demandé l'extraction
69 * @return this.extractTableUser String
70 */
71 public String getExtractTableUser()
72 {
73 return this.extractTableUser;
74 }
75
76 /**
77 * Identifiant de l'utilisateur qui a demandé l'extraction
78 * @param extractTableUserIn String
79 */
80 public void setExtractTableUser(String extractTableUserIn)
81 {
82 this.extractTableUser = extractTableUserIn;
83 }
84
85 private Date extractTableDate;
86
87 /**
88 * Date de la demande d'extraction
89 * @return this.extractTableDate Date
90 */
91 public Date getExtractTableDate()
92 {
93 return this.extractTableDate;
94 }
95
96 /**
97 * Date de la demande d'extraction
98 * @param extractTableDateIn Date
99 */
100 public void setExtractTableDate(Date extractTableDateIn)
101 {
102 this.extractTableDate = extractTableDateIn;
103 }
104
105 private Integer extractTableId;
106
107 /**
108 *
109 * @return this.extractTableId Integer
110 */
111 public Integer getExtractTableId()
112 {
113 return this.extractTableId;
114 }
115
116 /**
117 *
118 * @param extractTableIdIn Integer
119 */
120 public void setExtractTableId(Integer extractTableIdIn)
121 {
122 this.extractTableId = extractTableIdIn;
123 }
124
125 // Generate 0 associations
126 /**
127 * Returns <code>true</code> if the argument is an ExtractTable instance and all identifiers for this entity
128 * equal the identifiers of the argument entity. Returns <code>false</code> otherwise.
129 */
130 @Override
131 public boolean equals(Object object)
132 {
133 if (this == object)
134 {
135 return true;
136 }
137 if (!(object instanceof ExtractTable))
138 {
139 return false;
140 }
141 final ExtractTable that = (ExtractTable)object;
142 if (this.extractTableId == null || that.getExtractTableId() == null || !this.extractTableId.equals(that.getExtractTableId()))
143 {
144 return false;
145 }
146 return true;
147 }
148
149 /**
150 * Returns a hash code based on this entity's identifiers.
151 */
152 @Override
153 public int hashCode()
154 {
155 int hashCode = 0;
156 hashCode = 29 * hashCode + (this.extractTableId == null ? 0 : this.extractTableId.hashCode());
157
158 return hashCode;
159 }
160
161 /**
162 * Constructs new instances of {@link ExtractTable}.
163 */
164 public static final class Factory
165 {
166 /**
167 * Constructs a new instance of {@link ExtractTable}.
168 * @return new ExtractTableImpl()
169 */
170 public static ExtractTable newInstance()
171 {
172 return new ExtractTableImpl();
173 }
174
175 /**
176 * Constructs a new instance of {@link ExtractTable}, taking all required and/or
177 * read-only properties as arguments, except for identifiers.
178 * @param extractTableName String
179 * @param extractTableUser String
180 * @return newInstance
181 */
182 public static ExtractTable newInstance(String extractTableName, String extractTableUser)
183 {
184 final ExtractTable entity = new ExtractTableImpl();
185 entity.setExtractTableName(extractTableName);
186 entity.setExtractTableUser(extractTableUser);
187 return entity;
188 }
189
190 /**
191 * Constructs a new instance of {@link ExtractTable}, taking all possible properties
192 * (except the identifier(s))as arguments.
193 * @param extractTableName String
194 * @param extractTableUser String
195 * @param extractTableDate Date
196 * @return newInstance ExtractTable
197 */
198 public static ExtractTable newInstance(String extractTableName, String extractTableUser, Date extractTableDate)
199 {
200 final ExtractTable entity = new ExtractTableImpl();
201 entity.setExtractTableName(extractTableName);
202 entity.setExtractTableUser(extractTableUser);
203 entity.setExtractTableDate(extractTableDate);
204 return entity;
205 }
206 }
207
208 /**
209 * @see Comparable#compareTo
210 */
211 public int compareTo(ExtractTable o)
212 {
213 int cmp = 0;
214 if (this.getExtractTableId() != null)
215 {
216 cmp = this.getExtractTableId().compareTo(o.getExtractTableId());
217 }
218 else
219 {
220 if (this.getExtractTableName() != null)
221 {
222 cmp = (cmp != 0 ? cmp : this.getExtractTableName().compareTo(o.getExtractTableName()));
223 }
224 if (this.getExtractTableUser() != null)
225 {
226 cmp = (cmp != 0 ? cmp : this.getExtractTableUser().compareTo(o.getExtractTableUser()));
227 }
228 if (this.getExtractTableDate() != null)
229 {
230 cmp = (cmp != 0 ? cmp : this.getExtractTableDate().compareTo(o.getExtractTableDate()));
231 }
232 }
233 return cmp;
234 }
235 // HibernateEntity.vsl merge-point
236 // ExtractTable.java merge-point
237 }