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.referential.transcribing;
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   * Sens du transcodage :
34   */
35  // HibernateEntity.vsl annotations merge-point
36  public abstract class TranscribingSide
37      implements Serializable, Comparable<TranscribingSide>
38  {
39      /**
40       * The serial version UID of this class. Needed for serialization.
41       */
42      private static final long serialVersionUID = -6944819498544970260L;
43  
44      // Generate 5 attributes
45      private Integer transcSideId;
46  
47      /**
48       * 
49       * @return this.transcSideId Integer
50       */
51      public Integer getTranscSideId()
52      {
53          return this.transcSideId;
54      }
55  
56      /**
57       * 
58       * @param transcSideIdIn Integer
59       */
60      public void setTranscSideId(Integer transcSideIdIn)
61      {
62          this.transcSideId = transcSideIdIn;
63      }
64  
65      private String transcSideNm;
66  
67      /**
68       * 
69       * @return this.transcSideNm String
70       */
71      public String getTranscSideNm()
72      {
73          return this.transcSideNm;
74      }
75  
76      /**
77       * 
78       * @param transcSideNmIn String
79       */
80      public void setTranscSideNm(String transcSideNmIn)
81      {
82          this.transcSideNm = transcSideNmIn;
83      }
84  
85      private String transcSideDc;
86  
87      /**
88       * 
89       * @return this.transcSideDc String
90       */
91      public String getTranscSideDc()
92      {
93          return this.transcSideDc;
94      }
95  
96      /**
97       * 
98       * @param transcSideDcIn String
99       */
100     public void setTranscSideDc(String transcSideDcIn)
101     {
102         this.transcSideDc = transcSideDcIn;
103     }
104 
105     private String transcSideCm;
106 
107     /**
108      * Commentaire décrivant le rang taxinomique
109      * @return this.transcSideCm String
110      */
111     public String getTranscSideCm()
112     {
113         return this.transcSideCm;
114     }
115 
116     /**
117      * Commentaire décrivant le rang taxinomique
118      * @param transcSideCmIn String
119      */
120     public void setTranscSideCm(String transcSideCmIn)
121     {
122         this.transcSideCm = transcSideCmIn;
123     }
124 
125     private Timestamp updateDt;
126 
127     /**
128      * 
129      * @return this.updateDt Timestamp
130      */
131     public Timestamp getUpdateDt()
132     {
133         return this.updateDt;
134     }
135 
136     /**
137      * 
138      * @param updateDtIn Timestamp
139      */
140     public void setUpdateDt(Timestamp updateDtIn)
141     {
142         this.updateDt = updateDtIn;
143     }
144 
145     // Generate 1 associations
146     /**
147      * Returns <code>true</code> if the argument is an TranscribingSide instance and all identifiers for this entity
148      * equal the identifiers of the argument entity. Returns <code>false</code> otherwise.
149      */
150     @Override
151     public boolean equals(Object object)
152     {
153         if (this == object)
154         {
155             return true;
156         }
157         if (!(object instanceof TranscribingSide))
158         {
159             return false;
160         }
161         final TranscribingSide that = (TranscribingSide)object;
162         if (this.transcSideId == null || that.getTranscSideId() == null || !this.transcSideId.equals(that.getTranscSideId()))
163         {
164             return false;
165         }
166         return true;
167     }
168 
169     /**
170      * Returns a hash code based on this entity's identifiers.
171      */
172     @Override
173     public int hashCode()
174     {
175         int hashCode = 0;
176         hashCode = 29 * hashCode + (this.transcSideId == null ? 0 : this.transcSideId.hashCode());
177 
178         return hashCode;
179     }
180 
181     /**
182      * Constructs new instances of {@link TranscribingSide}.
183      */
184     public static final class Factory
185     {
186         /**
187          * Constructs a new instance of {@link TranscribingSide}.
188          * @return new TranscribingSideImpl()
189          */
190         public static TranscribingSide newInstance()
191         {
192             return new TranscribingSideImpl();
193         }
194 
195         /**
196          * Constructs a new instance of {@link TranscribingSide}, taking all required and/or
197          * read-only properties as arguments, except for identifiers.
198          * @param transcSideNm String
199          * @param updateDt Timestamp
200          * @return newInstance
201          */
202         public static TranscribingSide newInstance(String transcSideNm, Timestamp updateDt)
203         {
204             final TranscribingSide entity = new TranscribingSideImpl();
205             entity.setTranscSideNm(transcSideNm);
206             entity.setUpdateDt(updateDt);
207             return entity;
208         }
209 
210         /**
211          * Constructs a new instance of {@link TranscribingSide}, taking all possible properties
212          * (except the identifier(s))as arguments.
213          * @param transcSideNm String
214          * @param transcSideDc String
215          * @param transcSideCm String
216          * @param updateDt Timestamp
217          * @return newInstance TranscribingSide
218          */
219         public static TranscribingSide newInstance(String transcSideNm, String transcSideDc, String transcSideCm, Timestamp updateDt)
220         {
221             final TranscribingSide entity = new TranscribingSideImpl();
222             entity.setTranscSideNm(transcSideNm);
223             entity.setTranscSideDc(transcSideDc);
224             entity.setTranscSideCm(transcSideCm);
225             entity.setUpdateDt(updateDt);
226             return entity;
227         }
228     }
229 
230     /**
231      * @see Comparable#compareTo
232      */
233     public int compareTo(TranscribingSide o)
234     {
235         int cmp = 0;
236         if (this.getTranscSideId() != null)
237         {
238             cmp = this.getTranscSideId().compareTo(o.getTranscSideId());
239         }
240         else
241         {
242             if (this.getTranscSideNm() != null)
243             {
244                 cmp = (cmp != 0 ? cmp : this.getTranscSideNm().compareTo(o.getTranscSideNm()));
245             }
246             if (this.getTranscSideDc() != null)
247             {
248                 cmp = (cmp != 0 ? cmp : this.getTranscSideDc().compareTo(o.getTranscSideDc()));
249             }
250             if (this.getTranscSideCm() != null)
251             {
252                 cmp = (cmp != 0 ? cmp : this.getTranscSideCm().compareTo(o.getTranscSideCm()));
253             }
254             if (this.getUpdateDt() != null)
255             {
256                 cmp = (cmp != 0 ? cmp : this.getUpdateDt().compareTo(o.getUpdateDt()));
257             }
258         }
259         return cmp;
260     }
261 // HibernateEntity.vsl merge-point
262 // TranscribingSide.java merge-point
263 }