Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
553 chandransh 1
/**
3430 rajveer 2
 * Autogenerated by Thrift Compiler (0.7.0)
553 chandransh 3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.user;
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;
3430 rajveer 18
import java.nio.ByteBuffer;
553 chandransh 19
import java.util.Arrays;
20
import org.slf4j.Logger;
21
import org.slf4j.LoggerFactory;
22
 
3430 rajveer 23
public class Line implements org.apache.thrift.TBase<Line, Line._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Line");
553 chandransh 25
 
3430 rajveer 26
  private static final org.apache.thrift.protocol.TField CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("cartId", 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 QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("quantity", org.apache.thrift.protocol.TType.DOUBLE, (short)3);
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);
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);
31
  private static final org.apache.thrift.protocol.TField LINE_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("lineStatus", org.apache.thrift.protocol.TType.I32, (short)6);
32
  private static final org.apache.thrift.protocol.TField ESTIMATE_FIELD_DESC = new org.apache.thrift.protocol.TField("estimate", org.apache.thrift.protocol.TType.I32, (short)7);
33
  private static final org.apache.thrift.protocol.TField ACTUAL_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("actualPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)8);
34
  private static final org.apache.thrift.protocol.TField DISCOUNTED_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("discountedPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)9);
3555 varun.gupt 35
  private static final org.apache.thrift.protocol.TField DISCOUNTS_FIELD_DESC = new org.apache.thrift.protocol.TField("discounts", org.apache.thrift.protocol.TType.LIST, (short)10);
6903 anupam.sin 36
  private static final org.apache.thrift.protocol.TField INSURER_FIELD_DESC = new org.apache.thrift.protocol.TField("insurer", org.apache.thrift.protocol.TType.I64, (short)11);
37
  private static final org.apache.thrift.protocol.TField INSURANCE_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("insuranceAmount", org.apache.thrift.protocol.TType.DOUBLE, (short)12);
9299 kshitij.so 38
  private static final org.apache.thrift.protocol.TField DATA_PROTECTION_INSURER_FIELD_DESC = new org.apache.thrift.protocol.TField("dataProtectionInsurer", org.apache.thrift.protocol.TType.I64, (short)13);
39
  private static final org.apache.thrift.protocol.TField DATA_PROTECTION_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("dataProtectionAmount", org.apache.thrift.protocol.TType.DOUBLE, (short)14);
11653 amit.gupta 40
  private static final org.apache.thrift.protocol.TField DEAL_TEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("dealText", org.apache.thrift.protocol.TType.STRING, (short)15);
41
  private static final org.apache.thrift.protocol.TField FREEBIE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("freebieId", org.apache.thrift.protocol.TType.STRING, (short)16);
553 chandransh 42
 
3430 rajveer 43
  private long cartId; // required
44
  private long itemId; // required
45
  private double quantity; // required
46
  private long createdOn; // required
47
  private long updatedOn; // required
48
  private LineStatus lineStatus; // required
49
  private int estimate; // required
50
  private double actualPrice; // required
51
  private double discountedPrice; // required
3555 varun.gupt 52
  private List<Discount> discounts; // required
6903 anupam.sin 53
  private long insurer; // required
54
  private double insuranceAmount; // required
9299 kshitij.so 55
  private long dataProtectionInsurer; // required
56
  private double dataProtectionAmount; // required
11653 amit.gupta 57
  private String dealText; // required
58
  private String freebieId; // required
553 chandransh 59
 
60
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 61
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
648 chandransh 62
    CART_ID((short)1, "cartId"),
553 chandransh 63
    ITEM_ID((short)2, "itemId"),
64
    QUANTITY((short)3, "quantity"),
65
    CREATED_ON((short)4, "createdOn"),
66
    UPDATED_ON((short)5, "updatedOn"),
67
    /**
68
     * 
69
     * @see LineStatus
70
     */
614 chandransh 71
    LINE_STATUS((short)6, "lineStatus"),
1982 varun.gupt 72
    ESTIMATE((short)7, "estimate"),
73
    ACTUAL_PRICE((short)8, "actualPrice"),
3555 varun.gupt 74
    DISCOUNTED_PRICE((short)9, "discountedPrice"),
6903 anupam.sin 75
    DISCOUNTS((short)10, "discounts"),
76
    INSURER((short)11, "insurer"),
9299 kshitij.so 77
    INSURANCE_AMOUNT((short)12, "insuranceAmount"),
78
    DATA_PROTECTION_INSURER((short)13, "dataProtectionInsurer"),
11653 amit.gupta 79
    DATA_PROTECTION_AMOUNT((short)14, "dataProtectionAmount"),
80
    DEAL_TEXT((short)15, "dealText"),
81
    FREEBIE_ID((short)16, "freebieId");
553 chandransh 82
 
83
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
84
 
85
    static {
86
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
87
        byName.put(field.getFieldName(), field);
88
      }
89
    }
90
 
91
    /**
92
     * Find the _Fields constant that matches fieldId, or null if its not found.
93
     */
94
    public static _Fields findByThriftId(int fieldId) {
3430 rajveer 95
      switch(fieldId) {
96
        case 1: // CART_ID
97
          return CART_ID;
98
        case 2: // ITEM_ID
99
          return ITEM_ID;
100
        case 3: // QUANTITY
101
          return QUANTITY;
102
        case 4: // CREATED_ON
103
          return CREATED_ON;
104
        case 5: // UPDATED_ON
105
          return UPDATED_ON;
106
        case 6: // LINE_STATUS
107
          return LINE_STATUS;
108
        case 7: // ESTIMATE
109
          return ESTIMATE;
110
        case 8: // ACTUAL_PRICE
111
          return ACTUAL_PRICE;
112
        case 9: // DISCOUNTED_PRICE
113
          return DISCOUNTED_PRICE;
3555 varun.gupt 114
        case 10: // DISCOUNTS
115
          return DISCOUNTS;
6903 anupam.sin 116
        case 11: // INSURER
117
          return INSURER;
118
        case 12: // INSURANCE_AMOUNT
119
          return INSURANCE_AMOUNT;
9299 kshitij.so 120
        case 13: // DATA_PROTECTION_INSURER
121
          return DATA_PROTECTION_INSURER;
122
        case 14: // DATA_PROTECTION_AMOUNT
123
          return DATA_PROTECTION_AMOUNT;
11653 amit.gupta 124
        case 15: // DEAL_TEXT
125
          return DEAL_TEXT;
126
        case 16: // FREEBIE_ID
127
          return FREEBIE_ID;
3430 rajveer 128
        default:
129
          return null;
130
      }
553 chandransh 131
    }
132
 
133
    /**
134
     * Find the _Fields constant that matches fieldId, throwing an exception
135
     * if it is not found.
136
     */
137
    public static _Fields findByThriftIdOrThrow(int fieldId) {
138
      _Fields fields = findByThriftId(fieldId);
139
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
140
      return fields;
141
    }
142
 
143
    /**
144
     * Find the _Fields constant that matches name, or null if its not found.
145
     */
146
    public static _Fields findByName(String name) {
147
      return byName.get(name);
148
    }
149
 
150
    private final short _thriftId;
151
    private final String _fieldName;
152
 
153
    _Fields(short thriftId, String fieldName) {
154
      _thriftId = thriftId;
155
      _fieldName = fieldName;
156
    }
157
 
158
    public short getThriftFieldId() {
159
      return _thriftId;
160
    }
161
 
162
    public String getFieldName() {
163
      return _fieldName;
164
    }
165
  }
166
 
167
  // isset id assignments
648 chandransh 168
  private static final int __CARTID_ISSET_ID = 0;
553 chandransh 169
  private static final int __ITEMID_ISSET_ID = 1;
170
  private static final int __QUANTITY_ISSET_ID = 2;
171
  private static final int __CREATEDON_ISSET_ID = 3;
172
  private static final int __UPDATEDON_ISSET_ID = 4;
614 chandransh 173
  private static final int __ESTIMATE_ISSET_ID = 5;
1982 varun.gupt 174
  private static final int __ACTUALPRICE_ISSET_ID = 6;
175
  private static final int __DISCOUNTEDPRICE_ISSET_ID = 7;
6903 anupam.sin 176
  private static final int __INSURER_ISSET_ID = 8;
177
  private static final int __INSURANCEAMOUNT_ISSET_ID = 9;
9299 kshitij.so 178
  private static final int __DATAPROTECTIONINSURER_ISSET_ID = 10;
179
  private static final int __DATAPROTECTIONAMOUNT_ISSET_ID = 11;
180
  private BitSet __isset_bit_vector = new BitSet(12);
553 chandransh 181
 
3430 rajveer 182
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
553 chandransh 183
  static {
3430 rajveer 184
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
185
    tmpMap.put(_Fields.CART_ID, new org.apache.thrift.meta_data.FieldMetaData("cartId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
186
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
187
    tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
188
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
189
    tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
190
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
191
    tmpMap.put(_Fields.CREATED_ON, new org.apache.thrift.meta_data.FieldMetaData("createdOn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
192
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
193
    tmpMap.put(_Fields.UPDATED_ON, new org.apache.thrift.meta_data.FieldMetaData("updatedOn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
194
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
195
    tmpMap.put(_Fields.LINE_STATUS, new org.apache.thrift.meta_data.FieldMetaData("lineStatus", org.apache.thrift.TFieldRequirementType.DEFAULT, 
196
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, LineStatus.class)));
197
    tmpMap.put(_Fields.ESTIMATE, new org.apache.thrift.meta_data.FieldMetaData("estimate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
198
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
199
    tmpMap.put(_Fields.ACTUAL_PRICE, new org.apache.thrift.meta_data.FieldMetaData("actualPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
200
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
201
    tmpMap.put(_Fields.DISCOUNTED_PRICE, new org.apache.thrift.meta_data.FieldMetaData("discountedPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
202
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
3555 varun.gupt 203
    tmpMap.put(_Fields.DISCOUNTS, new org.apache.thrift.meta_data.FieldMetaData("discounts", org.apache.thrift.TFieldRequirementType.DEFAULT, 
204
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
205
            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Discount.class))));
6903 anupam.sin 206
    tmpMap.put(_Fields.INSURER, new org.apache.thrift.meta_data.FieldMetaData("insurer", org.apache.thrift.TFieldRequirementType.DEFAULT, 
207
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
208
    tmpMap.put(_Fields.INSURANCE_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("insuranceAmount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
209
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
9299 kshitij.so 210
    tmpMap.put(_Fields.DATA_PROTECTION_INSURER, new org.apache.thrift.meta_data.FieldMetaData("dataProtectionInsurer", org.apache.thrift.TFieldRequirementType.DEFAULT, 
211
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
212
    tmpMap.put(_Fields.DATA_PROTECTION_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("dataProtectionAmount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
213
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
11653 amit.gupta 214
    tmpMap.put(_Fields.DEAL_TEXT, new org.apache.thrift.meta_data.FieldMetaData("dealText", org.apache.thrift.TFieldRequirementType.DEFAULT, 
215
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
216
    tmpMap.put(_Fields.FREEBIE_ID, new org.apache.thrift.meta_data.FieldMetaData("freebieId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
217
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
3430 rajveer 218
    metaDataMap = Collections.unmodifiableMap(tmpMap);
219
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Line.class, metaDataMap);
553 chandransh 220
  }
221
 
222
  public Line() {
223
  }
224
 
225
  public Line(
648 chandransh 226
    long cartId,
553 chandransh 227
    long itemId,
228
    double quantity,
229
    long createdOn,
230
    long updatedOn,
614 chandransh 231
    LineStatus lineStatus,
1982 varun.gupt 232
    int estimate,
233
    double actualPrice,
3555 varun.gupt 234
    double discountedPrice,
6903 anupam.sin 235
    List<Discount> discounts,
236
    long insurer,
9299 kshitij.so 237
    double insuranceAmount,
238
    long dataProtectionInsurer,
11653 amit.gupta 239
    double dataProtectionAmount,
240
    String dealText,
241
    String freebieId)
553 chandransh 242
  {
243
    this();
648 chandransh 244
    this.cartId = cartId;
245
    setCartIdIsSet(true);
553 chandransh 246
    this.itemId = itemId;
247
    setItemIdIsSet(true);
248
    this.quantity = quantity;
249
    setQuantityIsSet(true);
250
    this.createdOn = createdOn;
251
    setCreatedOnIsSet(true);
252
    this.updatedOn = updatedOn;
253
    setUpdatedOnIsSet(true);
254
    this.lineStatus = lineStatus;
614 chandransh 255
    this.estimate = estimate;
256
    setEstimateIsSet(true);
1982 varun.gupt 257
    this.actualPrice = actualPrice;
258
    setActualPriceIsSet(true);
259
    this.discountedPrice = discountedPrice;
260
    setDiscountedPriceIsSet(true);
3555 varun.gupt 261
    this.discounts = discounts;
6903 anupam.sin 262
    this.insurer = insurer;
263
    setInsurerIsSet(true);
264
    this.insuranceAmount = insuranceAmount;
265
    setInsuranceAmountIsSet(true);
9299 kshitij.so 266
    this.dataProtectionInsurer = dataProtectionInsurer;
267
    setDataProtectionInsurerIsSet(true);
268
    this.dataProtectionAmount = dataProtectionAmount;
269
    setDataProtectionAmountIsSet(true);
11653 amit.gupta 270
    this.dealText = dealText;
271
    this.freebieId = freebieId;
553 chandransh 272
  }
273
 
274
  /**
275
   * Performs a deep copy on <i>other</i>.
276
   */
277
  public Line(Line other) {
278
    __isset_bit_vector.clear();
279
    __isset_bit_vector.or(other.__isset_bit_vector);
648 chandransh 280
    this.cartId = other.cartId;
553 chandransh 281
    this.itemId = other.itemId;
282
    this.quantity = other.quantity;
283
    this.createdOn = other.createdOn;
284
    this.updatedOn = other.updatedOn;
285
    if (other.isSetLineStatus()) {
286
      this.lineStatus = other.lineStatus;
287
    }
614 chandransh 288
    this.estimate = other.estimate;
1982 varun.gupt 289
    this.actualPrice = other.actualPrice;
290
    this.discountedPrice = other.discountedPrice;
3555 varun.gupt 291
    if (other.isSetDiscounts()) {
292
      List<Discount> __this__discounts = new ArrayList<Discount>();
293
      for (Discount other_element : other.discounts) {
294
        __this__discounts.add(new Discount(other_element));
295
      }
296
      this.discounts = __this__discounts;
297
    }
6903 anupam.sin 298
    this.insurer = other.insurer;
299
    this.insuranceAmount = other.insuranceAmount;
9299 kshitij.so 300
    this.dataProtectionInsurer = other.dataProtectionInsurer;
301
    this.dataProtectionAmount = other.dataProtectionAmount;
11653 amit.gupta 302
    if (other.isSetDealText()) {
303
      this.dealText = other.dealText;
304
    }
305
    if (other.isSetFreebieId()) {
306
      this.freebieId = other.freebieId;
307
    }
553 chandransh 308
  }
309
 
310
  public Line deepCopy() {
311
    return new Line(this);
312
  }
313
 
3430 rajveer 314
  @Override
315
  public void clear() {
316
    setCartIdIsSet(false);
317
    this.cartId = 0;
318
    setItemIdIsSet(false);
319
    this.itemId = 0;
320
    setQuantityIsSet(false);
321
    this.quantity = 0.0;
322
    setCreatedOnIsSet(false);
323
    this.createdOn = 0;
324
    setUpdatedOnIsSet(false);
325
    this.updatedOn = 0;
326
    this.lineStatus = null;
327
    setEstimateIsSet(false);
328
    this.estimate = 0;
329
    setActualPriceIsSet(false);
330
    this.actualPrice = 0.0;
331
    setDiscountedPriceIsSet(false);
332
    this.discountedPrice = 0.0;
3555 varun.gupt 333
    this.discounts = null;
6903 anupam.sin 334
    setInsurerIsSet(false);
335
    this.insurer = 0;
336
    setInsuranceAmountIsSet(false);
337
    this.insuranceAmount = 0.0;
9299 kshitij.so 338
    setDataProtectionInsurerIsSet(false);
339
    this.dataProtectionInsurer = 0;
340
    setDataProtectionAmountIsSet(false);
341
    this.dataProtectionAmount = 0.0;
11653 amit.gupta 342
    this.dealText = null;
343
    this.freebieId = null;
553 chandransh 344
  }
345
 
648 chandransh 346
  public long getCartId() {
347
    return this.cartId;
553 chandransh 348
  }
349
 
3430 rajveer 350
  public void setCartId(long cartId) {
648 chandransh 351
    this.cartId = cartId;
352
    setCartIdIsSet(true);
553 chandransh 353
  }
354
 
648 chandransh 355
  public void unsetCartId() {
356
    __isset_bit_vector.clear(__CARTID_ISSET_ID);
553 chandransh 357
  }
358
 
3430 rajveer 359
  /** Returns true if field cartId is set (has been assigned a value) and false otherwise */
648 chandransh 360
  public boolean isSetCartId() {
361
    return __isset_bit_vector.get(__CARTID_ISSET_ID);
553 chandransh 362
  }
363
 
648 chandransh 364
  public void setCartIdIsSet(boolean value) {
365
    __isset_bit_vector.set(__CARTID_ISSET_ID, value);
553 chandransh 366
  }
367
 
368
  public long getItemId() {
369
    return this.itemId;
370
  }
371
 
3430 rajveer 372
  public void setItemId(long itemId) {
553 chandransh 373
    this.itemId = itemId;
374
    setItemIdIsSet(true);
375
  }
376
 
377
  public void unsetItemId() {
378
    __isset_bit_vector.clear(__ITEMID_ISSET_ID);
379
  }
380
 
3430 rajveer 381
  /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
553 chandransh 382
  public boolean isSetItemId() {
383
    return __isset_bit_vector.get(__ITEMID_ISSET_ID);
384
  }
385
 
386
  public void setItemIdIsSet(boolean value) {
387
    __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
388
  }
389
 
390
  public double getQuantity() {
391
    return this.quantity;
392
  }
393
 
3430 rajveer 394
  public void setQuantity(double quantity) {
553 chandransh 395
    this.quantity = quantity;
396
    setQuantityIsSet(true);
397
  }
398
 
399
  public void unsetQuantity() {
400
    __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
401
  }
402
 
3430 rajveer 403
  /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
553 chandransh 404
  public boolean isSetQuantity() {
405
    return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
406
  }
407
 
408
  public void setQuantityIsSet(boolean value) {
409
    __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
410
  }
411
 
412
  public long getCreatedOn() {
413
    return this.createdOn;
414
  }
415
 
3430 rajveer 416
  public void setCreatedOn(long createdOn) {
553 chandransh 417
    this.createdOn = createdOn;
418
    setCreatedOnIsSet(true);
419
  }
420
 
421
  public void unsetCreatedOn() {
422
    __isset_bit_vector.clear(__CREATEDON_ISSET_ID);
423
  }
424
 
3430 rajveer 425
  /** Returns true if field createdOn is set (has been assigned a value) and false otherwise */
553 chandransh 426
  public boolean isSetCreatedOn() {
427
    return __isset_bit_vector.get(__CREATEDON_ISSET_ID);
428
  }
429
 
430
  public void setCreatedOnIsSet(boolean value) {
431
    __isset_bit_vector.set(__CREATEDON_ISSET_ID, value);
432
  }
433
 
434
  public long getUpdatedOn() {
435
    return this.updatedOn;
436
  }
437
 
3430 rajveer 438
  public void setUpdatedOn(long updatedOn) {
553 chandransh 439
    this.updatedOn = updatedOn;
440
    setUpdatedOnIsSet(true);
441
  }
442
 
443
  public void unsetUpdatedOn() {
444
    __isset_bit_vector.clear(__UPDATEDON_ISSET_ID);
445
  }
446
 
3430 rajveer 447
  /** Returns true if field updatedOn is set (has been assigned a value) and false otherwise */
553 chandransh 448
  public boolean isSetUpdatedOn() {
449
    return __isset_bit_vector.get(__UPDATEDON_ISSET_ID);
450
  }
451
 
452
  public void setUpdatedOnIsSet(boolean value) {
453
    __isset_bit_vector.set(__UPDATEDON_ISSET_ID, value);
454
  }
455
 
456
  /**
457
   * 
458
   * @see LineStatus
459
   */
460
  public LineStatus getLineStatus() {
461
    return this.lineStatus;
462
  }
463
 
464
  /**
465
   * 
466
   * @see LineStatus
467
   */
3430 rajveer 468
  public void setLineStatus(LineStatus lineStatus) {
553 chandransh 469
    this.lineStatus = lineStatus;
470
  }
471
 
472
  public void unsetLineStatus() {
473
    this.lineStatus = null;
474
  }
475
 
3430 rajveer 476
  /** Returns true if field lineStatus is set (has been assigned a value) and false otherwise */
553 chandransh 477
  public boolean isSetLineStatus() {
478
    return this.lineStatus != null;
479
  }
480
 
481
  public void setLineStatusIsSet(boolean value) {
482
    if (!value) {
483
      this.lineStatus = null;
484
    }
485
  }
486
 
614 chandransh 487
  public int getEstimate() {
488
    return this.estimate;
489
  }
490
 
3430 rajveer 491
  public void setEstimate(int estimate) {
614 chandransh 492
    this.estimate = estimate;
493
    setEstimateIsSet(true);
494
  }
495
 
496
  public void unsetEstimate() {
497
    __isset_bit_vector.clear(__ESTIMATE_ISSET_ID);
498
  }
499
 
3430 rajveer 500
  /** Returns true if field estimate is set (has been assigned a value) and false otherwise */
614 chandransh 501
  public boolean isSetEstimate() {
502
    return __isset_bit_vector.get(__ESTIMATE_ISSET_ID);
503
  }
504
 
505
  public void setEstimateIsSet(boolean value) {
506
    __isset_bit_vector.set(__ESTIMATE_ISSET_ID, value);
507
  }
508
 
1982 varun.gupt 509
  public double getActualPrice() {
510
    return this.actualPrice;
511
  }
512
 
3430 rajveer 513
  public void setActualPrice(double actualPrice) {
1982 varun.gupt 514
    this.actualPrice = actualPrice;
515
    setActualPriceIsSet(true);
516
  }
517
 
518
  public void unsetActualPrice() {
519
    __isset_bit_vector.clear(__ACTUALPRICE_ISSET_ID);
520
  }
521
 
3430 rajveer 522
  /** Returns true if field actualPrice is set (has been assigned a value) and false otherwise */
1982 varun.gupt 523
  public boolean isSetActualPrice() {
524
    return __isset_bit_vector.get(__ACTUALPRICE_ISSET_ID);
525
  }
526
 
527
  public void setActualPriceIsSet(boolean value) {
528
    __isset_bit_vector.set(__ACTUALPRICE_ISSET_ID, value);
529
  }
530
 
531
  public double getDiscountedPrice() {
532
    return this.discountedPrice;
533
  }
534
 
3430 rajveer 535
  public void setDiscountedPrice(double discountedPrice) {
1982 varun.gupt 536
    this.discountedPrice = discountedPrice;
537
    setDiscountedPriceIsSet(true);
538
  }
539
 
540
  public void unsetDiscountedPrice() {
541
    __isset_bit_vector.clear(__DISCOUNTEDPRICE_ISSET_ID);
542
  }
543
 
3430 rajveer 544
  /** Returns true if field discountedPrice is set (has been assigned a value) and false otherwise */
1982 varun.gupt 545
  public boolean isSetDiscountedPrice() {
546
    return __isset_bit_vector.get(__DISCOUNTEDPRICE_ISSET_ID);
547
  }
548
 
549
  public void setDiscountedPriceIsSet(boolean value) {
550
    __isset_bit_vector.set(__DISCOUNTEDPRICE_ISSET_ID, value);
551
  }
552
 
3555 varun.gupt 553
  public int getDiscountsSize() {
554
    return (this.discounts == null) ? 0 : this.discounts.size();
555
  }
556
 
557
  public java.util.Iterator<Discount> getDiscountsIterator() {
558
    return (this.discounts == null) ? null : this.discounts.iterator();
559
  }
560
 
561
  public void addToDiscounts(Discount elem) {
562
    if (this.discounts == null) {
563
      this.discounts = new ArrayList<Discount>();
564
    }
565
    this.discounts.add(elem);
566
  }
567
 
568
  public List<Discount> getDiscounts() {
569
    return this.discounts;
570
  }
571
 
572
  public void setDiscounts(List<Discount> discounts) {
573
    this.discounts = discounts;
574
  }
575
 
576
  public void unsetDiscounts() {
577
    this.discounts = null;
578
  }
579
 
580
  /** Returns true if field discounts is set (has been assigned a value) and false otherwise */
581
  public boolean isSetDiscounts() {
582
    return this.discounts != null;
583
  }
584
 
585
  public void setDiscountsIsSet(boolean value) {
586
    if (!value) {
587
      this.discounts = null;
588
    }
589
  }
590
 
6903 anupam.sin 591
  public long getInsurer() {
592
    return this.insurer;
593
  }
594
 
595
  public void setInsurer(long insurer) {
596
    this.insurer = insurer;
597
    setInsurerIsSet(true);
598
  }
599
 
600
  public void unsetInsurer() {
601
    __isset_bit_vector.clear(__INSURER_ISSET_ID);
602
  }
603
 
604
  /** Returns true if field insurer is set (has been assigned a value) and false otherwise */
605
  public boolean isSetInsurer() {
606
    return __isset_bit_vector.get(__INSURER_ISSET_ID);
607
  }
608
 
609
  public void setInsurerIsSet(boolean value) {
610
    __isset_bit_vector.set(__INSURER_ISSET_ID, value);
611
  }
612
 
613
  public double getInsuranceAmount() {
614
    return this.insuranceAmount;
615
  }
616
 
617
  public void setInsuranceAmount(double insuranceAmount) {
618
    this.insuranceAmount = insuranceAmount;
619
    setInsuranceAmountIsSet(true);
620
  }
621
 
622
  public void unsetInsuranceAmount() {
623
    __isset_bit_vector.clear(__INSURANCEAMOUNT_ISSET_ID);
624
  }
625
 
626
  /** Returns true if field insuranceAmount is set (has been assigned a value) and false otherwise */
627
  public boolean isSetInsuranceAmount() {
628
    return __isset_bit_vector.get(__INSURANCEAMOUNT_ISSET_ID);
629
  }
630
 
631
  public void setInsuranceAmountIsSet(boolean value) {
632
    __isset_bit_vector.set(__INSURANCEAMOUNT_ISSET_ID, value);
633
  }
634
 
9299 kshitij.so 635
  public long getDataProtectionInsurer() {
636
    return this.dataProtectionInsurer;
637
  }
638
 
639
  public void setDataProtectionInsurer(long dataProtectionInsurer) {
640
    this.dataProtectionInsurer = dataProtectionInsurer;
641
    setDataProtectionInsurerIsSet(true);
642
  }
643
 
644
  public void unsetDataProtectionInsurer() {
645
    __isset_bit_vector.clear(__DATAPROTECTIONINSURER_ISSET_ID);
646
  }
647
 
648
  /** Returns true if field dataProtectionInsurer is set (has been assigned a value) and false otherwise */
649
  public boolean isSetDataProtectionInsurer() {
650
    return __isset_bit_vector.get(__DATAPROTECTIONINSURER_ISSET_ID);
651
  }
652
 
653
  public void setDataProtectionInsurerIsSet(boolean value) {
654
    __isset_bit_vector.set(__DATAPROTECTIONINSURER_ISSET_ID, value);
655
  }
656
 
657
  public double getDataProtectionAmount() {
658
    return this.dataProtectionAmount;
659
  }
660
 
661
  public void setDataProtectionAmount(double dataProtectionAmount) {
662
    this.dataProtectionAmount = dataProtectionAmount;
663
    setDataProtectionAmountIsSet(true);
664
  }
665
 
666
  public void unsetDataProtectionAmount() {
667
    __isset_bit_vector.clear(__DATAPROTECTIONAMOUNT_ISSET_ID);
668
  }
669
 
670
  /** Returns true if field dataProtectionAmount is set (has been assigned a value) and false otherwise */
671
  public boolean isSetDataProtectionAmount() {
672
    return __isset_bit_vector.get(__DATAPROTECTIONAMOUNT_ISSET_ID);
673
  }
674
 
675
  public void setDataProtectionAmountIsSet(boolean value) {
676
    __isset_bit_vector.set(__DATAPROTECTIONAMOUNT_ISSET_ID, value);
677
  }
678
 
11653 amit.gupta 679
  public String getDealText() {
680
    return this.dealText;
681
  }
682
 
683
  public void setDealText(String dealText) {
684
    this.dealText = dealText;
685
  }
686
 
687
  public void unsetDealText() {
688
    this.dealText = null;
689
  }
690
 
691
  /** Returns true if field dealText is set (has been assigned a value) and false otherwise */
692
  public boolean isSetDealText() {
693
    return this.dealText != null;
694
  }
695
 
696
  public void setDealTextIsSet(boolean value) {
697
    if (!value) {
698
      this.dealText = null;
699
    }
700
  }
701
 
702
  public String getFreebieId() {
703
    return this.freebieId;
704
  }
705
 
706
  public void setFreebieId(String freebieId) {
707
    this.freebieId = freebieId;
708
  }
709
 
710
  public void unsetFreebieId() {
711
    this.freebieId = null;
712
  }
713
 
714
  /** Returns true if field freebieId is set (has been assigned a value) and false otherwise */
715
  public boolean isSetFreebieId() {
716
    return this.freebieId != null;
717
  }
718
 
719
  public void setFreebieIdIsSet(boolean value) {
720
    if (!value) {
721
      this.freebieId = null;
722
    }
723
  }
724
 
553 chandransh 725
  public void setFieldValue(_Fields field, Object value) {
726
    switch (field) {
648 chandransh 727
    case CART_ID:
553 chandransh 728
      if (value == null) {
648 chandransh 729
        unsetCartId();
553 chandransh 730
      } else {
648 chandransh 731
        setCartId((Long)value);
553 chandransh 732
      }
733
      break;
734
 
735
    case ITEM_ID:
736
      if (value == null) {
737
        unsetItemId();
738
      } else {
739
        setItemId((Long)value);
740
      }
741
      break;
742
 
743
    case QUANTITY:
744
      if (value == null) {
745
        unsetQuantity();
746
      } else {
747
        setQuantity((Double)value);
748
      }
749
      break;
750
 
751
    case CREATED_ON:
752
      if (value == null) {
753
        unsetCreatedOn();
754
      } else {
755
        setCreatedOn((Long)value);
756
      }
757
      break;
758
 
759
    case UPDATED_ON:
760
      if (value == null) {
761
        unsetUpdatedOn();
762
      } else {
763
        setUpdatedOn((Long)value);
764
      }
765
      break;
766
 
767
    case LINE_STATUS:
768
      if (value == null) {
769
        unsetLineStatus();
770
      } else {
771
        setLineStatus((LineStatus)value);
772
      }
773
      break;
774
 
614 chandransh 775
    case ESTIMATE:
776
      if (value == null) {
777
        unsetEstimate();
778
      } else {
779
        setEstimate((Integer)value);
780
      }
781
      break;
782
 
1982 varun.gupt 783
    case ACTUAL_PRICE:
784
      if (value == null) {
785
        unsetActualPrice();
786
      } else {
787
        setActualPrice((Double)value);
788
      }
789
      break;
790
 
791
    case DISCOUNTED_PRICE:
792
      if (value == null) {
793
        unsetDiscountedPrice();
794
      } else {
795
        setDiscountedPrice((Double)value);
796
      }
797
      break;
798
 
3555 varun.gupt 799
    case DISCOUNTS:
800
      if (value == null) {
801
        unsetDiscounts();
802
      } else {
803
        setDiscounts((List<Discount>)value);
804
      }
805
      break;
806
 
6903 anupam.sin 807
    case INSURER:
808
      if (value == null) {
809
        unsetInsurer();
810
      } else {
811
        setInsurer((Long)value);
812
      }
813
      break;
814
 
815
    case INSURANCE_AMOUNT:
816
      if (value == null) {
817
        unsetInsuranceAmount();
818
      } else {
819
        setInsuranceAmount((Double)value);
820
      }
821
      break;
822
 
9299 kshitij.so 823
    case DATA_PROTECTION_INSURER:
824
      if (value == null) {
825
        unsetDataProtectionInsurer();
826
      } else {
827
        setDataProtectionInsurer((Long)value);
828
      }
829
      break;
830
 
831
    case DATA_PROTECTION_AMOUNT:
832
      if (value == null) {
833
        unsetDataProtectionAmount();
834
      } else {
835
        setDataProtectionAmount((Double)value);
836
      }
837
      break;
838
 
11653 amit.gupta 839
    case DEAL_TEXT:
840
      if (value == null) {
841
        unsetDealText();
842
      } else {
843
        setDealText((String)value);
844
      }
845
      break;
846
 
847
    case FREEBIE_ID:
848
      if (value == null) {
849
        unsetFreebieId();
850
      } else {
851
        setFreebieId((String)value);
852
      }
853
      break;
854
 
553 chandransh 855
    }
856
  }
857
 
858
  public Object getFieldValue(_Fields field) {
859
    switch (field) {
648 chandransh 860
    case CART_ID:
3430 rajveer 861
      return Long.valueOf(getCartId());
553 chandransh 862
 
863
    case ITEM_ID:
3430 rajveer 864
      return Long.valueOf(getItemId());
553 chandransh 865
 
866
    case QUANTITY:
3430 rajveer 867
      return Double.valueOf(getQuantity());
553 chandransh 868
 
869
    case CREATED_ON:
3430 rajveer 870
      return Long.valueOf(getCreatedOn());
553 chandransh 871
 
872
    case UPDATED_ON:
3430 rajveer 873
      return Long.valueOf(getUpdatedOn());
553 chandransh 874
 
875
    case LINE_STATUS:
876
      return getLineStatus();
877
 
614 chandransh 878
    case ESTIMATE:
3430 rajveer 879
      return Integer.valueOf(getEstimate());
614 chandransh 880
 
1982 varun.gupt 881
    case ACTUAL_PRICE:
3430 rajveer 882
      return Double.valueOf(getActualPrice());
1982 varun.gupt 883
 
884
    case DISCOUNTED_PRICE:
3430 rajveer 885
      return Double.valueOf(getDiscountedPrice());
1982 varun.gupt 886
 
3555 varun.gupt 887
    case DISCOUNTS:
888
      return getDiscounts();
889
 
6903 anupam.sin 890
    case INSURER:
891
      return Long.valueOf(getInsurer());
892
 
893
    case INSURANCE_AMOUNT:
894
      return Double.valueOf(getInsuranceAmount());
895
 
9299 kshitij.so 896
    case DATA_PROTECTION_INSURER:
897
      return Long.valueOf(getDataProtectionInsurer());
898
 
899
    case DATA_PROTECTION_AMOUNT:
900
      return Double.valueOf(getDataProtectionAmount());
901
 
11653 amit.gupta 902
    case DEAL_TEXT:
903
      return getDealText();
904
 
905
    case FREEBIE_ID:
906
      return getFreebieId();
907
 
553 chandransh 908
    }
909
    throw new IllegalStateException();
910
  }
911
 
3430 rajveer 912
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
913
  public boolean isSet(_Fields field) {
914
    if (field == null) {
915
      throw new IllegalArgumentException();
916
    }
553 chandransh 917
 
918
    switch (field) {
648 chandransh 919
    case CART_ID:
920
      return isSetCartId();
553 chandransh 921
    case ITEM_ID:
922
      return isSetItemId();
923
    case QUANTITY:
924
      return isSetQuantity();
925
    case CREATED_ON:
926
      return isSetCreatedOn();
927
    case UPDATED_ON:
928
      return isSetUpdatedOn();
929
    case LINE_STATUS:
930
      return isSetLineStatus();
614 chandransh 931
    case ESTIMATE:
932
      return isSetEstimate();
1982 varun.gupt 933
    case ACTUAL_PRICE:
934
      return isSetActualPrice();
935
    case DISCOUNTED_PRICE:
936
      return isSetDiscountedPrice();
3555 varun.gupt 937
    case DISCOUNTS:
938
      return isSetDiscounts();
6903 anupam.sin 939
    case INSURER:
940
      return isSetInsurer();
941
    case INSURANCE_AMOUNT:
942
      return isSetInsuranceAmount();
9299 kshitij.so 943
    case DATA_PROTECTION_INSURER:
944
      return isSetDataProtectionInsurer();
945
    case DATA_PROTECTION_AMOUNT:
946
      return isSetDataProtectionAmount();
11653 amit.gupta 947
    case DEAL_TEXT:
948
      return isSetDealText();
949
    case FREEBIE_ID:
950
      return isSetFreebieId();
553 chandransh 951
    }
952
    throw new IllegalStateException();
953
  }
954
 
955
  @Override
956
  public boolean equals(Object that) {
957
    if (that == null)
958
      return false;
959
    if (that instanceof Line)
960
      return this.equals((Line)that);
961
    return false;
962
  }
963
 
964
  public boolean equals(Line that) {
965
    if (that == null)
966
      return false;
967
 
648 chandransh 968
    boolean this_present_cartId = true;
969
    boolean that_present_cartId = true;
970
    if (this_present_cartId || that_present_cartId) {
971
      if (!(this_present_cartId && that_present_cartId))
553 chandransh 972
        return false;
648 chandransh 973
      if (this.cartId != that.cartId)
553 chandransh 974
        return false;
975
    }
976
 
977
    boolean this_present_itemId = true;
978
    boolean that_present_itemId = true;
979
    if (this_present_itemId || that_present_itemId) {
980
      if (!(this_present_itemId && that_present_itemId))
981
        return false;
982
      if (this.itemId != that.itemId)
983
        return false;
984
    }
985
 
986
    boolean this_present_quantity = true;
987
    boolean that_present_quantity = true;
988
    if (this_present_quantity || that_present_quantity) {
989
      if (!(this_present_quantity && that_present_quantity))
990
        return false;
991
      if (this.quantity != that.quantity)
992
        return false;
993
    }
994
 
995
    boolean this_present_createdOn = true;
996
    boolean that_present_createdOn = true;
997
    if (this_present_createdOn || that_present_createdOn) {
998
      if (!(this_present_createdOn && that_present_createdOn))
999
        return false;
1000
      if (this.createdOn != that.createdOn)
1001
        return false;
1002
    }
1003
 
1004
    boolean this_present_updatedOn = true;
1005
    boolean that_present_updatedOn = true;
1006
    if (this_present_updatedOn || that_present_updatedOn) {
1007
      if (!(this_present_updatedOn && that_present_updatedOn))
1008
        return false;
1009
      if (this.updatedOn != that.updatedOn)
1010
        return false;
1011
    }
1012
 
1013
    boolean this_present_lineStatus = true && this.isSetLineStatus();
1014
    boolean that_present_lineStatus = true && that.isSetLineStatus();
1015
    if (this_present_lineStatus || that_present_lineStatus) {
1016
      if (!(this_present_lineStatus && that_present_lineStatus))
1017
        return false;
1018
      if (!this.lineStatus.equals(that.lineStatus))
1019
        return false;
1020
    }
1021
 
614 chandransh 1022
    boolean this_present_estimate = true;
1023
    boolean that_present_estimate = true;
1024
    if (this_present_estimate || that_present_estimate) {
1025
      if (!(this_present_estimate && that_present_estimate))
1026
        return false;
1027
      if (this.estimate != that.estimate)
1028
        return false;
1029
    }
1030
 
1982 varun.gupt 1031
    boolean this_present_actualPrice = true;
1032
    boolean that_present_actualPrice = true;
1033
    if (this_present_actualPrice || that_present_actualPrice) {
1034
      if (!(this_present_actualPrice && that_present_actualPrice))
1035
        return false;
1036
      if (this.actualPrice != that.actualPrice)
1037
        return false;
1038
    }
1039
 
1040
    boolean this_present_discountedPrice = true;
1041
    boolean that_present_discountedPrice = true;
1042
    if (this_present_discountedPrice || that_present_discountedPrice) {
1043
      if (!(this_present_discountedPrice && that_present_discountedPrice))
1044
        return false;
1045
      if (this.discountedPrice != that.discountedPrice)
1046
        return false;
1047
    }
1048
 
3555 varun.gupt 1049
    boolean this_present_discounts = true && this.isSetDiscounts();
1050
    boolean that_present_discounts = true && that.isSetDiscounts();
1051
    if (this_present_discounts || that_present_discounts) {
1052
      if (!(this_present_discounts && that_present_discounts))
1053
        return false;
1054
      if (!this.discounts.equals(that.discounts))
1055
        return false;
1056
    }
1057
 
6903 anupam.sin 1058
    boolean this_present_insurer = true;
1059
    boolean that_present_insurer = true;
1060
    if (this_present_insurer || that_present_insurer) {
1061
      if (!(this_present_insurer && that_present_insurer))
1062
        return false;
1063
      if (this.insurer != that.insurer)
1064
        return false;
1065
    }
1066
 
1067
    boolean this_present_insuranceAmount = true;
1068
    boolean that_present_insuranceAmount = true;
1069
    if (this_present_insuranceAmount || that_present_insuranceAmount) {
1070
      if (!(this_present_insuranceAmount && that_present_insuranceAmount))
1071
        return false;
1072
      if (this.insuranceAmount != that.insuranceAmount)
1073
        return false;
1074
    }
1075
 
9299 kshitij.so 1076
    boolean this_present_dataProtectionInsurer = true;
1077
    boolean that_present_dataProtectionInsurer = true;
1078
    if (this_present_dataProtectionInsurer || that_present_dataProtectionInsurer) {
1079
      if (!(this_present_dataProtectionInsurer && that_present_dataProtectionInsurer))
1080
        return false;
1081
      if (this.dataProtectionInsurer != that.dataProtectionInsurer)
1082
        return false;
1083
    }
1084
 
1085
    boolean this_present_dataProtectionAmount = true;
1086
    boolean that_present_dataProtectionAmount = true;
1087
    if (this_present_dataProtectionAmount || that_present_dataProtectionAmount) {
1088
      if (!(this_present_dataProtectionAmount && that_present_dataProtectionAmount))
1089
        return false;
1090
      if (this.dataProtectionAmount != that.dataProtectionAmount)
1091
        return false;
1092
    }
1093
 
11653 amit.gupta 1094
    boolean this_present_dealText = true && this.isSetDealText();
1095
    boolean that_present_dealText = true && that.isSetDealText();
1096
    if (this_present_dealText || that_present_dealText) {
1097
      if (!(this_present_dealText && that_present_dealText))
1098
        return false;
1099
      if (!this.dealText.equals(that.dealText))
1100
        return false;
1101
    }
1102
 
1103
    boolean this_present_freebieId = true && this.isSetFreebieId();
1104
    boolean that_present_freebieId = true && that.isSetFreebieId();
1105
    if (this_present_freebieId || that_present_freebieId) {
1106
      if (!(this_present_freebieId && that_present_freebieId))
1107
        return false;
1108
      if (!this.freebieId.equals(that.freebieId))
1109
        return false;
1110
    }
1111
 
553 chandransh 1112
    return true;
1113
  }
1114
 
1115
  @Override
1116
  public int hashCode() {
1117
    return 0;
1118
  }
1119
 
1120
  public int compareTo(Line other) {
1121
    if (!getClass().equals(other.getClass())) {
1122
      return getClass().getName().compareTo(other.getClass().getName());
1123
    }
1124
 
1125
    int lastComparison = 0;
1126
    Line typedOther = (Line)other;
1127
 
3430 rajveer 1128
    lastComparison = Boolean.valueOf(isSetCartId()).compareTo(typedOther.isSetCartId());
553 chandransh 1129
    if (lastComparison != 0) {
1130
      return lastComparison;
1131
    }
3430 rajveer 1132
    if (isSetCartId()) {
1133
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cartId, typedOther.cartId);
1134
      if (lastComparison != 0) {
1135
        return lastComparison;
1136
      }
553 chandransh 1137
    }
3430 rajveer 1138
    lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
553 chandransh 1139
    if (lastComparison != 0) {
1140
      return lastComparison;
1141
    }
3430 rajveer 1142
    if (isSetItemId()) {
1143
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
1144
      if (lastComparison != 0) {
1145
        return lastComparison;
1146
      }
553 chandransh 1147
    }
3430 rajveer 1148
    lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
553 chandransh 1149
    if (lastComparison != 0) {
1150
      return lastComparison;
1151
    }
3430 rajveer 1152
    if (isSetQuantity()) {
1153
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
1154
      if (lastComparison != 0) {
1155
        return lastComparison;
1156
      }
553 chandransh 1157
    }
3430 rajveer 1158
    lastComparison = Boolean.valueOf(isSetCreatedOn()).compareTo(typedOther.isSetCreatedOn());
553 chandransh 1159
    if (lastComparison != 0) {
1160
      return lastComparison;
1161
    }
3430 rajveer 1162
    if (isSetCreatedOn()) {
1163
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdOn, typedOther.createdOn);
1164
      if (lastComparison != 0) {
1165
        return lastComparison;
1166
      }
553 chandransh 1167
    }
3430 rajveer 1168
    lastComparison = Boolean.valueOf(isSetUpdatedOn()).compareTo(typedOther.isSetUpdatedOn());
553 chandransh 1169
    if (lastComparison != 0) {
1170
      return lastComparison;
1171
    }
3430 rajveer 1172
    if (isSetUpdatedOn()) {
1173
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedOn, typedOther.updatedOn);
1174
      if (lastComparison != 0) {
1175
        return lastComparison;
1176
      }
553 chandransh 1177
    }
3430 rajveer 1178
    lastComparison = Boolean.valueOf(isSetLineStatus()).compareTo(typedOther.isSetLineStatus());
553 chandransh 1179
    if (lastComparison != 0) {
1180
      return lastComparison;
1181
    }
3430 rajveer 1182
    if (isSetLineStatus()) {
1183
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lineStatus, typedOther.lineStatus);
1184
      if (lastComparison != 0) {
1185
        return lastComparison;
1186
      }
553 chandransh 1187
    }
3430 rajveer 1188
    lastComparison = Boolean.valueOf(isSetEstimate()).compareTo(typedOther.isSetEstimate());
614 chandransh 1189
    if (lastComparison != 0) {
1190
      return lastComparison;
1191
    }
3430 rajveer 1192
    if (isSetEstimate()) {
1193
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.estimate, typedOther.estimate);
1194
      if (lastComparison != 0) {
1195
        return lastComparison;
1196
      }
614 chandransh 1197
    }
3430 rajveer 1198
    lastComparison = Boolean.valueOf(isSetActualPrice()).compareTo(typedOther.isSetActualPrice());
1982 varun.gupt 1199
    if (lastComparison != 0) {
1200
      return lastComparison;
1201
    }
3430 rajveer 1202
    if (isSetActualPrice()) {
1203
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.actualPrice, typedOther.actualPrice);
1204
      if (lastComparison != 0) {
1205
        return lastComparison;
1206
      }
1982 varun.gupt 1207
    }
3430 rajveer 1208
    lastComparison = Boolean.valueOf(isSetDiscountedPrice()).compareTo(typedOther.isSetDiscountedPrice());
1982 varun.gupt 1209
    if (lastComparison != 0) {
1210
      return lastComparison;
1211
    }
3430 rajveer 1212
    if (isSetDiscountedPrice()) {
1213
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.discountedPrice, typedOther.discountedPrice);
1214
      if (lastComparison != 0) {
1215
        return lastComparison;
1216
      }
1982 varun.gupt 1217
    }
3555 varun.gupt 1218
    lastComparison = Boolean.valueOf(isSetDiscounts()).compareTo(typedOther.isSetDiscounts());
1219
    if (lastComparison != 0) {
1220
      return lastComparison;
1221
    }
1222
    if (isSetDiscounts()) {
1223
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.discounts, typedOther.discounts);
1224
      if (lastComparison != 0) {
1225
        return lastComparison;
1226
      }
1227
    }
6903 anupam.sin 1228
    lastComparison = Boolean.valueOf(isSetInsurer()).compareTo(typedOther.isSetInsurer());
1229
    if (lastComparison != 0) {
1230
      return lastComparison;
1231
    }
1232
    if (isSetInsurer()) {
1233
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.insurer, typedOther.insurer);
1234
      if (lastComparison != 0) {
1235
        return lastComparison;
1236
      }
1237
    }
1238
    lastComparison = Boolean.valueOf(isSetInsuranceAmount()).compareTo(typedOther.isSetInsuranceAmount());
1239
    if (lastComparison != 0) {
1240
      return lastComparison;
1241
    }
1242
    if (isSetInsuranceAmount()) {
1243
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.insuranceAmount, typedOther.insuranceAmount);
1244
      if (lastComparison != 0) {
1245
        return lastComparison;
1246
      }
1247
    }
9299 kshitij.so 1248
    lastComparison = Boolean.valueOf(isSetDataProtectionInsurer()).compareTo(typedOther.isSetDataProtectionInsurer());
1249
    if (lastComparison != 0) {
1250
      return lastComparison;
1251
    }
1252
    if (isSetDataProtectionInsurer()) {
1253
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataProtectionInsurer, typedOther.dataProtectionInsurer);
1254
      if (lastComparison != 0) {
1255
        return lastComparison;
1256
      }
1257
    }
1258
    lastComparison = Boolean.valueOf(isSetDataProtectionAmount()).compareTo(typedOther.isSetDataProtectionAmount());
1259
    if (lastComparison != 0) {
1260
      return lastComparison;
1261
    }
1262
    if (isSetDataProtectionAmount()) {
1263
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataProtectionAmount, typedOther.dataProtectionAmount);
1264
      if (lastComparison != 0) {
1265
        return lastComparison;
1266
      }
1267
    }
11653 amit.gupta 1268
    lastComparison = Boolean.valueOf(isSetDealText()).compareTo(typedOther.isSetDealText());
1269
    if (lastComparison != 0) {
1270
      return lastComparison;
1271
    }
1272
    if (isSetDealText()) {
1273
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dealText, typedOther.dealText);
1274
      if (lastComparison != 0) {
1275
        return lastComparison;
1276
      }
1277
    }
1278
    lastComparison = Boolean.valueOf(isSetFreebieId()).compareTo(typedOther.isSetFreebieId());
1279
    if (lastComparison != 0) {
1280
      return lastComparison;
1281
    }
1282
    if (isSetFreebieId()) {
1283
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freebieId, typedOther.freebieId);
1284
      if (lastComparison != 0) {
1285
        return lastComparison;
1286
      }
1287
    }
553 chandransh 1288
    return 0;
1289
  }
1290
 
3430 rajveer 1291
  public _Fields fieldForId(int fieldId) {
1292
    return _Fields.findByThriftId(fieldId);
1293
  }
1294
 
1295
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1296
    org.apache.thrift.protocol.TField field;
553 chandransh 1297
    iprot.readStructBegin();
1298
    while (true)
1299
    {
1300
      field = iprot.readFieldBegin();
3430 rajveer 1301
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
553 chandransh 1302
        break;
1303
      }
3430 rajveer 1304
      switch (field.id) {
1305
        case 1: // CART_ID
1306
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1307
            this.cartId = iprot.readI64();
1308
            setCartIdIsSet(true);
1309
          } else { 
1310
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1311
          }
1312
          break;
1313
        case 2: // ITEM_ID
1314
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1315
            this.itemId = iprot.readI64();
1316
            setItemIdIsSet(true);
1317
          } else { 
1318
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1319
          }
1320
          break;
1321
        case 3: // QUANTITY
1322
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
1323
            this.quantity = iprot.readDouble();
1324
            setQuantityIsSet(true);
1325
          } else { 
1326
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1327
          }
1328
          break;
1329
        case 4: // CREATED_ON
1330
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1331
            this.createdOn = iprot.readI64();
1332
            setCreatedOnIsSet(true);
1333
          } else { 
1334
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1335
          }
1336
          break;
1337
        case 5: // UPDATED_ON
1338
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1339
            this.updatedOn = iprot.readI64();
1340
            setUpdatedOnIsSet(true);
1341
          } else { 
1342
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1343
          }
1344
          break;
1345
        case 6: // LINE_STATUS
1346
          if (field.type == org.apache.thrift.protocol.TType.I32) {
1347
            this.lineStatus = LineStatus.findByValue(iprot.readI32());
1348
          } else { 
1349
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1350
          }
1351
          break;
1352
        case 7: // ESTIMATE
1353
          if (field.type == org.apache.thrift.protocol.TType.I32) {
1354
            this.estimate = iprot.readI32();
1355
            setEstimateIsSet(true);
1356
          } else { 
1357
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1358
          }
1359
          break;
1360
        case 8: // ACTUAL_PRICE
1361
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
1362
            this.actualPrice = iprot.readDouble();
1363
            setActualPriceIsSet(true);
1364
          } else { 
1365
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1366
          }
1367
          break;
1368
        case 9: // DISCOUNTED_PRICE
1369
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
1370
            this.discountedPrice = iprot.readDouble();
1371
            setDiscountedPriceIsSet(true);
1372
          } else { 
1373
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1374
          }
1375
          break;
3555 varun.gupt 1376
        case 10: // DISCOUNTS
1377
          if (field.type == org.apache.thrift.protocol.TType.LIST) {
1378
            {
5327 rajveer 1379
              org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
1380
              this.discounts = new ArrayList<Discount>(_list4.size);
1381
              for (int _i5 = 0; _i5 < _list4.size; ++_i5)
3555 varun.gupt 1382
              {
5327 rajveer 1383
                Discount _elem6; // required
1384
                _elem6 = new Discount();
1385
                _elem6.read(iprot);
1386
                this.discounts.add(_elem6);
3555 varun.gupt 1387
              }
1388
              iprot.readListEnd();
1389
            }
1390
          } else { 
1391
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1392
          }
1393
          break;
6903 anupam.sin 1394
        case 11: // INSURER
1395
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1396
            this.insurer = iprot.readI64();
1397
            setInsurerIsSet(true);
1398
          } else { 
1399
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1400
          }
1401
          break;
1402
        case 12: // INSURANCE_AMOUNT
1403
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
1404
            this.insuranceAmount = iprot.readDouble();
1405
            setInsuranceAmountIsSet(true);
1406
          } else { 
1407
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1408
          }
1409
          break;
9299 kshitij.so 1410
        case 13: // DATA_PROTECTION_INSURER
1411
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1412
            this.dataProtectionInsurer = iprot.readI64();
1413
            setDataProtectionInsurerIsSet(true);
1414
          } else { 
1415
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1416
          }
1417
          break;
1418
        case 14: // DATA_PROTECTION_AMOUNT
1419
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
1420
            this.dataProtectionAmount = iprot.readDouble();
1421
            setDataProtectionAmountIsSet(true);
1422
          } else { 
1423
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1424
          }
1425
          break;
11653 amit.gupta 1426
        case 15: // DEAL_TEXT
1427
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1428
            this.dealText = iprot.readString();
1429
          } else { 
1430
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1431
          }
1432
          break;
1433
        case 16: // FREEBIE_ID
1434
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1435
            this.freebieId = iprot.readString();
1436
          } else { 
1437
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1438
          }
1439
          break;
3430 rajveer 1440
        default:
1441
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
553 chandransh 1442
      }
3430 rajveer 1443
      iprot.readFieldEnd();
553 chandransh 1444
    }
1445
    iprot.readStructEnd();
1446
    validate();
1447
  }
1448
 
3430 rajveer 1449
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
553 chandransh 1450
    validate();
1451
 
1452
    oprot.writeStructBegin(STRUCT_DESC);
648 chandransh 1453
    oprot.writeFieldBegin(CART_ID_FIELD_DESC);
1454
    oprot.writeI64(this.cartId);
553 chandransh 1455
    oprot.writeFieldEnd();
1456
    oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
1457
    oprot.writeI64(this.itemId);
1458
    oprot.writeFieldEnd();
1459
    oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
1460
    oprot.writeDouble(this.quantity);
1461
    oprot.writeFieldEnd();
1462
    oprot.writeFieldBegin(CREATED_ON_FIELD_DESC);
1463
    oprot.writeI64(this.createdOn);
1464
    oprot.writeFieldEnd();
1465
    oprot.writeFieldBegin(UPDATED_ON_FIELD_DESC);
1466
    oprot.writeI64(this.updatedOn);
1467
    oprot.writeFieldEnd();
1468
    if (this.lineStatus != null) {
1469
      oprot.writeFieldBegin(LINE_STATUS_FIELD_DESC);
1470
      oprot.writeI32(this.lineStatus.getValue());
1471
      oprot.writeFieldEnd();
1472
    }
614 chandransh 1473
    oprot.writeFieldBegin(ESTIMATE_FIELD_DESC);
1474
    oprot.writeI32(this.estimate);
1475
    oprot.writeFieldEnd();
1982 varun.gupt 1476
    oprot.writeFieldBegin(ACTUAL_PRICE_FIELD_DESC);
1477
    oprot.writeDouble(this.actualPrice);
1478
    oprot.writeFieldEnd();
1479
    oprot.writeFieldBegin(DISCOUNTED_PRICE_FIELD_DESC);
1480
    oprot.writeDouble(this.discountedPrice);
1481
    oprot.writeFieldEnd();
3555 varun.gupt 1482
    if (this.discounts != null) {
1483
      oprot.writeFieldBegin(DISCOUNTS_FIELD_DESC);
1484
      {
1485
        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.discounts.size()));
5327 rajveer 1486
        for (Discount _iter7 : this.discounts)
3555 varun.gupt 1487
        {
5327 rajveer 1488
          _iter7.write(oprot);
3555 varun.gupt 1489
        }
1490
        oprot.writeListEnd();
1491
      }
1492
      oprot.writeFieldEnd();
1493
    }
6903 anupam.sin 1494
    oprot.writeFieldBegin(INSURER_FIELD_DESC);
1495
    oprot.writeI64(this.insurer);
1496
    oprot.writeFieldEnd();
1497
    oprot.writeFieldBegin(INSURANCE_AMOUNT_FIELD_DESC);
1498
    oprot.writeDouble(this.insuranceAmount);
1499
    oprot.writeFieldEnd();
9299 kshitij.so 1500
    oprot.writeFieldBegin(DATA_PROTECTION_INSURER_FIELD_DESC);
1501
    oprot.writeI64(this.dataProtectionInsurer);
1502
    oprot.writeFieldEnd();
1503
    oprot.writeFieldBegin(DATA_PROTECTION_AMOUNT_FIELD_DESC);
1504
    oprot.writeDouble(this.dataProtectionAmount);
1505
    oprot.writeFieldEnd();
11653 amit.gupta 1506
    if (this.dealText != null) {
1507
      oprot.writeFieldBegin(DEAL_TEXT_FIELD_DESC);
1508
      oprot.writeString(this.dealText);
1509
      oprot.writeFieldEnd();
1510
    }
1511
    if (this.freebieId != null) {
1512
      oprot.writeFieldBegin(FREEBIE_ID_FIELD_DESC);
1513
      oprot.writeString(this.freebieId);
1514
      oprot.writeFieldEnd();
1515
    }
553 chandransh 1516
    oprot.writeFieldStop();
1517
    oprot.writeStructEnd();
1518
  }
1519
 
1520
  @Override
1521
  public String toString() {
1522
    StringBuilder sb = new StringBuilder("Line(");
1523
    boolean first = true;
1524
 
648 chandransh 1525
    sb.append("cartId:");
1526
    sb.append(this.cartId);
553 chandransh 1527
    first = false;
1528
    if (!first) sb.append(", ");
1529
    sb.append("itemId:");
1530
    sb.append(this.itemId);
1531
    first = false;
1532
    if (!first) sb.append(", ");
1533
    sb.append("quantity:");
1534
    sb.append(this.quantity);
1535
    first = false;
1536
    if (!first) sb.append(", ");
1537
    sb.append("createdOn:");
1538
    sb.append(this.createdOn);
1539
    first = false;
1540
    if (!first) sb.append(", ");
1541
    sb.append("updatedOn:");
1542
    sb.append(this.updatedOn);
1543
    first = false;
1544
    if (!first) sb.append(", ");
1545
    sb.append("lineStatus:");
1546
    if (this.lineStatus == null) {
1547
      sb.append("null");
1548
    } else {
1549
      sb.append(this.lineStatus);
1550
    }
1551
    first = false;
614 chandransh 1552
    if (!first) sb.append(", ");
1553
    sb.append("estimate:");
1554
    sb.append(this.estimate);
1555
    first = false;
1982 varun.gupt 1556
    if (!first) sb.append(", ");
1557
    sb.append("actualPrice:");
1558
    sb.append(this.actualPrice);
1559
    first = false;
1560
    if (!first) sb.append(", ");
1561
    sb.append("discountedPrice:");
1562
    sb.append(this.discountedPrice);
1563
    first = false;
3555 varun.gupt 1564
    if (!first) sb.append(", ");
1565
    sb.append("discounts:");
1566
    if (this.discounts == null) {
1567
      sb.append("null");
1568
    } else {
1569
      sb.append(this.discounts);
1570
    }
1571
    first = false;
6903 anupam.sin 1572
    if (!first) sb.append(", ");
1573
    sb.append("insurer:");
1574
    sb.append(this.insurer);
1575
    first = false;
1576
    if (!first) sb.append(", ");
1577
    sb.append("insuranceAmount:");
1578
    sb.append(this.insuranceAmount);
1579
    first = false;
9299 kshitij.so 1580
    if (!first) sb.append(", ");
1581
    sb.append("dataProtectionInsurer:");
1582
    sb.append(this.dataProtectionInsurer);
1583
    first = false;
1584
    if (!first) sb.append(", ");
1585
    sb.append("dataProtectionAmount:");
1586
    sb.append(this.dataProtectionAmount);
1587
    first = false;
11653 amit.gupta 1588
    if (!first) sb.append(", ");
1589
    sb.append("dealText:");
1590
    if (this.dealText == null) {
1591
      sb.append("null");
1592
    } else {
1593
      sb.append(this.dealText);
1594
    }
1595
    first = false;
1596
    if (!first) sb.append(", ");
1597
    sb.append("freebieId:");
1598
    if (this.freebieId == null) {
1599
      sb.append("null");
1600
    } else {
1601
      sb.append(this.freebieId);
1602
    }
1603
    first = false;
553 chandransh 1604
    sb.append(")");
1605
    return sb.toString();
1606
  }
1607
 
3430 rajveer 1608
  public void validate() throws org.apache.thrift.TException {
553 chandransh 1609
    // check for required fields
1610
  }
1611
 
3430 rajveer 1612
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1613
    try {
1614
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1615
    } catch (org.apache.thrift.TException te) {
1616
      throw new java.io.IOException(te);
1617
    }
1618
  }
1619
 
1620
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1621
    try {
1622
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
1623
      __isset_bit_vector = new BitSet(1);
1624
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1625
    } catch (org.apache.thrift.TException te) {
1626
      throw new java.io.IOException(te);
1627
    }
1628
  }
1629
 
553 chandransh 1630
}
1631