Subversion Repositories SmartDukaan

Rev

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

Rev 19973 Rev 20025
Line 27... Line 27...
27
  private static final org.apache.thrift.protocol.TField ORGANISATION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("organisationName", org.apache.thrift.protocol.TType.STRING, (short)2);
27
  private static final org.apache.thrift.protocol.TField ORGANISATION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("organisationName", org.apache.thrift.protocol.TType.STRING, (short)2);
28
  private static final org.apache.thrift.protocol.TField REGISTERED_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("registeredAddress", org.apache.thrift.protocol.TType.STRING, (short)3);
28
  private static final org.apache.thrift.protocol.TField REGISTERED_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("registeredAddress", org.apache.thrift.protocol.TType.STRING, (short)3);
29
  private static final org.apache.thrift.protocol.TField REG_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("regId", org.apache.thrift.protocol.TType.STRING, (short)4);
29
  private static final org.apache.thrift.protocol.TField REG_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("regId", org.apache.thrift.protocol.TType.STRING, (short)4);
30
  private static final org.apache.thrift.protocol.TField CIN_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("cinNumber", org.apache.thrift.protocol.TType.STRING, (short)5);
30
  private static final org.apache.thrift.protocol.TField CIN_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("cinNumber", org.apache.thrift.protocol.TType.STRING, (short)5);
31
  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)6);
31
  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)6);
-
 
32
  private static final org.apache.thrift.protocol.TField STATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("stateId", org.apache.thrift.protocol.TType.I64, (short)7);
32
 
33
 
33
  private long sellerId; // required
34
  private long sellerId; // required
34
  private String organisationName; // required
35
  private String organisationName; // required
35
  private String registeredAddress; // required
36
  private String registeredAddress; // required
36
  private String regId; // required
37
  private String regId; // required
37
  private String cinNumber; // required
38
  private String cinNumber; // required
38
  private String tin; // required
39
  private String tin; // required
-
 
40
  private long stateId; // 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
    SELLER_ID((short)1, "sellerId"),
44
    SELLER_ID((short)1, "sellerId"),
43
    ORGANISATION_NAME((short)2, "organisationName"),
45
    ORGANISATION_NAME((short)2, "organisationName"),
44
    REGISTERED_ADDRESS((short)3, "registeredAddress"),
46
    REGISTERED_ADDRESS((short)3, "registeredAddress"),
45
    REG_ID((short)4, "regId"),
47
    REG_ID((short)4, "regId"),
46
    CIN_NUMBER((short)5, "cinNumber"),
48
    CIN_NUMBER((short)5, "cinNumber"),
47
    TIN((short)6, "tin");
49
    TIN((short)6, "tin"),
-
 
50
    STATE_ID((short)7, "stateId");
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 REG_ID;
72
          return REG_ID;
70
        case 5: // CIN_NUMBER
73
        case 5: // CIN_NUMBER
71
          return CIN_NUMBER;
74
          return CIN_NUMBER;
72
        case 6: // TIN
75
        case 6: // TIN
73
          return TIN;
76
          return TIN;
-
 
77
        case 7: // STATE_ID
-
 
78
          return STATE_ID;
74
        default:
79
        default:
75
          return null;
80
          return null;
76
      }
81
      }
77
    }
82
    }
78
 
83
 
Line 110... Line 115...
110
    }
115
    }
111
  }
116
  }
112
 
117
 
113
  // isset id assignments
118
  // isset id assignments
114
  private static final int __SELLERID_ISSET_ID = 0;
119
  private static final int __SELLERID_ISSET_ID = 0;
-
 
120
  private static final int __STATEID_ISSET_ID = 1;
115
  private BitSet __isset_bit_vector = new BitSet(1);
121
  private BitSet __isset_bit_vector = new BitSet(2);
116
 
122
 
117
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
118
  static {
124
  static {
119
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
125
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
120
    tmpMap.put(_Fields.SELLER_ID, new org.apache.thrift.meta_data.FieldMetaData("sellerId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
126
    tmpMap.put(_Fields.SELLER_ID, new org.apache.thrift.meta_data.FieldMetaData("sellerId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 127... Line 133...
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)));
128
    tmpMap.put(_Fields.CIN_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("cinNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
134
    tmpMap.put(_Fields.CIN_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("cinNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
129
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
135
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
130
    tmpMap.put(_Fields.TIN, new org.apache.thrift.meta_data.FieldMetaData("tin", org.apache.thrift.TFieldRequirementType.DEFAULT, 
136
    tmpMap.put(_Fields.TIN, new org.apache.thrift.meta_data.FieldMetaData("tin", org.apache.thrift.TFieldRequirementType.DEFAULT, 
131
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
137
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
138
    tmpMap.put(_Fields.STATE_ID, new org.apache.thrift.meta_data.FieldMetaData("stateId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
139
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
132
    metaDataMap = Collections.unmodifiableMap(tmpMap);
140
    metaDataMap = Collections.unmodifiableMap(tmpMap);
133
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SellerInfo.class, metaDataMap);
141
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SellerInfo.class, metaDataMap);
134
  }
142
  }
135
 
143
 
136
  public SellerInfo() {
144
  public SellerInfo() {
Line 140... Line 148...
140
    long sellerId,
148
    long sellerId,
141
    String organisationName,
149
    String organisationName,
142
    String registeredAddress,
150
    String registeredAddress,
143
    String regId,
151
    String regId,
144
    String cinNumber,
152
    String cinNumber,
145
    String tin)
153
    String tin,
-
 
154
    long stateId)
146
  {
155
  {
147
    this();
156
    this();
148
    this.sellerId = sellerId;
157
    this.sellerId = sellerId;
149
    setSellerIdIsSet(true);
158
    setSellerIdIsSet(true);
150
    this.organisationName = organisationName;
159
    this.organisationName = organisationName;
151
    this.registeredAddress = registeredAddress;
160
    this.registeredAddress = registeredAddress;
152
    this.regId = regId;
161
    this.regId = regId;
153
    this.cinNumber = cinNumber;
162
    this.cinNumber = cinNumber;
154
    this.tin = tin;
163
    this.tin = tin;
-
 
164
    this.stateId = stateId;
-
 
165
    setStateIdIsSet(true);
155
  }
166
  }
156
 
167
 
157
  /**
168
  /**
158
   * Performs a deep copy on <i>other</i>.
169
   * Performs a deep copy on <i>other</i>.
159
   */
170
   */
Line 174... Line 185...
174
      this.cinNumber = other.cinNumber;
185
      this.cinNumber = other.cinNumber;
175
    }
186
    }
176
    if (other.isSetTin()) {
187
    if (other.isSetTin()) {
177
      this.tin = other.tin;
188
      this.tin = other.tin;
178
    }
189
    }
-
 
190
    this.stateId = other.stateId;
179
  }
191
  }
180
 
192
 
181
  public SellerInfo deepCopy() {
193
  public SellerInfo deepCopy() {
182
    return new SellerInfo(this);
194
    return new SellerInfo(this);
183
  }
195
  }
Line 189... Line 201...
189
    this.organisationName = null;
201
    this.organisationName = null;
190
    this.registeredAddress = null;
202
    this.registeredAddress = null;
191
    this.regId = null;
203
    this.regId = null;
192
    this.cinNumber = null;
204
    this.cinNumber = null;
193
    this.tin = null;
205
    this.tin = null;
-
 
206
    setStateIdIsSet(false);
-
 
207
    this.stateId = 0;
194
  }
208
  }
195
 
209
 
196
  public long getSellerId() {
210
  public long getSellerId() {
197
    return this.sellerId;
211
    return this.sellerId;
198
  }
212
  }
Line 328... Line 342...
328
    if (!value) {
342
    if (!value) {
329
      this.tin = null;
343
      this.tin = null;
330
    }
344
    }
331
  }
345
  }
332
 
346
 
-
 
347
  public long getStateId() {
-
 
348
    return this.stateId;
-
 
349
  }
-
 
350
 
-
 
351
  public void setStateId(long stateId) {
-
 
352
    this.stateId = stateId;
-
 
353
    setStateIdIsSet(true);
-
 
354
  }
-
 
355
 
-
 
356
  public void unsetStateId() {
-
 
357
    __isset_bit_vector.clear(__STATEID_ISSET_ID);
-
 
358
  }
-
 
359
 
-
 
360
  /** Returns true if field stateId is set (has been assigned a value) and false otherwise */
-
 
361
  public boolean isSetStateId() {
-
 
362
    return __isset_bit_vector.get(__STATEID_ISSET_ID);
-
 
363
  }
-
 
364
 
-
 
365
  public void setStateIdIsSet(boolean value) {
-
 
366
    __isset_bit_vector.set(__STATEID_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 SELLER_ID:
371
    case SELLER_ID:
336
      if (value == null) {
372
      if (value == null) {
337
        unsetSellerId();
373
        unsetSellerId();
Line 378... Line 414...
378
      } else {
414
      } else {
379
        setTin((String)value);
415
        setTin((String)value);
380
      }
416
      }
381
      break;
417
      break;
382
 
418
 
-
 
419
    case STATE_ID:
-
 
420
      if (value == null) {
-
 
421
        unsetStateId();
-
 
422
      } else {
-
 
423
        setStateId((Long)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 getCinNumber();
445
      return getCinNumber();
402
 
446
 
403
    case TIN:
447
    case TIN:
404
      return getTin();
448
      return getTin();
405
 
449
 
-
 
450
    case STATE_ID:
-
 
451
      return Long.valueOf(getStateId());
-
 
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 isSetRegId();
471
      return isSetRegId();
425
    case CIN_NUMBER:
472
    case CIN_NUMBER:
426
      return isSetCinNumber();
473
      return isSetCinNumber();
427
    case TIN:
474
    case TIN:
428
      return isSetTin();
475
      return isSetTin();
-
 
476
    case STATE_ID:
-
 
477
      return isSetStateId();
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.tin.equals(that.tin))
545
      if (!this.tin.equals(that.tin))
497
        return false;
546
        return false;
498
    }
547
    }
499
 
548
 
-
 
549
    boolean this_present_stateId = true;
-
 
550
    boolean that_present_stateId = true;
-
 
551
    if (this_present_stateId || that_present_stateId) {
-
 
552
      if (!(this_present_stateId && that_present_stateId))
-
 
553
        return false;
-
 
554
      if (this.stateId != that.stateId)
-
 
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.tin, typedOther.tin);
629
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tin, typedOther.tin);
572
      if (lastComparison != 0) {
630
      if (lastComparison != 0) {
573
        return lastComparison;
631
        return lastComparison;
574
      }
632
      }
575
    }
633
    }
-
 
634
    lastComparison = Boolean.valueOf(isSetStateId()).compareTo(typedOther.isSetStateId());
-
 
635
    if (lastComparison != 0) {
-
 
636
      return lastComparison;
-
 
637
    }
-
 
638
    if (isSetStateId()) {
-
 
639
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stateId, typedOther.stateId);
-
 
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 631... Line 699...
631
            this.tin = iprot.readString();
699
            this.tin = iprot.readString();
632
          } else { 
700
          } else { 
633
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
701
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
634
          }
702
          }
635
          break;
703
          break;
-
 
704
        case 7: // STATE_ID
-
 
705
          if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
706
            this.stateId = iprot.readI64();
-
 
707
            setStateIdIsSet(true);
-
 
708
          } else { 
-
 
709
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
710
          }
-
 
711
          break;
636
        default:
712
        default:
637
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
713
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
638
      }
714
      }
639
      iprot.readFieldEnd();
715
      iprot.readFieldEnd();
640
    }
716
    }
Line 672... Line 748...
672
    if (this.tin != null) {
748
    if (this.tin != null) {
673
      oprot.writeFieldBegin(TIN_FIELD_DESC);
749
      oprot.writeFieldBegin(TIN_FIELD_DESC);
674
      oprot.writeString(this.tin);
750
      oprot.writeString(this.tin);
675
      oprot.writeFieldEnd();
751
      oprot.writeFieldEnd();
676
    }
752
    }
-
 
753
    oprot.writeFieldBegin(STATE_ID_FIELD_DESC);
-
 
754
    oprot.writeI64(this.stateId);
-
 
755
    oprot.writeFieldEnd();
677
    oprot.writeFieldStop();
756
    oprot.writeFieldStop();
678
    oprot.writeStructEnd();
757
    oprot.writeStructEnd();
679
  }
758
  }
680
 
759
 
681
  @Override
760
  @Override
Line 724... Line 803...
724
      sb.append("null");
803
      sb.append("null");
725
    } else {
804
    } else {
726
      sb.append(this.tin);
805
      sb.append(this.tin);
727
    }
806
    }
728
    first = false;
807
    first = false;
-
 
808
    if (!first) sb.append(", ");
-
 
809
    sb.append("stateId:");
-
 
810
    sb.append(this.stateId);
-
 
811
    first = false;
729
    sb.append(")");
812
    sb.append(")");
730
    return sb.toString();
813
    return sb.toString();
731
  }
814
  }
732
 
815
 
733
  public void validate() throws org.apache.thrift.TException {
816
  public void validate() throws org.apache.thrift.TException {