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