Subversion Repositories SmartDukaan

Rev

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

Rev 10295 Rev 14072
Line 37... Line 37...
37
  private static final org.apache.thrift.protocol.TField CONTACT_FAX_FIELD_DESC = new org.apache.thrift.protocol.TField("contactFax", org.apache.thrift.protocol.TType.STRING, (short)12);
37
  private static final org.apache.thrift.protocol.TField CONTACT_FAX_FIELD_DESC = new org.apache.thrift.protocol.TField("contactFax", org.apache.thrift.protocol.TType.STRING, (short)12);
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
 
43
 
43
  private long id; // required
44
  private long id; // required
44
  private String name; // required
45
  private String name; // required
45
  private String phone; // required
46
  private String phone; // required
46
  private String fax; // required
47
  private String fax; // required
Line 54... Line 55...
54
  private String contactFax; // required
55
  private String contactFax; // required
55
  private String contactEmail; // required
56
  private String contactEmail; // required
56
  private String registeredAddress; // required
57
  private String registeredAddress; // required
57
  private String communicationAddress; // required
58
  private String communicationAddress; // required
58
  private long stateId; // required
59
  private long stateId; // required
-
 
60
  private long poValidityLimit; // required
59
 
61
 
60
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
62
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
61
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
63
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
62
    ID((short)1, "id"),
64
    ID((short)1, "id"),
63
    NAME((short)2, "name"),
65
    NAME((short)2, "name"),
Line 72... Line 74...
72
    CONTACT_PHONE((short)11, "contactPhone"),
74
    CONTACT_PHONE((short)11, "contactPhone"),
73
    CONTACT_FAX((short)12, "contactFax"),
75
    CONTACT_FAX((short)12, "contactFax"),
74
    CONTACT_EMAIL((short)13, "contactEmail"),
76
    CONTACT_EMAIL((short)13, "contactEmail"),
75
    REGISTERED_ADDRESS((short)14, "registeredAddress"),
77
    REGISTERED_ADDRESS((short)14, "registeredAddress"),
76
    COMMUNICATION_ADDRESS((short)15, "communicationAddress"),
78
    COMMUNICATION_ADDRESS((short)15, "communicationAddress"),
77
    STATE_ID((short)16, "stateId");
79
    STATE_ID((short)16, "stateId"),
-
 
80
    PO_VALIDITY_LIMIT((short)17, "poValidityLimit");
78
 
81
 
79
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
82
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
80
 
83
 
81
    static {
84
    static {
82
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
85
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 119... Line 122...
119
          return REGISTERED_ADDRESS;
122
          return REGISTERED_ADDRESS;
120
        case 15: // COMMUNICATION_ADDRESS
123
        case 15: // COMMUNICATION_ADDRESS
121
          return COMMUNICATION_ADDRESS;
124
          return COMMUNICATION_ADDRESS;
122
        case 16: // STATE_ID
125
        case 16: // STATE_ID
123
          return STATE_ID;
126
          return STATE_ID;
-
 
127
        case 17: // PO_VALIDITY_LIMIT
-
 
128
          return PO_VALIDITY_LIMIT;
124
        default:
129
        default:
125
          return null;
130
          return null;
126
      }
131
      }
127
    }
132
    }
128
 
133
 
Line 161... Line 166...
161
  }
166
  }
162
 
167
 
163
  // isset id assignments
168
  // isset id assignments
164
  private static final int __ID_ISSET_ID = 0;
169
  private static final int __ID_ISSET_ID = 0;
165
  private static final int __STATEID_ISSET_ID = 1;
170
  private static final int __STATEID_ISSET_ID = 1;
-
 
171
  private static final int __POVALIDITYLIMIT_ISSET_ID = 2;
166
  private BitSet __isset_bit_vector = new BitSet(2);
172
  private BitSet __isset_bit_vector = new BitSet(3);
167
 
173
 
168
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
174
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
169
  static {
175
  static {
170
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
176
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
171
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
177
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 198... Line 204...
198
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
204
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
199
    tmpMap.put(_Fields.COMMUNICATION_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("communicationAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, 
205
    tmpMap.put(_Fields.COMMUNICATION_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("communicationAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, 
200
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
206
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
201
    tmpMap.put(_Fields.STATE_ID, new org.apache.thrift.meta_data.FieldMetaData("stateId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
207
    tmpMap.put(_Fields.STATE_ID, new org.apache.thrift.meta_data.FieldMetaData("stateId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
202
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
208
        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, 
-
 
210
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
203
    metaDataMap = Collections.unmodifiableMap(tmpMap);
211
    metaDataMap = Collections.unmodifiableMap(tmpMap);
204
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Supplier.class, metaDataMap);
212
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Supplier.class, metaDataMap);
205
  }
213
  }
206
 
214
 
207
  public Supplier() {
215
  public Supplier() {
Line 221... Line 229...
221
    String contactPhone,
229
    String contactPhone,
222
    String contactFax,
230
    String contactFax,
223
    String contactEmail,
231
    String contactEmail,
224
    String registeredAddress,
232
    String registeredAddress,
225
    String communicationAddress,
233
    String communicationAddress,
226
    long stateId)
234
    long stateId,
-
 
235
    long poValidityLimit)
227
  {
236
  {
228
    this();
237
    this();
229
    this.id = id;
238
    this.id = id;
230
    setIdIsSet(true);
239
    setIdIsSet(true);
231
    this.name = name;
240
    this.name = name;
Line 242... Line 251...
242
    this.contactEmail = contactEmail;
251
    this.contactEmail = contactEmail;
243
    this.registeredAddress = registeredAddress;
252
    this.registeredAddress = registeredAddress;
244
    this.communicationAddress = communicationAddress;
253
    this.communicationAddress = communicationAddress;
245
    this.stateId = stateId;
254
    this.stateId = stateId;
246
    setStateIdIsSet(true);
255
    setStateIdIsSet(true);
-
 
256
    this.poValidityLimit = poValidityLimit;
-
 
257
    setPoValidityLimitIsSet(true);
247
  }
258
  }
248
 
259
 
249
  /**
260
  /**
250
   * Performs a deep copy on <i>other</i>.
261
   * Performs a deep copy on <i>other</i>.
251
   */
262
   */
Line 294... Line 305...
294
    }
305
    }
295
    if (other.isSetCommunicationAddress()) {
306
    if (other.isSetCommunicationAddress()) {
296
      this.communicationAddress = other.communicationAddress;
307
      this.communicationAddress = other.communicationAddress;
297
    }
308
    }
298
    this.stateId = other.stateId;
309
    this.stateId = other.stateId;
-
 
310
    this.poValidityLimit = other.poValidityLimit;
299
  }
311
  }
300
 
312
 
301
  public Supplier deepCopy() {
313
  public Supplier deepCopy() {
302
    return new Supplier(this);
314
    return new Supplier(this);
303
  }
315
  }
Line 320... Line 332...
320
    this.contactEmail = null;
332
    this.contactEmail = null;
321
    this.registeredAddress = null;
333
    this.registeredAddress = null;
322
    this.communicationAddress = null;
334
    this.communicationAddress = null;
323
    setStateIdIsSet(false);
335
    setStateIdIsSet(false);
324
    this.stateId = 0;
336
    this.stateId = 0;
-
 
337
    setPoValidityLimitIsSet(false);
-
 
338
    this.poValidityLimit = 0;
325
  }
339
  }
326
 
340
 
327
  public long getId() {
341
  public long getId() {
328
    return this.id;
342
    return this.id;
329
  }
343
  }
Line 688... Line 702...
688
 
702
 
689
  public void setStateIdIsSet(boolean value) {
703
  public void setStateIdIsSet(boolean value) {
690
    __isset_bit_vector.set(__STATEID_ISSET_ID, value);
704
    __isset_bit_vector.set(__STATEID_ISSET_ID, value);
691
  }
705
  }
692
 
706
 
-
 
707
  public long getPoValidityLimit() {
-
 
708
    return this.poValidityLimit;
-
 
709
  }
-
 
710
 
-
 
711
  public void setPoValidityLimit(long poValidityLimit) {
-
 
712
    this.poValidityLimit = poValidityLimit;
-
 
713
    setPoValidityLimitIsSet(true);
-
 
714
  }
-
 
715
 
-
 
716
  public void unsetPoValidityLimit() {
-
 
717
    __isset_bit_vector.clear(__POVALIDITYLIMIT_ISSET_ID);
-
 
718
  }
-
 
719
 
-
 
720
  /** Returns true if field poValidityLimit is set (has been assigned a value) and false otherwise */
-
 
721
  public boolean isSetPoValidityLimit() {
-
 
722
    return __isset_bit_vector.get(__POVALIDITYLIMIT_ISSET_ID);
-
 
723
  }
-
 
724
 
-
 
725
  public void setPoValidityLimitIsSet(boolean value) {
-
 
726
    __isset_bit_vector.set(__POVALIDITYLIMIT_ISSET_ID, value);
-
 
727
  }
-
 
728
 
693
  public void setFieldValue(_Fields field, Object value) {
729
  public void setFieldValue(_Fields field, Object value) {
694
    switch (field) {
730
    switch (field) {
695
    case ID:
731
    case ID:
696
      if (value == null) {
732
      if (value == null) {
697
        unsetId();
733
        unsetId();
Line 818... Line 854...
818
      } else {
854
      } else {
819
        setStateId((Long)value);
855
        setStateId((Long)value);
820
      }
856
      }
821
      break;
857
      break;
822
 
858
 
-
 
859
    case PO_VALIDITY_LIMIT:
-
 
860
      if (value == null) {
-
 
861
        unsetPoValidityLimit();
-
 
862
      } else {
-
 
863
        setPoValidityLimit((Long)value);
-
 
864
      }
-
 
865
      break;
-
 
866
 
823
    }
867
    }
824
  }
868
  }
825
 
869
 
826
  public Object getFieldValue(_Fields field) {
870
  public Object getFieldValue(_Fields field) {
827
    switch (field) {
871
    switch (field) {
Line 871... Line 915...
871
      return getCommunicationAddress();
915
      return getCommunicationAddress();
872
 
916
 
873
    case STATE_ID:
917
    case STATE_ID:
874
      return Long.valueOf(getStateId());
918
      return Long.valueOf(getStateId());
875
 
919
 
-
 
920
    case PO_VALIDITY_LIMIT:
-
 
921
      return Long.valueOf(getPoValidityLimit());
-
 
922
 
876
    }
923
    }
877
    throw new IllegalStateException();
924
    throw new IllegalStateException();
878
  }
925
  }
879
 
926
 
880
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
927
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 914... Line 961...
914
      return isSetRegisteredAddress();
961
      return isSetRegisteredAddress();
915
    case COMMUNICATION_ADDRESS:
962
    case COMMUNICATION_ADDRESS:
916
      return isSetCommunicationAddress();
963
      return isSetCommunicationAddress();
917
    case STATE_ID:
964
    case STATE_ID:
918
      return isSetStateId();
965
      return isSetStateId();
-
 
966
    case PO_VALIDITY_LIMIT:
-
 
967
      return isSetPoValidityLimit();
919
    }
968
    }
920
    throw new IllegalStateException();
969
    throw new IllegalStateException();
921
  }
970
  }
922
 
971
 
923
  @Override
972
  @Override
Line 1075... Line 1124...
1075
        return false;
1124
        return false;
1076
      if (this.stateId != that.stateId)
1125
      if (this.stateId != that.stateId)
1077
        return false;
1126
        return false;
1078
    }
1127
    }
1079
 
1128
 
-
 
1129
    boolean this_present_poValidityLimit = true;
-
 
1130
    boolean that_present_poValidityLimit = true;
-
 
1131
    if (this_present_poValidityLimit || that_present_poValidityLimit) {
-
 
1132
      if (!(this_present_poValidityLimit && that_present_poValidityLimit))
-
 
1133
        return false;
-
 
1134
      if (this.poValidityLimit != that.poValidityLimit)
-
 
1135
        return false;
-
 
1136
    }
-
 
1137
 
1080
    return true;
1138
    return true;
1081
  }
1139
  }
1082
 
1140
 
1083
  @Override
1141
  @Override
1084
  public int hashCode() {
1142
  public int hashCode() {
Line 1251... Line 1309...
1251
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stateId, typedOther.stateId);
1309
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stateId, typedOther.stateId);
1252
      if (lastComparison != 0) {
1310
      if (lastComparison != 0) {
1253
        return lastComparison;
1311
        return lastComparison;
1254
      }
1312
      }
1255
    }
1313
    }
-
 
1314
    lastComparison = Boolean.valueOf(isSetPoValidityLimit()).compareTo(typedOther.isSetPoValidityLimit());
-
 
1315
    if (lastComparison != 0) {
-
 
1316
      return lastComparison;
-
 
1317
    }
-
 
1318
    if (isSetPoValidityLimit()) {
-
 
1319
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.poValidityLimit, typedOther.poValidityLimit);
-
 
1320
      if (lastComparison != 0) {
-
 
1321
        return lastComparison;
-
 
1322
      }
-
 
1323
    }
1256
    return 0;
1324
    return 0;
1257
  }
1325
  }
1258
 
1326
 
1259
  public _Fields fieldForId(int fieldId) {
1327
  public _Fields fieldForId(int fieldId) {
1260
    return _Fields.findByThriftId(fieldId);
1328
    return _Fields.findByThriftId(fieldId);
Line 1382... Line 1450...
1382
            setStateIdIsSet(true);
1450
            setStateIdIsSet(true);
1383
          } else { 
1451
          } else { 
1384
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1452
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1385
          }
1453
          }
1386
          break;
1454
          break;
-
 
1455
        case 17: // PO_VALIDITY_LIMIT
-
 
1456
          if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
1457
            this.poValidityLimit = iprot.readI64();
-
 
1458
            setPoValidityLimitIsSet(true);
-
 
1459
          } else { 
-
 
1460
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1461
          }
-
 
1462
          break;
1387
        default:
1463
        default:
1388
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1464
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1389
      }
1465
      }
1390
      iprot.readFieldEnd();
1466
      iprot.readFieldEnd();
1391
    }
1467
    }
Line 1471... Line 1547...
1471
      oprot.writeFieldEnd();
1547
      oprot.writeFieldEnd();
1472
    }
1548
    }
1473
    oprot.writeFieldBegin(STATE_ID_FIELD_DESC);
1549
    oprot.writeFieldBegin(STATE_ID_FIELD_DESC);
1474
    oprot.writeI64(this.stateId);
1550
    oprot.writeI64(this.stateId);
1475
    oprot.writeFieldEnd();
1551
    oprot.writeFieldEnd();
-
 
1552
    oprot.writeFieldBegin(PO_VALIDITY_LIMIT_FIELD_DESC);
-
 
1553
    oprot.writeI64(this.poValidityLimit);
-
 
1554
    oprot.writeFieldEnd();
1476
    oprot.writeFieldStop();
1555
    oprot.writeFieldStop();
1477
    oprot.writeStructEnd();
1556
    oprot.writeStructEnd();
1478
  }
1557
  }
1479
 
1558
 
1480
  @Override
1559
  @Override
Line 1599... Line 1678...
1599
    first = false;
1678
    first = false;
1600
    if (!first) sb.append(", ");
1679
    if (!first) sb.append(", ");
1601
    sb.append("stateId:");
1680
    sb.append("stateId:");
1602
    sb.append(this.stateId);
1681
    sb.append(this.stateId);
1603
    first = false;
1682
    first = false;
-
 
1683
    if (!first) sb.append(", ");
-
 
1684
    sb.append("poValidityLimit:");
-
 
1685
    sb.append(this.poValidityLimit);
-
 
1686
    first = false;
1604
    sb.append(")");
1687
    sb.append(")");
1605
    return sb.toString();
1688
    return sb.toString();
1606
  }
1689
  }
1607
 
1690
 
1608
  public void validate() throws org.apache.thrift.TException {
1691
  public void validate() throws org.apache.thrift.TException {