| 6805 |
anupam.sin |
1 |
/**
|
|
|
2 |
* Autogenerated by Thrift Compiler (0.7.0)
|
|
|
3 |
*
|
|
|
4 |
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
|
5 |
*/
|
|
|
6 |
package in.shop2020.model.v1.catalog;
|
|
|
7 |
|
|
|
8 |
import java.util.List;
|
|
|
9 |
import java.util.ArrayList;
|
|
|
10 |
import java.util.Map;
|
|
|
11 |
import java.util.HashMap;
|
|
|
12 |
import java.util.EnumMap;
|
|
|
13 |
import java.util.Set;
|
|
|
14 |
import java.util.HashSet;
|
|
|
15 |
import java.util.EnumSet;
|
|
|
16 |
import java.util.Collections;
|
|
|
17 |
import java.util.BitSet;
|
|
|
18 |
import java.nio.ByteBuffer;
|
|
|
19 |
import java.util.Arrays;
|
|
|
20 |
import org.slf4j.Logger;
|
|
|
21 |
import org.slf4j.LoggerFactory;
|
|
|
22 |
|
|
|
23 |
public class ItemInsurerMapping implements org.apache.thrift.TBase<ItemInsurerMapping, ItemInsurerMapping._Fields>, java.io.Serializable, Cloneable {
|
|
|
24 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ItemInsurerMapping");
|
|
|
25 |
|
|
|
26 |
private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)1);
|
|
|
27 |
private static final org.apache.thrift.protocol.TField INSURER_FIELD_DESC = new org.apache.thrift.protocol.TField("insurer", org.apache.thrift.protocol.TType.I64, (short)2);
|
|
|
28 |
private static final org.apache.thrift.protocol.TField PREMIUM_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("premiumType", org.apache.thrift.protocol.TType.I32, (short)3);
|
|
|
29 |
private static final org.apache.thrift.protocol.TField PREMIUM_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("premiumValue", org.apache.thrift.protocol.TType.DOUBLE, (short)4);
|
| 9299 |
kshitij.so |
30 |
private static final org.apache.thrift.protocol.TField INSURER_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("insurerType", org.apache.thrift.protocol.TType.I32, (short)5);
|
| 6805 |
anupam.sin |
31 |
|
|
|
32 |
private long itemId; // required
|
|
|
33 |
private long insurer; // required
|
|
|
34 |
private PremiumType premiumType; // required
|
|
|
35 |
private double premiumValue; // required
|
| 9299 |
kshitij.so |
36 |
private InsurerType insurerType; // required
|
| 6805 |
anupam.sin |
37 |
|
|
|
38 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
39 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
40 |
ITEM_ID((short)1, "itemId"),
|
|
|
41 |
INSURER((short)2, "insurer"),
|
|
|
42 |
/**
|
|
|
43 |
*
|
|
|
44 |
* @see PremiumType
|
|
|
45 |
*/
|
|
|
46 |
PREMIUM_TYPE((short)3, "premiumType"),
|
| 9299 |
kshitij.so |
47 |
PREMIUM_VALUE((short)4, "premiumValue"),
|
|
|
48 |
/**
|
|
|
49 |
*
|
|
|
50 |
* @see InsurerType
|
|
|
51 |
*/
|
|
|
52 |
INSURER_TYPE((short)5, "insurerType");
|
| 6805 |
anupam.sin |
53 |
|
|
|
54 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
55 |
|
|
|
56 |
static {
|
|
|
57 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
58 |
byName.put(field.getFieldName(), field);
|
|
|
59 |
}
|
|
|
60 |
}
|
|
|
61 |
|
|
|
62 |
/**
|
|
|
63 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
64 |
*/
|
|
|
65 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
66 |
switch(fieldId) {
|
|
|
67 |
case 1: // ITEM_ID
|
|
|
68 |
return ITEM_ID;
|
|
|
69 |
case 2: // INSURER
|
|
|
70 |
return INSURER;
|
|
|
71 |
case 3: // PREMIUM_TYPE
|
|
|
72 |
return PREMIUM_TYPE;
|
|
|
73 |
case 4: // PREMIUM_VALUE
|
|
|
74 |
return PREMIUM_VALUE;
|
| 9299 |
kshitij.so |
75 |
case 5: // INSURER_TYPE
|
|
|
76 |
return INSURER_TYPE;
|
| 6805 |
anupam.sin |
77 |
default:
|
|
|
78 |
return null;
|
|
|
79 |
}
|
|
|
80 |
}
|
|
|
81 |
|
|
|
82 |
/**
|
|
|
83 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
84 |
* if it is not found.
|
|
|
85 |
*/
|
|
|
86 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
87 |
_Fields fields = findByThriftId(fieldId);
|
|
|
88 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
89 |
return fields;
|
|
|
90 |
}
|
|
|
91 |
|
|
|
92 |
/**
|
|
|
93 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
94 |
*/
|
|
|
95 |
public static _Fields findByName(String name) {
|
|
|
96 |
return byName.get(name);
|
|
|
97 |
}
|
|
|
98 |
|
|
|
99 |
private final short _thriftId;
|
|
|
100 |
private final String _fieldName;
|
|
|
101 |
|
|
|
102 |
_Fields(short thriftId, String fieldName) {
|
|
|
103 |
_thriftId = thriftId;
|
|
|
104 |
_fieldName = fieldName;
|
|
|
105 |
}
|
|
|
106 |
|
|
|
107 |
public short getThriftFieldId() {
|
|
|
108 |
return _thriftId;
|
|
|
109 |
}
|
|
|
110 |
|
|
|
111 |
public String getFieldName() {
|
|
|
112 |
return _fieldName;
|
|
|
113 |
}
|
|
|
114 |
}
|
|
|
115 |
|
|
|
116 |
// isset id assignments
|
|
|
117 |
private static final int __ITEMID_ISSET_ID = 0;
|
|
|
118 |
private static final int __INSURER_ISSET_ID = 1;
|
|
|
119 |
private static final int __PREMIUMVALUE_ISSET_ID = 2;
|
|
|
120 |
private BitSet __isset_bit_vector = new BitSet(3);
|
|
|
121 |
|
|
|
122 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
123 |
static {
|
|
|
124 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
125 |
tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
126 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
127 |
tmpMap.put(_Fields.INSURER, new org.apache.thrift.meta_data.FieldMetaData("insurer", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
128 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
129 |
tmpMap.put(_Fields.PREMIUM_TYPE, new org.apache.thrift.meta_data.FieldMetaData("premiumType", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
130 |
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PremiumType.class)));
|
|
|
131 |
tmpMap.put(_Fields.PREMIUM_VALUE, new org.apache.thrift.meta_data.FieldMetaData("premiumValue", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
132 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
|
| 9299 |
kshitij.so |
133 |
tmpMap.put(_Fields.INSURER_TYPE, new org.apache.thrift.meta_data.FieldMetaData("insurerType", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
134 |
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, InsurerType.class)));
|
| 6805 |
anupam.sin |
135 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
136 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ItemInsurerMapping.class, metaDataMap);
|
|
|
137 |
}
|
|
|
138 |
|
|
|
139 |
public ItemInsurerMapping() {
|
|
|
140 |
}
|
|
|
141 |
|
|
|
142 |
public ItemInsurerMapping(
|
|
|
143 |
long itemId,
|
|
|
144 |
long insurer,
|
|
|
145 |
PremiumType premiumType,
|
| 9299 |
kshitij.so |
146 |
double premiumValue,
|
|
|
147 |
InsurerType insurerType)
|
| 6805 |
anupam.sin |
148 |
{
|
|
|
149 |
this();
|
|
|
150 |
this.itemId = itemId;
|
|
|
151 |
setItemIdIsSet(true);
|
|
|
152 |
this.insurer = insurer;
|
|
|
153 |
setInsurerIsSet(true);
|
|
|
154 |
this.premiumType = premiumType;
|
|
|
155 |
this.premiumValue = premiumValue;
|
|
|
156 |
setPremiumValueIsSet(true);
|
| 9299 |
kshitij.so |
157 |
this.insurerType = insurerType;
|
| 6805 |
anupam.sin |
158 |
}
|
|
|
159 |
|
|
|
160 |
/**
|
|
|
161 |
* Performs a deep copy on <i>other</i>.
|
|
|
162 |
*/
|
|
|
163 |
public ItemInsurerMapping(ItemInsurerMapping other) {
|
|
|
164 |
__isset_bit_vector.clear();
|
|
|
165 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
166 |
this.itemId = other.itemId;
|
|
|
167 |
this.insurer = other.insurer;
|
|
|
168 |
if (other.isSetPremiumType()) {
|
|
|
169 |
this.premiumType = other.premiumType;
|
|
|
170 |
}
|
|
|
171 |
this.premiumValue = other.premiumValue;
|
| 9299 |
kshitij.so |
172 |
if (other.isSetInsurerType()) {
|
|
|
173 |
this.insurerType = other.insurerType;
|
|
|
174 |
}
|
| 6805 |
anupam.sin |
175 |
}
|
|
|
176 |
|
|
|
177 |
public ItemInsurerMapping deepCopy() {
|
|
|
178 |
return new ItemInsurerMapping(this);
|
|
|
179 |
}
|
|
|
180 |
|
|
|
181 |
@Override
|
|
|
182 |
public void clear() {
|
|
|
183 |
setItemIdIsSet(false);
|
|
|
184 |
this.itemId = 0;
|
|
|
185 |
setInsurerIsSet(false);
|
|
|
186 |
this.insurer = 0;
|
|
|
187 |
this.premiumType = null;
|
|
|
188 |
setPremiumValueIsSet(false);
|
|
|
189 |
this.premiumValue = 0.0;
|
| 9299 |
kshitij.so |
190 |
this.insurerType = null;
|
| 6805 |
anupam.sin |
191 |
}
|
|
|
192 |
|
|
|
193 |
public long getItemId() {
|
|
|
194 |
return this.itemId;
|
|
|
195 |
}
|
|
|
196 |
|
|
|
197 |
public void setItemId(long itemId) {
|
|
|
198 |
this.itemId = itemId;
|
|
|
199 |
setItemIdIsSet(true);
|
|
|
200 |
}
|
|
|
201 |
|
|
|
202 |
public void unsetItemId() {
|
|
|
203 |
__isset_bit_vector.clear(__ITEMID_ISSET_ID);
|
|
|
204 |
}
|
|
|
205 |
|
|
|
206 |
/** Returns true if field itemId is set (has been assigned a value) and false otherwise */
|
|
|
207 |
public boolean isSetItemId() {
|
|
|
208 |
return __isset_bit_vector.get(__ITEMID_ISSET_ID);
|
|
|
209 |
}
|
|
|
210 |
|
|
|
211 |
public void setItemIdIsSet(boolean value) {
|
|
|
212 |
__isset_bit_vector.set(__ITEMID_ISSET_ID, value);
|
|
|
213 |
}
|
|
|
214 |
|
|
|
215 |
public long getInsurer() {
|
|
|
216 |
return this.insurer;
|
|
|
217 |
}
|
|
|
218 |
|
|
|
219 |
public void setInsurer(long insurer) {
|
|
|
220 |
this.insurer = insurer;
|
|
|
221 |
setInsurerIsSet(true);
|
|
|
222 |
}
|
|
|
223 |
|
|
|
224 |
public void unsetInsurer() {
|
|
|
225 |
__isset_bit_vector.clear(__INSURER_ISSET_ID);
|
|
|
226 |
}
|
|
|
227 |
|
|
|
228 |
/** Returns true if field insurer is set (has been assigned a value) and false otherwise */
|
|
|
229 |
public boolean isSetInsurer() {
|
|
|
230 |
return __isset_bit_vector.get(__INSURER_ISSET_ID);
|
|
|
231 |
}
|
|
|
232 |
|
|
|
233 |
public void setInsurerIsSet(boolean value) {
|
|
|
234 |
__isset_bit_vector.set(__INSURER_ISSET_ID, value);
|
|
|
235 |
}
|
|
|
236 |
|
|
|
237 |
/**
|
|
|
238 |
*
|
|
|
239 |
* @see PremiumType
|
|
|
240 |
*/
|
|
|
241 |
public PremiumType getPremiumType() {
|
|
|
242 |
return this.premiumType;
|
|
|
243 |
}
|
|
|
244 |
|
|
|
245 |
/**
|
|
|
246 |
*
|
|
|
247 |
* @see PremiumType
|
|
|
248 |
*/
|
|
|
249 |
public void setPremiumType(PremiumType premiumType) {
|
|
|
250 |
this.premiumType = premiumType;
|
|
|
251 |
}
|
|
|
252 |
|
|
|
253 |
public void unsetPremiumType() {
|
|
|
254 |
this.premiumType = null;
|
|
|
255 |
}
|
|
|
256 |
|
|
|
257 |
/** Returns true if field premiumType is set (has been assigned a value) and false otherwise */
|
|
|
258 |
public boolean isSetPremiumType() {
|
|
|
259 |
return this.premiumType != null;
|
|
|
260 |
}
|
|
|
261 |
|
|
|
262 |
public void setPremiumTypeIsSet(boolean value) {
|
|
|
263 |
if (!value) {
|
|
|
264 |
this.premiumType = null;
|
|
|
265 |
}
|
|
|
266 |
}
|
|
|
267 |
|
|
|
268 |
public double getPremiumValue() {
|
|
|
269 |
return this.premiumValue;
|
|
|
270 |
}
|
|
|
271 |
|
|
|
272 |
public void setPremiumValue(double premiumValue) {
|
|
|
273 |
this.premiumValue = premiumValue;
|
|
|
274 |
setPremiumValueIsSet(true);
|
|
|
275 |
}
|
|
|
276 |
|
|
|
277 |
public void unsetPremiumValue() {
|
|
|
278 |
__isset_bit_vector.clear(__PREMIUMVALUE_ISSET_ID);
|
|
|
279 |
}
|
|
|
280 |
|
|
|
281 |
/** Returns true if field premiumValue is set (has been assigned a value) and false otherwise */
|
|
|
282 |
public boolean isSetPremiumValue() {
|
|
|
283 |
return __isset_bit_vector.get(__PREMIUMVALUE_ISSET_ID);
|
|
|
284 |
}
|
|
|
285 |
|
|
|
286 |
public void setPremiumValueIsSet(boolean value) {
|
|
|
287 |
__isset_bit_vector.set(__PREMIUMVALUE_ISSET_ID, value);
|
|
|
288 |
}
|
|
|
289 |
|
| 9299 |
kshitij.so |
290 |
/**
|
|
|
291 |
*
|
|
|
292 |
* @see InsurerType
|
|
|
293 |
*/
|
|
|
294 |
public InsurerType getInsurerType() {
|
|
|
295 |
return this.insurerType;
|
|
|
296 |
}
|
|
|
297 |
|
|
|
298 |
/**
|
|
|
299 |
*
|
|
|
300 |
* @see InsurerType
|
|
|
301 |
*/
|
|
|
302 |
public void setInsurerType(InsurerType insurerType) {
|
|
|
303 |
this.insurerType = insurerType;
|
|
|
304 |
}
|
|
|
305 |
|
|
|
306 |
public void unsetInsurerType() {
|
|
|
307 |
this.insurerType = null;
|
|
|
308 |
}
|
|
|
309 |
|
|
|
310 |
/** Returns true if field insurerType is set (has been assigned a value) and false otherwise */
|
|
|
311 |
public boolean isSetInsurerType() {
|
|
|
312 |
return this.insurerType != null;
|
|
|
313 |
}
|
|
|
314 |
|
|
|
315 |
public void setInsurerTypeIsSet(boolean value) {
|
|
|
316 |
if (!value) {
|
|
|
317 |
this.insurerType = null;
|
|
|
318 |
}
|
|
|
319 |
}
|
|
|
320 |
|
| 6805 |
anupam.sin |
321 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
322 |
switch (field) {
|
|
|
323 |
case ITEM_ID:
|
|
|
324 |
if (value == null) {
|
|
|
325 |
unsetItemId();
|
|
|
326 |
} else {
|
|
|
327 |
setItemId((Long)value);
|
|
|
328 |
}
|
|
|
329 |
break;
|
|
|
330 |
|
|
|
331 |
case INSURER:
|
|
|
332 |
if (value == null) {
|
|
|
333 |
unsetInsurer();
|
|
|
334 |
} else {
|
|
|
335 |
setInsurer((Long)value);
|
|
|
336 |
}
|
|
|
337 |
break;
|
|
|
338 |
|
|
|
339 |
case PREMIUM_TYPE:
|
|
|
340 |
if (value == null) {
|
|
|
341 |
unsetPremiumType();
|
|
|
342 |
} else {
|
|
|
343 |
setPremiumType((PremiumType)value);
|
|
|
344 |
}
|
|
|
345 |
break;
|
|
|
346 |
|
|
|
347 |
case PREMIUM_VALUE:
|
|
|
348 |
if (value == null) {
|
|
|
349 |
unsetPremiumValue();
|
|
|
350 |
} else {
|
|
|
351 |
setPremiumValue((Double)value);
|
|
|
352 |
}
|
|
|
353 |
break;
|
|
|
354 |
|
| 9299 |
kshitij.so |
355 |
case INSURER_TYPE:
|
|
|
356 |
if (value == null) {
|
|
|
357 |
unsetInsurerType();
|
|
|
358 |
} else {
|
|
|
359 |
setInsurerType((InsurerType)value);
|
|
|
360 |
}
|
|
|
361 |
break;
|
|
|
362 |
|
| 6805 |
anupam.sin |
363 |
}
|
|
|
364 |
}
|
|
|
365 |
|
|
|
366 |
public Object getFieldValue(_Fields field) {
|
|
|
367 |
switch (field) {
|
|
|
368 |
case ITEM_ID:
|
|
|
369 |
return Long.valueOf(getItemId());
|
|
|
370 |
|
|
|
371 |
case INSURER:
|
|
|
372 |
return Long.valueOf(getInsurer());
|
|
|
373 |
|
|
|
374 |
case PREMIUM_TYPE:
|
|
|
375 |
return getPremiumType();
|
|
|
376 |
|
|
|
377 |
case PREMIUM_VALUE:
|
|
|
378 |
return Double.valueOf(getPremiumValue());
|
|
|
379 |
|
| 9299 |
kshitij.so |
380 |
case INSURER_TYPE:
|
|
|
381 |
return getInsurerType();
|
|
|
382 |
|
| 6805 |
anupam.sin |
383 |
}
|
|
|
384 |
throw new IllegalStateException();
|
|
|
385 |
}
|
|
|
386 |
|
|
|
387 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
388 |
public boolean isSet(_Fields field) {
|
|
|
389 |
if (field == null) {
|
|
|
390 |
throw new IllegalArgumentException();
|
|
|
391 |
}
|
|
|
392 |
|
|
|
393 |
switch (field) {
|
|
|
394 |
case ITEM_ID:
|
|
|
395 |
return isSetItemId();
|
|
|
396 |
case INSURER:
|
|
|
397 |
return isSetInsurer();
|
|
|
398 |
case PREMIUM_TYPE:
|
|
|
399 |
return isSetPremiumType();
|
|
|
400 |
case PREMIUM_VALUE:
|
|
|
401 |
return isSetPremiumValue();
|
| 9299 |
kshitij.so |
402 |
case INSURER_TYPE:
|
|
|
403 |
return isSetInsurerType();
|
| 6805 |
anupam.sin |
404 |
}
|
|
|
405 |
throw new IllegalStateException();
|
|
|
406 |
}
|
|
|
407 |
|
|
|
408 |
@Override
|
|
|
409 |
public boolean equals(Object that) {
|
|
|
410 |
if (that == null)
|
|
|
411 |
return false;
|
|
|
412 |
if (that instanceof ItemInsurerMapping)
|
|
|
413 |
return this.equals((ItemInsurerMapping)that);
|
|
|
414 |
return false;
|
|
|
415 |
}
|
|
|
416 |
|
|
|
417 |
public boolean equals(ItemInsurerMapping that) {
|
|
|
418 |
if (that == null)
|
|
|
419 |
return false;
|
|
|
420 |
|
|
|
421 |
boolean this_present_itemId = true;
|
|
|
422 |
boolean that_present_itemId = true;
|
|
|
423 |
if (this_present_itemId || that_present_itemId) {
|
|
|
424 |
if (!(this_present_itemId && that_present_itemId))
|
|
|
425 |
return false;
|
|
|
426 |
if (this.itemId != that.itemId)
|
|
|
427 |
return false;
|
|
|
428 |
}
|
|
|
429 |
|
|
|
430 |
boolean this_present_insurer = true;
|
|
|
431 |
boolean that_present_insurer = true;
|
|
|
432 |
if (this_present_insurer || that_present_insurer) {
|
|
|
433 |
if (!(this_present_insurer && that_present_insurer))
|
|
|
434 |
return false;
|
|
|
435 |
if (this.insurer != that.insurer)
|
|
|
436 |
return false;
|
|
|
437 |
}
|
|
|
438 |
|
|
|
439 |
boolean this_present_premiumType = true && this.isSetPremiumType();
|
|
|
440 |
boolean that_present_premiumType = true && that.isSetPremiumType();
|
|
|
441 |
if (this_present_premiumType || that_present_premiumType) {
|
|
|
442 |
if (!(this_present_premiumType && that_present_premiumType))
|
|
|
443 |
return false;
|
|
|
444 |
if (!this.premiumType.equals(that.premiumType))
|
|
|
445 |
return false;
|
|
|
446 |
}
|
|
|
447 |
|
|
|
448 |
boolean this_present_premiumValue = true;
|
|
|
449 |
boolean that_present_premiumValue = true;
|
|
|
450 |
if (this_present_premiumValue || that_present_premiumValue) {
|
|
|
451 |
if (!(this_present_premiumValue && that_present_premiumValue))
|
|
|
452 |
return false;
|
|
|
453 |
if (this.premiumValue != that.premiumValue)
|
|
|
454 |
return false;
|
|
|
455 |
}
|
|
|
456 |
|
| 9299 |
kshitij.so |
457 |
boolean this_present_insurerType = true && this.isSetInsurerType();
|
|
|
458 |
boolean that_present_insurerType = true && that.isSetInsurerType();
|
|
|
459 |
if (this_present_insurerType || that_present_insurerType) {
|
|
|
460 |
if (!(this_present_insurerType && that_present_insurerType))
|
|
|
461 |
return false;
|
|
|
462 |
if (!this.insurerType.equals(that.insurerType))
|
|
|
463 |
return false;
|
|
|
464 |
}
|
|
|
465 |
|
| 6805 |
anupam.sin |
466 |
return true;
|
|
|
467 |
}
|
|
|
468 |
|
|
|
469 |
@Override
|
|
|
470 |
public int hashCode() {
|
|
|
471 |
return 0;
|
|
|
472 |
}
|
|
|
473 |
|
|
|
474 |
public int compareTo(ItemInsurerMapping other) {
|
|
|
475 |
if (!getClass().equals(other.getClass())) {
|
|
|
476 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
477 |
}
|
|
|
478 |
|
|
|
479 |
int lastComparison = 0;
|
|
|
480 |
ItemInsurerMapping typedOther = (ItemInsurerMapping)other;
|
|
|
481 |
|
|
|
482 |
lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
|
|
|
483 |
if (lastComparison != 0) {
|
|
|
484 |
return lastComparison;
|
|
|
485 |
}
|
|
|
486 |
if (isSetItemId()) {
|
|
|
487 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
|
|
|
488 |
if (lastComparison != 0) {
|
|
|
489 |
return lastComparison;
|
|
|
490 |
}
|
|
|
491 |
}
|
|
|
492 |
lastComparison = Boolean.valueOf(isSetInsurer()).compareTo(typedOther.isSetInsurer());
|
|
|
493 |
if (lastComparison != 0) {
|
|
|
494 |
return lastComparison;
|
|
|
495 |
}
|
|
|
496 |
if (isSetInsurer()) {
|
|
|
497 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.insurer, typedOther.insurer);
|
|
|
498 |
if (lastComparison != 0) {
|
|
|
499 |
return lastComparison;
|
|
|
500 |
}
|
|
|
501 |
}
|
|
|
502 |
lastComparison = Boolean.valueOf(isSetPremiumType()).compareTo(typedOther.isSetPremiumType());
|
|
|
503 |
if (lastComparison != 0) {
|
|
|
504 |
return lastComparison;
|
|
|
505 |
}
|
|
|
506 |
if (isSetPremiumType()) {
|
|
|
507 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.premiumType, typedOther.premiumType);
|
|
|
508 |
if (lastComparison != 0) {
|
|
|
509 |
return lastComparison;
|
|
|
510 |
}
|
|
|
511 |
}
|
|
|
512 |
lastComparison = Boolean.valueOf(isSetPremiumValue()).compareTo(typedOther.isSetPremiumValue());
|
|
|
513 |
if (lastComparison != 0) {
|
|
|
514 |
return lastComparison;
|
|
|
515 |
}
|
|
|
516 |
if (isSetPremiumValue()) {
|
|
|
517 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.premiumValue, typedOther.premiumValue);
|
|
|
518 |
if (lastComparison != 0) {
|
|
|
519 |
return lastComparison;
|
|
|
520 |
}
|
|
|
521 |
}
|
| 9299 |
kshitij.so |
522 |
lastComparison = Boolean.valueOf(isSetInsurerType()).compareTo(typedOther.isSetInsurerType());
|
|
|
523 |
if (lastComparison != 0) {
|
|
|
524 |
return lastComparison;
|
|
|
525 |
}
|
|
|
526 |
if (isSetInsurerType()) {
|
|
|
527 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.insurerType, typedOther.insurerType);
|
|
|
528 |
if (lastComparison != 0) {
|
|
|
529 |
return lastComparison;
|
|
|
530 |
}
|
|
|
531 |
}
|
| 6805 |
anupam.sin |
532 |
return 0;
|
|
|
533 |
}
|
|
|
534 |
|
|
|
535 |
public _Fields fieldForId(int fieldId) {
|
|
|
536 |
return _Fields.findByThriftId(fieldId);
|
|
|
537 |
}
|
|
|
538 |
|
|
|
539 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
540 |
org.apache.thrift.protocol.TField field;
|
|
|
541 |
iprot.readStructBegin();
|
|
|
542 |
while (true)
|
|
|
543 |
{
|
|
|
544 |
field = iprot.readFieldBegin();
|
|
|
545 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
546 |
break;
|
|
|
547 |
}
|
|
|
548 |
switch (field.id) {
|
|
|
549 |
case 1: // ITEM_ID
|
|
|
550 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
551 |
this.itemId = iprot.readI64();
|
|
|
552 |
setItemIdIsSet(true);
|
|
|
553 |
} else {
|
|
|
554 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
555 |
}
|
|
|
556 |
break;
|
|
|
557 |
case 2: // INSURER
|
|
|
558 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
559 |
this.insurer = iprot.readI64();
|
|
|
560 |
setInsurerIsSet(true);
|
|
|
561 |
} else {
|
|
|
562 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
563 |
}
|
|
|
564 |
break;
|
|
|
565 |
case 3: // PREMIUM_TYPE
|
|
|
566 |
if (field.type == org.apache.thrift.protocol.TType.I32) {
|
|
|
567 |
this.premiumType = PremiumType.findByValue(iprot.readI32());
|
|
|
568 |
} else {
|
|
|
569 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
570 |
}
|
|
|
571 |
break;
|
|
|
572 |
case 4: // PREMIUM_VALUE
|
|
|
573 |
if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
|
|
|
574 |
this.premiumValue = iprot.readDouble();
|
|
|
575 |
setPremiumValueIsSet(true);
|
|
|
576 |
} else {
|
|
|
577 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
578 |
}
|
|
|
579 |
break;
|
| 9299 |
kshitij.so |
580 |
case 5: // INSURER_TYPE
|
|
|
581 |
if (field.type == org.apache.thrift.protocol.TType.I32) {
|
|
|
582 |
this.insurerType = InsurerType.findByValue(iprot.readI32());
|
|
|
583 |
} else {
|
|
|
584 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
585 |
}
|
|
|
586 |
break;
|
| 6805 |
anupam.sin |
587 |
default:
|
|
|
588 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
589 |
}
|
|
|
590 |
iprot.readFieldEnd();
|
|
|
591 |
}
|
|
|
592 |
iprot.readStructEnd();
|
|
|
593 |
validate();
|
|
|
594 |
}
|
|
|
595 |
|
|
|
596 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
597 |
validate();
|
|
|
598 |
|
|
|
599 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
600 |
oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
|
|
|
601 |
oprot.writeI64(this.itemId);
|
|
|
602 |
oprot.writeFieldEnd();
|
|
|
603 |
oprot.writeFieldBegin(INSURER_FIELD_DESC);
|
|
|
604 |
oprot.writeI64(this.insurer);
|
|
|
605 |
oprot.writeFieldEnd();
|
|
|
606 |
if (this.premiumType != null) {
|
|
|
607 |
oprot.writeFieldBegin(PREMIUM_TYPE_FIELD_DESC);
|
|
|
608 |
oprot.writeI32(this.premiumType.getValue());
|
|
|
609 |
oprot.writeFieldEnd();
|
|
|
610 |
}
|
|
|
611 |
oprot.writeFieldBegin(PREMIUM_VALUE_FIELD_DESC);
|
|
|
612 |
oprot.writeDouble(this.premiumValue);
|
|
|
613 |
oprot.writeFieldEnd();
|
| 9299 |
kshitij.so |
614 |
if (this.insurerType != null) {
|
|
|
615 |
oprot.writeFieldBegin(INSURER_TYPE_FIELD_DESC);
|
|
|
616 |
oprot.writeI32(this.insurerType.getValue());
|
|
|
617 |
oprot.writeFieldEnd();
|
|
|
618 |
}
|
| 6805 |
anupam.sin |
619 |
oprot.writeFieldStop();
|
|
|
620 |
oprot.writeStructEnd();
|
|
|
621 |
}
|
|
|
622 |
|
|
|
623 |
@Override
|
|
|
624 |
public String toString() {
|
|
|
625 |
StringBuilder sb = new StringBuilder("ItemInsurerMapping(");
|
|
|
626 |
boolean first = true;
|
|
|
627 |
|
|
|
628 |
sb.append("itemId:");
|
|
|
629 |
sb.append(this.itemId);
|
|
|
630 |
first = false;
|
|
|
631 |
if (!first) sb.append(", ");
|
|
|
632 |
sb.append("insurer:");
|
|
|
633 |
sb.append(this.insurer);
|
|
|
634 |
first = false;
|
|
|
635 |
if (!first) sb.append(", ");
|
|
|
636 |
sb.append("premiumType:");
|
|
|
637 |
if (this.premiumType == null) {
|
|
|
638 |
sb.append("null");
|
|
|
639 |
} else {
|
|
|
640 |
sb.append(this.premiumType);
|
|
|
641 |
}
|
|
|
642 |
first = false;
|
|
|
643 |
if (!first) sb.append(", ");
|
|
|
644 |
sb.append("premiumValue:");
|
|
|
645 |
sb.append(this.premiumValue);
|
|
|
646 |
first = false;
|
| 9299 |
kshitij.so |
647 |
if (!first) sb.append(", ");
|
|
|
648 |
sb.append("insurerType:");
|
|
|
649 |
if (this.insurerType == null) {
|
|
|
650 |
sb.append("null");
|
|
|
651 |
} else {
|
|
|
652 |
sb.append(this.insurerType);
|
|
|
653 |
}
|
|
|
654 |
first = false;
|
| 6805 |
anupam.sin |
655 |
sb.append(")");
|
|
|
656 |
return sb.toString();
|
|
|
657 |
}
|
|
|
658 |
|
|
|
659 |
public void validate() throws org.apache.thrift.TException {
|
|
|
660 |
// check for required fields
|
|
|
661 |
}
|
|
|
662 |
|
|
|
663 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
664 |
try {
|
|
|
665 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
666 |
} catch (org.apache.thrift.TException te) {
|
|
|
667 |
throw new java.io.IOException(te);
|
|
|
668 |
}
|
|
|
669 |
}
|
|
|
670 |
|
|
|
671 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
672 |
try {
|
|
|
673 |
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
|
|
674 |
__isset_bit_vector = new BitSet(1);
|
|
|
675 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
676 |
} catch (org.apache.thrift.TException te) {
|
|
|
677 |
throw new java.io.IOException(te);
|
|
|
678 |
}
|
|
|
679 |
}
|
|
|
680 |
|
|
|
681 |
}
|
|
|
682 |
|