Subversion Repositories SmartDukaan

Rev

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

Rev 15943 Rev 16117
Line 35... Line 35...
35
  private static final org.apache.thrift.protocol.TField THUMBNAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("thumbnail", org.apache.thrift.protocol.TType.STRING, (short)7);
35
  private static final org.apache.thrift.protocol.TField THUMBNAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("thumbnail", org.apache.thrift.protocol.TType.STRING, (short)7);
36
  private static final org.apache.thrift.protocol.TField CASH_BACK_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("cash_back_type", org.apache.thrift.protocol.TType.I64, (short)8);
36
  private static final org.apache.thrift.protocol.TField CASH_BACK_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("cash_back_type", org.apache.thrift.protocol.TType.I64, (short)8);
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);
-
 
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);
40
 
42
 
41
  private long _id; // required
43
  private long _id; // required
42
  private double available_price; // required
44
  private double available_price; // required
43
  private String marketPlaceUrl; // required
45
  private String marketPlaceUrl; // required
44
  private long in_stock; // required
46
  private long in_stock; // required
Line 47... Line 49...
47
  private String thumbnail; // required
49
  private String thumbnail; // required
48
  private long cash_back_type; // required
50
  private long cash_back_type; // required
49
  private double cash_back; // required
51
  private double cash_back; // required
50
  private String coupon; // required
52
  private String coupon; // required
51
  private long codAvailable; // required
53
  private long codAvailable; // required
-
 
54
  private String tagline; // required
-
 
55
  private String offer; // required
52
 
56
 
53
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
57
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
54
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
58
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
55
    _ID((short)1, "_id"),
59
    _ID((short)1, "_id"),
56
    AVAILABLE_PRICE((short)2, "available_price"),
60
    AVAILABLE_PRICE((short)2, "available_price"),
Line 60... Line 64...
60
    SOURCE_PRODUCT_NAME((short)6, "source_product_name"),
64
    SOURCE_PRODUCT_NAME((short)6, "source_product_name"),
61
    THUMBNAIL((short)7, "thumbnail"),
65
    THUMBNAIL((short)7, "thumbnail"),
62
    CASH_BACK_TYPE((short)8, "cash_back_type"),
66
    CASH_BACK_TYPE((short)8, "cash_back_type"),
63
    CASH_BACK((short)9, "cash_back"),
67
    CASH_BACK((short)9, "cash_back"),
64
    COUPON((short)10, "coupon"),
68
    COUPON((short)10, "coupon"),
65
    COD_AVAILABLE((short)11, "codAvailable");
69
    COD_AVAILABLE((short)11, "codAvailable"),
-
 
70
    TAGLINE((short)12, "tagline"),
-
 
71
    OFFER((short)13, "offer");
66
 
72
 
67
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
73
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
68
 
74
 
69
    static {
75
    static {
70
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
76
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 97... Line 103...
97
          return CASH_BACK;
103
          return CASH_BACK;
98
        case 10: // COUPON
104
        case 10: // COUPON
99
          return COUPON;
105
          return COUPON;
100
        case 11: // COD_AVAILABLE
106
        case 11: // COD_AVAILABLE
101
          return COD_AVAILABLE;
107
          return COD_AVAILABLE;
-
 
108
        case 12: // TAGLINE
-
 
109
          return TAGLINE;
-
 
110
        case 13: // OFFER
-
 
111
          return OFFER;
102
        default:
112
        default:
103
          return null;
113
          return null;
104
      }
114
      }
105
    }
115
    }
106
 
116
 
Line 171... Line 181...
171
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
181
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
172
    tmpMap.put(_Fields.COUPON, new org.apache.thrift.meta_data.FieldMetaData("coupon", org.apache.thrift.TFieldRequirementType.DEFAULT, 
182
    tmpMap.put(_Fields.COUPON, new org.apache.thrift.meta_data.FieldMetaData("coupon", org.apache.thrift.TFieldRequirementType.DEFAULT, 
173
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
183
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
174
    tmpMap.put(_Fields.COD_AVAILABLE, new org.apache.thrift.meta_data.FieldMetaData("codAvailable", org.apache.thrift.TFieldRequirementType.DEFAULT, 
184
    tmpMap.put(_Fields.COD_AVAILABLE, new org.apache.thrift.meta_data.FieldMetaData("codAvailable", org.apache.thrift.TFieldRequirementType.DEFAULT, 
175
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
185
        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, 
-
 
187
        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, 
-
 
189
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
176
    metaDataMap = Collections.unmodifiableMap(tmpMap);
190
    metaDataMap = Collections.unmodifiableMap(tmpMap);
177
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LivePricing.class, metaDataMap);
191
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LivePricing.class, metaDataMap);
178
  }
192
  }
179
 
193
 
180
  public LivePricing() {
194
  public LivePricing() {
Line 189... Line 203...
189
    String source_product_name,
203
    String source_product_name,
190
    String thumbnail,
204
    String thumbnail,
191
    long cash_back_type,
205
    long cash_back_type,
192
    double cash_back,
206
    double cash_back,
193
    String coupon,
207
    String coupon,
194
    long codAvailable)
208
    long codAvailable,
-
 
209
    String tagline,
-
 
210
    String offer)
195
  {
211
  {
196
    this();
212
    this();
197
    this._id = _id;
213
    this._id = _id;
198
    set_idIsSet(true);
214
    set_idIsSet(true);
199
    this.available_price = available_price;
215
    this.available_price = available_price;
Line 210... Line 226...
210
    this.cash_back = cash_back;
226
    this.cash_back = cash_back;
211
    setCash_backIsSet(true);
227
    setCash_backIsSet(true);
212
    this.coupon = coupon;
228
    this.coupon = coupon;
213
    this.codAvailable = codAvailable;
229
    this.codAvailable = codAvailable;
214
    setCodAvailableIsSet(true);
230
    setCodAvailableIsSet(true);
-
 
231
    this.tagline = tagline;
-
 
232
    this.offer = offer;
215
  }
233
  }
216
 
234
 
217
  /**
235
  /**
218
   * Performs a deep copy on <i>other</i>.
236
   * Performs a deep copy on <i>other</i>.
219
   */
237
   */
Line 237... Line 255...
237
    this.cash_back = other.cash_back;
255
    this.cash_back = other.cash_back;
238
    if (other.isSetCoupon()) {
256
    if (other.isSetCoupon()) {
239
      this.coupon = other.coupon;
257
      this.coupon = other.coupon;
240
    }
258
    }
241
    this.codAvailable = other.codAvailable;
259
    this.codAvailable = other.codAvailable;
-
 
260
    if (other.isSetTagline()) {
-
 
261
      this.tagline = other.tagline;
-
 
262
    }
-
 
263
    if (other.isSetOffer()) {
-
 
264
      this.offer = other.offer;
-
 
265
    }
242
  }
266
  }
243
 
267
 
244
  public LivePricing deepCopy() {
268
  public LivePricing deepCopy() {
245
    return new LivePricing(this);
269
    return new LivePricing(this);
246
  }
270
  }
Line 263... Line 287...
263
    setCash_backIsSet(false);
287
    setCash_backIsSet(false);
264
    this.cash_back = 0.0;
288
    this.cash_back = 0.0;
265
    this.coupon = null;
289
    this.coupon = null;
266
    setCodAvailableIsSet(false);
290
    setCodAvailableIsSet(false);
267
    this.codAvailable = 0;
291
    this.codAvailable = 0;
-
 
292
    this.tagline = null;
-
 
293
    this.offer = null;
268
  }
294
  }
269
 
295
 
270
  public long get_id() {
296
  public long get_id() {
271
    return this._id;
297
    return this._id;
272
  }
298
  }
Line 511... Line 537...
511
 
537
 
512
  public void setCodAvailableIsSet(boolean value) {
538
  public void setCodAvailableIsSet(boolean value) {
513
    __isset_bit_vector.set(__CODAVAILABLE_ISSET_ID, value);
539
    __isset_bit_vector.set(__CODAVAILABLE_ISSET_ID, value);
514
  }
540
  }
515
 
541
 
-
 
542
  public String getTagline() {
-
 
543
    return this.tagline;
-
 
544
  }
-
 
545
 
-
 
546
  public void setTagline(String tagline) {
-
 
547
    this.tagline = tagline;
-
 
548
  }
-
 
549
 
-
 
550
  public void unsetTagline() {
-
 
551
    this.tagline = null;
-
 
552
  }
-
 
553
 
-
 
554
  /** Returns true if field tagline is set (has been assigned a value) and false otherwise */
-
 
555
  public boolean isSetTagline() {
-
 
556
    return this.tagline != null;
-
 
557
  }
-
 
558
 
-
 
559
  public void setTaglineIsSet(boolean value) {
-
 
560
    if (!value) {
-
 
561
      this.tagline = null;
-
 
562
    }
-
 
563
  }
-
 
564
 
-
 
565
  public String getOffer() {
-
 
566
    return this.offer;
-
 
567
  }
-
 
568
 
-
 
569
  public void setOffer(String offer) {
-
 
570
    this.offer = offer;
-
 
571
  }
-
 
572
 
-
 
573
  public void unsetOffer() {
-
 
574
    this.offer = null;
-
 
575
  }
-
 
576
 
-
 
577
  /** Returns true if field offer is set (has been assigned a value) and false otherwise */
-
 
578
  public boolean isSetOffer() {
-
 
579
    return this.offer != null;
-
 
580
  }
-
 
581
 
-
 
582
  public void setOfferIsSet(boolean value) {
-
 
583
    if (!value) {
-
 
584
      this.offer = null;
-
 
585
    }
-
 
586
  }
-
 
587
 
516
  public void setFieldValue(_Fields field, Object value) {
588
  public void setFieldValue(_Fields field, Object value) {
517
    switch (field) {
589
    switch (field) {
518
    case _ID:
590
    case _ID:
519
      if (value == null) {
591
      if (value == null) {
520
        unset_id();
592
        unset_id();
Line 601... Line 673...
601
      } else {
673
      } else {
602
        setCodAvailable((Long)value);
674
        setCodAvailable((Long)value);
603
      }
675
      }
604
      break;
676
      break;
605
 
677
 
-
 
678
    case TAGLINE:
-
 
679
      if (value == null) {
-
 
680
        unsetTagline();
-
 
681
      } else {
-
 
682
        setTagline((String)value);
-
 
683
      }
-
 
684
      break;
-
 
685
 
-
 
686
    case OFFER:
-
 
687
      if (value == null) {
-
 
688
        unsetOffer();
-
 
689
      } else {
-
 
690
        setOffer((String)value);
-
 
691
      }
-
 
692
      break;
-
 
693
 
606
    }
694
    }
607
  }
695
  }
608
 
696
 
609
  public Object getFieldValue(_Fields field) {
697
  public Object getFieldValue(_Fields field) {
610
    switch (field) {
698
    switch (field) {
Line 639... Line 727...
639
      return getCoupon();
727
      return getCoupon();
640
 
728
 
641
    case COD_AVAILABLE:
729
    case COD_AVAILABLE:
642
      return Long.valueOf(getCodAvailable());
730
      return Long.valueOf(getCodAvailable());
643
 
731
 
-
 
732
    case TAGLINE:
-
 
733
      return getTagline();
-
 
734
 
-
 
735
    case OFFER:
-
 
736
      return getOffer();
-
 
737
 
644
    }
738
    }
645
    throw new IllegalStateException();
739
    throw new IllegalStateException();
646
  }
740
  }
647
 
741
 
648
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
742
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 672... Line 766...
672
      return isSetCash_back();
766
      return isSetCash_back();
673
    case COUPON:
767
    case COUPON:
674
      return isSetCoupon();
768
      return isSetCoupon();
675
    case COD_AVAILABLE:
769
    case COD_AVAILABLE:
676
      return isSetCodAvailable();
770
      return isSetCodAvailable();
-
 
771
    case TAGLINE:
-
 
772
      return isSetTagline();
-
 
773
    case OFFER:
-
 
774
      return isSetOffer();
677
    }
775
    }
678
    throw new IllegalStateException();
776
    throw new IllegalStateException();
679
  }
777
  }
680
 
778
 
681
  @Override
779
  @Override
Line 788... Line 886...
788
        return false;
886
        return false;
789
      if (this.codAvailable != that.codAvailable)
887
      if (this.codAvailable != that.codAvailable)
790
        return false;
888
        return false;
791
    }
889
    }
792
 
890
 
-
 
891
    boolean this_present_tagline = true && this.isSetTagline();
-
 
892
    boolean that_present_tagline = true && that.isSetTagline();
-
 
893
    if (this_present_tagline || that_present_tagline) {
-
 
894
      if (!(this_present_tagline && that_present_tagline))
-
 
895
        return false;
-
 
896
      if (!this.tagline.equals(that.tagline))
-
 
897
        return false;
-
 
898
    }
-
 
899
 
-
 
900
    boolean this_present_offer = true && this.isSetOffer();
-
 
901
    boolean that_present_offer = true && that.isSetOffer();
-
 
902
    if (this_present_offer || that_present_offer) {
-
 
903
      if (!(this_present_offer && that_present_offer))
-
 
904
        return false;
-
 
905
      if (!this.offer.equals(that.offer))
-
 
906
        return false;
-
 
907
    }
-
 
908
 
793
    return true;
909
    return true;
794
  }
910
  }
795
 
911
 
796
  @Override
912
  @Override
797
  public int hashCode() {
913
  public int hashCode() {
Line 914... Line 1030...
914
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.codAvailable, typedOther.codAvailable);
1030
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.codAvailable, typedOther.codAvailable);
915
      if (lastComparison != 0) {
1031
      if (lastComparison != 0) {
916
        return lastComparison;
1032
        return lastComparison;
917
      }
1033
      }
918
    }
1034
    }
-
 
1035
    lastComparison = Boolean.valueOf(isSetTagline()).compareTo(typedOther.isSetTagline());
-
 
1036
    if (lastComparison != 0) {
-
 
1037
      return lastComparison;
-
 
1038
    }
-
 
1039
    if (isSetTagline()) {
-
 
1040
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tagline, typedOther.tagline);
-
 
1041
      if (lastComparison != 0) {
-
 
1042
        return lastComparison;
-
 
1043
      }
-
 
1044
    }
-
 
1045
    lastComparison = Boolean.valueOf(isSetOffer()).compareTo(typedOther.isSetOffer());
-
 
1046
    if (lastComparison != 0) {
-
 
1047
      return lastComparison;
-
 
1048
    }
-
 
1049
    if (isSetOffer()) {
-
 
1050
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.offer, typedOther.offer);
-
 
1051
      if (lastComparison != 0) {
-
 
1052
        return lastComparison;
-
 
1053
      }
-
 
1054
    }
919
    return 0;
1055
    return 0;
920
  }
1056
  }
921
 
1057
 
922
  public _Fields fieldForId(int fieldId) {
1058
  public _Fields fieldForId(int fieldId) {
923
    return _Fields.findByThriftId(fieldId);
1059
    return _Fields.findByThriftId(fieldId);
Line 1015... Line 1151...
1015
            setCodAvailableIsSet(true);
1151
            setCodAvailableIsSet(true);
1016
          } else { 
1152
          } else { 
1017
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1153
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1018
          }
1154
          }
1019
          break;
1155
          break;
-
 
1156
        case 12: // TAGLINE
-
 
1157
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
1158
            this.tagline = iprot.readString();
-
 
1159
          } else { 
-
 
1160
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1161
          }
-
 
1162
          break;
-
 
1163
        case 13: // OFFER
-
 
1164
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
1165
            this.offer = iprot.readString();
-
 
1166
          } else { 
-
 
1167
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1168
          }
-
 
1169
          break;
1020
        default:
1170
        default:
1021
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1171
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1022
      }
1172
      }
1023
      iprot.readFieldEnd();
1173
      iprot.readFieldEnd();
1024
    }
1174
    }
Line 1069... Line 1219...
1069
      oprot.writeFieldEnd();
1219
      oprot.writeFieldEnd();
1070
    }
1220
    }
1071
    oprot.writeFieldBegin(COD_AVAILABLE_FIELD_DESC);
1221
    oprot.writeFieldBegin(COD_AVAILABLE_FIELD_DESC);
1072
    oprot.writeI64(this.codAvailable);
1222
    oprot.writeI64(this.codAvailable);
1073
    oprot.writeFieldEnd();
1223
    oprot.writeFieldEnd();
-
 
1224
    if (this.tagline != null) {
-
 
1225
      oprot.writeFieldBegin(TAGLINE_FIELD_DESC);
-
 
1226
      oprot.writeString(this.tagline);
-
 
1227
      oprot.writeFieldEnd();
-
 
1228
    }
-
 
1229
    if (this.offer != null) {
-
 
1230
      oprot.writeFieldBegin(OFFER_FIELD_DESC);
-
 
1231
      oprot.writeString(this.offer);
-
 
1232
      oprot.writeFieldEnd();
-
 
1233
    }
1074
    oprot.writeFieldStop();
1234
    oprot.writeFieldStop();
1075
    oprot.writeStructEnd();
1235
    oprot.writeStructEnd();
1076
  }
1236
  }
1077
 
1237
 
1078
  @Override
1238
  @Override
Line 1137... Line 1297...
1137
    first = false;
1297
    first = false;
1138
    if (!first) sb.append(", ");
1298
    if (!first) sb.append(", ");
1139
    sb.append("codAvailable:");
1299
    sb.append("codAvailable:");
1140
    sb.append(this.codAvailable);
1300
    sb.append(this.codAvailable);
1141
    first = false;
1301
    first = false;
-
 
1302
    if (!first) sb.append(", ");
-
 
1303
    sb.append("tagline:");
-
 
1304
    if (this.tagline == null) {
-
 
1305
      sb.append("null");
-
 
1306
    } else {
-
 
1307
      sb.append(this.tagline);
-
 
1308
    }
-
 
1309
    first = false;
-
 
1310
    if (!first) sb.append(", ");
-
 
1311
    sb.append("offer:");
-
 
1312
    if (this.offer == null) {
-
 
1313
      sb.append("null");
-
 
1314
    } else {
-
 
1315
      sb.append(this.offer);
-
 
1316
    }
-
 
1317
    first = false;
1142
    sb.append(")");
1318
    sb.append(")");
1143
    return sb.toString();
1319
    return sb.toString();
1144
  }
1320
  }
1145
 
1321
 
1146
  public void validate() throws org.apache.thrift.TException {
1322
  public void validate() throws org.apache.thrift.TException {