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.sandre;
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  
31  /**
32   * Equivalence des balises XML dans les tables pour trouver pour une valeur code d'un fichier
33   * d'échange la valeur dans les tables de référence Q2.
34   */
35  // HibernateEntity.vsl annotations merge-point
36  public abstract class SandreBaliseEq
37      implements Serializable, Comparable<SandreBaliseEq>
38  {
39      /**
40       * The serial version UID of this class. Needed for serialization.
41       */
42      private static final long serialVersionUID = 6612735219476701844L;
43  
44      // Generate 7 attributes
45      private Integer sandreBalEqId;
46  
47      /**
48       * Identifiant de l'équivalence
49       * @return this.sandreBalEqId Integer
50       */
51      public Integer getSandreBalEqId()
52      {
53          return this.sandreBalEqId;
54      }
55  
56      /**
57       * Identifiant de l'équivalence
58       * @param sandreBalEqIdIn Integer
59       */
60      public void setSandreBalEqId(Integer sandreBalEqIdIn)
61      {
62          this.sandreBalEqId = sandreBalEqIdIn;
63      }
64  
65      private String sandreBalEqTableImportNm;
66  
67      /**
68       * Nom de la table SANDRE_EQUIVALENCE dans laquelle aller chercher les valeurs de Quadrige
69       * @return this.sandreBalEqTableImportNm String
70       */
71      public String getSandreBalEqTableImportNm()
72      {
73          return this.sandreBalEqTableImportNm;
74      }
75  
76      /**
77       * Nom de la table SANDRE_EQUIVALENCE dans laquelle aller chercher les valeurs de Quadrige
78       * @param sandreBalEqTableImportNmIn String
79       */
80      public void setSandreBalEqTableImportNm(String sandreBalEqTableImportNmIn)
81      {
82          this.sandreBalEqTableImportNm = sandreBalEqTableImportNmIn;
83      }
84  
85      private String sandreBalEqAttrImportNm;
86  
87      /**
88       * Nom de l'attribut identifiant de la table d'équivalence correspodnante
89       * @return this.sandreBalEqAttrImportNm String
90       */
91      public String getSandreBalEqAttrImportNm()
92      {
93          return this.sandreBalEqAttrImportNm;
94      }
95  
96      /**
97       * Nom de l'attribut identifiant de la table d'équivalence correspodnante
98       * @param sandreBalEqAttrImportNmIn String
99       */
100     public void setSandreBalEqAttrImportNm(String sandreBalEqAttrImportNmIn)
101     {
102         this.sandreBalEqAttrImportNm = sandreBalEqAttrImportNmIn;
103     }
104 
105     private String sandreBalEqTableMandatory;
106 
107     /**
108      * 
109      * @return this.sandreBalEqTableMandatory String
110      */
111     public String getSandreBalEqTableMandatory()
112     {
113         return this.sandreBalEqTableMandatory;
114     }
115 
116     /**
117      * 
118      * @param sandreBalEqTableMandatoryIn String
119      */
120     public void setSandreBalEqTableMandatory(String sandreBalEqTableMandatoryIn)
121     {
122         this.sandreBalEqTableMandatory = sandreBalEqTableMandatoryIn;
123     }
124 
125     private String sandreBalEqTableCd;
126 
127     /**
128      * 
129      * @return this.sandreBalEqTableCd String
130      */
131     public String getSandreBalEqTableCd()
132     {
133         return this.sandreBalEqTableCd;
134     }
135 
136     /**
137      * 
138      * @param sandreBalEqTableCdIn String
139      */
140     public void setSandreBalEqTableCd(String sandreBalEqTableCdIn)
141     {
142         this.sandreBalEqTableCd = sandreBalEqTableCdIn;
143     }
144 
145     private String sandreBalEqTableExportNm;
146 
147     /**
148      * 
149      * @return this.sandreBalEqTableExportNm String
150      */
151     public String getSandreBalEqTableExportNm()
152     {
153         return this.sandreBalEqTableExportNm;
154     }
155 
156     /**
157      * 
158      * @param sandreBalEqTableExportNmIn String
159      */
160     public void setSandreBalEqTableExportNm(String sandreBalEqTableExportNmIn)
161     {
162         this.sandreBalEqTableExportNm = sandreBalEqTableExportNmIn;
163     }
164 
165     private String sandreBalEqAttrExportNm;
166 
167     /**
168      * 
169      * @return this.sandreBalEqAttrExportNm String
170      */
171     public String getSandreBalEqAttrExportNm()
172     {
173         return this.sandreBalEqAttrExportNm;
174     }
175 
176     /**
177      * 
178      * @param sandreBalEqAttrExportNmIn String
179      */
180     public void setSandreBalEqAttrExportNm(String sandreBalEqAttrExportNmIn)
181     {
182         this.sandreBalEqAttrExportNm = sandreBalEqAttrExportNmIn;
183     }
184 
185     // Generate 2 associations
186     private SandreXmlBalise sandreXmlUpperBalId;
187 
188     /**
189      * Contenu du format XML - Balises avec les types et  description
190      * @return this.sandreXmlUpperBalId SandreXmlBalise
191      */
192     public SandreXmlBalise getSandreXmlUpperBalId()
193     {
194         return this.sandreXmlUpperBalId;
195     }
196 
197     /**
198      * Contenu du format XML - Balises avec les types et  description
199      * @param sandreXmlUpperBalIdIn SandreXmlBalise
200      */
201     public void setSandreXmlUpperBalId(SandreXmlBalise sandreXmlUpperBalIdIn)
202     {
203         this.sandreXmlUpperBalId = sandreXmlUpperBalIdIn;
204     }
205 
206     private SandreXmlBalise sandreXmlBalId;
207 
208     /**
209      * Contenu du format XML - Balises avec les types et  description
210      * @return this.sandreXmlBalId SandreXmlBalise
211      */
212     public SandreXmlBalise getSandreXmlBalId()
213     {
214         return this.sandreXmlBalId;
215     }
216 
217     /**
218      * Contenu du format XML - Balises avec les types et  description
219      * @param sandreXmlBalIdIn SandreXmlBalise
220      */
221     public void setSandreXmlBalId(SandreXmlBalise sandreXmlBalIdIn)
222     {
223         this.sandreXmlBalId = sandreXmlBalIdIn;
224     }
225 
226     /**
227      * Returns <code>true</code> if the argument is an SandreBaliseEq instance and all identifiers for this entity
228      * equal the identifiers of the argument entity. Returns <code>false</code> otherwise.
229      */
230     @Override
231     public boolean equals(Object object)
232     {
233         if (this == object)
234         {
235             return true;
236         }
237         if (!(object instanceof SandreBaliseEq))
238         {
239             return false;
240         }
241         final SandreBaliseEq that = (SandreBaliseEq)object;
242         if (this.sandreBalEqId == null || that.getSandreBalEqId() == null || !this.sandreBalEqId.equals(that.getSandreBalEqId()))
243         {
244             return false;
245         }
246         return true;
247     }
248 
249     /**
250      * Returns a hash code based on this entity's identifiers.
251      */
252     @Override
253     public int hashCode()
254     {
255         int hashCode = 0;
256         hashCode = 29 * hashCode + (this.sandreBalEqId == null ? 0 : this.sandreBalEqId.hashCode());
257 
258         return hashCode;
259     }
260 
261     /**
262      * Constructs new instances of {@link SandreBaliseEq}.
263      */
264     public static final class Factory
265     {
266         /**
267          * Constructs a new instance of {@link SandreBaliseEq}.
268          * @return new SandreBaliseEqImpl()
269          */
270         public static SandreBaliseEq newInstance()
271         {
272             return new SandreBaliseEqImpl();
273         }
274 
275         /**
276          * Constructs a new instance of {@link SandreBaliseEq}, taking all required and/or
277          * read-only properties as arguments, except for identifiers.
278          * @param sandreBalEqTableMandatory String
279          * @param sandreBalEqTableCd String
280          * @param sandreXmlUpperBalId SandreXmlBalise
281          * @return newInstance
282          */
283         public static SandreBaliseEq newInstance(String sandreBalEqTableMandatory, String sandreBalEqTableCd, SandreXmlBalise sandreXmlUpperBalId)
284         {
285             final SandreBaliseEq entity = new SandreBaliseEqImpl();
286             entity.setSandreBalEqTableMandatory(sandreBalEqTableMandatory);
287             entity.setSandreBalEqTableCd(sandreBalEqTableCd);
288             entity.setSandreXmlUpperBalId(sandreXmlUpperBalId);
289             return entity;
290         }
291 
292         /**
293          * Constructs a new instance of {@link SandreBaliseEq}, taking all possible properties
294          * (except the identifier(s))as arguments.
295          * @param sandreBalEqTableImportNm String
296          * @param sandreBalEqAttrImportNm String
297          * @param sandreBalEqTableMandatory String
298          * @param sandreBalEqTableCd String
299          * @param sandreBalEqTableExportNm String
300          * @param sandreBalEqAttrExportNm String
301          * @param sandreXmlUpperBalId SandreXmlBalise
302          * @param sandreXmlBalId SandreXmlBalise
303          * @return newInstance SandreBaliseEq
304          */
305         public static SandreBaliseEq newInstance(String sandreBalEqTableImportNm, String sandreBalEqAttrImportNm, String sandreBalEqTableMandatory, String sandreBalEqTableCd, String sandreBalEqTableExportNm, String sandreBalEqAttrExportNm, SandreXmlBalise sandreXmlUpperBalId, SandreXmlBalise sandreXmlBalId)
306         {
307             final SandreBaliseEq entity = new SandreBaliseEqImpl();
308             entity.setSandreBalEqTableImportNm(sandreBalEqTableImportNm);
309             entity.setSandreBalEqAttrImportNm(sandreBalEqAttrImportNm);
310             entity.setSandreBalEqTableMandatory(sandreBalEqTableMandatory);
311             entity.setSandreBalEqTableCd(sandreBalEqTableCd);
312             entity.setSandreBalEqTableExportNm(sandreBalEqTableExportNm);
313             entity.setSandreBalEqAttrExportNm(sandreBalEqAttrExportNm);
314             entity.setSandreXmlUpperBalId(sandreXmlUpperBalId);
315             entity.setSandreXmlBalId(sandreXmlBalId);
316             return entity;
317         }
318     }
319 
320     /**
321      * @see Comparable#compareTo
322      */
323     public int compareTo(SandreBaliseEq o)
324     {
325         int cmp = 0;
326         if (this.getSandreBalEqId() != null)
327         {
328             cmp = this.getSandreBalEqId().compareTo(o.getSandreBalEqId());
329         }
330         else
331         {
332             if (this.getSandreBalEqTableImportNm() != null)
333             {
334                 cmp = (cmp != 0 ? cmp : this.getSandreBalEqTableImportNm().compareTo(o.getSandreBalEqTableImportNm()));
335             }
336             if (this.getSandreBalEqAttrImportNm() != null)
337             {
338                 cmp = (cmp != 0 ? cmp : this.getSandreBalEqAttrImportNm().compareTo(o.getSandreBalEqAttrImportNm()));
339             }
340             if (this.getSandreBalEqTableMandatory() != null)
341             {
342                 cmp = (cmp != 0 ? cmp : this.getSandreBalEqTableMandatory().compareTo(o.getSandreBalEqTableMandatory()));
343             }
344             if (this.getSandreBalEqTableCd() != null)
345             {
346                 cmp = (cmp != 0 ? cmp : this.getSandreBalEqTableCd().compareTo(o.getSandreBalEqTableCd()));
347             }
348             if (this.getSandreBalEqTableExportNm() != null)
349             {
350                 cmp = (cmp != 0 ? cmp : this.getSandreBalEqTableExportNm().compareTo(o.getSandreBalEqTableExportNm()));
351             }
352             if (this.getSandreBalEqAttrExportNm() != null)
353             {
354                 cmp = (cmp != 0 ? cmp : this.getSandreBalEqAttrExportNm().compareTo(o.getSandreBalEqAttrExportNm()));
355             }
356         }
357         return cmp;
358     }
359 // HibernateEntity.vsl merge-point
360 // SandreBaliseEq.java merge-point
361 }