Subversion Repositories SmartDukaan

Rev

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

Rev 21844 Rev 23081
Line 39... Line 39...
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
  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);
-
 
44
  private static final org.apache.thrift.protocol.TField TNC_FIELD_DESC = new org.apache.thrift.protocol.TField("tnc", org.apache.thrift.protocol.TType.STRING, (short)19);
44
 
45
 
45
  private long id; // required
46
  private long id; // required
46
  private String name; // required
47
  private String name; // required
47
  private String phone; // required
48
  private String phone; // required
48
  private String fax; // required
49
  private String fax; // required
Line 58... Line 59...
58
  private String registeredAddress; // required
59
  private String registeredAddress; // required
59
  private String communicationAddress; // required
60
  private String communicationAddress; // required
60
  private long stateId; // required
61
  private long stateId; // required
61
  private long poValidityLimit; // required
62
  private long poValidityLimit; // required
62
  private String gstin; // required
63
  private String gstin; // required
-
 
64
  private String tnc; // required
63
 
65
 
64
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
66
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
65
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
67
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
66
    ID((short)1, "id"),
68
    ID((short)1, "id"),
67
    NAME((short)2, "name"),
69
    NAME((short)2, "name"),
Line 78... Line 80...
78
    CONTACT_EMAIL((short)13, "contactEmail"),
80
    CONTACT_EMAIL((short)13, "contactEmail"),
79
    REGISTERED_ADDRESS((short)14, "registeredAddress"),
81
    REGISTERED_ADDRESS((short)14, "registeredAddress"),
80
    COMMUNICATION_ADDRESS((short)15, "communicationAddress"),
82
    COMMUNICATION_ADDRESS((short)15, "communicationAddress"),
81
    STATE_ID((short)16, "stateId"),
83
    STATE_ID((short)16, "stateId"),
82
    PO_VALIDITY_LIMIT((short)17, "poValidityLimit"),
84
    PO_VALIDITY_LIMIT((short)17, "poValidityLimit"),
83
    GSTIN((short)18, "gstin");
85
    GSTIN((short)18, "gstin"),
-
 
86
    TNC((short)19, "tnc");
84
 
87
 
85
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
88
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
86
 
89
 
87
    static {
90
    static {
88
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
91
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 129... Line 132...
129
          return STATE_ID;
132
          return STATE_ID;
130
        case 17: // PO_VALIDITY_LIMIT
133
        case 17: // PO_VALIDITY_LIMIT
131
          return PO_VALIDITY_LIMIT;
134
          return PO_VALIDITY_LIMIT;
132
        case 18: // GSTIN
135
        case 18: // GSTIN
133
          return GSTIN;
136
          return GSTIN;
-
 
137
        case 19: // TNC
-
 
138
          return TNC;
134
        default:
139
        default:
135
          return null;
140
          return null;
136
      }
141
      }
137
    }
142
    }
138
 
143
 
Line 213... Line 218...
213
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
218
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
214
    tmpMap.put(_Fields.PO_VALIDITY_LIMIT, new org.apache.thrift.meta_data.FieldMetaData("poValidityLimit", org.apache.thrift.TFieldRequirementType.DEFAULT, 
219
    tmpMap.put(_Fields.PO_VALIDITY_LIMIT, new org.apache.thrift.meta_data.FieldMetaData("poValidityLimit", org.apache.thrift.TFieldRequirementType.DEFAULT, 
215
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
220
        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, 
221
    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)));
222
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
223
    tmpMap.put(_Fields.TNC, new org.apache.thrift.meta_data.FieldMetaData("tnc", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
224
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
218
    metaDataMap = Collections.unmodifiableMap(tmpMap);
225
    metaDataMap = Collections.unmodifiableMap(tmpMap);
219
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Supplier.class, metaDataMap);
226
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Supplier.class, metaDataMap);
220
  }
227
  }
221
 
228
 
222
  public Supplier() {
229
  public Supplier() {
Line 238... Line 245...
238
    String contactEmail,
245
    String contactEmail,
239
    String registeredAddress,
246
    String registeredAddress,
240
    String communicationAddress,
247
    String communicationAddress,
241
    long stateId,
248
    long stateId,
242
    long poValidityLimit,
249
    long poValidityLimit,
243
    String gstin)
250
    String gstin,
-
 
251
    String tnc)
244
  {
252
  {
245
    this();
253
    this();
246
    this.id = id;
254
    this.id = id;
247
    setIdIsSet(true);
255
    setIdIsSet(true);
248
    this.name = name;
256
    this.name = name;
Line 262... Line 270...
262
    this.stateId = stateId;
270
    this.stateId = stateId;
263
    setStateIdIsSet(true);
271
    setStateIdIsSet(true);
264
    this.poValidityLimit = poValidityLimit;
272
    this.poValidityLimit = poValidityLimit;
265
    setPoValidityLimitIsSet(true);
273
    setPoValidityLimitIsSet(true);
266
    this.gstin = gstin;
274
    this.gstin = gstin;
-
 
275
    this.tnc = tnc;
267
  }
276
  }
268
 
277
 
269
  /**
278
  /**
270
   * Performs a deep copy on <i>other</i>.
279
   * Performs a deep copy on <i>other</i>.
271
   */
280
   */
Line 318... Line 327...
318
    this.stateId = other.stateId;
327
    this.stateId = other.stateId;
319
    this.poValidityLimit = other.poValidityLimit;
328
    this.poValidityLimit = other.poValidityLimit;
320
    if (other.isSetGstin()) {
329
    if (other.isSetGstin()) {
321
      this.gstin = other.gstin;
330
      this.gstin = other.gstin;
322
    }
331
    }
-
 
332
    if (other.isSetTnc()) {
-
 
333
      this.tnc = other.tnc;
-
 
334
    }
323
  }
335
  }
324
 
336
 
325
  public Supplier deepCopy() {
337
  public Supplier deepCopy() {
326
    return new Supplier(this);
338
    return new Supplier(this);
327
  }
339
  }
Line 347... Line 359...
347
    setStateIdIsSet(false);
359
    setStateIdIsSet(false);
348
    this.stateId = 0;
360
    this.stateId = 0;
349
    setPoValidityLimitIsSet(false);
361
    setPoValidityLimitIsSet(false);
350
    this.poValidityLimit = 0;
362
    this.poValidityLimit = 0;
351
    this.gstin = null;
363
    this.gstin = null;
-
 
364
    this.tnc = null;
352
  }
365
  }
353
 
366
 
354
  public long getId() {
367
  public long getId() {
355
    return this.id;
368
    return this.id;
356
  }
369
  }
Line 760... Line 773...
760
    if (!value) {
773
    if (!value) {
761
      this.gstin = null;
774
      this.gstin = null;
762
    }
775
    }
763
  }
776
  }
764
 
777
 
-
 
778
  public String getTnc() {
-
 
779
    return this.tnc;
-
 
780
  }
-
 
781
 
-
 
782
  public void setTnc(String tnc) {
-
 
783
    this.tnc = tnc;
-
 
784
  }
-
 
785
 
-
 
786
  public void unsetTnc() {
-
 
787
    this.tnc = null;
-
 
788
  }
-
 
789
 
-
 
790
  /** Returns true if field tnc is set (has been assigned a value) and false otherwise */
-
 
791
  public boolean isSetTnc() {
-
 
792
    return this.tnc != null;
-
 
793
  }
-
 
794
 
-
 
795
  public void setTncIsSet(boolean value) {
-
 
796
    if (!value) {
-
 
797
      this.tnc = null;
-
 
798
    }
-
 
799
  }
-
 
800
 
765
  public void setFieldValue(_Fields field, Object value) {
801
  public void setFieldValue(_Fields field, Object value) {
766
    switch (field) {
802
    switch (field) {
767
    case ID:
803
    case ID:
768
      if (value == null) {
804
      if (value == null) {
769
        unsetId();
805
        unsetId();
Line 906... Line 942...
906
      } else {
942
      } else {
907
        setGstin((String)value);
943
        setGstin((String)value);
908
      }
944
      }
909
      break;
945
      break;
910
 
946
 
-
 
947
    case TNC:
-
 
948
      if (value == null) {
-
 
949
        unsetTnc();
-
 
950
      } else {
-
 
951
        setTnc((String)value);
-
 
952
      }
-
 
953
      break;
-
 
954
 
911
    }
955
    }
912
  }
956
  }
913
 
957
 
914
  public Object getFieldValue(_Fields field) {
958
  public Object getFieldValue(_Fields field) {
915
    switch (field) {
959
    switch (field) {
Line 965... Line 1009...
965
      return Long.valueOf(getPoValidityLimit());
1009
      return Long.valueOf(getPoValidityLimit());
966
 
1010
 
967
    case GSTIN:
1011
    case GSTIN:
968
      return getGstin();
1012
      return getGstin();
969
 
1013
 
-
 
1014
    case TNC:
-
 
1015
      return getTnc();
-
 
1016
 
970
    }
1017
    }
971
    throw new IllegalStateException();
1018
    throw new IllegalStateException();
972
  }
1019
  }
973
 
1020
 
974
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1021
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 1012... Line 1059...
1012
      return isSetStateId();
1059
      return isSetStateId();
1013
    case PO_VALIDITY_LIMIT:
1060
    case PO_VALIDITY_LIMIT:
1014
      return isSetPoValidityLimit();
1061
      return isSetPoValidityLimit();
1015
    case GSTIN:
1062
    case GSTIN:
1016
      return isSetGstin();
1063
      return isSetGstin();
-
 
1064
    case TNC:
-
 
1065
      return isSetTnc();
1017
    }
1066
    }
1018
    throw new IllegalStateException();
1067
    throw new IllegalStateException();
1019
  }
1068
  }
1020
 
1069
 
1021
  @Override
1070
  @Override
Line 1191... Line 1240...
1191
        return false;
1240
        return false;
1192
      if (!this.gstin.equals(that.gstin))
1241
      if (!this.gstin.equals(that.gstin))
1193
        return false;
1242
        return false;
1194
    }
1243
    }
1195
 
1244
 
-
 
1245
    boolean this_present_tnc = true && this.isSetTnc();
-
 
1246
    boolean that_present_tnc = true && that.isSetTnc();
-
 
1247
    if (this_present_tnc || that_present_tnc) {
-
 
1248
      if (!(this_present_tnc && that_present_tnc))
-
 
1249
        return false;
-
 
1250
      if (!this.tnc.equals(that.tnc))
-
 
1251
        return false;
-
 
1252
    }
-
 
1253
 
1196
    return true;
1254
    return true;
1197
  }
1255
  }
1198
 
1256
 
1199
  @Override
1257
  @Override
1200
  public int hashCode() {
1258
  public int hashCode() {
Line 1387... Line 1445...
1387
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gstin, typedOther.gstin);
1445
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gstin, typedOther.gstin);
1388
      if (lastComparison != 0) {
1446
      if (lastComparison != 0) {
1389
        return lastComparison;
1447
        return lastComparison;
1390
      }
1448
      }
1391
    }
1449
    }
-
 
1450
    lastComparison = Boolean.valueOf(isSetTnc()).compareTo(typedOther.isSetTnc());
-
 
1451
    if (lastComparison != 0) {
-
 
1452
      return lastComparison;
-
 
1453
    }
-
 
1454
    if (isSetTnc()) {
-
 
1455
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tnc, typedOther.tnc);
-
 
1456
      if (lastComparison != 0) {
-
 
1457
        return lastComparison;
-
 
1458
      }
-
 
1459
    }
1392
    return 0;
1460
    return 0;
1393
  }
1461
  }
1394
 
1462
 
1395
  public _Fields fieldForId(int fieldId) {
1463
  public _Fields fieldForId(int fieldId) {
1396
    return _Fields.findByThriftId(fieldId);
1464
    return _Fields.findByThriftId(fieldId);
Line 1533... Line 1601...
1533
            this.gstin = iprot.readString();
1601
            this.gstin = iprot.readString();
1534
          } else { 
1602
          } else { 
1535
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1603
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1536
          }
1604
          }
1537
          break;
1605
          break;
-
 
1606
        case 19: // TNC
-
 
1607
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
1608
            this.tnc = iprot.readString();
-
 
1609
          } else { 
-
 
1610
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1611
          }
-
 
1612
          break;
1538
        default:
1613
        default:
1539
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1614
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1540
      }
1615
      }
1541
      iprot.readFieldEnd();
1616
      iprot.readFieldEnd();
1542
    }
1617
    }
Line 1630... Line 1705...
1630
    if (this.gstin != null) {
1705
    if (this.gstin != null) {
1631
      oprot.writeFieldBegin(GSTIN_FIELD_DESC);
1706
      oprot.writeFieldBegin(GSTIN_FIELD_DESC);
1632
      oprot.writeString(this.gstin);
1707
      oprot.writeString(this.gstin);
1633
      oprot.writeFieldEnd();
1708
      oprot.writeFieldEnd();
1634
    }
1709
    }
-
 
1710
    if (this.tnc != null) {
-
 
1711
      oprot.writeFieldBegin(TNC_FIELD_DESC);
-
 
1712
      oprot.writeString(this.tnc);
-
 
1713
      oprot.writeFieldEnd();
-
 
1714
    }
1635
    oprot.writeFieldStop();
1715
    oprot.writeFieldStop();
1636
    oprot.writeStructEnd();
1716
    oprot.writeStructEnd();
1637
  }
1717
  }
1638
 
1718
 
1639
  @Override
1719
  @Override
Line 1770... Line 1850...
1770
      sb.append("null");
1850
      sb.append("null");
1771
    } else {
1851
    } else {
1772
      sb.append(this.gstin);
1852
      sb.append(this.gstin);
1773
    }
1853
    }
1774
    first = false;
1854
    first = false;
-
 
1855
    if (!first) sb.append(", ");
-
 
1856
    sb.append("tnc:");
-
 
1857
    if (this.tnc == null) {
-
 
1858
      sb.append("null");
-
 
1859
    } else {
-
 
1860
      sb.append(this.tnc);
-
 
1861
    }
-
 
1862
    first = false;
1775
    sb.append(")");
1863
    sb.append(")");
1776
    return sb.toString();
1864
    return sb.toString();
1777
  }
1865
  }
1778
 
1866
 
1779
  public void validate() throws org.apache.thrift.TException {
1867
  public void validate() throws org.apache.thrift.TException {