Subversion Repositories SmartDukaan

Rev

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

Rev 9242 Rev 9456
Line 41... Line 41...
41
  private static final org.apache.thrift.protocol.TField SUPPRESS_PRICE_FEED_FIELD_DESC = new org.apache.thrift.protocol.TField("suppressPriceFeed", org.apache.thrift.protocol.TType.BOOL, (short)16);
41
  private static final org.apache.thrift.protocol.TField SUPPRESS_PRICE_FEED_FIELD_DESC = new org.apache.thrift.protocol.TField("suppressPriceFeed", org.apache.thrift.protocol.TType.BOOL, (short)16);
42
  private static final org.apache.thrift.protocol.TField SUPPRESS_INVENTORY_FEED_FIELD_DESC = new org.apache.thrift.protocol.TField("suppressInventoryFeed", org.apache.thrift.protocol.TType.BOOL, (short)17);
42
  private static final org.apache.thrift.protocol.TField SUPPRESS_INVENTORY_FEED_FIELD_DESC = new org.apache.thrift.protocol.TField("suppressInventoryFeed", org.apache.thrift.protocol.TType.BOOL, (short)17);
43
  private static final org.apache.thrift.protocol.TField WEIGHT_FIELD_DESC = new org.apache.thrift.protocol.TField("weight", org.apache.thrift.protocol.TType.DOUBLE, (short)18);
43
  private static final org.apache.thrift.protocol.TField WEIGHT_FIELD_DESC = new org.apache.thrift.protocol.TField("weight", org.apache.thrift.protocol.TType.DOUBLE, (short)18);
44
  private static final org.apache.thrift.protocol.TField MRP_FIELD_DESC = new org.apache.thrift.protocol.TField("mrp", org.apache.thrift.protocol.TType.DOUBLE, (short)19);
44
  private static final org.apache.thrift.protocol.TField MRP_FIELD_DESC = new org.apache.thrift.protocol.TField("mrp", org.apache.thrift.protocol.TType.DOUBLE, (short)19);
45
  private static final org.apache.thrift.protocol.TField WEBSITE_SELLING_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("websiteSellingPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)20);
45
  private static final org.apache.thrift.protocol.TField WEBSITE_SELLING_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("websiteSellingPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)20);
-
 
46
  private static final org.apache.thrift.protocol.TField SKU_AT_SNAPDEAL_FIELD_DESC = new org.apache.thrift.protocol.TField("skuAtSnapdeal", org.apache.thrift.protocol.TType.STRING, (short)21);
46
 
47
 
47
  private long item_id; // required
48
  private long item_id; // required
48
  private long warehouseId; // required
49
  private long warehouseId; // required
49
  private double exceptionPrice; // required
50
  private double exceptionPrice; // required
50
  private boolean isListedOnSnapdeal; // required
51
  private boolean isListedOnSnapdeal; // required
Line 62... Line 63...
62
  private boolean suppressPriceFeed; // required
63
  private boolean suppressPriceFeed; // required
63
  private boolean suppressInventoryFeed; // required
64
  private boolean suppressInventoryFeed; // required
64
  private double weight; // required
65
  private double weight; // required
65
  private double mrp; // required
66
  private double mrp; // required
66
  private double websiteSellingPrice; // required
67
  private double websiteSellingPrice; // required
-
 
68
  private String skuAtSnapdeal; // required
67
 
69
 
68
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
70
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
69
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
71
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
70
    ITEM_ID((short)1, "item_id"),
72
    ITEM_ID((short)1, "item_id"),
71
    WAREHOUSE_ID((short)2, "warehouseId"),
73
    WAREHOUSE_ID((short)2, "warehouseId"),
Line 88... Line 90...
88
    ITEM_STATUS((short)15, "itemStatus"),
90
    ITEM_STATUS((short)15, "itemStatus"),
89
    SUPPRESS_PRICE_FEED((short)16, "suppressPriceFeed"),
91
    SUPPRESS_PRICE_FEED((short)16, "suppressPriceFeed"),
90
    SUPPRESS_INVENTORY_FEED((short)17, "suppressInventoryFeed"),
92
    SUPPRESS_INVENTORY_FEED((short)17, "suppressInventoryFeed"),
91
    WEIGHT((short)18, "weight"),
93
    WEIGHT((short)18, "weight"),
92
    MRP((short)19, "mrp"),
94
    MRP((short)19, "mrp"),
93
    WEBSITE_SELLING_PRICE((short)20, "websiteSellingPrice");
95
    WEBSITE_SELLING_PRICE((short)20, "websiteSellingPrice"),
-
 
96
    SKU_AT_SNAPDEAL((short)21, "skuAtSnapdeal");
94
 
97
 
95
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
98
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
96
 
99
 
97
    static {
100
    static {
98
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
101
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 143... Line 146...
143
          return WEIGHT;
146
          return WEIGHT;
144
        case 19: // MRP
147
        case 19: // MRP
145
          return MRP;
148
          return MRP;
146
        case 20: // WEBSITE_SELLING_PRICE
149
        case 20: // WEBSITE_SELLING_PRICE
147
          return WEBSITE_SELLING_PRICE;
150
          return WEBSITE_SELLING_PRICE;
-
 
151
        case 21: // SKU_AT_SNAPDEAL
-
 
152
          return SKU_AT_SNAPDEAL;
148
        default:
153
        default:
149
          return null;
154
          return null;
150
      }
155
      }
151
    }
156
    }
152
 
157
 
Line 243... Line 248...
243
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
248
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
244
    tmpMap.put(_Fields.MRP, new org.apache.thrift.meta_data.FieldMetaData("mrp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
249
    tmpMap.put(_Fields.MRP, new org.apache.thrift.meta_data.FieldMetaData("mrp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
245
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
250
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
246
    tmpMap.put(_Fields.WEBSITE_SELLING_PRICE, new org.apache.thrift.meta_data.FieldMetaData("websiteSellingPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
251
    tmpMap.put(_Fields.WEBSITE_SELLING_PRICE, new org.apache.thrift.meta_data.FieldMetaData("websiteSellingPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
247
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
252
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
-
 
253
    tmpMap.put(_Fields.SKU_AT_SNAPDEAL, new org.apache.thrift.meta_data.FieldMetaData("skuAtSnapdeal", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
254
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
248
    metaDataMap = Collections.unmodifiableMap(tmpMap);
255
    metaDataMap = Collections.unmodifiableMap(tmpMap);
249
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SnapdealItemDetails.class, metaDataMap);
256
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SnapdealItemDetails.class, metaDataMap);
250
  }
257
  }
251
 
258
 
252
  public SnapdealItemDetails() {
259
  public SnapdealItemDetails() {
Line 270... Line 277...
270
    status itemStatus,
277
    status itemStatus,
271
    boolean suppressPriceFeed,
278
    boolean suppressPriceFeed,
272
    boolean suppressInventoryFeed,
279
    boolean suppressInventoryFeed,
273
    double weight,
280
    double weight,
274
    double mrp,
281
    double mrp,
275
    double websiteSellingPrice)
282
    double websiteSellingPrice,
-
 
283
    String skuAtSnapdeal)
276
  {
284
  {
277
    this();
285
    this();
278
    this.item_id = item_id;
286
    this.item_id = item_id;
279
    setItem_idIsSet(true);
287
    setItem_idIsSet(true);
280
    this.warehouseId = warehouseId;
288
    this.warehouseId = warehouseId;
Line 308... Line 316...
308
    setWeightIsSet(true);
316
    setWeightIsSet(true);
309
    this.mrp = mrp;
317
    this.mrp = mrp;
310
    setMrpIsSet(true);
318
    setMrpIsSet(true);
311
    this.websiteSellingPrice = websiteSellingPrice;
319
    this.websiteSellingPrice = websiteSellingPrice;
312
    setWebsiteSellingPriceIsSet(true);
320
    setWebsiteSellingPriceIsSet(true);
-
 
321
    this.skuAtSnapdeal = skuAtSnapdeal;
313
  }
322
  }
314
 
323
 
315
  /**
324
  /**
316
   * Performs a deep copy on <i>other</i>.
325
   * Performs a deep copy on <i>other</i>.
317
   */
326
   */
Line 346... Line 355...
346
    this.suppressPriceFeed = other.suppressPriceFeed;
355
    this.suppressPriceFeed = other.suppressPriceFeed;
347
    this.suppressInventoryFeed = other.suppressInventoryFeed;
356
    this.suppressInventoryFeed = other.suppressInventoryFeed;
348
    this.weight = other.weight;
357
    this.weight = other.weight;
349
    this.mrp = other.mrp;
358
    this.mrp = other.mrp;
350
    this.websiteSellingPrice = other.websiteSellingPrice;
359
    this.websiteSellingPrice = other.websiteSellingPrice;
-
 
360
    if (other.isSetSkuAtSnapdeal()) {
-
 
361
      this.skuAtSnapdeal = other.skuAtSnapdeal;
-
 
362
    }
351
  }
363
  }
352
 
364
 
353
  public SnapdealItemDetails deepCopy() {
365
  public SnapdealItemDetails deepCopy() {
354
    return new SnapdealItemDetails(this);
366
    return new SnapdealItemDetails(this);
355
  }
367
  }
Line 389... Line 401...
389
    this.weight = 0.0;
401
    this.weight = 0.0;
390
    setMrpIsSet(false);
402
    setMrpIsSet(false);
391
    this.mrp = 0.0;
403
    this.mrp = 0.0;
392
    setWebsiteSellingPriceIsSet(false);
404
    setWebsiteSellingPriceIsSet(false);
393
    this.websiteSellingPrice = 0.0;
405
    this.websiteSellingPrice = 0.0;
-
 
406
    this.skuAtSnapdeal = null;
394
  }
407
  }
395
 
408
 
396
  public long getItem_id() {
409
  public long getItem_id() {
397
    return this.item_id;
410
    return this.item_id;
398
  }
411
  }
Line 844... Line 857...
844
 
857
 
845
  public void setWebsiteSellingPriceIsSet(boolean value) {
858
  public void setWebsiteSellingPriceIsSet(boolean value) {
846
    __isset_bit_vector.set(__WEBSITESELLINGPRICE_ISSET_ID, value);
859
    __isset_bit_vector.set(__WEBSITESELLINGPRICE_ISSET_ID, value);
847
  }
860
  }
848
 
861
 
-
 
862
  public String getSkuAtSnapdeal() {
-
 
863
    return this.skuAtSnapdeal;
-
 
864
  }
-
 
865
 
-
 
866
  public void setSkuAtSnapdeal(String skuAtSnapdeal) {
-
 
867
    this.skuAtSnapdeal = skuAtSnapdeal;
-
 
868
  }
-
 
869
 
-
 
870
  public void unsetSkuAtSnapdeal() {
-
 
871
    this.skuAtSnapdeal = null;
-
 
872
  }
-
 
873
 
-
 
874
  /** Returns true if field skuAtSnapdeal is set (has been assigned a value) and false otherwise */
-
 
875
  public boolean isSetSkuAtSnapdeal() {
-
 
876
    return this.skuAtSnapdeal != null;
-
 
877
  }
-
 
878
 
-
 
879
  public void setSkuAtSnapdealIsSet(boolean value) {
-
 
880
    if (!value) {
-
 
881
      this.skuAtSnapdeal = null;
-
 
882
    }
-
 
883
  }
-
 
884
 
849
  public void setFieldValue(_Fields field, Object value) {
885
  public void setFieldValue(_Fields field, Object value) {
850
    switch (field) {
886
    switch (field) {
851
    case ITEM_ID:
887
    case ITEM_ID:
852
      if (value == null) {
888
      if (value == null) {
853
        unsetItem_id();
889
        unsetItem_id();
Line 1006... Line 1042...
1006
      } else {
1042
      } else {
1007
        setWebsiteSellingPrice((Double)value);
1043
        setWebsiteSellingPrice((Double)value);
1008
      }
1044
      }
1009
      break;
1045
      break;
1010
 
1046
 
-
 
1047
    case SKU_AT_SNAPDEAL:
-
 
1048
      if (value == null) {
-
 
1049
        unsetSkuAtSnapdeal();
-
 
1050
      } else {
-
 
1051
        setSkuAtSnapdeal((String)value);
-
 
1052
      }
-
 
1053
      break;
-
 
1054
 
1011
    }
1055
    }
1012
  }
1056
  }
1013
 
1057
 
1014
  public Object getFieldValue(_Fields field) {
1058
  public Object getFieldValue(_Fields field) {
1015
    switch (field) {
1059
    switch (field) {
Line 1071... Line 1115...
1071
      return Double.valueOf(getMrp());
1115
      return Double.valueOf(getMrp());
1072
 
1116
 
1073
    case WEBSITE_SELLING_PRICE:
1117
    case WEBSITE_SELLING_PRICE:
1074
      return Double.valueOf(getWebsiteSellingPrice());
1118
      return Double.valueOf(getWebsiteSellingPrice());
1075
 
1119
 
-
 
1120
    case SKU_AT_SNAPDEAL:
-
 
1121
      return getSkuAtSnapdeal();
-
 
1122
 
1076
    }
1123
    }
1077
    throw new IllegalStateException();
1124
    throw new IllegalStateException();
1078
  }
1125
  }
1079
 
1126
 
1080
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1127
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 1122... Line 1169...
1122
      return isSetWeight();
1169
      return isSetWeight();
1123
    case MRP:
1170
    case MRP:
1124
      return isSetMrp();
1171
      return isSetMrp();
1125
    case WEBSITE_SELLING_PRICE:
1172
    case WEBSITE_SELLING_PRICE:
1126
      return isSetWebsiteSellingPrice();
1173
      return isSetWebsiteSellingPrice();
-
 
1174
    case SKU_AT_SNAPDEAL:
-
 
1175
      return isSetSkuAtSnapdeal();
1127
    }
1176
    }
1128
    throw new IllegalStateException();
1177
    throw new IllegalStateException();
1129
  }
1178
  }
1130
 
1179
 
1131
  @Override
1180
  @Override
Line 1319... Line 1368...
1319
        return false;
1368
        return false;
1320
      if (this.websiteSellingPrice != that.websiteSellingPrice)
1369
      if (this.websiteSellingPrice != that.websiteSellingPrice)
1321
        return false;
1370
        return false;
1322
    }
1371
    }
1323
 
1372
 
-
 
1373
    boolean this_present_skuAtSnapdeal = true && this.isSetSkuAtSnapdeal();
-
 
1374
    boolean that_present_skuAtSnapdeal = true && that.isSetSkuAtSnapdeal();
-
 
1375
    if (this_present_skuAtSnapdeal || that_present_skuAtSnapdeal) {
-
 
1376
      if (!(this_present_skuAtSnapdeal && that_present_skuAtSnapdeal))
-
 
1377
        return false;
-
 
1378
      if (!this.skuAtSnapdeal.equals(that.skuAtSnapdeal))
-
 
1379
        return false;
-
 
1380
    }
-
 
1381
 
1324
    return true;
1382
    return true;
1325
  }
1383
  }
1326
 
1384
 
1327
  @Override
1385
  @Override
1328
  public int hashCode() {
1386
  public int hashCode() {
Line 1535... Line 1593...
1535
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.websiteSellingPrice, typedOther.websiteSellingPrice);
1593
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.websiteSellingPrice, typedOther.websiteSellingPrice);
1536
      if (lastComparison != 0) {
1594
      if (lastComparison != 0) {
1537
        return lastComparison;
1595
        return lastComparison;
1538
      }
1596
      }
1539
    }
1597
    }
-
 
1598
    lastComparison = Boolean.valueOf(isSetSkuAtSnapdeal()).compareTo(typedOther.isSetSkuAtSnapdeal());
-
 
1599
    if (lastComparison != 0) {
-
 
1600
      return lastComparison;
-
 
1601
    }
-
 
1602
    if (isSetSkuAtSnapdeal()) {
-
 
1603
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.skuAtSnapdeal, typedOther.skuAtSnapdeal);
-
 
1604
      if (lastComparison != 0) {
-
 
1605
        return lastComparison;
-
 
1606
      }
-
 
1607
    }
1540
    return 0;
1608
    return 0;
1541
  }
1609
  }
1542
 
1610
 
1543
  public _Fields fieldForId(int fieldId) {
1611
  public _Fields fieldForId(int fieldId) {
1544
    return _Fields.findByThriftId(fieldId);
1612
    return _Fields.findByThriftId(fieldId);
Line 1707... Line 1775...
1707
            setWebsiteSellingPriceIsSet(true);
1775
            setWebsiteSellingPriceIsSet(true);
1708
          } else { 
1776
          } else { 
1709
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1777
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1710
          }
1778
          }
1711
          break;
1779
          break;
-
 
1780
        case 21: // SKU_AT_SNAPDEAL
-
 
1781
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
1782
            this.skuAtSnapdeal = iprot.readString();
-
 
1783
          } else { 
-
 
1784
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1785
          }
-
 
1786
          break;
1712
        default:
1787
        default:
1713
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1788
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1714
      }
1789
      }
1715
      iprot.readFieldEnd();
1790
      iprot.readFieldEnd();
1716
    }
1791
    }
Line 1790... Line 1865...
1790
    oprot.writeDouble(this.mrp);
1865
    oprot.writeDouble(this.mrp);
1791
    oprot.writeFieldEnd();
1866
    oprot.writeFieldEnd();
1792
    oprot.writeFieldBegin(WEBSITE_SELLING_PRICE_FIELD_DESC);
1867
    oprot.writeFieldBegin(WEBSITE_SELLING_PRICE_FIELD_DESC);
1793
    oprot.writeDouble(this.websiteSellingPrice);
1868
    oprot.writeDouble(this.websiteSellingPrice);
1794
    oprot.writeFieldEnd();
1869
    oprot.writeFieldEnd();
-
 
1870
    if (this.skuAtSnapdeal != null) {
-
 
1871
      oprot.writeFieldBegin(SKU_AT_SNAPDEAL_FIELD_DESC);
-
 
1872
      oprot.writeString(this.skuAtSnapdeal);
-
 
1873
      oprot.writeFieldEnd();
-
 
1874
    }
1795
    oprot.writeFieldStop();
1875
    oprot.writeFieldStop();
1796
    oprot.writeStructEnd();
1876
    oprot.writeStructEnd();
1797
  }
1877
  }
1798
 
1878
 
1799
  @Override
1879
  @Override
Line 1898... Line 1978...
1898
    first = false;
1978
    first = false;
1899
    if (!first) sb.append(", ");
1979
    if (!first) sb.append(", ");
1900
    sb.append("websiteSellingPrice:");
1980
    sb.append("websiteSellingPrice:");
1901
    sb.append(this.websiteSellingPrice);
1981
    sb.append(this.websiteSellingPrice);
1902
    first = false;
1982
    first = false;
-
 
1983
    if (!first) sb.append(", ");
-
 
1984
    sb.append("skuAtSnapdeal:");
-
 
1985
    if (this.skuAtSnapdeal == null) {
-
 
1986
      sb.append("null");
-
 
1987
    } else {
-
 
1988
      sb.append(this.skuAtSnapdeal);
-
 
1989
    }
-
 
1990
    first = false;
1903
    sb.append(")");
1991
    sb.append(")");
1904
    return sb.toString();
1992
    return sb.toString();
1905
  }
1993
  }
1906
 
1994
 
1907
  public void validate() throws org.apache.thrift.TException {
1995
  public void validate() throws org.apache.thrift.TException {