Subversion Repositories SmartDukaan

Rev

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

Rev 6736 Rev 20873
Line 33... Line 33...
33
  private static final org.apache.thrift.protocol.TField TOTAL_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("totalPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)8);
33
  private static final org.apache.thrift.protocol.TField TOTAL_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("totalPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)8);
34
  private static final org.apache.thrift.protocol.TField DISCOUNTED_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("discountedPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)9);
34
  private static final org.apache.thrift.protocol.TField DISCOUNTED_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("discountedPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)9);
35
  private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("couponCode", org.apache.thrift.protocol.TType.STRING, (short)10);
35
  private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("couponCode", org.apache.thrift.protocol.TType.STRING, (short)10);
36
  private static final org.apache.thrift.protocol.TField PICKUP_STORE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("pickupStoreId", org.apache.thrift.protocol.TType.I64, (short)11);
36
  private static final org.apache.thrift.protocol.TField PICKUP_STORE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("pickupStoreId", org.apache.thrift.protocol.TType.I64, (short)11);
37
  private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)12);
37
  private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)12);
-
 
38
  private static final org.apache.thrift.protocol.TField WALLET_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("wallet_amount", org.apache.thrift.protocol.TType.DOUBLE, (short)13);
38
 
39
 
39
  private long id; // required
40
  private long id; // required
40
  private List<Line> lines; // required
41
  private List<Line> lines; // required
41
  private CartStatus status; // required
42
  private CartStatus status; // required
42
  private long createdOn; // required
43
  private long createdOn; // required
Line 46... Line 47...
46
  private double totalPrice; // required
47
  private double totalPrice; // required
47
  private double discountedPrice; // required
48
  private double discountedPrice; // required
48
  private String couponCode; // required
49
  private String couponCode; // required
49
  private long pickupStoreId; // required
50
  private long pickupStoreId; // required
50
  private String message; // required
51
  private String message; // required
-
 
52
  private double wallet_amount; // required
51
 
53
 
52
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
54
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
53
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
55
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
54
    ID((short)1, "id"),
56
    ID((short)1, "id"),
55
    LINES((short)2, "lines"),
57
    LINES((short)2, "lines"),
Line 64... Line 66...
64
    ADDRESS_ID((short)7, "addressId"),
66
    ADDRESS_ID((short)7, "addressId"),
65
    TOTAL_PRICE((short)8, "totalPrice"),
67
    TOTAL_PRICE((short)8, "totalPrice"),
66
    DISCOUNTED_PRICE((short)9, "discountedPrice"),
68
    DISCOUNTED_PRICE((short)9, "discountedPrice"),
67
    COUPON_CODE((short)10, "couponCode"),
69
    COUPON_CODE((short)10, "couponCode"),
68
    PICKUP_STORE_ID((short)11, "pickupStoreId"),
70
    PICKUP_STORE_ID((short)11, "pickupStoreId"),
69
    MESSAGE((short)12, "message");
71
    MESSAGE((short)12, "message"),
-
 
72
    WALLET_AMOUNT((short)13, "wallet_amount");
70
 
73
 
71
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
74
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
72
 
75
 
73
    static {
76
    static {
74
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
77
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 103... Line 106...
103
          return COUPON_CODE;
106
          return COUPON_CODE;
104
        case 11: // PICKUP_STORE_ID
107
        case 11: // PICKUP_STORE_ID
105
          return PICKUP_STORE_ID;
108
          return PICKUP_STORE_ID;
106
        case 12: // MESSAGE
109
        case 12: // MESSAGE
107
          return MESSAGE;
110
          return MESSAGE;
-
 
111
        case 13: // WALLET_AMOUNT
-
 
112
          return WALLET_AMOUNT;
108
        default:
113
        default:
109
          return null;
114
          return null;
110
      }
115
      }
111
    }
116
    }
112
 
117
 
Line 151... Line 156...
151
  private static final int __CHECKEDOUTON_ISSET_ID = 3;
156
  private static final int __CHECKEDOUTON_ISSET_ID = 3;
152
  private static final int __ADDRESSID_ISSET_ID = 4;
157
  private static final int __ADDRESSID_ISSET_ID = 4;
153
  private static final int __TOTALPRICE_ISSET_ID = 5;
158
  private static final int __TOTALPRICE_ISSET_ID = 5;
154
  private static final int __DISCOUNTEDPRICE_ISSET_ID = 6;
159
  private static final int __DISCOUNTEDPRICE_ISSET_ID = 6;
155
  private static final int __PICKUPSTOREID_ISSET_ID = 7;
160
  private static final int __PICKUPSTOREID_ISSET_ID = 7;
-
 
161
  private static final int __WALLET_AMOUNT_ISSET_ID = 8;
156
  private BitSet __isset_bit_vector = new BitSet(8);
162
  private BitSet __isset_bit_vector = new BitSet(9);
157
 
163
 
158
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
164
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
159
  static {
165
  static {
160
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
166
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
161
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
167
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 181... Line 187...
181
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
187
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
182
    tmpMap.put(_Fields.PICKUP_STORE_ID, new org.apache.thrift.meta_data.FieldMetaData("pickupStoreId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
188
    tmpMap.put(_Fields.PICKUP_STORE_ID, new org.apache.thrift.meta_data.FieldMetaData("pickupStoreId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
183
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
189
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
184
    tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, 
190
    tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, 
185
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
191
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
192
    tmpMap.put(_Fields.WALLET_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("wallet_amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
193
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
186
    metaDataMap = Collections.unmodifiableMap(tmpMap);
194
    metaDataMap = Collections.unmodifiableMap(tmpMap);
187
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Cart.class, metaDataMap);
195
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Cart.class, metaDataMap);
188
  }
196
  }
189
 
197
 
190
  public Cart() {
198
  public Cart() {
Line 200... Line 208...
200
    long addressId,
208
    long addressId,
201
    double totalPrice,
209
    double totalPrice,
202
    double discountedPrice,
210
    double discountedPrice,
203
    String couponCode,
211
    String couponCode,
204
    long pickupStoreId,
212
    long pickupStoreId,
205
    String message)
213
    String message,
-
 
214
    double wallet_amount)
206
  {
215
  {
207
    this();
216
    this();
208
    this.id = id;
217
    this.id = id;
209
    setIdIsSet(true);
218
    setIdIsSet(true);
210
    this.lines = lines;
219
    this.lines = lines;
Line 223... Line 232...
223
    setDiscountedPriceIsSet(true);
232
    setDiscountedPriceIsSet(true);
224
    this.couponCode = couponCode;
233
    this.couponCode = couponCode;
225
    this.pickupStoreId = pickupStoreId;
234
    this.pickupStoreId = pickupStoreId;
226
    setPickupStoreIdIsSet(true);
235
    setPickupStoreIdIsSet(true);
227
    this.message = message;
236
    this.message = message;
-
 
237
    this.wallet_amount = wallet_amount;
-
 
238
    setWallet_amountIsSet(true);
228
  }
239
  }
229
 
240
 
230
  /**
241
  /**
231
   * Performs a deep copy on <i>other</i>.
242
   * Performs a deep copy on <i>other</i>.
232
   */
243
   */
Line 255... Line 266...
255
    }
266
    }
256
    this.pickupStoreId = other.pickupStoreId;
267
    this.pickupStoreId = other.pickupStoreId;
257
    if (other.isSetMessage()) {
268
    if (other.isSetMessage()) {
258
      this.message = other.message;
269
      this.message = other.message;
259
    }
270
    }
-
 
271
    this.wallet_amount = other.wallet_amount;
260
  }
272
  }
261
 
273
 
262
  public Cart deepCopy() {
274
  public Cart deepCopy() {
263
    return new Cart(this);
275
    return new Cart(this);
264
  }
276
  }
Line 283... Line 295...
283
    this.discountedPrice = 0.0;
295
    this.discountedPrice = 0.0;
284
    this.couponCode = null;
296
    this.couponCode = null;
285
    setPickupStoreIdIsSet(false);
297
    setPickupStoreIdIsSet(false);
286
    this.pickupStoreId = 0;
298
    this.pickupStoreId = 0;
287
    this.message = null;
299
    this.message = null;
-
 
300
    setWallet_amountIsSet(false);
-
 
301
    this.wallet_amount = 0.0;
288
  }
302
  }
289
 
303
 
290
  public long getId() {
304
  public long getId() {
291
    return this.id;
305
    return this.id;
292
  }
306
  }
Line 576... Line 590...
576
    if (!value) {
590
    if (!value) {
577
      this.message = null;
591
      this.message = null;
578
    }
592
    }
579
  }
593
  }
580
 
594
 
-
 
595
  public double getWallet_amount() {
-
 
596
    return this.wallet_amount;
-
 
597
  }
-
 
598
 
-
 
599
  public void setWallet_amount(double wallet_amount) {
-
 
600
    this.wallet_amount = wallet_amount;
-
 
601
    setWallet_amountIsSet(true);
-
 
602
  }
-
 
603
 
-
 
604
  public void unsetWallet_amount() {
-
 
605
    __isset_bit_vector.clear(__WALLET_AMOUNT_ISSET_ID);
-
 
606
  }
-
 
607
 
-
 
608
  /** Returns true if field wallet_amount is set (has been assigned a value) and false otherwise */
-
 
609
  public boolean isSetWallet_amount() {
-
 
610
    return __isset_bit_vector.get(__WALLET_AMOUNT_ISSET_ID);
-
 
611
  }
-
 
612
 
-
 
613
  public void setWallet_amountIsSet(boolean value) {
-
 
614
    __isset_bit_vector.set(__WALLET_AMOUNT_ISSET_ID, value);
-
 
615
  }
-
 
616
 
581
  public void setFieldValue(_Fields field, Object value) {
617
  public void setFieldValue(_Fields field, Object value) {
582
    switch (field) {
618
    switch (field) {
583
    case ID:
619
    case ID:
584
      if (value == null) {
620
      if (value == null) {
585
        unsetId();
621
        unsetId();
Line 674... Line 710...
674
      } else {
710
      } else {
675
        setMessage((String)value);
711
        setMessage((String)value);
676
      }
712
      }
677
      break;
713
      break;
678
 
714
 
-
 
715
    case WALLET_AMOUNT:
-
 
716
      if (value == null) {
-
 
717
        unsetWallet_amount();
-
 
718
      } else {
-
 
719
        setWallet_amount((Double)value);
-
 
720
      }
-
 
721
      break;
-
 
722
 
679
    }
723
    }
680
  }
724
  }
681
 
725
 
682
  public Object getFieldValue(_Fields field) {
726
  public Object getFieldValue(_Fields field) {
683
    switch (field) {
727
    switch (field) {
Line 715... Line 759...
715
      return Long.valueOf(getPickupStoreId());
759
      return Long.valueOf(getPickupStoreId());
716
 
760
 
717
    case MESSAGE:
761
    case MESSAGE:
718
      return getMessage();
762
      return getMessage();
719
 
763
 
-
 
764
    case WALLET_AMOUNT:
-
 
765
      return Double.valueOf(getWallet_amount());
-
 
766
 
720
    }
767
    }
721
    throw new IllegalStateException();
768
    throw new IllegalStateException();
722
  }
769
  }
723
 
770
 
724
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
771
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 750... Line 797...
750
      return isSetCouponCode();
797
      return isSetCouponCode();
751
    case PICKUP_STORE_ID:
798
    case PICKUP_STORE_ID:
752
      return isSetPickupStoreId();
799
      return isSetPickupStoreId();
753
    case MESSAGE:
800
    case MESSAGE:
754
      return isSetMessage();
801
      return isSetMessage();
-
 
802
    case WALLET_AMOUNT:
-
 
803
      return isSetWallet_amount();
755
    }
804
    }
756
    throw new IllegalStateException();
805
    throw new IllegalStateException();
757
  }
806
  }
758
 
807
 
759
  @Override
808
  @Override
Line 875... Line 924...
875
        return false;
924
        return false;
876
      if (!this.message.equals(that.message))
925
      if (!this.message.equals(that.message))
877
        return false;
926
        return false;
878
    }
927
    }
879
 
928
 
-
 
929
    boolean this_present_wallet_amount = true;
-
 
930
    boolean that_present_wallet_amount = true;
-
 
931
    if (this_present_wallet_amount || that_present_wallet_amount) {
-
 
932
      if (!(this_present_wallet_amount && that_present_wallet_amount))
-
 
933
        return false;
-
 
934
      if (this.wallet_amount != that.wallet_amount)
-
 
935
        return false;
-
 
936
    }
-
 
937
 
880
    return true;
938
    return true;
881
  }
939
  }
882
 
940
 
883
  @Override
941
  @Override
884
  public int hashCode() {
942
  public int hashCode() {
Line 1011... Line 1069...
1011
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message);
1069
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message);
1012
      if (lastComparison != 0) {
1070
      if (lastComparison != 0) {
1013
        return lastComparison;
1071
        return lastComparison;
1014
      }
1072
      }
1015
    }
1073
    }
-
 
1074
    lastComparison = Boolean.valueOf(isSetWallet_amount()).compareTo(typedOther.isSetWallet_amount());
-
 
1075
    if (lastComparison != 0) {
-
 
1076
      return lastComparison;
-
 
1077
    }
-
 
1078
    if (isSetWallet_amount()) {
-
 
1079
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wallet_amount, typedOther.wallet_amount);
-
 
1080
      if (lastComparison != 0) {
-
 
1081
        return lastComparison;
-
 
1082
      }
-
 
1083
    }
1016
    return 0;
1084
    return 0;
1017
  }
1085
  }
1018
 
1086
 
1019
  public _Fields fieldForId(int fieldId) {
1087
  public _Fields fieldForId(int fieldId) {
1020
    return _Fields.findByThriftId(fieldId);
1088
    return _Fields.findByThriftId(fieldId);
Line 1131... Line 1199...
1131
            this.message = iprot.readString();
1199
            this.message = iprot.readString();
1132
          } else { 
1200
          } else { 
1133
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1201
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1134
          }
1202
          }
1135
          break;
1203
          break;
-
 
1204
        case 13: // WALLET_AMOUNT
-
 
1205
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
-
 
1206
            this.wallet_amount = iprot.readDouble();
-
 
1207
            setWallet_amountIsSet(true);
-
 
1208
          } else { 
-
 
1209
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1210
          }
-
 
1211
          break;
1136
        default:
1212
        default:
1137
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1213
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1138
      }
1214
      }
1139
      iprot.readFieldEnd();
1215
      iprot.readFieldEnd();
1140
    }
1216
    }
Line 1195... Line 1271...
1195
    if (this.message != null) {
1271
    if (this.message != null) {
1196
      oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
1272
      oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
1197
      oprot.writeString(this.message);
1273
      oprot.writeString(this.message);
1198
      oprot.writeFieldEnd();
1274
      oprot.writeFieldEnd();
1199
    }
1275
    }
-
 
1276
    oprot.writeFieldBegin(WALLET_AMOUNT_FIELD_DESC);
-
 
1277
    oprot.writeDouble(this.wallet_amount);
-
 
1278
    oprot.writeFieldEnd();
1200
    oprot.writeFieldStop();
1279
    oprot.writeFieldStop();
1201
    oprot.writeStructEnd();
1280
    oprot.writeStructEnd();
1202
  }
1281
  }
1203
 
1282
 
1204
  @Override
1283
  @Override
Line 1267... Line 1346...
1267
      sb.append("null");
1346
      sb.append("null");
1268
    } else {
1347
    } else {
1269
      sb.append(this.message);
1348
      sb.append(this.message);
1270
    }
1349
    }
1271
    first = false;
1350
    first = false;
-
 
1351
    if (!first) sb.append(", ");
-
 
1352
    sb.append("wallet_amount:");
-
 
1353
    sb.append(this.wallet_amount);
-
 
1354
    first = false;
1272
    sb.append(")");
1355
    sb.append(")");
1273
    return sb.toString();
1356
    return sb.toString();
1274
  }
1357
  }
1275
 
1358
 
1276
  public void validate() throws org.apache.thrift.TException {
1359
  public void validate() throws org.apache.thrift.TException {