Subversion Repositories SmartDukaan

Rev

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

Rev 1982 Rev 3430
Line 1... Line 1...
1
/**
1
/**
2
 * Autogenerated by Thrift
2
 * Autogenerated by Thrift Compiler (0.7.0)
3
 *
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
5
 */
6
package in.shop2020.model.v1.user;
6
package in.shop2020.model.v1.user;
7
 
7
 
Line 13... Line 13...
13
import java.util.Set;
13
import java.util.Set;
14
import java.util.HashSet;
14
import java.util.HashSet;
15
import java.util.EnumSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
16
import java.util.Collections;
17
import java.util.BitSet;
17
import java.util.BitSet;
-
 
18
import java.nio.ByteBuffer;
18
import java.util.Arrays;
19
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
import org.slf4j.LoggerFactory;
21
 
22
 
22
import org.apache.thrift.*;
-
 
23
import org.apache.thrift.meta_data.*;
-
 
24
import org.apache.thrift.protocol.*;
-
 
25
 
-
 
26
public class Cart implements TBase<Cart._Fields>, java.io.Serializable, Cloneable, Comparable<Cart> {
23
public class Cart implements org.apache.thrift.TBase<Cart, Cart._Fields>, java.io.Serializable, Cloneable {
27
  private static final TStruct STRUCT_DESC = new TStruct("Cart");
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Cart");
28
 
25
 
29
  private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
26
  private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);
30
  private static final TField LINES_FIELD_DESC = new TField("lines", TType.LIST, (short)2);
27
  private static final org.apache.thrift.protocol.TField LINES_FIELD_DESC = new org.apache.thrift.protocol.TField("lines", org.apache.thrift.protocol.TType.LIST, (short)2);
31
  private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
28
  private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.I32, (short)3);
32
  private static final TField CREATED_ON_FIELD_DESC = new TField("createdOn", TType.I64, (short)4);
29
  private static final org.apache.thrift.protocol.TField CREATED_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("createdOn", org.apache.thrift.protocol.TType.I64, (short)4);
33
  private static final TField UPDATED_ON_FIELD_DESC = new TField("updatedOn", TType.I64, (short)5);
30
  private static final org.apache.thrift.protocol.TField UPDATED_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("updatedOn", org.apache.thrift.protocol.TType.I64, (short)5);
34
  private static final TField CHECKED_OUT_ON_FIELD_DESC = new TField("checkedOutOn", TType.I64, (short)6);
31
  private static final org.apache.thrift.protocol.TField CHECKED_OUT_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("checkedOutOn", org.apache.thrift.protocol.TType.I64, (short)6);
35
  private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)7);
32
  private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)7);
36
  private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)8);
33
  private static final org.apache.thrift.protocol.TField ADDRESS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("addressId", org.apache.thrift.protocol.TType.I64, (short)8);
37
  private static final TField TOTAL_PRICE_FIELD_DESC = new TField("totalPrice", TType.DOUBLE, (short)9);
34
  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)9);
38
  private static final TField DISCOUNTED_PRICE_FIELD_DESC = new TField("discountedPrice", TType.DOUBLE, (short)10);
35
  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)10);
39
  private static final TField COUPON_CODE_FIELD_DESC = new TField("couponCode", TType.STRING, (short)11);
36
  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)11);
40
 
37
 
41
  private long id;
38
  private long id; // required
42
  private List<Line> lines;
39
  private List<Line> lines; // required
43
  private CartStatus status;
40
  private CartStatus status; // required
44
  private long createdOn;
41
  private long createdOn; // required
45
  private long updatedOn;
42
  private long updatedOn; // required
46
  private long checkedOutOn;
43
  private long checkedOutOn; // required
47
  private long userId;
44
  private long userId; // required
48
  private long addressId;
45
  private long addressId; // required
49
  private double totalPrice;
46
  private double totalPrice; // required
50
  private double discountedPrice;
47
  private double discountedPrice; // required
51
  private String couponCode;
48
  private String couponCode; // required
52
 
49
 
53
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
50
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
54
  public enum _Fields implements TFieldIdEnum {
51
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
55
    ID((short)1, "id"),
52
    ID((short)1, "id"),
56
    LINES((short)2, "lines"),
53
    LINES((short)2, "lines"),
57
    /**
54
    /**
58
     * 
55
     * 
59
     * @see CartStatus
56
     * @see CartStatus
Line 66... Line 63...
66
    ADDRESS_ID((short)8, "addressId"),
63
    ADDRESS_ID((short)8, "addressId"),
67
    TOTAL_PRICE((short)9, "totalPrice"),
64
    TOTAL_PRICE((short)9, "totalPrice"),
68
    DISCOUNTED_PRICE((short)10, "discountedPrice"),
65
    DISCOUNTED_PRICE((short)10, "discountedPrice"),
69
    COUPON_CODE((short)11, "couponCode");
66
    COUPON_CODE((short)11, "couponCode");
70
 
67
 
71
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
72
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
68
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
73
 
69
 
74
    static {
70
    static {
75
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
71
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
76
        byId.put((int)field._thriftId, field);
-
 
77
        byName.put(field.getFieldName(), field);
72
        byName.put(field.getFieldName(), field);
78
      }
73
      }
79
    }
74
    }
80
 
75
 
81
    /**
76
    /**
82
     * Find the _Fields constant that matches fieldId, or null if its not found.
77
     * Find the _Fields constant that matches fieldId, or null if its not found.
83
     */
78
     */
84
    public static _Fields findByThriftId(int fieldId) {
79
    public static _Fields findByThriftId(int fieldId) {
-
 
80
      switch(fieldId) {
-
 
81
        case 1: // ID
-
 
82
          return ID;
-
 
83
        case 2: // LINES
-
 
84
          return LINES;
-
 
85
        case 3: // STATUS
-
 
86
          return STATUS;
-
 
87
        case 4: // CREATED_ON
-
 
88
          return CREATED_ON;
-
 
89
        case 5: // UPDATED_ON
-
 
90
          return UPDATED_ON;
-
 
91
        case 6: // CHECKED_OUT_ON
-
 
92
          return CHECKED_OUT_ON;
-
 
93
        case 7: // USER_ID
-
 
94
          return USER_ID;
-
 
95
        case 8: // ADDRESS_ID
-
 
96
          return ADDRESS_ID;
-
 
97
        case 9: // TOTAL_PRICE
-
 
98
          return TOTAL_PRICE;
-
 
99
        case 10: // DISCOUNTED_PRICE
85
      return byId.get(fieldId);
100
          return DISCOUNTED_PRICE;
-
 
101
        case 11: // COUPON_CODE
-
 
102
          return COUPON_CODE;
-
 
103
        default:
-
 
104
          return null;
-
 
105
      }
86
    }
106
    }
87
 
107
 
88
    /**
108
    /**
89
     * Find the _Fields constant that matches fieldId, throwing an exception
109
     * Find the _Fields constant that matches fieldId, throwing an exception
90
     * if it is not found.
110
     * if it is not found.
Line 128... Line 148...
128
  private static final int __ADDRESSID_ISSET_ID = 5;
148
  private static final int __ADDRESSID_ISSET_ID = 5;
129
  private static final int __TOTALPRICE_ISSET_ID = 6;
149
  private static final int __TOTALPRICE_ISSET_ID = 6;
130
  private static final int __DISCOUNTEDPRICE_ISSET_ID = 7;
150
  private static final int __DISCOUNTEDPRICE_ISSET_ID = 7;
131
  private BitSet __isset_bit_vector = new BitSet(8);
151
  private BitSet __isset_bit_vector = new BitSet(8);
132
 
152
 
133
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
153
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
134
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
-
 
135
        new FieldValueMetaData(TType.I64)));
-
 
136
    put(_Fields.LINES, new FieldMetaData("lines", TFieldRequirementType.DEFAULT, 
-
 
137
        new ListMetaData(TType.LIST, 
-
 
138
            new StructMetaData(TType.STRUCT, Line.class))));
-
 
139
    put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
-
 
140
        new EnumMetaData(TType.ENUM, CartStatus.class)));
-
 
141
    put(_Fields.CREATED_ON, new FieldMetaData("createdOn", TFieldRequirementType.DEFAULT, 
-
 
142
        new FieldValueMetaData(TType.I64)));
-
 
143
    put(_Fields.UPDATED_ON, new FieldMetaData("updatedOn", TFieldRequirementType.DEFAULT, 
-
 
144
        new FieldValueMetaData(TType.I64)));
-
 
145
    put(_Fields.CHECKED_OUT_ON, new FieldMetaData("checkedOutOn", TFieldRequirementType.DEFAULT, 
-
 
146
        new FieldValueMetaData(TType.I64)));
-
 
147
    put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
-
 
148
        new FieldValueMetaData(TType.I64)));
-
 
149
    put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
-
 
150
        new FieldValueMetaData(TType.I64)));
-
 
151
    put(_Fields.TOTAL_PRICE, new FieldMetaData("totalPrice", TFieldRequirementType.DEFAULT, 
-
 
152
        new FieldValueMetaData(TType.DOUBLE)));
-
 
153
    put(_Fields.DISCOUNTED_PRICE, new FieldMetaData("discountedPrice", TFieldRequirementType.DEFAULT, 
-
 
154
        new FieldValueMetaData(TType.DOUBLE)));
-
 
155
    put(_Fields.COUPON_CODE, new FieldMetaData("couponCode", TFieldRequirementType.DEFAULT, 
-
 
156
        new FieldValueMetaData(TType.STRING)));
-
 
157
  }});
-
 
158
 
-
 
159
  static {
154
  static {
-
 
155
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
156
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
157
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
158
    tmpMap.put(_Fields.LINES, new org.apache.thrift.meta_data.FieldMetaData("lines", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
159
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
-
 
160
            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Line.class))));
-
 
161
    tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
162
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, CartStatus.class)));
-
 
163
    tmpMap.put(_Fields.CREATED_ON, new org.apache.thrift.meta_data.FieldMetaData("createdOn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
164
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
165
    tmpMap.put(_Fields.UPDATED_ON, new org.apache.thrift.meta_data.FieldMetaData("updatedOn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
166
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
167
    tmpMap.put(_Fields.CHECKED_OUT_ON, new org.apache.thrift.meta_data.FieldMetaData("checkedOutOn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
168
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
169
    tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
170
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
171
    tmpMap.put(_Fields.ADDRESS_ID, new org.apache.thrift.meta_data.FieldMetaData("addressId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
172
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
173
    tmpMap.put(_Fields.TOTAL_PRICE, new org.apache.thrift.meta_data.FieldMetaData("totalPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
174
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
-
 
175
    tmpMap.put(_Fields.DISCOUNTED_PRICE, new org.apache.thrift.meta_data.FieldMetaData("discountedPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
176
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
-
 
177
    tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
178
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
179
    metaDataMap = Collections.unmodifiableMap(tmpMap);
160
    FieldMetaData.addStructMetaDataMap(Cart.class, metaDataMap);
180
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Cart.class, metaDataMap);
161
  }
181
  }
162
 
182
 
163
  public Cart() {
183
  public Cart() {
164
  }
184
  }
165
 
185
 
Line 229... Line 249...
229
 
249
 
230
  public Cart deepCopy() {
250
  public Cart deepCopy() {
231
    return new Cart(this);
251
    return new Cart(this);
232
  }
252
  }
233
 
253
 
234
  @Deprecated
254
  @Override
235
  public Cart clone() {
255
  public void clear() {
-
 
256
    setIdIsSet(false);
-
 
257
    this.id = 0;
-
 
258
    this.lines = null;
-
 
259
    this.status = null;
236
    return new Cart(this);
260
    setCreatedOnIsSet(false);
-
 
261
    this.createdOn = 0;
-
 
262
    setUpdatedOnIsSet(false);
-
 
263
    this.updatedOn = 0;
-
 
264
    setCheckedOutOnIsSet(false);
-
 
265
    this.checkedOutOn = 0;
-
 
266
    setUserIdIsSet(false);
-
 
267
    this.userId = 0;
-
 
268
    setAddressIdIsSet(false);
-
 
269
    this.addressId = 0;
-
 
270
    setTotalPriceIsSet(false);
-
 
271
    this.totalPrice = 0.0;
-
 
272
    setDiscountedPriceIsSet(false);
-
 
273
    this.discountedPrice = 0.0;
-
 
274
    this.couponCode = null;
237
  }
275
  }
238
 
276
 
239
  public long getId() {
277
  public long getId() {
240
    return this.id;
278
    return this.id;
241
  }
279
  }
242
 
280
 
243
  public Cart setId(long id) {
281
  public void setId(long id) {
244
    this.id = id;
282
    this.id = id;
245
    setIdIsSet(true);
283
    setIdIsSet(true);
246
    return this;
-
 
247
  }
284
  }
248
 
285
 
249
  public void unsetId() {
286
  public void unsetId() {
250
    __isset_bit_vector.clear(__ID_ISSET_ID);
287
    __isset_bit_vector.clear(__ID_ISSET_ID);
251
  }
288
  }
252
 
289
 
253
  /** Returns true if field id is set (has been asigned a value) and false otherwise */
290
  /** Returns true if field id is set (has been assigned a value) and false otherwise */
254
  public boolean isSetId() {
291
  public boolean isSetId() {
255
    return __isset_bit_vector.get(__ID_ISSET_ID);
292
    return __isset_bit_vector.get(__ID_ISSET_ID);
256
  }
293
  }
257
 
294
 
258
  public void setIdIsSet(boolean value) {
295
  public void setIdIsSet(boolean value) {
Line 276... Line 313...
276
 
313
 
277
  public List<Line> getLines() {
314
  public List<Line> getLines() {
278
    return this.lines;
315
    return this.lines;
279
  }
316
  }
280
 
317
 
281
  public Cart setLines(List<Line> lines) {
318
  public void setLines(List<Line> lines) {
282
    this.lines = lines;
319
    this.lines = lines;
283
    return this;
-
 
284
  }
320
  }
285
 
321
 
286
  public void unsetLines() {
322
  public void unsetLines() {
287
    this.lines = null;
323
    this.lines = null;
288
  }
324
  }
289
 
325
 
290
  /** Returns true if field lines is set (has been asigned a value) and false otherwise */
326
  /** Returns true if field lines is set (has been assigned a value) and false otherwise */
291
  public boolean isSetLines() {
327
  public boolean isSetLines() {
292
    return this.lines != null;
328
    return this.lines != null;
293
  }
329
  }
294
 
330
 
295
  public void setLinesIsSet(boolean value) {
331
  public void setLinesIsSet(boolean value) {
Line 308... Line 344...
308
 
344
 
309
  /**
345
  /**
310
   * 
346
   * 
311
   * @see CartStatus
347
   * @see CartStatus
312
   */
348
   */
313
  public Cart setStatus(CartStatus status) {
349
  public void setStatus(CartStatus status) {
314
    this.status = status;
350
    this.status = status;
315
    return this;
-
 
316
  }
351
  }
317
 
352
 
318
  public void unsetStatus() {
353
  public void unsetStatus() {
319
    this.status = null;
354
    this.status = null;
320
  }
355
  }
321
 
356
 
322
  /** Returns true if field status is set (has been asigned a value) and false otherwise */
357
  /** Returns true if field status is set (has been assigned a value) and false otherwise */
323
  public boolean isSetStatus() {
358
  public boolean isSetStatus() {
324
    return this.status != null;
359
    return this.status != null;
325
  }
360
  }
326
 
361
 
327
  public void setStatusIsSet(boolean value) {
362
  public void setStatusIsSet(boolean value) {
Line 332... Line 367...
332
 
367
 
333
  public long getCreatedOn() {
368
  public long getCreatedOn() {
334
    return this.createdOn;
369
    return this.createdOn;
335
  }
370
  }
336
 
371
 
337
  public Cart setCreatedOn(long createdOn) {
372
  public void setCreatedOn(long createdOn) {
338
    this.createdOn = createdOn;
373
    this.createdOn = createdOn;
339
    setCreatedOnIsSet(true);
374
    setCreatedOnIsSet(true);
340
    return this;
-
 
341
  }
375
  }
342
 
376
 
343
  public void unsetCreatedOn() {
377
  public void unsetCreatedOn() {
344
    __isset_bit_vector.clear(__CREATEDON_ISSET_ID);
378
    __isset_bit_vector.clear(__CREATEDON_ISSET_ID);
345
  }
379
  }
346
 
380
 
347
  /** Returns true if field createdOn is set (has been asigned a value) and false otherwise */
381
  /** Returns true if field createdOn is set (has been assigned a value) and false otherwise */
348
  public boolean isSetCreatedOn() {
382
  public boolean isSetCreatedOn() {
349
    return __isset_bit_vector.get(__CREATEDON_ISSET_ID);
383
    return __isset_bit_vector.get(__CREATEDON_ISSET_ID);
350
  }
384
  }
351
 
385
 
352
  public void setCreatedOnIsSet(boolean value) {
386
  public void setCreatedOnIsSet(boolean value) {
Line 355... Line 389...
355
 
389
 
356
  public long getUpdatedOn() {
390
  public long getUpdatedOn() {
357
    return this.updatedOn;
391
    return this.updatedOn;
358
  }
392
  }
359
 
393
 
360
  public Cart setUpdatedOn(long updatedOn) {
394
  public void setUpdatedOn(long updatedOn) {
361
    this.updatedOn = updatedOn;
395
    this.updatedOn = updatedOn;
362
    setUpdatedOnIsSet(true);
396
    setUpdatedOnIsSet(true);
363
    return this;
-
 
364
  }
397
  }
365
 
398
 
366
  public void unsetUpdatedOn() {
399
  public void unsetUpdatedOn() {
367
    __isset_bit_vector.clear(__UPDATEDON_ISSET_ID);
400
    __isset_bit_vector.clear(__UPDATEDON_ISSET_ID);
368
  }
401
  }
369
 
402
 
370
  /** Returns true if field updatedOn is set (has been asigned a value) and false otherwise */
403
  /** Returns true if field updatedOn is set (has been assigned a value) and false otherwise */
371
  public boolean isSetUpdatedOn() {
404
  public boolean isSetUpdatedOn() {
372
    return __isset_bit_vector.get(__UPDATEDON_ISSET_ID);
405
    return __isset_bit_vector.get(__UPDATEDON_ISSET_ID);
373
  }
406
  }
374
 
407
 
375
  public void setUpdatedOnIsSet(boolean value) {
408
  public void setUpdatedOnIsSet(boolean value) {
Line 378... Line 411...
378
 
411
 
379
  public long getCheckedOutOn() {
412
  public long getCheckedOutOn() {
380
    return this.checkedOutOn;
413
    return this.checkedOutOn;
381
  }
414
  }
382
 
415
 
383
  public Cart setCheckedOutOn(long checkedOutOn) {
416
  public void setCheckedOutOn(long checkedOutOn) {
384
    this.checkedOutOn = checkedOutOn;
417
    this.checkedOutOn = checkedOutOn;
385
    setCheckedOutOnIsSet(true);
418
    setCheckedOutOnIsSet(true);
386
    return this;
-
 
387
  }
419
  }
388
 
420
 
389
  public void unsetCheckedOutOn() {
421
  public void unsetCheckedOutOn() {
390
    __isset_bit_vector.clear(__CHECKEDOUTON_ISSET_ID);
422
    __isset_bit_vector.clear(__CHECKEDOUTON_ISSET_ID);
391
  }
423
  }
392
 
424
 
393
  /** Returns true if field checkedOutOn is set (has been asigned a value) and false otherwise */
425
  /** Returns true if field checkedOutOn is set (has been assigned a value) and false otherwise */
394
  public boolean isSetCheckedOutOn() {
426
  public boolean isSetCheckedOutOn() {
395
    return __isset_bit_vector.get(__CHECKEDOUTON_ISSET_ID);
427
    return __isset_bit_vector.get(__CHECKEDOUTON_ISSET_ID);
396
  }
428
  }
397
 
429
 
398
  public void setCheckedOutOnIsSet(boolean value) {
430
  public void setCheckedOutOnIsSet(boolean value) {
Line 401... Line 433...
401
 
433
 
402
  public long getUserId() {
434
  public long getUserId() {
403
    return this.userId;
435
    return this.userId;
404
  }
436
  }
405
 
437
 
406
  public Cart setUserId(long userId) {
438
  public void setUserId(long userId) {
407
    this.userId = userId;
439
    this.userId = userId;
408
    setUserIdIsSet(true);
440
    setUserIdIsSet(true);
409
    return this;
-
 
410
  }
441
  }
411
 
442
 
412
  public void unsetUserId() {
443
  public void unsetUserId() {
413
    __isset_bit_vector.clear(__USERID_ISSET_ID);
444
    __isset_bit_vector.clear(__USERID_ISSET_ID);
414
  }
445
  }
415
 
446
 
416
  /** Returns true if field userId is set (has been asigned a value) and false otherwise */
447
  /** Returns true if field userId is set (has been assigned a value) and false otherwise */
417
  public boolean isSetUserId() {
448
  public boolean isSetUserId() {
418
    return __isset_bit_vector.get(__USERID_ISSET_ID);
449
    return __isset_bit_vector.get(__USERID_ISSET_ID);
419
  }
450
  }
420
 
451
 
421
  public void setUserIdIsSet(boolean value) {
452
  public void setUserIdIsSet(boolean value) {
Line 424... Line 455...
424
 
455
 
425
  public long getAddressId() {
456
  public long getAddressId() {
426
    return this.addressId;
457
    return this.addressId;
427
  }
458
  }
428
 
459
 
429
  public Cart setAddressId(long addressId) {
460
  public void setAddressId(long addressId) {
430
    this.addressId = addressId;
461
    this.addressId = addressId;
431
    setAddressIdIsSet(true);
462
    setAddressIdIsSet(true);
432
    return this;
-
 
433
  }
463
  }
434
 
464
 
435
  public void unsetAddressId() {
465
  public void unsetAddressId() {
436
    __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
466
    __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
437
  }
467
  }
438
 
468
 
439
  /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
469
  /** Returns true if field addressId is set (has been assigned a value) and false otherwise */
440
  public boolean isSetAddressId() {
470
  public boolean isSetAddressId() {
441
    return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
471
    return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
442
  }
472
  }
443
 
473
 
444
  public void setAddressIdIsSet(boolean value) {
474
  public void setAddressIdIsSet(boolean value) {
Line 447... Line 477...
447
 
477
 
448
  public double getTotalPrice() {
478
  public double getTotalPrice() {
449
    return this.totalPrice;
479
    return this.totalPrice;
450
  }
480
  }
451
 
481
 
452
  public Cart setTotalPrice(double totalPrice) {
482
  public void setTotalPrice(double totalPrice) {
453
    this.totalPrice = totalPrice;
483
    this.totalPrice = totalPrice;
454
    setTotalPriceIsSet(true);
484
    setTotalPriceIsSet(true);
455
    return this;
-
 
456
  }
485
  }
457
 
486
 
458
  public void unsetTotalPrice() {
487
  public void unsetTotalPrice() {
459
    __isset_bit_vector.clear(__TOTALPRICE_ISSET_ID);
488
    __isset_bit_vector.clear(__TOTALPRICE_ISSET_ID);
460
  }
489
  }
461
 
490
 
462
  /** Returns true if field totalPrice is set (has been asigned a value) and false otherwise */
491
  /** Returns true if field totalPrice is set (has been assigned a value) and false otherwise */
463
  public boolean isSetTotalPrice() {
492
  public boolean isSetTotalPrice() {
464
    return __isset_bit_vector.get(__TOTALPRICE_ISSET_ID);
493
    return __isset_bit_vector.get(__TOTALPRICE_ISSET_ID);
465
  }
494
  }
466
 
495
 
467
  public void setTotalPriceIsSet(boolean value) {
496
  public void setTotalPriceIsSet(boolean value) {
Line 470... Line 499...
470
 
499
 
471
  public double getDiscountedPrice() {
500
  public double getDiscountedPrice() {
472
    return this.discountedPrice;
501
    return this.discountedPrice;
473
  }
502
  }
474
 
503
 
475
  public Cart setDiscountedPrice(double discountedPrice) {
504
  public void setDiscountedPrice(double discountedPrice) {
476
    this.discountedPrice = discountedPrice;
505
    this.discountedPrice = discountedPrice;
477
    setDiscountedPriceIsSet(true);
506
    setDiscountedPriceIsSet(true);
478
    return this;
-
 
479
  }
507
  }
480
 
508
 
481
  public void unsetDiscountedPrice() {
509
  public void unsetDiscountedPrice() {
482
    __isset_bit_vector.clear(__DISCOUNTEDPRICE_ISSET_ID);
510
    __isset_bit_vector.clear(__DISCOUNTEDPRICE_ISSET_ID);
483
  }
511
  }
484
 
512
 
485
  /** Returns true if field discountedPrice is set (has been asigned a value) and false otherwise */
513
  /** Returns true if field discountedPrice is set (has been assigned a value) and false otherwise */
486
  public boolean isSetDiscountedPrice() {
514
  public boolean isSetDiscountedPrice() {
487
    return __isset_bit_vector.get(__DISCOUNTEDPRICE_ISSET_ID);
515
    return __isset_bit_vector.get(__DISCOUNTEDPRICE_ISSET_ID);
488
  }
516
  }
489
 
517
 
490
  public void setDiscountedPriceIsSet(boolean value) {
518
  public void setDiscountedPriceIsSet(boolean value) {
Line 493... Line 521...
493
 
521
 
494
  public String getCouponCode() {
522
  public String getCouponCode() {
495
    return this.couponCode;
523
    return this.couponCode;
496
  }
524
  }
497
 
525
 
498
  public Cart setCouponCode(String couponCode) {
526
  public void setCouponCode(String couponCode) {
499
    this.couponCode = couponCode;
527
    this.couponCode = couponCode;
500
    return this;
-
 
501
  }
528
  }
502
 
529
 
503
  public void unsetCouponCode() {
530
  public void unsetCouponCode() {
504
    this.couponCode = null;
531
    this.couponCode = null;
505
  }
532
  }
506
 
533
 
507
  /** Returns true if field couponCode is set (has been asigned a value) and false otherwise */
534
  /** Returns true if field couponCode is set (has been assigned a value) and false otherwise */
508
  public boolean isSetCouponCode() {
535
  public boolean isSetCouponCode() {
509
    return this.couponCode != null;
536
    return this.couponCode != null;
510
  }
537
  }
511
 
538
 
512
  public void setCouponCodeIsSet(boolean value) {
539
  public void setCouponCodeIsSet(boolean value) {
Line 606... Line 633...
606
      break;
633
      break;
607
 
634
 
608
    }
635
    }
609
  }
636
  }
610
 
637
 
611
  public void setFieldValue(int fieldID, Object value) {
-
 
612
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
613
  }
-
 
614
 
-
 
615
  public Object getFieldValue(_Fields field) {
638
  public Object getFieldValue(_Fields field) {
616
    switch (field) {
639
    switch (field) {
617
    case ID:
640
    case ID:
618
      return new Long(getId());
641
      return Long.valueOf(getId());
619
 
642
 
620
    case LINES:
643
    case LINES:
621
      return getLines();
644
      return getLines();
622
 
645
 
623
    case STATUS:
646
    case STATUS:
624
      return getStatus();
647
      return getStatus();
625
 
648
 
626
    case CREATED_ON:
649
    case CREATED_ON:
627
      return new Long(getCreatedOn());
650
      return Long.valueOf(getCreatedOn());
628
 
651
 
629
    case UPDATED_ON:
652
    case UPDATED_ON:
630
      return new Long(getUpdatedOn());
653
      return Long.valueOf(getUpdatedOn());
631
 
654
 
632
    case CHECKED_OUT_ON:
655
    case CHECKED_OUT_ON:
633
      return new Long(getCheckedOutOn());
656
      return Long.valueOf(getCheckedOutOn());
634
 
657
 
635
    case USER_ID:
658
    case USER_ID:
636
      return new Long(getUserId());
659
      return Long.valueOf(getUserId());
637
 
660
 
638
    case ADDRESS_ID:
661
    case ADDRESS_ID:
639
      return new Long(getAddressId());
662
      return Long.valueOf(getAddressId());
640
 
663
 
641
    case TOTAL_PRICE:
664
    case TOTAL_PRICE:
642
      return new Double(getTotalPrice());
665
      return Double.valueOf(getTotalPrice());
643
 
666
 
644
    case DISCOUNTED_PRICE:
667
    case DISCOUNTED_PRICE:
645
      return new Double(getDiscountedPrice());
668
      return Double.valueOf(getDiscountedPrice());
646
 
669
 
647
    case COUPON_CODE:
670
    case COUPON_CODE:
648
      return getCouponCode();
671
      return getCouponCode();
649
 
672
 
650
    }
673
    }
651
    throw new IllegalStateException();
674
    throw new IllegalStateException();
652
  }
675
  }
653
 
676
 
654
  public Object getFieldValue(int fieldId) {
-
 
655
    return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
656
  }
-
 
657
 
-
 
658
  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
677
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
659
  public boolean isSet(_Fields field) {
678
  public boolean isSet(_Fields field) {
-
 
679
    if (field == null) {
-
 
680
      throw new IllegalArgumentException();
-
 
681
    }
-
 
682
 
660
    switch (field) {
683
    switch (field) {
661
    case ID:
684
    case ID:
662
      return isSetId();
685
      return isSetId();
663
    case LINES:
686
    case LINES:
664
      return isSetLines();
687
      return isSetLines();
Line 682... Line 705...
682
      return isSetCouponCode();
705
      return isSetCouponCode();
683
    }
706
    }
684
    throw new IllegalStateException();
707
    throw new IllegalStateException();
685
  }
708
  }
686
 
709
 
687
  public boolean isSet(int fieldID) {
-
 
688
    return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
689
  }
-
 
690
 
-
 
691
  @Override
710
  @Override
692
  public boolean equals(Object that) {
711
  public boolean equals(Object that) {
693
    if (that == null)
712
    if (that == null)
694
      return false;
713
      return false;
695
    if (that instanceof Cart)
714
    if (that instanceof Cart)
Line 814... Line 833...
814
    }
833
    }
815
 
834
 
816
    int lastComparison = 0;
835
    int lastComparison = 0;
817
    Cart typedOther = (Cart)other;
836
    Cart typedOther = (Cart)other;
818
 
837
 
819
    lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
838
    lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
820
    if (lastComparison != 0) {
839
    if (lastComparison != 0) {
821
      return lastComparison;
840
      return lastComparison;
822
    }
841
    }
-
 
842
    if (isSetId()) {
823
    lastComparison = TBaseHelper.compareTo(id, typedOther.id);
843
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
824
    if (lastComparison != 0) {
844
      if (lastComparison != 0) {
825
      return lastComparison;
845
        return lastComparison;
-
 
846
      }
826
    }
847
    }
827
    lastComparison = Boolean.valueOf(isSetLines()).compareTo(isSetLines());
848
    lastComparison = Boolean.valueOf(isSetLines()).compareTo(typedOther.isSetLines());
828
    if (lastComparison != 0) {
849
    if (lastComparison != 0) {
829
      return lastComparison;
850
      return lastComparison;
830
    }
851
    }
-
 
852
    if (isSetLines()) {
831
    lastComparison = TBaseHelper.compareTo(lines, typedOther.lines);
853
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lines, typedOther.lines);
832
    if (lastComparison != 0) {
854
      if (lastComparison != 0) {
833
      return lastComparison;
855
        return lastComparison;
-
 
856
      }
834
    }
857
    }
835
    lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
858
    lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
836
    if (lastComparison != 0) {
859
    if (lastComparison != 0) {
837
      return lastComparison;
860
      return lastComparison;
838
    }
861
    }
-
 
862
    if (isSetStatus()) {
839
    lastComparison = TBaseHelper.compareTo(status, typedOther.status);
863
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
840
    if (lastComparison != 0) {
864
      if (lastComparison != 0) {
841
      return lastComparison;
865
        return lastComparison;
-
 
866
      }
842
    }
867
    }
843
    lastComparison = Boolean.valueOf(isSetCreatedOn()).compareTo(isSetCreatedOn());
868
    lastComparison = Boolean.valueOf(isSetCreatedOn()).compareTo(typedOther.isSetCreatedOn());
844
    if (lastComparison != 0) {
869
    if (lastComparison != 0) {
845
      return lastComparison;
870
      return lastComparison;
846
    }
871
    }
-
 
872
    if (isSetCreatedOn()) {
847
    lastComparison = TBaseHelper.compareTo(createdOn, typedOther.createdOn);
873
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdOn, typedOther.createdOn);
848
    if (lastComparison != 0) {
874
      if (lastComparison != 0) {
849
      return lastComparison;
875
        return lastComparison;
-
 
876
      }
850
    }
877
    }
851
    lastComparison = Boolean.valueOf(isSetUpdatedOn()).compareTo(isSetUpdatedOn());
878
    lastComparison = Boolean.valueOf(isSetUpdatedOn()).compareTo(typedOther.isSetUpdatedOn());
852
    if (lastComparison != 0) {
879
    if (lastComparison != 0) {
853
      return lastComparison;
880
      return lastComparison;
854
    }
881
    }
-
 
882
    if (isSetUpdatedOn()) {
855
    lastComparison = TBaseHelper.compareTo(updatedOn, typedOther.updatedOn);
883
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedOn, typedOther.updatedOn);
856
    if (lastComparison != 0) {
884
      if (lastComparison != 0) {
857
      return lastComparison;
885
        return lastComparison;
-
 
886
      }
858
    }
887
    }
859
    lastComparison = Boolean.valueOf(isSetCheckedOutOn()).compareTo(isSetCheckedOutOn());
888
    lastComparison = Boolean.valueOf(isSetCheckedOutOn()).compareTo(typedOther.isSetCheckedOutOn());
860
    if (lastComparison != 0) {
889
    if (lastComparison != 0) {
861
      return lastComparison;
890
      return lastComparison;
862
    }
891
    }
-
 
892
    if (isSetCheckedOutOn()) {
863
    lastComparison = TBaseHelper.compareTo(checkedOutOn, typedOther.checkedOutOn);
893
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.checkedOutOn, typedOther.checkedOutOn);
864
    if (lastComparison != 0) {
894
      if (lastComparison != 0) {
865
      return lastComparison;
895
        return lastComparison;
-
 
896
      }
866
    }
897
    }
867
    lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
898
    lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
868
    if (lastComparison != 0) {
899
    if (lastComparison != 0) {
869
      return lastComparison;
900
      return lastComparison;
870
    }
901
    }
-
 
902
    if (isSetUserId()) {
871
    lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
903
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
872
    if (lastComparison != 0) {
904
      if (lastComparison != 0) {
873
      return lastComparison;
905
        return lastComparison;
-
 
906
      }
874
    }
907
    }
875
    lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
908
    lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(typedOther.isSetAddressId());
876
    if (lastComparison != 0) {
909
    if (lastComparison != 0) {
877
      return lastComparison;
910
      return lastComparison;
878
    }
911
    }
-
 
912
    if (isSetAddressId()) {
879
    lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
913
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addressId, typedOther.addressId);
880
    if (lastComparison != 0) {
914
      if (lastComparison != 0) {
881
      return lastComparison;
915
        return lastComparison;
-
 
916
      }
882
    }
917
    }
883
    lastComparison = Boolean.valueOf(isSetTotalPrice()).compareTo(isSetTotalPrice());
918
    lastComparison = Boolean.valueOf(isSetTotalPrice()).compareTo(typedOther.isSetTotalPrice());
884
    if (lastComparison != 0) {
919
    if (lastComparison != 0) {
885
      return lastComparison;
920
      return lastComparison;
886
    }
921
    }
-
 
922
    if (isSetTotalPrice()) {
887
    lastComparison = TBaseHelper.compareTo(totalPrice, typedOther.totalPrice);
923
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalPrice, typedOther.totalPrice);
888
    if (lastComparison != 0) {
924
      if (lastComparison != 0) {
889
      return lastComparison;
925
        return lastComparison;
-
 
926
      }
890
    }
927
    }
891
    lastComparison = Boolean.valueOf(isSetDiscountedPrice()).compareTo(isSetDiscountedPrice());
928
    lastComparison = Boolean.valueOf(isSetDiscountedPrice()).compareTo(typedOther.isSetDiscountedPrice());
892
    if (lastComparison != 0) {
929
    if (lastComparison != 0) {
893
      return lastComparison;
930
      return lastComparison;
894
    }
931
    }
-
 
932
    if (isSetDiscountedPrice()) {
895
    lastComparison = TBaseHelper.compareTo(discountedPrice, typedOther.discountedPrice);
933
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.discountedPrice, typedOther.discountedPrice);
896
    if (lastComparison != 0) {
934
      if (lastComparison != 0) {
897
      return lastComparison;
935
        return lastComparison;
-
 
936
      }
898
    }
937
    }
899
    lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(isSetCouponCode());
938
    lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());
900
    if (lastComparison != 0) {
939
    if (lastComparison != 0) {
901
      return lastComparison;
940
      return lastComparison;
902
    }
941
    }
-
 
942
    if (isSetCouponCode()) {
903
    lastComparison = TBaseHelper.compareTo(couponCode, typedOther.couponCode);
943
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, typedOther.couponCode);
904
    if (lastComparison != 0) {
944
      if (lastComparison != 0) {
905
      return lastComparison;
945
        return lastComparison;
-
 
946
      }
906
    }
947
    }
907
    return 0;
948
    return 0;
908
  }
949
  }
909
 
950
 
-
 
951
  public _Fields fieldForId(int fieldId) {
-
 
952
    return _Fields.findByThriftId(fieldId);
-
 
953
  }
-
 
954
 
910
  public void read(TProtocol iprot) throws TException {
955
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
911
    TField field;
956
    org.apache.thrift.protocol.TField field;
912
    iprot.readStructBegin();
957
    iprot.readStructBegin();
913
    while (true)
958
    while (true)
914
    {
959
    {
915
      field = iprot.readFieldBegin();
960
      field = iprot.readFieldBegin();
916
      if (field.type == TType.STOP) { 
961
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
917
        break;
962
        break;
918
      }
963
      }
919
      _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
920
      if (fieldId == null) {
-
 
921
        TProtocolUtil.skip(iprot, field.type);
-
 
922
      } else {
-
 
923
        switch (fieldId) {
964
      switch (field.id) {
924
          case ID:
965
        case 1: // ID
925
            if (field.type == TType.I64) {
966
          if (field.type == org.apache.thrift.protocol.TType.I64) {
926
              this.id = iprot.readI64();
967
            this.id = iprot.readI64();
927
              setIdIsSet(true);
968
            setIdIsSet(true);
928
            } else { 
969
          } else { 
929
              TProtocolUtil.skip(iprot, field.type);
970
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
930
            }
971
          }
931
            break;
972
          break;
932
          case LINES:
973
        case 2: // LINES
933
            if (field.type == TType.LIST) {
974
          if (field.type == org.apache.thrift.protocol.TType.LIST) {
-
 
975
            {
-
 
976
              org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
-
 
977
              this.lines = new ArrayList<Line>(_list8.size);
-
 
978
              for (int _i9 = 0; _i9 < _list8.size; ++_i9)
934
              {
979
              {
935
                TList _list8 = iprot.readListBegin();
-
 
936
                this.lines = new ArrayList<Line>(_list8.size);
-
 
937
                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
-
 
938
                {
-
 
939
                  Line _elem10;
980
                Line _elem10; // required
940
                  _elem10 = new Line();
981
                _elem10 = new Line();
941
                  _elem10.read(iprot);
982
                _elem10.read(iprot);
942
                  this.lines.add(_elem10);
983
                this.lines.add(_elem10);
943
                }
-
 
944
                iprot.readListEnd();
-
 
945
              }
984
              }
946
            } else { 
-
 
947
              TProtocolUtil.skip(iprot, field.type);
-
 
948
            }
-
 
949
            break;
-
 
950
          case STATUS:
-
 
951
            if (field.type == TType.I32) {
985
              iprot.readListEnd();
952
              this.status = CartStatus.findByValue(iprot.readI32());
-
 
953
            } else { 
-
 
954
              TProtocolUtil.skip(iprot, field.type);
-
 
955
            }
986
            }
-
 
987
          } else { 
-
 
988
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
989
          }
956
            break;
990
          break;
-
 
991
        case 3: // STATUS
-
 
992
          if (field.type == org.apache.thrift.protocol.TType.I32) {
-
 
993
            this.status = CartStatus.findByValue(iprot.readI32());
-
 
994
          } else { 
-
 
995
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
996
          }
-
 
997
          break;
957
          case CREATED_ON:
998
        case 4: // CREATED_ON
958
            if (field.type == TType.I64) {
999
          if (field.type == org.apache.thrift.protocol.TType.I64) {
959
              this.createdOn = iprot.readI64();
1000
            this.createdOn = iprot.readI64();
960
              setCreatedOnIsSet(true);
1001
            setCreatedOnIsSet(true);
961
            } else { 
1002
          } else { 
962
              TProtocolUtil.skip(iprot, field.type);
1003
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
963
            }
1004
          }
964
            break;
1005
          break;
965
          case UPDATED_ON:
1006
        case 5: // UPDATED_ON
966
            if (field.type == TType.I64) {
1007
          if (field.type == org.apache.thrift.protocol.TType.I64) {
967
              this.updatedOn = iprot.readI64();
1008
            this.updatedOn = iprot.readI64();
968
              setUpdatedOnIsSet(true);
1009
            setUpdatedOnIsSet(true);
969
            } else { 
1010
          } else { 
970
              TProtocolUtil.skip(iprot, field.type);
1011
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
971
            }
1012
          }
972
            break;
1013
          break;
973
          case CHECKED_OUT_ON:
1014
        case 6: // CHECKED_OUT_ON
974
            if (field.type == TType.I64) {
1015
          if (field.type == org.apache.thrift.protocol.TType.I64) {
975
              this.checkedOutOn = iprot.readI64();
1016
            this.checkedOutOn = iprot.readI64();
976
              setCheckedOutOnIsSet(true);
1017
            setCheckedOutOnIsSet(true);
977
            } else { 
1018
          } else { 
978
              TProtocolUtil.skip(iprot, field.type);
1019
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
979
            }
1020
          }
980
            break;
1021
          break;
981
          case USER_ID:
1022
        case 7: // USER_ID
982
            if (field.type == TType.I64) {
1023
          if (field.type == org.apache.thrift.protocol.TType.I64) {
983
              this.userId = iprot.readI64();
1024
            this.userId = iprot.readI64();
984
              setUserIdIsSet(true);
1025
            setUserIdIsSet(true);
985
            } else { 
1026
          } else { 
986
              TProtocolUtil.skip(iprot, field.type);
1027
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
987
            }
1028
          }
988
            break;
1029
          break;
989
          case ADDRESS_ID:
1030
        case 8: // ADDRESS_ID
990
            if (field.type == TType.I64) {
1031
          if (field.type == org.apache.thrift.protocol.TType.I64) {
991
              this.addressId = iprot.readI64();
1032
            this.addressId = iprot.readI64();
992
              setAddressIdIsSet(true);
1033
            setAddressIdIsSet(true);
993
            } else { 
1034
          } else { 
994
              TProtocolUtil.skip(iprot, field.type);
1035
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
995
            }
1036
          }
996
            break;
1037
          break;
997
          case TOTAL_PRICE:
1038
        case 9: // TOTAL_PRICE
998
            if (field.type == TType.DOUBLE) {
1039
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
999
              this.totalPrice = iprot.readDouble();
1040
            this.totalPrice = iprot.readDouble();
1000
              setTotalPriceIsSet(true);
1041
            setTotalPriceIsSet(true);
1001
            } else { 
1042
          } else { 
1002
              TProtocolUtil.skip(iprot, field.type);
1043
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1003
            }
1044
          }
1004
            break;
1045
          break;
1005
          case DISCOUNTED_PRICE:
1046
        case 10: // DISCOUNTED_PRICE
1006
            if (field.type == TType.DOUBLE) {
1047
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
1007
              this.discountedPrice = iprot.readDouble();
1048
            this.discountedPrice = iprot.readDouble();
1008
              setDiscountedPriceIsSet(true);
1049
            setDiscountedPriceIsSet(true);
1009
            } else { 
1050
          } else { 
1010
              TProtocolUtil.skip(iprot, field.type);
1051
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1011
            }
1052
          }
1012
            break;
1053
          break;
1013
          case COUPON_CODE:
1054
        case 11: // COUPON_CODE
1014
            if (field.type == TType.STRING) {
1055
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1015
              this.couponCode = iprot.readString();
1056
            this.couponCode = iprot.readString();
1016
            } else { 
1057
          } else { 
1017
              TProtocolUtil.skip(iprot, field.type);
1058
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1018
            }
1059
          }
1019
            break;
1060
          break;
1020
        }
1061
        default:
1021
        iprot.readFieldEnd();
1062
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1022
      }
1063
      }
-
 
1064
      iprot.readFieldEnd();
1023
    }
1065
    }
1024
    iprot.readStructEnd();
1066
    iprot.readStructEnd();
1025
    validate();
1067
    validate();
1026
  }
1068
  }
1027
 
1069
 
1028
  public void write(TProtocol oprot) throws TException {
1070
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1029
    validate();
1071
    validate();
1030
 
1072
 
1031
    oprot.writeStructBegin(STRUCT_DESC);
1073
    oprot.writeStructBegin(STRUCT_DESC);
1032
    oprot.writeFieldBegin(ID_FIELD_DESC);
1074
    oprot.writeFieldBegin(ID_FIELD_DESC);
1033
    oprot.writeI64(this.id);
1075
    oprot.writeI64(this.id);
1034
    oprot.writeFieldEnd();
1076
    oprot.writeFieldEnd();
1035
    if (this.lines != null) {
1077
    if (this.lines != null) {
1036
      oprot.writeFieldBegin(LINES_FIELD_DESC);
1078
      oprot.writeFieldBegin(LINES_FIELD_DESC);
1037
      {
1079
      {
1038
        oprot.writeListBegin(new TList(TType.STRUCT, this.lines.size()));
1080
        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.lines.size()));
1039
        for (Line _iter11 : this.lines)
1081
        for (Line _iter11 : this.lines)
1040
        {
1082
        {
1041
          _iter11.write(oprot);
1083
          _iter11.write(oprot);
1042
        }
1084
        }
1043
        oprot.writeListEnd();
1085
        oprot.writeListEnd();
Line 1098... Line 1140...
1098
    if (!first) sb.append(", ");
1140
    if (!first) sb.append(", ");
1099
    sb.append("status:");
1141
    sb.append("status:");
1100
    if (this.status == null) {
1142
    if (this.status == null) {
1101
      sb.append("null");
1143
      sb.append("null");
1102
    } else {
1144
    } else {
1103
      String status_name = status.name();
-
 
1104
      if (status_name != null) {
-
 
1105
        sb.append(status_name);
-
 
1106
        sb.append(" (");
-
 
1107
      }
-
 
1108
      sb.append(this.status);
1145
      sb.append(this.status);
1109
      if (status_name != null) {
-
 
1110
        sb.append(")");
-
 
1111
      }
-
 
1112
    }
1146
    }
1113
    first = false;
1147
    first = false;
1114
    if (!first) sb.append(", ");
1148
    if (!first) sb.append(", ");
1115
    sb.append("createdOn:");
1149
    sb.append("createdOn:");
1116
    sb.append(this.createdOn);
1150
    sb.append(this.createdOn);
Line 1149... Line 1183...
1149
    first = false;
1183
    first = false;
1150
    sb.append(")");
1184
    sb.append(")");
1151
    return sb.toString();
1185
    return sb.toString();
1152
  }
1186
  }
1153
 
1187
 
1154
  public void validate() throws TException {
1188
  public void validate() throws org.apache.thrift.TException {
1155
    // check for required fields
1189
    // check for required fields
1156
  }
1190
  }
1157
 
1191
 
-
 
1192
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
1193
    try {
-
 
1194
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
1195
    } catch (org.apache.thrift.TException te) {
-
 
1196
      throw new java.io.IOException(te);
-
 
1197
    }
-
 
1198
  }
-
 
1199
 
-
 
1200
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
1201
    try {
-
 
1202
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
1203
      __isset_bit_vector = new BitSet(1);
-
 
1204
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
1205
    } catch (org.apache.thrift.TException te) {
-
 
1206
      throw new java.io.IOException(te);
-
 
1207
    }
-
 
1208
  }
-
 
1209
 
1158
}
1210
}
1159
 
1211