Subversion Repositories SmartDukaan

Rev

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

Rev 9478 Rev 9568
Line 43... Line 43...
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 MAX_NLC_FIELD_DESC = new org.apache.thrift.protocol.TField("maxNlc", org.apache.thrift.protocol.TType.DOUBLE, (short)21);
46
  private static final org.apache.thrift.protocol.TField MAX_NLC_FIELD_DESC = new org.apache.thrift.protocol.TField("maxNlc", org.apache.thrift.protocol.TType.DOUBLE, (short)21);
47
  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)22);
47
  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)22);
-
 
48
  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)23);
48
 
49
 
49
  private long item_id; // required
50
  private long item_id; // required
50
  private long warehouseId; // required
51
  private long warehouseId; // required
51
  private double exceptionPrice; // required
52
  private double exceptionPrice; // required
52
  private boolean isListedOnSnapdeal; // required
53
  private boolean isListedOnSnapdeal; // required
Line 66... Line 67...
66
  private double weight; // required
67
  private double weight; // required
67
  private double mrp; // required
68
  private double mrp; // required
68
  private double websiteSellingPrice; // required
69
  private double websiteSellingPrice; // required
69
  private double maxNlc; // required
70
  private double maxNlc; // required
70
  private String skuAtSnapdeal; // required
71
  private String skuAtSnapdeal; // required
-
 
72
  private String supc; // required
71
 
73
 
72
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
74
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
73
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
75
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
74
    ITEM_ID((short)1, "item_id"),
76
    ITEM_ID((short)1, "item_id"),
75
    WAREHOUSE_ID((short)2, "warehouseId"),
77
    WAREHOUSE_ID((short)2, "warehouseId"),
Line 94... Line 96...
94
    SUPPRESS_INVENTORY_FEED((short)17, "suppressInventoryFeed"),
96
    SUPPRESS_INVENTORY_FEED((short)17, "suppressInventoryFeed"),
95
    WEIGHT((short)18, "weight"),
97
    WEIGHT((short)18, "weight"),
96
    MRP((short)19, "mrp"),
98
    MRP((short)19, "mrp"),
97
    WEBSITE_SELLING_PRICE((short)20, "websiteSellingPrice"),
99
    WEBSITE_SELLING_PRICE((short)20, "websiteSellingPrice"),
98
    MAX_NLC((short)21, "maxNlc"),
100
    MAX_NLC((short)21, "maxNlc"),
99
    SKU_AT_SNAPDEAL((short)22, "skuAtSnapdeal");
101
    SKU_AT_SNAPDEAL((short)22, "skuAtSnapdeal"),
-
 
102
    SUPC((short)23, "supc");
100
 
103
 
101
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
104
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
102
 
105
 
103
    static {
106
    static {
104
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
107
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 153... Line 156...
153
          return WEBSITE_SELLING_PRICE;
156
          return WEBSITE_SELLING_PRICE;
154
        case 21: // MAX_NLC
157
        case 21: // MAX_NLC
155
          return MAX_NLC;
158
          return MAX_NLC;
156
        case 22: // SKU_AT_SNAPDEAL
159
        case 22: // SKU_AT_SNAPDEAL
157
          return SKU_AT_SNAPDEAL;
160
          return SKU_AT_SNAPDEAL;
-
 
161
        case 23: // SUPC
-
 
162
          return SUPC;
158
        default:
163
        default:
159
          return null;
164
          return null;
160
      }
165
      }
161
    }
166
    }
162
 
167
 
Line 258... Line 263...
258
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
263
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
259
    tmpMap.put(_Fields.MAX_NLC, new org.apache.thrift.meta_data.FieldMetaData("maxNlc", org.apache.thrift.TFieldRequirementType.DEFAULT, 
264
    tmpMap.put(_Fields.MAX_NLC, new org.apache.thrift.meta_data.FieldMetaData("maxNlc", org.apache.thrift.TFieldRequirementType.DEFAULT, 
260
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
265
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
261
    tmpMap.put(_Fields.SKU_AT_SNAPDEAL, new org.apache.thrift.meta_data.FieldMetaData("skuAtSnapdeal", org.apache.thrift.TFieldRequirementType.DEFAULT, 
266
    tmpMap.put(_Fields.SKU_AT_SNAPDEAL, new org.apache.thrift.meta_data.FieldMetaData("skuAtSnapdeal", org.apache.thrift.TFieldRequirementType.DEFAULT, 
262
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
267
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
268
    tmpMap.put(_Fields.SUPC, new org.apache.thrift.meta_data.FieldMetaData("supc", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
269
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
263
    metaDataMap = Collections.unmodifiableMap(tmpMap);
270
    metaDataMap = Collections.unmodifiableMap(tmpMap);
264
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SnapdealItemDetails.class, metaDataMap);
271
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SnapdealItemDetails.class, metaDataMap);
265
  }
272
  }
266
 
273
 
267
  public SnapdealItemDetails() {
274
  public SnapdealItemDetails() {
Line 287... Line 294...
287
    boolean suppressInventoryFeed,
294
    boolean suppressInventoryFeed,
288
    double weight,
295
    double weight,
289
    double mrp,
296
    double mrp,
290
    double websiteSellingPrice,
297
    double websiteSellingPrice,
291
    double maxNlc,
298
    double maxNlc,
292
    String skuAtSnapdeal)
299
    String skuAtSnapdeal,
-
 
300
    String supc)
293
  {
301
  {
294
    this();
302
    this();
295
    this.item_id = item_id;
303
    this.item_id = item_id;
296
    setItem_idIsSet(true);
304
    setItem_idIsSet(true);
297
    this.warehouseId = warehouseId;
305
    this.warehouseId = warehouseId;
Line 328... Line 336...
328
    this.websiteSellingPrice = websiteSellingPrice;
336
    this.websiteSellingPrice = websiteSellingPrice;
329
    setWebsiteSellingPriceIsSet(true);
337
    setWebsiteSellingPriceIsSet(true);
330
    this.maxNlc = maxNlc;
338
    this.maxNlc = maxNlc;
331
    setMaxNlcIsSet(true);
339
    setMaxNlcIsSet(true);
332
    this.skuAtSnapdeal = skuAtSnapdeal;
340
    this.skuAtSnapdeal = skuAtSnapdeal;
-
 
341
    this.supc = supc;
333
  }
342
  }
334
 
343
 
335
  /**
344
  /**
336
   * Performs a deep copy on <i>other</i>.
345
   * Performs a deep copy on <i>other</i>.
337
   */
346
   */
Line 370... Line 379...
370
    this.websiteSellingPrice = other.websiteSellingPrice;
379
    this.websiteSellingPrice = other.websiteSellingPrice;
371
    this.maxNlc = other.maxNlc;
380
    this.maxNlc = other.maxNlc;
372
    if (other.isSetSkuAtSnapdeal()) {
381
    if (other.isSetSkuAtSnapdeal()) {
373
      this.skuAtSnapdeal = other.skuAtSnapdeal;
382
      this.skuAtSnapdeal = other.skuAtSnapdeal;
374
    }
383
    }
-
 
384
    if (other.isSetSupc()) {
-
 
385
      this.supc = other.supc;
-
 
386
    }
375
  }
387
  }
376
 
388
 
377
  public SnapdealItemDetails deepCopy() {
389
  public SnapdealItemDetails deepCopy() {
378
    return new SnapdealItemDetails(this);
390
    return new SnapdealItemDetails(this);
379
  }
391
  }
Line 416... Line 428...
416
    setWebsiteSellingPriceIsSet(false);
428
    setWebsiteSellingPriceIsSet(false);
417
    this.websiteSellingPrice = 0.0;
429
    this.websiteSellingPrice = 0.0;
418
    setMaxNlcIsSet(false);
430
    setMaxNlcIsSet(false);
419
    this.maxNlc = 0.0;
431
    this.maxNlc = 0.0;
420
    this.skuAtSnapdeal = null;
432
    this.skuAtSnapdeal = null;
-
 
433
    this.supc = null;
421
  }
434
  }
422
 
435
 
423
  public long getItem_id() {
436
  public long getItem_id() {
424
    return this.item_id;
437
    return this.item_id;
425
  }
438
  }
Line 916... Line 929...
916
    if (!value) {
929
    if (!value) {
917
      this.skuAtSnapdeal = null;
930
      this.skuAtSnapdeal = null;
918
    }
931
    }
919
  }
932
  }
920
 
933
 
-
 
934
  public String getSupc() {
-
 
935
    return this.supc;
-
 
936
  }
-
 
937
 
-
 
938
  public void setSupc(String supc) {
-
 
939
    this.supc = supc;
-
 
940
  }
-
 
941
 
-
 
942
  public void unsetSupc() {
-
 
943
    this.supc = null;
-
 
944
  }
-
 
945
 
-
 
946
  /** Returns true if field supc is set (has been assigned a value) and false otherwise */
-
 
947
  public boolean isSetSupc() {
-
 
948
    return this.supc != null;
-
 
949
  }
-
 
950
 
-
 
951
  public void setSupcIsSet(boolean value) {
-
 
952
    if (!value) {
-
 
953
      this.supc = null;
-
 
954
    }
-
 
955
  }
-
 
956
 
921
  public void setFieldValue(_Fields field, Object value) {
957
  public void setFieldValue(_Fields field, Object value) {
922
    switch (field) {
958
    switch (field) {
923
    case ITEM_ID:
959
    case ITEM_ID:
924
      if (value == null) {
960
      if (value == null) {
925
        unsetItem_id();
961
        unsetItem_id();
Line 1094... Line 1130...
1094
      } else {
1130
      } else {
1095
        setSkuAtSnapdeal((String)value);
1131
        setSkuAtSnapdeal((String)value);
1096
      }
1132
      }
1097
      break;
1133
      break;
1098
 
1134
 
-
 
1135
    case SUPC:
-
 
1136
      if (value == null) {
-
 
1137
        unsetSupc();
-
 
1138
      } else {
-
 
1139
        setSupc((String)value);
-
 
1140
      }
-
 
1141
      break;
-
 
1142
 
1099
    }
1143
    }
1100
  }
1144
  }
1101
 
1145
 
1102
  public Object getFieldValue(_Fields field) {
1146
  public Object getFieldValue(_Fields field) {
1103
    switch (field) {
1147
    switch (field) {
Line 1165... Line 1209...
1165
      return Double.valueOf(getMaxNlc());
1209
      return Double.valueOf(getMaxNlc());
1166
 
1210
 
1167
    case SKU_AT_SNAPDEAL:
1211
    case SKU_AT_SNAPDEAL:
1168
      return getSkuAtSnapdeal();
1212
      return getSkuAtSnapdeal();
1169
 
1213
 
-
 
1214
    case SUPC:
-
 
1215
      return getSupc();
-
 
1216
 
1170
    }
1217
    }
1171
    throw new IllegalStateException();
1218
    throw new IllegalStateException();
1172
  }
1219
  }
1173
 
1220
 
1174
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1221
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 1220... Line 1267...
1220
      return isSetWebsiteSellingPrice();
1267
      return isSetWebsiteSellingPrice();
1221
    case MAX_NLC:
1268
    case MAX_NLC:
1222
      return isSetMaxNlc();
1269
      return isSetMaxNlc();
1223
    case SKU_AT_SNAPDEAL:
1270
    case SKU_AT_SNAPDEAL:
1224
      return isSetSkuAtSnapdeal();
1271
      return isSetSkuAtSnapdeal();
-
 
1272
    case SUPC:
-
 
1273
      return isSetSupc();
1225
    }
1274
    }
1226
    throw new IllegalStateException();
1275
    throw new IllegalStateException();
1227
  }
1276
  }
1228
 
1277
 
1229
  @Override
1278
  @Override
Line 1435... Line 1484...
1435
        return false;
1484
        return false;
1436
      if (!this.skuAtSnapdeal.equals(that.skuAtSnapdeal))
1485
      if (!this.skuAtSnapdeal.equals(that.skuAtSnapdeal))
1437
        return false;
1486
        return false;
1438
    }
1487
    }
1439
 
1488
 
-
 
1489
    boolean this_present_supc = true && this.isSetSupc();
-
 
1490
    boolean that_present_supc = true && that.isSetSupc();
-
 
1491
    if (this_present_supc || that_present_supc) {
-
 
1492
      if (!(this_present_supc && that_present_supc))
-
 
1493
        return false;
-
 
1494
      if (!this.supc.equals(that.supc))
-
 
1495
        return false;
-
 
1496
    }
-
 
1497
 
1440
    return true;
1498
    return true;
1441
  }
1499
  }
1442
 
1500
 
1443
  @Override
1501
  @Override
1444
  public int hashCode() {
1502
  public int hashCode() {
Line 1671... Line 1729...
1671
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.skuAtSnapdeal, typedOther.skuAtSnapdeal);
1729
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.skuAtSnapdeal, typedOther.skuAtSnapdeal);
1672
      if (lastComparison != 0) {
1730
      if (lastComparison != 0) {
1673
        return lastComparison;
1731
        return lastComparison;
1674
      }
1732
      }
1675
    }
1733
    }
-
 
1734
    lastComparison = Boolean.valueOf(isSetSupc()).compareTo(typedOther.isSetSupc());
-
 
1735
    if (lastComparison != 0) {
-
 
1736
      return lastComparison;
-
 
1737
    }
-
 
1738
    if (isSetSupc()) {
-
 
1739
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supc, typedOther.supc);
-
 
1740
      if (lastComparison != 0) {
-
 
1741
        return lastComparison;
-
 
1742
      }
-
 
1743
    }
1676
    return 0;
1744
    return 0;
1677
  }
1745
  }
1678
 
1746
 
1679
  public _Fields fieldForId(int fieldId) {
1747
  public _Fields fieldForId(int fieldId) {
1680
    return _Fields.findByThriftId(fieldId);
1748
    return _Fields.findByThriftId(fieldId);
Line 1858... Line 1926...
1858
            this.skuAtSnapdeal = iprot.readString();
1926
            this.skuAtSnapdeal = iprot.readString();
1859
          } else { 
1927
          } else { 
1860
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1928
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1861
          }
1929
          }
1862
          break;
1930
          break;
-
 
1931
        case 23: // SUPC
-
 
1932
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
1933
            this.supc = iprot.readString();
-
 
1934
          } else { 
-
 
1935
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1936
          }
-
 
1937
          break;
1863
        default:
1938
        default:
1864
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1939
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1865
      }
1940
      }
1866
      iprot.readFieldEnd();
1941
      iprot.readFieldEnd();
1867
    }
1942
    }
Line 1949... Line 2024...
1949
    if (this.skuAtSnapdeal != null) {
2024
    if (this.skuAtSnapdeal != null) {
1950
      oprot.writeFieldBegin(SKU_AT_SNAPDEAL_FIELD_DESC);
2025
      oprot.writeFieldBegin(SKU_AT_SNAPDEAL_FIELD_DESC);
1951
      oprot.writeString(this.skuAtSnapdeal);
2026
      oprot.writeString(this.skuAtSnapdeal);
1952
      oprot.writeFieldEnd();
2027
      oprot.writeFieldEnd();
1953
    }
2028
    }
-
 
2029
    if (this.supc != null) {
-
 
2030
      oprot.writeFieldBegin(SUPC_FIELD_DESC);
-
 
2031
      oprot.writeString(this.supc);
-
 
2032
      oprot.writeFieldEnd();
-
 
2033
    }
1954
    oprot.writeFieldStop();
2034
    oprot.writeFieldStop();
1955
    oprot.writeStructEnd();
2035
    oprot.writeStructEnd();
1956
  }
2036
  }
1957
 
2037
 
1958
  @Override
2038
  @Override
Line 2069... Line 2149...
2069
      sb.append("null");
2149
      sb.append("null");
2070
    } else {
2150
    } else {
2071
      sb.append(this.skuAtSnapdeal);
2151
      sb.append(this.skuAtSnapdeal);
2072
    }
2152
    }
2073
    first = false;
2153
    first = false;
-
 
2154
    if (!first) sb.append(", ");
-
 
2155
    sb.append("supc:");
-
 
2156
    if (this.supc == null) {
-
 
2157
      sb.append("null");
-
 
2158
    } else {
-
 
2159
      sb.append(this.supc);
-
 
2160
    }
-
 
2161
    first = false;
2074
    sb.append(")");
2162
    sb.append(")");
2075
    return sb.toString();
2163
    return sb.toString();
2076
  }
2164
  }
2077
 
2165
 
2078
  public void validate() throws org.apache.thrift.TException {
2166
  public void validate() throws org.apache.thrift.TException {