Subversion Repositories SmartDukaan

Rev

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