Subversion Repositories SmartDukaan

Rev

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

Rev 14072 Rev 21844
Line 38... Line 38...
38
  private static final org.apache.thrift.protocol.TField CONTACT_EMAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("contactEmail", org.apache.thrift.protocol.TType.STRING, (short)13);
38
  private static final org.apache.thrift.protocol.TField CONTACT_EMAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("contactEmail", org.apache.thrift.protocol.TType.STRING, (short)13);
39
  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)14);
39
  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)14);
40
  private static final org.apache.thrift.protocol.TField COMMUNICATION_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("communicationAddress", org.apache.thrift.protocol.TType.STRING, (short)15);
40
  private static final org.apache.thrift.protocol.TField COMMUNICATION_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("communicationAddress", org.apache.thrift.protocol.TType.STRING, (short)15);
41
  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)16);
41
  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)16);
42
  private static final org.apache.thrift.protocol.TField PO_VALIDITY_LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("poValidityLimit", org.apache.thrift.protocol.TType.I64, (short)17);
42
  private static final org.apache.thrift.protocol.TField PO_VALIDITY_LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("poValidityLimit", org.apache.thrift.protocol.TType.I64, (short)17);
-
 
43
  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)18);
43
 
44
 
44
  private long id; // required
45
  private long id; // required
45
  private String name; // required
46
  private String name; // required
46
  private String phone; // required
47
  private String phone; // required
47
  private String fax; // required
48
  private String fax; // required
Line 56... Line 57...
56
  private String contactEmail; // required
57
  private String contactEmail; // required
57
  private String registeredAddress; // required
58
  private String registeredAddress; // required
58
  private String communicationAddress; // required
59
  private String communicationAddress; // required
59
  private long stateId; // required
60
  private long stateId; // required
60
  private long poValidityLimit; // required
61
  private long poValidityLimit; // required
-
 
62
  private String gstin; // required
61
 
63
 
62
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
64
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
63
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
65
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
64
    ID((short)1, "id"),
66
    ID((short)1, "id"),
65
    NAME((short)2, "name"),
67
    NAME((short)2, "name"),
Line 75... Line 77...
75
    CONTACT_FAX((short)12, "contactFax"),
77
    CONTACT_FAX((short)12, "contactFax"),
76
    CONTACT_EMAIL((short)13, "contactEmail"),
78
    CONTACT_EMAIL((short)13, "contactEmail"),
77
    REGISTERED_ADDRESS((short)14, "registeredAddress"),
79
    REGISTERED_ADDRESS((short)14, "registeredAddress"),
78
    COMMUNICATION_ADDRESS((short)15, "communicationAddress"),
80
    COMMUNICATION_ADDRESS((short)15, "communicationAddress"),
79
    STATE_ID((short)16, "stateId"),
81
    STATE_ID((short)16, "stateId"),
80
    PO_VALIDITY_LIMIT((short)17, "poValidityLimit");
82
    PO_VALIDITY_LIMIT((short)17, "poValidityLimit"),
-
 
83
    GSTIN((short)18, "gstin");
81
 
84
 
82
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
85
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
83
 
86
 
84
    static {
87
    static {
85
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
88
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 124... Line 127...
124
          return COMMUNICATION_ADDRESS;
127
          return COMMUNICATION_ADDRESS;
125
        case 16: // STATE_ID
128
        case 16: // STATE_ID
126
          return STATE_ID;
129
          return STATE_ID;
127
        case 17: // PO_VALIDITY_LIMIT
130
        case 17: // PO_VALIDITY_LIMIT
128
          return PO_VALIDITY_LIMIT;
131
          return PO_VALIDITY_LIMIT;
-
 
132
        case 18: // GSTIN
-
 
133
          return GSTIN;
129
        default:
134
        default:
130
          return null;
135
          return null;
131
      }
136
      }
132
    }
137
    }
133
 
138
 
Line 206... Line 211...
206
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
211
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
207
    tmpMap.put(_Fields.STATE_ID, new org.apache.thrift.meta_data.FieldMetaData("stateId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
212
    tmpMap.put(_Fields.STATE_ID, new org.apache.thrift.meta_data.FieldMetaData("stateId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
208
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
213
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
209
    tmpMap.put(_Fields.PO_VALIDITY_LIMIT, new org.apache.thrift.meta_data.FieldMetaData("poValidityLimit", org.apache.thrift.TFieldRequirementType.DEFAULT, 
214
    tmpMap.put(_Fields.PO_VALIDITY_LIMIT, new org.apache.thrift.meta_data.FieldMetaData("poValidityLimit", org.apache.thrift.TFieldRequirementType.DEFAULT, 
210
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
215
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
216
    tmpMap.put(_Fields.GSTIN, new org.apache.thrift.meta_data.FieldMetaData("gstin", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
217
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
211
    metaDataMap = Collections.unmodifiableMap(tmpMap);
218
    metaDataMap = Collections.unmodifiableMap(tmpMap);
212
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Supplier.class, metaDataMap);
219
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Supplier.class, metaDataMap);
213
  }
220
  }
214
 
221
 
215
  public Supplier() {
222
  public Supplier() {
Line 230... Line 237...
230
    String contactFax,
237
    String contactFax,
231
    String contactEmail,
238
    String contactEmail,
232
    String registeredAddress,
239
    String registeredAddress,
233
    String communicationAddress,
240
    String communicationAddress,
234
    long stateId,
241
    long stateId,
235
    long poValidityLimit)
242
    long poValidityLimit,
-
 
243
    String gstin)
236
  {
244
  {
237
    this();
245
    this();
238
    this.id = id;
246
    this.id = id;
239
    setIdIsSet(true);
247
    setIdIsSet(true);
240
    this.name = name;
248
    this.name = name;
Line 253... Line 261...
253
    this.communicationAddress = communicationAddress;
261
    this.communicationAddress = communicationAddress;
254
    this.stateId = stateId;
262
    this.stateId = stateId;
255
    setStateIdIsSet(true);
263
    setStateIdIsSet(true);
256
    this.poValidityLimit = poValidityLimit;
264
    this.poValidityLimit = poValidityLimit;
257
    setPoValidityLimitIsSet(true);
265
    setPoValidityLimitIsSet(true);
-
 
266
    this.gstin = gstin;
258
  }
267
  }
259
 
268
 
260
  /**
269
  /**
261
   * Performs a deep copy on <i>other</i>.
270
   * Performs a deep copy on <i>other</i>.
262
   */
271
   */
Line 306... Line 315...
306
    if (other.isSetCommunicationAddress()) {
315
    if (other.isSetCommunicationAddress()) {
307
      this.communicationAddress = other.communicationAddress;
316
      this.communicationAddress = other.communicationAddress;
308
    }
317
    }
309
    this.stateId = other.stateId;
318
    this.stateId = other.stateId;
310
    this.poValidityLimit = other.poValidityLimit;
319
    this.poValidityLimit = other.poValidityLimit;
-
 
320
    if (other.isSetGstin()) {
-
 
321
      this.gstin = other.gstin;
-
 
322
    }
311
  }
323
  }
312
 
324
 
313
  public Supplier deepCopy() {
325
  public Supplier deepCopy() {
314
    return new Supplier(this);
326
    return new Supplier(this);
315
  }
327
  }
Line 334... Line 346...
334
    this.communicationAddress = null;
346
    this.communicationAddress = null;
335
    setStateIdIsSet(false);
347
    setStateIdIsSet(false);
336
    this.stateId = 0;
348
    this.stateId = 0;
337
    setPoValidityLimitIsSet(false);
349
    setPoValidityLimitIsSet(false);
338
    this.poValidityLimit = 0;
350
    this.poValidityLimit = 0;
-
 
351
    this.gstin = null;
339
  }
352
  }
340
 
353
 
341
  public long getId() {
354
  public long getId() {
342
    return this.id;
355
    return this.id;
343
  }
356
  }
Line 724... Line 737...
724
 
737
 
725
  public void setPoValidityLimitIsSet(boolean value) {
738
  public void setPoValidityLimitIsSet(boolean value) {
726
    __isset_bit_vector.set(__POVALIDITYLIMIT_ISSET_ID, value);
739
    __isset_bit_vector.set(__POVALIDITYLIMIT_ISSET_ID, value);
727
  }
740
  }
728
 
741
 
-
 
742
  public String getGstin() {
-
 
743
    return this.gstin;
-
 
744
  }
-
 
745
 
-
 
746
  public void setGstin(String gstin) {
-
 
747
    this.gstin = gstin;
-
 
748
  }
-
 
749
 
-
 
750
  public void unsetGstin() {
-
 
751
    this.gstin = null;
-
 
752
  }
-
 
753
 
-
 
754
  /** Returns true if field gstin is set (has been assigned a value) and false otherwise */
-
 
755
  public boolean isSetGstin() {
-
 
756
    return this.gstin != null;
-
 
757
  }
-
 
758
 
-
 
759
  public void setGstinIsSet(boolean value) {
-
 
760
    if (!value) {
-
 
761
      this.gstin = null;
-
 
762
    }
-
 
763
  }
-
 
764
 
729
  public void setFieldValue(_Fields field, Object value) {
765
  public void setFieldValue(_Fields field, Object value) {
730
    switch (field) {
766
    switch (field) {
731
    case ID:
767
    case ID:
732
      if (value == null) {
768
      if (value == null) {
733
        unsetId();
769
        unsetId();
Line 862... Line 898...
862
      } else {
898
      } else {
863
        setPoValidityLimit((Long)value);
899
        setPoValidityLimit((Long)value);
864
      }
900
      }
865
      break;
901
      break;
866
 
902
 
-
 
903
    case GSTIN:
-
 
904
      if (value == null) {
-
 
905
        unsetGstin();
-
 
906
      } else {
-
 
907
        setGstin((String)value);
-
 
908
      }
-
 
909
      break;
-
 
910
 
867
    }
911
    }
868
  }
912
  }
869
 
913
 
870
  public Object getFieldValue(_Fields field) {
914
  public Object getFieldValue(_Fields field) {
871
    switch (field) {
915
    switch (field) {
Line 918... Line 962...
918
      return Long.valueOf(getStateId());
962
      return Long.valueOf(getStateId());
919
 
963
 
920
    case PO_VALIDITY_LIMIT:
964
    case PO_VALIDITY_LIMIT:
921
      return Long.valueOf(getPoValidityLimit());
965
      return Long.valueOf(getPoValidityLimit());
922
 
966
 
-
 
967
    case GSTIN:
-
 
968
      return getGstin();
-
 
969
 
923
    }
970
    }
924
    throw new IllegalStateException();
971
    throw new IllegalStateException();
925
  }
972
  }
926
 
973
 
927
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
974
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 963... Line 1010...
963
      return isSetCommunicationAddress();
1010
      return isSetCommunicationAddress();
964
    case STATE_ID:
1011
    case STATE_ID:
965
      return isSetStateId();
1012
      return isSetStateId();
966
    case PO_VALIDITY_LIMIT:
1013
    case PO_VALIDITY_LIMIT:
967
      return isSetPoValidityLimit();
1014
      return isSetPoValidityLimit();
-
 
1015
    case GSTIN:
-
 
1016
      return isSetGstin();
968
    }
1017
    }
969
    throw new IllegalStateException();
1018
    throw new IllegalStateException();
970
  }
1019
  }
971
 
1020
 
972
  @Override
1021
  @Override
Line 1133... Line 1182...
1133
        return false;
1182
        return false;
1134
      if (this.poValidityLimit != that.poValidityLimit)
1183
      if (this.poValidityLimit != that.poValidityLimit)
1135
        return false;
1184
        return false;
1136
    }
1185
    }
1137
 
1186
 
-
 
1187
    boolean this_present_gstin = true && this.isSetGstin();
-
 
1188
    boolean that_present_gstin = true && that.isSetGstin();
-
 
1189
    if (this_present_gstin || that_present_gstin) {
-
 
1190
      if (!(this_present_gstin && that_present_gstin))
-
 
1191
        return false;
-
 
1192
      if (!this.gstin.equals(that.gstin))
-
 
1193
        return false;
-
 
1194
    }
-
 
1195
 
1138
    return true;
1196
    return true;
1139
  }
1197
  }
1140
 
1198
 
1141
  @Override
1199
  @Override
1142
  public int hashCode() {
1200
  public int hashCode() {
Line 1319... Line 1377...
1319
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.poValidityLimit, typedOther.poValidityLimit);
1377
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.poValidityLimit, typedOther.poValidityLimit);
1320
      if (lastComparison != 0) {
1378
      if (lastComparison != 0) {
1321
        return lastComparison;
1379
        return lastComparison;
1322
      }
1380
      }
1323
    }
1381
    }
-
 
1382
    lastComparison = Boolean.valueOf(isSetGstin()).compareTo(typedOther.isSetGstin());
-
 
1383
    if (lastComparison != 0) {
-
 
1384
      return lastComparison;
-
 
1385
    }
-
 
1386
    if (isSetGstin()) {
-
 
1387
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gstin, typedOther.gstin);
-
 
1388
      if (lastComparison != 0) {
-
 
1389
        return lastComparison;
-
 
1390
      }
-
 
1391
    }
1324
    return 0;
1392
    return 0;
1325
  }
1393
  }
1326
 
1394
 
1327
  public _Fields fieldForId(int fieldId) {
1395
  public _Fields fieldForId(int fieldId) {
1328
    return _Fields.findByThriftId(fieldId);
1396
    return _Fields.findByThriftId(fieldId);
Line 1458... Line 1526...
1458
            setPoValidityLimitIsSet(true);
1526
            setPoValidityLimitIsSet(true);
1459
          } else { 
1527
          } else { 
1460
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1528
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1461
          }
1529
          }
1462
          break;
1530
          break;
-
 
1531
        case 18: // GSTIN
-
 
1532
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
1533
            this.gstin = iprot.readString();
-
 
1534
          } else { 
-
 
1535
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1536
          }
-
 
1537
          break;
1463
        default:
1538
        default:
1464
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1539
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1465
      }
1540
      }
1466
      iprot.readFieldEnd();
1541
      iprot.readFieldEnd();
1467
    }
1542
    }
Line 1550... Line 1625...
1550
    oprot.writeI64(this.stateId);
1625
    oprot.writeI64(this.stateId);
1551
    oprot.writeFieldEnd();
1626
    oprot.writeFieldEnd();
1552
    oprot.writeFieldBegin(PO_VALIDITY_LIMIT_FIELD_DESC);
1627
    oprot.writeFieldBegin(PO_VALIDITY_LIMIT_FIELD_DESC);
1553
    oprot.writeI64(this.poValidityLimit);
1628
    oprot.writeI64(this.poValidityLimit);
1554
    oprot.writeFieldEnd();
1629
    oprot.writeFieldEnd();
-
 
1630
    if (this.gstin != null) {
-
 
1631
      oprot.writeFieldBegin(GSTIN_FIELD_DESC);
-
 
1632
      oprot.writeString(this.gstin);
-
 
1633
      oprot.writeFieldEnd();
-
 
1634
    }
1555
    oprot.writeFieldStop();
1635
    oprot.writeFieldStop();
1556
    oprot.writeStructEnd();
1636
    oprot.writeStructEnd();
1557
  }
1637
  }
1558
 
1638
 
1559
  @Override
1639
  @Override
Line 1682... Line 1762...
1682
    first = false;
1762
    first = false;
1683
    if (!first) sb.append(", ");
1763
    if (!first) sb.append(", ");
1684
    sb.append("poValidityLimit:");
1764
    sb.append("poValidityLimit:");
1685
    sb.append(this.poValidityLimit);
1765
    sb.append(this.poValidityLimit);
1686
    first = false;
1766
    first = false;
-
 
1767
    if (!first) sb.append(", ");
-
 
1768
    sb.append("gstin:");
-
 
1769
    if (this.gstin == null) {
-
 
1770
      sb.append("null");
-
 
1771
    } else {
-
 
1772
      sb.append(this.gstin);
-
 
1773
    }
-
 
1774
    first = false;
1687
    sb.append(")");
1775
    sb.append(")");
1688
    return sb.toString();
1776
    return sb.toString();
1689
  }
1777
  }
1690
 
1778
 
1691
  public void validate() throws org.apache.thrift.TException {
1779
  public void validate() throws org.apache.thrift.TException {