Subversion Repositories SmartDukaan

Rev

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

Rev 20065 Rev 21844
Line 30... Line 30...
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 ADDRESS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("addressId", org.apache.thrift.protocol.TType.I64, (short)7);
32
  private static final org.apache.thrift.protocol.TField ADDRESS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("addressId", org.apache.thrift.protocol.TType.I64, (short)7);
33
  private static final org.apache.thrift.protocol.TField BUYER_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("buyerAddress", org.apache.thrift.protocol.TType.STRUCT, (short)8);
33
  private static final org.apache.thrift.protocol.TField BUYER_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("buyerAddress", org.apache.thrift.protocol.TType.STRUCT, (short)8);
34
  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)9);
34
  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)9);
-
 
35
  private static final org.apache.thrift.protocol.TField GSTIN_FIELD_DESC = new org.apache.thrift.protocol.TField("gstin", org.apache.thrift.protocol.TType.STRING, (short)10);
35
 
36
 
36
  private long buyerId; // required
37
  private long buyerId; // required
37
  private String organisationName; // required
38
  private String organisationName; // required
38
  private String registeredAddress; // required
39
  private String registeredAddress; // required
39
  private String regId; // required
40
  private String regId; // required
40
  private String cinNumber; // required
41
  private String cinNumber; // required
41
  private String tin; // required
42
  private String tin; // required
42
  private long addressId; // required
43
  private long addressId; // required
43
  private WarehouseAddress buyerAddress; // required
44
  private WarehouseAddress buyerAddress; // required
44
  private long stateId; // required
45
  private long stateId; // required
-
 
46
  private String gstin; // required
45
 
47
 
46
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
48
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
47
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
49
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
48
    BUYER_ID((short)1, "buyerId"),
50
    BUYER_ID((short)1, "buyerId"),
49
    ORGANISATION_NAME((short)2, "organisationName"),
51
    ORGANISATION_NAME((short)2, "organisationName"),
Line 51... Line 53...
51
    REG_ID((short)4, "regId"),
53
    REG_ID((short)4, "regId"),
52
    CIN_NUMBER((short)5, "cinNumber"),
54
    CIN_NUMBER((short)5, "cinNumber"),
53
    TIN((short)6, "tin"),
55
    TIN((short)6, "tin"),
54
    ADDRESS_ID((short)7, "addressId"),
56
    ADDRESS_ID((short)7, "addressId"),
55
    BUYER_ADDRESS((short)8, "buyerAddress"),
57
    BUYER_ADDRESS((short)8, "buyerAddress"),
56
    STATE_ID((short)9, "stateId");
58
    STATE_ID((short)9, "stateId"),
-
 
59
    GSTIN((short)10, "gstin");
57
 
60
 
58
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
61
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
59
 
62
 
60
    static {
63
    static {
61
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
64
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 84... Line 87...
84
          return ADDRESS_ID;
87
          return ADDRESS_ID;
85
        case 8: // BUYER_ADDRESS
88
        case 8: // BUYER_ADDRESS
86
          return BUYER_ADDRESS;
89
          return BUYER_ADDRESS;
87
        case 9: // STATE_ID
90
        case 9: // STATE_ID
88
          return STATE_ID;
91
          return STATE_ID;
-
 
92
        case 10: // GSTIN
-
 
93
          return GSTIN;
89
        default:
94
        default:
90
          return null;
95
          return null;
91
      }
96
      }
92
    }
97
    }
93
 
98
 
Line 150... Line 155...
150
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
155
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
151
    tmpMap.put(_Fields.BUYER_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("buyerAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, 
156
    tmpMap.put(_Fields.BUYER_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("buyerAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, 
152
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WarehouseAddress.class)));
157
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WarehouseAddress.class)));
153
    tmpMap.put(_Fields.STATE_ID, new org.apache.thrift.meta_data.FieldMetaData("stateId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
158
    tmpMap.put(_Fields.STATE_ID, new org.apache.thrift.meta_data.FieldMetaData("stateId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
154
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
159
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
160
    tmpMap.put(_Fields.GSTIN, new org.apache.thrift.meta_data.FieldMetaData("gstin", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
161
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
155
    metaDataMap = Collections.unmodifiableMap(tmpMap);
162
    metaDataMap = Collections.unmodifiableMap(tmpMap);
156
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BuyerInfo.class, metaDataMap);
163
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BuyerInfo.class, metaDataMap);
157
  }
164
  }
158
 
165
 
159
  public BuyerInfo() {
166
  public BuyerInfo() {
Line 166... Line 173...
166
    String regId,
173
    String regId,
167
    String cinNumber,
174
    String cinNumber,
168
    String tin,
175
    String tin,
169
    long addressId,
176
    long addressId,
170
    WarehouseAddress buyerAddress,
177
    WarehouseAddress buyerAddress,
171
    long stateId)
178
    long stateId,
-
 
179
    String gstin)
172
  {
180
  {
173
    this();
181
    this();
174
    this.buyerId = buyerId;
182
    this.buyerId = buyerId;
175
    setBuyerIdIsSet(true);
183
    setBuyerIdIsSet(true);
176
    this.organisationName = organisationName;
184
    this.organisationName = organisationName;
Line 181... Line 189...
181
    this.addressId = addressId;
189
    this.addressId = addressId;
182
    setAddressIdIsSet(true);
190
    setAddressIdIsSet(true);
183
    this.buyerAddress = buyerAddress;
191
    this.buyerAddress = buyerAddress;
184
    this.stateId = stateId;
192
    this.stateId = stateId;
185
    setStateIdIsSet(true);
193
    setStateIdIsSet(true);
-
 
194
    this.gstin = gstin;
186
  }
195
  }
187
 
196
 
188
  /**
197
  /**
189
   * Performs a deep copy on <i>other</i>.
198
   * Performs a deep copy on <i>other</i>.
190
   */
199
   */
Line 210... Line 219...
210
    this.addressId = other.addressId;
219
    this.addressId = other.addressId;
211
    if (other.isSetBuyerAddress()) {
220
    if (other.isSetBuyerAddress()) {
212
      this.buyerAddress = new WarehouseAddress(other.buyerAddress);
221
      this.buyerAddress = new WarehouseAddress(other.buyerAddress);
213
    }
222
    }
214
    this.stateId = other.stateId;
223
    this.stateId = other.stateId;
-
 
224
    if (other.isSetGstin()) {
-
 
225
      this.gstin = other.gstin;
-
 
226
    }
215
  }
227
  }
216
 
228
 
217
  public BuyerInfo deepCopy() {
229
  public BuyerInfo deepCopy() {
218
    return new BuyerInfo(this);
230
    return new BuyerInfo(this);
219
  }
231
  }
Line 230... Line 242...
230
    setAddressIdIsSet(false);
242
    setAddressIdIsSet(false);
231
    this.addressId = 0;
243
    this.addressId = 0;
232
    this.buyerAddress = null;
244
    this.buyerAddress = null;
233
    setStateIdIsSet(false);
245
    setStateIdIsSet(false);
234
    this.stateId = 0;
246
    this.stateId = 0;
-
 
247
    this.gstin = null;
235
  }
248
  }
236
 
249
 
237
  public long getBuyerId() {
250
  public long getBuyerId() {
238
    return this.buyerId;
251
    return this.buyerId;
239
  }
252
  }
Line 436... Line 449...
436
 
449
 
437
  public void setStateIdIsSet(boolean value) {
450
  public void setStateIdIsSet(boolean value) {
438
    __isset_bit_vector.set(__STATEID_ISSET_ID, value);
451
    __isset_bit_vector.set(__STATEID_ISSET_ID, value);
439
  }
452
  }
440
 
453
 
-
 
454
  public String getGstin() {
-
 
455
    return this.gstin;
-
 
456
  }
-
 
457
 
-
 
458
  public void setGstin(String gstin) {
-
 
459
    this.gstin = gstin;
-
 
460
  }
-
 
461
 
-
 
462
  public void unsetGstin() {
-
 
463
    this.gstin = null;
-
 
464
  }
-
 
465
 
-
 
466
  /** Returns true if field gstin is set (has been assigned a value) and false otherwise */
-
 
467
  public boolean isSetGstin() {
-
 
468
    return this.gstin != null;
-
 
469
  }
-
 
470
 
-
 
471
  public void setGstinIsSet(boolean value) {
-
 
472
    if (!value) {
-
 
473
      this.gstin = null;
-
 
474
    }
-
 
475
  }
-
 
476
 
441
  public void setFieldValue(_Fields field, Object value) {
477
  public void setFieldValue(_Fields field, Object value) {
442
    switch (field) {
478
    switch (field) {
443
    case BUYER_ID:
479
    case BUYER_ID:
444
      if (value == null) {
480
      if (value == null) {
445
        unsetBuyerId();
481
        unsetBuyerId();
Line 510... Line 546...
510
      } else {
546
      } else {
511
        setStateId((Long)value);
547
        setStateId((Long)value);
512
      }
548
      }
513
      break;
549
      break;
514
 
550
 
-
 
551
    case GSTIN:
-
 
552
      if (value == null) {
-
 
553
        unsetGstin();
-
 
554
      } else {
-
 
555
        setGstin((String)value);
-
 
556
      }
-
 
557
      break;
-
 
558
 
515
    }
559
    }
516
  }
560
  }
517
 
561
 
518
  public Object getFieldValue(_Fields field) {
562
  public Object getFieldValue(_Fields field) {
519
    switch (field) {
563
    switch (field) {
Line 542... Line 586...
542
      return getBuyerAddress();
586
      return getBuyerAddress();
543
 
587
 
544
    case STATE_ID:
588
    case STATE_ID:
545
      return Long.valueOf(getStateId());
589
      return Long.valueOf(getStateId());
546
 
590
 
-
 
591
    case GSTIN:
-
 
592
      return getGstin();
-
 
593
 
547
    }
594
    }
548
    throw new IllegalStateException();
595
    throw new IllegalStateException();
549
  }
596
  }
550
 
597
 
551
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
598
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 571... Line 618...
571
      return isSetAddressId();
618
      return isSetAddressId();
572
    case BUYER_ADDRESS:
619
    case BUYER_ADDRESS:
573
      return isSetBuyerAddress();
620
      return isSetBuyerAddress();
574
    case STATE_ID:
621
    case STATE_ID:
575
      return isSetStateId();
622
      return isSetStateId();
-
 
623
    case GSTIN:
-
 
624
      return isSetGstin();
576
    }
625
    }
577
    throw new IllegalStateException();
626
    throw new IllegalStateException();
578
  }
627
  }
579
 
628
 
580
  @Override
629
  @Override
Line 669... Line 718...
669
        return false;
718
        return false;
670
      if (this.stateId != that.stateId)
719
      if (this.stateId != that.stateId)
671
        return false;
720
        return false;
672
    }
721
    }
673
 
722
 
-
 
723
    boolean this_present_gstin = true && this.isSetGstin();
-
 
724
    boolean that_present_gstin = true && that.isSetGstin();
-
 
725
    if (this_present_gstin || that_present_gstin) {
-
 
726
      if (!(this_present_gstin && that_present_gstin))
-
 
727
        return false;
-
 
728
      if (!this.gstin.equals(that.gstin))
-
 
729
        return false;
-
 
730
    }
-
 
731
 
674
    return true;
732
    return true;
675
  }
733
  }
676
 
734
 
677
  @Override
735
  @Override
678
  public int hashCode() {
736
  public int hashCode() {
Line 775... Line 833...
775
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stateId, typedOther.stateId);
833
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stateId, typedOther.stateId);
776
      if (lastComparison != 0) {
834
      if (lastComparison != 0) {
777
        return lastComparison;
835
        return lastComparison;
778
      }
836
      }
779
    }
837
    }
-
 
838
    lastComparison = Boolean.valueOf(isSetGstin()).compareTo(typedOther.isSetGstin());
-
 
839
    if (lastComparison != 0) {
-
 
840
      return lastComparison;
-
 
841
    }
-
 
842
    if (isSetGstin()) {
-
 
843
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gstin, typedOther.gstin);
-
 
844
      if (lastComparison != 0) {
-
 
845
        return lastComparison;
-
 
846
      }
-
 
847
    }
780
    return 0;
848
    return 0;
781
  }
849
  }
782
 
850
 
783
  public _Fields fieldForId(int fieldId) {
851
  public _Fields fieldForId(int fieldId) {
784
    return _Fields.findByThriftId(fieldId);
852
    return _Fields.findByThriftId(fieldId);
Line 859... Line 927...
859
            setStateIdIsSet(true);
927
            setStateIdIsSet(true);
860
          } else { 
928
          } else { 
861
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
929
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
862
          }
930
          }
863
          break;
931
          break;
-
 
932
        case 10: // GSTIN
-
 
933
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
934
            this.gstin = iprot.readString();
-
 
935
          } else { 
-
 
936
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
937
          }
-
 
938
          break;
864
        default:
939
        default:
865
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
940
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
866
      }
941
      }
867
      iprot.readFieldEnd();
942
      iprot.readFieldEnd();
868
    }
943
    }
Line 911... Line 986...
911
      oprot.writeFieldEnd();
986
      oprot.writeFieldEnd();
912
    }
987
    }
913
    oprot.writeFieldBegin(STATE_ID_FIELD_DESC);
988
    oprot.writeFieldBegin(STATE_ID_FIELD_DESC);
914
    oprot.writeI64(this.stateId);
989
    oprot.writeI64(this.stateId);
915
    oprot.writeFieldEnd();
990
    oprot.writeFieldEnd();
-
 
991
    if (this.gstin != null) {
-
 
992
      oprot.writeFieldBegin(GSTIN_FIELD_DESC);
-
 
993
      oprot.writeString(this.gstin);
-
 
994
      oprot.writeFieldEnd();
-
 
995
    }
916
    oprot.writeFieldStop();
996
    oprot.writeFieldStop();
917
    oprot.writeStructEnd();
997
    oprot.writeStructEnd();
918
  }
998
  }
919
 
999
 
920
  @Override
1000
  @Override
Line 979... Line 1059...
979
    first = false;
1059
    first = false;
980
    if (!first) sb.append(", ");
1060
    if (!first) sb.append(", ");
981
    sb.append("stateId:");
1061
    sb.append("stateId:");
982
    sb.append(this.stateId);
1062
    sb.append(this.stateId);
983
    first = false;
1063
    first = false;
-
 
1064
    if (!first) sb.append(", ");
-
 
1065
    sb.append("gstin:");
-
 
1066
    if (this.gstin == null) {
-
 
1067
      sb.append("null");
-
 
1068
    } else {
-
 
1069
      sb.append(this.gstin);
-
 
1070
    }
-
 
1071
    first = false;
984
    sb.append(")");
1072
    sb.append(")");
985
    return sb.toString();
1073
    return sb.toString();
986
  }
1074
  }
987
 
1075
 
988
  public void validate() throws org.apache.thrift.TException {
1076
  public void validate() throws org.apache.thrift.TException {