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