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.rule;
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   * Cette table permet de conserver les paramètres des fonctions de contrôle
33   */
34  // HibernateEntity.vsl annotations merge-point
35  public abstract class FunctionParameter
36      implements Serializable, Comparable<FunctionParameter>
37  {
38      /**
39       * The serial version UID of this class. Needed for serialization.
40       */
41      private static final long serialVersionUID = -6287046724558739387L;
42  
43      // Generate 5 attributes
44      private Integer functionParId;
45  
46      /**
47       * Identifiant unique du paramètre de la fonction
48       * @return this.functionParId Integer
49       */
50      public Integer getFunctionParId()
51      {
52          return this.functionParId;
53      }
54  
55      /**
56       * Identifiant unique du paramètre de la fonction
57       * @param functionParIdIn Integer
58       */
59      public void setFunctionParId(Integer functionParIdIn)
60      {
61          this.functionParId = functionParIdIn;
62      }
63  
64      private String functionParNm;
65  
66      /**
67       * Libellé du paramètre de la fonction
68       * @return this.functionParNm String
69       */
70      public String getFunctionParNm()
71      {
72          return this.functionParNm;
73      }
74  
75      /**
76       * Libellé du paramètre de la fonction
77       * @param functionParNmIn String
78       */
79      public void setFunctionParNm(String functionParNmIn)
80      {
81          this.functionParNm = functionParNmIn;
82      }
83  
84      private String functionParJavaParNm;
85  
86      /**
87       * Libellé du paramètre en JAVA
88       * @return this.functionParJavaParNm String
89       */
90      public String getFunctionParJavaParNm()
91      {
92          return this.functionParJavaParNm;
93      }
94  
95      /**
96       * Libellé du paramètre en JAVA
97       * @param functionParJavaParNmIn String
98       */
99      public void setFunctionParJavaParNm(String functionParJavaParNmIn)
100     {
101         this.functionParJavaParNm = functionParJavaParNmIn;
102     }
103 
104     private String functionParClass;
105 
106     /**
107      * Classe du paramètre
108      * @return this.functionParClass String
109      */
110     public String getFunctionParClass()
111     {
112         return this.functionParClass;
113     }
114 
115     /**
116      * Classe du paramètre
117      * @param functionParClassIn String
118      */
119     public void setFunctionParClass(String functionParClassIn)
120     {
121         this.functionParClass = functionParClassIn;
122     }
123 
124     private Timestamp updateDt;
125 
126     /**
127      * Date de modification de l'objet, mise à jour par le système
128      * @return this.updateDt Timestamp
129      */
130     public Timestamp getUpdateDt()
131     {
132         return this.updateDt;
133     }
134 
135     /**
136      * Date de modification de l'objet, mise à jour par le système
137      * @param updateDtIn Timestamp
138      */
139     public void setUpdateDt(Timestamp updateDtIn)
140     {
141         this.updateDt = updateDtIn;
142     }
143 
144     // Generate 2 associations
145     private Function function;
146 
147     /**
148      * Cette table permet de conserver les fonctions de contrôle
149      * @return this.function Function
150      */
151     public Function getFunction()
152     {
153         return this.function;
154     }
155 
156     /**
157      * Cette table permet de conserver les fonctions de contrôle
158      * @param functionIn Function
159      */
160     public void setFunction(Function functionIn)
161     {
162         this.function = functionIn;
163     }
164 
165     /**
166      * Returns <code>true</code> if the argument is an FunctionParameter instance and all identifiers for this entity
167      * equal the identifiers of the argument entity. Returns <code>false</code> otherwise.
168      */
169     @Override
170     public boolean equals(Object object)
171     {
172         if (this == object)
173         {
174             return true;
175         }
176         if (!(object instanceof FunctionParameter))
177         {
178             return false;
179         }
180         final FunctionParameter that = (FunctionParameter)object;
181         if (this.functionParId == null || that.getFunctionParId() == null || !this.functionParId.equals(that.getFunctionParId()))
182         {
183             return false;
184         }
185         return true;
186     }
187 
188     /**
189      * Returns a hash code based on this entity's identifiers.
190      */
191     @Override
192     public int hashCode()
193     {
194         int hashCode = 0;
195         hashCode = 29 * hashCode + (this.functionParId == null ? 0 : this.functionParId.hashCode());
196 
197         return hashCode;
198     }
199 
200     /**
201      * Constructs new instances of {@link FunctionParameter}.
202      */
203     public static final class Factory
204     {
205         /**
206          * Constructs a new instance of {@link FunctionParameter}.
207          * @return new FunctionParameterImpl()
208          */
209         public static FunctionParameter newInstance()
210         {
211             return new FunctionParameterImpl();
212         }
213 
214         /**
215          * Constructs a new instance of {@link FunctionParameter}, taking all required and/or
216          * read-only properties as arguments, except for identifiers.
217          * @param functionParNm String
218          * @param functionParJavaParNm String
219          * @param functionParClass String
220          * @param function Function
221          * @return newInstance
222          */
223         public static FunctionParameter newInstance(String functionParNm, String functionParJavaParNm, String functionParClass, Function function)
224         {
225             final FunctionParameter entity = new FunctionParameterImpl();
226             entity.setFunctionParNm(functionParNm);
227             entity.setFunctionParJavaParNm(functionParJavaParNm);
228             entity.setFunctionParClass(functionParClass);
229             entity.setFunction(function);
230             return entity;
231         }
232 
233         /**
234          * Constructs a new instance of {@link FunctionParameter}, taking all possible properties
235          * (except the identifier(s))as arguments.
236          * @param functionParNm String
237          * @param functionParJavaParNm String
238          * @param functionParClass String
239          * @param updateDt Timestamp
240          * @param function Function
241          * @return newInstance FunctionParameter
242          */
243         public static FunctionParameter newInstance(String functionParNm, String functionParJavaParNm, String functionParClass, Timestamp updateDt, Function function)
244         {
245             final FunctionParameter entity = new FunctionParameterImpl();
246             entity.setFunctionParNm(functionParNm);
247             entity.setFunctionParJavaParNm(functionParJavaParNm);
248             entity.setFunctionParClass(functionParClass);
249             entity.setUpdateDt(updateDt);
250             entity.setFunction(function);
251             return entity;
252         }
253     }
254 
255     /**
256      * @see Comparable#compareTo
257      */
258     public int compareTo(FunctionParameter o)
259     {
260         int cmp = 0;
261         if (this.getFunctionParId() != null)
262         {
263             cmp = this.getFunctionParId().compareTo(o.getFunctionParId());
264         }
265         else
266         {
267             if (this.getFunctionParNm() != null)
268             {
269                 cmp = (cmp != 0 ? cmp : this.getFunctionParNm().compareTo(o.getFunctionParNm()));
270             }
271             if (this.getFunctionParJavaParNm() != null)
272             {
273                 cmp = (cmp != 0 ? cmp : this.getFunctionParJavaParNm().compareTo(o.getFunctionParJavaParNm()));
274             }
275             if (this.getFunctionParClass() != null)
276             {
277                 cmp = (cmp != 0 ? cmp : this.getFunctionParClass().compareTo(o.getFunctionParClass()));
278             }
279             if (this.getUpdateDt() != null)
280             {
281                 cmp = (cmp != 0 ? cmp : this.getUpdateDt().compareTo(o.getUpdateDt()));
282             }
283         }
284         return cmp;
285     }
286 // HibernateEntity.vsl merge-point
287 // FunctionParameter.java merge-point
288 }