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.synchronization;
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   * Used to store many values (because IN operator is limited to 1000 values)
33   */
34  // HibernateEntity.vsl annotations merge-point
35  public abstract class TempQueryParameter
36      implements Serializable, Comparable<TempQueryParameter>
37  {
38      /**
39       * The serial version UID of this class. Needed for serialization.
40       */
41      private static final long serialVersionUID = 674925096823378611L;
42  
43      // Generate 6 attributes
44      private Integer id;
45  
46      /**
47       * 
48       * @return this.id Integer
49       */
50      public Integer getId()
51      {
52          return this.id;
53      }
54  
55      /**
56       * 
57       * @param idIn Integer
58       */
59      public void setId(Integer idIn)
60      {
61          this.id = idIn;
62      }
63  
64      private String parameterName;
65  
66      /**
67       * 
68       * @return this.parameterName String
69       */
70      public String getParameterName()
71      {
72          return this.parameterName;
73      }
74  
75      /**
76       * 
77       * @param parameterNameIn String
78       */
79      public void setParameterName(String parameterNameIn)
80      {
81          this.parameterName = parameterNameIn;
82      }
83  
84      private Double numericalValue;
85  
86      /**
87       * 
88       * @return this.numericalValue Double
89       */
90      public Double getNumericalValue()
91      {
92          return this.numericalValue;
93      }
94  
95      /**
96       * 
97       * @param numericalValueIn Double
98       */
99      public void setNumericalValue(Double numericalValueIn)
100     {
101         this.numericalValue = numericalValueIn;
102     }
103 
104     private String alphanumericalValue;
105 
106     /**
107      * 
108      * @return this.alphanumericalValue String
109      */
110     public String getAlphanumericalValue()
111     {
112         return this.alphanumericalValue;
113     }
114 
115     /**
116      * 
117      * @param alphanumericalValueIn String
118      */
119     public void setAlphanumericalValue(String alphanumericalValueIn)
120     {
121         this.alphanumericalValue = alphanumericalValueIn;
122     }
123 
124     private Integer quserId;
125 
126     /**
127      * 
128      * @return this.quserId Integer
129      */
130     public Integer getQuserId()
131     {
132         return this.quserId;
133     }
134 
135     /**
136      * 
137      * @param quserIdIn Integer
138      */
139     public void setQuserId(Integer quserIdIn)
140     {
141         this.quserId = quserIdIn;
142     }
143 
144     private Integer groupingKey;
145 
146     /**
147      * 
148      * @return this.groupingKey Integer
149      */
150     public Integer getGroupingKey()
151     {
152         return this.groupingKey;
153     }
154 
155     /**
156      * 
157      * @param groupingKeyIn Integer
158      */
159     public void setGroupingKey(Integer groupingKeyIn)
160     {
161         this.groupingKey = groupingKeyIn;
162     }
163 
164     // Generate 0 associations
165     /**
166      * Returns <code>true</code> if the argument is an TempQueryParameter 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 TempQueryParameter))
177         {
178             return false;
179         }
180         final TempQueryParameter that = (TempQueryParameter)object;
181         if (this.id == null || that.getId() == null || !this.id.equals(that.getId()))
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.id == null ? 0 : this.id.hashCode());
196 
197         return hashCode;
198     }
199 
200     /**
201      * Constructs new instances of {@link TempQueryParameter}.
202      */
203     public static final class Factory
204     {
205         /**
206          * Constructs a new instance of {@link TempQueryParameter}.
207          * @return new TempQueryParameterImpl()
208          */
209         public static TempQueryParameter newInstance()
210         {
211             return new TempQueryParameterImpl();
212         }
213 
214         /**
215          * Constructs a new instance of {@link TempQueryParameter}, taking all required and/or
216          * read-only properties as arguments, except for identifiers.
217          * @param parameterName String
218          * @param quserId Integer
219          * @return newInstance
220          */
221         public static TempQueryParameter newInstance(String parameterName, Integer quserId)
222         {
223             final TempQueryParameter entity = new TempQueryParameterImpl();
224             entity.setParameterName(parameterName);
225             entity.setQuserId(quserId);
226             return entity;
227         }
228 
229         /**
230          * Constructs a new instance of {@link TempQueryParameter}, taking all possible properties
231          * (except the identifier(s))as arguments.
232          * @param parameterName String
233          * @param numericalValue Double
234          * @param alphanumericalValue String
235          * @param quserId Integer
236          * @param groupingKey Integer
237          * @return newInstance TempQueryParameter
238          */
239         public static TempQueryParameter newInstance(String parameterName, Double numericalValue, String alphanumericalValue, Integer quserId, Integer groupingKey)
240         {
241             final TempQueryParameter entity = new TempQueryParameterImpl();
242             entity.setParameterName(parameterName);
243             entity.setNumericalValue(numericalValue);
244             entity.setAlphanumericalValue(alphanumericalValue);
245             entity.setQuserId(quserId);
246             entity.setGroupingKey(groupingKey);
247             return entity;
248         }
249     }
250 
251     /**
252      * @see Comparable#compareTo
253      */
254     public int compareTo(TempQueryParameter o)
255     {
256         int cmp = 0;
257         if (this.getId() != null)
258         {
259             cmp = this.getId().compareTo(o.getId());
260         }
261         else
262         {
263             if (this.getParameterName() != null)
264             {
265                 cmp = (cmp != 0 ? cmp : this.getParameterName().compareTo(o.getParameterName()));
266             }
267             if (this.getNumericalValue() != null)
268             {
269                 cmp = (cmp != 0 ? cmp : this.getNumericalValue().compareTo(o.getNumericalValue()));
270             }
271             if (this.getAlphanumericalValue() != null)
272             {
273                 cmp = (cmp != 0 ? cmp : this.getAlphanumericalValue().compareTo(o.getAlphanumericalValue()));
274             }
275             if (this.getQuserId() != null)
276             {
277                 cmp = (cmp != 0 ? cmp : this.getQuserId().compareTo(o.getQuserId()));
278             }
279             if (this.getGroupingKey() != null)
280             {
281                 cmp = (cmp != 0 ? cmp : this.getGroupingKey().compareTo(o.getGroupingKey()));
282             }
283         }
284         return cmp;
285     }
286 // HibernateEntity.vsl merge-point
287 // TempQueryParameter.java merge-point
288 }