Subversion Repositories SmartDukaan

Rev

Rev 4496 | Rev 6821 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4496 mandeep.dh 1
/**
2
 * Autogenerated by Thrift Compiler (0.7.0)
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.purchase;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
18
import java.nio.ByteBuffer;
19
import java.util.Arrays;
20
import org.slf4j.Logger;
21
import org.slf4j.LoggerFactory;
22
 
23
public class LineItem implements org.apache.thrift.TBase<LineItem, LineItem._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LineItem");
25
 
26
  private static final org.apache.thrift.protocol.TField ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("orderId", org.apache.thrift.protocol.TType.I64, (short)1);
27
  private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)2);
28
  private static final org.apache.thrift.protocol.TField PRODUCT_GROUP_FIELD_DESC = new org.apache.thrift.protocol.TField("productGroup", org.apache.thrift.protocol.TType.STRING, (short)3);
29
  private static final org.apache.thrift.protocol.TField BRAND_FIELD_DESC = new org.apache.thrift.protocol.TField("brand", org.apache.thrift.protocol.TType.STRING, (short)4);
30
  private static final org.apache.thrift.protocol.TField MODEL_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("modelNumber", org.apache.thrift.protocol.TType.STRING, (short)5);
31
  private static final org.apache.thrift.protocol.TField MODEL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("modelName", org.apache.thrift.protocol.TType.STRING, (short)6);
32
  private static final org.apache.thrift.protocol.TField COLOR_FIELD_DESC = new org.apache.thrift.protocol.TField("color", org.apache.thrift.protocol.TType.STRING, (short)7);
33
  private static final org.apache.thrift.protocol.TField ITEM_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("itemNumber", org.apache.thrift.protocol.TType.STRING, (short)8);
34
  private static final org.apache.thrift.protocol.TField QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("quantity", org.apache.thrift.protocol.TType.DOUBLE, (short)9);
35
  private static final org.apache.thrift.protocol.TField UNFULFILLED_QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("unfulfilledQuantity", org.apache.thrift.protocol.TType.DOUBLE, (short)10);
36
  private static final org.apache.thrift.protocol.TField CREATED_AT_FIELD_DESC = new org.apache.thrift.protocol.TField("createdAt", org.apache.thrift.protocol.TType.I64, (short)11);
37
  private static final org.apache.thrift.protocol.TField UNIT_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("unitPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)12);
38
  private static final org.apache.thrift.protocol.TField FULFILLED_FIELD_DESC = new org.apache.thrift.protocol.TField("fulfilled", org.apache.thrift.protocol.TType.BOOL, (short)13);
4754 mandeep.dh 39
  private static final org.apache.thrift.protocol.TField COD_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("codCount", org.apache.thrift.protocol.TType.I64, (short)14);
4496 mandeep.dh 40
 
41
  private long orderId; // required
42
  private long itemId; // required
43
  private String productGroup; // required
44
  private String brand; // required
45
  private String modelNumber; // required
46
  private String modelName; // required
47
  private String color; // required
48
  private String itemNumber; // required
49
  private double quantity; // required
50
  private double unfulfilledQuantity; // required
51
  private long createdAt; // required
52
  private double unitPrice; // required
53
  private boolean fulfilled; // required
4754 mandeep.dh 54
  private long codCount; // required
4496 mandeep.dh 55
 
56
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
57
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
58
    ORDER_ID((short)1, "orderId"),
59
    ITEM_ID((short)2, "itemId"),
60
    PRODUCT_GROUP((short)3, "productGroup"),
61
    BRAND((short)4, "brand"),
62
    MODEL_NUMBER((short)5, "modelNumber"),
63
    MODEL_NAME((short)6, "modelName"),
64
    COLOR((short)7, "color"),
65
    ITEM_NUMBER((short)8, "itemNumber"),
66
    QUANTITY((short)9, "quantity"),
67
    UNFULFILLED_QUANTITY((short)10, "unfulfilledQuantity"),
68
    CREATED_AT((short)11, "createdAt"),
69
    UNIT_PRICE((short)12, "unitPrice"),
4754 mandeep.dh 70
    FULFILLED((short)13, "fulfilled"),
71
    COD_COUNT((short)14, "codCount");
4496 mandeep.dh 72
 
73
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
74
 
75
    static {
76
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
77
        byName.put(field.getFieldName(), field);
78
      }
79
    }
80
 
81
    /**
82
     * Find the _Fields constant that matches fieldId, or null if its not found.
83
     */
84
    public static _Fields findByThriftId(int fieldId) {
85
      switch(fieldId) {
86
        case 1: // ORDER_ID
87
          return ORDER_ID;
88
        case 2: // ITEM_ID
89
          return ITEM_ID;
90
        case 3: // PRODUCT_GROUP
91
          return PRODUCT_GROUP;
92
        case 4: // BRAND
93
          return BRAND;
94
        case 5: // MODEL_NUMBER
95
          return MODEL_NUMBER;
96
        case 6: // MODEL_NAME
97
          return MODEL_NAME;
98
        case 7: // COLOR
99
          return COLOR;
100
        case 8: // ITEM_NUMBER
101
          return ITEM_NUMBER;
102
        case 9: // QUANTITY
103
          return QUANTITY;
104
        case 10: // UNFULFILLED_QUANTITY
105
          return UNFULFILLED_QUANTITY;
106
        case 11: // CREATED_AT
107
          return CREATED_AT;
108
        case 12: // UNIT_PRICE
109
          return UNIT_PRICE;
110
        case 13: // FULFILLED
111
          return FULFILLED;
4754 mandeep.dh 112
        case 14: // COD_COUNT
113
          return COD_COUNT;
4496 mandeep.dh 114
        default:
115
          return null;
116
      }
117
    }
118
 
119
    /**
120
     * Find the _Fields constant that matches fieldId, throwing an exception
121
     * if it is not found.
122
     */
123
    public static _Fields findByThriftIdOrThrow(int fieldId) {
124
      _Fields fields = findByThriftId(fieldId);
125
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
126
      return fields;
127
    }
128
 
129
    /**
130
     * Find the _Fields constant that matches name, or null if its not found.
131
     */
132
    public static _Fields findByName(String name) {
133
      return byName.get(name);
134
    }
135
 
136
    private final short _thriftId;
137
    private final String _fieldName;
138
 
139
    _Fields(short thriftId, String fieldName) {
140
      _thriftId = thriftId;
141
      _fieldName = fieldName;
142
    }
143
 
144
    public short getThriftFieldId() {
145
      return _thriftId;
146
    }
147
 
148
    public String getFieldName() {
149
      return _fieldName;
150
    }
151
  }
152
 
153
  // isset id assignments
154
  private static final int __ORDERID_ISSET_ID = 0;
155
  private static final int __ITEMID_ISSET_ID = 1;
156
  private static final int __QUANTITY_ISSET_ID = 2;
157
  private static final int __UNFULFILLEDQUANTITY_ISSET_ID = 3;
158
  private static final int __CREATEDAT_ISSET_ID = 4;
159
  private static final int __UNITPRICE_ISSET_ID = 5;
160
  private static final int __FULFILLED_ISSET_ID = 6;
4754 mandeep.dh 161
  private static final int __CODCOUNT_ISSET_ID = 7;
162
  private BitSet __isset_bit_vector = new BitSet(8);
4496 mandeep.dh 163
 
164
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
165
  static {
166
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
167
    tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
168
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
169
    tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
170
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
171
    tmpMap.put(_Fields.PRODUCT_GROUP, new org.apache.thrift.meta_data.FieldMetaData("productGroup", org.apache.thrift.TFieldRequirementType.DEFAULT, 
172
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
173
    tmpMap.put(_Fields.BRAND, new org.apache.thrift.meta_data.FieldMetaData("brand", org.apache.thrift.TFieldRequirementType.DEFAULT, 
174
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
175
    tmpMap.put(_Fields.MODEL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("modelNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
176
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
177
    tmpMap.put(_Fields.MODEL_NAME, new org.apache.thrift.meta_data.FieldMetaData("modelName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
178
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
179
    tmpMap.put(_Fields.COLOR, new org.apache.thrift.meta_data.FieldMetaData("color", org.apache.thrift.TFieldRequirementType.DEFAULT, 
180
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
181
    tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
182
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
183
    tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
184
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
185
    tmpMap.put(_Fields.UNFULFILLED_QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("unfulfilledQuantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
186
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
187
    tmpMap.put(_Fields.CREATED_AT, new org.apache.thrift.meta_data.FieldMetaData("createdAt", org.apache.thrift.TFieldRequirementType.DEFAULT, 
188
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
189
    tmpMap.put(_Fields.UNIT_PRICE, new org.apache.thrift.meta_data.FieldMetaData("unitPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
190
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
191
    tmpMap.put(_Fields.FULFILLED, new org.apache.thrift.meta_data.FieldMetaData("fulfilled", org.apache.thrift.TFieldRequirementType.DEFAULT, 
192
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
4754 mandeep.dh 193
    tmpMap.put(_Fields.COD_COUNT, new org.apache.thrift.meta_data.FieldMetaData("codCount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
194
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4496 mandeep.dh 195
    metaDataMap = Collections.unmodifiableMap(tmpMap);
196
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LineItem.class, metaDataMap);
197
  }
198
 
199
  public LineItem() {
200
  }
201
 
202
  public LineItem(
203
    long orderId,
204
    long itemId,
205
    String productGroup,
206
    String brand,
207
    String modelNumber,
208
    String modelName,
209
    String color,
210
    String itemNumber,
211
    double quantity,
212
    double unfulfilledQuantity,
213
    long createdAt,
214
    double unitPrice,
4754 mandeep.dh 215
    boolean fulfilled,
216
    long codCount)
4496 mandeep.dh 217
  {
218
    this();
219
    this.orderId = orderId;
220
    setOrderIdIsSet(true);
221
    this.itemId = itemId;
222
    setItemIdIsSet(true);
223
    this.productGroup = productGroup;
224
    this.brand = brand;
225
    this.modelNumber = modelNumber;
226
    this.modelName = modelName;
227
    this.color = color;
228
    this.itemNumber = itemNumber;
229
    this.quantity = quantity;
230
    setQuantityIsSet(true);
231
    this.unfulfilledQuantity = unfulfilledQuantity;
232
    setUnfulfilledQuantityIsSet(true);
233
    this.createdAt = createdAt;
234
    setCreatedAtIsSet(true);
235
    this.unitPrice = unitPrice;
236
    setUnitPriceIsSet(true);
237
    this.fulfilled = fulfilled;
238
    setFulfilledIsSet(true);
4754 mandeep.dh 239
    this.codCount = codCount;
240
    setCodCountIsSet(true);
4496 mandeep.dh 241
  }
242
 
243
  /**
244
   * Performs a deep copy on <i>other</i>.
245
   */
246
  public LineItem(LineItem other) {
247
    __isset_bit_vector.clear();
248
    __isset_bit_vector.or(other.__isset_bit_vector);
249
    this.orderId = other.orderId;
250
    this.itemId = other.itemId;
251
    if (other.isSetProductGroup()) {
252
      this.productGroup = other.productGroup;
253
    }
254
    if (other.isSetBrand()) {
255
      this.brand = other.brand;
256
    }
257
    if (other.isSetModelNumber()) {
258
      this.modelNumber = other.modelNumber;
259
    }
260
    if (other.isSetModelName()) {
261
      this.modelName = other.modelName;
262
    }
263
    if (other.isSetColor()) {
264
      this.color = other.color;
265
    }
266
    if (other.isSetItemNumber()) {
267
      this.itemNumber = other.itemNumber;
268
    }
269
    this.quantity = other.quantity;
270
    this.unfulfilledQuantity = other.unfulfilledQuantity;
271
    this.createdAt = other.createdAt;
272
    this.unitPrice = other.unitPrice;
273
    this.fulfilled = other.fulfilled;
4754 mandeep.dh 274
    this.codCount = other.codCount;
4496 mandeep.dh 275
  }
276
 
277
  public LineItem deepCopy() {
278
    return new LineItem(this);
279
  }
280
 
281
  @Override
282
  public void clear() {
283
    setOrderIdIsSet(false);
284
    this.orderId = 0;
285
    setItemIdIsSet(false);
286
    this.itemId = 0;
287
    this.productGroup = null;
288
    this.brand = null;
289
    this.modelNumber = null;
290
    this.modelName = null;
291
    this.color = null;
292
    this.itemNumber = null;
293
    setQuantityIsSet(false);
294
    this.quantity = 0.0;
295
    setUnfulfilledQuantityIsSet(false);
296
    this.unfulfilledQuantity = 0.0;
297
    setCreatedAtIsSet(false);
298
    this.createdAt = 0;
299
    setUnitPriceIsSet(false);
300
    this.unitPrice = 0.0;
301
    setFulfilledIsSet(false);
302
    this.fulfilled = false;
4754 mandeep.dh 303
    setCodCountIsSet(false);
304
    this.codCount = 0;
4496 mandeep.dh 305
  }
306
 
307
  public long getOrderId() {
308
    return this.orderId;
309
  }
310
 
311
  public void setOrderId(long orderId) {
312
    this.orderId = orderId;
313
    setOrderIdIsSet(true);
314
  }
315
 
316
  public void unsetOrderId() {
317
    __isset_bit_vector.clear(__ORDERID_ISSET_ID);
318
  }
319
 
320
  /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
321
  public boolean isSetOrderId() {
322
    return __isset_bit_vector.get(__ORDERID_ISSET_ID);
323
  }
324
 
325
  public void setOrderIdIsSet(boolean value) {
326
    __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
327
  }
328
 
329
  public long getItemId() {
330
    return this.itemId;
331
  }
332
 
333
  public void setItemId(long itemId) {
334
    this.itemId = itemId;
335
    setItemIdIsSet(true);
336
  }
337
 
338
  public void unsetItemId() {
339
    __isset_bit_vector.clear(__ITEMID_ISSET_ID);
340
  }
341
 
342
  /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
343
  public boolean isSetItemId() {
344
    return __isset_bit_vector.get(__ITEMID_ISSET_ID);
345
  }
346
 
347
  public void setItemIdIsSet(boolean value) {
348
    __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
349
  }
350
 
351
  public String getProductGroup() {
352
    return this.productGroup;
353
  }
354
 
355
  public void setProductGroup(String productGroup) {
356
    this.productGroup = productGroup;
357
  }
358
 
359
  public void unsetProductGroup() {
360
    this.productGroup = null;
361
  }
362
 
363
  /** Returns true if field productGroup is set (has been assigned a value) and false otherwise */
364
  public boolean isSetProductGroup() {
365
    return this.productGroup != null;
366
  }
367
 
368
  public void setProductGroupIsSet(boolean value) {
369
    if (!value) {
370
      this.productGroup = null;
371
    }
372
  }
373
 
374
  public String getBrand() {
375
    return this.brand;
376
  }
377
 
378
  public void setBrand(String brand) {
379
    this.brand = brand;
380
  }
381
 
382
  public void unsetBrand() {
383
    this.brand = null;
384
  }
385
 
386
  /** Returns true if field brand is set (has been assigned a value) and false otherwise */
387
  public boolean isSetBrand() {
388
    return this.brand != null;
389
  }
390
 
391
  public void setBrandIsSet(boolean value) {
392
    if (!value) {
393
      this.brand = null;
394
    }
395
  }
396
 
397
  public String getModelNumber() {
398
    return this.modelNumber;
399
  }
400
 
401
  public void setModelNumber(String modelNumber) {
402
    this.modelNumber = modelNumber;
403
  }
404
 
405
  public void unsetModelNumber() {
406
    this.modelNumber = null;
407
  }
408
 
409
  /** Returns true if field modelNumber is set (has been assigned a value) and false otherwise */
410
  public boolean isSetModelNumber() {
411
    return this.modelNumber != null;
412
  }
413
 
414
  public void setModelNumberIsSet(boolean value) {
415
    if (!value) {
416
      this.modelNumber = null;
417
    }
418
  }
419
 
420
  public String getModelName() {
421
    return this.modelName;
422
  }
423
 
424
  public void setModelName(String modelName) {
425
    this.modelName = modelName;
426
  }
427
 
428
  public void unsetModelName() {
429
    this.modelName = null;
430
  }
431
 
432
  /** Returns true if field modelName is set (has been assigned a value) and false otherwise */
433
  public boolean isSetModelName() {
434
    return this.modelName != null;
435
  }
436
 
437
  public void setModelNameIsSet(boolean value) {
438
    if (!value) {
439
      this.modelName = null;
440
    }
441
  }
442
 
443
  public String getColor() {
444
    return this.color;
445
  }
446
 
447
  public void setColor(String color) {
448
    this.color = color;
449
  }
450
 
451
  public void unsetColor() {
452
    this.color = null;
453
  }
454
 
455
  /** Returns true if field color is set (has been assigned a value) and false otherwise */
456
  public boolean isSetColor() {
457
    return this.color != null;
458
  }
459
 
460
  public void setColorIsSet(boolean value) {
461
    if (!value) {
462
      this.color = null;
463
    }
464
  }
465
 
466
  public String getItemNumber() {
467
    return this.itemNumber;
468
  }
469
 
470
  public void setItemNumber(String itemNumber) {
471
    this.itemNumber = itemNumber;
472
  }
473
 
474
  public void unsetItemNumber() {
475
    this.itemNumber = null;
476
  }
477
 
478
  /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
479
  public boolean isSetItemNumber() {
480
    return this.itemNumber != null;
481
  }
482
 
483
  public void setItemNumberIsSet(boolean value) {
484
    if (!value) {
485
      this.itemNumber = null;
486
    }
487
  }
488
 
489
  public double getQuantity() {
490
    return this.quantity;
491
  }
492
 
493
  public void setQuantity(double quantity) {
494
    this.quantity = quantity;
495
    setQuantityIsSet(true);
496
  }
497
 
498
  public void unsetQuantity() {
499
    __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
500
  }
501
 
502
  /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
503
  public boolean isSetQuantity() {
504
    return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
505
  }
506
 
507
  public void setQuantityIsSet(boolean value) {
508
    __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
509
  }
510
 
511
  public double getUnfulfilledQuantity() {
512
    return this.unfulfilledQuantity;
513
  }
514
 
515
  public void setUnfulfilledQuantity(double unfulfilledQuantity) {
516
    this.unfulfilledQuantity = unfulfilledQuantity;
517
    setUnfulfilledQuantityIsSet(true);
518
  }
519
 
520
  public void unsetUnfulfilledQuantity() {
521
    __isset_bit_vector.clear(__UNFULFILLEDQUANTITY_ISSET_ID);
522
  }
523
 
524
  /** Returns true if field unfulfilledQuantity is set (has been assigned a value) and false otherwise */
525
  public boolean isSetUnfulfilledQuantity() {
526
    return __isset_bit_vector.get(__UNFULFILLEDQUANTITY_ISSET_ID);
527
  }
528
 
529
  public void setUnfulfilledQuantityIsSet(boolean value) {
530
    __isset_bit_vector.set(__UNFULFILLEDQUANTITY_ISSET_ID, value);
531
  }
532
 
533
  public long getCreatedAt() {
534
    return this.createdAt;
535
  }
536
 
537
  public void setCreatedAt(long createdAt) {
538
    this.createdAt = createdAt;
539
    setCreatedAtIsSet(true);
540
  }
541
 
542
  public void unsetCreatedAt() {
543
    __isset_bit_vector.clear(__CREATEDAT_ISSET_ID);
544
  }
545
 
546
  /** Returns true if field createdAt is set (has been assigned a value) and false otherwise */
547
  public boolean isSetCreatedAt() {
548
    return __isset_bit_vector.get(__CREATEDAT_ISSET_ID);
549
  }
550
 
551
  public void setCreatedAtIsSet(boolean value) {
552
    __isset_bit_vector.set(__CREATEDAT_ISSET_ID, value);
553
  }
554
 
555
  public double getUnitPrice() {
556
    return this.unitPrice;
557
  }
558
 
559
  public void setUnitPrice(double unitPrice) {
560
    this.unitPrice = unitPrice;
561
    setUnitPriceIsSet(true);
562
  }
563
 
564
  public void unsetUnitPrice() {
565
    __isset_bit_vector.clear(__UNITPRICE_ISSET_ID);
566
  }
567
 
568
  /** Returns true if field unitPrice is set (has been assigned a value) and false otherwise */
569
  public boolean isSetUnitPrice() {
570
    return __isset_bit_vector.get(__UNITPRICE_ISSET_ID);
571
  }
572
 
573
  public void setUnitPriceIsSet(boolean value) {
574
    __isset_bit_vector.set(__UNITPRICE_ISSET_ID, value);
575
  }
576
 
577
  public boolean isFulfilled() {
578
    return this.fulfilled;
579
  }
580
 
581
  public void setFulfilled(boolean fulfilled) {
582
    this.fulfilled = fulfilled;
583
    setFulfilledIsSet(true);
584
  }
585
 
586
  public void unsetFulfilled() {
587
    __isset_bit_vector.clear(__FULFILLED_ISSET_ID);
588
  }
589
 
590
  /** Returns true if field fulfilled is set (has been assigned a value) and false otherwise */
591
  public boolean isSetFulfilled() {
592
    return __isset_bit_vector.get(__FULFILLED_ISSET_ID);
593
  }
594
 
595
  public void setFulfilledIsSet(boolean value) {
596
    __isset_bit_vector.set(__FULFILLED_ISSET_ID, value);
597
  }
598
 
4754 mandeep.dh 599
  public long getCodCount() {
600
    return this.codCount;
601
  }
602
 
603
  public void setCodCount(long codCount) {
604
    this.codCount = codCount;
605
    setCodCountIsSet(true);
606
  }
607
 
608
  public void unsetCodCount() {
609
    __isset_bit_vector.clear(__CODCOUNT_ISSET_ID);
610
  }
611
 
612
  /** Returns true if field codCount is set (has been assigned a value) and false otherwise */
613
  public boolean isSetCodCount() {
614
    return __isset_bit_vector.get(__CODCOUNT_ISSET_ID);
615
  }
616
 
617
  public void setCodCountIsSet(boolean value) {
618
    __isset_bit_vector.set(__CODCOUNT_ISSET_ID, value);
619
  }
620
 
4496 mandeep.dh 621
  public void setFieldValue(_Fields field, Object value) {
622
    switch (field) {
623
    case ORDER_ID:
624
      if (value == null) {
625
        unsetOrderId();
626
      } else {
627
        setOrderId((Long)value);
628
      }
629
      break;
630
 
631
    case ITEM_ID:
632
      if (value == null) {
633
        unsetItemId();
634
      } else {
635
        setItemId((Long)value);
636
      }
637
      break;
638
 
639
    case PRODUCT_GROUP:
640
      if (value == null) {
641
        unsetProductGroup();
642
      } else {
643
        setProductGroup((String)value);
644
      }
645
      break;
646
 
647
    case BRAND:
648
      if (value == null) {
649
        unsetBrand();
650
      } else {
651
        setBrand((String)value);
652
      }
653
      break;
654
 
655
    case MODEL_NUMBER:
656
      if (value == null) {
657
        unsetModelNumber();
658
      } else {
659
        setModelNumber((String)value);
660
      }
661
      break;
662
 
663
    case MODEL_NAME:
664
      if (value == null) {
665
        unsetModelName();
666
      } else {
667
        setModelName((String)value);
668
      }
669
      break;
670
 
671
    case COLOR:
672
      if (value == null) {
673
        unsetColor();
674
      } else {
675
        setColor((String)value);
676
      }
677
      break;
678
 
679
    case ITEM_NUMBER:
680
      if (value == null) {
681
        unsetItemNumber();
682
      } else {
683
        setItemNumber((String)value);
684
      }
685
      break;
686
 
687
    case QUANTITY:
688
      if (value == null) {
689
        unsetQuantity();
690
      } else {
691
        setQuantity((Double)value);
692
      }
693
      break;
694
 
695
    case UNFULFILLED_QUANTITY:
696
      if (value == null) {
697
        unsetUnfulfilledQuantity();
698
      } else {
699
        setUnfulfilledQuantity((Double)value);
700
      }
701
      break;
702
 
703
    case CREATED_AT:
704
      if (value == null) {
705
        unsetCreatedAt();
706
      } else {
707
        setCreatedAt((Long)value);
708
      }
709
      break;
710
 
711
    case UNIT_PRICE:
712
      if (value == null) {
713
        unsetUnitPrice();
714
      } else {
715
        setUnitPrice((Double)value);
716
      }
717
      break;
718
 
719
    case FULFILLED:
720
      if (value == null) {
721
        unsetFulfilled();
722
      } else {
723
        setFulfilled((Boolean)value);
724
      }
725
      break;
726
 
4754 mandeep.dh 727
    case COD_COUNT:
728
      if (value == null) {
729
        unsetCodCount();
730
      } else {
731
        setCodCount((Long)value);
732
      }
733
      break;
734
 
4496 mandeep.dh 735
    }
736
  }
737
 
738
  public Object getFieldValue(_Fields field) {
739
    switch (field) {
740
    case ORDER_ID:
741
      return Long.valueOf(getOrderId());
742
 
743
    case ITEM_ID:
744
      return Long.valueOf(getItemId());
745
 
746
    case PRODUCT_GROUP:
747
      return getProductGroup();
748
 
749
    case BRAND:
750
      return getBrand();
751
 
752
    case MODEL_NUMBER:
753
      return getModelNumber();
754
 
755
    case MODEL_NAME:
756
      return getModelName();
757
 
758
    case COLOR:
759
      return getColor();
760
 
761
    case ITEM_NUMBER:
762
      return getItemNumber();
763
 
764
    case QUANTITY:
765
      return Double.valueOf(getQuantity());
766
 
767
    case UNFULFILLED_QUANTITY:
768
      return Double.valueOf(getUnfulfilledQuantity());
769
 
770
    case CREATED_AT:
771
      return Long.valueOf(getCreatedAt());
772
 
773
    case UNIT_PRICE:
774
      return Double.valueOf(getUnitPrice());
775
 
776
    case FULFILLED:
777
      return Boolean.valueOf(isFulfilled());
778
 
4754 mandeep.dh 779
    case COD_COUNT:
780
      return Long.valueOf(getCodCount());
781
 
4496 mandeep.dh 782
    }
783
    throw new IllegalStateException();
784
  }
785
 
786
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
787
  public boolean isSet(_Fields field) {
788
    if (field == null) {
789
      throw new IllegalArgumentException();
790
    }
791
 
792
    switch (field) {
793
    case ORDER_ID:
794
      return isSetOrderId();
795
    case ITEM_ID:
796
      return isSetItemId();
797
    case PRODUCT_GROUP:
798
      return isSetProductGroup();
799
    case BRAND:
800
      return isSetBrand();
801
    case MODEL_NUMBER:
802
      return isSetModelNumber();
803
    case MODEL_NAME:
804
      return isSetModelName();
805
    case COLOR:
806
      return isSetColor();
807
    case ITEM_NUMBER:
808
      return isSetItemNumber();
809
    case QUANTITY:
810
      return isSetQuantity();
811
    case UNFULFILLED_QUANTITY:
812
      return isSetUnfulfilledQuantity();
813
    case CREATED_AT:
814
      return isSetCreatedAt();
815
    case UNIT_PRICE:
816
      return isSetUnitPrice();
817
    case FULFILLED:
818
      return isSetFulfilled();
4754 mandeep.dh 819
    case COD_COUNT:
820
      return isSetCodCount();
4496 mandeep.dh 821
    }
822
    throw new IllegalStateException();
823
  }
824
 
825
  @Override
826
  public boolean equals(Object that) {
827
    if (that == null)
828
      return false;
829
    if (that instanceof LineItem)
830
      return this.equals((LineItem)that);
831
    return false;
832
  }
833
 
834
  public boolean equals(LineItem that) {
835
    if (that == null)
836
      return false;
837
 
838
    boolean this_present_orderId = true;
839
    boolean that_present_orderId = true;
840
    if (this_present_orderId || that_present_orderId) {
841
      if (!(this_present_orderId && that_present_orderId))
842
        return false;
843
      if (this.orderId != that.orderId)
844
        return false;
845
    }
846
 
847
    boolean this_present_itemId = true;
848
    boolean that_present_itemId = true;
849
    if (this_present_itemId || that_present_itemId) {
850
      if (!(this_present_itemId && that_present_itemId))
851
        return false;
852
      if (this.itemId != that.itemId)
853
        return false;
854
    }
855
 
856
    boolean this_present_productGroup = true && this.isSetProductGroup();
857
    boolean that_present_productGroup = true && that.isSetProductGroup();
858
    if (this_present_productGroup || that_present_productGroup) {
859
      if (!(this_present_productGroup && that_present_productGroup))
860
        return false;
861
      if (!this.productGroup.equals(that.productGroup))
862
        return false;
863
    }
864
 
865
    boolean this_present_brand = true && this.isSetBrand();
866
    boolean that_present_brand = true && that.isSetBrand();
867
    if (this_present_brand || that_present_brand) {
868
      if (!(this_present_brand && that_present_brand))
869
        return false;
870
      if (!this.brand.equals(that.brand))
871
        return false;
872
    }
873
 
874
    boolean this_present_modelNumber = true && this.isSetModelNumber();
875
    boolean that_present_modelNumber = true && that.isSetModelNumber();
876
    if (this_present_modelNumber || that_present_modelNumber) {
877
      if (!(this_present_modelNumber && that_present_modelNumber))
878
        return false;
879
      if (!this.modelNumber.equals(that.modelNumber))
880
        return false;
881
    }
882
 
883
    boolean this_present_modelName = true && this.isSetModelName();
884
    boolean that_present_modelName = true && that.isSetModelName();
885
    if (this_present_modelName || that_present_modelName) {
886
      if (!(this_present_modelName && that_present_modelName))
887
        return false;
888
      if (!this.modelName.equals(that.modelName))
889
        return false;
890
    }
891
 
892
    boolean this_present_color = true && this.isSetColor();
893
    boolean that_present_color = true && that.isSetColor();
894
    if (this_present_color || that_present_color) {
895
      if (!(this_present_color && that_present_color))
896
        return false;
897
      if (!this.color.equals(that.color))
898
        return false;
899
    }
900
 
901
    boolean this_present_itemNumber = true && this.isSetItemNumber();
902
    boolean that_present_itemNumber = true && that.isSetItemNumber();
903
    if (this_present_itemNumber || that_present_itemNumber) {
904
      if (!(this_present_itemNumber && that_present_itemNumber))
905
        return false;
906
      if (!this.itemNumber.equals(that.itemNumber))
907
        return false;
908
    }
909
 
910
    boolean this_present_quantity = true;
911
    boolean that_present_quantity = true;
912
    if (this_present_quantity || that_present_quantity) {
913
      if (!(this_present_quantity && that_present_quantity))
914
        return false;
915
      if (this.quantity != that.quantity)
916
        return false;
917
    }
918
 
919
    boolean this_present_unfulfilledQuantity = true;
920
    boolean that_present_unfulfilledQuantity = true;
921
    if (this_present_unfulfilledQuantity || that_present_unfulfilledQuantity) {
922
      if (!(this_present_unfulfilledQuantity && that_present_unfulfilledQuantity))
923
        return false;
924
      if (this.unfulfilledQuantity != that.unfulfilledQuantity)
925
        return false;
926
    }
927
 
928
    boolean this_present_createdAt = true;
929
    boolean that_present_createdAt = true;
930
    if (this_present_createdAt || that_present_createdAt) {
931
      if (!(this_present_createdAt && that_present_createdAt))
932
        return false;
933
      if (this.createdAt != that.createdAt)
934
        return false;
935
    }
936
 
937
    boolean this_present_unitPrice = true;
938
    boolean that_present_unitPrice = true;
939
    if (this_present_unitPrice || that_present_unitPrice) {
940
      if (!(this_present_unitPrice && that_present_unitPrice))
941
        return false;
942
      if (this.unitPrice != that.unitPrice)
943
        return false;
944
    }
945
 
946
    boolean this_present_fulfilled = true;
947
    boolean that_present_fulfilled = true;
948
    if (this_present_fulfilled || that_present_fulfilled) {
949
      if (!(this_present_fulfilled && that_present_fulfilled))
950
        return false;
951
      if (this.fulfilled != that.fulfilled)
952
        return false;
953
    }
954
 
4754 mandeep.dh 955
    boolean this_present_codCount = true;
956
    boolean that_present_codCount = true;
957
    if (this_present_codCount || that_present_codCount) {
958
      if (!(this_present_codCount && that_present_codCount))
959
        return false;
960
      if (this.codCount != that.codCount)
961
        return false;
962
    }
963
 
4496 mandeep.dh 964
    return true;
965
  }
966
 
967
  @Override
968
  public int hashCode() {
969
    return 0;
970
  }
971
 
972
  public int compareTo(LineItem other) {
973
    if (!getClass().equals(other.getClass())) {
974
      return getClass().getName().compareTo(other.getClass().getName());
975
    }
976
 
977
    int lastComparison = 0;
978
    LineItem typedOther = (LineItem)other;
979
 
980
    lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
981
    if (lastComparison != 0) {
982
      return lastComparison;
983
    }
984
    if (isSetOrderId()) {
985
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
986
      if (lastComparison != 0) {
987
        return lastComparison;
988
      }
989
    }
990
    lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
991
    if (lastComparison != 0) {
992
      return lastComparison;
993
    }
994
    if (isSetItemId()) {
995
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
996
      if (lastComparison != 0) {
997
        return lastComparison;
998
      }
999
    }
1000
    lastComparison = Boolean.valueOf(isSetProductGroup()).compareTo(typedOther.isSetProductGroup());
1001
    if (lastComparison != 0) {
1002
      return lastComparison;
1003
    }
1004
    if (isSetProductGroup()) {
1005
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.productGroup, typedOther.productGroup);
1006
      if (lastComparison != 0) {
1007
        return lastComparison;
1008
      }
1009
    }
1010
    lastComparison = Boolean.valueOf(isSetBrand()).compareTo(typedOther.isSetBrand());
1011
    if (lastComparison != 0) {
1012
      return lastComparison;
1013
    }
1014
    if (isSetBrand()) {
1015
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.brand, typedOther.brand);
1016
      if (lastComparison != 0) {
1017
        return lastComparison;
1018
      }
1019
    }
1020
    lastComparison = Boolean.valueOf(isSetModelNumber()).compareTo(typedOther.isSetModelNumber());
1021
    if (lastComparison != 0) {
1022
      return lastComparison;
1023
    }
1024
    if (isSetModelNumber()) {
1025
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.modelNumber, typedOther.modelNumber);
1026
      if (lastComparison != 0) {
1027
        return lastComparison;
1028
      }
1029
    }
1030
    lastComparison = Boolean.valueOf(isSetModelName()).compareTo(typedOther.isSetModelName());
1031
    if (lastComparison != 0) {
1032
      return lastComparison;
1033
    }
1034
    if (isSetModelName()) {
1035
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.modelName, typedOther.modelName);
1036
      if (lastComparison != 0) {
1037
        return lastComparison;
1038
      }
1039
    }
1040
    lastComparison = Boolean.valueOf(isSetColor()).compareTo(typedOther.isSetColor());
1041
    if (lastComparison != 0) {
1042
      return lastComparison;
1043
    }
1044
    if (isSetColor()) {
1045
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.color, typedOther.color);
1046
      if (lastComparison != 0) {
1047
        return lastComparison;
1048
      }
1049
    }
1050
    lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
1051
    if (lastComparison != 0) {
1052
      return lastComparison;
1053
    }
1054
    if (isSetItemNumber()) {
1055
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
1056
      if (lastComparison != 0) {
1057
        return lastComparison;
1058
      }
1059
    }
1060
    lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
1061
    if (lastComparison != 0) {
1062
      return lastComparison;
1063
    }
1064
    if (isSetQuantity()) {
1065
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
1066
      if (lastComparison != 0) {
1067
        return lastComparison;
1068
      }
1069
    }
1070
    lastComparison = Boolean.valueOf(isSetUnfulfilledQuantity()).compareTo(typedOther.isSetUnfulfilledQuantity());
1071
    if (lastComparison != 0) {
1072
      return lastComparison;
1073
    }
1074
    if (isSetUnfulfilledQuantity()) {
1075
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unfulfilledQuantity, typedOther.unfulfilledQuantity);
1076
      if (lastComparison != 0) {
1077
        return lastComparison;
1078
      }
1079
    }
1080
    lastComparison = Boolean.valueOf(isSetCreatedAt()).compareTo(typedOther.isSetCreatedAt());
1081
    if (lastComparison != 0) {
1082
      return lastComparison;
1083
    }
1084
    if (isSetCreatedAt()) {
1085
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdAt, typedOther.createdAt);
1086
      if (lastComparison != 0) {
1087
        return lastComparison;
1088
      }
1089
    }
1090
    lastComparison = Boolean.valueOf(isSetUnitPrice()).compareTo(typedOther.isSetUnitPrice());
1091
    if (lastComparison != 0) {
1092
      return lastComparison;
1093
    }
1094
    if (isSetUnitPrice()) {
1095
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unitPrice, typedOther.unitPrice);
1096
      if (lastComparison != 0) {
1097
        return lastComparison;
1098
      }
1099
    }
1100
    lastComparison = Boolean.valueOf(isSetFulfilled()).compareTo(typedOther.isSetFulfilled());
1101
    if (lastComparison != 0) {
1102
      return lastComparison;
1103
    }
1104
    if (isSetFulfilled()) {
1105
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilled, typedOther.fulfilled);
1106
      if (lastComparison != 0) {
1107
        return lastComparison;
1108
      }
1109
    }
4754 mandeep.dh 1110
    lastComparison = Boolean.valueOf(isSetCodCount()).compareTo(typedOther.isSetCodCount());
1111
    if (lastComparison != 0) {
1112
      return lastComparison;
1113
    }
1114
    if (isSetCodCount()) {
1115
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.codCount, typedOther.codCount);
1116
      if (lastComparison != 0) {
1117
        return lastComparison;
1118
      }
1119
    }
4496 mandeep.dh 1120
    return 0;
1121
  }
1122
 
1123
  public _Fields fieldForId(int fieldId) {
1124
    return _Fields.findByThriftId(fieldId);
1125
  }
1126
 
1127
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1128
    org.apache.thrift.protocol.TField field;
1129
    iprot.readStructBegin();
1130
    while (true)
1131
    {
1132
      field = iprot.readFieldBegin();
1133
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
1134
        break;
1135
      }
1136
      switch (field.id) {
1137
        case 1: // ORDER_ID
1138
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1139
            this.orderId = iprot.readI64();
1140
            setOrderIdIsSet(true);
1141
          } else { 
1142
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1143
          }
1144
          break;
1145
        case 2: // ITEM_ID
1146
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1147
            this.itemId = iprot.readI64();
1148
            setItemIdIsSet(true);
1149
          } else { 
1150
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1151
          }
1152
          break;
1153
        case 3: // PRODUCT_GROUP
1154
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1155
            this.productGroup = iprot.readString();
1156
          } else { 
1157
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1158
          }
1159
          break;
1160
        case 4: // BRAND
1161
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1162
            this.brand = iprot.readString();
1163
          } else { 
1164
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1165
          }
1166
          break;
1167
        case 5: // MODEL_NUMBER
1168
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1169
            this.modelNumber = iprot.readString();
1170
          } else { 
1171
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1172
          }
1173
          break;
1174
        case 6: // MODEL_NAME
1175
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1176
            this.modelName = iprot.readString();
1177
          } else { 
1178
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1179
          }
1180
          break;
1181
        case 7: // COLOR
1182
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1183
            this.color = iprot.readString();
1184
          } else { 
1185
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1186
          }
1187
          break;
1188
        case 8: // ITEM_NUMBER
1189
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1190
            this.itemNumber = iprot.readString();
1191
          } else { 
1192
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1193
          }
1194
          break;
1195
        case 9: // QUANTITY
1196
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
1197
            this.quantity = iprot.readDouble();
1198
            setQuantityIsSet(true);
1199
          } else { 
1200
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1201
          }
1202
          break;
1203
        case 10: // UNFULFILLED_QUANTITY
1204
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
1205
            this.unfulfilledQuantity = iprot.readDouble();
1206
            setUnfulfilledQuantityIsSet(true);
1207
          } else { 
1208
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1209
          }
1210
          break;
1211
        case 11: // CREATED_AT
1212
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1213
            this.createdAt = iprot.readI64();
1214
            setCreatedAtIsSet(true);
1215
          } else { 
1216
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1217
          }
1218
          break;
1219
        case 12: // UNIT_PRICE
1220
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
1221
            this.unitPrice = iprot.readDouble();
1222
            setUnitPriceIsSet(true);
1223
          } else { 
1224
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1225
          }
1226
          break;
1227
        case 13: // FULFILLED
1228
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
1229
            this.fulfilled = iprot.readBool();
1230
            setFulfilledIsSet(true);
1231
          } else { 
1232
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1233
          }
1234
          break;
4754 mandeep.dh 1235
        case 14: // COD_COUNT
1236
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1237
            this.codCount = iprot.readI64();
1238
            setCodCountIsSet(true);
1239
          } else { 
1240
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1241
          }
1242
          break;
4496 mandeep.dh 1243
        default:
1244
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1245
      }
1246
      iprot.readFieldEnd();
1247
    }
1248
    iprot.readStructEnd();
1249
    validate();
1250
  }
1251
 
1252
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1253
    validate();
1254
 
1255
    oprot.writeStructBegin(STRUCT_DESC);
1256
    oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
1257
    oprot.writeI64(this.orderId);
1258
    oprot.writeFieldEnd();
1259
    oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
1260
    oprot.writeI64(this.itemId);
1261
    oprot.writeFieldEnd();
1262
    if (this.productGroup != null) {
1263
      oprot.writeFieldBegin(PRODUCT_GROUP_FIELD_DESC);
1264
      oprot.writeString(this.productGroup);
1265
      oprot.writeFieldEnd();
1266
    }
1267
    if (this.brand != null) {
1268
      oprot.writeFieldBegin(BRAND_FIELD_DESC);
1269
      oprot.writeString(this.brand);
1270
      oprot.writeFieldEnd();
1271
    }
1272
    if (this.modelNumber != null) {
1273
      oprot.writeFieldBegin(MODEL_NUMBER_FIELD_DESC);
1274
      oprot.writeString(this.modelNumber);
1275
      oprot.writeFieldEnd();
1276
    }
1277
    if (this.modelName != null) {
1278
      oprot.writeFieldBegin(MODEL_NAME_FIELD_DESC);
1279
      oprot.writeString(this.modelName);
1280
      oprot.writeFieldEnd();
1281
    }
1282
    if (this.color != null) {
1283
      oprot.writeFieldBegin(COLOR_FIELD_DESC);
1284
      oprot.writeString(this.color);
1285
      oprot.writeFieldEnd();
1286
    }
1287
    if (this.itemNumber != null) {
1288
      oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
1289
      oprot.writeString(this.itemNumber);
1290
      oprot.writeFieldEnd();
1291
    }
1292
    oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
1293
    oprot.writeDouble(this.quantity);
1294
    oprot.writeFieldEnd();
1295
    oprot.writeFieldBegin(UNFULFILLED_QUANTITY_FIELD_DESC);
1296
    oprot.writeDouble(this.unfulfilledQuantity);
1297
    oprot.writeFieldEnd();
1298
    oprot.writeFieldBegin(CREATED_AT_FIELD_DESC);
1299
    oprot.writeI64(this.createdAt);
1300
    oprot.writeFieldEnd();
1301
    oprot.writeFieldBegin(UNIT_PRICE_FIELD_DESC);
1302
    oprot.writeDouble(this.unitPrice);
1303
    oprot.writeFieldEnd();
1304
    oprot.writeFieldBegin(FULFILLED_FIELD_DESC);
1305
    oprot.writeBool(this.fulfilled);
1306
    oprot.writeFieldEnd();
4754 mandeep.dh 1307
    oprot.writeFieldBegin(COD_COUNT_FIELD_DESC);
1308
    oprot.writeI64(this.codCount);
1309
    oprot.writeFieldEnd();
4496 mandeep.dh 1310
    oprot.writeFieldStop();
1311
    oprot.writeStructEnd();
1312
  }
1313
 
1314
  @Override
1315
  public String toString() {
1316
    StringBuilder sb = new StringBuilder("LineItem(");
1317
    boolean first = true;
1318
 
1319
    sb.append("orderId:");
1320
    sb.append(this.orderId);
1321
    first = false;
1322
    if (!first) sb.append(", ");
1323
    sb.append("itemId:");
1324
    sb.append(this.itemId);
1325
    first = false;
1326
    if (!first) sb.append(", ");
1327
    sb.append("productGroup:");
1328
    if (this.productGroup == null) {
1329
      sb.append("null");
1330
    } else {
1331
      sb.append(this.productGroup);
1332
    }
1333
    first = false;
1334
    if (!first) sb.append(", ");
1335
    sb.append("brand:");
1336
    if (this.brand == null) {
1337
      sb.append("null");
1338
    } else {
1339
      sb.append(this.brand);
1340
    }
1341
    first = false;
1342
    if (!first) sb.append(", ");
1343
    sb.append("modelNumber:");
1344
    if (this.modelNumber == null) {
1345
      sb.append("null");
1346
    } else {
1347
      sb.append(this.modelNumber);
1348
    }
1349
    first = false;
1350
    if (!first) sb.append(", ");
1351
    sb.append("modelName:");
1352
    if (this.modelName == null) {
1353
      sb.append("null");
1354
    } else {
1355
      sb.append(this.modelName);
1356
    }
1357
    first = false;
1358
    if (!first) sb.append(", ");
1359
    sb.append("color:");
1360
    if (this.color == null) {
1361
      sb.append("null");
1362
    } else {
1363
      sb.append(this.color);
1364
    }
1365
    first = false;
1366
    if (!first) sb.append(", ");
1367
    sb.append("itemNumber:");
1368
    if (this.itemNumber == null) {
1369
      sb.append("null");
1370
    } else {
1371
      sb.append(this.itemNumber);
1372
    }
1373
    first = false;
1374
    if (!first) sb.append(", ");
1375
    sb.append("quantity:");
1376
    sb.append(this.quantity);
1377
    first = false;
1378
    if (!first) sb.append(", ");
1379
    sb.append("unfulfilledQuantity:");
1380
    sb.append(this.unfulfilledQuantity);
1381
    first = false;
1382
    if (!first) sb.append(", ");
1383
    sb.append("createdAt:");
1384
    sb.append(this.createdAt);
1385
    first = false;
1386
    if (!first) sb.append(", ");
1387
    sb.append("unitPrice:");
1388
    sb.append(this.unitPrice);
1389
    first = false;
1390
    if (!first) sb.append(", ");
1391
    sb.append("fulfilled:");
1392
    sb.append(this.fulfilled);
1393
    first = false;
4754 mandeep.dh 1394
    if (!first) sb.append(", ");
1395
    sb.append("codCount:");
1396
    sb.append(this.codCount);
1397
    first = false;
4496 mandeep.dh 1398
    sb.append(")");
1399
    return sb.toString();
1400
  }
1401
 
1402
  public void validate() throws org.apache.thrift.TException {
1403
    // check for required fields
1404
  }
1405
 
1406
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1407
    try {
1408
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1409
    } catch (org.apache.thrift.TException te) {
1410
      throw new java.io.IOException(te);
1411
    }
1412
  }
1413
 
1414
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1415
    try {
1416
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
1417
      __isset_bit_vector = new BitSet(1);
1418
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1419
    } catch (org.apache.thrift.TException te) {
1420
      throw new java.io.IOException(te);
1421
    }
1422
  }
1423
 
1424
}
1425