Subversion Repositories SmartDukaan

Rev

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

Rev 11095 Rev 12133
Line 39... Line 39...
39
  private static final org.apache.thrift.protocol.TField SUPC_FIELD_DESC = new org.apache.thrift.protocol.TField("supc", org.apache.thrift.protocol.TType.STRING, (short)14);
39
  private static final org.apache.thrift.protocol.TField SUPC_FIELD_DESC = new org.apache.thrift.protocol.TField("supc", org.apache.thrift.protocol.TType.STRING, (short)14);
40
  private static final org.apache.thrift.protocol.TField SHIPPING_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("shippingTime", org.apache.thrift.protocol.TType.STRING, (short)15);
40
  private static final org.apache.thrift.protocol.TField SHIPPING_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("shippingTime", org.apache.thrift.protocol.TType.STRING, (short)15);
41
  private static final org.apache.thrift.protocol.TField UPDATED_BY_FIELD_DESC = new org.apache.thrift.protocol.TField("updatedBy", org.apache.thrift.protocol.TType.STRING, (short)16);
41
  private static final org.apache.thrift.protocol.TField UPDATED_BY_FIELD_DESC = new org.apache.thrift.protocol.TField("updatedBy", org.apache.thrift.protocol.TType.STRING, (short)16);
42
  private static final org.apache.thrift.protocol.TField MARKETPLACE_ITEMS_FIELD_DESC = new org.apache.thrift.protocol.TField("marketplaceItems", org.apache.thrift.protocol.TType.STRUCT, (short)17);
42
  private static final org.apache.thrift.protocol.TField MARKETPLACE_ITEMS_FIELD_DESC = new org.apache.thrift.protocol.TField("marketplaceItems", org.apache.thrift.protocol.TType.STRUCT, (short)17);
43
  private static final org.apache.thrift.protocol.TField COURIER_COST_MARKETPLACE_FIELD_DESC = new org.apache.thrift.protocol.TField("courierCostMarketplace", org.apache.thrift.protocol.TType.DOUBLE, (short)18);
43
  private static final org.apache.thrift.protocol.TField COURIER_COST_MARKETPLACE_FIELD_DESC = new org.apache.thrift.protocol.TField("courierCostMarketplace", org.apache.thrift.protocol.TType.DOUBLE, (short)18);
-
 
44
  private static final org.apache.thrift.protocol.TField ITEM_FIELD_DESC = new org.apache.thrift.protocol.TField("item", org.apache.thrift.protocol.TType.STRUCT, (short)19);
44
 
45
 
45
  private long item_id; // required
46
  private long item_id; // required
46
  private long warehouseId; // required
47
  private long warehouseId; // required
47
  private double exceptionPrice; // required
48
  private double exceptionPrice; // required
48
  private boolean isListedOnSnapdeal; // required
49
  private boolean isListedOnSnapdeal; // required
Line 58... Line 59...
58
  private String supc; // required
59
  private String supc; // required
59
  private String shippingTime; // required
60
  private String shippingTime; // required
60
  private String updatedBy; // required
61
  private String updatedBy; // required
61
  private MarketplaceItems marketplaceItems; // required
62
  private MarketplaceItems marketplaceItems; // required
62
  private double courierCostMarketplace; // required
63
  private double courierCostMarketplace; // required
-
 
64
  private Item item; // 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
    ITEM_ID((short)1, "item_id"),
68
    ITEM_ID((short)1, "item_id"),
67
    WAREHOUSE_ID((short)2, "warehouseId"),
69
    WAREHOUSE_ID((short)2, "warehouseId"),
Line 78... Line 80...
78
    SKU_AT_SNAPDEAL((short)13, "skuAtSnapdeal"),
80
    SKU_AT_SNAPDEAL((short)13, "skuAtSnapdeal"),
79
    SUPC((short)14, "supc"),
81
    SUPC((short)14, "supc"),
80
    SHIPPING_TIME((short)15, "shippingTime"),
82
    SHIPPING_TIME((short)15, "shippingTime"),
81
    UPDATED_BY((short)16, "updatedBy"),
83
    UPDATED_BY((short)16, "updatedBy"),
82
    MARKETPLACE_ITEMS((short)17, "marketplaceItems"),
84
    MARKETPLACE_ITEMS((short)17, "marketplaceItems"),
83
    COURIER_COST_MARKETPLACE((short)18, "courierCostMarketplace");
85
    COURIER_COST_MARKETPLACE((short)18, "courierCostMarketplace"),
-
 
86
    ITEM((short)19, "item");
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 UPDATED_BY;
132
          return UPDATED_BY;
130
        case 17: // MARKETPLACE_ITEMS
133
        case 17: // MARKETPLACE_ITEMS
131
          return MARKETPLACE_ITEMS;
134
          return MARKETPLACE_ITEMS;
132
        case 18: // COURIER_COST_MARKETPLACE
135
        case 18: // COURIER_COST_MARKETPLACE
133
          return COURIER_COST_MARKETPLACE;
136
          return COURIER_COST_MARKETPLACE;
-
 
137
        case 19: // ITEM
-
 
138
          return ITEM;
134
        default:
139
        default:
135
          return null;
140
          return null;
136
      }
141
      }
137
    }
142
    }
138
 
143
 
Line 223... Line 228...
223
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
228
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
224
    tmpMap.put(_Fields.MARKETPLACE_ITEMS, new org.apache.thrift.meta_data.FieldMetaData("marketplaceItems", org.apache.thrift.TFieldRequirementType.DEFAULT, 
229
    tmpMap.put(_Fields.MARKETPLACE_ITEMS, new org.apache.thrift.meta_data.FieldMetaData("marketplaceItems", org.apache.thrift.TFieldRequirementType.DEFAULT, 
225
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MarketplaceItems.class)));
230
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MarketplaceItems.class)));
226
    tmpMap.put(_Fields.COURIER_COST_MARKETPLACE, new org.apache.thrift.meta_data.FieldMetaData("courierCostMarketplace", org.apache.thrift.TFieldRequirementType.DEFAULT, 
231
    tmpMap.put(_Fields.COURIER_COST_MARKETPLACE, new org.apache.thrift.meta_data.FieldMetaData("courierCostMarketplace", org.apache.thrift.TFieldRequirementType.DEFAULT, 
227
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
232
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
-
 
233
    tmpMap.put(_Fields.ITEM, new org.apache.thrift.meta_data.FieldMetaData("item", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
234
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Item.class)));
228
    metaDataMap = Collections.unmodifiableMap(tmpMap);
235
    metaDataMap = Collections.unmodifiableMap(tmpMap);
229
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SnapdealItem.class, metaDataMap);
236
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SnapdealItem.class, metaDataMap);
230
  }
237
  }
231
 
238
 
232
  public SnapdealItem() {
239
  public SnapdealItem() {
Line 248... Line 255...
248
    String skuAtSnapdeal,
255
    String skuAtSnapdeal,
249
    String supc,
256
    String supc,
250
    String shippingTime,
257
    String shippingTime,
251
    String updatedBy,
258
    String updatedBy,
252
    MarketplaceItems marketplaceItems,
259
    MarketplaceItems marketplaceItems,
253
    double courierCostMarketplace)
260
    double courierCostMarketplace,
-
 
261
    Item item)
254
  {
262
  {
255
    this();
263
    this();
256
    this.item_id = item_id;
264
    this.item_id = item_id;
257
    setItem_idIsSet(true);
265
    setItem_idIsSet(true);
258
    this.warehouseId = warehouseId;
266
    this.warehouseId = warehouseId;
Line 282... Line 290...
282
    this.shippingTime = shippingTime;
290
    this.shippingTime = shippingTime;
283
    this.updatedBy = updatedBy;
291
    this.updatedBy = updatedBy;
284
    this.marketplaceItems = marketplaceItems;
292
    this.marketplaceItems = marketplaceItems;
285
    this.courierCostMarketplace = courierCostMarketplace;
293
    this.courierCostMarketplace = courierCostMarketplace;
286
    setCourierCostMarketplaceIsSet(true);
294
    setCourierCostMarketplaceIsSet(true);
-
 
295
    this.item = item;
287
  }
296
  }
288
 
297
 
289
  /**
298
  /**
290
   * Performs a deep copy on <i>other</i>.
299
   * Performs a deep copy on <i>other</i>.
291
   */
300
   */
Line 318... Line 327...
318
    }
327
    }
319
    if (other.isSetMarketplaceItems()) {
328
    if (other.isSetMarketplaceItems()) {
320
      this.marketplaceItems = new MarketplaceItems(other.marketplaceItems);
329
      this.marketplaceItems = new MarketplaceItems(other.marketplaceItems);
321
    }
330
    }
322
    this.courierCostMarketplace = other.courierCostMarketplace;
331
    this.courierCostMarketplace = other.courierCostMarketplace;
-
 
332
    if (other.isSetItem()) {
-
 
333
      this.item = new Item(other.item);
-
 
334
    }
323
  }
335
  }
324
 
336
 
325
  public SnapdealItem deepCopy() {
337
  public SnapdealItem deepCopy() {
326
    return new SnapdealItem(this);
338
    return new SnapdealItem(this);
327
  }
339
  }
Line 357... Line 369...
357
    this.shippingTime = null;
369
    this.shippingTime = null;
358
    this.updatedBy = null;
370
    this.updatedBy = null;
359
    this.marketplaceItems = null;
371
    this.marketplaceItems = null;
360
    setCourierCostMarketplaceIsSet(false);
372
    setCourierCostMarketplaceIsSet(false);
361
    this.courierCostMarketplace = 0.0;
373
    this.courierCostMarketplace = 0.0;
-
 
374
    this.item = null;
362
  }
375
  }
363
 
376
 
364
  public long getItem_id() {
377
  public long getItem_id() {
365
    return this.item_id;
378
    return this.item_id;
366
  }
379
  }
Line 760... Line 773...
760
 
773
 
761
  public void setCourierCostMarketplaceIsSet(boolean value) {
774
  public void setCourierCostMarketplaceIsSet(boolean value) {
762
    __isset_bit_vector.set(__COURIERCOSTMARKETPLACE_ISSET_ID, value);
775
    __isset_bit_vector.set(__COURIERCOSTMARKETPLACE_ISSET_ID, value);
763
  }
776
  }
764
 
777
 
-
 
778
  public Item getItem() {
-
 
779
    return this.item;
-
 
780
  }
-
 
781
 
-
 
782
  public void setItem(Item item) {
-
 
783
    this.item = item;
-
 
784
  }
-
 
785
 
-
 
786
  public void unsetItem() {
-
 
787
    this.item = null;
-
 
788
  }
-
 
789
 
-
 
790
  /** Returns true if field item is set (has been assigned a value) and false otherwise */
-
 
791
  public boolean isSetItem() {
-
 
792
    return this.item != null;
-
 
793
  }
-
 
794
 
-
 
795
  public void setItemIsSet(boolean value) {
-
 
796
    if (!value) {
-
 
797
      this.item = 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 ITEM_ID:
803
    case ITEM_ID:
768
      if (value == null) {
804
      if (value == null) {
769
        unsetItem_id();
805
        unsetItem_id();
Line 906... Line 942...
906
      } else {
942
      } else {
907
        setCourierCostMarketplace((Double)value);
943
        setCourierCostMarketplace((Double)value);
908
      }
944
      }
909
      break;
945
      break;
910
 
946
 
-
 
947
    case ITEM:
-
 
948
      if (value == null) {
-
 
949
        unsetItem();
-
 
950
      } else {
-
 
951
        setItem((Item)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 getMarketplaceItems();
1009
      return getMarketplaceItems();
966
 
1010
 
967
    case COURIER_COST_MARKETPLACE:
1011
    case COURIER_COST_MARKETPLACE:
968
      return Double.valueOf(getCourierCostMarketplace());
1012
      return Double.valueOf(getCourierCostMarketplace());
969
 
1013
 
-
 
1014
    case ITEM:
-
 
1015
      return getItem();
-
 
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 isSetUpdatedBy();
1059
      return isSetUpdatedBy();
1013
    case MARKETPLACE_ITEMS:
1060
    case MARKETPLACE_ITEMS:
1014
      return isSetMarketplaceItems();
1061
      return isSetMarketplaceItems();
1015
    case COURIER_COST_MARKETPLACE:
1062
    case COURIER_COST_MARKETPLACE:
1016
      return isSetCourierCostMarketplace();
1063
      return isSetCourierCostMarketplace();
-
 
1064
    case ITEM:
-
 
1065
      return isSetItem();
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.courierCostMarketplace != that.courierCostMarketplace)
1241
      if (this.courierCostMarketplace != that.courierCostMarketplace)
1193
        return false;
1242
        return false;
1194
    }
1243
    }
1195
 
1244
 
-
 
1245
    boolean this_present_item = true && this.isSetItem();
-
 
1246
    boolean that_present_item = true && that.isSetItem();
-
 
1247
    if (this_present_item || that_present_item) {
-
 
1248
      if (!(this_present_item && that_present_item))
-
 
1249
        return false;
-
 
1250
      if (!this.item.equals(that.item))
-
 
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.courierCostMarketplace, typedOther.courierCostMarketplace);
1445
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.courierCostMarketplace, typedOther.courierCostMarketplace);
1388
      if (lastComparison != 0) {
1446
      if (lastComparison != 0) {
1389
        return lastComparison;
1447
        return lastComparison;
1390
      }
1448
      }
1391
    }
1449
    }
-
 
1450
    lastComparison = Boolean.valueOf(isSetItem()).compareTo(typedOther.isSetItem());
-
 
1451
    if (lastComparison != 0) {
-
 
1452
      return lastComparison;
-
 
1453
    }
-
 
1454
    if (isSetItem()) {
-
 
1455
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.item, typedOther.item);
-
 
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 1544... Line 1612...
1544
            setCourierCostMarketplaceIsSet(true);
1612
            setCourierCostMarketplaceIsSet(true);
1545
          } else { 
1613
          } else { 
1546
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1614
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1547
          }
1615
          }
1548
          break;
1616
          break;
-
 
1617
        case 19: // ITEM
-
 
1618
          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
1619
            this.item = new Item();
-
 
1620
            this.item.read(iprot);
-
 
1621
          } else { 
-
 
1622
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1623
          }
-
 
1624
          break;
1549
        default:
1625
        default:
1550
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1626
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1551
      }
1627
      }
1552
      iprot.readFieldEnd();
1628
      iprot.readFieldEnd();
1553
    }
1629
    }
Line 1621... Line 1697...
1621
      oprot.writeFieldEnd();
1697
      oprot.writeFieldEnd();
1622
    }
1698
    }
1623
    oprot.writeFieldBegin(COURIER_COST_MARKETPLACE_FIELD_DESC);
1699
    oprot.writeFieldBegin(COURIER_COST_MARKETPLACE_FIELD_DESC);
1624
    oprot.writeDouble(this.courierCostMarketplace);
1700
    oprot.writeDouble(this.courierCostMarketplace);
1625
    oprot.writeFieldEnd();
1701
    oprot.writeFieldEnd();
-
 
1702
    if (this.item != null) {
-
 
1703
      oprot.writeFieldBegin(ITEM_FIELD_DESC);
-
 
1704
      this.item.write(oprot);
-
 
1705
      oprot.writeFieldEnd();
-
 
1706
    }
1626
    oprot.writeFieldStop();
1707
    oprot.writeFieldStop();
1627
    oprot.writeStructEnd();
1708
    oprot.writeStructEnd();
1628
  }
1709
  }
1629
 
1710
 
1630
  @Override
1711
  @Override
Line 1721... Line 1802...
1721
    first = false;
1802
    first = false;
1722
    if (!first) sb.append(", ");
1803
    if (!first) sb.append(", ");
1723
    sb.append("courierCostMarketplace:");
1804
    sb.append("courierCostMarketplace:");
1724
    sb.append(this.courierCostMarketplace);
1805
    sb.append(this.courierCostMarketplace);
1725
    first = false;
1806
    first = false;
-
 
1807
    if (!first) sb.append(", ");
-
 
1808
    sb.append("item:");
-
 
1809
    if (this.item == null) {
-
 
1810
      sb.append("null");
-
 
1811
    } else {
-
 
1812
      sb.append(this.item);
-
 
1813
    }
-
 
1814
    first = false;
1726
    sb.append(")");
1815
    sb.append(")");
1727
    return sb.toString();
1816
    return sb.toString();
1728
  }
1817
  }
1729
 
1818
 
1730
  public void validate() throws org.apache.thrift.TException {
1819
  public void validate() throws org.apache.thrift.TException {