1
2
3
4
5
6 package fr.ifremer.quadrige3.core.dao.system.synchronization;
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 import java.io.Serializable;
29
30
31
32
33
34 public abstract class TempQueryParameter
35 implements Serializable, Comparable<TempQueryParameter>
36 {
37
38
39
40 private static final long serialVersionUID = 674925096823378611L;
41
42
43 private Integer id;
44
45
46
47
48
49 public Integer getId()
50 {
51 return this.id;
52 }
53
54
55
56
57
58 public void setId(Integer idIn)
59 {
60 this.id = idIn;
61 }
62
63 private String parameterName;
64
65
66
67
68
69 public String getParameterName()
70 {
71 return this.parameterName;
72 }
73
74
75
76
77
78 public void setParameterName(String parameterNameIn)
79 {
80 this.parameterName = parameterNameIn;
81 }
82
83 private Double numericalValue;
84
85
86
87
88
89 public Double getNumericalValue()
90 {
91 return this.numericalValue;
92 }
93
94
95
96
97
98 public void setNumericalValue(Double numericalValueIn)
99 {
100 this.numericalValue = numericalValueIn;
101 }
102
103 private String alphanumericalValue;
104
105
106
107
108
109 public String getAlphanumericalValue()
110 {
111 return this.alphanumericalValue;
112 }
113
114
115
116
117
118 public void setAlphanumericalValue(String alphanumericalValueIn)
119 {
120 this.alphanumericalValue = alphanumericalValueIn;
121 }
122
123 private Integer quserId;
124
125
126
127
128
129 public Integer getQuserId()
130 {
131 return this.quserId;
132 }
133
134
135
136
137
138 public void setQuserId(Integer quserIdIn)
139 {
140 this.quserId = quserIdIn;
141 }
142
143 private Integer groupingKey;
144
145
146
147
148
149 public Integer getGroupingKey()
150 {
151 return this.groupingKey;
152 }
153
154
155
156
157
158 public void setGroupingKey(Integer groupingKeyIn)
159 {
160 this.groupingKey = groupingKeyIn;
161 }
162
163
164
165
166
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
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
201
202 public static final class Factory
203 {
204
205
206
207
208 public static TempQueryParameter newInstance()
209 {
210 return new TempQueryParameterImpl();
211 }
212
213
214
215
216
217
218
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
230
231
232
233
234
235
236
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
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
286
287 }