Subversion Repositories SmartDukaan

Rev

Rev 10287 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10287 Rev 11095
Line 43... Line 43...
43
  private static final org.apache.thrift.protocol.TField MINIMUM_POSSIBLE_SP_FIELD_DESC = new org.apache.thrift.protocol.TField("minimumPossibleSp", org.apache.thrift.protocol.TType.DOUBLE, (short)18);
43
  private static final org.apache.thrift.protocol.TField MINIMUM_POSSIBLE_SP_FIELD_DESC = new org.apache.thrift.protocol.TField("minimumPossibleSp", org.apache.thrift.protocol.TType.DOUBLE, (short)18);
44
  private static final org.apache.thrift.protocol.TField MINIMUM_POSSIBLE_TP_FIELD_DESC = new org.apache.thrift.protocol.TField("minimumPossibleTp", org.apache.thrift.protocol.TType.DOUBLE, (short)19);
44
  private static final org.apache.thrift.protocol.TField MINIMUM_POSSIBLE_TP_FIELD_DESC = new org.apache.thrift.protocol.TField("minimumPossibleTp", org.apache.thrift.protocol.TType.DOUBLE, (short)19);
45
  private static final org.apache.thrift.protocol.TField LAST_CHECKED_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("lastCheckedTimestamp", org.apache.thrift.protocol.TType.I64, (short)20);
45
  private static final org.apache.thrift.protocol.TField LAST_CHECKED_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("lastCheckedTimestamp", org.apache.thrift.protocol.TType.I64, (short)20);
46
  private static final org.apache.thrift.protocol.TField MAXIMUM_SELLING_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("maximumSellingPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)21);
46
  private static final org.apache.thrift.protocol.TField MAXIMUM_SELLING_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("maximumSellingPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)21);
47
  private static final org.apache.thrift.protocol.TField PG_FEE_FIELD_DESC = new org.apache.thrift.protocol.TField("pgFee", org.apache.thrift.protocol.TType.DOUBLE, (short)22);
47
  private static final org.apache.thrift.protocol.TField PG_FEE_FIELD_DESC = new org.apache.thrift.protocol.TField("pgFee", org.apache.thrift.protocol.TType.DOUBLE, (short)22);
-
 
48
  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)23);
48
 
49
 
49
  private long itemId; // required
50
  private long itemId; // required
50
  private long source; // required
51
  private long source; // required
51
  private double emiFee; // required
52
  private double emiFee; // required
52
  private double courierCost; // required
53
  private double courierCost; // required
Line 66... Line 67...
66
  private double minimumPossibleSp; // required
67
  private double minimumPossibleSp; // required
67
  private double minimumPossibleTp; // required
68
  private double minimumPossibleTp; // required
68
  private long lastCheckedTimestamp; // required
69
  private long lastCheckedTimestamp; // required
69
  private double maximumSellingPrice; // required
70
  private double maximumSellingPrice; // required
70
  private double pgFee; // required
71
  private double pgFee; // required
-
 
72
  private double courierCostMarketplace; // 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, "itemId"),
76
    ITEM_ID((short)1, "itemId"),
75
    SOURCE((short)2, "source"),
77
    SOURCE((short)2, "source"),
Line 90... Line 92...
90
    CURRENT_TP((short)17, "currentTp"),
92
    CURRENT_TP((short)17, "currentTp"),
91
    MINIMUM_POSSIBLE_SP((short)18, "minimumPossibleSp"),
93
    MINIMUM_POSSIBLE_SP((short)18, "minimumPossibleSp"),
92
    MINIMUM_POSSIBLE_TP((short)19, "minimumPossibleTp"),
94
    MINIMUM_POSSIBLE_TP((short)19, "minimumPossibleTp"),
93
    LAST_CHECKED_TIMESTAMP((short)20, "lastCheckedTimestamp"),
95
    LAST_CHECKED_TIMESTAMP((short)20, "lastCheckedTimestamp"),
94
    MAXIMUM_SELLING_PRICE((short)21, "maximumSellingPrice"),
96
    MAXIMUM_SELLING_PRICE((short)21, "maximumSellingPrice"),
95
    PG_FEE((short)22, "pgFee");
97
    PG_FEE((short)22, "pgFee"),
-
 
98
    COURIER_COST_MARKETPLACE((short)23, "courierCostMarketplace");
96
 
99
 
97
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
100
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
98
 
101
 
99
    static {
102
    static {
100
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
103
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 149... Line 152...
149
          return LAST_CHECKED_TIMESTAMP;
152
          return LAST_CHECKED_TIMESTAMP;
150
        case 21: // MAXIMUM_SELLING_PRICE
153
        case 21: // MAXIMUM_SELLING_PRICE
151
          return MAXIMUM_SELLING_PRICE;
154
          return MAXIMUM_SELLING_PRICE;
152
        case 22: // PG_FEE
155
        case 22: // PG_FEE
153
          return PG_FEE;
156
          return PG_FEE;
-
 
157
        case 23: // COURIER_COST_MARKETPLACE
-
 
158
          return COURIER_COST_MARKETPLACE;
154
        default:
159
        default:
155
          return null;
160
          return null;
156
      }
161
      }
157
    }
162
    }
158
 
163
 
Line 211... Line 216...
211
  private static final int __MINIMUMPOSSIBLESP_ISSET_ID = 17;
216
  private static final int __MINIMUMPOSSIBLESP_ISSET_ID = 17;
212
  private static final int __MINIMUMPOSSIBLETP_ISSET_ID = 18;
217
  private static final int __MINIMUMPOSSIBLETP_ISSET_ID = 18;
213
  private static final int __LASTCHECKEDTIMESTAMP_ISSET_ID = 19;
218
  private static final int __LASTCHECKEDTIMESTAMP_ISSET_ID = 19;
214
  private static final int __MAXIMUMSELLINGPRICE_ISSET_ID = 20;
219
  private static final int __MAXIMUMSELLINGPRICE_ISSET_ID = 20;
215
  private static final int __PGFEE_ISSET_ID = 21;
220
  private static final int __PGFEE_ISSET_ID = 21;
-
 
221
  private static final int __COURIERCOSTMARKETPLACE_ISSET_ID = 22;
216
  private BitSet __isset_bit_vector = new BitSet(22);
222
  private BitSet __isset_bit_vector = new BitSet(23);
217
 
223
 
218
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
224
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
219
  static {
225
  static {
220
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
226
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
221
    tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
227
    tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 260... Line 266...
260
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
266
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
261
    tmpMap.put(_Fields.MAXIMUM_SELLING_PRICE, new org.apache.thrift.meta_data.FieldMetaData("maximumSellingPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
267
    tmpMap.put(_Fields.MAXIMUM_SELLING_PRICE, new org.apache.thrift.meta_data.FieldMetaData("maximumSellingPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
262
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
268
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
263
    tmpMap.put(_Fields.PG_FEE, new org.apache.thrift.meta_data.FieldMetaData("pgFee", org.apache.thrift.TFieldRequirementType.DEFAULT, 
269
    tmpMap.put(_Fields.PG_FEE, new org.apache.thrift.meta_data.FieldMetaData("pgFee", org.apache.thrift.TFieldRequirementType.DEFAULT, 
264
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
270
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
-
 
271
    tmpMap.put(_Fields.COURIER_COST_MARKETPLACE, new org.apache.thrift.meta_data.FieldMetaData("courierCostMarketplace", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
272
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
265
    metaDataMap = Collections.unmodifiableMap(tmpMap);
273
    metaDataMap = Collections.unmodifiableMap(tmpMap);
266
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MarketplaceItems.class, metaDataMap);
274
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MarketplaceItems.class, metaDataMap);
267
  }
275
  }
268
 
276
 
269
  public MarketplaceItems() {
277
  public MarketplaceItems() {
Line 289... Line 297...
289
    double currentTp,
297
    double currentTp,
290
    double minimumPossibleSp,
298
    double minimumPossibleSp,
291
    double minimumPossibleTp,
299
    double minimumPossibleTp,
292
    long lastCheckedTimestamp,
300
    long lastCheckedTimestamp,
293
    double maximumSellingPrice,
301
    double maximumSellingPrice,
294
    double pgFee)
302
    double pgFee,
-
 
303
    double courierCostMarketplace)
295
  {
304
  {
296
    this();
305
    this();
297
    this.itemId = itemId;
306
    this.itemId = itemId;
298
    setItemIdIsSet(true);
307
    setItemIdIsSet(true);
299
    this.source = source;
308
    this.source = source;
Line 336... Line 345...
336
    setLastCheckedTimestampIsSet(true);
345
    setLastCheckedTimestampIsSet(true);
337
    this.maximumSellingPrice = maximumSellingPrice;
346
    this.maximumSellingPrice = maximumSellingPrice;
338
    setMaximumSellingPriceIsSet(true);
347
    setMaximumSellingPriceIsSet(true);
339
    this.pgFee = pgFee;
348
    this.pgFee = pgFee;
340
    setPgFeeIsSet(true);
349
    setPgFeeIsSet(true);
-
 
350
    this.courierCostMarketplace = courierCostMarketplace;
-
 
351
    setCourierCostMarketplaceIsSet(true);
341
  }
352
  }
342
 
353
 
343
  /**
354
  /**
344
   * Performs a deep copy on <i>other</i>.
355
   * Performs a deep copy on <i>other</i>.
345
   */
356
   */
Line 366... Line 377...
366
    this.minimumPossibleSp = other.minimumPossibleSp;
377
    this.minimumPossibleSp = other.minimumPossibleSp;
367
    this.minimumPossibleTp = other.minimumPossibleTp;
378
    this.minimumPossibleTp = other.minimumPossibleTp;
368
    this.lastCheckedTimestamp = other.lastCheckedTimestamp;
379
    this.lastCheckedTimestamp = other.lastCheckedTimestamp;
369
    this.maximumSellingPrice = other.maximumSellingPrice;
380
    this.maximumSellingPrice = other.maximumSellingPrice;
370
    this.pgFee = other.pgFee;
381
    this.pgFee = other.pgFee;
-
 
382
    this.courierCostMarketplace = other.courierCostMarketplace;
371
  }
383
  }
372
 
384
 
373
  public MarketplaceItems deepCopy() {
385
  public MarketplaceItems deepCopy() {
374
    return new MarketplaceItems(this);
386
    return new MarketplaceItems(this);
375
  }
387
  }
Line 418... Line 430...
418
    this.lastCheckedTimestamp = 0;
430
    this.lastCheckedTimestamp = 0;
419
    setMaximumSellingPriceIsSet(false);
431
    setMaximumSellingPriceIsSet(false);
420
    this.maximumSellingPrice = 0.0;
432
    this.maximumSellingPrice = 0.0;
421
    setPgFeeIsSet(false);
433
    setPgFeeIsSet(false);
422
    this.pgFee = 0.0;
434
    this.pgFee = 0.0;
-
 
435
    setCourierCostMarketplaceIsSet(false);
-
 
436
    this.courierCostMarketplace = 0.0;
423
  }
437
  }
424
 
438
 
425
  public long getItemId() {
439
  public long getItemId() {
426
    return this.itemId;
440
    return this.itemId;
427
  }
441
  }
Line 904... Line 918...
904
 
918
 
905
  public void setPgFeeIsSet(boolean value) {
919
  public void setPgFeeIsSet(boolean value) {
906
    __isset_bit_vector.set(__PGFEE_ISSET_ID, value);
920
    __isset_bit_vector.set(__PGFEE_ISSET_ID, value);
907
  }
921
  }
908
 
922
 
-
 
923
  public double getCourierCostMarketplace() {
-
 
924
    return this.courierCostMarketplace;
-
 
925
  }
-
 
926
 
-
 
927
  public void setCourierCostMarketplace(double courierCostMarketplace) {
-
 
928
    this.courierCostMarketplace = courierCostMarketplace;
-
 
929
    setCourierCostMarketplaceIsSet(true);
-
 
930
  }
-
 
931
 
-
 
932
  public void unsetCourierCostMarketplace() {
-
 
933
    __isset_bit_vector.clear(__COURIERCOSTMARKETPLACE_ISSET_ID);
-
 
934
  }
-
 
935
 
-
 
936
  /** Returns true if field courierCostMarketplace is set (has been assigned a value) and false otherwise */
-
 
937
  public boolean isSetCourierCostMarketplace() {
-
 
938
    return __isset_bit_vector.get(__COURIERCOSTMARKETPLACE_ISSET_ID);
-
 
939
  }
-
 
940
 
-
 
941
  public void setCourierCostMarketplaceIsSet(boolean value) {
-
 
942
    __isset_bit_vector.set(__COURIERCOSTMARKETPLACE_ISSET_ID, value);
-
 
943
  }
-
 
944
 
909
  public void setFieldValue(_Fields field, Object value) {
945
  public void setFieldValue(_Fields field, Object value) {
910
    switch (field) {
946
    switch (field) {
911
    case ITEM_ID:
947
    case ITEM_ID:
912
      if (value == null) {
948
      if (value == null) {
913
        unsetItemId();
949
        unsetItemId();
Line 1082... Line 1118...
1082
      } else {
1118
      } else {
1083
        setPgFee((Double)value);
1119
        setPgFee((Double)value);
1084
      }
1120
      }
1085
      break;
1121
      break;
1086
 
1122
 
-
 
1123
    case COURIER_COST_MARKETPLACE:
-
 
1124
      if (value == null) {
-
 
1125
        unsetCourierCostMarketplace();
-
 
1126
      } else {
-
 
1127
        setCourierCostMarketplace((Double)value);
-
 
1128
      }
-
 
1129
      break;
-
 
1130
 
1087
    }
1131
    }
1088
  }
1132
  }
1089
 
1133
 
1090
  public Object getFieldValue(_Fields field) {
1134
  public Object getFieldValue(_Fields field) {
1091
    switch (field) {
1135
    switch (field) {
Line 1153... Line 1197...
1153
      return Double.valueOf(getMaximumSellingPrice());
1197
      return Double.valueOf(getMaximumSellingPrice());
1154
 
1198
 
1155
    case PG_FEE:
1199
    case PG_FEE:
1156
      return Double.valueOf(getPgFee());
1200
      return Double.valueOf(getPgFee());
1157
 
1201
 
-
 
1202
    case COURIER_COST_MARKETPLACE:
-
 
1203
      return Double.valueOf(getCourierCostMarketplace());
-
 
1204
 
1158
    }
1205
    }
1159
    throw new IllegalStateException();
1206
    throw new IllegalStateException();
1160
  }
1207
  }
1161
 
1208
 
1162
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1209
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 1208... Line 1255...
1208
      return isSetLastCheckedTimestamp();
1255
      return isSetLastCheckedTimestamp();
1209
    case MAXIMUM_SELLING_PRICE:
1256
    case MAXIMUM_SELLING_PRICE:
1210
      return isSetMaximumSellingPrice();
1257
      return isSetMaximumSellingPrice();
1211
    case PG_FEE:
1258
    case PG_FEE:
1212
      return isSetPgFee();
1259
      return isSetPgFee();
-
 
1260
    case COURIER_COST_MARKETPLACE:
-
 
1261
      return isSetCourierCostMarketplace();
1213
    }
1262
    }
1214
    throw new IllegalStateException();
1263
    throw new IllegalStateException();
1215
  }
1264
  }
1216
 
1265
 
1217
  @Override
1266
  @Override
Line 1423... Line 1472...
1423
        return false;
1472
        return false;
1424
      if (this.pgFee != that.pgFee)
1473
      if (this.pgFee != that.pgFee)
1425
        return false;
1474
        return false;
1426
    }
1475
    }
1427
 
1476
 
-
 
1477
    boolean this_present_courierCostMarketplace = true;
-
 
1478
    boolean that_present_courierCostMarketplace = true;
-
 
1479
    if (this_present_courierCostMarketplace || that_present_courierCostMarketplace) {
-
 
1480
      if (!(this_present_courierCostMarketplace && that_present_courierCostMarketplace))
-
 
1481
        return false;
-
 
1482
      if (this.courierCostMarketplace != that.courierCostMarketplace)
-
 
1483
        return false;
-
 
1484
    }
-
 
1485
 
1428
    return true;
1486
    return true;
1429
  }
1487
  }
1430
 
1488
 
1431
  @Override
1489
  @Override
1432
  public int hashCode() {
1490
  public int hashCode() {
Line 1659... Line 1717...
1659
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pgFee, typedOther.pgFee);
1717
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pgFee, typedOther.pgFee);
1660
      if (lastComparison != 0) {
1718
      if (lastComparison != 0) {
1661
        return lastComparison;
1719
        return lastComparison;
1662
      }
1720
      }
1663
    }
1721
    }
-
 
1722
    lastComparison = Boolean.valueOf(isSetCourierCostMarketplace()).compareTo(typedOther.isSetCourierCostMarketplace());
-
 
1723
    if (lastComparison != 0) {
-
 
1724
      return lastComparison;
-
 
1725
    }
-
 
1726
    if (isSetCourierCostMarketplace()) {
-
 
1727
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.courierCostMarketplace, typedOther.courierCostMarketplace);
-
 
1728
      if (lastComparison != 0) {
-
 
1729
        return lastComparison;
-
 
1730
      }
-
 
1731
    }
1664
    return 0;
1732
    return 0;
1665
  }
1733
  }
1666
 
1734
 
1667
  public _Fields fieldForId(int fieldId) {
1735
  public _Fields fieldForId(int fieldId) {
1668
    return _Fields.findByThriftId(fieldId);
1736
    return _Fields.findByThriftId(fieldId);
Line 1852... Line 1920...
1852
            setPgFeeIsSet(true);
1920
            setPgFeeIsSet(true);
1853
          } else { 
1921
          } else { 
1854
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1922
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1855
          }
1923
          }
1856
          break;
1924
          break;
-
 
1925
        case 23: // COURIER_COST_MARKETPLACE
-
 
1926
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
-
 
1927
            this.courierCostMarketplace = iprot.readDouble();
-
 
1928
            setCourierCostMarketplaceIsSet(true);
-
 
1929
          } else { 
-
 
1930
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1931
          }
-
 
1932
          break;
1857
        default:
1933
        default:
1858
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1934
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1859
      }
1935
      }
1860
      iprot.readFieldEnd();
1936
      iprot.readFieldEnd();
1861
    }
1937
    }
Line 1931... Line 2007...
1931
    oprot.writeDouble(this.maximumSellingPrice);
2007
    oprot.writeDouble(this.maximumSellingPrice);
1932
    oprot.writeFieldEnd();
2008
    oprot.writeFieldEnd();
1933
    oprot.writeFieldBegin(PG_FEE_FIELD_DESC);
2009
    oprot.writeFieldBegin(PG_FEE_FIELD_DESC);
1934
    oprot.writeDouble(this.pgFee);
2010
    oprot.writeDouble(this.pgFee);
1935
    oprot.writeFieldEnd();
2011
    oprot.writeFieldEnd();
-
 
2012
    oprot.writeFieldBegin(COURIER_COST_MARKETPLACE_FIELD_DESC);
-
 
2013
    oprot.writeDouble(this.courierCostMarketplace);
-
 
2014
    oprot.writeFieldEnd();
1936
    oprot.writeFieldStop();
2015
    oprot.writeFieldStop();
1937
    oprot.writeStructEnd();
2016
    oprot.writeStructEnd();
1938
  }
2017
  }
1939
 
2018
 
1940
  @Override
2019
  @Override
Line 2027... Line 2106...
2027
    first = false;
2106
    first = false;
2028
    if (!first) sb.append(", ");
2107
    if (!first) sb.append(", ");
2029
    sb.append("pgFee:");
2108
    sb.append("pgFee:");
2030
    sb.append(this.pgFee);
2109
    sb.append(this.pgFee);
2031
    first = false;
2110
    first = false;
-
 
2111
    if (!first) sb.append(", ");
-
 
2112
    sb.append("courierCostMarketplace:");
-
 
2113
    sb.append(this.courierCostMarketplace);
-
 
2114
    first = false;
2032
    sb.append(")");
2115
    sb.append(")");
2033
    return sb.toString();
2116
    return sb.toString();
2034
  }
2117
  }
2035
 
2118
 
2036
  public void validate() throws org.apache.thrift.TException {
2119
  public void validate() throws org.apache.thrift.TException {