Subversion Repositories SmartDukaan

Rev

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

Rev 13146 Rev 18590
Line 27... Line 27...
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
  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);
-
 
32
  private static final org.apache.thrift.protocol.TField CREDITOR_ASSIGNED_FIELD_DESC = new org.apache.thrift.protocol.TField("creditorAssigned", org.apache.thrift.protocol.TType.BOOL, (short)7);
32
 
33
 
33
  private long userId; // required
34
  private long userId; // required
34
  private long addedOn; // required
35
  private long addedOn; // required
35
  private boolean isActive; // required
36
  private boolean isActive; // required
36
  private long counterId; // required
37
  private long counterId; // required
37
  private String tin; // required
38
  private String tin; // required
38
  private double bulkShipmentAmountLimit; // required
39
  private double bulkShipmentAmountLimit; // required
-
 
40
  private boolean creditorAssigned; // required
39
 
41
 
40
  /** 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. */
41
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
43
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
42
    USER_ID((short)1, "userId"),
44
    USER_ID((short)1, "userId"),
43
    ADDED_ON((short)2, "addedOn"),
45
    ADDED_ON((short)2, "addedOn"),
44
    IS_ACTIVE((short)3, "isActive"),
46
    IS_ACTIVE((short)3, "isActive"),
45
    COUNTER_ID((short)4, "counterId"),
47
    COUNTER_ID((short)4, "counterId"),
46
    TIN((short)5, "tin"),
48
    TIN((short)5, "tin"),
47
    BULK_SHIPMENT_AMOUNT_LIMIT((short)6, "bulkShipmentAmountLimit");
49
    BULK_SHIPMENT_AMOUNT_LIMIT((short)6, "bulkShipmentAmountLimit"),
-
 
50
    CREDITOR_ASSIGNED((short)7, "creditorAssigned");
48
 
51
 
49
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
52
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
50
 
53
 
51
    static {
54
    static {
52
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
55
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 69... Line 72...
69
          return COUNTER_ID;
72
          return COUNTER_ID;
70
        case 5: // TIN
73
        case 5: // TIN
71
          return TIN;
74
          return TIN;
72
        case 6: // BULK_SHIPMENT_AMOUNT_LIMIT
75
        case 6: // BULK_SHIPMENT_AMOUNT_LIMIT
73
          return BULK_SHIPMENT_AMOUNT_LIMIT;
76
          return BULK_SHIPMENT_AMOUNT_LIMIT;
-
 
77
        case 7: // CREDITOR_ASSIGNED
-
 
78
          return CREDITOR_ASSIGNED;
74
        default:
79
        default:
75
          return null;
80
          return null;
76
      }
81
      }
77
    }
82
    }
78
 
83
 
Line 114... Line 119...
114
  private static final int __USERID_ISSET_ID = 0;
119
  private static final int __USERID_ISSET_ID = 0;
115
  private static final int __ADDEDON_ISSET_ID = 1;
120
  private static final int __ADDEDON_ISSET_ID = 1;
116
  private static final int __ISACTIVE_ISSET_ID = 2;
121
  private static final int __ISACTIVE_ISSET_ID = 2;
117
  private static final int __COUNTERID_ISSET_ID = 3;
122
  private static final int __COUNTERID_ISSET_ID = 3;
118
  private static final int __BULKSHIPMENTAMOUNTLIMIT_ISSET_ID = 4;
123
  private static final int __BULKSHIPMENTAMOUNTLIMIT_ISSET_ID = 4;
-
 
124
  private static final int __CREDITORASSIGNED_ISSET_ID = 5;
119
  private BitSet __isset_bit_vector = new BitSet(5);
125
  private BitSet __isset_bit_vector = new BitSet(6);
120
 
126
 
121
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
127
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
122
  static {
128
  static {
123
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
129
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
124
    tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
130
    tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 131... Line 137...
131
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
137
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
132
    tmpMap.put(_Fields.TIN, new org.apache.thrift.meta_data.FieldMetaData("tin", org.apache.thrift.TFieldRequirementType.DEFAULT, 
138
    tmpMap.put(_Fields.TIN, new org.apache.thrift.meta_data.FieldMetaData("tin", org.apache.thrift.TFieldRequirementType.DEFAULT, 
133
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
139
        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, 
140
    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)));
141
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
-
 
142
    tmpMap.put(_Fields.CREDITOR_ASSIGNED, new org.apache.thrift.meta_data.FieldMetaData("creditorAssigned", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
143
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
136
    metaDataMap = Collections.unmodifiableMap(tmpMap);
144
    metaDataMap = Collections.unmodifiableMap(tmpMap);
137
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PrivateDealUser.class, metaDataMap);
145
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PrivateDealUser.class, metaDataMap);
138
  }
146
  }
139
 
147
 
140
  public PrivateDealUser() {
148
  public PrivateDealUser() {
Line 144... Line 152...
144
    long userId,
152
    long userId,
145
    long addedOn,
153
    long addedOn,
146
    boolean isActive,
154
    boolean isActive,
147
    long counterId,
155
    long counterId,
148
    String tin,
156
    String tin,
149
    double bulkShipmentAmountLimit)
157
    double bulkShipmentAmountLimit,
-
 
158
    boolean creditorAssigned)
150
  {
159
  {
151
    this();
160
    this();
152
    this.userId = userId;
161
    this.userId = userId;
153
    setUserIdIsSet(true);
162
    setUserIdIsSet(true);
154
    this.addedOn = addedOn;
163
    this.addedOn = addedOn;
Line 158... Line 167...
158
    this.counterId = counterId;
167
    this.counterId = counterId;
159
    setCounterIdIsSet(true);
168
    setCounterIdIsSet(true);
160
    this.tin = tin;
169
    this.tin = tin;
161
    this.bulkShipmentAmountLimit = bulkShipmentAmountLimit;
170
    this.bulkShipmentAmountLimit = bulkShipmentAmountLimit;
162
    setBulkShipmentAmountLimitIsSet(true);
171
    setBulkShipmentAmountLimitIsSet(true);
-
 
172
    this.creditorAssigned = creditorAssigned;
-
 
173
    setCreditorAssignedIsSet(true);
163
  }
174
  }
164
 
175
 
165
  /**
176
  /**
166
   * Performs a deep copy on <i>other</i>.
177
   * Performs a deep copy on <i>other</i>.
167
   */
178
   */
Line 174... Line 185...
174
    this.counterId = other.counterId;
185
    this.counterId = other.counterId;
175
    if (other.isSetTin()) {
186
    if (other.isSetTin()) {
176
      this.tin = other.tin;
187
      this.tin = other.tin;
177
    }
188
    }
178
    this.bulkShipmentAmountLimit = other.bulkShipmentAmountLimit;
189
    this.bulkShipmentAmountLimit = other.bulkShipmentAmountLimit;
-
 
190
    this.creditorAssigned = other.creditorAssigned;
179
  }
191
  }
180
 
192
 
181
  public PrivateDealUser deepCopy() {
193
  public PrivateDealUser deepCopy() {
182
    return new PrivateDealUser(this);
194
    return new PrivateDealUser(this);
183
  }
195
  }
Line 193... Line 205...
193
    setCounterIdIsSet(false);
205
    setCounterIdIsSet(false);
194
    this.counterId = 0;
206
    this.counterId = 0;
195
    this.tin = null;
207
    this.tin = null;
196
    setBulkShipmentAmountLimitIsSet(false);
208
    setBulkShipmentAmountLimitIsSet(false);
197
    this.bulkShipmentAmountLimit = 0.0;
209
    this.bulkShipmentAmountLimit = 0.0;
-
 
210
    setCreditorAssignedIsSet(false);
-
 
211
    this.creditorAssigned = false;
198
  }
212
  }
199
 
213
 
200
  public long getUserId() {
214
  public long getUserId() {
201
    return this.userId;
215
    return this.userId;
202
  }
216
  }
Line 328... Line 342...
328
 
342
 
329
  public void setBulkShipmentAmountLimitIsSet(boolean value) {
343
  public void setBulkShipmentAmountLimitIsSet(boolean value) {
330
    __isset_bit_vector.set(__BULKSHIPMENTAMOUNTLIMIT_ISSET_ID, value);
344
    __isset_bit_vector.set(__BULKSHIPMENTAMOUNTLIMIT_ISSET_ID, value);
331
  }
345
  }
332
 
346
 
-
 
347
  public boolean isCreditorAssigned() {
-
 
348
    return this.creditorAssigned;
-
 
349
  }
-
 
350
 
-
 
351
  public void setCreditorAssigned(boolean creditorAssigned) {
-
 
352
    this.creditorAssigned = creditorAssigned;
-
 
353
    setCreditorAssignedIsSet(true);
-
 
354
  }
-
 
355
 
-
 
356
  public void unsetCreditorAssigned() {
-
 
357
    __isset_bit_vector.clear(__CREDITORASSIGNED_ISSET_ID);
-
 
358
  }
-
 
359
 
-
 
360
  /** Returns true if field creditorAssigned is set (has been assigned a value) and false otherwise */
-
 
361
  public boolean isSetCreditorAssigned() {
-
 
362
    return __isset_bit_vector.get(__CREDITORASSIGNED_ISSET_ID);
-
 
363
  }
-
 
364
 
-
 
365
  public void setCreditorAssignedIsSet(boolean value) {
-
 
366
    __isset_bit_vector.set(__CREDITORASSIGNED_ISSET_ID, value);
-
 
367
  }
-
 
368
 
333
  public void setFieldValue(_Fields field, Object value) {
369
  public void setFieldValue(_Fields field, Object value) {
334
    switch (field) {
370
    switch (field) {
335
    case USER_ID:
371
    case USER_ID:
336
      if (value == null) {
372
      if (value == null) {
337
        unsetUserId();
373
        unsetUserId();
Line 378... Line 414...
378
      } else {
414
      } else {
379
        setBulkShipmentAmountLimit((Double)value);
415
        setBulkShipmentAmountLimit((Double)value);
380
      }
416
      }
381
      break;
417
      break;
382
 
418
 
-
 
419
    case CREDITOR_ASSIGNED:
-
 
420
      if (value == null) {
-
 
421
        unsetCreditorAssigned();
-
 
422
      } else {
-
 
423
        setCreditorAssigned((Boolean)value);
-
 
424
      }
-
 
425
      break;
-
 
426
 
383
    }
427
    }
384
  }
428
  }
385
 
429
 
386
  public Object getFieldValue(_Fields field) {
430
  public Object getFieldValue(_Fields field) {
387
    switch (field) {
431
    switch (field) {
Line 401... Line 445...
401
      return getTin();
445
      return getTin();
402
 
446
 
403
    case BULK_SHIPMENT_AMOUNT_LIMIT:
447
    case BULK_SHIPMENT_AMOUNT_LIMIT:
404
      return Double.valueOf(getBulkShipmentAmountLimit());
448
      return Double.valueOf(getBulkShipmentAmountLimit());
405
 
449
 
-
 
450
    case CREDITOR_ASSIGNED:
-
 
451
      return Boolean.valueOf(isCreditorAssigned());
-
 
452
 
406
    }
453
    }
407
    throw new IllegalStateException();
454
    throw new IllegalStateException();
408
  }
455
  }
409
 
456
 
410
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
457
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 424... Line 471...
424
      return isSetCounterId();
471
      return isSetCounterId();
425
    case TIN:
472
    case TIN:
426
      return isSetTin();
473
      return isSetTin();
427
    case BULK_SHIPMENT_AMOUNT_LIMIT:
474
    case BULK_SHIPMENT_AMOUNT_LIMIT:
428
      return isSetBulkShipmentAmountLimit();
475
      return isSetBulkShipmentAmountLimit();
-
 
476
    case CREDITOR_ASSIGNED:
-
 
477
      return isSetCreditorAssigned();
429
    }
478
    }
430
    throw new IllegalStateException();
479
    throw new IllegalStateException();
431
  }
480
  }
432
 
481
 
433
  @Override
482
  @Override
Line 495... Line 544...
495
        return false;
544
        return false;
496
      if (this.bulkShipmentAmountLimit != that.bulkShipmentAmountLimit)
545
      if (this.bulkShipmentAmountLimit != that.bulkShipmentAmountLimit)
497
        return false;
546
        return false;
498
    }
547
    }
499
 
548
 
-
 
549
    boolean this_present_creditorAssigned = true;
-
 
550
    boolean that_present_creditorAssigned = true;
-
 
551
    if (this_present_creditorAssigned || that_present_creditorAssigned) {
-
 
552
      if (!(this_present_creditorAssigned && that_present_creditorAssigned))
-
 
553
        return false;
-
 
554
      if (this.creditorAssigned != that.creditorAssigned)
-
 
555
        return false;
-
 
556
    }
-
 
557
 
500
    return true;
558
    return true;
501
  }
559
  }
502
 
560
 
503
  @Override
561
  @Override
504
  public int hashCode() {
562
  public int hashCode() {
Line 571... Line 629...
571
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bulkShipmentAmountLimit, typedOther.bulkShipmentAmountLimit);
629
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bulkShipmentAmountLimit, typedOther.bulkShipmentAmountLimit);
572
      if (lastComparison != 0) {
630
      if (lastComparison != 0) {
573
        return lastComparison;
631
        return lastComparison;
574
      }
632
      }
575
    }
633
    }
-
 
634
    lastComparison = Boolean.valueOf(isSetCreditorAssigned()).compareTo(typedOther.isSetCreditorAssigned());
-
 
635
    if (lastComparison != 0) {
-
 
636
      return lastComparison;
-
 
637
    }
-
 
638
    if (isSetCreditorAssigned()) {
-
 
639
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creditorAssigned, typedOther.creditorAssigned);
-
 
640
      if (lastComparison != 0) {
-
 
641
        return lastComparison;
-
 
642
      }
-
 
643
    }
576
    return 0;
644
    return 0;
577
  }
645
  }
578
 
646
 
579
  public _Fields fieldForId(int fieldId) {
647
  public _Fields fieldForId(int fieldId) {
580
    return _Fields.findByThriftId(fieldId);
648
    return _Fields.findByThriftId(fieldId);
Line 635... Line 703...
635
            setBulkShipmentAmountLimitIsSet(true);
703
            setBulkShipmentAmountLimitIsSet(true);
636
          } else { 
704
          } else { 
637
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
705
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
638
          }
706
          }
639
          break;
707
          break;
-
 
708
        case 7: // CREDITOR_ASSIGNED
-
 
709
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-
 
710
            this.creditorAssigned = iprot.readBool();
-
 
711
            setCreditorAssignedIsSet(true);
-
 
712
          } else { 
-
 
713
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
714
          }
-
 
715
          break;
640
        default:
716
        default:
641
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
717
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
642
      }
718
      }
643
      iprot.readFieldEnd();
719
      iprot.readFieldEnd();
644
    }
720
    }
Line 668... Line 744...
668
      oprot.writeFieldEnd();
744
      oprot.writeFieldEnd();
669
    }
745
    }
670
    oprot.writeFieldBegin(BULK_SHIPMENT_AMOUNT_LIMIT_FIELD_DESC);
746
    oprot.writeFieldBegin(BULK_SHIPMENT_AMOUNT_LIMIT_FIELD_DESC);
671
    oprot.writeDouble(this.bulkShipmentAmountLimit);
747
    oprot.writeDouble(this.bulkShipmentAmountLimit);
672
    oprot.writeFieldEnd();
748
    oprot.writeFieldEnd();
-
 
749
    oprot.writeFieldBegin(CREDITOR_ASSIGNED_FIELD_DESC);
-
 
750
    oprot.writeBool(this.creditorAssigned);
-
 
751
    oprot.writeFieldEnd();
673
    oprot.writeFieldStop();
752
    oprot.writeFieldStop();
674
    oprot.writeStructEnd();
753
    oprot.writeStructEnd();
675
  }
754
  }
676
 
755
 
677
  @Override
756
  @Override
Line 704... Line 783...
704
    first = false;
783
    first = false;
705
    if (!first) sb.append(", ");
784
    if (!first) sb.append(", ");
706
    sb.append("bulkShipmentAmountLimit:");
785
    sb.append("bulkShipmentAmountLimit:");
707
    sb.append(this.bulkShipmentAmountLimit);
786
    sb.append(this.bulkShipmentAmountLimit);
708
    first = false;
787
    first = false;
-
 
788
    if (!first) sb.append(", ");
-
 
789
    sb.append("creditorAssigned:");
-
 
790
    sb.append(this.creditorAssigned);
-
 
791
    first = false;
709
    sb.append(")");
792
    sb.append(")");
710
    return sb.toString();
793
    return sb.toString();
711
  }
794
  }
712
 
795
 
713
  public void validate() throws org.apache.thrift.TException {
796
  public void validate() throws org.apache.thrift.TException {