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