Subversion Repositories SmartDukaan

Rev

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

Rev 16117 Rev 16461
Line 37... Line 37...
37
  private static final org.apache.thrift.protocol.TField CASH_BACK_FIELD_DESC = new org.apache.thrift.protocol.TField("cash_back", org.apache.thrift.protocol.TType.DOUBLE, (short)9);
37
  private static final org.apache.thrift.protocol.TField CASH_BACK_FIELD_DESC = new org.apache.thrift.protocol.TField("cash_back", org.apache.thrift.protocol.TType.DOUBLE, (short)9);
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
 
43
 
43
  private long _id; // required
44
  private long _id; // required
44
  private double available_price; // required
45
  private double available_price; // required
45
  private String marketPlaceUrl; // required
46
  private String marketPlaceUrl; // required
46
  private long in_stock; // required
47
  private long in_stock; // required
Line 51... Line 52...
51
  private double cash_back; // required
52
  private double cash_back; // required
52
  private String coupon; // required
53
  private String coupon; // required
53
  private long codAvailable; // required
54
  private long codAvailable; // required
54
  private String tagline; // required
55
  private String tagline; // required
55
  private String offer; // required
56
  private String offer; // required
-
 
57
  private double gross_price; // required
56
 
58
 
57
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
59
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
58
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
60
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
59
    _ID((short)1, "_id"),
61
    _ID((short)1, "_id"),
60
    AVAILABLE_PRICE((short)2, "available_price"),
62
    AVAILABLE_PRICE((short)2, "available_price"),
Line 66... Line 68...
66
    CASH_BACK_TYPE((short)8, "cash_back_type"),
68
    CASH_BACK_TYPE((short)8, "cash_back_type"),
67
    CASH_BACK((short)9, "cash_back"),
69
    CASH_BACK((short)9, "cash_back"),
68
    COUPON((short)10, "coupon"),
70
    COUPON((short)10, "coupon"),
69
    COD_AVAILABLE((short)11, "codAvailable"),
71
    COD_AVAILABLE((short)11, "codAvailable"),
70
    TAGLINE((short)12, "tagline"),
72
    TAGLINE((short)12, "tagline"),
71
    OFFER((short)13, "offer");
73
    OFFER((short)13, "offer"),
-
 
74
    GROSS_PRICE((short)14, "gross_price");
72
 
75
 
73
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
76
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
74
 
77
 
75
    static {
78
    static {
76
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
79
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 107... Line 110...
107
          return COD_AVAILABLE;
110
          return COD_AVAILABLE;
108
        case 12: // TAGLINE
111
        case 12: // TAGLINE
109
          return TAGLINE;
112
          return TAGLINE;
110
        case 13: // OFFER
113
        case 13: // OFFER
111
          return OFFER;
114
          return OFFER;
-
 
115
        case 14: // GROSS_PRICE
-
 
116
          return GROSS_PRICE;
112
        default:
117
        default:
113
          return null;
118
          return null;
114
      }
119
      }
115
    }
120
    }
116
 
121
 
Line 154... Line 159...
154
  private static final int __IN_STOCK_ISSET_ID = 2;
159
  private static final int __IN_STOCK_ISSET_ID = 2;
155
  private static final int __SOURCE_ID_ISSET_ID = 3;
160
  private static final int __SOURCE_ID_ISSET_ID = 3;
156
  private static final int __CASH_BACK_TYPE_ISSET_ID = 4;
161
  private static final int __CASH_BACK_TYPE_ISSET_ID = 4;
157
  private static final int __CASH_BACK_ISSET_ID = 5;
162
  private static final int __CASH_BACK_ISSET_ID = 5;
158
  private static final int __CODAVAILABLE_ISSET_ID = 6;
163
  private static final int __CODAVAILABLE_ISSET_ID = 6;
-
 
164
  private static final int __GROSS_PRICE_ISSET_ID = 7;
159
  private BitSet __isset_bit_vector = new BitSet(7);
165
  private BitSet __isset_bit_vector = new BitSet(8);
160
 
166
 
161
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
167
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
162
  static {
168
  static {
163
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
169
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
164
    tmpMap.put(_Fields._ID, new org.apache.thrift.meta_data.FieldMetaData("_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
170
    tmpMap.put(_Fields._ID, new org.apache.thrift.meta_data.FieldMetaData("_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 185... Line 191...
185
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
191
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
186
    tmpMap.put(_Fields.TAGLINE, new org.apache.thrift.meta_data.FieldMetaData("tagline", org.apache.thrift.TFieldRequirementType.DEFAULT, 
192
    tmpMap.put(_Fields.TAGLINE, new org.apache.thrift.meta_data.FieldMetaData("tagline", org.apache.thrift.TFieldRequirementType.DEFAULT, 
187
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
193
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
188
    tmpMap.put(_Fields.OFFER, new org.apache.thrift.meta_data.FieldMetaData("offer", org.apache.thrift.TFieldRequirementType.DEFAULT, 
194
    tmpMap.put(_Fields.OFFER, new org.apache.thrift.meta_data.FieldMetaData("offer", org.apache.thrift.TFieldRequirementType.DEFAULT, 
189
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
195
        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, 
-
 
197
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
190
    metaDataMap = Collections.unmodifiableMap(tmpMap);
198
    metaDataMap = Collections.unmodifiableMap(tmpMap);
191
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LivePricing.class, metaDataMap);
199
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LivePricing.class, metaDataMap);
192
  }
200
  }
193
 
201
 
194
  public LivePricing() {
202
  public LivePricing() {
Line 205... Line 213...
205
    long cash_back_type,
213
    long cash_back_type,
206
    double cash_back,
214
    double cash_back,
207
    String coupon,
215
    String coupon,
208
    long codAvailable,
216
    long codAvailable,
209
    String tagline,
217
    String tagline,
210
    String offer)
218
    String offer,
-
 
219
    double gross_price)
211
  {
220
  {
212
    this();
221
    this();
213
    this._id = _id;
222
    this._id = _id;
214
    set_idIsSet(true);
223
    set_idIsSet(true);
215
    this.available_price = available_price;
224
    this.available_price = available_price;
Line 228... Line 237...
228
    this.coupon = coupon;
237
    this.coupon = coupon;
229
    this.codAvailable = codAvailable;
238
    this.codAvailable = codAvailable;
230
    setCodAvailableIsSet(true);
239
    setCodAvailableIsSet(true);
231
    this.tagline = tagline;
240
    this.tagline = tagline;
232
    this.offer = offer;
241
    this.offer = offer;
-
 
242
    this.gross_price = gross_price;
-
 
243
    setGross_priceIsSet(true);
233
  }
244
  }
234
 
245
 
235
  /**
246
  /**
236
   * Performs a deep copy on <i>other</i>.
247
   * Performs a deep copy on <i>other</i>.
237
   */
248
   */
Line 261... Line 272...
261
      this.tagline = other.tagline;
272
      this.tagline = other.tagline;
262
    }
273
    }
263
    if (other.isSetOffer()) {
274
    if (other.isSetOffer()) {
264
      this.offer = other.offer;
275
      this.offer = other.offer;
265
    }
276
    }
-
 
277
    this.gross_price = other.gross_price;
266
  }
278
  }
267
 
279
 
268
  public LivePricing deepCopy() {
280
  public LivePricing deepCopy() {
269
    return new LivePricing(this);
281
    return new LivePricing(this);
270
  }
282
  }
Line 289... Line 301...
289
    this.coupon = null;
301
    this.coupon = null;
290
    setCodAvailableIsSet(false);
302
    setCodAvailableIsSet(false);
291
    this.codAvailable = 0;
303
    this.codAvailable = 0;
292
    this.tagline = null;
304
    this.tagline = null;
293
    this.offer = null;
305
    this.offer = null;
-
 
306
    setGross_priceIsSet(false);
-
 
307
    this.gross_price = 0.0;
294
  }
308
  }
295
 
309
 
296
  public long get_id() {
310
  public long get_id() {
297
    return this._id;
311
    return this._id;
298
  }
312
  }
Line 583... Line 597...
583
    if (!value) {
597
    if (!value) {
584
      this.offer = null;
598
      this.offer = null;
585
    }
599
    }
586
  }
600
  }
587
 
601
 
-
 
602
  public double getGross_price() {
-
 
603
    return this.gross_price;
-
 
604
  }
-
 
605
 
-
 
606
  public void setGross_price(double gross_price) {
-
 
607
    this.gross_price = gross_price;
-
 
608
    setGross_priceIsSet(true);
-
 
609
  }
-
 
610
 
-
 
611
  public void unsetGross_price() {
-
 
612
    __isset_bit_vector.clear(__GROSS_PRICE_ISSET_ID);
-
 
613
  }
-
 
614
 
-
 
615
  /** Returns true if field gross_price is set (has been assigned a value) and false otherwise */
-
 
616
  public boolean isSetGross_price() {
-
 
617
    return __isset_bit_vector.get(__GROSS_PRICE_ISSET_ID);
-
 
618
  }
-
 
619
 
-
 
620
  public void setGross_priceIsSet(boolean value) {
-
 
621
    __isset_bit_vector.set(__GROSS_PRICE_ISSET_ID, value);
-
 
622
  }
-
 
623
 
588
  public void setFieldValue(_Fields field, Object value) {
624
  public void setFieldValue(_Fields field, Object value) {
589
    switch (field) {
625
    switch (field) {
590
    case _ID:
626
    case _ID:
591
      if (value == null) {
627
      if (value == null) {
592
        unset_id();
628
        unset_id();
Line 689... Line 725...
689
      } else {
725
      } else {
690
        setOffer((String)value);
726
        setOffer((String)value);
691
      }
727
      }
692
      break;
728
      break;
693
 
729
 
-
 
730
    case GROSS_PRICE:
-
 
731
      if (value == null) {
-
 
732
        unsetGross_price();
-
 
733
      } else {
-
 
734
        setGross_price((Double)value);
-
 
735
      }
-
 
736
      break;
-
 
737
 
694
    }
738
    }
695
  }
739
  }
696
 
740
 
697
  public Object getFieldValue(_Fields field) {
741
  public Object getFieldValue(_Fields field) {
698
    switch (field) {
742
    switch (field) {
Line 733... Line 777...
733
      return getTagline();
777
      return getTagline();
734
 
778
 
735
    case OFFER:
779
    case OFFER:
736
      return getOffer();
780
      return getOffer();
737
 
781
 
-
 
782
    case GROSS_PRICE:
-
 
783
      return Double.valueOf(getGross_price());
-
 
784
 
738
    }
785
    }
739
    throw new IllegalStateException();
786
    throw new IllegalStateException();
740
  }
787
  }
741
 
788
 
742
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
789
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 770... Line 817...
770
      return isSetCodAvailable();
817
      return isSetCodAvailable();
771
    case TAGLINE:
818
    case TAGLINE:
772
      return isSetTagline();
819
      return isSetTagline();
773
    case OFFER:
820
    case OFFER:
774
      return isSetOffer();
821
      return isSetOffer();
-
 
822
    case GROSS_PRICE:
-
 
823
      return isSetGross_price();
775
    }
824
    }
776
    throw new IllegalStateException();
825
    throw new IllegalStateException();
777
  }
826
  }
778
 
827
 
779
  @Override
828
  @Override
Line 904... Line 953...
904
        return false;
953
        return false;
905
      if (!this.offer.equals(that.offer))
954
      if (!this.offer.equals(that.offer))
906
        return false;
955
        return false;
907
    }
956
    }
908
 
957
 
-
 
958
    boolean this_present_gross_price = true;
-
 
959
    boolean that_present_gross_price = true;
-
 
960
    if (this_present_gross_price || that_present_gross_price) {
-
 
961
      if (!(this_present_gross_price && that_present_gross_price))
-
 
962
        return false;
-
 
963
      if (this.gross_price != that.gross_price)
-
 
964
        return false;
-
 
965
    }
-
 
966
 
909
    return true;
967
    return true;
910
  }
968
  }
911
 
969
 
912
  @Override
970
  @Override
913
  public int hashCode() {
971
  public int hashCode() {
Line 1050... Line 1108...
1050
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.offer, typedOther.offer);
1108
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.offer, typedOther.offer);
1051
      if (lastComparison != 0) {
1109
      if (lastComparison != 0) {
1052
        return lastComparison;
1110
        return lastComparison;
1053
      }
1111
      }
1054
    }
1112
    }
-
 
1113
    lastComparison = Boolean.valueOf(isSetGross_price()).compareTo(typedOther.isSetGross_price());
-
 
1114
    if (lastComparison != 0) {
-
 
1115
      return lastComparison;
-
 
1116
    }
-
 
1117
    if (isSetGross_price()) {
-
 
1118
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gross_price, typedOther.gross_price);
-
 
1119
      if (lastComparison != 0) {
-
 
1120
        return lastComparison;
-
 
1121
      }
-
 
1122
    }
1055
    return 0;
1123
    return 0;
1056
  }
1124
  }
1057
 
1125
 
1058
  public _Fields fieldForId(int fieldId) {
1126
  public _Fields fieldForId(int fieldId) {
1059
    return _Fields.findByThriftId(fieldId);
1127
    return _Fields.findByThriftId(fieldId);
Line 1165... Line 1233...
1165
            this.offer = iprot.readString();
1233
            this.offer = iprot.readString();
1166
          } else { 
1234
          } else { 
1167
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1235
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1168
          }
1236
          }
1169
          break;
1237
          break;
-
 
1238
        case 14: // GROSS_PRICE
-
 
1239
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
-
 
1240
            this.gross_price = iprot.readDouble();
-
 
1241
            setGross_priceIsSet(true);
-
 
1242
          } else { 
-
 
1243
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1244
          }
-
 
1245
          break;
1170
        default:
1246
        default:
1171
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1247
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1172
      }
1248
      }
1173
      iprot.readFieldEnd();
1249
      iprot.readFieldEnd();
1174
    }
1250
    }
Line 1229... Line 1305...
1229
    if (this.offer != null) {
1305
    if (this.offer != null) {
1230
      oprot.writeFieldBegin(OFFER_FIELD_DESC);
1306
      oprot.writeFieldBegin(OFFER_FIELD_DESC);
1231
      oprot.writeString(this.offer);
1307
      oprot.writeString(this.offer);
1232
      oprot.writeFieldEnd();
1308
      oprot.writeFieldEnd();
1233
    }
1309
    }
-
 
1310
    oprot.writeFieldBegin(GROSS_PRICE_FIELD_DESC);
-
 
1311
    oprot.writeDouble(this.gross_price);
-
 
1312
    oprot.writeFieldEnd();
1234
    oprot.writeFieldStop();
1313
    oprot.writeFieldStop();
1235
    oprot.writeStructEnd();
1314
    oprot.writeStructEnd();
1236
  }
1315
  }
1237
 
1316
 
1238
  @Override
1317
  @Override
Line 1313... Line 1392...
1313
      sb.append("null");
1392
      sb.append("null");
1314
    } else {
1393
    } else {
1315
      sb.append(this.offer);
1394
      sb.append(this.offer);
1316
    }
1395
    }
1317
    first = false;
1396
    first = false;
-
 
1397
    if (!first) sb.append(", ");
-
 
1398
    sb.append("gross_price:");
-
 
1399
    sb.append(this.gross_price);
-
 
1400
    first = false;
1318
    sb.append(")");
1401
    sb.append(")");
1319
    return sb.toString();
1402
    return sb.toString();
1320
  }
1403
  }
1321
 
1404
 
1322
  public void validate() throws org.apache.thrift.TException {
1405
  public void validate() throws org.apache.thrift.TException {