Subversion Repositories SmartDukaan

Rev

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

Rev 9909 Rev 10287
Line 42... Line 42...
42
  private static final org.apache.thrift.protocol.TField CURRENT_TP_FIELD_DESC = new org.apache.thrift.protocol.TField("currentTp", org.apache.thrift.protocol.TType.DOUBLE, (short)17);
42
  private static final org.apache.thrift.protocol.TField CURRENT_TP_FIELD_DESC = new org.apache.thrift.protocol.TField("currentTp", org.apache.thrift.protocol.TType.DOUBLE, (short)17);
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
 
48
 
48
  private long itemId; // required
49
  private long itemId; // required
49
  private long source; // required
50
  private long source; // required
50
  private double emiFee; // required
51
  private double emiFee; // required
51
  private double courierCost; // required
52
  private double courierCost; // required
Line 64... Line 65...
64
  private double currentTp; // required
65
  private double currentTp; // required
65
  private double minimumPossibleSp; // required
66
  private double minimumPossibleSp; // required
66
  private double minimumPossibleTp; // required
67
  private double minimumPossibleTp; // required
67
  private long lastCheckedTimestamp; // required
68
  private long lastCheckedTimestamp; // required
68
  private double maximumSellingPrice; // required
69
  private double maximumSellingPrice; // required
-
 
70
  private double pgFee; // required
69
 
71
 
70
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
72
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
71
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
73
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
72
    ITEM_ID((short)1, "itemId"),
74
    ITEM_ID((short)1, "itemId"),
73
    SOURCE((short)2, "source"),
75
    SOURCE((short)2, "source"),
Line 87... Line 89...
87
    CURRENT_SP((short)16, "currentSp"),
89
    CURRENT_SP((short)16, "currentSp"),
88
    CURRENT_TP((short)17, "currentTp"),
90
    CURRENT_TP((short)17, "currentTp"),
89
    MINIMUM_POSSIBLE_SP((short)18, "minimumPossibleSp"),
91
    MINIMUM_POSSIBLE_SP((short)18, "minimumPossibleSp"),
90
    MINIMUM_POSSIBLE_TP((short)19, "minimumPossibleTp"),
92
    MINIMUM_POSSIBLE_TP((short)19, "minimumPossibleTp"),
91
    LAST_CHECKED_TIMESTAMP((short)20, "lastCheckedTimestamp"),
93
    LAST_CHECKED_TIMESTAMP((short)20, "lastCheckedTimestamp"),
92
    MAXIMUM_SELLING_PRICE((short)21, "maximumSellingPrice");
94
    MAXIMUM_SELLING_PRICE((short)21, "maximumSellingPrice"),
-
 
95
    PG_FEE((short)22, "pgFee");
93
 
96
 
94
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
97
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
95
 
98
 
96
    static {
99
    static {
97
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
100
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 144... Line 147...
144
          return MINIMUM_POSSIBLE_TP;
147
          return MINIMUM_POSSIBLE_TP;
145
        case 20: // LAST_CHECKED_TIMESTAMP
148
        case 20: // LAST_CHECKED_TIMESTAMP
146
          return LAST_CHECKED_TIMESTAMP;
149
          return LAST_CHECKED_TIMESTAMP;
147
        case 21: // MAXIMUM_SELLING_PRICE
150
        case 21: // MAXIMUM_SELLING_PRICE
148
          return MAXIMUM_SELLING_PRICE;
151
          return MAXIMUM_SELLING_PRICE;
-
 
152
        case 22: // PG_FEE
-
 
153
          return PG_FEE;
149
        default:
154
        default:
150
          return null;
155
          return null;
151
      }
156
      }
152
    }
157
    }
153
 
158
 
Line 205... Line 210...
205
  private static final int __CURRENTTP_ISSET_ID = 16;
210
  private static final int __CURRENTTP_ISSET_ID = 16;
206
  private static final int __MINIMUMPOSSIBLESP_ISSET_ID = 17;
211
  private static final int __MINIMUMPOSSIBLESP_ISSET_ID = 17;
207
  private static final int __MINIMUMPOSSIBLETP_ISSET_ID = 18;
212
  private static final int __MINIMUMPOSSIBLETP_ISSET_ID = 18;
208
  private static final int __LASTCHECKEDTIMESTAMP_ISSET_ID = 19;
213
  private static final int __LASTCHECKEDTIMESTAMP_ISSET_ID = 19;
209
  private static final int __MAXIMUMSELLINGPRICE_ISSET_ID = 20;
214
  private static final int __MAXIMUMSELLINGPRICE_ISSET_ID = 20;
-
 
215
  private static final int __PGFEE_ISSET_ID = 21;
210
  private BitSet __isset_bit_vector = new BitSet(21);
216
  private BitSet __isset_bit_vector = new BitSet(22);
211
 
217
 
212
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
218
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
213
  static {
219
  static {
214
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
220
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
215
    tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
221
    tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 252... Line 258...
252
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
258
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
253
    tmpMap.put(_Fields.LAST_CHECKED_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("lastCheckedTimestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
259
    tmpMap.put(_Fields.LAST_CHECKED_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("lastCheckedTimestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
254
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
260
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
255
    tmpMap.put(_Fields.MAXIMUM_SELLING_PRICE, new org.apache.thrift.meta_data.FieldMetaData("maximumSellingPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
261
    tmpMap.put(_Fields.MAXIMUM_SELLING_PRICE, new org.apache.thrift.meta_data.FieldMetaData("maximumSellingPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
256
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
262
        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, 
-
 
264
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
257
    metaDataMap = Collections.unmodifiableMap(tmpMap);
265
    metaDataMap = Collections.unmodifiableMap(tmpMap);
258
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MarketplaceItems.class, metaDataMap);
266
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MarketplaceItems.class, metaDataMap);
259
  }
267
  }
260
 
268
 
261
  public MarketplaceItems() {
269
  public MarketplaceItems() {
Line 280... Line 288...
280
    double currentSp,
288
    double currentSp,
281
    double currentTp,
289
    double currentTp,
282
    double minimumPossibleSp,
290
    double minimumPossibleSp,
283
    double minimumPossibleTp,
291
    double minimumPossibleTp,
284
    long lastCheckedTimestamp,
292
    long lastCheckedTimestamp,
285
    double maximumSellingPrice)
293
    double maximumSellingPrice,
-
 
294
    double pgFee)
286
  {
295
  {
287
    this();
296
    this();
288
    this.itemId = itemId;
297
    this.itemId = itemId;
289
    setItemIdIsSet(true);
298
    setItemIdIsSet(true);
290
    this.source = source;
299
    this.source = source;
Line 325... Line 334...
325
    setMinimumPossibleTpIsSet(true);
334
    setMinimumPossibleTpIsSet(true);
326
    this.lastCheckedTimestamp = lastCheckedTimestamp;
335
    this.lastCheckedTimestamp = lastCheckedTimestamp;
327
    setLastCheckedTimestampIsSet(true);
336
    setLastCheckedTimestampIsSet(true);
328
    this.maximumSellingPrice = maximumSellingPrice;
337
    this.maximumSellingPrice = maximumSellingPrice;
329
    setMaximumSellingPriceIsSet(true);
338
    setMaximumSellingPriceIsSet(true);
-
 
339
    this.pgFee = pgFee;
-
 
340
    setPgFeeIsSet(true);
330
  }
341
  }
331
 
342
 
332
  /**
343
  /**
333
   * Performs a deep copy on <i>other</i>.
344
   * Performs a deep copy on <i>other</i>.
334
   */
345
   */
Line 354... Line 365...
354
    this.currentTp = other.currentTp;
365
    this.currentTp = other.currentTp;
355
    this.minimumPossibleSp = other.minimumPossibleSp;
366
    this.minimumPossibleSp = other.minimumPossibleSp;
356
    this.minimumPossibleTp = other.minimumPossibleTp;
367
    this.minimumPossibleTp = other.minimumPossibleTp;
357
    this.lastCheckedTimestamp = other.lastCheckedTimestamp;
368
    this.lastCheckedTimestamp = other.lastCheckedTimestamp;
358
    this.maximumSellingPrice = other.maximumSellingPrice;
369
    this.maximumSellingPrice = other.maximumSellingPrice;
-
 
370
    this.pgFee = other.pgFee;
359
  }
371
  }
360
 
372
 
361
  public MarketplaceItems deepCopy() {
373
  public MarketplaceItems deepCopy() {
362
    return new MarketplaceItems(this);
374
    return new MarketplaceItems(this);
363
  }
375
  }
Line 404... Line 416...
404
    this.minimumPossibleTp = 0.0;
416
    this.minimumPossibleTp = 0.0;
405
    setLastCheckedTimestampIsSet(false);
417
    setLastCheckedTimestampIsSet(false);
406
    this.lastCheckedTimestamp = 0;
418
    this.lastCheckedTimestamp = 0;
407
    setMaximumSellingPriceIsSet(false);
419
    setMaximumSellingPriceIsSet(false);
408
    this.maximumSellingPrice = 0.0;
420
    this.maximumSellingPrice = 0.0;
-
 
421
    setPgFeeIsSet(false);
-
 
422
    this.pgFee = 0.0;
409
  }
423
  }
410
 
424
 
411
  public long getItemId() {
425
  public long getItemId() {
412
    return this.itemId;
426
    return this.itemId;
413
  }
427
  }
Line 868... Line 882...
868
 
882
 
869
  public void setMaximumSellingPriceIsSet(boolean value) {
883
  public void setMaximumSellingPriceIsSet(boolean value) {
870
    __isset_bit_vector.set(__MAXIMUMSELLINGPRICE_ISSET_ID, value);
884
    __isset_bit_vector.set(__MAXIMUMSELLINGPRICE_ISSET_ID, value);
871
  }
885
  }
872
 
886
 
-
 
887
  public double getPgFee() {
-
 
888
    return this.pgFee;
-
 
889
  }
-
 
890
 
-
 
891
  public void setPgFee(double pgFee) {
-
 
892
    this.pgFee = pgFee;
-
 
893
    setPgFeeIsSet(true);
-
 
894
  }
-
 
895
 
-
 
896
  public void unsetPgFee() {
-
 
897
    __isset_bit_vector.clear(__PGFEE_ISSET_ID);
-
 
898
  }
-
 
899
 
-
 
900
  /** Returns true if field pgFee is set (has been assigned a value) and false otherwise */
-
 
901
  public boolean isSetPgFee() {
-
 
902
    return __isset_bit_vector.get(__PGFEE_ISSET_ID);
-
 
903
  }
-
 
904
 
-
 
905
  public void setPgFeeIsSet(boolean value) {
-
 
906
    __isset_bit_vector.set(__PGFEE_ISSET_ID, value);
-
 
907
  }
-
 
908
 
873
  public void setFieldValue(_Fields field, Object value) {
909
  public void setFieldValue(_Fields field, Object value) {
874
    switch (field) {
910
    switch (field) {
875
    case ITEM_ID:
911
    case ITEM_ID:
876
      if (value == null) {
912
      if (value == null) {
877
        unsetItemId();
913
        unsetItemId();
Line 1038... Line 1074...
1038
      } else {
1074
      } else {
1039
        setMaximumSellingPrice((Double)value);
1075
        setMaximumSellingPrice((Double)value);
1040
      }
1076
      }
1041
      break;
1077
      break;
1042
 
1078
 
-
 
1079
    case PG_FEE:
-
 
1080
      if (value == null) {
-
 
1081
        unsetPgFee();
-
 
1082
      } else {
-
 
1083
        setPgFee((Double)value);
-
 
1084
      }
-
 
1085
      break;
-
 
1086
 
1043
    }
1087
    }
1044
  }
1088
  }
1045
 
1089
 
1046
  public Object getFieldValue(_Fields field) {
1090
  public Object getFieldValue(_Fields field) {
1047
    switch (field) {
1091
    switch (field) {
Line 1106... Line 1150...
1106
      return Long.valueOf(getLastCheckedTimestamp());
1150
      return Long.valueOf(getLastCheckedTimestamp());
1107
 
1151
 
1108
    case MAXIMUM_SELLING_PRICE:
1152
    case MAXIMUM_SELLING_PRICE:
1109
      return Double.valueOf(getMaximumSellingPrice());
1153
      return Double.valueOf(getMaximumSellingPrice());
1110
 
1154
 
-
 
1155
    case PG_FEE:
-
 
1156
      return Double.valueOf(getPgFee());
-
 
1157
 
1111
    }
1158
    }
1112
    throw new IllegalStateException();
1159
    throw new IllegalStateException();
1113
  }
1160
  }
1114
 
1161
 
1115
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1162
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 1159... Line 1206...
1159
      return isSetMinimumPossibleTp();
1206
      return isSetMinimumPossibleTp();
1160
    case LAST_CHECKED_TIMESTAMP:
1207
    case LAST_CHECKED_TIMESTAMP:
1161
      return isSetLastCheckedTimestamp();
1208
      return isSetLastCheckedTimestamp();
1162
    case MAXIMUM_SELLING_PRICE:
1209
    case MAXIMUM_SELLING_PRICE:
1163
      return isSetMaximumSellingPrice();
1210
      return isSetMaximumSellingPrice();
-
 
1211
    case PG_FEE:
-
 
1212
      return isSetPgFee();
1164
    }
1213
    }
1165
    throw new IllegalStateException();
1214
    throw new IllegalStateException();
1166
  }
1215
  }
1167
 
1216
 
1168
  @Override
1217
  @Override
Line 1365... Line 1414...
1365
        return false;
1414
        return false;
1366
      if (this.maximumSellingPrice != that.maximumSellingPrice)
1415
      if (this.maximumSellingPrice != that.maximumSellingPrice)
1367
        return false;
1416
        return false;
1368
    }
1417
    }
1369
 
1418
 
-
 
1419
    boolean this_present_pgFee = true;
-
 
1420
    boolean that_present_pgFee = true;
-
 
1421
    if (this_present_pgFee || that_present_pgFee) {
-
 
1422
      if (!(this_present_pgFee && that_present_pgFee))
-
 
1423
        return false;
-
 
1424
      if (this.pgFee != that.pgFee)
-
 
1425
        return false;
-
 
1426
    }
-
 
1427
 
1370
    return true;
1428
    return true;
1371
  }
1429
  }
1372
 
1430
 
1373
  @Override
1431
  @Override
1374
  public int hashCode() {
1432
  public int hashCode() {
Line 1591... Line 1649...
1591
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maximumSellingPrice, typedOther.maximumSellingPrice);
1649
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maximumSellingPrice, typedOther.maximumSellingPrice);
1592
      if (lastComparison != 0) {
1650
      if (lastComparison != 0) {
1593
        return lastComparison;
1651
        return lastComparison;
1594
      }
1652
      }
1595
    }
1653
    }
-
 
1654
    lastComparison = Boolean.valueOf(isSetPgFee()).compareTo(typedOther.isSetPgFee());
-
 
1655
    if (lastComparison != 0) {
-
 
1656
      return lastComparison;
-
 
1657
    }
-
 
1658
    if (isSetPgFee()) {
-
 
1659
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pgFee, typedOther.pgFee);
-
 
1660
      if (lastComparison != 0) {
-
 
1661
        return lastComparison;
-
 
1662
      }
-
 
1663
    }
1596
    return 0;
1664
    return 0;
1597
  }
1665
  }
1598
 
1666
 
1599
  public _Fields fieldForId(int fieldId) {
1667
  public _Fields fieldForId(int fieldId) {
1600
    return _Fields.findByThriftId(fieldId);
1668
    return _Fields.findByThriftId(fieldId);
Line 1776... Line 1844...
1776
            setMaximumSellingPriceIsSet(true);
1844
            setMaximumSellingPriceIsSet(true);
1777
          } else { 
1845
          } else { 
1778
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1846
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1779
          }
1847
          }
1780
          break;
1848
          break;
-
 
1849
        case 22: // PG_FEE
-
 
1850
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
-
 
1851
            this.pgFee = iprot.readDouble();
-
 
1852
            setPgFeeIsSet(true);
-
 
1853
          } else { 
-
 
1854
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1855
          }
-
 
1856
          break;
1781
        default:
1857
        default:
1782
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1858
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1783
      }
1859
      }
1784
      iprot.readFieldEnd();
1860
      iprot.readFieldEnd();
1785
    }
1861
    }
Line 1852... Line 1928...
1852
    oprot.writeI64(this.lastCheckedTimestamp);
1928
    oprot.writeI64(this.lastCheckedTimestamp);
1853
    oprot.writeFieldEnd();
1929
    oprot.writeFieldEnd();
1854
    oprot.writeFieldBegin(MAXIMUM_SELLING_PRICE_FIELD_DESC);
1930
    oprot.writeFieldBegin(MAXIMUM_SELLING_PRICE_FIELD_DESC);
1855
    oprot.writeDouble(this.maximumSellingPrice);
1931
    oprot.writeDouble(this.maximumSellingPrice);
1856
    oprot.writeFieldEnd();
1932
    oprot.writeFieldEnd();
-
 
1933
    oprot.writeFieldBegin(PG_FEE_FIELD_DESC);
-
 
1934
    oprot.writeDouble(this.pgFee);
-
 
1935
    oprot.writeFieldEnd();
1857
    oprot.writeFieldStop();
1936
    oprot.writeFieldStop();
1858
    oprot.writeStructEnd();
1937
    oprot.writeStructEnd();
1859
  }
1938
  }
1860
 
1939
 
1861
  @Override
1940
  @Override
Line 1944... Line 2023...
1944
    first = false;
2023
    first = false;
1945
    if (!first) sb.append(", ");
2024
    if (!first) sb.append(", ");
1946
    sb.append("maximumSellingPrice:");
2025
    sb.append("maximumSellingPrice:");
1947
    sb.append(this.maximumSellingPrice);
2026
    sb.append(this.maximumSellingPrice);
1948
    first = false;
2027
    first = false;
-
 
2028
    if (!first) sb.append(", ");
-
 
2029
    sb.append("pgFee:");
-
 
2030
    sb.append(this.pgFee);
-
 
2031
    first = false;
1949
    sb.append(")");
2032
    sb.append(")");
1950
    return sb.toString();
2033
    return sb.toString();
1951
  }
2034
  }
1952
 
2035
 
1953
  public void validate() throws org.apache.thrift.TException {
2036
  public void validate() throws org.apache.thrift.TException {