Subversion Repositories SmartDukaan

Rev

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

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