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