Subversion Repositories SmartDukaan

Rev

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

Rev 4496 Rev 10295
Line 36... Line 36...
36
  private static final org.apache.thrift.protocol.TField CONTACT_PHONE_FIELD_DESC = new org.apache.thrift.protocol.TField("contactPhone", org.apache.thrift.protocol.TType.STRING, (short)11);
36
  private static final org.apache.thrift.protocol.TField CONTACT_PHONE_FIELD_DESC = new org.apache.thrift.protocol.TField("contactPhone", org.apache.thrift.protocol.TType.STRING, (short)11);
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
 
42
 
42
  private long id; // required
43
  private long id; // required
43
  private String name; // required
44
  private String name; // required
44
  private String phone; // required
45
  private String phone; // required
45
  private String fax; // required
46
  private String fax; // required
Line 52... Line 53...
52
  private String contactPhone; // required
53
  private String contactPhone; // required
53
  private String contactFax; // required
54
  private String contactFax; // required
54
  private String contactEmail; // required
55
  private String contactEmail; // required
55
  private String registeredAddress; // required
56
  private String registeredAddress; // required
56
  private String communicationAddress; // required
57
  private String communicationAddress; // required
-
 
58
  private long stateId; // required
57
 
59
 
58
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
60
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
59
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
61
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
60
    ID((short)1, "id"),
62
    ID((short)1, "id"),
61
    NAME((short)2, "name"),
63
    NAME((short)2, "name"),
Line 69... Line 71...
69
    CONTACT_NAME((short)10, "contactName"),
71
    CONTACT_NAME((short)10, "contactName"),
70
    CONTACT_PHONE((short)11, "contactPhone"),
72
    CONTACT_PHONE((short)11, "contactPhone"),
71
    CONTACT_FAX((short)12, "contactFax"),
73
    CONTACT_FAX((short)12, "contactFax"),
72
    CONTACT_EMAIL((short)13, "contactEmail"),
74
    CONTACT_EMAIL((short)13, "contactEmail"),
73
    REGISTERED_ADDRESS((short)14, "registeredAddress"),
75
    REGISTERED_ADDRESS((short)14, "registeredAddress"),
74
    COMMUNICATION_ADDRESS((short)15, "communicationAddress");
76
    COMMUNICATION_ADDRESS((short)15, "communicationAddress"),
-
 
77
    STATE_ID((short)16, "stateId");
75
 
78
 
76
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
79
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
77
 
80
 
78
    static {
81
    static {
79
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
82
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 114... Line 117...
114
          return CONTACT_EMAIL;
117
          return CONTACT_EMAIL;
115
        case 14: // REGISTERED_ADDRESS
118
        case 14: // REGISTERED_ADDRESS
116
          return REGISTERED_ADDRESS;
119
          return REGISTERED_ADDRESS;
117
        case 15: // COMMUNICATION_ADDRESS
120
        case 15: // COMMUNICATION_ADDRESS
118
          return COMMUNICATION_ADDRESS;
121
          return COMMUNICATION_ADDRESS;
-
 
122
        case 16: // STATE_ID
-
 
123
          return STATE_ID;
119
        default:
124
        default:
120
          return null;
125
          return null;
121
      }
126
      }
122
    }
127
    }
123
 
128
 
Line 155... Line 160...
155
    }
160
    }
156
  }
161
  }
157
 
162
 
158
  // isset id assignments
163
  // isset id assignments
159
  private static final int __ID_ISSET_ID = 0;
164
  private static final int __ID_ISSET_ID = 0;
-
 
165
  private static final int __STATEID_ISSET_ID = 1;
160
  private BitSet __isset_bit_vector = new BitSet(1);
166
  private BitSet __isset_bit_vector = new BitSet(2);
161
 
167
 
162
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
168
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
163
  static {
169
  static {
164
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
170
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
165
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
171
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 190... Line 196...
190
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
196
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
191
    tmpMap.put(_Fields.REGISTERED_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("registeredAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, 
197
    tmpMap.put(_Fields.REGISTERED_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("registeredAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, 
192
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
198
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
193
    tmpMap.put(_Fields.COMMUNICATION_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("communicationAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, 
199
    tmpMap.put(_Fields.COMMUNICATION_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("communicationAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, 
194
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
200
        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, 
-
 
202
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
195
    metaDataMap = Collections.unmodifiableMap(tmpMap);
203
    metaDataMap = Collections.unmodifiableMap(tmpMap);
196
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Supplier.class, metaDataMap);
204
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Supplier.class, metaDataMap);
197
  }
205
  }
198
 
206
 
199
  public Supplier() {
207
  public Supplier() {
Line 212... Line 220...
212
    String contactName,
220
    String contactName,
213
    String contactPhone,
221
    String contactPhone,
214
    String contactFax,
222
    String contactFax,
215
    String contactEmail,
223
    String contactEmail,
216
    String registeredAddress,
224
    String registeredAddress,
217
    String communicationAddress)
225
    String communicationAddress,
-
 
226
    long stateId)
218
  {
227
  {
219
    this();
228
    this();
220
    this.id = id;
229
    this.id = id;
221
    setIdIsSet(true);
230
    setIdIsSet(true);
222
    this.name = name;
231
    this.name = name;
Line 231... Line 240...
231
    this.contactPhone = contactPhone;
240
    this.contactPhone = contactPhone;
232
    this.contactFax = contactFax;
241
    this.contactFax = contactFax;
233
    this.contactEmail = contactEmail;
242
    this.contactEmail = contactEmail;
234
    this.registeredAddress = registeredAddress;
243
    this.registeredAddress = registeredAddress;
235
    this.communicationAddress = communicationAddress;
244
    this.communicationAddress = communicationAddress;
-
 
245
    this.stateId = stateId;
-
 
246
    setStateIdIsSet(true);
236
  }
247
  }
237
 
248
 
238
  /**
249
  /**
239
   * Performs a deep copy on <i>other</i>.
250
   * Performs a deep copy on <i>other</i>.
240
   */
251
   */
Line 282... Line 293...
282
      this.registeredAddress = other.registeredAddress;
293
      this.registeredAddress = other.registeredAddress;
283
    }
294
    }
284
    if (other.isSetCommunicationAddress()) {
295
    if (other.isSetCommunicationAddress()) {
285
      this.communicationAddress = other.communicationAddress;
296
      this.communicationAddress = other.communicationAddress;
286
    }
297
    }
-
 
298
    this.stateId = other.stateId;
287
  }
299
  }
288
 
300
 
289
  public Supplier deepCopy() {
301
  public Supplier deepCopy() {
290
    return new Supplier(this);
302
    return new Supplier(this);
291
  }
303
  }
Line 306... Line 318...
306
    this.contactPhone = null;
318
    this.contactPhone = null;
307
    this.contactFax = null;
319
    this.contactFax = null;
308
    this.contactEmail = null;
320
    this.contactEmail = null;
309
    this.registeredAddress = null;
321
    this.registeredAddress = null;
310
    this.communicationAddress = null;
322
    this.communicationAddress = null;
-
 
323
    setStateIdIsSet(false);
-
 
324
    this.stateId = 0;
311
  }
325
  }
312
 
326
 
313
  public long getId() {
327
  public long getId() {
314
    return this.id;
328
    return this.id;
315
  }
329
  }
Line 652... Line 666...
652
    if (!value) {
666
    if (!value) {
653
      this.communicationAddress = null;
667
      this.communicationAddress = null;
654
    }
668
    }
655
  }
669
  }
656
 
670
 
-
 
671
  public long getStateId() {
-
 
672
    return this.stateId;
-
 
673
  }
-
 
674
 
-
 
675
  public void setStateId(long stateId) {
-
 
676
    this.stateId = stateId;
-
 
677
    setStateIdIsSet(true);
-
 
678
  }
-
 
679
 
-
 
680
  public void unsetStateId() {
-
 
681
    __isset_bit_vector.clear(__STATEID_ISSET_ID);
-
 
682
  }
-
 
683
 
-
 
684
  /** Returns true if field stateId is set (has been assigned a value) and false otherwise */
-
 
685
  public boolean isSetStateId() {
-
 
686
    return __isset_bit_vector.get(__STATEID_ISSET_ID);
-
 
687
  }
-
 
688
 
-
 
689
  public void setStateIdIsSet(boolean value) {
-
 
690
    __isset_bit_vector.set(__STATEID_ISSET_ID, value);
-
 
691
  }
-
 
692
 
657
  public void setFieldValue(_Fields field, Object value) {
693
  public void setFieldValue(_Fields field, Object value) {
658
    switch (field) {
694
    switch (field) {
659
    case ID:
695
    case ID:
660
      if (value == null) {
696
      if (value == null) {
661
        unsetId();
697
        unsetId();
Line 774... Line 810...
774
      } else {
810
      } else {
775
        setCommunicationAddress((String)value);
811
        setCommunicationAddress((String)value);
776
      }
812
      }
777
      break;
813
      break;
778
 
814
 
-
 
815
    case STATE_ID:
-
 
816
      if (value == null) {
-
 
817
        unsetStateId();
-
 
818
      } else {
-
 
819
        setStateId((Long)value);
-
 
820
      }
-
 
821
      break;
-
 
822
 
779
    }
823
    }
780
  }
824
  }
781
 
825
 
782
  public Object getFieldValue(_Fields field) {
826
  public Object getFieldValue(_Fields field) {
783
    switch (field) {
827
    switch (field) {
Line 824... Line 868...
824
      return getRegisteredAddress();
868
      return getRegisteredAddress();
825
 
869
 
826
    case COMMUNICATION_ADDRESS:
870
    case COMMUNICATION_ADDRESS:
827
      return getCommunicationAddress();
871
      return getCommunicationAddress();
828
 
872
 
-
 
873
    case STATE_ID:
-
 
874
      return Long.valueOf(getStateId());
-
 
875
 
829
    }
876
    }
830
    throw new IllegalStateException();
877
    throw new IllegalStateException();
831
  }
878
  }
832
 
879
 
833
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
880
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 865... Line 912...
865
      return isSetContactEmail();
912
      return isSetContactEmail();
866
    case REGISTERED_ADDRESS:
913
    case REGISTERED_ADDRESS:
867
      return isSetRegisteredAddress();
914
      return isSetRegisteredAddress();
868
    case COMMUNICATION_ADDRESS:
915
    case COMMUNICATION_ADDRESS:
869
      return isSetCommunicationAddress();
916
      return isSetCommunicationAddress();
-
 
917
    case STATE_ID:
-
 
918
      return isSetStateId();
870
    }
919
    }
871
    throw new IllegalStateException();
920
    throw new IllegalStateException();
872
  }
921
  }
873
 
922
 
874
  @Override
923
  @Override
Line 1017... Line 1066...
1017
        return false;
1066
        return false;
1018
      if (!this.communicationAddress.equals(that.communicationAddress))
1067
      if (!this.communicationAddress.equals(that.communicationAddress))
1019
        return false;
1068
        return false;
1020
    }
1069
    }
1021
 
1070
 
-
 
1071
    boolean this_present_stateId = true;
-
 
1072
    boolean that_present_stateId = true;
-
 
1073
    if (this_present_stateId || that_present_stateId) {
-
 
1074
      if (!(this_present_stateId && that_present_stateId))
-
 
1075
        return false;
-
 
1076
      if (this.stateId != that.stateId)
-
 
1077
        return false;
-
 
1078
    }
-
 
1079
 
1022
    return true;
1080
    return true;
1023
  }
1081
  }
1024
 
1082
 
1025
  @Override
1083
  @Override
1026
  public int hashCode() {
1084
  public int hashCode() {
Line 1183... Line 1241...
1183
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.communicationAddress, typedOther.communicationAddress);
1241
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.communicationAddress, typedOther.communicationAddress);
1184
      if (lastComparison != 0) {
1242
      if (lastComparison != 0) {
1185
        return lastComparison;
1243
        return lastComparison;
1186
      }
1244
      }
1187
    }
1245
    }
-
 
1246
    lastComparison = Boolean.valueOf(isSetStateId()).compareTo(typedOther.isSetStateId());
-
 
1247
    if (lastComparison != 0) {
-
 
1248
      return lastComparison;
-
 
1249
    }
-
 
1250
    if (isSetStateId()) {
-
 
1251
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stateId, typedOther.stateId);
-
 
1252
      if (lastComparison != 0) {
-
 
1253
        return lastComparison;
-
 
1254
      }
-
 
1255
    }
1188
    return 0;
1256
    return 0;
1189
  }
1257
  }
1190
 
1258
 
1191
  public _Fields fieldForId(int fieldId) {
1259
  public _Fields fieldForId(int fieldId) {
1192
    return _Fields.findByThriftId(fieldId);
1260
    return _Fields.findByThriftId(fieldId);
Line 1306... Line 1374...
1306
            this.communicationAddress = iprot.readString();
1374
            this.communicationAddress = iprot.readString();
1307
          } else { 
1375
          } else { 
1308
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1376
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1309
          }
1377
          }
1310
          break;
1378
          break;
-
 
1379
        case 16: // STATE_ID
-
 
1380
          if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
1381
            this.stateId = iprot.readI64();
-
 
1382
            setStateIdIsSet(true);
-
 
1383
          } else { 
-
 
1384
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1385
          }
-
 
1386
          break;
1311
        default:
1387
        default:
1312
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1388
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1313
      }
1389
      }
1314
      iprot.readFieldEnd();
1390
      iprot.readFieldEnd();
1315
    }
1391
    }
Line 1392... Line 1468...
1392
    if (this.communicationAddress != null) {
1468
    if (this.communicationAddress != null) {
1393
      oprot.writeFieldBegin(COMMUNICATION_ADDRESS_FIELD_DESC);
1469
      oprot.writeFieldBegin(COMMUNICATION_ADDRESS_FIELD_DESC);
1394
      oprot.writeString(this.communicationAddress);
1470
      oprot.writeString(this.communicationAddress);
1395
      oprot.writeFieldEnd();
1471
      oprot.writeFieldEnd();
1396
    }
1472
    }
-
 
1473
    oprot.writeFieldBegin(STATE_ID_FIELD_DESC);
-
 
1474
    oprot.writeI64(this.stateId);
-
 
1475
    oprot.writeFieldEnd();
1397
    oprot.writeFieldStop();
1476
    oprot.writeFieldStop();
1398
    oprot.writeStructEnd();
1477
    oprot.writeStructEnd();
1399
  }
1478
  }
1400
 
1479
 
1401
  @Override
1480
  @Override
Line 1516... Line 1595...
1516
      sb.append("null");
1595
      sb.append("null");
1517
    } else {
1596
    } else {
1518
      sb.append(this.communicationAddress);
1597
      sb.append(this.communicationAddress);
1519
    }
1598
    }
1520
    first = false;
1599
    first = false;
-
 
1600
    if (!first) sb.append(", ");
-
 
1601
    sb.append("stateId:");
-
 
1602
    sb.append(this.stateId);
-
 
1603
    first = false;
1521
    sb.append(")");
1604
    sb.append(")");
1522
    return sb.toString();
1605
    return sb.toString();
1523
  }
1606
  }
1524
 
1607
 
1525
  public void validate() throws org.apache.thrift.TException {
1608
  public void validate() throws org.apache.thrift.TException {