Subversion Repositories SmartDukaan

Rev

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