Subversion Repositories SmartDukaan

Rev

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

Rev 16461 Rev 18728
Line 38... Line 38...
38
  private static final org.apache.thrift.protocol.TField COUPON_FIELD_DESC = new org.apache.thrift.protocol.TField("coupon", org.apache.thrift.protocol.TType.STRING, (short)10);
38
  private static final org.apache.thrift.protocol.TField COUPON_FIELD_DESC = new org.apache.thrift.protocol.TField("coupon", org.apache.thrift.protocol.TType.STRING, (short)10);
39
  private static final org.apache.thrift.protocol.TField COD_AVAILABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("codAvailable", org.apache.thrift.protocol.TType.I64, (short)11);
39
  private static final org.apache.thrift.protocol.TField COD_AVAILABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("codAvailable", org.apache.thrift.protocol.TType.I64, (short)11);
40
  private static final org.apache.thrift.protocol.TField TAGLINE_FIELD_DESC = new org.apache.thrift.protocol.TField("tagline", org.apache.thrift.protocol.TType.STRING, (short)12);
40
  private static final org.apache.thrift.protocol.TField TAGLINE_FIELD_DESC = new org.apache.thrift.protocol.TField("tagline", org.apache.thrift.protocol.TType.STRING, (short)12);
41
  private static final org.apache.thrift.protocol.TField OFFER_FIELD_DESC = new org.apache.thrift.protocol.TField("offer", org.apache.thrift.protocol.TType.STRING, (short)13);
41
  private static final org.apache.thrift.protocol.TField OFFER_FIELD_DESC = new org.apache.thrift.protocol.TField("offer", org.apache.thrift.protocol.TType.STRING, (short)13);
42
  private static final org.apache.thrift.protocol.TField GROSS_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("gross_price", org.apache.thrift.protocol.TType.DOUBLE, (short)14);
42
  private static final org.apache.thrift.protocol.TField GROSS_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("gross_price", org.apache.thrift.protocol.TType.DOUBLE, (short)14);
-
 
43
  private static final org.apache.thrift.protocol.TField CHEAPEST_BULK_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("cheapestBulkPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)15);
43
 
44
 
44
  private long _id; // required
45
  private long _id; // required
45
  private double available_price; // required
46
  private double available_price; // required
46
  private String marketPlaceUrl; // required
47
  private String marketPlaceUrl; // required
47
  private long in_stock; // required
48
  private long in_stock; // required
Line 53... Line 54...
53
  private String coupon; // required
54
  private String coupon; // required
54
  private long codAvailable; // required
55
  private long codAvailable; // required
55
  private String tagline; // required
56
  private String tagline; // required
56
  private String offer; // required
57
  private String offer; // required
57
  private double gross_price; // required
58
  private double gross_price; // required
-
 
59
  private double cheapestBulkPrice; // required
58
 
60
 
59
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
61
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
60
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
62
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
61
    _ID((short)1, "_id"),
63
    _ID((short)1, "_id"),
62
    AVAILABLE_PRICE((short)2, "available_price"),
64
    AVAILABLE_PRICE((short)2, "available_price"),
Line 69... Line 71...
69
    CASH_BACK((short)9, "cash_back"),
71
    CASH_BACK((short)9, "cash_back"),
70
    COUPON((short)10, "coupon"),
72
    COUPON((short)10, "coupon"),
71
    COD_AVAILABLE((short)11, "codAvailable"),
73
    COD_AVAILABLE((short)11, "codAvailable"),
72
    TAGLINE((short)12, "tagline"),
74
    TAGLINE((short)12, "tagline"),
73
    OFFER((short)13, "offer"),
75
    OFFER((short)13, "offer"),
74
    GROSS_PRICE((short)14, "gross_price");
76
    GROSS_PRICE((short)14, "gross_price"),
-
 
77
    CHEAPEST_BULK_PRICE((short)15, "cheapestBulkPrice");
75
 
78
 
76
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
79
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
77
 
80
 
78
    static {
81
    static {
79
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
82
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 112... Line 115...
112
          return TAGLINE;
115
          return TAGLINE;
113
        case 13: // OFFER
116
        case 13: // OFFER
114
          return OFFER;
117
          return OFFER;
115
        case 14: // GROSS_PRICE
118
        case 14: // GROSS_PRICE
116
          return GROSS_PRICE;
119
          return GROSS_PRICE;
-
 
120
        case 15: // CHEAPEST_BULK_PRICE
-
 
121
          return CHEAPEST_BULK_PRICE;
117
        default:
122
        default:
118
          return null;
123
          return null;
119
      }
124
      }
120
    }
125
    }
121
 
126
 
Line 160... Line 165...
160
  private static final int __SOURCE_ID_ISSET_ID = 3;
165
  private static final int __SOURCE_ID_ISSET_ID = 3;
161
  private static final int __CASH_BACK_TYPE_ISSET_ID = 4;
166
  private static final int __CASH_BACK_TYPE_ISSET_ID = 4;
162
  private static final int __CASH_BACK_ISSET_ID = 5;
167
  private static final int __CASH_BACK_ISSET_ID = 5;
163
  private static final int __CODAVAILABLE_ISSET_ID = 6;
168
  private static final int __CODAVAILABLE_ISSET_ID = 6;
164
  private static final int __GROSS_PRICE_ISSET_ID = 7;
169
  private static final int __GROSS_PRICE_ISSET_ID = 7;
-
 
170
  private static final int __CHEAPESTBULKPRICE_ISSET_ID = 8;
165
  private BitSet __isset_bit_vector = new BitSet(8);
171
  private BitSet __isset_bit_vector = new BitSet(9);
166
 
172
 
167
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
173
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
168
  static {
174
  static {
169
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
175
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
170
    tmpMap.put(_Fields._ID, new org.apache.thrift.meta_data.FieldMetaData("_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
176
    tmpMap.put(_Fields._ID, new org.apache.thrift.meta_data.FieldMetaData("_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 193... Line 199...
193
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
199
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
194
    tmpMap.put(_Fields.OFFER, new org.apache.thrift.meta_data.FieldMetaData("offer", org.apache.thrift.TFieldRequirementType.DEFAULT, 
200
    tmpMap.put(_Fields.OFFER, new org.apache.thrift.meta_data.FieldMetaData("offer", org.apache.thrift.TFieldRequirementType.DEFAULT, 
195
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
201
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
196
    tmpMap.put(_Fields.GROSS_PRICE, new org.apache.thrift.meta_data.FieldMetaData("gross_price", org.apache.thrift.TFieldRequirementType.DEFAULT, 
202
    tmpMap.put(_Fields.GROSS_PRICE, new org.apache.thrift.meta_data.FieldMetaData("gross_price", org.apache.thrift.TFieldRequirementType.DEFAULT, 
197
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
203
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
-
 
204
    tmpMap.put(_Fields.CHEAPEST_BULK_PRICE, new org.apache.thrift.meta_data.FieldMetaData("cheapestBulkPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
205
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
198
    metaDataMap = Collections.unmodifiableMap(tmpMap);
206
    metaDataMap = Collections.unmodifiableMap(tmpMap);
199
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LivePricing.class, metaDataMap);
207
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LivePricing.class, metaDataMap);
200
  }
208
  }
201
 
209
 
202
  public LivePricing() {
210
  public LivePricing() {
Line 214... Line 222...
214
    double cash_back,
222
    double cash_back,
215
    String coupon,
223
    String coupon,
216
    long codAvailable,
224
    long codAvailable,
217
    String tagline,
225
    String tagline,
218
    String offer,
226
    String offer,
219
    double gross_price)
227
    double gross_price,
-
 
228
    double cheapestBulkPrice)
220
  {
229
  {
221
    this();
230
    this();
222
    this._id = _id;
231
    this._id = _id;
223
    set_idIsSet(true);
232
    set_idIsSet(true);
224
    this.available_price = available_price;
233
    this.available_price = available_price;
Line 239... Line 248...
239
    setCodAvailableIsSet(true);
248
    setCodAvailableIsSet(true);
240
    this.tagline = tagline;
249
    this.tagline = tagline;
241
    this.offer = offer;
250
    this.offer = offer;
242
    this.gross_price = gross_price;
251
    this.gross_price = gross_price;
243
    setGross_priceIsSet(true);
252
    setGross_priceIsSet(true);
-
 
253
    this.cheapestBulkPrice = cheapestBulkPrice;
-
 
254
    setCheapestBulkPriceIsSet(true);
244
  }
255
  }
245
 
256
 
246
  /**
257
  /**
247
   * Performs a deep copy on <i>other</i>.
258
   * Performs a deep copy on <i>other</i>.
248
   */
259
   */
Line 273... Line 284...
273
    }
284
    }
274
    if (other.isSetOffer()) {
285
    if (other.isSetOffer()) {
275
      this.offer = other.offer;
286
      this.offer = other.offer;
276
    }
287
    }
277
    this.gross_price = other.gross_price;
288
    this.gross_price = other.gross_price;
-
 
289
    this.cheapestBulkPrice = other.cheapestBulkPrice;
278
  }
290
  }
279
 
291
 
280
  public LivePricing deepCopy() {
292
  public LivePricing deepCopy() {
281
    return new LivePricing(this);
293
    return new LivePricing(this);
282
  }
294
  }
Line 303... Line 315...
303
    this.codAvailable = 0;
315
    this.codAvailable = 0;
304
    this.tagline = null;
316
    this.tagline = null;
305
    this.offer = null;
317
    this.offer = null;
306
    setGross_priceIsSet(false);
318
    setGross_priceIsSet(false);
307
    this.gross_price = 0.0;
319
    this.gross_price = 0.0;
-
 
320
    setCheapestBulkPriceIsSet(false);
-
 
321
    this.cheapestBulkPrice = 0.0;
308
  }
322
  }
309
 
323
 
310
  public long get_id() {
324
  public long get_id() {
311
    return this._id;
325
    return this._id;
312
  }
326
  }
Line 619... Line 633...
619
 
633
 
620
  public void setGross_priceIsSet(boolean value) {
634
  public void setGross_priceIsSet(boolean value) {
621
    __isset_bit_vector.set(__GROSS_PRICE_ISSET_ID, value);
635
    __isset_bit_vector.set(__GROSS_PRICE_ISSET_ID, value);
622
  }
636
  }
623
 
637
 
-
 
638
  public double getCheapestBulkPrice() {
-
 
639
    return this.cheapestBulkPrice;
-
 
640
  }
-
 
641
 
-
 
642
  public void setCheapestBulkPrice(double cheapestBulkPrice) {
-
 
643
    this.cheapestBulkPrice = cheapestBulkPrice;
-
 
644
    setCheapestBulkPriceIsSet(true);
-
 
645
  }
-
 
646
 
-
 
647
  public void unsetCheapestBulkPrice() {
-
 
648
    __isset_bit_vector.clear(__CHEAPESTBULKPRICE_ISSET_ID);
-
 
649
  }
-
 
650
 
-
 
651
  /** Returns true if field cheapestBulkPrice is set (has been assigned a value) and false otherwise */
-
 
652
  public boolean isSetCheapestBulkPrice() {
-
 
653
    return __isset_bit_vector.get(__CHEAPESTBULKPRICE_ISSET_ID);
-
 
654
  }
-
 
655
 
-
 
656
  public void setCheapestBulkPriceIsSet(boolean value) {
-
 
657
    __isset_bit_vector.set(__CHEAPESTBULKPRICE_ISSET_ID, value);
-
 
658
  }
-
 
659
 
624
  public void setFieldValue(_Fields field, Object value) {
660
  public void setFieldValue(_Fields field, Object value) {
625
    switch (field) {
661
    switch (field) {
626
    case _ID:
662
    case _ID:
627
      if (value == null) {
663
      if (value == null) {
628
        unset_id();
664
        unset_id();
Line 733... Line 769...
733
      } else {
769
      } else {
734
        setGross_price((Double)value);
770
        setGross_price((Double)value);
735
      }
771
      }
736
      break;
772
      break;
737
 
773
 
-
 
774
    case CHEAPEST_BULK_PRICE:
-
 
775
      if (value == null) {
-
 
776
        unsetCheapestBulkPrice();
-
 
777
      } else {
-
 
778
        setCheapestBulkPrice((Double)value);
-
 
779
      }
-
 
780
      break;
-
 
781
 
738
    }
782
    }
739
  }
783
  }
740
 
784
 
741
  public Object getFieldValue(_Fields field) {
785
  public Object getFieldValue(_Fields field) {
742
    switch (field) {
786
    switch (field) {
Line 780... Line 824...
780
      return getOffer();
824
      return getOffer();
781
 
825
 
782
    case GROSS_PRICE:
826
    case GROSS_PRICE:
783
      return Double.valueOf(getGross_price());
827
      return Double.valueOf(getGross_price());
784
 
828
 
-
 
829
    case CHEAPEST_BULK_PRICE:
-
 
830
      return Double.valueOf(getCheapestBulkPrice());
-
 
831
 
785
    }
832
    }
786
    throw new IllegalStateException();
833
    throw new IllegalStateException();
787
  }
834
  }
788
 
835
 
789
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
836
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 819... Line 866...
819
      return isSetTagline();
866
      return isSetTagline();
820
    case OFFER:
867
    case OFFER:
821
      return isSetOffer();
868
      return isSetOffer();
822
    case GROSS_PRICE:
869
    case GROSS_PRICE:
823
      return isSetGross_price();
870
      return isSetGross_price();
-
 
871
    case CHEAPEST_BULK_PRICE:
-
 
872
      return isSetCheapestBulkPrice();
824
    }
873
    }
825
    throw new IllegalStateException();
874
    throw new IllegalStateException();
826
  }
875
  }
827
 
876
 
828
  @Override
877
  @Override
Line 962... Line 1011...
962
        return false;
1011
        return false;
963
      if (this.gross_price != that.gross_price)
1012
      if (this.gross_price != that.gross_price)
964
        return false;
1013
        return false;
965
    }
1014
    }
966
 
1015
 
-
 
1016
    boolean this_present_cheapestBulkPrice = true;
-
 
1017
    boolean that_present_cheapestBulkPrice = true;
-
 
1018
    if (this_present_cheapestBulkPrice || that_present_cheapestBulkPrice) {
-
 
1019
      if (!(this_present_cheapestBulkPrice && that_present_cheapestBulkPrice))
-
 
1020
        return false;
-
 
1021
      if (this.cheapestBulkPrice != that.cheapestBulkPrice)
-
 
1022
        return false;
-
 
1023
    }
-
 
1024
 
967
    return true;
1025
    return true;
968
  }
1026
  }
969
 
1027
 
970
  @Override
1028
  @Override
971
  public int hashCode() {
1029
  public int hashCode() {
Line 1118... Line 1176...
1118
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gross_price, typedOther.gross_price);
1176
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gross_price, typedOther.gross_price);
1119
      if (lastComparison != 0) {
1177
      if (lastComparison != 0) {
1120
        return lastComparison;
1178
        return lastComparison;
1121
      }
1179
      }
1122
    }
1180
    }
-
 
1181
    lastComparison = Boolean.valueOf(isSetCheapestBulkPrice()).compareTo(typedOther.isSetCheapestBulkPrice());
-
 
1182
    if (lastComparison != 0) {
-
 
1183
      return lastComparison;
-
 
1184
    }
-
 
1185
    if (isSetCheapestBulkPrice()) {
-
 
1186
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cheapestBulkPrice, typedOther.cheapestBulkPrice);
-
 
1187
      if (lastComparison != 0) {
-
 
1188
        return lastComparison;
-
 
1189
      }
-
 
1190
    }
1123
    return 0;
1191
    return 0;
1124
  }
1192
  }
1125
 
1193
 
1126
  public _Fields fieldForId(int fieldId) {
1194
  public _Fields fieldForId(int fieldId) {
1127
    return _Fields.findByThriftId(fieldId);
1195
    return _Fields.findByThriftId(fieldId);
Line 1241... Line 1309...
1241
            setGross_priceIsSet(true);
1309
            setGross_priceIsSet(true);
1242
          } else { 
1310
          } else { 
1243
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1311
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1244
          }
1312
          }
1245
          break;
1313
          break;
-
 
1314
        case 15: // CHEAPEST_BULK_PRICE
-
 
1315
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
-
 
1316
            this.cheapestBulkPrice = iprot.readDouble();
-
 
1317
            setCheapestBulkPriceIsSet(true);
-
 
1318
          } else { 
-
 
1319
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1320
          }
-
 
1321
          break;
1246
        default:
1322
        default:
1247
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1323
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1248
      }
1324
      }
1249
      iprot.readFieldEnd();
1325
      iprot.readFieldEnd();
1250
    }
1326
    }
Line 1308... Line 1384...
1308
      oprot.writeFieldEnd();
1384
      oprot.writeFieldEnd();
1309
    }
1385
    }
1310
    oprot.writeFieldBegin(GROSS_PRICE_FIELD_DESC);
1386
    oprot.writeFieldBegin(GROSS_PRICE_FIELD_DESC);
1311
    oprot.writeDouble(this.gross_price);
1387
    oprot.writeDouble(this.gross_price);
1312
    oprot.writeFieldEnd();
1388
    oprot.writeFieldEnd();
-
 
1389
    oprot.writeFieldBegin(CHEAPEST_BULK_PRICE_FIELD_DESC);
-
 
1390
    oprot.writeDouble(this.cheapestBulkPrice);
-
 
1391
    oprot.writeFieldEnd();
1313
    oprot.writeFieldStop();
1392
    oprot.writeFieldStop();
1314
    oprot.writeStructEnd();
1393
    oprot.writeStructEnd();
1315
  }
1394
  }
1316
 
1395
 
1317
  @Override
1396
  @Override
Line 1396... Line 1475...
1396
    first = false;
1475
    first = false;
1397
    if (!first) sb.append(", ");
1476
    if (!first) sb.append(", ");
1398
    sb.append("gross_price:");
1477
    sb.append("gross_price:");
1399
    sb.append(this.gross_price);
1478
    sb.append(this.gross_price);
1400
    first = false;
1479
    first = false;
-
 
1480
    if (!first) sb.append(", ");
-
 
1481
    sb.append("cheapestBulkPrice:");
-
 
1482
    sb.append(this.cheapestBulkPrice);
-
 
1483
    first = false;
1401
    sb.append(")");
1484
    sb.append(")");
1402
    return sb.toString();
1485
    return sb.toString();
1403
  }
1486
  }
1404
 
1487
 
1405
  public void validate() throws org.apache.thrift.TException {
1488
  public void validate() throws org.apache.thrift.TException {