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.quadrige2.core.dao.system;
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.sql.Timestamp;
31  
32  /**
33   * Contient les informations de copyright et de sources de données pour les couches stockées dans la
34   * base SEXTANT et accessible depuis Quadrige
35   */
36  // HibernateEntity.vsl annotations merge-point
37  public abstract class SextantLayer
38      implements Serializable, Comparable<SextantLayer>
39  {
40      /**
41       * The serial version UID of this class. Needed for serialization.
42       */
43      private static final long serialVersionUID = 5342183700174823212L;
44  
45      // Generate 6 attributes
46      private String sextantLayerCd;
47  
48      /**
49       * Code de la couche dans Sextant (pas une séquence)
50       * @return this.sextantLayerCd String
51       */
52      public String getSextantLayerCd()
53      {
54          return this.sextantLayerCd;
55      }
56  
57      /**
58       * Code de la couche dans Sextant (pas une séquence)
59       * @param sextantLayerCdIn String
60       */
61      public void setSextantLayerCd(String sextantLayerCdIn)
62      {
63          this.sextantLayerCd = sextantLayerCdIn;
64      }
65  
66      private String sextantLayerNm;
67  
68      /**
69       * Libellé de la couche
70       * @return this.sextantLayerNm String
71       */
72      public String getSextantLayerNm()
73      {
74          return this.sextantLayerNm;
75      }
76  
77      /**
78       * Libellé de la couche
79       * @param sextantLayerNmIn String
80       */
81      public void setSextantLayerNm(String sextantLayerNmIn)
82      {
83          this.sextantLayerNm = sextantLayerNmIn;
84      }
85  
86      private String sextantLayerCopyright;
87  
88      /**
89       * Copyright de la couche
90       * @return this.sextantLayerCopyright String
91       */
92      public String getSextantLayerCopyright()
93      {
94          return this.sextantLayerCopyright;
95      }
96  
97      /**
98       * Copyright de la couche
99       * @param sextantLayerCopyrightIn String
100      */
101     public void setSextantLayerCopyright(String sextantLayerCopyrightIn)
102     {
103         this.sextantLayerCopyright = sextantLayerCopyrightIn;
104     }
105 
106     private String sextantLayerOrigin;
107 
108     /**
109      * Sources de la couche
110      * @return this.sextantLayerOrigin String
111      */
112     public String getSextantLayerOrigin()
113     {
114         return this.sextantLayerOrigin;
115     }
116 
117     /**
118      * Sources de la couche
119      * @param sextantLayerOriginIn String
120      */
121     public void setSextantLayerOrigin(String sextantLayerOriginIn)
122     {
123         this.sextantLayerOrigin = sextantLayerOriginIn;
124     }
125 
126     private String sextantLayerRef;
127 
128     /**
129      * Références de la couche
130      * @return this.sextantLayerRef String
131      */
132     public String getSextantLayerRef()
133     {
134         return this.sextantLayerRef;
135     }
136 
137     /**
138      * Références de la couche
139      * @param sextantLayerRefIn String
140      */
141     public void setSextantLayerRef(String sextantLayerRefIn)
142     {
143         this.sextantLayerRef = sextantLayerRefIn;
144     }
145 
146     private Timestamp updateDt;
147 
148     /**
149      * Date de mise à jour
150      * @return this.updateDt Timestamp
151      */
152     public Timestamp getUpdateDt()
153     {
154         return this.updateDt;
155     }
156 
157     /**
158      * Date de mise à jour
159      * @param updateDtIn Timestamp
160      */
161     public void setUpdateDt(Timestamp updateDtIn)
162     {
163         this.updateDt = updateDtIn;
164     }
165 
166     // Generate 0 associations
167     /**
168      * Returns <code>true</code> if the argument is an SextantLayer instance and all identifiers for this entity
169      * equal the identifiers of the argument entity. Returns <code>false</code> otherwise.
170      */
171     @Override
172     public boolean equals(Object object)
173     {
174         if (this == object)
175         {
176             return true;
177         }
178         if (!(object instanceof SextantLayer))
179         {
180             return false;
181         }
182         final SextantLayer that = (SextantLayer)object;
183         if (this.sextantLayerCd == null || that.getSextantLayerCd() == null || !this.sextantLayerCd.equals(that.getSextantLayerCd()))
184         {
185             return false;
186         }
187         return true;
188     }
189 
190     /**
191      * Returns a hash code based on this entity's identifiers.
192      */
193     @Override
194     public int hashCode()
195     {
196         int hashCode = 0;
197         hashCode = 29 * hashCode + (this.sextantLayerCd == null ? 0 : this.sextantLayerCd.hashCode());
198 
199         return hashCode;
200     }
201 
202     /**
203      * Constructs new instances of {@link SextantLayer}.
204      */
205     public static final class Factory
206     {
207         /**
208          * Constructs a new instance of {@link SextantLayer}.
209          * @return new SextantLayerImpl()
210          */
211         public static SextantLayer newInstance()
212         {
213             return new SextantLayerImpl();
214         }
215 
216         /**
217          * Constructs a new instance of {@link SextantLayer}, taking all required and/or
218          * read-only properties as arguments, except for identifiers.
219          * @param sextantLayerNm String
220          * @param updateDt Timestamp
221          * @return newInstance
222          */
223         public static SextantLayer newInstance(String sextantLayerNm, Timestamp updateDt)
224         {
225             final SextantLayer entity = new SextantLayerImpl();
226             entity.setSextantLayerNm(sextantLayerNm);
227             entity.setUpdateDt(updateDt);
228             return entity;
229         }
230 
231         /**
232          * Constructs a new instance of {@link SextantLayer}, taking all possible properties
233          * (except the identifier(s))as arguments.
234          * @param sextantLayerNm String
235          * @param sextantLayerCopyright String
236          * @param sextantLayerOrigin String
237          * @param sextantLayerRef String
238          * @param updateDt Timestamp
239          * @return newInstance SextantLayer
240          */
241         public static SextantLayer newInstance(String sextantLayerNm, String sextantLayerCopyright, String sextantLayerOrigin, String sextantLayerRef, Timestamp updateDt)
242         {
243             final SextantLayer entity = new SextantLayerImpl();
244             entity.setSextantLayerNm(sextantLayerNm);
245             entity.setSextantLayerCopyright(sextantLayerCopyright);
246             entity.setSextantLayerOrigin(sextantLayerOrigin);
247             entity.setSextantLayerRef(sextantLayerRef);
248             entity.setUpdateDt(updateDt);
249             return entity;
250         }
251     }
252 
253     /**
254      * @see Comparable#compareTo
255      */
256     public int compareTo(SextantLayer o)
257     {
258         int cmp = 0;
259         if (this.getSextantLayerCd() != null)
260         {
261             cmp = this.getSextantLayerCd().compareTo(o.getSextantLayerCd());
262         }
263         else
264         {
265             if (this.getSextantLayerNm() != null)
266             {
267                 cmp = (cmp != 0 ? cmp : this.getSextantLayerNm().compareTo(o.getSextantLayerNm()));
268             }
269             if (this.getSextantLayerCopyright() != null)
270             {
271                 cmp = (cmp != 0 ? cmp : this.getSextantLayerCopyright().compareTo(o.getSextantLayerCopyright()));
272             }
273             if (this.getSextantLayerOrigin() != null)
274             {
275                 cmp = (cmp != 0 ? cmp : this.getSextantLayerOrigin().compareTo(o.getSextantLayerOrigin()));
276             }
277             if (this.getSextantLayerRef() != null)
278             {
279                 cmp = (cmp != 0 ? cmp : this.getSextantLayerRef().compareTo(o.getSextantLayerRef()));
280             }
281             if (this.getUpdateDt() != null)
282             {
283                 cmp = (cmp != 0 ? cmp : this.getUpdateDt().compareTo(o.getUpdateDt()));
284             }
285         }
286         return cmp;
287     }
288 // HibernateEntity.vsl merge-point
289 // SextantLayer.java merge-point
290 }