Subversion Repositories SmartDukaan

Rev

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