Subversion Repositories SmartDukaan

Rev

Rev 6821 | Rev 6880 | 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);
6821 amar.kumar 40
  private static final org.apache.thrift.protocol.TField AVAILABLE_QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("availableQuantity", org.apache.thrift.protocol.TType.I64, (short)15);
41
  private static final org.apache.thrift.protocol.TField RESERVED_QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("reservedQuantity", org.apache.thrift.protocol.TType.I64, (short)16);
42
  private static final org.apache.thrift.protocol.TField AVG_SALES_FIELD_DESC = new org.apache.thrift.protocol.TField("avgSales", org.apache.thrift.protocol.TType.DOUBLE, (short)17);
43
  private static final org.apache.thrift.protocol.TField MIN_STOCK_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("minStockLevel", org.apache.thrift.protocol.TType.I64, (short)18);
44
  private static final org.apache.thrift.protocol.TField NUMBER_OF_DAYS_STOCK_FIELD_DESC = new org.apache.thrift.protocol.TField("numberOfDaysStock", org.apache.thrift.protocol.TType.I64, (short)19);
45
  private static final org.apache.thrift.protocol.TField SUGGESTED_QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("suggestedQuantity", org.apache.thrift.protocol.TType.I64, (short)20);
46
  private static final org.apache.thrift.protocol.TField NUMBER_OF_DAYS_IN_STOCK_FIELD_DESC = new org.apache.thrift.protocol.TField("numberOfDaysInStock", org.apache.thrift.protocol.TType.I64, (short)21);
6857 amar.kumar 47
  private static final org.apache.thrift.protocol.TField LAST_XDAYS_SALE_FIELD_DESC = new org.apache.thrift.protocol.TField("lastXdaysSale", org.apache.thrift.protocol.TType.STRING, (short)22);
4496 mandeep.dh 48
 
49
  private long orderId; // required
50
  private long itemId; // required
51
  private String productGroup; // required
52
  private String brand; // required
53
  private String modelNumber; // required
54
  private String modelName; // required
55
  private String color; // required
56
  private String itemNumber; // required
57
  private double quantity; // required
58
  private double unfulfilledQuantity; // required
59
  private long createdAt; // required
60
  private double unitPrice; // required
61
  private boolean fulfilled; // required
4754 mandeep.dh 62
  private long codCount; // required
6821 amar.kumar 63
  private long availableQuantity; // required
64
  private long reservedQuantity; // required
65
  private double avgSales; // required
66
  private long minStockLevel; // required
67
  private long numberOfDaysStock; // required
68
  private long suggestedQuantity; // required
69
  private long numberOfDaysInStock; // required
6857 amar.kumar 70
  private String lastXdaysSale; // required
4496 mandeep.dh 71
 
72
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
73
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
74
    ORDER_ID((short)1, "orderId"),
75
    ITEM_ID((short)2, "itemId"),
76
    PRODUCT_GROUP((short)3, "productGroup"),
77
    BRAND((short)4, "brand"),
78
    MODEL_NUMBER((short)5, "modelNumber"),
79
    MODEL_NAME((short)6, "modelName"),
80
    COLOR((short)7, "color"),
81
    ITEM_NUMBER((short)8, "itemNumber"),
82
    QUANTITY((short)9, "quantity"),
83
    UNFULFILLED_QUANTITY((short)10, "unfulfilledQuantity"),
84
    CREATED_AT((short)11, "createdAt"),
85
    UNIT_PRICE((short)12, "unitPrice"),
4754 mandeep.dh 86
    FULFILLED((short)13, "fulfilled"),
6821 amar.kumar 87
    COD_COUNT((short)14, "codCount"),
88
    AVAILABLE_QUANTITY((short)15, "availableQuantity"),
89
    RESERVED_QUANTITY((short)16, "reservedQuantity"),
90
    AVG_SALES((short)17, "avgSales"),
91
    MIN_STOCK_LEVEL((short)18, "minStockLevel"),
92
    NUMBER_OF_DAYS_STOCK((short)19, "numberOfDaysStock"),
93
    SUGGESTED_QUANTITY((short)20, "suggestedQuantity"),
6857 amar.kumar 94
    NUMBER_OF_DAYS_IN_STOCK((short)21, "numberOfDaysInStock"),
95
    LAST_XDAYS_SALE((short)22, "lastXdaysSale");
4496 mandeep.dh 96
 
97
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
98
 
99
    static {
100
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
101
        byName.put(field.getFieldName(), field);
102
      }
103
    }
104
 
105
    /**
106
     * Find the _Fields constant that matches fieldId, or null if its not found.
107
     */
108
    public static _Fields findByThriftId(int fieldId) {
109
      switch(fieldId) {
110
        case 1: // ORDER_ID
111
          return ORDER_ID;
112
        case 2: // ITEM_ID
113
          return ITEM_ID;
114
        case 3: // PRODUCT_GROUP
115
          return PRODUCT_GROUP;
116
        case 4: // BRAND
117
          return BRAND;
118
        case 5: // MODEL_NUMBER
119
          return MODEL_NUMBER;
120
        case 6: // MODEL_NAME
121
          return MODEL_NAME;
122
        case 7: // COLOR
123
          return COLOR;
124
        case 8: // ITEM_NUMBER
125
          return ITEM_NUMBER;
126
        case 9: // QUANTITY
127
          return QUANTITY;
128
        case 10: // UNFULFILLED_QUANTITY
129
          return UNFULFILLED_QUANTITY;
130
        case 11: // CREATED_AT
131
          return CREATED_AT;
132
        case 12: // UNIT_PRICE
133
          return UNIT_PRICE;
134
        case 13: // FULFILLED
135
          return FULFILLED;
4754 mandeep.dh 136
        case 14: // COD_COUNT
137
          return COD_COUNT;
6821 amar.kumar 138
        case 15: // AVAILABLE_QUANTITY
139
          return AVAILABLE_QUANTITY;
140
        case 16: // RESERVED_QUANTITY
141
          return RESERVED_QUANTITY;
142
        case 17: // AVG_SALES
143
          return AVG_SALES;
144
        case 18: // MIN_STOCK_LEVEL
145
          return MIN_STOCK_LEVEL;
146
        case 19: // NUMBER_OF_DAYS_STOCK
147
          return NUMBER_OF_DAYS_STOCK;
148
        case 20: // SUGGESTED_QUANTITY
149
          return SUGGESTED_QUANTITY;
150
        case 21: // NUMBER_OF_DAYS_IN_STOCK
151
          return NUMBER_OF_DAYS_IN_STOCK;
6857 amar.kumar 152
        case 22: // LAST_XDAYS_SALE
153
          return LAST_XDAYS_SALE;
4496 mandeep.dh 154
        default:
155
          return null;
156
      }
157
    }
158
 
159
    /**
160
     * Find the _Fields constant that matches fieldId, throwing an exception
161
     * if it is not found.
162
     */
163
    public static _Fields findByThriftIdOrThrow(int fieldId) {
164
      _Fields fields = findByThriftId(fieldId);
165
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
166
      return fields;
167
    }
168
 
169
    /**
170
     * Find the _Fields constant that matches name, or null if its not found.
171
     */
172
    public static _Fields findByName(String name) {
173
      return byName.get(name);
174
    }
175
 
176
    private final short _thriftId;
177
    private final String _fieldName;
178
 
179
    _Fields(short thriftId, String fieldName) {
180
      _thriftId = thriftId;
181
      _fieldName = fieldName;
182
    }
183
 
184
    public short getThriftFieldId() {
185
      return _thriftId;
186
    }
187
 
188
    public String getFieldName() {
189
      return _fieldName;
190
    }
191
  }
192
 
193
  // isset id assignments
194
  private static final int __ORDERID_ISSET_ID = 0;
195
  private static final int __ITEMID_ISSET_ID = 1;
196
  private static final int __QUANTITY_ISSET_ID = 2;
197
  private static final int __UNFULFILLEDQUANTITY_ISSET_ID = 3;
198
  private static final int __CREATEDAT_ISSET_ID = 4;
199
  private static final int __UNITPRICE_ISSET_ID = 5;
200
  private static final int __FULFILLED_ISSET_ID = 6;
4754 mandeep.dh 201
  private static final int __CODCOUNT_ISSET_ID = 7;
6821 amar.kumar 202
  private static final int __AVAILABLEQUANTITY_ISSET_ID = 8;
203
  private static final int __RESERVEDQUANTITY_ISSET_ID = 9;
204
  private static final int __AVGSALES_ISSET_ID = 10;
205
  private static final int __MINSTOCKLEVEL_ISSET_ID = 11;
206
  private static final int __NUMBEROFDAYSSTOCK_ISSET_ID = 12;
207
  private static final int __SUGGESTEDQUANTITY_ISSET_ID = 13;
208
  private static final int __NUMBEROFDAYSINSTOCK_ISSET_ID = 14;
209
  private BitSet __isset_bit_vector = new BitSet(15);
4496 mandeep.dh 210
 
211
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
212
  static {
213
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
214
    tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
215
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
216
    tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
217
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
218
    tmpMap.put(_Fields.PRODUCT_GROUP, new org.apache.thrift.meta_data.FieldMetaData("productGroup", org.apache.thrift.TFieldRequirementType.DEFAULT, 
219
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
220
    tmpMap.put(_Fields.BRAND, new org.apache.thrift.meta_data.FieldMetaData("brand", org.apache.thrift.TFieldRequirementType.DEFAULT, 
221
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
222
    tmpMap.put(_Fields.MODEL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("modelNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
223
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
224
    tmpMap.put(_Fields.MODEL_NAME, new org.apache.thrift.meta_data.FieldMetaData("modelName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
225
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
226
    tmpMap.put(_Fields.COLOR, new org.apache.thrift.meta_data.FieldMetaData("color", org.apache.thrift.TFieldRequirementType.DEFAULT, 
227
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
228
    tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
229
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
230
    tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
231
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
232
    tmpMap.put(_Fields.UNFULFILLED_QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("unfulfilledQuantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
233
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
234
    tmpMap.put(_Fields.CREATED_AT, new org.apache.thrift.meta_data.FieldMetaData("createdAt", org.apache.thrift.TFieldRequirementType.DEFAULT, 
235
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
236
    tmpMap.put(_Fields.UNIT_PRICE, new org.apache.thrift.meta_data.FieldMetaData("unitPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
237
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
238
    tmpMap.put(_Fields.FULFILLED, new org.apache.thrift.meta_data.FieldMetaData("fulfilled", org.apache.thrift.TFieldRequirementType.DEFAULT, 
239
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
4754 mandeep.dh 240
    tmpMap.put(_Fields.COD_COUNT, new org.apache.thrift.meta_data.FieldMetaData("codCount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
241
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6821 amar.kumar 242
    tmpMap.put(_Fields.AVAILABLE_QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("availableQuantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
243
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
244
    tmpMap.put(_Fields.RESERVED_QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("reservedQuantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
245
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
246
    tmpMap.put(_Fields.AVG_SALES, new org.apache.thrift.meta_data.FieldMetaData("avgSales", org.apache.thrift.TFieldRequirementType.DEFAULT, 
247
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
248
    tmpMap.put(_Fields.MIN_STOCK_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("minStockLevel", org.apache.thrift.TFieldRequirementType.DEFAULT, 
249
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
250
    tmpMap.put(_Fields.NUMBER_OF_DAYS_STOCK, new org.apache.thrift.meta_data.FieldMetaData("numberOfDaysStock", org.apache.thrift.TFieldRequirementType.DEFAULT, 
251
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
252
    tmpMap.put(_Fields.SUGGESTED_QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("suggestedQuantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
253
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
254
    tmpMap.put(_Fields.NUMBER_OF_DAYS_IN_STOCK, new org.apache.thrift.meta_data.FieldMetaData("numberOfDaysInStock", org.apache.thrift.TFieldRequirementType.DEFAULT, 
255
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6857 amar.kumar 256
    tmpMap.put(_Fields.LAST_XDAYS_SALE, new org.apache.thrift.meta_data.FieldMetaData("lastXdaysSale", org.apache.thrift.TFieldRequirementType.DEFAULT, 
257
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
4496 mandeep.dh 258
    metaDataMap = Collections.unmodifiableMap(tmpMap);
259
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LineItem.class, metaDataMap);
260
  }
261
 
262
  public LineItem() {
263
  }
264
 
265
  public LineItem(
266
    long orderId,
267
    long itemId,
268
    String productGroup,
269
    String brand,
270
    String modelNumber,
271
    String modelName,
272
    String color,
273
    String itemNumber,
274
    double quantity,
275
    double unfulfilledQuantity,
276
    long createdAt,
277
    double unitPrice,
4754 mandeep.dh 278
    boolean fulfilled,
6821 amar.kumar 279
    long codCount,
280
    long availableQuantity,
281
    long reservedQuantity,
282
    double avgSales,
283
    long minStockLevel,
284
    long numberOfDaysStock,
285
    long suggestedQuantity,
6857 amar.kumar 286
    long numberOfDaysInStock,
287
    String lastXdaysSale)
4496 mandeep.dh 288
  {
289
    this();
290
    this.orderId = orderId;
291
    setOrderIdIsSet(true);
292
    this.itemId = itemId;
293
    setItemIdIsSet(true);
294
    this.productGroup = productGroup;
295
    this.brand = brand;
296
    this.modelNumber = modelNumber;
297
    this.modelName = modelName;
298
    this.color = color;
299
    this.itemNumber = itemNumber;
300
    this.quantity = quantity;
301
    setQuantityIsSet(true);
302
    this.unfulfilledQuantity = unfulfilledQuantity;
303
    setUnfulfilledQuantityIsSet(true);
304
    this.createdAt = createdAt;
305
    setCreatedAtIsSet(true);
306
    this.unitPrice = unitPrice;
307
    setUnitPriceIsSet(true);
308
    this.fulfilled = fulfilled;
309
    setFulfilledIsSet(true);
4754 mandeep.dh 310
    this.codCount = codCount;
311
    setCodCountIsSet(true);
6821 amar.kumar 312
    this.availableQuantity = availableQuantity;
313
    setAvailableQuantityIsSet(true);
314
    this.reservedQuantity = reservedQuantity;
315
    setReservedQuantityIsSet(true);
316
    this.avgSales = avgSales;
317
    setAvgSalesIsSet(true);
318
    this.minStockLevel = minStockLevel;
319
    setMinStockLevelIsSet(true);
320
    this.numberOfDaysStock = numberOfDaysStock;
321
    setNumberOfDaysStockIsSet(true);
322
    this.suggestedQuantity = suggestedQuantity;
323
    setSuggestedQuantityIsSet(true);
324
    this.numberOfDaysInStock = numberOfDaysInStock;
325
    setNumberOfDaysInStockIsSet(true);
6857 amar.kumar 326
    this.lastXdaysSale = lastXdaysSale;
4496 mandeep.dh 327
  }
328
 
329
  /**
330
   * Performs a deep copy on <i>other</i>.
331
   */
332
  public LineItem(LineItem other) {
333
    __isset_bit_vector.clear();
334
    __isset_bit_vector.or(other.__isset_bit_vector);
335
    this.orderId = other.orderId;
336
    this.itemId = other.itemId;
337
    if (other.isSetProductGroup()) {
338
      this.productGroup = other.productGroup;
339
    }
340
    if (other.isSetBrand()) {
341
      this.brand = other.brand;
342
    }
343
    if (other.isSetModelNumber()) {
344
      this.modelNumber = other.modelNumber;
345
    }
346
    if (other.isSetModelName()) {
347
      this.modelName = other.modelName;
348
    }
349
    if (other.isSetColor()) {
350
      this.color = other.color;
351
    }
352
    if (other.isSetItemNumber()) {
353
      this.itemNumber = other.itemNumber;
354
    }
355
    this.quantity = other.quantity;
356
    this.unfulfilledQuantity = other.unfulfilledQuantity;
357
    this.createdAt = other.createdAt;
358
    this.unitPrice = other.unitPrice;
359
    this.fulfilled = other.fulfilled;
4754 mandeep.dh 360
    this.codCount = other.codCount;
6821 amar.kumar 361
    this.availableQuantity = other.availableQuantity;
362
    this.reservedQuantity = other.reservedQuantity;
363
    this.avgSales = other.avgSales;
364
    this.minStockLevel = other.minStockLevel;
365
    this.numberOfDaysStock = other.numberOfDaysStock;
366
    this.suggestedQuantity = other.suggestedQuantity;
367
    this.numberOfDaysInStock = other.numberOfDaysInStock;
6857 amar.kumar 368
    if (other.isSetLastXdaysSale()) {
369
      this.lastXdaysSale = other.lastXdaysSale;
370
    }
4496 mandeep.dh 371
  }
372
 
373
  public LineItem deepCopy() {
374
    return new LineItem(this);
375
  }
376
 
377
  @Override
378
  public void clear() {
379
    setOrderIdIsSet(false);
380
    this.orderId = 0;
381
    setItemIdIsSet(false);
382
    this.itemId = 0;
383
    this.productGroup = null;
384
    this.brand = null;
385
    this.modelNumber = null;
386
    this.modelName = null;
387
    this.color = null;
388
    this.itemNumber = null;
389
    setQuantityIsSet(false);
390
    this.quantity = 0.0;
391
    setUnfulfilledQuantityIsSet(false);
392
    this.unfulfilledQuantity = 0.0;
393
    setCreatedAtIsSet(false);
394
    this.createdAt = 0;
395
    setUnitPriceIsSet(false);
396
    this.unitPrice = 0.0;
397
    setFulfilledIsSet(false);
398
    this.fulfilled = false;
4754 mandeep.dh 399
    setCodCountIsSet(false);
400
    this.codCount = 0;
6821 amar.kumar 401
    setAvailableQuantityIsSet(false);
402
    this.availableQuantity = 0;
403
    setReservedQuantityIsSet(false);
404
    this.reservedQuantity = 0;
405
    setAvgSalesIsSet(false);
406
    this.avgSales = 0.0;
407
    setMinStockLevelIsSet(false);
408
    this.minStockLevel = 0;
409
    setNumberOfDaysStockIsSet(false);
410
    this.numberOfDaysStock = 0;
411
    setSuggestedQuantityIsSet(false);
412
    this.suggestedQuantity = 0;
413
    setNumberOfDaysInStockIsSet(false);
414
    this.numberOfDaysInStock = 0;
6857 amar.kumar 415
    this.lastXdaysSale = null;
4496 mandeep.dh 416
  }
417
 
418
  public long getOrderId() {
419
    return this.orderId;
420
  }
421
 
422
  public void setOrderId(long orderId) {
423
    this.orderId = orderId;
424
    setOrderIdIsSet(true);
425
  }
426
 
427
  public void unsetOrderId() {
428
    __isset_bit_vector.clear(__ORDERID_ISSET_ID);
429
  }
430
 
431
  /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
432
  public boolean isSetOrderId() {
433
    return __isset_bit_vector.get(__ORDERID_ISSET_ID);
434
  }
435
 
436
  public void setOrderIdIsSet(boolean value) {
437
    __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
438
  }
439
 
440
  public long getItemId() {
441
    return this.itemId;
442
  }
443
 
444
  public void setItemId(long itemId) {
445
    this.itemId = itemId;
446
    setItemIdIsSet(true);
447
  }
448
 
449
  public void unsetItemId() {
450
    __isset_bit_vector.clear(__ITEMID_ISSET_ID);
451
  }
452
 
453
  /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
454
  public boolean isSetItemId() {
455
    return __isset_bit_vector.get(__ITEMID_ISSET_ID);
456
  }
457
 
458
  public void setItemIdIsSet(boolean value) {
459
    __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
460
  }
461
 
462
  public String getProductGroup() {
463
    return this.productGroup;
464
  }
465
 
466
  public void setProductGroup(String productGroup) {
467
    this.productGroup = productGroup;
468
  }
469
 
470
  public void unsetProductGroup() {
471
    this.productGroup = null;
472
  }
473
 
474
  /** Returns true if field productGroup is set (has been assigned a value) and false otherwise */
475
  public boolean isSetProductGroup() {
476
    return this.productGroup != null;
477
  }
478
 
479
  public void setProductGroupIsSet(boolean value) {
480
    if (!value) {
481
      this.productGroup = null;
482
    }
483
  }
484
 
485
  public String getBrand() {
486
    return this.brand;
487
  }
488
 
489
  public void setBrand(String brand) {
490
    this.brand = brand;
491
  }
492
 
493
  public void unsetBrand() {
494
    this.brand = null;
495
  }
496
 
497
  /** Returns true if field brand is set (has been assigned a value) and false otherwise */
498
  public boolean isSetBrand() {
499
    return this.brand != null;
500
  }
501
 
502
  public void setBrandIsSet(boolean value) {
503
    if (!value) {
504
      this.brand = null;
505
    }
506
  }
507
 
508
  public String getModelNumber() {
509
    return this.modelNumber;
510
  }
511
 
512
  public void setModelNumber(String modelNumber) {
513
    this.modelNumber = modelNumber;
514
  }
515
 
516
  public void unsetModelNumber() {
517
    this.modelNumber = null;
518
  }
519
 
520
  /** Returns true if field modelNumber is set (has been assigned a value) and false otherwise */
521
  public boolean isSetModelNumber() {
522
    return this.modelNumber != null;
523
  }
524
 
525
  public void setModelNumberIsSet(boolean value) {
526
    if (!value) {
527
      this.modelNumber = null;
528
    }
529
  }
530
 
531
  public String getModelName() {
532
    return this.modelName;
533
  }
534
 
535
  public void setModelName(String modelName) {
536
    this.modelName = modelName;
537
  }
538
 
539
  public void unsetModelName() {
540
    this.modelName = null;
541
  }
542
 
543
  /** Returns true if field modelName is set (has been assigned a value) and false otherwise */
544
  public boolean isSetModelName() {
545
    return this.modelName != null;
546
  }
547
 
548
  public void setModelNameIsSet(boolean value) {
549
    if (!value) {
550
      this.modelName = null;
551
    }
552
  }
553
 
554
  public String getColor() {
555
    return this.color;
556
  }
557
 
558
  public void setColor(String color) {
559
    this.color = color;
560
  }
561
 
562
  public void unsetColor() {
563
    this.color = null;
564
  }
565
 
566
  /** Returns true if field color is set (has been assigned a value) and false otherwise */
567
  public boolean isSetColor() {
568
    return this.color != null;
569
  }
570
 
571
  public void setColorIsSet(boolean value) {
572
    if (!value) {
573
      this.color = null;
574
    }
575
  }
576
 
577
  public String getItemNumber() {
578
    return this.itemNumber;
579
  }
580
 
581
  public void setItemNumber(String itemNumber) {
582
    this.itemNumber = itemNumber;
583
  }
584
 
585
  public void unsetItemNumber() {
586
    this.itemNumber = null;
587
  }
588
 
589
  /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
590
  public boolean isSetItemNumber() {
591
    return this.itemNumber != null;
592
  }
593
 
594
  public void setItemNumberIsSet(boolean value) {
595
    if (!value) {
596
      this.itemNumber = null;
597
    }
598
  }
599
 
600
  public double getQuantity() {
601
    return this.quantity;
602
  }
603
 
604
  public void setQuantity(double quantity) {
605
    this.quantity = quantity;
606
    setQuantityIsSet(true);
607
  }
608
 
609
  public void unsetQuantity() {
610
    __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
611
  }
612
 
613
  /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
614
  public boolean isSetQuantity() {
615
    return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
616
  }
617
 
618
  public void setQuantityIsSet(boolean value) {
619
    __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
620
  }
621
 
622
  public double getUnfulfilledQuantity() {
623
    return this.unfulfilledQuantity;
624
  }
625
 
626
  public void setUnfulfilledQuantity(double unfulfilledQuantity) {
627
    this.unfulfilledQuantity = unfulfilledQuantity;
628
    setUnfulfilledQuantityIsSet(true);
629
  }
630
 
631
  public void unsetUnfulfilledQuantity() {
632
    __isset_bit_vector.clear(__UNFULFILLEDQUANTITY_ISSET_ID);
633
  }
634
 
635
  /** Returns true if field unfulfilledQuantity is set (has been assigned a value) and false otherwise */
636
  public boolean isSetUnfulfilledQuantity() {
637
    return __isset_bit_vector.get(__UNFULFILLEDQUANTITY_ISSET_ID);
638
  }
639
 
640
  public void setUnfulfilledQuantityIsSet(boolean value) {
641
    __isset_bit_vector.set(__UNFULFILLEDQUANTITY_ISSET_ID, value);
642
  }
643
 
644
  public long getCreatedAt() {
645
    return this.createdAt;
646
  }
647
 
648
  public void setCreatedAt(long createdAt) {
649
    this.createdAt = createdAt;
650
    setCreatedAtIsSet(true);
651
  }
652
 
653
  public void unsetCreatedAt() {
654
    __isset_bit_vector.clear(__CREATEDAT_ISSET_ID);
655
  }
656
 
657
  /** Returns true if field createdAt is set (has been assigned a value) and false otherwise */
658
  public boolean isSetCreatedAt() {
659
    return __isset_bit_vector.get(__CREATEDAT_ISSET_ID);
660
  }
661
 
662
  public void setCreatedAtIsSet(boolean value) {
663
    __isset_bit_vector.set(__CREATEDAT_ISSET_ID, value);
664
  }
665
 
666
  public double getUnitPrice() {
667
    return this.unitPrice;
668
  }
669
 
670
  public void setUnitPrice(double unitPrice) {
671
    this.unitPrice = unitPrice;
672
    setUnitPriceIsSet(true);
673
  }
674
 
675
  public void unsetUnitPrice() {
676
    __isset_bit_vector.clear(__UNITPRICE_ISSET_ID);
677
  }
678
 
679
  /** Returns true if field unitPrice is set (has been assigned a value) and false otherwise */
680
  public boolean isSetUnitPrice() {
681
    return __isset_bit_vector.get(__UNITPRICE_ISSET_ID);
682
  }
683
 
684
  public void setUnitPriceIsSet(boolean value) {
685
    __isset_bit_vector.set(__UNITPRICE_ISSET_ID, value);
686
  }
687
 
688
  public boolean isFulfilled() {
689
    return this.fulfilled;
690
  }
691
 
692
  public void setFulfilled(boolean fulfilled) {
693
    this.fulfilled = fulfilled;
694
    setFulfilledIsSet(true);
695
  }
696
 
697
  public void unsetFulfilled() {
698
    __isset_bit_vector.clear(__FULFILLED_ISSET_ID);
699
  }
700
 
701
  /** Returns true if field fulfilled is set (has been assigned a value) and false otherwise */
702
  public boolean isSetFulfilled() {
703
    return __isset_bit_vector.get(__FULFILLED_ISSET_ID);
704
  }
705
 
706
  public void setFulfilledIsSet(boolean value) {
707
    __isset_bit_vector.set(__FULFILLED_ISSET_ID, value);
708
  }
709
 
4754 mandeep.dh 710
  public long getCodCount() {
711
    return this.codCount;
712
  }
713
 
714
  public void setCodCount(long codCount) {
715
    this.codCount = codCount;
716
    setCodCountIsSet(true);
717
  }
718
 
719
  public void unsetCodCount() {
720
    __isset_bit_vector.clear(__CODCOUNT_ISSET_ID);
721
  }
722
 
723
  /** Returns true if field codCount is set (has been assigned a value) and false otherwise */
724
  public boolean isSetCodCount() {
725
    return __isset_bit_vector.get(__CODCOUNT_ISSET_ID);
726
  }
727
 
728
  public void setCodCountIsSet(boolean value) {
729
    __isset_bit_vector.set(__CODCOUNT_ISSET_ID, value);
730
  }
731
 
6821 amar.kumar 732
  public long getAvailableQuantity() {
733
    return this.availableQuantity;
734
  }
735
 
736
  public void setAvailableQuantity(long availableQuantity) {
737
    this.availableQuantity = availableQuantity;
738
    setAvailableQuantityIsSet(true);
739
  }
740
 
741
  public void unsetAvailableQuantity() {
742
    __isset_bit_vector.clear(__AVAILABLEQUANTITY_ISSET_ID);
743
  }
744
 
745
  /** Returns true if field availableQuantity is set (has been assigned a value) and false otherwise */
746
  public boolean isSetAvailableQuantity() {
747
    return __isset_bit_vector.get(__AVAILABLEQUANTITY_ISSET_ID);
748
  }
749
 
750
  public void setAvailableQuantityIsSet(boolean value) {
751
    __isset_bit_vector.set(__AVAILABLEQUANTITY_ISSET_ID, value);
752
  }
753
 
754
  public long getReservedQuantity() {
755
    return this.reservedQuantity;
756
  }
757
 
758
  public void setReservedQuantity(long reservedQuantity) {
759
    this.reservedQuantity = reservedQuantity;
760
    setReservedQuantityIsSet(true);
761
  }
762
 
763
  public void unsetReservedQuantity() {
764
    __isset_bit_vector.clear(__RESERVEDQUANTITY_ISSET_ID);
765
  }
766
 
767
  /** Returns true if field reservedQuantity is set (has been assigned a value) and false otherwise */
768
  public boolean isSetReservedQuantity() {
769
    return __isset_bit_vector.get(__RESERVEDQUANTITY_ISSET_ID);
770
  }
771
 
772
  public void setReservedQuantityIsSet(boolean value) {
773
    __isset_bit_vector.set(__RESERVEDQUANTITY_ISSET_ID, value);
774
  }
775
 
776
  public double getAvgSales() {
777
    return this.avgSales;
778
  }
779
 
780
  public void setAvgSales(double avgSales) {
781
    this.avgSales = avgSales;
782
    setAvgSalesIsSet(true);
783
  }
784
 
785
  public void unsetAvgSales() {
786
    __isset_bit_vector.clear(__AVGSALES_ISSET_ID);
787
  }
788
 
789
  /** Returns true if field avgSales is set (has been assigned a value) and false otherwise */
790
  public boolean isSetAvgSales() {
791
    return __isset_bit_vector.get(__AVGSALES_ISSET_ID);
792
  }
793
 
794
  public void setAvgSalesIsSet(boolean value) {
795
    __isset_bit_vector.set(__AVGSALES_ISSET_ID, value);
796
  }
797
 
798
  public long getMinStockLevel() {
799
    return this.minStockLevel;
800
  }
801
 
802
  public void setMinStockLevel(long minStockLevel) {
803
    this.minStockLevel = minStockLevel;
804
    setMinStockLevelIsSet(true);
805
  }
806
 
807
  public void unsetMinStockLevel() {
808
    __isset_bit_vector.clear(__MINSTOCKLEVEL_ISSET_ID);
809
  }
810
 
811
  /** Returns true if field minStockLevel is set (has been assigned a value) and false otherwise */
812
  public boolean isSetMinStockLevel() {
813
    return __isset_bit_vector.get(__MINSTOCKLEVEL_ISSET_ID);
814
  }
815
 
816
  public void setMinStockLevelIsSet(boolean value) {
817
    __isset_bit_vector.set(__MINSTOCKLEVEL_ISSET_ID, value);
818
  }
819
 
820
  public long getNumberOfDaysStock() {
821
    return this.numberOfDaysStock;
822
  }
823
 
824
  public void setNumberOfDaysStock(long numberOfDaysStock) {
825
    this.numberOfDaysStock = numberOfDaysStock;
826
    setNumberOfDaysStockIsSet(true);
827
  }
828
 
829
  public void unsetNumberOfDaysStock() {
830
    __isset_bit_vector.clear(__NUMBEROFDAYSSTOCK_ISSET_ID);
831
  }
832
 
833
  /** Returns true if field numberOfDaysStock is set (has been assigned a value) and false otherwise */
834
  public boolean isSetNumberOfDaysStock() {
835
    return __isset_bit_vector.get(__NUMBEROFDAYSSTOCK_ISSET_ID);
836
  }
837
 
838
  public void setNumberOfDaysStockIsSet(boolean value) {
839
    __isset_bit_vector.set(__NUMBEROFDAYSSTOCK_ISSET_ID, value);
840
  }
841
 
842
  public long getSuggestedQuantity() {
843
    return this.suggestedQuantity;
844
  }
845
 
846
  public void setSuggestedQuantity(long suggestedQuantity) {
847
    this.suggestedQuantity = suggestedQuantity;
848
    setSuggestedQuantityIsSet(true);
849
  }
850
 
851
  public void unsetSuggestedQuantity() {
852
    __isset_bit_vector.clear(__SUGGESTEDQUANTITY_ISSET_ID);
853
  }
854
 
855
  /** Returns true if field suggestedQuantity is set (has been assigned a value) and false otherwise */
856
  public boolean isSetSuggestedQuantity() {
857
    return __isset_bit_vector.get(__SUGGESTEDQUANTITY_ISSET_ID);
858
  }
859
 
860
  public void setSuggestedQuantityIsSet(boolean value) {
861
    __isset_bit_vector.set(__SUGGESTEDQUANTITY_ISSET_ID, value);
862
  }
863
 
864
  public long getNumberOfDaysInStock() {
865
    return this.numberOfDaysInStock;
866
  }
867
 
868
  public void setNumberOfDaysInStock(long numberOfDaysInStock) {
869
    this.numberOfDaysInStock = numberOfDaysInStock;
870
    setNumberOfDaysInStockIsSet(true);
871
  }
872
 
873
  public void unsetNumberOfDaysInStock() {
874
    __isset_bit_vector.clear(__NUMBEROFDAYSINSTOCK_ISSET_ID);
875
  }
876
 
877
  /** Returns true if field numberOfDaysInStock is set (has been assigned a value) and false otherwise */
878
  public boolean isSetNumberOfDaysInStock() {
879
    return __isset_bit_vector.get(__NUMBEROFDAYSINSTOCK_ISSET_ID);
880
  }
881
 
882
  public void setNumberOfDaysInStockIsSet(boolean value) {
883
    __isset_bit_vector.set(__NUMBEROFDAYSINSTOCK_ISSET_ID, value);
884
  }
885
 
6857 amar.kumar 886
  public String getLastXdaysSale() {
887
    return this.lastXdaysSale;
888
  }
889
 
890
  public void setLastXdaysSale(String lastXdaysSale) {
891
    this.lastXdaysSale = lastXdaysSale;
892
  }
893
 
894
  public void unsetLastXdaysSale() {
895
    this.lastXdaysSale = null;
896
  }
897
 
898
  /** Returns true if field lastXdaysSale is set (has been assigned a value) and false otherwise */
899
  public boolean isSetLastXdaysSale() {
900
    return this.lastXdaysSale != null;
901
  }
902
 
903
  public void setLastXdaysSaleIsSet(boolean value) {
904
    if (!value) {
905
      this.lastXdaysSale = null;
906
    }
907
  }
908
 
4496 mandeep.dh 909
  public void setFieldValue(_Fields field, Object value) {
910
    switch (field) {
911
    case ORDER_ID:
912
      if (value == null) {
913
        unsetOrderId();
914
      } else {
915
        setOrderId((Long)value);
916
      }
917
      break;
918
 
919
    case ITEM_ID:
920
      if (value == null) {
921
        unsetItemId();
922
      } else {
923
        setItemId((Long)value);
924
      }
925
      break;
926
 
927
    case PRODUCT_GROUP:
928
      if (value == null) {
929
        unsetProductGroup();
930
      } else {
931
        setProductGroup((String)value);
932
      }
933
      break;
934
 
935
    case BRAND:
936
      if (value == null) {
937
        unsetBrand();
938
      } else {
939
        setBrand((String)value);
940
      }
941
      break;
942
 
943
    case MODEL_NUMBER:
944
      if (value == null) {
945
        unsetModelNumber();
946
      } else {
947
        setModelNumber((String)value);
948
      }
949
      break;
950
 
951
    case MODEL_NAME:
952
      if (value == null) {
953
        unsetModelName();
954
      } else {
955
        setModelName((String)value);
956
      }
957
      break;
958
 
959
    case COLOR:
960
      if (value == null) {
961
        unsetColor();
962
      } else {
963
        setColor((String)value);
964
      }
965
      break;
966
 
967
    case ITEM_NUMBER:
968
      if (value == null) {
969
        unsetItemNumber();
970
      } else {
971
        setItemNumber((String)value);
972
      }
973
      break;
974
 
975
    case QUANTITY:
976
      if (value == null) {
977
        unsetQuantity();
978
      } else {
979
        setQuantity((Double)value);
980
      }
981
      break;
982
 
983
    case UNFULFILLED_QUANTITY:
984
      if (value == null) {
985
        unsetUnfulfilledQuantity();
986
      } else {
987
        setUnfulfilledQuantity((Double)value);
988
      }
989
      break;
990
 
991
    case CREATED_AT:
992
      if (value == null) {
993
        unsetCreatedAt();
994
      } else {
995
        setCreatedAt((Long)value);
996
      }
997
      break;
998
 
999
    case UNIT_PRICE:
1000
      if (value == null) {
1001
        unsetUnitPrice();
1002
      } else {
1003
        setUnitPrice((Double)value);
1004
      }
1005
      break;
1006
 
1007
    case FULFILLED:
1008
      if (value == null) {
1009
        unsetFulfilled();
1010
      } else {
1011
        setFulfilled((Boolean)value);
1012
      }
1013
      break;
1014
 
4754 mandeep.dh 1015
    case COD_COUNT:
1016
      if (value == null) {
1017
        unsetCodCount();
1018
      } else {
1019
        setCodCount((Long)value);
1020
      }
1021
      break;
1022
 
6821 amar.kumar 1023
    case AVAILABLE_QUANTITY:
1024
      if (value == null) {
1025
        unsetAvailableQuantity();
1026
      } else {
1027
        setAvailableQuantity((Long)value);
1028
      }
1029
      break;
1030
 
1031
    case RESERVED_QUANTITY:
1032
      if (value == null) {
1033
        unsetReservedQuantity();
1034
      } else {
1035
        setReservedQuantity((Long)value);
1036
      }
1037
      break;
1038
 
1039
    case AVG_SALES:
1040
      if (value == null) {
1041
        unsetAvgSales();
1042
      } else {
1043
        setAvgSales((Double)value);
1044
      }
1045
      break;
1046
 
1047
    case MIN_STOCK_LEVEL:
1048
      if (value == null) {
1049
        unsetMinStockLevel();
1050
      } else {
1051
        setMinStockLevel((Long)value);
1052
      }
1053
      break;
1054
 
1055
    case NUMBER_OF_DAYS_STOCK:
1056
      if (value == null) {
1057
        unsetNumberOfDaysStock();
1058
      } else {
1059
        setNumberOfDaysStock((Long)value);
1060
      }
1061
      break;
1062
 
1063
    case SUGGESTED_QUANTITY:
1064
      if (value == null) {
1065
        unsetSuggestedQuantity();
1066
      } else {
1067
        setSuggestedQuantity((Long)value);
1068
      }
1069
      break;
1070
 
1071
    case NUMBER_OF_DAYS_IN_STOCK:
1072
      if (value == null) {
1073
        unsetNumberOfDaysInStock();
1074
      } else {
1075
        setNumberOfDaysInStock((Long)value);
1076
      }
1077
      break;
1078
 
6857 amar.kumar 1079
    case LAST_XDAYS_SALE:
1080
      if (value == null) {
1081
        unsetLastXdaysSale();
1082
      } else {
1083
        setLastXdaysSale((String)value);
1084
      }
1085
      break;
1086
 
4496 mandeep.dh 1087
    }
1088
  }
1089
 
1090
  public Object getFieldValue(_Fields field) {
1091
    switch (field) {
1092
    case ORDER_ID:
1093
      return Long.valueOf(getOrderId());
1094
 
1095
    case ITEM_ID:
1096
      return Long.valueOf(getItemId());
1097
 
1098
    case PRODUCT_GROUP:
1099
      return getProductGroup();
1100
 
1101
    case BRAND:
1102
      return getBrand();
1103
 
1104
    case MODEL_NUMBER:
1105
      return getModelNumber();
1106
 
1107
    case MODEL_NAME:
1108
      return getModelName();
1109
 
1110
    case COLOR:
1111
      return getColor();
1112
 
1113
    case ITEM_NUMBER:
1114
      return getItemNumber();
1115
 
1116
    case QUANTITY:
1117
      return Double.valueOf(getQuantity());
1118
 
1119
    case UNFULFILLED_QUANTITY:
1120
      return Double.valueOf(getUnfulfilledQuantity());
1121
 
1122
    case CREATED_AT:
1123
      return Long.valueOf(getCreatedAt());
1124
 
1125
    case UNIT_PRICE:
1126
      return Double.valueOf(getUnitPrice());
1127
 
1128
    case FULFILLED:
1129
      return Boolean.valueOf(isFulfilled());
1130
 
4754 mandeep.dh 1131
    case COD_COUNT:
1132
      return Long.valueOf(getCodCount());
1133
 
6821 amar.kumar 1134
    case AVAILABLE_QUANTITY:
1135
      return Long.valueOf(getAvailableQuantity());
1136
 
1137
    case RESERVED_QUANTITY:
1138
      return Long.valueOf(getReservedQuantity());
1139
 
1140
    case AVG_SALES:
1141
      return Double.valueOf(getAvgSales());
1142
 
1143
    case MIN_STOCK_LEVEL:
1144
      return Long.valueOf(getMinStockLevel());
1145
 
1146
    case NUMBER_OF_DAYS_STOCK:
1147
      return Long.valueOf(getNumberOfDaysStock());
1148
 
1149
    case SUGGESTED_QUANTITY:
1150
      return Long.valueOf(getSuggestedQuantity());
1151
 
1152
    case NUMBER_OF_DAYS_IN_STOCK:
1153
      return Long.valueOf(getNumberOfDaysInStock());
1154
 
6857 amar.kumar 1155
    case LAST_XDAYS_SALE:
1156
      return getLastXdaysSale();
1157
 
4496 mandeep.dh 1158
    }
1159
    throw new IllegalStateException();
1160
  }
1161
 
1162
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1163
  public boolean isSet(_Fields field) {
1164
    if (field == null) {
1165
      throw new IllegalArgumentException();
1166
    }
1167
 
1168
    switch (field) {
1169
    case ORDER_ID:
1170
      return isSetOrderId();
1171
    case ITEM_ID:
1172
      return isSetItemId();
1173
    case PRODUCT_GROUP:
1174
      return isSetProductGroup();
1175
    case BRAND:
1176
      return isSetBrand();
1177
    case MODEL_NUMBER:
1178
      return isSetModelNumber();
1179
    case MODEL_NAME:
1180
      return isSetModelName();
1181
    case COLOR:
1182
      return isSetColor();
1183
    case ITEM_NUMBER:
1184
      return isSetItemNumber();
1185
    case QUANTITY:
1186
      return isSetQuantity();
1187
    case UNFULFILLED_QUANTITY:
1188
      return isSetUnfulfilledQuantity();
1189
    case CREATED_AT:
1190
      return isSetCreatedAt();
1191
    case UNIT_PRICE:
1192
      return isSetUnitPrice();
1193
    case FULFILLED:
1194
      return isSetFulfilled();
4754 mandeep.dh 1195
    case COD_COUNT:
1196
      return isSetCodCount();
6821 amar.kumar 1197
    case AVAILABLE_QUANTITY:
1198
      return isSetAvailableQuantity();
1199
    case RESERVED_QUANTITY:
1200
      return isSetReservedQuantity();
1201
    case AVG_SALES:
1202
      return isSetAvgSales();
1203
    case MIN_STOCK_LEVEL:
1204
      return isSetMinStockLevel();
1205
    case NUMBER_OF_DAYS_STOCK:
1206
      return isSetNumberOfDaysStock();
1207
    case SUGGESTED_QUANTITY:
1208
      return isSetSuggestedQuantity();
1209
    case NUMBER_OF_DAYS_IN_STOCK:
1210
      return isSetNumberOfDaysInStock();
6857 amar.kumar 1211
    case LAST_XDAYS_SALE:
1212
      return isSetLastXdaysSale();
4496 mandeep.dh 1213
    }
1214
    throw new IllegalStateException();
1215
  }
1216
 
1217
  @Override
1218
  public boolean equals(Object that) {
1219
    if (that == null)
1220
      return false;
1221
    if (that instanceof LineItem)
1222
      return this.equals((LineItem)that);
1223
    return false;
1224
  }
1225
 
1226
  public boolean equals(LineItem that) {
1227
    if (that == null)
1228
      return false;
1229
 
1230
    boolean this_present_orderId = true;
1231
    boolean that_present_orderId = true;
1232
    if (this_present_orderId || that_present_orderId) {
1233
      if (!(this_present_orderId && that_present_orderId))
1234
        return false;
1235
      if (this.orderId != that.orderId)
1236
        return false;
1237
    }
1238
 
1239
    boolean this_present_itemId = true;
1240
    boolean that_present_itemId = true;
1241
    if (this_present_itemId || that_present_itemId) {
1242
      if (!(this_present_itemId && that_present_itemId))
1243
        return false;
1244
      if (this.itemId != that.itemId)
1245
        return false;
1246
    }
1247
 
1248
    boolean this_present_productGroup = true && this.isSetProductGroup();
1249
    boolean that_present_productGroup = true && that.isSetProductGroup();
1250
    if (this_present_productGroup || that_present_productGroup) {
1251
      if (!(this_present_productGroup && that_present_productGroup))
1252
        return false;
1253
      if (!this.productGroup.equals(that.productGroup))
1254
        return false;
1255
    }
1256
 
1257
    boolean this_present_brand = true && this.isSetBrand();
1258
    boolean that_present_brand = true && that.isSetBrand();
1259
    if (this_present_brand || that_present_brand) {
1260
      if (!(this_present_brand && that_present_brand))
1261
        return false;
1262
      if (!this.brand.equals(that.brand))
1263
        return false;
1264
    }
1265
 
1266
    boolean this_present_modelNumber = true && this.isSetModelNumber();
1267
    boolean that_present_modelNumber = true && that.isSetModelNumber();
1268
    if (this_present_modelNumber || that_present_modelNumber) {
1269
      if (!(this_present_modelNumber && that_present_modelNumber))
1270
        return false;
1271
      if (!this.modelNumber.equals(that.modelNumber))
1272
        return false;
1273
    }
1274
 
1275
    boolean this_present_modelName = true && this.isSetModelName();
1276
    boolean that_present_modelName = true && that.isSetModelName();
1277
    if (this_present_modelName || that_present_modelName) {
1278
      if (!(this_present_modelName && that_present_modelName))
1279
        return false;
1280
      if (!this.modelName.equals(that.modelName))
1281
        return false;
1282
    }
1283
 
1284
    boolean this_present_color = true && this.isSetColor();
1285
    boolean that_present_color = true && that.isSetColor();
1286
    if (this_present_color || that_present_color) {
1287
      if (!(this_present_color && that_present_color))
1288
        return false;
1289
      if (!this.color.equals(that.color))
1290
        return false;
1291
    }
1292
 
1293
    boolean this_present_itemNumber = true && this.isSetItemNumber();
1294
    boolean that_present_itemNumber = true && that.isSetItemNumber();
1295
    if (this_present_itemNumber || that_present_itemNumber) {
1296
      if (!(this_present_itemNumber && that_present_itemNumber))
1297
        return false;
1298
      if (!this.itemNumber.equals(that.itemNumber))
1299
        return false;
1300
    }
1301
 
1302
    boolean this_present_quantity = true;
1303
    boolean that_present_quantity = true;
1304
    if (this_present_quantity || that_present_quantity) {
1305
      if (!(this_present_quantity && that_present_quantity))
1306
        return false;
1307
      if (this.quantity != that.quantity)
1308
        return false;
1309
    }
1310
 
1311
    boolean this_present_unfulfilledQuantity = true;
1312
    boolean that_present_unfulfilledQuantity = true;
1313
    if (this_present_unfulfilledQuantity || that_present_unfulfilledQuantity) {
1314
      if (!(this_present_unfulfilledQuantity && that_present_unfulfilledQuantity))
1315
        return false;
1316
      if (this.unfulfilledQuantity != that.unfulfilledQuantity)
1317
        return false;
1318
    }
1319
 
1320
    boolean this_present_createdAt = true;
1321
    boolean that_present_createdAt = true;
1322
    if (this_present_createdAt || that_present_createdAt) {
1323
      if (!(this_present_createdAt && that_present_createdAt))
1324
        return false;
1325
      if (this.createdAt != that.createdAt)
1326
        return false;
1327
    }
1328
 
1329
    boolean this_present_unitPrice = true;
1330
    boolean that_present_unitPrice = true;
1331
    if (this_present_unitPrice || that_present_unitPrice) {
1332
      if (!(this_present_unitPrice && that_present_unitPrice))
1333
        return false;
1334
      if (this.unitPrice != that.unitPrice)
1335
        return false;
1336
    }
1337
 
1338
    boolean this_present_fulfilled = true;
1339
    boolean that_present_fulfilled = true;
1340
    if (this_present_fulfilled || that_present_fulfilled) {
1341
      if (!(this_present_fulfilled && that_present_fulfilled))
1342
        return false;
1343
      if (this.fulfilled != that.fulfilled)
1344
        return false;
1345
    }
1346
 
4754 mandeep.dh 1347
    boolean this_present_codCount = true;
1348
    boolean that_present_codCount = true;
1349
    if (this_present_codCount || that_present_codCount) {
1350
      if (!(this_present_codCount && that_present_codCount))
1351
        return false;
1352
      if (this.codCount != that.codCount)
1353
        return false;
1354
    }
1355
 
6821 amar.kumar 1356
    boolean this_present_availableQuantity = true;
1357
    boolean that_present_availableQuantity = true;
1358
    if (this_present_availableQuantity || that_present_availableQuantity) {
1359
      if (!(this_present_availableQuantity && that_present_availableQuantity))
1360
        return false;
1361
      if (this.availableQuantity != that.availableQuantity)
1362
        return false;
1363
    }
1364
 
1365
    boolean this_present_reservedQuantity = true;
1366
    boolean that_present_reservedQuantity = true;
1367
    if (this_present_reservedQuantity || that_present_reservedQuantity) {
1368
      if (!(this_present_reservedQuantity && that_present_reservedQuantity))
1369
        return false;
1370
      if (this.reservedQuantity != that.reservedQuantity)
1371
        return false;
1372
    }
1373
 
1374
    boolean this_present_avgSales = true;
1375
    boolean that_present_avgSales = true;
1376
    if (this_present_avgSales || that_present_avgSales) {
1377
      if (!(this_present_avgSales && that_present_avgSales))
1378
        return false;
1379
      if (this.avgSales != that.avgSales)
1380
        return false;
1381
    }
1382
 
1383
    boolean this_present_minStockLevel = true;
1384
    boolean that_present_minStockLevel = true;
1385
    if (this_present_minStockLevel || that_present_minStockLevel) {
1386
      if (!(this_present_minStockLevel && that_present_minStockLevel))
1387
        return false;
1388
      if (this.minStockLevel != that.minStockLevel)
1389
        return false;
1390
    }
1391
 
1392
    boolean this_present_numberOfDaysStock = true;
1393
    boolean that_present_numberOfDaysStock = true;
1394
    if (this_present_numberOfDaysStock || that_present_numberOfDaysStock) {
1395
      if (!(this_present_numberOfDaysStock && that_present_numberOfDaysStock))
1396
        return false;
1397
      if (this.numberOfDaysStock != that.numberOfDaysStock)
1398
        return false;
1399
    }
1400
 
1401
    boolean this_present_suggestedQuantity = true;
1402
    boolean that_present_suggestedQuantity = true;
1403
    if (this_present_suggestedQuantity || that_present_suggestedQuantity) {
1404
      if (!(this_present_suggestedQuantity && that_present_suggestedQuantity))
1405
        return false;
1406
      if (this.suggestedQuantity != that.suggestedQuantity)
1407
        return false;
1408
    }
1409
 
1410
    boolean this_present_numberOfDaysInStock = true;
1411
    boolean that_present_numberOfDaysInStock = true;
1412
    if (this_present_numberOfDaysInStock || that_present_numberOfDaysInStock) {
1413
      if (!(this_present_numberOfDaysInStock && that_present_numberOfDaysInStock))
1414
        return false;
1415
      if (this.numberOfDaysInStock != that.numberOfDaysInStock)
1416
        return false;
1417
    }
1418
 
6857 amar.kumar 1419
    boolean this_present_lastXdaysSale = true && this.isSetLastXdaysSale();
1420
    boolean that_present_lastXdaysSale = true && that.isSetLastXdaysSale();
1421
    if (this_present_lastXdaysSale || that_present_lastXdaysSale) {
1422
      if (!(this_present_lastXdaysSale && that_present_lastXdaysSale))
1423
        return false;
1424
      if (!this.lastXdaysSale.equals(that.lastXdaysSale))
1425
        return false;
1426
    }
1427
 
4496 mandeep.dh 1428
    return true;
1429
  }
1430
 
1431
  @Override
1432
  public int hashCode() {
1433
    return 0;
1434
  }
1435
 
1436
  public int compareTo(LineItem other) {
1437
    if (!getClass().equals(other.getClass())) {
1438
      return getClass().getName().compareTo(other.getClass().getName());
1439
    }
1440
 
1441
    int lastComparison = 0;
1442
    LineItem typedOther = (LineItem)other;
1443
 
1444
    lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
1445
    if (lastComparison != 0) {
1446
      return lastComparison;
1447
    }
1448
    if (isSetOrderId()) {
1449
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
1450
      if (lastComparison != 0) {
1451
        return lastComparison;
1452
      }
1453
    }
1454
    lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
1455
    if (lastComparison != 0) {
1456
      return lastComparison;
1457
    }
1458
    if (isSetItemId()) {
1459
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
1460
      if (lastComparison != 0) {
1461
        return lastComparison;
1462
      }
1463
    }
1464
    lastComparison = Boolean.valueOf(isSetProductGroup()).compareTo(typedOther.isSetProductGroup());
1465
    if (lastComparison != 0) {
1466
      return lastComparison;
1467
    }
1468
    if (isSetProductGroup()) {
1469
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.productGroup, typedOther.productGroup);
1470
      if (lastComparison != 0) {
1471
        return lastComparison;
1472
      }
1473
    }
1474
    lastComparison = Boolean.valueOf(isSetBrand()).compareTo(typedOther.isSetBrand());
1475
    if (lastComparison != 0) {
1476
      return lastComparison;
1477
    }
1478
    if (isSetBrand()) {
1479
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.brand, typedOther.brand);
1480
      if (lastComparison != 0) {
1481
        return lastComparison;
1482
      }
1483
    }
1484
    lastComparison = Boolean.valueOf(isSetModelNumber()).compareTo(typedOther.isSetModelNumber());
1485
    if (lastComparison != 0) {
1486
      return lastComparison;
1487
    }
1488
    if (isSetModelNumber()) {
1489
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.modelNumber, typedOther.modelNumber);
1490
      if (lastComparison != 0) {
1491
        return lastComparison;
1492
      }
1493
    }
1494
    lastComparison = Boolean.valueOf(isSetModelName()).compareTo(typedOther.isSetModelName());
1495
    if (lastComparison != 0) {
1496
      return lastComparison;
1497
    }
1498
    if (isSetModelName()) {
1499
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.modelName, typedOther.modelName);
1500
      if (lastComparison != 0) {
1501
        return lastComparison;
1502
      }
1503
    }
1504
    lastComparison = Boolean.valueOf(isSetColor()).compareTo(typedOther.isSetColor());
1505
    if (lastComparison != 0) {
1506
      return lastComparison;
1507
    }
1508
    if (isSetColor()) {
1509
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.color, typedOther.color);
1510
      if (lastComparison != 0) {
1511
        return lastComparison;
1512
      }
1513
    }
1514
    lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
1515
    if (lastComparison != 0) {
1516
      return lastComparison;
1517
    }
1518
    if (isSetItemNumber()) {
1519
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
1520
      if (lastComparison != 0) {
1521
        return lastComparison;
1522
      }
1523
    }
1524
    lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
1525
    if (lastComparison != 0) {
1526
      return lastComparison;
1527
    }
1528
    if (isSetQuantity()) {
1529
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
1530
      if (lastComparison != 0) {
1531
        return lastComparison;
1532
      }
1533
    }
1534
    lastComparison = Boolean.valueOf(isSetUnfulfilledQuantity()).compareTo(typedOther.isSetUnfulfilledQuantity());
1535
    if (lastComparison != 0) {
1536
      return lastComparison;
1537
    }
1538
    if (isSetUnfulfilledQuantity()) {
1539
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unfulfilledQuantity, typedOther.unfulfilledQuantity);
1540
      if (lastComparison != 0) {
1541
        return lastComparison;
1542
      }
1543
    }
1544
    lastComparison = Boolean.valueOf(isSetCreatedAt()).compareTo(typedOther.isSetCreatedAt());
1545
    if (lastComparison != 0) {
1546
      return lastComparison;
1547
    }
1548
    if (isSetCreatedAt()) {
1549
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdAt, typedOther.createdAt);
1550
      if (lastComparison != 0) {
1551
        return lastComparison;
1552
      }
1553
    }
1554
    lastComparison = Boolean.valueOf(isSetUnitPrice()).compareTo(typedOther.isSetUnitPrice());
1555
    if (lastComparison != 0) {
1556
      return lastComparison;
1557
    }
1558
    if (isSetUnitPrice()) {
1559
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unitPrice, typedOther.unitPrice);
1560
      if (lastComparison != 0) {
1561
        return lastComparison;
1562
      }
1563
    }
1564
    lastComparison = Boolean.valueOf(isSetFulfilled()).compareTo(typedOther.isSetFulfilled());
1565
    if (lastComparison != 0) {
1566
      return lastComparison;
1567
    }
1568
    if (isSetFulfilled()) {
1569
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilled, typedOther.fulfilled);
1570
      if (lastComparison != 0) {
1571
        return lastComparison;
1572
      }
1573
    }
4754 mandeep.dh 1574
    lastComparison = Boolean.valueOf(isSetCodCount()).compareTo(typedOther.isSetCodCount());
1575
    if (lastComparison != 0) {
1576
      return lastComparison;
1577
    }
1578
    if (isSetCodCount()) {
1579
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.codCount, typedOther.codCount);
1580
      if (lastComparison != 0) {
1581
        return lastComparison;
1582
      }
1583
    }
6821 amar.kumar 1584
    lastComparison = Boolean.valueOf(isSetAvailableQuantity()).compareTo(typedOther.isSetAvailableQuantity());
1585
    if (lastComparison != 0) {
1586
      return lastComparison;
1587
    }
1588
    if (isSetAvailableQuantity()) {
1589
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.availableQuantity, typedOther.availableQuantity);
1590
      if (lastComparison != 0) {
1591
        return lastComparison;
1592
      }
1593
    }
1594
    lastComparison = Boolean.valueOf(isSetReservedQuantity()).compareTo(typedOther.isSetReservedQuantity());
1595
    if (lastComparison != 0) {
1596
      return lastComparison;
1597
    }
1598
    if (isSetReservedQuantity()) {
1599
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reservedQuantity, typedOther.reservedQuantity);
1600
      if (lastComparison != 0) {
1601
        return lastComparison;
1602
      }
1603
    }
1604
    lastComparison = Boolean.valueOf(isSetAvgSales()).compareTo(typedOther.isSetAvgSales());
1605
    if (lastComparison != 0) {
1606
      return lastComparison;
1607
    }
1608
    if (isSetAvgSales()) {
1609
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.avgSales, typedOther.avgSales);
1610
      if (lastComparison != 0) {
1611
        return lastComparison;
1612
      }
1613
    }
1614
    lastComparison = Boolean.valueOf(isSetMinStockLevel()).compareTo(typedOther.isSetMinStockLevel());
1615
    if (lastComparison != 0) {
1616
      return lastComparison;
1617
    }
1618
    if (isSetMinStockLevel()) {
1619
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.minStockLevel, typedOther.minStockLevel);
1620
      if (lastComparison != 0) {
1621
        return lastComparison;
1622
      }
1623
    }
1624
    lastComparison = Boolean.valueOf(isSetNumberOfDaysStock()).compareTo(typedOther.isSetNumberOfDaysStock());
1625
    if (lastComparison != 0) {
1626
      return lastComparison;
1627
    }
1628
    if (isSetNumberOfDaysStock()) {
1629
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numberOfDaysStock, typedOther.numberOfDaysStock);
1630
      if (lastComparison != 0) {
1631
        return lastComparison;
1632
      }
1633
    }
1634
    lastComparison = Boolean.valueOf(isSetSuggestedQuantity()).compareTo(typedOther.isSetSuggestedQuantity());
1635
    if (lastComparison != 0) {
1636
      return lastComparison;
1637
    }
1638
    if (isSetSuggestedQuantity()) {
1639
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.suggestedQuantity, typedOther.suggestedQuantity);
1640
      if (lastComparison != 0) {
1641
        return lastComparison;
1642
      }
1643
    }
1644
    lastComparison = Boolean.valueOf(isSetNumberOfDaysInStock()).compareTo(typedOther.isSetNumberOfDaysInStock());
1645
    if (lastComparison != 0) {
1646
      return lastComparison;
1647
    }
1648
    if (isSetNumberOfDaysInStock()) {
1649
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numberOfDaysInStock, typedOther.numberOfDaysInStock);
1650
      if (lastComparison != 0) {
1651
        return lastComparison;
1652
      }
1653
    }
6857 amar.kumar 1654
    lastComparison = Boolean.valueOf(isSetLastXdaysSale()).compareTo(typedOther.isSetLastXdaysSale());
1655
    if (lastComparison != 0) {
1656
      return lastComparison;
1657
    }
1658
    if (isSetLastXdaysSale()) {
1659
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastXdaysSale, typedOther.lastXdaysSale);
1660
      if (lastComparison != 0) {
1661
        return lastComparison;
1662
      }
1663
    }
4496 mandeep.dh 1664
    return 0;
1665
  }
1666
 
1667
  public _Fields fieldForId(int fieldId) {
1668
    return _Fields.findByThriftId(fieldId);
1669
  }
1670
 
1671
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1672
    org.apache.thrift.protocol.TField field;
1673
    iprot.readStructBegin();
1674
    while (true)
1675
    {
1676
      field = iprot.readFieldBegin();
1677
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
1678
        break;
1679
      }
1680
      switch (field.id) {
1681
        case 1: // ORDER_ID
1682
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1683
            this.orderId = iprot.readI64();
1684
            setOrderIdIsSet(true);
1685
          } else { 
1686
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1687
          }
1688
          break;
1689
        case 2: // ITEM_ID
1690
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1691
            this.itemId = iprot.readI64();
1692
            setItemIdIsSet(true);
1693
          } else { 
1694
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1695
          }
1696
          break;
1697
        case 3: // PRODUCT_GROUP
1698
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1699
            this.productGroup = iprot.readString();
1700
          } else { 
1701
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1702
          }
1703
          break;
1704
        case 4: // BRAND
1705
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1706
            this.brand = iprot.readString();
1707
          } else { 
1708
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1709
          }
1710
          break;
1711
        case 5: // MODEL_NUMBER
1712
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1713
            this.modelNumber = iprot.readString();
1714
          } else { 
1715
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1716
          }
1717
          break;
1718
        case 6: // MODEL_NAME
1719
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1720
            this.modelName = iprot.readString();
1721
          } else { 
1722
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1723
          }
1724
          break;
1725
        case 7: // COLOR
1726
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1727
            this.color = iprot.readString();
1728
          } else { 
1729
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1730
          }
1731
          break;
1732
        case 8: // ITEM_NUMBER
1733
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1734
            this.itemNumber = iprot.readString();
1735
          } else { 
1736
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1737
          }
1738
          break;
1739
        case 9: // QUANTITY
1740
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
1741
            this.quantity = iprot.readDouble();
1742
            setQuantityIsSet(true);
1743
          } else { 
1744
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1745
          }
1746
          break;
1747
        case 10: // UNFULFILLED_QUANTITY
1748
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
1749
            this.unfulfilledQuantity = iprot.readDouble();
1750
            setUnfulfilledQuantityIsSet(true);
1751
          } else { 
1752
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1753
          }
1754
          break;
1755
        case 11: // CREATED_AT
1756
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1757
            this.createdAt = iprot.readI64();
1758
            setCreatedAtIsSet(true);
1759
          } else { 
1760
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1761
          }
1762
          break;
1763
        case 12: // UNIT_PRICE
1764
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
1765
            this.unitPrice = iprot.readDouble();
1766
            setUnitPriceIsSet(true);
1767
          } else { 
1768
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1769
          }
1770
          break;
1771
        case 13: // FULFILLED
1772
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
1773
            this.fulfilled = iprot.readBool();
1774
            setFulfilledIsSet(true);
1775
          } else { 
1776
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1777
          }
1778
          break;
4754 mandeep.dh 1779
        case 14: // COD_COUNT
1780
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1781
            this.codCount = iprot.readI64();
1782
            setCodCountIsSet(true);
1783
          } else { 
1784
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1785
          }
1786
          break;
6821 amar.kumar 1787
        case 15: // AVAILABLE_QUANTITY
1788
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1789
            this.availableQuantity = iprot.readI64();
1790
            setAvailableQuantityIsSet(true);
1791
          } else { 
1792
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1793
          }
1794
          break;
1795
        case 16: // RESERVED_QUANTITY
1796
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1797
            this.reservedQuantity = iprot.readI64();
1798
            setReservedQuantityIsSet(true);
1799
          } else { 
1800
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1801
          }
1802
          break;
1803
        case 17: // AVG_SALES
1804
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
1805
            this.avgSales = iprot.readDouble();
1806
            setAvgSalesIsSet(true);
1807
          } else { 
1808
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1809
          }
1810
          break;
1811
        case 18: // MIN_STOCK_LEVEL
1812
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1813
            this.minStockLevel = iprot.readI64();
1814
            setMinStockLevelIsSet(true);
1815
          } else { 
1816
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1817
          }
1818
          break;
1819
        case 19: // NUMBER_OF_DAYS_STOCK
1820
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1821
            this.numberOfDaysStock = iprot.readI64();
1822
            setNumberOfDaysStockIsSet(true);
1823
          } else { 
1824
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1825
          }
1826
          break;
1827
        case 20: // SUGGESTED_QUANTITY
1828
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1829
            this.suggestedQuantity = iprot.readI64();
1830
            setSuggestedQuantityIsSet(true);
1831
          } else { 
1832
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1833
          }
1834
          break;
1835
        case 21: // NUMBER_OF_DAYS_IN_STOCK
1836
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1837
            this.numberOfDaysInStock = iprot.readI64();
1838
            setNumberOfDaysInStockIsSet(true);
1839
          } else { 
1840
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1841
          }
1842
          break;
6857 amar.kumar 1843
        case 22: // LAST_XDAYS_SALE
1844
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1845
            this.lastXdaysSale = iprot.readString();
1846
          } else { 
1847
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1848
          }
1849
          break;
4496 mandeep.dh 1850
        default:
1851
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1852
      }
1853
      iprot.readFieldEnd();
1854
    }
1855
    iprot.readStructEnd();
1856
    validate();
1857
  }
1858
 
1859
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1860
    validate();
1861
 
1862
    oprot.writeStructBegin(STRUCT_DESC);
1863
    oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
1864
    oprot.writeI64(this.orderId);
1865
    oprot.writeFieldEnd();
1866
    oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
1867
    oprot.writeI64(this.itemId);
1868
    oprot.writeFieldEnd();
1869
    if (this.productGroup != null) {
1870
      oprot.writeFieldBegin(PRODUCT_GROUP_FIELD_DESC);
1871
      oprot.writeString(this.productGroup);
1872
      oprot.writeFieldEnd();
1873
    }
1874
    if (this.brand != null) {
1875
      oprot.writeFieldBegin(BRAND_FIELD_DESC);
1876
      oprot.writeString(this.brand);
1877
      oprot.writeFieldEnd();
1878
    }
1879
    if (this.modelNumber != null) {
1880
      oprot.writeFieldBegin(MODEL_NUMBER_FIELD_DESC);
1881
      oprot.writeString(this.modelNumber);
1882
      oprot.writeFieldEnd();
1883
    }
1884
    if (this.modelName != null) {
1885
      oprot.writeFieldBegin(MODEL_NAME_FIELD_DESC);
1886
      oprot.writeString(this.modelName);
1887
      oprot.writeFieldEnd();
1888
    }
1889
    if (this.color != null) {
1890
      oprot.writeFieldBegin(COLOR_FIELD_DESC);
1891
      oprot.writeString(this.color);
1892
      oprot.writeFieldEnd();
1893
    }
1894
    if (this.itemNumber != null) {
1895
      oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
1896
      oprot.writeString(this.itemNumber);
1897
      oprot.writeFieldEnd();
1898
    }
1899
    oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
1900
    oprot.writeDouble(this.quantity);
1901
    oprot.writeFieldEnd();
1902
    oprot.writeFieldBegin(UNFULFILLED_QUANTITY_FIELD_DESC);
1903
    oprot.writeDouble(this.unfulfilledQuantity);
1904
    oprot.writeFieldEnd();
1905
    oprot.writeFieldBegin(CREATED_AT_FIELD_DESC);
1906
    oprot.writeI64(this.createdAt);
1907
    oprot.writeFieldEnd();
1908
    oprot.writeFieldBegin(UNIT_PRICE_FIELD_DESC);
1909
    oprot.writeDouble(this.unitPrice);
1910
    oprot.writeFieldEnd();
1911
    oprot.writeFieldBegin(FULFILLED_FIELD_DESC);
1912
    oprot.writeBool(this.fulfilled);
1913
    oprot.writeFieldEnd();
4754 mandeep.dh 1914
    oprot.writeFieldBegin(COD_COUNT_FIELD_DESC);
1915
    oprot.writeI64(this.codCount);
1916
    oprot.writeFieldEnd();
6821 amar.kumar 1917
    oprot.writeFieldBegin(AVAILABLE_QUANTITY_FIELD_DESC);
1918
    oprot.writeI64(this.availableQuantity);
1919
    oprot.writeFieldEnd();
1920
    oprot.writeFieldBegin(RESERVED_QUANTITY_FIELD_DESC);
1921
    oprot.writeI64(this.reservedQuantity);
1922
    oprot.writeFieldEnd();
1923
    oprot.writeFieldBegin(AVG_SALES_FIELD_DESC);
1924
    oprot.writeDouble(this.avgSales);
1925
    oprot.writeFieldEnd();
1926
    oprot.writeFieldBegin(MIN_STOCK_LEVEL_FIELD_DESC);
1927
    oprot.writeI64(this.minStockLevel);
1928
    oprot.writeFieldEnd();
1929
    oprot.writeFieldBegin(NUMBER_OF_DAYS_STOCK_FIELD_DESC);
1930
    oprot.writeI64(this.numberOfDaysStock);
1931
    oprot.writeFieldEnd();
1932
    oprot.writeFieldBegin(SUGGESTED_QUANTITY_FIELD_DESC);
1933
    oprot.writeI64(this.suggestedQuantity);
1934
    oprot.writeFieldEnd();
1935
    oprot.writeFieldBegin(NUMBER_OF_DAYS_IN_STOCK_FIELD_DESC);
1936
    oprot.writeI64(this.numberOfDaysInStock);
1937
    oprot.writeFieldEnd();
6857 amar.kumar 1938
    if (this.lastXdaysSale != null) {
1939
      oprot.writeFieldBegin(LAST_XDAYS_SALE_FIELD_DESC);
1940
      oprot.writeString(this.lastXdaysSale);
1941
      oprot.writeFieldEnd();
1942
    }
4496 mandeep.dh 1943
    oprot.writeFieldStop();
1944
    oprot.writeStructEnd();
1945
  }
1946
 
1947
  @Override
1948
  public String toString() {
1949
    StringBuilder sb = new StringBuilder("LineItem(");
1950
    boolean first = true;
1951
 
1952
    sb.append("orderId:");
1953
    sb.append(this.orderId);
1954
    first = false;
1955
    if (!first) sb.append(", ");
1956
    sb.append("itemId:");
1957
    sb.append(this.itemId);
1958
    first = false;
1959
    if (!first) sb.append(", ");
1960
    sb.append("productGroup:");
1961
    if (this.productGroup == null) {
1962
      sb.append("null");
1963
    } else {
1964
      sb.append(this.productGroup);
1965
    }
1966
    first = false;
1967
    if (!first) sb.append(", ");
1968
    sb.append("brand:");
1969
    if (this.brand == null) {
1970
      sb.append("null");
1971
    } else {
1972
      sb.append(this.brand);
1973
    }
1974
    first = false;
1975
    if (!first) sb.append(", ");
1976
    sb.append("modelNumber:");
1977
    if (this.modelNumber == null) {
1978
      sb.append("null");
1979
    } else {
1980
      sb.append(this.modelNumber);
1981
    }
1982
    first = false;
1983
    if (!first) sb.append(", ");
1984
    sb.append("modelName:");
1985
    if (this.modelName == null) {
1986
      sb.append("null");
1987
    } else {
1988
      sb.append(this.modelName);
1989
    }
1990
    first = false;
1991
    if (!first) sb.append(", ");
1992
    sb.append("color:");
1993
    if (this.color == null) {
1994
      sb.append("null");
1995
    } else {
1996
      sb.append(this.color);
1997
    }
1998
    first = false;
1999
    if (!first) sb.append(", ");
2000
    sb.append("itemNumber:");
2001
    if (this.itemNumber == null) {
2002
      sb.append("null");
2003
    } else {
2004
      sb.append(this.itemNumber);
2005
    }
2006
    first = false;
2007
    if (!first) sb.append(", ");
2008
    sb.append("quantity:");
2009
    sb.append(this.quantity);
2010
    first = false;
2011
    if (!first) sb.append(", ");
2012
    sb.append("unfulfilledQuantity:");
2013
    sb.append(this.unfulfilledQuantity);
2014
    first = false;
2015
    if (!first) sb.append(", ");
2016
    sb.append("createdAt:");
2017
    sb.append(this.createdAt);
2018
    first = false;
2019
    if (!first) sb.append(", ");
2020
    sb.append("unitPrice:");
2021
    sb.append(this.unitPrice);
2022
    first = false;
2023
    if (!first) sb.append(", ");
2024
    sb.append("fulfilled:");
2025
    sb.append(this.fulfilled);
2026
    first = false;
4754 mandeep.dh 2027
    if (!first) sb.append(", ");
2028
    sb.append("codCount:");
2029
    sb.append(this.codCount);
2030
    first = false;
6821 amar.kumar 2031
    if (!first) sb.append(", ");
2032
    sb.append("availableQuantity:");
2033
    sb.append(this.availableQuantity);
2034
    first = false;
2035
    if (!first) sb.append(", ");
2036
    sb.append("reservedQuantity:");
2037
    sb.append(this.reservedQuantity);
2038
    first = false;
2039
    if (!first) sb.append(", ");
2040
    sb.append("avgSales:");
2041
    sb.append(this.avgSales);
2042
    first = false;
2043
    if (!first) sb.append(", ");
2044
    sb.append("minStockLevel:");
2045
    sb.append(this.minStockLevel);
2046
    first = false;
2047
    if (!first) sb.append(", ");
2048
    sb.append("numberOfDaysStock:");
2049
    sb.append(this.numberOfDaysStock);
2050
    first = false;
2051
    if (!first) sb.append(", ");
2052
    sb.append("suggestedQuantity:");
2053
    sb.append(this.suggestedQuantity);
2054
    first = false;
2055
    if (!first) sb.append(", ");
2056
    sb.append("numberOfDaysInStock:");
2057
    sb.append(this.numberOfDaysInStock);
2058
    first = false;
6857 amar.kumar 2059
    if (!first) sb.append(", ");
2060
    sb.append("lastXdaysSale:");
2061
    if (this.lastXdaysSale == null) {
2062
      sb.append("null");
2063
    } else {
2064
      sb.append(this.lastXdaysSale);
2065
    }
2066
    first = false;
4496 mandeep.dh 2067
    sb.append(")");
2068
    return sb.toString();
2069
  }
2070
 
2071
  public void validate() throws org.apache.thrift.TException {
2072
    // check for required fields
2073
  }
2074
 
2075
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2076
    try {
2077
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2078
    } catch (org.apache.thrift.TException te) {
2079
      throw new java.io.IOException(te);
2080
    }
2081
  }
2082
 
2083
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2084
    try {
2085
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
2086
      __isset_bit_vector = new BitSet(1);
2087
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2088
    } catch (org.apache.thrift.TException te) {
2089
      throw new java.io.IOException(te);
2090
    }
2091
  }
2092
 
2093
}
2094