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