Subversion Repositories SmartDukaan

Rev

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

Rev 5945 Rev 7330
Line 38... Line 38...
38
  private static final org.apache.thrift.protocol.TField VENDOR_FIELD_DESC = new org.apache.thrift.protocol.TField("vendor", org.apache.thrift.protocol.TType.STRUCT, (short)15);
38
  private static final org.apache.thrift.protocol.TField VENDOR_FIELD_DESC = new org.apache.thrift.protocol.TField("vendor", org.apache.thrift.protocol.TType.STRUCT, (short)15);
39
  private static final org.apache.thrift.protocol.TField SHIPPING_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("shippingWarehouseId", org.apache.thrift.protocol.TType.I64, (short)16);
39
  private static final org.apache.thrift.protocol.TField SHIPPING_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("shippingWarehouseId", org.apache.thrift.protocol.TType.I64, (short)16);
40
  private static final org.apache.thrift.protocol.TField BILLING_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("billingWarehouseId", org.apache.thrift.protocol.TType.I64, (short)17);
40
  private static final org.apache.thrift.protocol.TField BILLING_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("billingWarehouseId", org.apache.thrift.protocol.TType.I64, (short)17);
41
  private static final org.apache.thrift.protocol.TField IS_AVAILABILITY_MONITORED_FIELD_DESC = new org.apache.thrift.protocol.TField("isAvailabilityMonitored", org.apache.thrift.protocol.TType.BOOL, (short)18);
41
  private static final org.apache.thrift.protocol.TField IS_AVAILABILITY_MONITORED_FIELD_DESC = new org.apache.thrift.protocol.TField("isAvailabilityMonitored", org.apache.thrift.protocol.TType.BOOL, (short)18);
42
  private static final org.apache.thrift.protocol.TField TRANSFER_DELAY_IN_HOURS_FIELD_DESC = new org.apache.thrift.protocol.TField("transferDelayInHours", org.apache.thrift.protocol.TType.I64, (short)19);
42
  private static final org.apache.thrift.protocol.TField TRANSFER_DELAY_IN_HOURS_FIELD_DESC = new org.apache.thrift.protocol.TField("transferDelayInHours", org.apache.thrift.protocol.TType.I64, (short)19);
-
 
43
  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)20);
43
 
44
 
44
  private long id; // required
45
  private long id; // required
45
  private String displayName; // required
46
  private String displayName; // required
46
  private String location; // required
47
  private String location; // required
47
  private long addedOn; // required
48
  private long addedOn; // required
Line 56... Line 57...
56
  private Vendor vendor; // required
57
  private Vendor vendor; // required
57
  private long shippingWarehouseId; // required
58
  private long shippingWarehouseId; // required
58
  private long billingWarehouseId; // required
59
  private long billingWarehouseId; // required
59
  private boolean isAvailabilityMonitored; // required
60
  private boolean isAvailabilityMonitored; // required
60
  private long transferDelayInHours; // required
61
  private long transferDelayInHours; // required
-
 
62
  private long stateId; // 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
    DISPLAY_NAME((short)2, "displayName"),
67
    DISPLAY_NAME((short)2, "displayName"),
Line 91... Line 93...
91
    INVENTORY_TYPE((short)14, "inventoryType"),
93
    INVENTORY_TYPE((short)14, "inventoryType"),
92
    VENDOR((short)15, "vendor"),
94
    VENDOR((short)15, "vendor"),
93
    SHIPPING_WAREHOUSE_ID((short)16, "shippingWarehouseId"),
95
    SHIPPING_WAREHOUSE_ID((short)16, "shippingWarehouseId"),
94
    BILLING_WAREHOUSE_ID((short)17, "billingWarehouseId"),
96
    BILLING_WAREHOUSE_ID((short)17, "billingWarehouseId"),
95
    IS_AVAILABILITY_MONITORED((short)18, "isAvailabilityMonitored"),
97
    IS_AVAILABILITY_MONITORED((short)18, "isAvailabilityMonitored"),
96
    TRANSFER_DELAY_IN_HOURS((short)19, "transferDelayInHours");
98
    TRANSFER_DELAY_IN_HOURS((short)19, "transferDelayInHours"),
-
 
99
    STATE_ID((short)20, "stateId");
97
 
100
 
98
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
101
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
99
 
102
 
100
    static {
103
    static {
101
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
104
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 140... Line 143...
140
          return BILLING_WAREHOUSE_ID;
143
          return BILLING_WAREHOUSE_ID;
141
        case 18: // IS_AVAILABILITY_MONITORED
144
        case 18: // IS_AVAILABILITY_MONITORED
142
          return IS_AVAILABILITY_MONITORED;
145
          return IS_AVAILABILITY_MONITORED;
143
        case 19: // TRANSFER_DELAY_IN_HOURS
146
        case 19: // TRANSFER_DELAY_IN_HOURS
144
          return TRANSFER_DELAY_IN_HOURS;
147
          return TRANSFER_DELAY_IN_HOURS;
-
 
148
        case 20: // STATE_ID
-
 
149
          return STATE_ID;
145
        default:
150
        default:
146
          return null;
151
          return null;
147
      }
152
      }
148
    }
153
    }
149
 
154
 
Line 187... Line 192...
187
  private static final int __LASTCHECKEDON_ISSET_ID = 2;
192
  private static final int __LASTCHECKEDON_ISSET_ID = 2;
188
  private static final int __SHIPPINGWAREHOUSEID_ISSET_ID = 3;
193
  private static final int __SHIPPINGWAREHOUSEID_ISSET_ID = 3;
189
  private static final int __BILLINGWAREHOUSEID_ISSET_ID = 4;
194
  private static final int __BILLINGWAREHOUSEID_ISSET_ID = 4;
190
  private static final int __ISAVAILABILITYMONITORED_ISSET_ID = 5;
195
  private static final int __ISAVAILABILITYMONITORED_ISSET_ID = 5;
191
  private static final int __TRANSFERDELAYINHOURS_ISSET_ID = 6;
196
  private static final int __TRANSFERDELAYINHOURS_ISSET_ID = 6;
-
 
197
  private static final int __STATEID_ISSET_ID = 7;
192
  private BitSet __isset_bit_vector = new BitSet(7);
198
  private BitSet __isset_bit_vector = new BitSet(8);
193
 
199
 
194
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
200
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
195
  static {
201
  static {
196
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
202
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
197
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
203
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 226... Line 232...
226
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
232
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
227
    tmpMap.put(_Fields.IS_AVAILABILITY_MONITORED, new org.apache.thrift.meta_data.FieldMetaData("isAvailabilityMonitored", org.apache.thrift.TFieldRequirementType.DEFAULT, 
233
    tmpMap.put(_Fields.IS_AVAILABILITY_MONITORED, new org.apache.thrift.meta_data.FieldMetaData("isAvailabilityMonitored", org.apache.thrift.TFieldRequirementType.DEFAULT, 
228
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
234
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
229
    tmpMap.put(_Fields.TRANSFER_DELAY_IN_HOURS, new org.apache.thrift.meta_data.FieldMetaData("transferDelayInHours", org.apache.thrift.TFieldRequirementType.DEFAULT, 
235
    tmpMap.put(_Fields.TRANSFER_DELAY_IN_HOURS, new org.apache.thrift.meta_data.FieldMetaData("transferDelayInHours", org.apache.thrift.TFieldRequirementType.DEFAULT, 
230
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
236
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
237
    tmpMap.put(_Fields.STATE_ID, new org.apache.thrift.meta_data.FieldMetaData("stateId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
238
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
231
    metaDataMap = Collections.unmodifiableMap(tmpMap);
239
    metaDataMap = Collections.unmodifiableMap(tmpMap);
232
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Warehouse.class, metaDataMap);
240
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Warehouse.class, metaDataMap);
233
  }
241
  }
234
 
242
 
235
  public Warehouse() {
243
  public Warehouse() {
Line 250... Line 258...
250
    InventoryType inventoryType,
258
    InventoryType inventoryType,
251
    Vendor vendor,
259
    Vendor vendor,
252
    long shippingWarehouseId,
260
    long shippingWarehouseId,
253
    long billingWarehouseId,
261
    long billingWarehouseId,
254
    boolean isAvailabilityMonitored,
262
    boolean isAvailabilityMonitored,
255
    long transferDelayInHours)
263
    long transferDelayInHours,
-
 
264
    long stateId)
256
  {
265
  {
257
    this();
266
    this();
258
    this.id = id;
267
    this.id = id;
259
    setIdIsSet(true);
268
    setIdIsSet(true);
260
    this.displayName = displayName;
269
    this.displayName = displayName;
Line 277... Line 286...
277
    setBillingWarehouseIdIsSet(true);
286
    setBillingWarehouseIdIsSet(true);
278
    this.isAvailabilityMonitored = isAvailabilityMonitored;
287
    this.isAvailabilityMonitored = isAvailabilityMonitored;
279
    setIsAvailabilityMonitoredIsSet(true);
288
    setIsAvailabilityMonitoredIsSet(true);
280
    this.transferDelayInHours = transferDelayInHours;
289
    this.transferDelayInHours = transferDelayInHours;
281
    setTransferDelayInHoursIsSet(true);
290
    setTransferDelayInHoursIsSet(true);
-
 
291
    this.stateId = stateId;
-
 
292
    setStateIdIsSet(true);
282
  }
293
  }
283
 
294
 
284
  /**
295
  /**
285
   * Performs a deep copy on <i>other</i>.
296
   * Performs a deep copy on <i>other</i>.
286
   */
297
   */
Line 322... Line 333...
322
    }
333
    }
323
    this.shippingWarehouseId = other.shippingWarehouseId;
334
    this.shippingWarehouseId = other.shippingWarehouseId;
324
    this.billingWarehouseId = other.billingWarehouseId;
335
    this.billingWarehouseId = other.billingWarehouseId;
325
    this.isAvailabilityMonitored = other.isAvailabilityMonitored;
336
    this.isAvailabilityMonitored = other.isAvailabilityMonitored;
326
    this.transferDelayInHours = other.transferDelayInHours;
337
    this.transferDelayInHours = other.transferDelayInHours;
-
 
338
    this.stateId = other.stateId;
327
  }
339
  }
328
 
340
 
329
  public Warehouse deepCopy() {
341
  public Warehouse deepCopy() {
330
    return new Warehouse(this);
342
    return new Warehouse(this);
331
  }
343
  }
Line 354... Line 366...
354
    this.billingWarehouseId = 0;
366
    this.billingWarehouseId = 0;
355
    setIsAvailabilityMonitoredIsSet(false);
367
    setIsAvailabilityMonitoredIsSet(false);
356
    this.isAvailabilityMonitored = false;
368
    this.isAvailabilityMonitored = false;
357
    setTransferDelayInHoursIsSet(false);
369
    setTransferDelayInHoursIsSet(false);
358
    this.transferDelayInHours = 0;
370
    this.transferDelayInHours = 0;
-
 
371
    setStateIdIsSet(false);
-
 
372
    this.stateId = 0;
359
  }
373
  }
360
 
374
 
361
  public long getId() {
375
  public long getId() {
362
    return this.id;
376
    return this.id;
363
  }
377
  }
Line 772... Line 786...
772
 
786
 
773
  public void setTransferDelayInHoursIsSet(boolean value) {
787
  public void setTransferDelayInHoursIsSet(boolean value) {
774
    __isset_bit_vector.set(__TRANSFERDELAYINHOURS_ISSET_ID, value);
788
    __isset_bit_vector.set(__TRANSFERDELAYINHOURS_ISSET_ID, value);
775
  }
789
  }
776
 
790
 
-
 
791
  public long getStateId() {
-
 
792
    return this.stateId;
-
 
793
  }
-
 
794
 
-
 
795
  public void setStateId(long stateId) {
-
 
796
    this.stateId = stateId;
-
 
797
    setStateIdIsSet(true);
-
 
798
  }
-
 
799
 
-
 
800
  public void unsetStateId() {
-
 
801
    __isset_bit_vector.clear(__STATEID_ISSET_ID);
-
 
802
  }
-
 
803
 
-
 
804
  /** Returns true if field stateId is set (has been assigned a value) and false otherwise */
-
 
805
  public boolean isSetStateId() {
-
 
806
    return __isset_bit_vector.get(__STATEID_ISSET_ID);
-
 
807
  }
-
 
808
 
-
 
809
  public void setStateIdIsSet(boolean value) {
-
 
810
    __isset_bit_vector.set(__STATEID_ISSET_ID, value);
-
 
811
  }
-
 
812
 
777
  public void setFieldValue(_Fields field, Object value) {
813
  public void setFieldValue(_Fields field, Object value) {
778
    switch (field) {
814
    switch (field) {
779
    case ID:
815
    case ID:
780
      if (value == null) {
816
      if (value == null) {
781
        unsetId();
817
        unsetId();
Line 910... Line 946...
910
      } else {
946
      } else {
911
        setTransferDelayInHours((Long)value);
947
        setTransferDelayInHours((Long)value);
912
      }
948
      }
913
      break;
949
      break;
914
 
950
 
-
 
951
    case STATE_ID:
-
 
952
      if (value == null) {
-
 
953
        unsetStateId();
-
 
954
      } else {
-
 
955
        setStateId((Long)value);
-
 
956
      }
-
 
957
      break;
-
 
958
 
915
    }
959
    }
916
  }
960
  }
917
 
961
 
918
  public Object getFieldValue(_Fields field) {
962
  public Object getFieldValue(_Fields field) {
919
    switch (field) {
963
    switch (field) {
Line 966... Line 1010...
966
      return Boolean.valueOf(isIsAvailabilityMonitored());
1010
      return Boolean.valueOf(isIsAvailabilityMonitored());
967
 
1011
 
968
    case TRANSFER_DELAY_IN_HOURS:
1012
    case TRANSFER_DELAY_IN_HOURS:
969
      return Long.valueOf(getTransferDelayInHours());
1013
      return Long.valueOf(getTransferDelayInHours());
970
 
1014
 
-
 
1015
    case STATE_ID:
-
 
1016
      return Long.valueOf(getStateId());
-
 
1017
 
971
    }
1018
    }
972
    throw new IllegalStateException();
1019
    throw new IllegalStateException();
973
  }
1020
  }
974
 
1021
 
975
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1022
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 1011... Line 1058...
1011
      return isSetBillingWarehouseId();
1058
      return isSetBillingWarehouseId();
1012
    case IS_AVAILABILITY_MONITORED:
1059
    case IS_AVAILABILITY_MONITORED:
1013
      return isSetIsAvailabilityMonitored();
1060
      return isSetIsAvailabilityMonitored();
1014
    case TRANSFER_DELAY_IN_HOURS:
1061
    case TRANSFER_DELAY_IN_HOURS:
1015
      return isSetTransferDelayInHours();
1062
      return isSetTransferDelayInHours();
-
 
1063
    case STATE_ID:
-
 
1064
      return isSetStateId();
1016
    }
1065
    }
1017
    throw new IllegalStateException();
1066
    throw new IllegalStateException();
1018
  }
1067
  }
1019
 
1068
 
1020
  @Override
1069
  @Override
Line 1181... Line 1230...
1181
        return false;
1230
        return false;
1182
      if (this.transferDelayInHours != that.transferDelayInHours)
1231
      if (this.transferDelayInHours != that.transferDelayInHours)
1183
        return false;
1232
        return false;
1184
    }
1233
    }
1185
 
1234
 
-
 
1235
    boolean this_present_stateId = true;
-
 
1236
    boolean that_present_stateId = true;
-
 
1237
    if (this_present_stateId || that_present_stateId) {
-
 
1238
      if (!(this_present_stateId && that_present_stateId))
-
 
1239
        return false;
-
 
1240
      if (this.stateId != that.stateId)
-
 
1241
        return false;
-
 
1242
    }
-
 
1243
 
1186
    return true;
1244
    return true;
1187
  }
1245
  }
1188
 
1246
 
1189
  @Override
1247
  @Override
1190
  public int hashCode() {
1248
  public int hashCode() {
Line 1367... Line 1425...
1367
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transferDelayInHours, typedOther.transferDelayInHours);
1425
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transferDelayInHours, typedOther.transferDelayInHours);
1368
      if (lastComparison != 0) {
1426
      if (lastComparison != 0) {
1369
        return lastComparison;
1427
        return lastComparison;
1370
      }
1428
      }
1371
    }
1429
    }
-
 
1430
    lastComparison = Boolean.valueOf(isSetStateId()).compareTo(typedOther.isSetStateId());
-
 
1431
    if (lastComparison != 0) {
-
 
1432
      return lastComparison;
-
 
1433
    }
-
 
1434
    if (isSetStateId()) {
-
 
1435
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stateId, typedOther.stateId);
-
 
1436
      if (lastComparison != 0) {
-
 
1437
        return lastComparison;
-
 
1438
      }
-
 
1439
    }
1372
    return 0;
1440
    return 0;
1373
  }
1441
  }
1374
 
1442
 
1375
  public _Fields fieldForId(int fieldId) {
1443
  public _Fields fieldForId(int fieldId) {
1376
    return _Fields.findByThriftId(fieldId);
1444
    return _Fields.findByThriftId(fieldId);
Line 1511... Line 1579...
1511
            setTransferDelayInHoursIsSet(true);
1579
            setTransferDelayInHoursIsSet(true);
1512
          } else { 
1580
          } else { 
1513
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1581
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1514
          }
1582
          }
1515
          break;
1583
          break;
-
 
1584
        case 20: // STATE_ID
-
 
1585
          if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
1586
            this.stateId = iprot.readI64();
-
 
1587
            setStateIdIsSet(true);
-
 
1588
          } else { 
-
 
1589
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1590
          }
-
 
1591
          break;
1516
        default:
1592
        default:
1517
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1593
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1518
      }
1594
      }
1519
      iprot.readFieldEnd();
1595
      iprot.readFieldEnd();
1520
    }
1596
    }
Line 1595... Line 1671...
1595
    oprot.writeBool(this.isAvailabilityMonitored);
1671
    oprot.writeBool(this.isAvailabilityMonitored);
1596
    oprot.writeFieldEnd();
1672
    oprot.writeFieldEnd();
1597
    oprot.writeFieldBegin(TRANSFER_DELAY_IN_HOURS_FIELD_DESC);
1673
    oprot.writeFieldBegin(TRANSFER_DELAY_IN_HOURS_FIELD_DESC);
1598
    oprot.writeI64(this.transferDelayInHours);
1674
    oprot.writeI64(this.transferDelayInHours);
1599
    oprot.writeFieldEnd();
1675
    oprot.writeFieldEnd();
-
 
1676
    oprot.writeFieldBegin(STATE_ID_FIELD_DESC);
-
 
1677
    oprot.writeI64(this.stateId);
-
 
1678
    oprot.writeFieldEnd();
1600
    oprot.writeFieldStop();
1679
    oprot.writeFieldStop();
1601
    oprot.writeStructEnd();
1680
    oprot.writeStructEnd();
1602
  }
1681
  }
1603
 
1682
 
1604
  @Override
1683
  @Override
Line 1711... Line 1790...
1711
    first = false;
1790
    first = false;
1712
    if (!first) sb.append(", ");
1791
    if (!first) sb.append(", ");
1713
    sb.append("transferDelayInHours:");
1792
    sb.append("transferDelayInHours:");
1714
    sb.append(this.transferDelayInHours);
1793
    sb.append(this.transferDelayInHours);
1715
    first = false;
1794
    first = false;
-
 
1795
    if (!first) sb.append(", ");
-
 
1796
    sb.append("stateId:");
-
 
1797
    sb.append(this.stateId);
-
 
1798
    first = false;
1716
    sb.append(")");
1799
    sb.append(")");
1717
    return sb.toString();
1800
    return sb.toString();
1718
  }
1801
  }
1719
 
1802
 
1720
  public void validate() throws org.apache.thrift.TException {
1803
  public void validate() throws org.apache.thrift.TException {