Subversion Repositories SmartDukaan

Rev

Rev 1013 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1013 Rev 3430
Line 1... Line 1...
1
/**
1
/**
2
 * Autogenerated by Thrift
2
 * Autogenerated by Thrift Compiler (0.7.0)
3
 *
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
5
 */
6
package in.shop2020.model.v1.user;
6
package in.shop2020.model.v1.user;
7
 
7
 
Line 13... Line 13...
13
import java.util.Set;
13
import java.util.Set;
14
import java.util.HashSet;
14
import java.util.HashSet;
15
import java.util.EnumSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
16
import java.util.Collections;
17
import java.util.BitSet;
17
import java.util.BitSet;
-
 
18
import java.nio.ByteBuffer;
18
import java.util.Arrays;
19
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
import org.slf4j.LoggerFactory;
21
 
22
 
22
import org.apache.thrift.*;
-
 
23
import org.apache.thrift.meta_data.*;
-
 
24
import org.apache.thrift.protocol.*;
-
 
25
 
-
 
26
/**
23
/**
27
 * Internal information to be used by system. various variables which aid in serving the user are identified and put here
24
 * Internal information to be used by system. various variables which aid in serving the user are identified and put here
28
 * *
25
 * *
29
 */
26
 */
30
public class UserInternalInfo implements TBase<UserInternalInfo._Fields>, java.io.Serializable, Cloneable, Comparable<UserInternalInfo> {
27
public class UserInternalInfo implements org.apache.thrift.TBase<UserInternalInfo, UserInternalInfo._Fields>, java.io.Serializable, Cloneable {
31
  private static final TStruct STRUCT_DESC = new TStruct("UserInternalInfo");
28
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UserInternalInfo");
32
 
29
 
33
  private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
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);
34
  private static final TField GEO_ZONE_FIELD_DESC = new TField("geoZone", TType.I64, (short)2);
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);
35
  private static final TField SHIPMENT_ZONE_FIELD_DESC = new TField("shipmentZone", TType.I64, (short)3);
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);
36
  private static final TField TAX_ZONE_FIELD_DESC = new TField("taxZone", TType.I64, (short)4);
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);
37
  private static final TField USER_RANK_SCORE_FIELD_DESC = new TField("userRankScore", TType.DOUBLE, (short)5);
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);
38
 
35
 
39
  private long userId;
36
  private long userId; // required
40
  private long geoZone;
37
  private long geoZone; // required
41
  private long shipmentZone;
38
  private long shipmentZone; // required
42
  private long taxZone;
39
  private long taxZone; // required
43
  private double userRankScore;
40
  private double userRankScore; // required
44
 
41
 
45
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
42
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
46
  public enum _Fields implements TFieldIdEnum {
43
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
47
    USER_ID((short)1, "userId"),
44
    USER_ID((short)1, "userId"),
48
    GEO_ZONE((short)2, "geoZone"),
45
    GEO_ZONE((short)2, "geoZone"),
49
    SHIPMENT_ZONE((short)3, "shipmentZone"),
46
    SHIPMENT_ZONE((short)3, "shipmentZone"),
50
    TAX_ZONE((short)4, "taxZone"),
47
    TAX_ZONE((short)4, "taxZone"),
51
    USER_RANK_SCORE((short)5, "userRankScore");
48
    USER_RANK_SCORE((short)5, "userRankScore");
52
 
49
 
53
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
54
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
50
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
55
 
51
 
56
    static {
52
    static {
57
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
53
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
58
        byId.put((int)field._thriftId, field);
-
 
59
        byName.put(field.getFieldName(), field);
54
        byName.put(field.getFieldName(), field);
60
      }
55
      }
61
    }
56
    }
62
 
57
 
63
    /**
58
    /**
64
     * Find the _Fields constant that matches fieldId, or null if its not found.
59
     * Find the _Fields constant that matches fieldId, or null if its not found.
65
     */
60
     */
66
    public static _Fields findByThriftId(int fieldId) {
61
    public static _Fields findByThriftId(int fieldId) {
67
      return byId.get(fieldId);
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
      }
68
    }
76
    }
69
 
77
 
70
    /**
78
    /**
71
     * Find the _Fields constant that matches fieldId, throwing an exception
79
     * Find the _Fields constant that matches fieldId, throwing an exception
72
     * if it is not found.
80
     * if it is not found.
Line 107... Line 115...
107
  private static final int __SHIPMENTZONE_ISSET_ID = 2;
115
  private static final int __SHIPMENTZONE_ISSET_ID = 2;
108
  private static final int __TAXZONE_ISSET_ID = 3;
116
  private static final int __TAXZONE_ISSET_ID = 3;
109
  private static final int __USERRANKSCORE_ISSET_ID = 4;
117
  private static final int __USERRANKSCORE_ISSET_ID = 4;
110
  private BitSet __isset_bit_vector = new BitSet(5);
118
  private BitSet __isset_bit_vector = new BitSet(5);
111
 
119
 
112
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
120
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
113
    put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
-
 
114
        new FieldValueMetaData(TType.I64)));
-
 
115
    put(_Fields.GEO_ZONE, new FieldMetaData("geoZone", TFieldRequirementType.DEFAULT, 
-
 
116
        new FieldValueMetaData(TType.I64)));
-
 
117
    put(_Fields.SHIPMENT_ZONE, new FieldMetaData("shipmentZone", TFieldRequirementType.DEFAULT, 
-
 
118
        new FieldValueMetaData(TType.I64)));
-
 
119
    put(_Fields.TAX_ZONE, new FieldMetaData("taxZone", TFieldRequirementType.DEFAULT, 
-
 
120
        new FieldValueMetaData(TType.I64)));
-
 
121
    put(_Fields.USER_RANK_SCORE, new FieldMetaData("userRankScore", TFieldRequirementType.DEFAULT, 
-
 
122
        new FieldValueMetaData(TType.DOUBLE)));
-
 
123
  }});
-
 
124
 
-
 
125
  static {
121
  static {
-
 
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);
126
    FieldMetaData.addStructMetaDataMap(UserInternalInfo.class, metaDataMap);
134
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UserInternalInfo.class, metaDataMap);
127
  }
135
  }
128
 
136
 
129
  public UserInternalInfo() {
137
  public UserInternalInfo() {
130
  }
138
  }
131
 
139
 
Line 164... Line 172...
164
 
172
 
165
  public UserInternalInfo deepCopy() {
173
  public UserInternalInfo deepCopy() {
166
    return new UserInternalInfo(this);
174
    return new UserInternalInfo(this);
167
  }
175
  }
168
 
176
 
169
  @Deprecated
177
  @Override
170
  public UserInternalInfo clone() {
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;
171
    return new UserInternalInfo(this);
187
    setUserRankScoreIsSet(false);
-
 
188
    this.userRankScore = 0.0;
172
  }
189
  }
173
 
190
 
174
  public long getUserId() {
191
  public long getUserId() {
175
    return this.userId;
192
    return this.userId;
176
  }
193
  }
177
 
194
 
178
  public UserInternalInfo setUserId(long userId) {
195
  public void setUserId(long userId) {
179
    this.userId = userId;
196
    this.userId = userId;
180
    setUserIdIsSet(true);
197
    setUserIdIsSet(true);
181
    return this;
-
 
182
  }
198
  }
183
 
199
 
184
  public void unsetUserId() {
200
  public void unsetUserId() {
185
    __isset_bit_vector.clear(__USERID_ISSET_ID);
201
    __isset_bit_vector.clear(__USERID_ISSET_ID);
186
  }
202
  }
187
 
203
 
188
  /** Returns true if field userId is set (has been asigned a value) and false otherwise */
204
  /** Returns true if field userId is set (has been assigned a value) and false otherwise */
189
  public boolean isSetUserId() {
205
  public boolean isSetUserId() {
190
    return __isset_bit_vector.get(__USERID_ISSET_ID);
206
    return __isset_bit_vector.get(__USERID_ISSET_ID);
191
  }
207
  }
192
 
208
 
193
  public void setUserIdIsSet(boolean value) {
209
  public void setUserIdIsSet(boolean value) {
Line 196... Line 212...
196
 
212
 
197
  public long getGeoZone() {
213
  public long getGeoZone() {
198
    return this.geoZone;
214
    return this.geoZone;
199
  }
215
  }
200
 
216
 
201
  public UserInternalInfo setGeoZone(long geoZone) {
217
  public void setGeoZone(long geoZone) {
202
    this.geoZone = geoZone;
218
    this.geoZone = geoZone;
203
    setGeoZoneIsSet(true);
219
    setGeoZoneIsSet(true);
204
    return this;
-
 
205
  }
220
  }
206
 
221
 
207
  public void unsetGeoZone() {
222
  public void unsetGeoZone() {
208
    __isset_bit_vector.clear(__GEOZONE_ISSET_ID);
223
    __isset_bit_vector.clear(__GEOZONE_ISSET_ID);
209
  }
224
  }
210
 
225
 
211
  /** Returns true if field geoZone is set (has been asigned a value) and false otherwise */
226
  /** Returns true if field geoZone is set (has been assigned a value) and false otherwise */
212
  public boolean isSetGeoZone() {
227
  public boolean isSetGeoZone() {
213
    return __isset_bit_vector.get(__GEOZONE_ISSET_ID);
228
    return __isset_bit_vector.get(__GEOZONE_ISSET_ID);
214
  }
229
  }
215
 
230
 
216
  public void setGeoZoneIsSet(boolean value) {
231
  public void setGeoZoneIsSet(boolean value) {
Line 219... Line 234...
219
 
234
 
220
  public long getShipmentZone() {
235
  public long getShipmentZone() {
221
    return this.shipmentZone;
236
    return this.shipmentZone;
222
  }
237
  }
223
 
238
 
224
  public UserInternalInfo setShipmentZone(long shipmentZone) {
239
  public void setShipmentZone(long shipmentZone) {
225
    this.shipmentZone = shipmentZone;
240
    this.shipmentZone = shipmentZone;
226
    setShipmentZoneIsSet(true);
241
    setShipmentZoneIsSet(true);
227
    return this;
-
 
228
  }
242
  }
229
 
243
 
230
  public void unsetShipmentZone() {
244
  public void unsetShipmentZone() {
231
    __isset_bit_vector.clear(__SHIPMENTZONE_ISSET_ID);
245
    __isset_bit_vector.clear(__SHIPMENTZONE_ISSET_ID);
232
  }
246
  }
233
 
247
 
234
  /** Returns true if field shipmentZone is set (has been asigned a value) and false otherwise */
248
  /** Returns true if field shipmentZone is set (has been assigned a value) and false otherwise */
235
  public boolean isSetShipmentZone() {
249
  public boolean isSetShipmentZone() {
236
    return __isset_bit_vector.get(__SHIPMENTZONE_ISSET_ID);
250
    return __isset_bit_vector.get(__SHIPMENTZONE_ISSET_ID);
237
  }
251
  }
238
 
252
 
239
  public void setShipmentZoneIsSet(boolean value) {
253
  public void setShipmentZoneIsSet(boolean value) {
Line 242... Line 256...
242
 
256
 
243
  public long getTaxZone() {
257
  public long getTaxZone() {
244
    return this.taxZone;
258
    return this.taxZone;
245
  }
259
  }
246
 
260
 
247
  public UserInternalInfo setTaxZone(long taxZone) {
261
  public void setTaxZone(long taxZone) {
248
    this.taxZone = taxZone;
262
    this.taxZone = taxZone;
249
    setTaxZoneIsSet(true);
263
    setTaxZoneIsSet(true);
250
    return this;
-
 
251
  }
264
  }
252
 
265
 
253
  public void unsetTaxZone() {
266
  public void unsetTaxZone() {
254
    __isset_bit_vector.clear(__TAXZONE_ISSET_ID);
267
    __isset_bit_vector.clear(__TAXZONE_ISSET_ID);
255
  }
268
  }
256
 
269
 
257
  /** Returns true if field taxZone is set (has been asigned a value) and false otherwise */
270
  /** Returns true if field taxZone is set (has been assigned a value) and false otherwise */
258
  public boolean isSetTaxZone() {
271
  public boolean isSetTaxZone() {
259
    return __isset_bit_vector.get(__TAXZONE_ISSET_ID);
272
    return __isset_bit_vector.get(__TAXZONE_ISSET_ID);
260
  }
273
  }
261
 
274
 
262
  public void setTaxZoneIsSet(boolean value) {
275
  public void setTaxZoneIsSet(boolean value) {
Line 265... Line 278...
265
 
278
 
266
  public double getUserRankScore() {
279
  public double getUserRankScore() {
267
    return this.userRankScore;
280
    return this.userRankScore;
268
  }
281
  }
269
 
282
 
270
  public UserInternalInfo setUserRankScore(double userRankScore) {
283
  public void setUserRankScore(double userRankScore) {
271
    this.userRankScore = userRankScore;
284
    this.userRankScore = userRankScore;
272
    setUserRankScoreIsSet(true);
285
    setUserRankScoreIsSet(true);
273
    return this;
-
 
274
  }
286
  }
275
 
287
 
276
  public void unsetUserRankScore() {
288
  public void unsetUserRankScore() {
277
    __isset_bit_vector.clear(__USERRANKSCORE_ISSET_ID);
289
    __isset_bit_vector.clear(__USERRANKSCORE_ISSET_ID);
278
  }
290
  }
279
 
291
 
280
  /** Returns true if field userRankScore is set (has been asigned a value) and false otherwise */
292
  /** Returns true if field userRankScore is set (has been assigned a value) and false otherwise */
281
  public boolean isSetUserRankScore() {
293
  public boolean isSetUserRankScore() {
282
    return __isset_bit_vector.get(__USERRANKSCORE_ISSET_ID);
294
    return __isset_bit_vector.get(__USERRANKSCORE_ISSET_ID);
283
  }
295
  }
284
 
296
 
285
  public void setUserRankScoreIsSet(boolean value) {
297
  public void setUserRankScoreIsSet(boolean value) {
Line 329... Line 341...
329
      break;
341
      break;
330
 
342
 
331
    }
343
    }
332
  }
344
  }
333
 
345
 
334
  public void setFieldValue(int fieldID, Object value) {
-
 
335
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
336
  }
-
 
337
 
-
 
338
  public Object getFieldValue(_Fields field) {
346
  public Object getFieldValue(_Fields field) {
339
    switch (field) {
347
    switch (field) {
340
    case USER_ID:
348
    case USER_ID:
341
      return new Long(getUserId());
349
      return Long.valueOf(getUserId());
342
 
350
 
343
    case GEO_ZONE:
351
    case GEO_ZONE:
344
      return new Long(getGeoZone());
352
      return Long.valueOf(getGeoZone());
345
 
353
 
346
    case SHIPMENT_ZONE:
354
    case SHIPMENT_ZONE:
347
      return new Long(getShipmentZone());
355
      return Long.valueOf(getShipmentZone());
348
 
356
 
349
    case TAX_ZONE:
357
    case TAX_ZONE:
350
      return new Long(getTaxZone());
358
      return Long.valueOf(getTaxZone());
351
 
359
 
352
    case USER_RANK_SCORE:
360
    case USER_RANK_SCORE:
353
      return new Double(getUserRankScore());
361
      return Double.valueOf(getUserRankScore());
354
 
362
 
355
    }
363
    }
356
    throw new IllegalStateException();
364
    throw new IllegalStateException();
357
  }
365
  }
358
 
366
 
359
  public Object getFieldValue(int fieldId) {
-
 
360
    return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
361
  }
-
 
362
 
-
 
363
  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
367
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
364
  public boolean isSet(_Fields field) {
368
  public boolean isSet(_Fields field) {
-
 
369
    if (field == null) {
-
 
370
      throw new IllegalArgumentException();
-
 
371
    }
-
 
372
 
365
    switch (field) {
373
    switch (field) {
366
    case USER_ID:
374
    case USER_ID:
367
      return isSetUserId();
375
      return isSetUserId();
368
    case GEO_ZONE:
376
    case GEO_ZONE:
369
      return isSetGeoZone();
377
      return isSetGeoZone();
Line 375... Line 383...
375
      return isSetUserRankScore();
383
      return isSetUserRankScore();
376
    }
384
    }
377
    throw new IllegalStateException();
385
    throw new IllegalStateException();
378
  }
386
  }
379
 
387
 
380
  public boolean isSet(int fieldID) {
-
 
381
    return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
382
  }
-
 
383
 
-
 
384
  @Override
388
  @Override
385
  public boolean equals(Object that) {
389
  public boolean equals(Object that) {
386
    if (that == null)
390
    if (that == null)
387
      return false;
391
      return false;
388
    if (that instanceof UserInternalInfo)
392
    if (that instanceof UserInternalInfo)
Line 453... Line 457...
453
    }
457
    }
454
 
458
 
455
    int lastComparison = 0;
459
    int lastComparison = 0;
456
    UserInternalInfo typedOther = (UserInternalInfo)other;
460
    UserInternalInfo typedOther = (UserInternalInfo)other;
457
 
461
 
458
    lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
462
    lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
459
    if (lastComparison != 0) {
463
    if (lastComparison != 0) {
460
      return lastComparison;
464
      return lastComparison;
461
    }
465
    }
-
 
466
    if (isSetUserId()) {
462
    lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
467
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
463
    if (lastComparison != 0) {
468
      if (lastComparison != 0) {
464
      return lastComparison;
469
        return lastComparison;
-
 
470
      }
465
    }
471
    }
466
    lastComparison = Boolean.valueOf(isSetGeoZone()).compareTo(isSetGeoZone());
472
    lastComparison = Boolean.valueOf(isSetGeoZone()).compareTo(typedOther.isSetGeoZone());
467
    if (lastComparison != 0) {
473
    if (lastComparison != 0) {
468
      return lastComparison;
474
      return lastComparison;
469
    }
475
    }
-
 
476
    if (isSetGeoZone()) {
470
    lastComparison = TBaseHelper.compareTo(geoZone, typedOther.geoZone);
477
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.geoZone, typedOther.geoZone);
471
    if (lastComparison != 0) {
478
      if (lastComparison != 0) {
472
      return lastComparison;
479
        return lastComparison;
-
 
480
      }
473
    }
481
    }
474
    lastComparison = Boolean.valueOf(isSetShipmentZone()).compareTo(isSetShipmentZone());
482
    lastComparison = Boolean.valueOf(isSetShipmentZone()).compareTo(typedOther.isSetShipmentZone());
475
    if (lastComparison != 0) {
483
    if (lastComparison != 0) {
476
      return lastComparison;
484
      return lastComparison;
477
    }
485
    }
-
 
486
    if (isSetShipmentZone()) {
478
    lastComparison = TBaseHelper.compareTo(shipmentZone, typedOther.shipmentZone);
487
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shipmentZone, typedOther.shipmentZone);
479
    if (lastComparison != 0) {
488
      if (lastComparison != 0) {
480
      return lastComparison;
489
        return lastComparison;
-
 
490
      }
481
    }
491
    }
482
    lastComparison = Boolean.valueOf(isSetTaxZone()).compareTo(isSetTaxZone());
492
    lastComparison = Boolean.valueOf(isSetTaxZone()).compareTo(typedOther.isSetTaxZone());
483
    if (lastComparison != 0) {
493
    if (lastComparison != 0) {
484
      return lastComparison;
494
      return lastComparison;
485
    }
495
    }
-
 
496
    if (isSetTaxZone()) {
486
    lastComparison = TBaseHelper.compareTo(taxZone, typedOther.taxZone);
497
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taxZone, typedOther.taxZone);
487
    if (lastComparison != 0) {
498
      if (lastComparison != 0) {
488
      return lastComparison;
499
        return lastComparison;
-
 
500
      }
489
    }
501
    }
490
    lastComparison = Boolean.valueOf(isSetUserRankScore()).compareTo(isSetUserRankScore());
502
    lastComparison = Boolean.valueOf(isSetUserRankScore()).compareTo(typedOther.isSetUserRankScore());
491
    if (lastComparison != 0) {
503
    if (lastComparison != 0) {
492
      return lastComparison;
504
      return lastComparison;
493
    }
505
    }
-
 
506
    if (isSetUserRankScore()) {
494
    lastComparison = TBaseHelper.compareTo(userRankScore, typedOther.userRankScore);
507
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userRankScore, typedOther.userRankScore);
495
    if (lastComparison != 0) {
508
      if (lastComparison != 0) {
496
      return lastComparison;
509
        return lastComparison;
-
 
510
      }
497
    }
511
    }
498
    return 0;
512
    return 0;
499
  }
513
  }
500
 
514
 
-
 
515
  public _Fields fieldForId(int fieldId) {
-
 
516
    return _Fields.findByThriftId(fieldId);
-
 
517
  }
-
 
518
 
501
  public void read(TProtocol iprot) throws TException {
519
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
502
    TField field;
520
    org.apache.thrift.protocol.TField field;
503
    iprot.readStructBegin();
521
    iprot.readStructBegin();
504
    while (true)
522
    while (true)
505
    {
523
    {
506
      field = iprot.readFieldBegin();
524
      field = iprot.readFieldBegin();
507
      if (field.type == TType.STOP) { 
525
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
508
        break;
526
        break;
509
      }
527
      }
510
      _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
511
      if (fieldId == null) {
-
 
512
        TProtocolUtil.skip(iprot, field.type);
-
 
513
      } else {
-
 
514
        switch (fieldId) {
528
      switch (field.id) {
515
          case USER_ID:
529
        case 1: // USER_ID
516
            if (field.type == TType.I64) {
530
          if (field.type == org.apache.thrift.protocol.TType.I64) {
517
              this.userId = iprot.readI64();
531
            this.userId = iprot.readI64();
518
              setUserIdIsSet(true);
532
            setUserIdIsSet(true);
519
            } else { 
533
          } else { 
520
              TProtocolUtil.skip(iprot, field.type);
534
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
521
            }
535
          }
522
            break;
536
          break;
523
          case GEO_ZONE:
537
        case 2: // GEO_ZONE
524
            if (field.type == TType.I64) {
538
          if (field.type == org.apache.thrift.protocol.TType.I64) {
525
              this.geoZone = iprot.readI64();
539
            this.geoZone = iprot.readI64();
526
              setGeoZoneIsSet(true);
540
            setGeoZoneIsSet(true);
527
            } else { 
541
          } else { 
528
              TProtocolUtil.skip(iprot, field.type);
542
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
529
            }
543
          }
530
            break;
544
          break;
531
          case SHIPMENT_ZONE:
545
        case 3: // SHIPMENT_ZONE
532
            if (field.type == TType.I64) {
546
          if (field.type == org.apache.thrift.protocol.TType.I64) {
533
              this.shipmentZone = iprot.readI64();
547
            this.shipmentZone = iprot.readI64();
534
              setShipmentZoneIsSet(true);
548
            setShipmentZoneIsSet(true);
535
            } else { 
549
          } else { 
536
              TProtocolUtil.skip(iprot, field.type);
550
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
537
            }
551
          }
538
            break;
552
          break;
539
          case TAX_ZONE:
553
        case 4: // TAX_ZONE
540
            if (field.type == TType.I64) {
554
          if (field.type == org.apache.thrift.protocol.TType.I64) {
541
              this.taxZone = iprot.readI64();
555
            this.taxZone = iprot.readI64();
542
              setTaxZoneIsSet(true);
556
            setTaxZoneIsSet(true);
543
            } else { 
557
          } else { 
544
              TProtocolUtil.skip(iprot, field.type);
558
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
545
            }
559
          }
546
            break;
560
          break;
547
          case USER_RANK_SCORE:
561
        case 5: // USER_RANK_SCORE
548
            if (field.type == TType.DOUBLE) {
562
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
549
              this.userRankScore = iprot.readDouble();
563
            this.userRankScore = iprot.readDouble();
550
              setUserRankScoreIsSet(true);
564
            setUserRankScoreIsSet(true);
551
            } else { 
565
          } else { 
552
              TProtocolUtil.skip(iprot, field.type);
566
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
553
            }
567
          }
554
            break;
568
          break;
555
        }
569
        default:
556
        iprot.readFieldEnd();
570
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
557
      }
571
      }
-
 
572
      iprot.readFieldEnd();
558
    }
573
    }
559
    iprot.readStructEnd();
574
    iprot.readStructEnd();
560
    validate();
575
    validate();
561
  }
576
  }
562
 
577
 
563
  public void write(TProtocol oprot) throws TException {
578
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
564
    validate();
579
    validate();
565
 
580
 
566
    oprot.writeStructBegin(STRUCT_DESC);
581
    oprot.writeStructBegin(STRUCT_DESC);
567
    oprot.writeFieldBegin(USER_ID_FIELD_DESC);
582
    oprot.writeFieldBegin(USER_ID_FIELD_DESC);
568
    oprot.writeI64(this.userId);
583
    oprot.writeI64(this.userId);
Line 609... Line 624...
609
    first = false;
624
    first = false;
610
    sb.append(")");
625
    sb.append(")");
611
    return sb.toString();
626
    return sb.toString();
612
  }
627
  }
613
 
628
 
614
  public void validate() throws TException {
629
  public void validate() throws org.apache.thrift.TException {
615
    // check for required fields
630
    // check for required fields
616
  }
631
  }
617
 
632
 
-
 
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
 
618
}
651
}
619
 
652