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