Subversion Repositories SmartDukaan

Rev

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