View Javadoc
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 fr.ifremer.quadrige3.core.dao.administration.user.Quser;
29  import fr.ifremer.quadrige3.core.dao.referential.ObjectType;
30  import java.io.Serializable;
31  import java.sql.Timestamp;
32  
33  /**
34   * 
35   */
36  // HibernateEntity.vsl annotations merge-point
37  public abstract class ValidationHistory
38      implements Serializable, Comparable<ValidationHistory>
39  {
40      /**
41       * The serial version UID of this class. Needed for serialization.
42       */
43      private static final long serialVersionUID = 7994627966421239821L;
44  
45      // Generate 5 attributes
46      private Integer validHistId;
47  
48      /**
49       * 
50       * @return this.validHistId Integer
51       */
52      public Integer getValidHistId()
53      {
54          return this.validHistId;
55      }
56  
57      /**
58       * 
59       * @param validHistIdIn Integer
60       */
61      public void setValidHistId(Integer validHistIdIn)
62      {
63          this.validHistId = validHistIdIn;
64      }
65  
66      private Integer validHistElementId;
67  
68      /**
69       * 
70       * @return this.validHistElementId Integer
71       */
72      public Integer getValidHistElementId()
73      {
74          return this.validHistElementId;
75      }
76  
77      /**
78       * 
79       * @param validHistElementIdIn Integer
80       */
81      public void setValidHistElementId(Integer validHistElementIdIn)
82      {
83          this.validHistElementId = validHistElementIdIn;
84      }
85  
86      private String validHistOperationCm;
87  
88      /**
89       * 
90       * @return this.validHistOperationCm String
91       */
92      public String getValidHistOperationCm()
93      {
94          return this.validHistOperationCm;
95      }
96  
97      /**
98       * 
99       * @param validHistOperationCmIn String
100      */
101     public void setValidHistOperationCm(String validHistOperationCmIn)
102     {
103         this.validHistOperationCm = validHistOperationCmIn;
104     }
105 
106     private String validHistPreviousCm;
107 
108     /**
109      * 
110      * @return this.validHistPreviousCm String
111      */
112     public String getValidHistPreviousCm()
113     {
114         return this.validHistPreviousCm;
115     }
116 
117     /**
118      * 
119      * @param validHistPreviousCmIn String
120      */
121     public void setValidHistPreviousCm(String validHistPreviousCmIn)
122     {
123         this.validHistPreviousCm = validHistPreviousCmIn;
124     }
125 
126     private Timestamp updateDt;
127 
128     /**
129      * 
130      * @return this.updateDt Timestamp
131      */
132     public Timestamp getUpdateDt()
133     {
134         return this.updateDt;
135     }
136 
137     /**
138      * 
139      * @param updateDtIn Timestamp
140      */
141     public void setUpdateDt(Timestamp updateDtIn)
142     {
143         this.updateDt = updateDtIn;
144     }
145 
146     // Generate 2 associations
147     private ObjectType objectType;
148 
149     /**
150      * Liste des types d'objets qui peuvent être associés à la photo ou à un résultat. Cette liste
151      * ne peut
152      * pas être modifiée par l'utilisateur.
153      * @return this.objectType ObjectType
154      */
155     public ObjectType getObjectType()
156     {
157         return this.objectType;
158     }
159 
160     /**
161      * Liste des types d'objets qui peuvent être associés à la photo ou à un résultat. Cette liste
162      * ne peut
163      * pas être modifiée par l'utilisateur.
164      * @param objectTypeIn ObjectType
165      */
166     public void setObjectType(ObjectType objectTypeIn)
167     {
168         this.objectType = objectTypeIn;
169     }
170 
171     private Quser quser;
172 
173     /**
174      * Liste l'ensemble des agents et utilisateurs du système.
175      * @return this.quser Quser
176      */
177     public Quser getQuser()
178     {
179         return this.quser;
180     }
181 
182     /**
183      * Liste l'ensemble des agents et utilisateurs du système.
184      * @param quserIn Quser
185      */
186     public void setQuser(Quser quserIn)
187     {
188         this.quser = quserIn;
189     }
190 
191     /**
192      * Returns <code>true</code> if the argument is an ValidationHistory instance and all identifiers for this entity
193      * equal the identifiers of the argument entity. Returns <code>false</code> otherwise.
194      */
195     @Override
196     public boolean equals(Object object)
197     {
198         if (this == object)
199         {
200             return true;
201         }
202         if (!(object instanceof ValidationHistory))
203         {
204             return false;
205         }
206         final ValidationHistory that = (ValidationHistory)object;
207         if (this.validHistId == null || that.getValidHistId() == null || !this.validHistId.equals(that.getValidHistId()))
208         {
209             return false;
210         }
211         return true;
212     }
213 
214     /**
215      * Returns a hash code based on this entity's identifiers.
216      */
217     @Override
218     public int hashCode()
219     {
220         int hashCode = 0;
221         hashCode = 29 * hashCode + (this.validHistId == null ? 0 : this.validHistId.hashCode());
222 
223         return hashCode;
224     }
225 
226     /**
227      * Constructs new instances of {@link ValidationHistory}.
228      */
229     public static final class Factory
230     {
231         /**
232          * Constructs a new instance of {@link ValidationHistory}.
233          * @return new ValidationHistoryImpl()
234          */
235         public static ValidationHistory newInstance()
236         {
237             return new ValidationHistoryImpl();
238         }
239 
240         /**
241          * Constructs a new instance of {@link ValidationHistory}, taking all required and/or
242          * read-only properties as arguments, except for identifiers.
243          * @param validHistElementId Integer
244          * @param objectType ObjectType
245          * @param quser Quser
246          * @return newInstance
247          */
248         public static ValidationHistory newInstance(Integer validHistElementId, ObjectType objectType, Quser quser)
249         {
250             final ValidationHistory entity = new ValidationHistoryImpl();
251             entity.setValidHistElementId(validHistElementId);
252             entity.setObjectType(objectType);
253             entity.setQuser(quser);
254             return entity;
255         }
256 
257         /**
258          * Constructs a new instance of {@link ValidationHistory}, taking all possible properties
259          * (except the identifier(s))as arguments.
260          * @param validHistElementId Integer
261          * @param validHistOperationCm String
262          * @param validHistPreviousCm String
263          * @param updateDt Timestamp
264          * @param objectType ObjectType
265          * @param quser Quser
266          * @return newInstance ValidationHistory
267          */
268         public static ValidationHistory newInstance(Integer validHistElementId, String validHistOperationCm, String validHistPreviousCm, Timestamp updateDt, ObjectType objectType, Quser quser)
269         {
270             final ValidationHistory entity = new ValidationHistoryImpl();
271             entity.setValidHistElementId(validHistElementId);
272             entity.setValidHistOperationCm(validHistOperationCm);
273             entity.setValidHistPreviousCm(validHistPreviousCm);
274             entity.setUpdateDt(updateDt);
275             entity.setObjectType(objectType);
276             entity.setQuser(quser);
277             return entity;
278         }
279     }
280 
281     /**
282      * @see Comparable#compareTo
283      */
284     public int compareTo(ValidationHistory o)
285     {
286         int cmp = 0;
287         if (this.getValidHistId() != null)
288         {
289             cmp = this.getValidHistId().compareTo(o.getValidHistId());
290         }
291         else
292         {
293             if (this.getValidHistElementId() != null)
294             {
295                 cmp = (cmp != 0 ? cmp : this.getValidHistElementId().compareTo(o.getValidHistElementId()));
296             }
297             if (this.getValidHistOperationCm() != null)
298             {
299                 cmp = (cmp != 0 ? cmp : this.getValidHistOperationCm().compareTo(o.getValidHistOperationCm()));
300             }
301             if (this.getValidHistPreviousCm() != null)
302             {
303                 cmp = (cmp != 0 ? cmp : this.getValidHistPreviousCm().compareTo(o.getValidHistPreviousCm()));
304             }
305             if (this.getUpdateDt() != null)
306             {
307                 cmp = (cmp != 0 ? cmp : this.getUpdateDt().compareTo(o.getUpdateDt()));
308             }
309         }
310         return cmp;
311     }
312 // HibernateEntity.vsl merge-point
313 // ValidationHistory.java merge-point
314 }