Subversion Repositories SmartDukaan

Rev

Rev 12696 | Rev 18590 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 12696 Rev 13146
Line 26... Line 26...
26
  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);
26
  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);
27
  private static final org.apache.thrift.protocol.TField ADDED_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("addedOn", org.apache.thrift.protocol.TType.I64, (short)2);
27
  private static final org.apache.thrift.protocol.TField ADDED_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("addedOn", org.apache.thrift.protocol.TType.I64, (short)2);
28
  private static final org.apache.thrift.protocol.TField IS_ACTIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("isActive", org.apache.thrift.protocol.TType.BOOL, (short)3);
28
  private static final org.apache.thrift.protocol.TField IS_ACTIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("isActive", org.apache.thrift.protocol.TType.BOOL, (short)3);
29
  private static final org.apache.thrift.protocol.TField COUNTER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("counterId", org.apache.thrift.protocol.TType.I64, (short)4);
29
  private static final org.apache.thrift.protocol.TField COUNTER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("counterId", org.apache.thrift.protocol.TType.I64, (short)4);
30
  private static final org.apache.thrift.protocol.TField TIN_FIELD_DESC = new org.apache.thrift.protocol.TField("tin", org.apache.thrift.protocol.TType.STRING, (short)5);
30
  private static final org.apache.thrift.protocol.TField TIN_FIELD_DESC = new org.apache.thrift.protocol.TField("tin", org.apache.thrift.protocol.TType.STRING, (short)5);
-
 
31
  private static final org.apache.thrift.protocol.TField BULK_SHIPMENT_AMOUNT_LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("bulkShipmentAmountLimit", org.apache.thrift.protocol.TType.DOUBLE, (short)6);
31
 
32
 
32
  private long userId; // required
33
  private long userId; // required
33
  private long addedOn; // required
34
  private long addedOn; // required
34
  private boolean isActive; // required
35
  private boolean isActive; // required
35
  private long counterId; // required
36
  private long counterId; // required
36
  private String tin; // required
37
  private String tin; // required
-
 
38
  private double bulkShipmentAmountLimit; // required
37
 
39
 
38
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
40
  /** 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 {
41
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
40
    USER_ID((short)1, "userId"),
42
    USER_ID((short)1, "userId"),
41
    ADDED_ON((short)2, "addedOn"),
43
    ADDED_ON((short)2, "addedOn"),
42
    IS_ACTIVE((short)3, "isActive"),
44
    IS_ACTIVE((short)3, "isActive"),
43
    COUNTER_ID((short)4, "counterId"),
45
    COUNTER_ID((short)4, "counterId"),
44
    TIN((short)5, "tin");
46
    TIN((short)5, "tin"),
-
 
47
    BULK_SHIPMENT_AMOUNT_LIMIT((short)6, "bulkShipmentAmountLimit");
45
 
48
 
46
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
49
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
47
 
50
 
48
    static {
51
    static {
49
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
52
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 64... Line 67...
64
          return IS_ACTIVE;
67
          return IS_ACTIVE;
65
        case 4: // COUNTER_ID
68
        case 4: // COUNTER_ID
66
          return COUNTER_ID;
69
          return COUNTER_ID;
67
        case 5: // TIN
70
        case 5: // TIN
68
          return TIN;
71
          return TIN;
-
 
72
        case 6: // BULK_SHIPMENT_AMOUNT_LIMIT
-
 
73
          return BULK_SHIPMENT_AMOUNT_LIMIT;
69
        default:
74
        default:
70
          return null;
75
          return null;
71
      }
76
      }
72
    }
77
    }
73
 
78
 
Line 108... Line 113...
108
  // isset id assignments
113
  // isset id assignments
109
  private static final int __USERID_ISSET_ID = 0;
114
  private static final int __USERID_ISSET_ID = 0;
110
  private static final int __ADDEDON_ISSET_ID = 1;
115
  private static final int __ADDEDON_ISSET_ID = 1;
111
  private static final int __ISACTIVE_ISSET_ID = 2;
116
  private static final int __ISACTIVE_ISSET_ID = 2;
112
  private static final int __COUNTERID_ISSET_ID = 3;
117
  private static final int __COUNTERID_ISSET_ID = 3;
-
 
118
  private static final int __BULKSHIPMENTAMOUNTLIMIT_ISSET_ID = 4;
113
  private BitSet __isset_bit_vector = new BitSet(4);
119
  private BitSet __isset_bit_vector = new BitSet(5);
114
 
120
 
115
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
121
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
116
  static {
122
  static {
117
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
123
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
118
    tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
124
    tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 123... Line 129...
123
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
129
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
124
    tmpMap.put(_Fields.COUNTER_ID, new org.apache.thrift.meta_data.FieldMetaData("counterId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
130
    tmpMap.put(_Fields.COUNTER_ID, new org.apache.thrift.meta_data.FieldMetaData("counterId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
125
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
131
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
126
    tmpMap.put(_Fields.TIN, new org.apache.thrift.meta_data.FieldMetaData("tin", org.apache.thrift.TFieldRequirementType.DEFAULT, 
132
    tmpMap.put(_Fields.TIN, new org.apache.thrift.meta_data.FieldMetaData("tin", org.apache.thrift.TFieldRequirementType.DEFAULT, 
127
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
133
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
134
    tmpMap.put(_Fields.BULK_SHIPMENT_AMOUNT_LIMIT, new org.apache.thrift.meta_data.FieldMetaData("bulkShipmentAmountLimit", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
135
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
128
    metaDataMap = Collections.unmodifiableMap(tmpMap);
136
    metaDataMap = Collections.unmodifiableMap(tmpMap);
129
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PrivateDealUser.class, metaDataMap);
137
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PrivateDealUser.class, metaDataMap);
130
  }
138
  }
131
 
139
 
132
  public PrivateDealUser() {
140
  public PrivateDealUser() {
Line 135... Line 143...
135
  public PrivateDealUser(
143
  public PrivateDealUser(
136
    long userId,
144
    long userId,
137
    long addedOn,
145
    long addedOn,
138
    boolean isActive,
146
    boolean isActive,
139
    long counterId,
147
    long counterId,
140
    String tin)
148
    String tin,
-
 
149
    double bulkShipmentAmountLimit)
141
  {
150
  {
142
    this();
151
    this();
143
    this.userId = userId;
152
    this.userId = userId;
144
    setUserIdIsSet(true);
153
    setUserIdIsSet(true);
145
    this.addedOn = addedOn;
154
    this.addedOn = addedOn;
Line 147... Line 156...
147
    this.isActive = isActive;
156
    this.isActive = isActive;
148
    setIsActiveIsSet(true);
157
    setIsActiveIsSet(true);
149
    this.counterId = counterId;
158
    this.counterId = counterId;
150
    setCounterIdIsSet(true);
159
    setCounterIdIsSet(true);
151
    this.tin = tin;
160
    this.tin = tin;
-
 
161
    this.bulkShipmentAmountLimit = bulkShipmentAmountLimit;
-
 
162
    setBulkShipmentAmountLimitIsSet(true);
152
  }
163
  }
153
 
164
 
154
  /**
165
  /**
155
   * Performs a deep copy on <i>other</i>.
166
   * Performs a deep copy on <i>other</i>.
156
   */
167
   */
Line 162... Line 173...
162
    this.isActive = other.isActive;
173
    this.isActive = other.isActive;
163
    this.counterId = other.counterId;
174
    this.counterId = other.counterId;
164
    if (other.isSetTin()) {
175
    if (other.isSetTin()) {
165
      this.tin = other.tin;
176
      this.tin = other.tin;
166
    }
177
    }
-
 
178
    this.bulkShipmentAmountLimit = other.bulkShipmentAmountLimit;
167
  }
179
  }
168
 
180
 
169
  public PrivateDealUser deepCopy() {
181
  public PrivateDealUser deepCopy() {
170
    return new PrivateDealUser(this);
182
    return new PrivateDealUser(this);
171
  }
183
  }
Line 179... Line 191...
179
    setIsActiveIsSet(false);
191
    setIsActiveIsSet(false);
180
    this.isActive = false;
192
    this.isActive = false;
181
    setCounterIdIsSet(false);
193
    setCounterIdIsSet(false);
182
    this.counterId = 0;
194
    this.counterId = 0;
183
    this.tin = null;
195
    this.tin = null;
-
 
196
    setBulkShipmentAmountLimitIsSet(false);
-
 
197
    this.bulkShipmentAmountLimit = 0.0;
184
  }
198
  }
185
 
199
 
186
  public long getUserId() {
200
  public long getUserId() {
187
    return this.userId;
201
    return this.userId;
188
  }
202
  }
Line 292... Line 306...
292
    if (!value) {
306
    if (!value) {
293
      this.tin = null;
307
      this.tin = null;
294
    }
308
    }
295
  }
309
  }
296
 
310
 
-
 
311
  public double getBulkShipmentAmountLimit() {
-
 
312
    return this.bulkShipmentAmountLimit;
-
 
313
  }
-
 
314
 
-
 
315
  public void setBulkShipmentAmountLimit(double bulkShipmentAmountLimit) {
-
 
316
    this.bulkShipmentAmountLimit = bulkShipmentAmountLimit;
-
 
317
    setBulkShipmentAmountLimitIsSet(true);
-
 
318
  }
-
 
319
 
-
 
320
  public void unsetBulkShipmentAmountLimit() {
-
 
321
    __isset_bit_vector.clear(__BULKSHIPMENTAMOUNTLIMIT_ISSET_ID);
-
 
322
  }
-
 
323
 
-
 
324
  /** Returns true if field bulkShipmentAmountLimit is set (has been assigned a value) and false otherwise */
-
 
325
  public boolean isSetBulkShipmentAmountLimit() {
-
 
326
    return __isset_bit_vector.get(__BULKSHIPMENTAMOUNTLIMIT_ISSET_ID);
-
 
327
  }
-
 
328
 
-
 
329
  public void setBulkShipmentAmountLimitIsSet(boolean value) {
-
 
330
    __isset_bit_vector.set(__BULKSHIPMENTAMOUNTLIMIT_ISSET_ID, value);
-
 
331
  }
-
 
332
 
297
  public void setFieldValue(_Fields field, Object value) {
333
  public void setFieldValue(_Fields field, Object value) {
298
    switch (field) {
334
    switch (field) {
299
    case USER_ID:
335
    case USER_ID:
300
      if (value == null) {
336
      if (value == null) {
301
        unsetUserId();
337
        unsetUserId();
Line 334... Line 370...
334
      } else {
370
      } else {
335
        setTin((String)value);
371
        setTin((String)value);
336
      }
372
      }
337
      break;
373
      break;
338
 
374
 
-
 
375
    case BULK_SHIPMENT_AMOUNT_LIMIT:
-
 
376
      if (value == null) {
-
 
377
        unsetBulkShipmentAmountLimit();
-
 
378
      } else {
-
 
379
        setBulkShipmentAmountLimit((Double)value);
-
 
380
      }
-
 
381
      break;
-
 
382
 
339
    }
383
    }
340
  }
384
  }
341
 
385
 
342
  public Object getFieldValue(_Fields field) {
386
  public Object getFieldValue(_Fields field) {
343
    switch (field) {
387
    switch (field) {
Line 354... Line 398...
354
      return Long.valueOf(getCounterId());
398
      return Long.valueOf(getCounterId());
355
 
399
 
356
    case TIN:
400
    case TIN:
357
      return getTin();
401
      return getTin();
358
 
402
 
-
 
403
    case BULK_SHIPMENT_AMOUNT_LIMIT:
-
 
404
      return Double.valueOf(getBulkShipmentAmountLimit());
-
 
405
 
359
    }
406
    }
360
    throw new IllegalStateException();
407
    throw new IllegalStateException();
361
  }
408
  }
362
 
409
 
363
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
410
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 375... Line 422...
375
      return isSetIsActive();
422
      return isSetIsActive();
376
    case COUNTER_ID:
423
    case COUNTER_ID:
377
      return isSetCounterId();
424
      return isSetCounterId();
378
    case TIN:
425
    case TIN:
379
      return isSetTin();
426
      return isSetTin();
-
 
427
    case BULK_SHIPMENT_AMOUNT_LIMIT:
-
 
428
      return isSetBulkShipmentAmountLimit();
380
    }
429
    }
381
    throw new IllegalStateException();
430
    throw new IllegalStateException();
382
  }
431
  }
383
 
432
 
384
  @Override
433
  @Override
Line 437... Line 486...
437
        return false;
486
        return false;
438
      if (!this.tin.equals(that.tin))
487
      if (!this.tin.equals(that.tin))
439
        return false;
488
        return false;
440
    }
489
    }
441
 
490
 
-
 
491
    boolean this_present_bulkShipmentAmountLimit = true;
-
 
492
    boolean that_present_bulkShipmentAmountLimit = true;
-
 
493
    if (this_present_bulkShipmentAmountLimit || that_present_bulkShipmentAmountLimit) {
-
 
494
      if (!(this_present_bulkShipmentAmountLimit && that_present_bulkShipmentAmountLimit))
-
 
495
        return false;
-
 
496
      if (this.bulkShipmentAmountLimit != that.bulkShipmentAmountLimit)
-
 
497
        return false;
-
 
498
    }
-
 
499
 
442
    return true;
500
    return true;
443
  }
501
  }
444
 
502
 
445
  @Override
503
  @Override
446
  public int hashCode() {
504
  public int hashCode() {
Line 503... Line 561...
503
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tin, typedOther.tin);
561
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tin, typedOther.tin);
504
      if (lastComparison != 0) {
562
      if (lastComparison != 0) {
505
        return lastComparison;
563
        return lastComparison;
506
      }
564
      }
507
    }
565
    }
-
 
566
    lastComparison = Boolean.valueOf(isSetBulkShipmentAmountLimit()).compareTo(typedOther.isSetBulkShipmentAmountLimit());
-
 
567
    if (lastComparison != 0) {
-
 
568
      return lastComparison;
-
 
569
    }
-
 
570
    if (isSetBulkShipmentAmountLimit()) {
-
 
571
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bulkShipmentAmountLimit, typedOther.bulkShipmentAmountLimit);
-
 
572
      if (lastComparison != 0) {
-
 
573
        return lastComparison;
-
 
574
      }
-
 
575
    }
508
    return 0;
576
    return 0;
509
  }
577
  }
510
 
578
 
511
  public _Fields fieldForId(int fieldId) {
579
  public _Fields fieldForId(int fieldId) {
512
    return _Fields.findByThriftId(fieldId);
580
    return _Fields.findByThriftId(fieldId);
Line 559... Line 627...
559
            this.tin = iprot.readString();
627
            this.tin = iprot.readString();
560
          } else { 
628
          } else { 
561
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
629
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
562
          }
630
          }
563
          break;
631
          break;
-
 
632
        case 6: // BULK_SHIPMENT_AMOUNT_LIMIT
-
 
633
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
-
 
634
            this.bulkShipmentAmountLimit = iprot.readDouble();
-
 
635
            setBulkShipmentAmountLimitIsSet(true);
-
 
636
          } else { 
-
 
637
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
638
          }
-
 
639
          break;
564
        default:
640
        default:
565
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
641
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
566
      }
642
      }
567
      iprot.readFieldEnd();
643
      iprot.readFieldEnd();
568
    }
644
    }
Line 589... Line 665...
589
    if (this.tin != null) {
665
    if (this.tin != null) {
590
      oprot.writeFieldBegin(TIN_FIELD_DESC);
666
      oprot.writeFieldBegin(TIN_FIELD_DESC);
591
      oprot.writeString(this.tin);
667
      oprot.writeString(this.tin);
592
      oprot.writeFieldEnd();
668
      oprot.writeFieldEnd();
593
    }
669
    }
-
 
670
    oprot.writeFieldBegin(BULK_SHIPMENT_AMOUNT_LIMIT_FIELD_DESC);
-
 
671
    oprot.writeDouble(this.bulkShipmentAmountLimit);
-
 
672
    oprot.writeFieldEnd();
594
    oprot.writeFieldStop();
673
    oprot.writeFieldStop();
595
    oprot.writeStructEnd();
674
    oprot.writeStructEnd();
596
  }
675
  }
597
 
676
 
598
  @Override
677
  @Override
Line 621... Line 700...
621
      sb.append("null");
700
      sb.append("null");
622
    } else {
701
    } else {
623
      sb.append(this.tin);
702
      sb.append(this.tin);
624
    }
703
    }
625
    first = false;
704
    first = false;
-
 
705
    if (!first) sb.append(", ");
-
 
706
    sb.append("bulkShipmentAmountLimit:");
-
 
707
    sb.append(this.bulkShipmentAmountLimit);
-
 
708
    first = false;
626
    sb.append(")");
709
    sb.append(")");
627
    return sb.toString();
710
    return sb.toString();
628
  }
711
  }
629
 
712
 
630
  public void validate() throws org.apache.thrift.TException {
713
  public void validate() throws org.apache.thrift.TException {