Subversion Repositories SmartDukaan

Rev

Rev 3430 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3430 Rev 4496
Line 22... Line 22...
22
 
22
 
23
public class Scan implements org.apache.thrift.TBase<Scan, Scan._Fields>, java.io.Serializable, Cloneable {
23
public class Scan implements org.apache.thrift.TBase<Scan, Scan._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Scan");
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Scan");
25
 
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);
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);
27
  private static final org.apache.thrift.protocol.TField INVENTORY_ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("inventoryItemId", org.apache.thrift.protocol.TType.I64, (short)2);
28
  private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)3);
28
  private static final org.apache.thrift.protocol.TField QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("quantity", org.apache.thrift.protocol.TType.I64, (short)3);
29
  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)4);
29
  private static final org.apache.thrift.protocol.TField ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("orderId", org.apache.thrift.protocol.TType.I64, (short)4);
30
  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)5);
30
  private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)5);
31
  private static final org.apache.thrift.protocol.TField IMEI_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("imeiNumber", org.apache.thrift.protocol.TType.STRING, (short)6);
-
 
32
  private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)7);
31
  private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)6);
33
  private static final org.apache.thrift.protocol.TField SCANNED_AT_FIELD_DESC = new org.apache.thrift.protocol.TField("scannedAt", org.apache.thrift.protocol.TType.I64, (short)8);
32
  private static final org.apache.thrift.protocol.TField SCANNED_AT_FIELD_DESC = new org.apache.thrift.protocol.TField("scannedAt", org.apache.thrift.protocol.TType.I64, (short)7);
34
 
33
 
35
  private long id; // required
34
  private long id; // required
-
 
35
  private long inventoryItemId; // required
-
 
36
  private long quantity; // required
36
  private long itemId; // required
37
  private long orderId; // required
37
  private long warehouseId; // required
38
  private long warehouseId; // required
38
  private long purchaseId; // required
-
 
39
  private String itemNumber; // required
-
 
40
  private String imeiNumber; // required
-
 
41
  private ScanType type; // required
39
  private ScanType type; // required
42
  private long scannedAt; // required
40
  private long scannedAt; // required
43
 
41
 
44
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
42
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
45
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
43
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
46
    ID((short)1, "id"),
44
    ID((short)1, "id"),
47
    ITEM_ID((short)2, "itemId"),
45
    INVENTORY_ITEM_ID((short)2, "inventoryItemId"),
48
    WAREHOUSE_ID((short)3, "warehouseId"),
46
    QUANTITY((short)3, "quantity"),
49
    PURCHASE_ID((short)4, "purchaseId"),
47
    ORDER_ID((short)4, "orderId"),
50
    ITEM_NUMBER((short)5, "itemNumber"),
48
    WAREHOUSE_ID((short)5, "warehouseId"),
51
    IMEI_NUMBER((short)6, "imeiNumber"),
-
 
52
    /**
49
    /**
53
     * 
50
     * 
54
     * @see ScanType
51
     * @see ScanType
55
     */
52
     */
56
    TYPE((short)7, "type"),
53
    TYPE((short)6, "type"),
57
    SCANNED_AT((short)8, "scannedAt");
54
    SCANNED_AT((short)7, "scannedAt");
58
 
55
 
59
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
56
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
60
 
57
 
61
    static {
58
    static {
62
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
59
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 69... Line 66...
69
     */
66
     */
70
    public static _Fields findByThriftId(int fieldId) {
67
    public static _Fields findByThriftId(int fieldId) {
71
      switch(fieldId) {
68
      switch(fieldId) {
72
        case 1: // ID
69
        case 1: // ID
73
          return ID;
70
          return ID;
-
 
71
        case 2: // INVENTORY_ITEM_ID
-
 
72
          return INVENTORY_ITEM_ID;
-
 
73
        case 3: // QUANTITY
-
 
74
          return QUANTITY;
74
        case 2: // ITEM_ID
75
        case 4: // ORDER_ID
75
          return ITEM_ID;
76
          return ORDER_ID;
76
        case 3: // WAREHOUSE_ID
77
        case 5: // WAREHOUSE_ID
77
          return WAREHOUSE_ID;
78
          return WAREHOUSE_ID;
78
        case 4: // PURCHASE_ID
-
 
79
          return PURCHASE_ID;
-
 
80
        case 5: // ITEM_NUMBER
-
 
81
          return ITEM_NUMBER;
-
 
82
        case 6: // IMEI_NUMBER
-
 
83
          return IMEI_NUMBER;
-
 
84
        case 7: // TYPE
79
        case 6: // TYPE
85
          return TYPE;
80
          return TYPE;
86
        case 8: // SCANNED_AT
81
        case 7: // SCANNED_AT
87
          return SCANNED_AT;
82
          return SCANNED_AT;
88
        default:
83
        default:
89
          return null;
84
          return null;
90
      }
85
      }
91
    }
86
    }
Line 124... Line 119...
124
    }
119
    }
125
  }
120
  }
126
 
121
 
127
  // isset id assignments
122
  // isset id assignments
128
  private static final int __ID_ISSET_ID = 0;
123
  private static final int __ID_ISSET_ID = 0;
-
 
124
  private static final int __INVENTORYITEMID_ISSET_ID = 1;
129
  private static final int __ITEMID_ISSET_ID = 1;
125
  private static final int __QUANTITY_ISSET_ID = 2;
130
  private static final int __WAREHOUSEID_ISSET_ID = 2;
126
  private static final int __ORDERID_ISSET_ID = 3;
131
  private static final int __PURCHASEID_ISSET_ID = 3;
127
  private static final int __WAREHOUSEID_ISSET_ID = 4;
132
  private static final int __SCANNEDAT_ISSET_ID = 4;
128
  private static final int __SCANNEDAT_ISSET_ID = 5;
133
  private BitSet __isset_bit_vector = new BitSet(5);
129
  private BitSet __isset_bit_vector = new BitSet(6);
134
 
130
 
135
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
131
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
136
  static {
132
  static {
137
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
133
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
138
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
134
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
139
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
135
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
140
    tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
136
    tmpMap.put(_Fields.INVENTORY_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("inventoryItemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
141
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
137
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
138
    tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
-
 
139
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
142
    tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
140
    tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
143
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
141
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
144
    tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
142
    tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
145
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
143
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
146
    tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
147
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
148
    tmpMap.put(_Fields.IMEI_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("imeiNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
149
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
150
    tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
144
    tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
151
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
145
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
152
    tmpMap.put(_Fields.SCANNED_AT, new org.apache.thrift.meta_data.FieldMetaData("scannedAt", org.apache.thrift.TFieldRequirementType.DEFAULT, 
146
    tmpMap.put(_Fields.SCANNED_AT, new org.apache.thrift.meta_data.FieldMetaData("scannedAt", org.apache.thrift.TFieldRequirementType.DEFAULT, 
153
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
147
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
154
    metaDataMap = Collections.unmodifiableMap(tmpMap);
148
    metaDataMap = Collections.unmodifiableMap(tmpMap);
Line 158... Line 152...
158
  public Scan() {
152
  public Scan() {
159
  }
153
  }
160
 
154
 
161
  public Scan(
155
  public Scan(
162
    long id,
156
    long id,
163
    long itemId,
157
    long inventoryItemId,
164
    long warehouseId,
158
    long warehouseId,
165
    long purchaseId,
-
 
166
    String itemNumber,
-
 
167
    String imeiNumber,
-
 
168
    ScanType type,
159
    ScanType type,
169
    long scannedAt)
160
    long scannedAt)
170
  {
161
  {
171
    this();
162
    this();
172
    this.id = id;
163
    this.id = id;
173
    setIdIsSet(true);
164
    setIdIsSet(true);
174
    this.itemId = itemId;
165
    this.inventoryItemId = inventoryItemId;
175
    setItemIdIsSet(true);
166
    setInventoryItemIdIsSet(true);
176
    this.warehouseId = warehouseId;
167
    this.warehouseId = warehouseId;
177
    setWarehouseIdIsSet(true);
168
    setWarehouseIdIsSet(true);
178
    this.purchaseId = purchaseId;
-
 
179
    setPurchaseIdIsSet(true);
-
 
180
    this.itemNumber = itemNumber;
-
 
181
    this.imeiNumber = imeiNumber;
-
 
182
    this.type = type;
169
    this.type = type;
183
    this.scannedAt = scannedAt;
170
    this.scannedAt = scannedAt;
184
    setScannedAtIsSet(true);
171
    setScannedAtIsSet(true);
185
  }
172
  }
186
 
173
 
Line 189... Line 176...
189
   */
176
   */
190
  public Scan(Scan other) {
177
  public Scan(Scan other) {
191
    __isset_bit_vector.clear();
178
    __isset_bit_vector.clear();
192
    __isset_bit_vector.or(other.__isset_bit_vector);
179
    __isset_bit_vector.or(other.__isset_bit_vector);
193
    this.id = other.id;
180
    this.id = other.id;
-
 
181
    this.inventoryItemId = other.inventoryItemId;
-
 
182
    this.quantity = other.quantity;
194
    this.itemId = other.itemId;
183
    this.orderId = other.orderId;
195
    this.warehouseId = other.warehouseId;
184
    this.warehouseId = other.warehouseId;
196
    this.purchaseId = other.purchaseId;
-
 
197
    if (other.isSetItemNumber()) {
-
 
198
      this.itemNumber = other.itemNumber;
-
 
199
    }
-
 
200
    if (other.isSetImeiNumber()) {
-
 
201
      this.imeiNumber = other.imeiNumber;
-
 
202
    }
-
 
203
    if (other.isSetType()) {
185
    if (other.isSetType()) {
204
      this.type = other.type;
186
      this.type = other.type;
205
    }
187
    }
206
    this.scannedAt = other.scannedAt;
188
    this.scannedAt = other.scannedAt;
207
  }
189
  }
Line 212... Line 194...
212
 
194
 
213
  @Override
195
  @Override
214
  public void clear() {
196
  public void clear() {
215
    setIdIsSet(false);
197
    setIdIsSet(false);
216
    this.id = 0;
198
    this.id = 0;
-
 
199
    setInventoryItemIdIsSet(false);
-
 
200
    this.inventoryItemId = 0;
-
 
201
    setQuantityIsSet(false);
-
 
202
    this.quantity = 0;
217
    setItemIdIsSet(false);
203
    setOrderIdIsSet(false);
218
    this.itemId = 0;
204
    this.orderId = 0;
219
    setWarehouseIdIsSet(false);
205
    setWarehouseIdIsSet(false);
220
    this.warehouseId = 0;
206
    this.warehouseId = 0;
221
    setPurchaseIdIsSet(false);
-
 
222
    this.purchaseId = 0;
-
 
223
    this.itemNumber = null;
-
 
224
    this.imeiNumber = null;
-
 
225
    this.type = null;
207
    this.type = null;
226
    setScannedAtIsSet(false);
208
    setScannedAtIsSet(false);
227
    this.scannedAt = 0;
209
    this.scannedAt = 0;
228
  }
210
  }
229
 
211
 
Line 247... Line 229...
247
 
229
 
248
  public void setIdIsSet(boolean value) {
230
  public void setIdIsSet(boolean value) {
249
    __isset_bit_vector.set(__ID_ISSET_ID, value);
231
    __isset_bit_vector.set(__ID_ISSET_ID, value);
250
  }
232
  }
251
 
233
 
252
  public long getItemId() {
234
  public long getInventoryItemId() {
253
    return this.itemId;
235
    return this.inventoryItemId;
254
  }
236
  }
255
 
237
 
256
  public void setItemId(long itemId) {
238
  public void setInventoryItemId(long inventoryItemId) {
257
    this.itemId = itemId;
239
    this.inventoryItemId = inventoryItemId;
258
    setItemIdIsSet(true);
240
    setInventoryItemIdIsSet(true);
259
  }
241
  }
260
 
242
 
261
  public void unsetItemId() {
243
  public void unsetInventoryItemId() {
262
    __isset_bit_vector.clear(__ITEMID_ISSET_ID);
244
    __isset_bit_vector.clear(__INVENTORYITEMID_ISSET_ID);
263
  }
245
  }
264
 
246
 
265
  /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
247
  /** Returns true if field inventoryItemId is set (has been assigned a value) and false otherwise */
266
  public boolean isSetItemId() {
248
  public boolean isSetInventoryItemId() {
267
    return __isset_bit_vector.get(__ITEMID_ISSET_ID);
249
    return __isset_bit_vector.get(__INVENTORYITEMID_ISSET_ID);
268
  }
250
  }
269
 
251
 
270
  public void setItemIdIsSet(boolean value) {
252
  public void setInventoryItemIdIsSet(boolean value) {
271
    __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
253
    __isset_bit_vector.set(__INVENTORYITEMID_ISSET_ID, value);
272
  }
254
  }
273
 
255
 
274
  public long getWarehouseId() {
256
  public long getQuantity() {
275
    return this.warehouseId;
257
    return this.quantity;
276
  }
258
  }
277
 
259
 
278
  public void setWarehouseId(long warehouseId) {
260
  public void setQuantity(long quantity) {
279
    this.warehouseId = warehouseId;
261
    this.quantity = quantity;
280
    setWarehouseIdIsSet(true);
262
    setQuantityIsSet(true);
281
  }
263
  }
282
 
264
 
283
  public void unsetWarehouseId() {
265
  public void unsetQuantity() {
284
    __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
266
    __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
285
  }
267
  }
286
 
268
 
287
  /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
269
  /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
288
  public boolean isSetWarehouseId() {
270
  public boolean isSetQuantity() {
289
    return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
271
    return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
290
  }
272
  }
291
 
273
 
292
  public void setWarehouseIdIsSet(boolean value) {
274
  public void setQuantityIsSet(boolean value) {
293
    __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
275
    __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
294
  }
-
 
295
 
-
 
296
  public long getPurchaseId() {
-
 
297
    return this.purchaseId;
-
 
298
  }
-
 
299
 
-
 
300
  public void setPurchaseId(long purchaseId) {
-
 
301
    this.purchaseId = purchaseId;
-
 
302
    setPurchaseIdIsSet(true);
-
 
303
  }
-
 
304
 
-
 
305
  public void unsetPurchaseId() {
-
 
306
    __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
-
 
307
  }
-
 
308
 
-
 
309
  /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
-
 
310
  public boolean isSetPurchaseId() {
-
 
311
    return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
-
 
312
  }
276
  }
313
 
277
 
314
  public void setPurchaseIdIsSet(boolean value) {
278
  public long getOrderId() {
315
    __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
279
    return this.orderId;
316
  }
280
  }
317
 
281
 
318
  public String getItemNumber() {
282
  public void setOrderId(long orderId) {
-
 
283
    this.orderId = orderId;
319
    return this.itemNumber;
284
    setOrderIdIsSet(true);
320
  }
285
  }
321
 
286
 
322
  public void setItemNumber(String itemNumber) {
287
  public void unsetOrderId() {
323
    this.itemNumber = itemNumber;
288
    __isset_bit_vector.clear(__ORDERID_ISSET_ID);
324
  }
289
  }
325
 
290
 
-
 
291
  /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
326
  public void unsetItemNumber() {
292
  public boolean isSetOrderId() {
327
    this.itemNumber = null;
293
    return __isset_bit_vector.get(__ORDERID_ISSET_ID);
328
  }
294
  }
329
 
295
 
330
  /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
-
 
331
  public boolean isSetItemNumber() {
-
 
332
    return this.itemNumber != null;
-
 
333
  }
-
 
334
 
-
 
335
  public void setItemNumberIsSet(boolean value) {
296
  public void setOrderIdIsSet(boolean value) {
336
    if (!value) {
-
 
337
      this.itemNumber = null;
297
    __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
338
    }
-
 
339
  }
298
  }
340
 
299
 
341
  public String getImeiNumber() {
300
  public long getWarehouseId() {
342
    return this.imeiNumber;
301
    return this.warehouseId;
343
  }
302
  }
344
 
303
 
345
  public void setImeiNumber(String imeiNumber) {
304
  public void setWarehouseId(long warehouseId) {
346
    this.imeiNumber = imeiNumber;
305
    this.warehouseId = warehouseId;
-
 
306
    setWarehouseIdIsSet(true);
347
  }
307
  }
348
 
308
 
349
  public void unsetImeiNumber() {
309
  public void unsetWarehouseId() {
350
    this.imeiNumber = null;
310
    __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
351
  }
311
  }
352
 
312
 
353
  /** Returns true if field imeiNumber is set (has been assigned a value) and false otherwise */
313
  /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
354
  public boolean isSetImeiNumber() {
314
  public boolean isSetWarehouseId() {
355
    return this.imeiNumber != null;
315
    return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
356
  }
316
  }
357
 
317
 
358
  public void setImeiNumberIsSet(boolean value) {
318
  public void setWarehouseIdIsSet(boolean value) {
359
    if (!value) {
-
 
360
      this.imeiNumber = null;
319
    __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
361
    }
-
 
362
  }
320
  }
363
 
321
 
364
  /**
322
  /**
365
   * 
323
   * 
366
   * @see ScanType
324
   * @see ScanType
Line 422... Line 380...
422
      } else {
380
      } else {
423
        setId((Long)value);
381
        setId((Long)value);
424
      }
382
      }
425
      break;
383
      break;
426
 
384
 
427
    case ITEM_ID:
385
    case INVENTORY_ITEM_ID:
428
      if (value == null) {
386
      if (value == null) {
429
        unsetItemId();
387
        unsetInventoryItemId();
430
      } else {
388
      } else {
431
        setItemId((Long)value);
389
        setInventoryItemId((Long)value);
432
      }
390
      }
433
      break;
391
      break;
434
 
392
 
435
    case WAREHOUSE_ID:
-
 
436
      if (value == null) {
-
 
437
        unsetWarehouseId();
-
 
438
      } else {
-
 
439
        setWarehouseId((Long)value);
-
 
440
      }
-
 
441
      break;
-
 
442
 
-
 
443
    case PURCHASE_ID:
393
    case QUANTITY:
444
      if (value == null) {
394
      if (value == null) {
445
        unsetPurchaseId();
395
        unsetQuantity();
446
      } else {
396
      } else {
447
        setPurchaseId((Long)value);
397
        setQuantity((Long)value);
448
      }
398
      }
449
      break;
399
      break;
450
 
400
 
451
    case ITEM_NUMBER:
401
    case ORDER_ID:
452
      if (value == null) {
402
      if (value == null) {
453
        unsetItemNumber();
403
        unsetOrderId();
454
      } else {
404
      } else {
455
        setItemNumber((String)value);
405
        setOrderId((Long)value);
456
      }
406
      }
457
      break;
407
      break;
458
 
408
 
459
    case IMEI_NUMBER:
409
    case WAREHOUSE_ID:
460
      if (value == null) {
410
      if (value == null) {
461
        unsetImeiNumber();
411
        unsetWarehouseId();
462
      } else {
412
      } else {
463
        setImeiNumber((String)value);
413
        setWarehouseId((Long)value);
464
      }
414
      }
465
      break;
415
      break;
466
 
416
 
467
    case TYPE:
417
    case TYPE:
468
      if (value == null) {
418
      if (value == null) {
Line 486... Line 436...
486
  public Object getFieldValue(_Fields field) {
436
  public Object getFieldValue(_Fields field) {
487
    switch (field) {
437
    switch (field) {
488
    case ID:
438
    case ID:
489
      return Long.valueOf(getId());
439
      return Long.valueOf(getId());
490
 
440
 
491
    case ITEM_ID:
441
    case INVENTORY_ITEM_ID:
492
      return Long.valueOf(getItemId());
442
      return Long.valueOf(getInventoryItemId());
493
 
-
 
494
    case WAREHOUSE_ID:
-
 
495
      return Long.valueOf(getWarehouseId());
-
 
496
 
443
 
497
    case PURCHASE_ID:
444
    case QUANTITY:
498
      return Long.valueOf(getPurchaseId());
445
      return Long.valueOf(getQuantity());
499
 
446
 
500
    case ITEM_NUMBER:
447
    case ORDER_ID:
501
      return getItemNumber();
448
      return Long.valueOf(getOrderId());
502
 
449
 
503
    case IMEI_NUMBER:
450
    case WAREHOUSE_ID:
504
      return getImeiNumber();
451
      return Long.valueOf(getWarehouseId());
505
 
452
 
506
    case TYPE:
453
    case TYPE:
507
      return getType();
454
      return getType();
508
 
455
 
509
    case SCANNED_AT:
456
    case SCANNED_AT:
Line 520... Line 467...
520
    }
467
    }
521
 
468
 
522
    switch (field) {
469
    switch (field) {
523
    case ID:
470
    case ID:
524
      return isSetId();
471
      return isSetId();
-
 
472
    case INVENTORY_ITEM_ID:
-
 
473
      return isSetInventoryItemId();
-
 
474
    case QUANTITY:
-
 
475
      return isSetQuantity();
525
    case ITEM_ID:
476
    case ORDER_ID:
526
      return isSetItemId();
477
      return isSetOrderId();
527
    case WAREHOUSE_ID:
478
    case WAREHOUSE_ID:
528
      return isSetWarehouseId();
479
      return isSetWarehouseId();
529
    case PURCHASE_ID:
-
 
530
      return isSetPurchaseId();
-
 
531
    case ITEM_NUMBER:
-
 
532
      return isSetItemNumber();
-
 
533
    case IMEI_NUMBER:
-
 
534
      return isSetImeiNumber();
-
 
535
    case TYPE:
480
    case TYPE:
536
      return isSetType();
481
      return isSetType();
537
    case SCANNED_AT:
482
    case SCANNED_AT:
538
      return isSetScannedAt();
483
      return isSetScannedAt();
539
    }
484
    }
Line 560... Line 505...
560
        return false;
505
        return false;
561
      if (this.id != that.id)
506
      if (this.id != that.id)
562
        return false;
507
        return false;
563
    }
508
    }
564
 
509
 
565
    boolean this_present_itemId = true;
510
    boolean this_present_inventoryItemId = true;
566
    boolean that_present_itemId = true;
511
    boolean that_present_inventoryItemId = true;
567
    if (this_present_itemId || that_present_itemId) {
512
    if (this_present_inventoryItemId || that_present_inventoryItemId) {
568
      if (!(this_present_itemId && that_present_itemId))
513
      if (!(this_present_inventoryItemId && that_present_inventoryItemId))
569
        return false;
-
 
570
      if (this.itemId != that.itemId)
-
 
571
        return false;
-
 
572
    }
-
 
573
 
-
 
574
    boolean this_present_warehouseId = true;
-
 
575
    boolean that_present_warehouseId = true;
-
 
576
    if (this_present_warehouseId || that_present_warehouseId) {
-
 
577
      if (!(this_present_warehouseId && that_present_warehouseId))
-
 
578
        return false;
514
        return false;
579
      if (this.warehouseId != that.warehouseId)
515
      if (this.inventoryItemId != that.inventoryItemId)
580
        return false;
516
        return false;
581
    }
517
    }
582
 
518
 
583
    boolean this_present_purchaseId = true;
519
    boolean this_present_quantity = true && this.isSetQuantity();
584
    boolean that_present_purchaseId = true;
520
    boolean that_present_quantity = true && that.isSetQuantity();
585
    if (this_present_purchaseId || that_present_purchaseId) {
521
    if (this_present_quantity || that_present_quantity) {
586
      if (!(this_present_purchaseId && that_present_purchaseId))
522
      if (!(this_present_quantity && that_present_quantity))
587
        return false;
523
        return false;
588
      if (this.purchaseId != that.purchaseId)
524
      if (this.quantity != that.quantity)
589
        return false;
525
        return false;
590
    }
526
    }
591
 
527
 
592
    boolean this_present_itemNumber = true && this.isSetItemNumber();
528
    boolean this_present_orderId = true && this.isSetOrderId();
593
    boolean that_present_itemNumber = true && that.isSetItemNumber();
529
    boolean that_present_orderId = true && that.isSetOrderId();
594
    if (this_present_itemNumber || that_present_itemNumber) {
530
    if (this_present_orderId || that_present_orderId) {
595
      if (!(this_present_itemNumber && that_present_itemNumber))
531
      if (!(this_present_orderId && that_present_orderId))
596
        return false;
532
        return false;
597
      if (!this.itemNumber.equals(that.itemNumber))
533
      if (this.orderId != that.orderId)
598
        return false;
534
        return false;
599
    }
535
    }
600
 
536
 
601
    boolean this_present_imeiNumber = true && this.isSetImeiNumber();
537
    boolean this_present_warehouseId = true;
602
    boolean that_present_imeiNumber = true && that.isSetImeiNumber();
538
    boolean that_present_warehouseId = true;
603
    if (this_present_imeiNumber || that_present_imeiNumber) {
539
    if (this_present_warehouseId || that_present_warehouseId) {
604
      if (!(this_present_imeiNumber && that_present_imeiNumber))
540
      if (!(this_present_warehouseId && that_present_warehouseId))
605
        return false;
541
        return false;
606
      if (!this.imeiNumber.equals(that.imeiNumber))
542
      if (this.warehouseId != that.warehouseId)
607
        return false;
543
        return false;
608
    }
544
    }
609
 
545
 
610
    boolean this_present_type = true && this.isSetType();
546
    boolean this_present_type = true && this.isSetType();
611
    boolean that_present_type = true && that.isSetType();
547
    boolean that_present_type = true && that.isSetType();
Line 649... Line 585...
649
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
585
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
650
      if (lastComparison != 0) {
586
      if (lastComparison != 0) {
651
        return lastComparison;
587
        return lastComparison;
652
      }
588
      }
653
    }
589
    }
654
    lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
590
    lastComparison = Boolean.valueOf(isSetInventoryItemId()).compareTo(typedOther.isSetInventoryItemId());
655
    if (lastComparison != 0) {
-
 
656
      return lastComparison;
-
 
657
    }
-
 
658
    if (isSetItemId()) {
-
 
659
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
-
 
660
      if (lastComparison != 0) {
-
 
661
        return lastComparison;
-
 
662
      }
-
 
663
    }
-
 
664
    lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
-
 
665
    if (lastComparison != 0) {
591
    if (lastComparison != 0) {
666
      return lastComparison;
592
      return lastComparison;
667
    }
593
    }
668
    if (isSetWarehouseId()) {
594
    if (isSetInventoryItemId()) {
669
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
595
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItemId, typedOther.inventoryItemId);
670
      if (lastComparison != 0) {
596
      if (lastComparison != 0) {
671
        return lastComparison;
597
        return lastComparison;
672
      }
598
      }
673
    }
599
    }
674
    lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
600
    lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
675
    if (lastComparison != 0) {
601
    if (lastComparison != 0) {
676
      return lastComparison;
602
      return lastComparison;
677
    }
603
    }
678
    if (isSetPurchaseId()) {
604
    if (isSetQuantity()) {
679
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
605
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
680
      if (lastComparison != 0) {
606
      if (lastComparison != 0) {
681
        return lastComparison;
607
        return lastComparison;
682
      }
608
      }
683
    }
609
    }
684
    lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
610
    lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
685
    if (lastComparison != 0) {
611
    if (lastComparison != 0) {
686
      return lastComparison;
612
      return lastComparison;
687
    }
613
    }
688
    if (isSetItemNumber()) {
614
    if (isSetOrderId()) {
689
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
615
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
690
      if (lastComparison != 0) {
616
      if (lastComparison != 0) {
691
        return lastComparison;
617
        return lastComparison;
692
      }
618
      }
693
    }
619
    }
694
    lastComparison = Boolean.valueOf(isSetImeiNumber()).compareTo(typedOther.isSetImeiNumber());
620
    lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
695
    if (lastComparison != 0) {
621
    if (lastComparison != 0) {
696
      return lastComparison;
622
      return lastComparison;
697
    }
623
    }
698
    if (isSetImeiNumber()) {
624
    if (isSetWarehouseId()) {
699
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imeiNumber, typedOther.imeiNumber);
625
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
700
      if (lastComparison != 0) {
626
      if (lastComparison != 0) {
701
        return lastComparison;
627
        return lastComparison;
702
      }
628
      }
703
    }
629
    }
704
    lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
630
    lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
Line 744... Line 670...
744
            setIdIsSet(true);
670
            setIdIsSet(true);
745
          } else { 
671
          } else { 
746
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
672
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
747
          }
673
          }
748
          break;
674
          break;
749
        case 2: // ITEM_ID
675
        case 2: // INVENTORY_ITEM_ID
750
          if (field.type == org.apache.thrift.protocol.TType.I64) {
676
          if (field.type == org.apache.thrift.protocol.TType.I64) {
751
            this.itemId = iprot.readI64();
677
            this.inventoryItemId = iprot.readI64();
752
            setItemIdIsSet(true);
678
            setInventoryItemIdIsSet(true);
753
          } else { 
679
          } else { 
754
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
680
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
755
          }
681
          }
756
          break;
682
          break;
757
        case 3: // WAREHOUSE_ID
683
        case 3: // QUANTITY
758
          if (field.type == org.apache.thrift.protocol.TType.I64) {
684
          if (field.type == org.apache.thrift.protocol.TType.I64) {
759
            this.warehouseId = iprot.readI64();
685
            this.quantity = iprot.readI64();
760
            setWarehouseIdIsSet(true);
686
            setQuantityIsSet(true);
761
          } else { 
687
          } else { 
762
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
688
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
763
          }
689
          }
764
          break;
690
          break;
765
        case 4: // PURCHASE_ID
691
        case 4: // ORDER_ID
766
          if (field.type == org.apache.thrift.protocol.TType.I64) {
692
          if (field.type == org.apache.thrift.protocol.TType.I64) {
767
            this.purchaseId = iprot.readI64();
693
            this.orderId = iprot.readI64();
768
            setPurchaseIdIsSet(true);
694
            setOrderIdIsSet(true);
769
          } else { 
-
 
770
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
771
          }
-
 
772
          break;
-
 
773
        case 5: // ITEM_NUMBER
-
 
774
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
775
            this.itemNumber = iprot.readString();
-
 
776
          } else { 
695
          } else { 
777
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
696
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
778
          }
697
          }
779
          break;
698
          break;
780
        case 6: // IMEI_NUMBER
699
        case 5: // WAREHOUSE_ID
781
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
700
          if (field.type == org.apache.thrift.protocol.TType.I64) {
782
            this.imeiNumber = iprot.readString();
701
            this.warehouseId = iprot.readI64();
-
 
702
            setWarehouseIdIsSet(true);
783
          } else { 
703
          } else { 
784
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
704
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
785
          }
705
          }
786
          break;
706
          break;
787
        case 7: // TYPE
707
        case 6: // TYPE
788
          if (field.type == org.apache.thrift.protocol.TType.I32) {
708
          if (field.type == org.apache.thrift.protocol.TType.I32) {
789
            this.type = ScanType.findByValue(iprot.readI32());
709
            this.type = ScanType.findByValue(iprot.readI32());
790
          } else { 
710
          } else { 
791
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
711
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
792
          }
712
          }
793
          break;
713
          break;
794
        case 8: // SCANNED_AT
714
        case 7: // SCANNED_AT
795
          if (field.type == org.apache.thrift.protocol.TType.I64) {
715
          if (field.type == org.apache.thrift.protocol.TType.I64) {
796
            this.scannedAt = iprot.readI64();
716
            this.scannedAt = iprot.readI64();
797
            setScannedAtIsSet(true);
717
            setScannedAtIsSet(true);
798
          } else { 
718
          } else { 
799
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
719
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
Line 813... Line 733...
813
 
733
 
814
    oprot.writeStructBegin(STRUCT_DESC);
734
    oprot.writeStructBegin(STRUCT_DESC);
815
    oprot.writeFieldBegin(ID_FIELD_DESC);
735
    oprot.writeFieldBegin(ID_FIELD_DESC);
816
    oprot.writeI64(this.id);
736
    oprot.writeI64(this.id);
817
    oprot.writeFieldEnd();
737
    oprot.writeFieldEnd();
818
    oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
738
    oprot.writeFieldBegin(INVENTORY_ITEM_ID_FIELD_DESC);
819
    oprot.writeI64(this.itemId);
739
    oprot.writeI64(this.inventoryItemId);
820
    oprot.writeFieldEnd();
-
 
821
    oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
-
 
822
    oprot.writeI64(this.warehouseId);
-
 
823
    oprot.writeFieldEnd();
-
 
824
    oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
-
 
825
    oprot.writeI64(this.purchaseId);
-
 
826
    oprot.writeFieldEnd();
740
    oprot.writeFieldEnd();
827
    if (this.itemNumber != null) {
741
    if (isSetQuantity()) {
828
      oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
742
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
829
      oprot.writeString(this.itemNumber);
743
      oprot.writeI64(this.quantity);
830
      oprot.writeFieldEnd();
744
      oprot.writeFieldEnd();
831
    }
745
    }
832
    if (this.imeiNumber != null) {
746
    if (isSetOrderId()) {
833
      oprot.writeFieldBegin(IMEI_NUMBER_FIELD_DESC);
747
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
834
      oprot.writeString(this.imeiNumber);
748
      oprot.writeI64(this.orderId);
835
      oprot.writeFieldEnd();
749
      oprot.writeFieldEnd();
836
    }
750
    }
-
 
751
    oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
-
 
752
    oprot.writeI64(this.warehouseId);
-
 
753
    oprot.writeFieldEnd();
837
    if (this.type != null) {
754
    if (this.type != null) {
838
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
755
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
839
      oprot.writeI32(this.type.getValue());
756
      oprot.writeI32(this.type.getValue());
840
      oprot.writeFieldEnd();
757
      oprot.writeFieldEnd();
841
    }
758
    }
Line 853... Line 770...
853
 
770
 
854
    sb.append("id:");
771
    sb.append("id:");
855
    sb.append(this.id);
772
    sb.append(this.id);
856
    first = false;
773
    first = false;
857
    if (!first) sb.append(", ");
774
    if (!first) sb.append(", ");
858
    sb.append("itemId:");
775
    sb.append("inventoryItemId:");
859
    sb.append(this.itemId);
776
    sb.append(this.inventoryItemId);
860
    first = false;
777
    first = false;
-
 
778
    if (isSetQuantity()) {
-
 
779
      if (!first) sb.append(", ");
-
 
780
      sb.append("quantity:");
-
 
781
      sb.append(this.quantity);
-
 
782
      first = false;
-
 
783
    }
-
 
784
    if (isSetOrderId()) {
-
 
785
      if (!first) sb.append(", ");
-
 
786
      sb.append("orderId:");
-
 
787
      sb.append(this.orderId);
-
 
788
      first = false;
-
 
789
    }
861
    if (!first) sb.append(", ");
790
    if (!first) sb.append(", ");
862
    sb.append("warehouseId:");
791
    sb.append("warehouseId:");
863
    sb.append(this.warehouseId);
792
    sb.append(this.warehouseId);
864
    first = false;
793
    first = false;
865
    if (!first) sb.append(", ");
794
    if (!first) sb.append(", ");
866
    sb.append("purchaseId:");
-
 
867
    sb.append(this.purchaseId);
-
 
868
    first = false;
-
 
869
    if (!first) sb.append(", ");
-
 
870
    sb.append("itemNumber:");
-
 
871
    if (this.itemNumber == null) {
-
 
872
      sb.append("null");
-
 
873
    } else {
-
 
874
      sb.append(this.itemNumber);
-
 
875
    }
-
 
876
    first = false;
-
 
877
    if (!first) sb.append(", ");
-
 
878
    sb.append("imeiNumber:");
-
 
879
    if (this.imeiNumber == null) {
-
 
880
      sb.append("null");
-
 
881
    } else {
-
 
882
      sb.append(this.imeiNumber);
-
 
883
    }
-
 
884
    first = false;
-
 
885
    if (!first) sb.append(", ");
-
 
886
    sb.append("type:");
795
    sb.append("type:");
887
    if (this.type == null) {
796
    if (this.type == null) {
888
      sb.append("null");
797
      sb.append("null");
889
    } else {
798
    } else {
890
      sb.append(this.type);
799
      sb.append(this.type);