Subversion Repositories SmartDukaan

Rev

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

Rev 3383 Rev 3430
Line 1... Line 1...
1
/**
1
/**
2
 * Autogenerated by Thrift
2
 * Autogenerated by Thrift Compiler (0.7.0)
3
 *
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
5
 */
6
package in.shop2020.warehouse;
6
package in.shop2020.warehouse;
7
 
7
 
Line 13... Line 13...
13
import java.util.Set;
13
import java.util.Set;
14
import java.util.HashSet;
14
import java.util.HashSet;
15
import java.util.EnumSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
16
import java.util.Collections;
17
import java.util.BitSet;
17
import java.util.BitSet;
-
 
18
import java.nio.ByteBuffer;
18
import java.util.Arrays;
19
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
import org.slf4j.LoggerFactory;
21
 
22
 
22
import org.apache.thrift.*;
-
 
23
import org.apache.thrift.meta_data.*;
-
 
24
import org.apache.thrift.protocol.*;
-
 
25
 
-
 
26
public class Scan implements TBase<Scan._Fields>, java.io.Serializable, Cloneable, Comparable<Scan> {
23
public class Scan implements org.apache.thrift.TBase<Scan, Scan._Fields>, java.io.Serializable, Cloneable {
27
  private static final TStruct STRUCT_DESC = new TStruct("Scan");
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Scan");
28
 
25
 
29
  private static final TField ID_FIELD_DESC = new TField("id", 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);
30
  private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
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);
31
  private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)3);
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);
32
  private static final TField PURCHASE_ID_FIELD_DESC = new TField("purchaseId", TType.I64, (short)4);
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);
33
  private static final TField ITEM_NUMBER_FIELD_DESC = new TField("itemNumber", TType.STRING, (short)5);
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);
34
  private static final TField IMEI_NUMBER_FIELD_DESC = new TField("imeiNumber", TType.STRING, (short)6);
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);
35
  private static final TField TYPE_FIELD_DESC = new TField("type", TType.I32, (short)7);
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);
36
  private static final TField SCANNED_AT_FIELD_DESC = new TField("scannedAt", TType.I64, (short)8);
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);
37
 
34
 
38
  private long id;
35
  private long id; // required
39
  private long itemId;
36
  private long itemId; // required
40
  private long warehouseId;
37
  private long warehouseId; // required
41
  private long purchaseId;
38
  private long purchaseId; // required
42
  private String itemNumber;
39
  private String itemNumber; // required
43
  private String imeiNumber;
40
  private String imeiNumber; // required
44
  private ScanType type;
41
  private ScanType type; // required
45
  private long scannedAt;
42
  private long scannedAt; // required
46
 
43
 
47
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
44
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
48
  public enum _Fields implements TFieldIdEnum {
45
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
49
    ID((short)1, "id"),
46
    ID((short)1, "id"),
50
    ITEM_ID((short)2, "itemId"),
47
    ITEM_ID((short)2, "itemId"),
51
    WAREHOUSE_ID((short)3, "warehouseId"),
48
    WAREHOUSE_ID((short)3, "warehouseId"),
52
    PURCHASE_ID((short)4, "purchaseId"),
49
    PURCHASE_ID((short)4, "purchaseId"),
53
    ITEM_NUMBER((short)5, "itemNumber"),
50
    ITEM_NUMBER((short)5, "itemNumber"),
Line 57... Line 54...
57
     * @see ScanType
54
     * @see ScanType
58
     */
55
     */
59
    TYPE((short)7, "type"),
56
    TYPE((short)7, "type"),
60
    SCANNED_AT((short)8, "scannedAt");
57
    SCANNED_AT((short)8, "scannedAt");
61
 
58
 
62
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
63
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
59
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
64
 
60
 
65
    static {
61
    static {
66
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
62
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
67
        byId.put((int)field._thriftId, field);
-
 
68
        byName.put(field.getFieldName(), field);
63
        byName.put(field.getFieldName(), field);
69
      }
64
      }
70
    }
65
    }
71
 
66
 
72
    /**
67
    /**
73
     * Find the _Fields constant that matches fieldId, or null if its not found.
68
     * Find the _Fields constant that matches fieldId, or null if its not found.
74
     */
69
     */
75
    public static _Fields findByThriftId(int fieldId) {
70
    public static _Fields findByThriftId(int fieldId) {
76
      return byId.get(fieldId);
71
      switch(fieldId) {
-
 
72
        case 1: // ID
-
 
73
          return ID;
-
 
74
        case 2: // ITEM_ID
-
 
75
          return ITEM_ID;
-
 
76
        case 3: // WAREHOUSE_ID
-
 
77
          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
-
 
85
          return TYPE;
-
 
86
        case 8: // SCANNED_AT
-
 
87
          return SCANNED_AT;
-
 
88
        default:
-
 
89
          return null;
-
 
90
      }
77
    }
91
    }
78
 
92
 
79
    /**
93
    /**
80
     * Find the _Fields constant that matches fieldId, throwing an exception
94
     * Find the _Fields constant that matches fieldId, throwing an exception
81
     * if it is not found.
95
     * if it is not found.
Line 116... Line 130...
116
  private static final int __WAREHOUSEID_ISSET_ID = 2;
130
  private static final int __WAREHOUSEID_ISSET_ID = 2;
117
  private static final int __PURCHASEID_ISSET_ID = 3;
131
  private static final int __PURCHASEID_ISSET_ID = 3;
118
  private static final int __SCANNEDAT_ISSET_ID = 4;
132
  private static final int __SCANNEDAT_ISSET_ID = 4;
119
  private BitSet __isset_bit_vector = new BitSet(5);
133
  private BitSet __isset_bit_vector = new BitSet(5);
120
 
134
 
121
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
135
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
122
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
-
 
123
        new FieldValueMetaData(TType.I64)));
-
 
124
    put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
-
 
125
        new FieldValueMetaData(TType.I64)));
-
 
126
    put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
-
 
127
        new FieldValueMetaData(TType.I64)));
-
 
128
    put(_Fields.PURCHASE_ID, new FieldMetaData("purchaseId", TFieldRequirementType.DEFAULT, 
-
 
129
        new FieldValueMetaData(TType.I64)));
-
 
130
    put(_Fields.ITEM_NUMBER, new FieldMetaData("itemNumber", TFieldRequirementType.DEFAULT, 
-
 
131
        new FieldValueMetaData(TType.STRING)));
-
 
132
    put(_Fields.IMEI_NUMBER, new FieldMetaData("imeiNumber", TFieldRequirementType.DEFAULT, 
-
 
133
        new FieldValueMetaData(TType.STRING)));
-
 
134
    put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
-
 
135
        new EnumMetaData(TType.ENUM, ScanType.class)));
-
 
136
    put(_Fields.SCANNED_AT, new FieldMetaData("scannedAt", TFieldRequirementType.DEFAULT, 
-
 
137
        new FieldValueMetaData(TType.I64)));
-
 
138
  }});
-
 
139
 
-
 
140
  static {
136
  static {
-
 
137
    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, 
-
 
139
        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, 
-
 
141
        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, 
-
 
143
        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, 
-
 
145
        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, 
-
 
151
        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, 
-
 
153
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
154
    metaDataMap = Collections.unmodifiableMap(tmpMap);
141
    FieldMetaData.addStructMetaDataMap(Scan.class, metaDataMap);
155
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Scan.class, metaDataMap);
142
  }
156
  }
143
 
157
 
144
  public Scan() {
158
  public Scan() {
145
  }
159
  }
146
 
160
 
Line 194... Line 208...
194
 
208
 
195
  public Scan deepCopy() {
209
  public Scan deepCopy() {
196
    return new Scan(this);
210
    return new Scan(this);
197
  }
211
  }
198
 
212
 
199
  @Deprecated
213
  @Override
200
  public Scan clone() {
214
  public void clear() {
-
 
215
    setIdIsSet(false);
-
 
216
    this.id = 0;
-
 
217
    setItemIdIsSet(false);
-
 
218
    this.itemId = 0;
-
 
219
    setWarehouseIdIsSet(false);
-
 
220
    this.warehouseId = 0;
201
    return new Scan(this);
221
    setPurchaseIdIsSet(false);
-
 
222
    this.purchaseId = 0;
-
 
223
    this.itemNumber = null;
-
 
224
    this.imeiNumber = null;
-
 
225
    this.type = null;
-
 
226
    setScannedAtIsSet(false);
-
 
227
    this.scannedAt = 0;
202
  }
228
  }
203
 
229
 
204
  public long getId() {
230
  public long getId() {
205
    return this.id;
231
    return this.id;
206
  }
232
  }
207
 
233
 
208
  public Scan setId(long id) {
234
  public void setId(long id) {
209
    this.id = id;
235
    this.id = id;
210
    setIdIsSet(true);
236
    setIdIsSet(true);
211
    return this;
-
 
212
  }
237
  }
213
 
238
 
214
  public void unsetId() {
239
  public void unsetId() {
215
    __isset_bit_vector.clear(__ID_ISSET_ID);
240
    __isset_bit_vector.clear(__ID_ISSET_ID);
216
  }
241
  }
217
 
242
 
218
  /** Returns true if field id is set (has been asigned a value) and false otherwise */
243
  /** Returns true if field id is set (has been assigned a value) and false otherwise */
219
  public boolean isSetId() {
244
  public boolean isSetId() {
220
    return __isset_bit_vector.get(__ID_ISSET_ID);
245
    return __isset_bit_vector.get(__ID_ISSET_ID);
221
  }
246
  }
222
 
247
 
223
  public void setIdIsSet(boolean value) {
248
  public void setIdIsSet(boolean value) {
Line 226... Line 251...
226
 
251
 
227
  public long getItemId() {
252
  public long getItemId() {
228
    return this.itemId;
253
    return this.itemId;
229
  }
254
  }
230
 
255
 
231
  public Scan setItemId(long itemId) {
256
  public void setItemId(long itemId) {
232
    this.itemId = itemId;
257
    this.itemId = itemId;
233
    setItemIdIsSet(true);
258
    setItemIdIsSet(true);
234
    return this;
-
 
235
  }
259
  }
236
 
260
 
237
  public void unsetItemId() {
261
  public void unsetItemId() {
238
    __isset_bit_vector.clear(__ITEMID_ISSET_ID);
262
    __isset_bit_vector.clear(__ITEMID_ISSET_ID);
239
  }
263
  }
240
 
264
 
241
  /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
265
  /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
242
  public boolean isSetItemId() {
266
  public boolean isSetItemId() {
243
    return __isset_bit_vector.get(__ITEMID_ISSET_ID);
267
    return __isset_bit_vector.get(__ITEMID_ISSET_ID);
244
  }
268
  }
245
 
269
 
246
  public void setItemIdIsSet(boolean value) {
270
  public void setItemIdIsSet(boolean value) {
Line 249... Line 273...
249
 
273
 
250
  public long getWarehouseId() {
274
  public long getWarehouseId() {
251
    return this.warehouseId;
275
    return this.warehouseId;
252
  }
276
  }
253
 
277
 
254
  public Scan setWarehouseId(long warehouseId) {
278
  public void setWarehouseId(long warehouseId) {
255
    this.warehouseId = warehouseId;
279
    this.warehouseId = warehouseId;
256
    setWarehouseIdIsSet(true);
280
    setWarehouseIdIsSet(true);
257
    return this;
-
 
258
  }
281
  }
259
 
282
 
260
  public void unsetWarehouseId() {
283
  public void unsetWarehouseId() {
261
    __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
284
    __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
262
  }
285
  }
263
 
286
 
264
  /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
287
  /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
265
  public boolean isSetWarehouseId() {
288
  public boolean isSetWarehouseId() {
266
    return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
289
    return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
267
  }
290
  }
268
 
291
 
269
  public void setWarehouseIdIsSet(boolean value) {
292
  public void setWarehouseIdIsSet(boolean value) {
Line 272... Line 295...
272
 
295
 
273
  public long getPurchaseId() {
296
  public long getPurchaseId() {
274
    return this.purchaseId;
297
    return this.purchaseId;
275
  }
298
  }
276
 
299
 
277
  public Scan setPurchaseId(long purchaseId) {
300
  public void setPurchaseId(long purchaseId) {
278
    this.purchaseId = purchaseId;
301
    this.purchaseId = purchaseId;
279
    setPurchaseIdIsSet(true);
302
    setPurchaseIdIsSet(true);
280
    return this;
-
 
281
  }
303
  }
282
 
304
 
283
  public void unsetPurchaseId() {
305
  public void unsetPurchaseId() {
284
    __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
306
    __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
285
  }
307
  }
286
 
308
 
287
  /** Returns true if field purchaseId is set (has been asigned a value) and false otherwise */
309
  /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
288
  public boolean isSetPurchaseId() {
310
  public boolean isSetPurchaseId() {
289
    return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
311
    return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
290
  }
312
  }
291
 
313
 
292
  public void setPurchaseIdIsSet(boolean value) {
314
  public void setPurchaseIdIsSet(boolean value) {
Line 295... Line 317...
295
 
317
 
296
  public String getItemNumber() {
318
  public String getItemNumber() {
297
    return this.itemNumber;
319
    return this.itemNumber;
298
  }
320
  }
299
 
321
 
300
  public Scan setItemNumber(String itemNumber) {
322
  public void setItemNumber(String itemNumber) {
301
    this.itemNumber = itemNumber;
323
    this.itemNumber = itemNumber;
302
    return this;
-
 
303
  }
324
  }
304
 
325
 
305
  public void unsetItemNumber() {
326
  public void unsetItemNumber() {
306
    this.itemNumber = null;
327
    this.itemNumber = null;
307
  }
328
  }
308
 
329
 
309
  /** Returns true if field itemNumber is set (has been asigned a value) and false otherwise */
330
  /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
310
  public boolean isSetItemNumber() {
331
  public boolean isSetItemNumber() {
311
    return this.itemNumber != null;
332
    return this.itemNumber != null;
312
  }
333
  }
313
 
334
 
314
  public void setItemNumberIsSet(boolean value) {
335
  public void setItemNumberIsSet(boolean value) {
Line 319... Line 340...
319
 
340
 
320
  public String getImeiNumber() {
341
  public String getImeiNumber() {
321
    return this.imeiNumber;
342
    return this.imeiNumber;
322
  }
343
  }
323
 
344
 
324
  public Scan setImeiNumber(String imeiNumber) {
345
  public void setImeiNumber(String imeiNumber) {
325
    this.imeiNumber = imeiNumber;
346
    this.imeiNumber = imeiNumber;
326
    return this;
-
 
327
  }
347
  }
328
 
348
 
329
  public void unsetImeiNumber() {
349
  public void unsetImeiNumber() {
330
    this.imeiNumber = null;
350
    this.imeiNumber = null;
331
  }
351
  }
332
 
352
 
333
  /** Returns true if field imeiNumber is set (has been asigned a value) and false otherwise */
353
  /** Returns true if field imeiNumber is set (has been assigned a value) and false otherwise */
334
  public boolean isSetImeiNumber() {
354
  public boolean isSetImeiNumber() {
335
    return this.imeiNumber != null;
355
    return this.imeiNumber != null;
336
  }
356
  }
337
 
357
 
338
  public void setImeiNumberIsSet(boolean value) {
358
  public void setImeiNumberIsSet(boolean value) {
Line 351... Line 371...
351
 
371
 
352
  /**
372
  /**
353
   * 
373
   * 
354
   * @see ScanType
374
   * @see ScanType
355
   */
375
   */
356
  public Scan setType(ScanType type) {
376
  public void setType(ScanType type) {
357
    this.type = type;
377
    this.type = type;
358
    return this;
-
 
359
  }
378
  }
360
 
379
 
361
  public void unsetType() {
380
  public void unsetType() {
362
    this.type = null;
381
    this.type = null;
363
  }
382
  }
364
 
383
 
365
  /** Returns true if field type is set (has been asigned a value) and false otherwise */
384
  /** Returns true if field type is set (has been assigned a value) and false otherwise */
366
  public boolean isSetType() {
385
  public boolean isSetType() {
367
    return this.type != null;
386
    return this.type != null;
368
  }
387
  }
369
 
388
 
370
  public void setTypeIsSet(boolean value) {
389
  public void setTypeIsSet(boolean value) {
Line 375... Line 394...
375
 
394
 
376
  public long getScannedAt() {
395
  public long getScannedAt() {
377
    return this.scannedAt;
396
    return this.scannedAt;
378
  }
397
  }
379
 
398
 
380
  public Scan setScannedAt(long scannedAt) {
399
  public void setScannedAt(long scannedAt) {
381
    this.scannedAt = scannedAt;
400
    this.scannedAt = scannedAt;
382
    setScannedAtIsSet(true);
401
    setScannedAtIsSet(true);
383
    return this;
-
 
384
  }
402
  }
385
 
403
 
386
  public void unsetScannedAt() {
404
  public void unsetScannedAt() {
387
    __isset_bit_vector.clear(__SCANNEDAT_ISSET_ID);
405
    __isset_bit_vector.clear(__SCANNEDAT_ISSET_ID);
388
  }
406
  }
389
 
407
 
390
  /** Returns true if field scannedAt is set (has been asigned a value) and false otherwise */
408
  /** Returns true if field scannedAt is set (has been assigned a value) and false otherwise */
391
  public boolean isSetScannedAt() {
409
  public boolean isSetScannedAt() {
392
    return __isset_bit_vector.get(__SCANNEDAT_ISSET_ID);
410
    return __isset_bit_vector.get(__SCANNEDAT_ISSET_ID);
393
  }
411
  }
394
 
412
 
395
  public void setScannedAtIsSet(boolean value) {
413
  public void setScannedAtIsSet(boolean value) {
Line 463... Line 481...
463
      break;
481
      break;
464
 
482
 
465
    }
483
    }
466
  }
484
  }
467
 
485
 
468
  public void setFieldValue(int fieldID, Object value) {
-
 
469
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
470
  }
-
 
471
 
-
 
472
  public Object getFieldValue(_Fields field) {
486
  public Object getFieldValue(_Fields field) {
473
    switch (field) {
487
    switch (field) {
474
    case ID:
488
    case ID:
475
      return new Long(getId());
489
      return Long.valueOf(getId());
476
 
490
 
477
    case ITEM_ID:
491
    case ITEM_ID:
478
      return new Long(getItemId());
492
      return Long.valueOf(getItemId());
479
 
493
 
480
    case WAREHOUSE_ID:
494
    case WAREHOUSE_ID:
481
      return new Long(getWarehouseId());
495
      return Long.valueOf(getWarehouseId());
482
 
496
 
483
    case PURCHASE_ID:
497
    case PURCHASE_ID:
484
      return new Long(getPurchaseId());
498
      return Long.valueOf(getPurchaseId());
485
 
499
 
486
    case ITEM_NUMBER:
500
    case ITEM_NUMBER:
487
      return getItemNumber();
501
      return getItemNumber();
488
 
502
 
489
    case IMEI_NUMBER:
503
    case IMEI_NUMBER:
Line 491... Line 505...
491
 
505
 
492
    case TYPE:
506
    case TYPE:
493
      return getType();
507
      return getType();
494
 
508
 
495
    case SCANNED_AT:
509
    case SCANNED_AT:
496
      return new Long(getScannedAt());
510
      return Long.valueOf(getScannedAt());
497
 
511
 
498
    }
512
    }
499
    throw new IllegalStateException();
513
    throw new IllegalStateException();
500
  }
514
  }
501
 
515
 
502
  public Object getFieldValue(int fieldId) {
-
 
503
    return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
504
  }
-
 
505
 
-
 
506
  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
516
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
507
  public boolean isSet(_Fields field) {
517
  public boolean isSet(_Fields field) {
-
 
518
    if (field == null) {
-
 
519
      throw new IllegalArgumentException();
-
 
520
    }
-
 
521
 
508
    switch (field) {
522
    switch (field) {
509
    case ID:
523
    case ID:
510
      return isSetId();
524
      return isSetId();
511
    case ITEM_ID:
525
    case ITEM_ID:
512
      return isSetItemId();
526
      return isSetItemId();
Line 524... Line 538...
524
      return isSetScannedAt();
538
      return isSetScannedAt();
525
    }
539
    }
526
    throw new IllegalStateException();
540
    throw new IllegalStateException();
527
  }
541
  }
528
 
542
 
529
  public boolean isSet(int fieldID) {
-
 
530
    return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
531
  }
-
 
532
 
-
 
533
  @Override
543
  @Override
534
  public boolean equals(Object that) {
544
  public boolean equals(Object that) {
535
    if (that == null)
545
    if (that == null)
536
      return false;
546
      return false;
537
    if (that instanceof Scan)
547
    if (that instanceof Scan)
Line 629... Line 639...
629
    }
639
    }
630
 
640
 
631
    int lastComparison = 0;
641
    int lastComparison = 0;
632
    Scan typedOther = (Scan)other;
642
    Scan typedOther = (Scan)other;
633
 
643
 
634
    lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
644
    lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
635
    if (lastComparison != 0) {
645
    if (lastComparison != 0) {
636
      return lastComparison;
646
      return lastComparison;
637
    }
647
    }
-
 
648
    if (isSetId()) {
638
    lastComparison = TBaseHelper.compareTo(id, typedOther.id);
649
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
639
    if (lastComparison != 0) {
650
      if (lastComparison != 0) {
640
      return lastComparison;
651
        return lastComparison;
-
 
652
      }
641
    }
653
    }
642
    lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
654
    lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
643
    if (lastComparison != 0) {
655
    if (lastComparison != 0) {
644
      return lastComparison;
656
      return lastComparison;
645
    }
657
    }
-
 
658
    if (isSetItemId()) {
646
    lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
659
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
647
    if (lastComparison != 0) {
660
      if (lastComparison != 0) {
648
      return lastComparison;
661
        return lastComparison;
-
 
662
      }
649
    }
663
    }
650
    lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
664
    lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
651
    if (lastComparison != 0) {
665
    if (lastComparison != 0) {
652
      return lastComparison;
666
      return lastComparison;
653
    }
667
    }
-
 
668
    if (isSetWarehouseId()) {
654
    lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
669
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
655
    if (lastComparison != 0) {
670
      if (lastComparison != 0) {
656
      return lastComparison;
671
        return lastComparison;
-
 
672
      }
657
    }
673
    }
658
    lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(isSetPurchaseId());
674
    lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
659
    if (lastComparison != 0) {
675
    if (lastComparison != 0) {
660
      return lastComparison;
676
      return lastComparison;
661
    }
677
    }
-
 
678
    if (isSetPurchaseId()) {
662
    lastComparison = TBaseHelper.compareTo(purchaseId, typedOther.purchaseId);
679
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
663
    if (lastComparison != 0) {
680
      if (lastComparison != 0) {
664
      return lastComparison;
681
        return lastComparison;
-
 
682
      }
665
    }
683
    }
666
    lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(isSetItemNumber());
684
    lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
667
    if (lastComparison != 0) {
685
    if (lastComparison != 0) {
668
      return lastComparison;
686
      return lastComparison;
669
    }
687
    }
-
 
688
    if (isSetItemNumber()) {
670
    lastComparison = TBaseHelper.compareTo(itemNumber, typedOther.itemNumber);
689
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
671
    if (lastComparison != 0) {
690
      if (lastComparison != 0) {
672
      return lastComparison;
691
        return lastComparison;
-
 
692
      }
673
    }
693
    }
674
    lastComparison = Boolean.valueOf(isSetImeiNumber()).compareTo(isSetImeiNumber());
694
    lastComparison = Boolean.valueOf(isSetImeiNumber()).compareTo(typedOther.isSetImeiNumber());
675
    if (lastComparison != 0) {
695
    if (lastComparison != 0) {
676
      return lastComparison;
696
      return lastComparison;
677
    }
697
    }
-
 
698
    if (isSetImeiNumber()) {
678
    lastComparison = TBaseHelper.compareTo(imeiNumber, typedOther.imeiNumber);
699
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imeiNumber, typedOther.imeiNumber);
679
    if (lastComparison != 0) {
700
      if (lastComparison != 0) {
680
      return lastComparison;
701
        return lastComparison;
-
 
702
      }
681
    }
703
    }
682
    lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
704
    lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
683
    if (lastComparison != 0) {
705
    if (lastComparison != 0) {
684
      return lastComparison;
706
      return lastComparison;
685
    }
707
    }
-
 
708
    if (isSetType()) {
686
    lastComparison = TBaseHelper.compareTo(type, typedOther.type);
709
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
687
    if (lastComparison != 0) {
710
      if (lastComparison != 0) {
688
      return lastComparison;
711
        return lastComparison;
-
 
712
      }
689
    }
713
    }
690
    lastComparison = Boolean.valueOf(isSetScannedAt()).compareTo(isSetScannedAt());
714
    lastComparison = Boolean.valueOf(isSetScannedAt()).compareTo(typedOther.isSetScannedAt());
691
    if (lastComparison != 0) {
715
    if (lastComparison != 0) {
692
      return lastComparison;
716
      return lastComparison;
693
    }
717
    }
-
 
718
    if (isSetScannedAt()) {
694
    lastComparison = TBaseHelper.compareTo(scannedAt, typedOther.scannedAt);
719
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scannedAt, typedOther.scannedAt);
695
    if (lastComparison != 0) {
720
      if (lastComparison != 0) {
696
      return lastComparison;
721
        return lastComparison;
-
 
722
      }
697
    }
723
    }
698
    return 0;
724
    return 0;
699
  }
725
  }
700
 
726
 
-
 
727
  public _Fields fieldForId(int fieldId) {
-
 
728
    return _Fields.findByThriftId(fieldId);
-
 
729
  }
-
 
730
 
701
  public void read(TProtocol iprot) throws TException {
731
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
702
    TField field;
732
    org.apache.thrift.protocol.TField field;
703
    iprot.readStructBegin();
733
    iprot.readStructBegin();
704
    while (true)
734
    while (true)
705
    {
735
    {
706
      field = iprot.readFieldBegin();
736
      field = iprot.readFieldBegin();
707
      if (field.type == TType.STOP) { 
737
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
708
        break;
738
        break;
709
      }
739
      }
710
      _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
711
      if (fieldId == null) {
-
 
712
        TProtocolUtil.skip(iprot, field.type);
-
 
713
      } else {
-
 
714
        switch (fieldId) {
740
      switch (field.id) {
715
          case ID:
741
        case 1: // ID
716
            if (field.type == TType.I64) {
742
          if (field.type == org.apache.thrift.protocol.TType.I64) {
717
              this.id = iprot.readI64();
743
            this.id = iprot.readI64();
718
              setIdIsSet(true);
744
            setIdIsSet(true);
719
            } else { 
745
          } else { 
720
              TProtocolUtil.skip(iprot, field.type);
746
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
721
            }
747
          }
722
            break;
748
          break;
723
          case ITEM_ID:
749
        case 2: // ITEM_ID
724
            if (field.type == TType.I64) {
750
          if (field.type == org.apache.thrift.protocol.TType.I64) {
725
              this.itemId = iprot.readI64();
751
            this.itemId = iprot.readI64();
726
              setItemIdIsSet(true);
752
            setItemIdIsSet(true);
727
            } else { 
753
          } else { 
728
              TProtocolUtil.skip(iprot, field.type);
754
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
729
            }
755
          }
730
            break;
756
          break;
731
          case WAREHOUSE_ID:
757
        case 3: // WAREHOUSE_ID
732
            if (field.type == TType.I64) {
758
          if (field.type == org.apache.thrift.protocol.TType.I64) {
733
              this.warehouseId = iprot.readI64();
759
            this.warehouseId = iprot.readI64();
734
              setWarehouseIdIsSet(true);
760
            setWarehouseIdIsSet(true);
735
            } else { 
761
          } else { 
736
              TProtocolUtil.skip(iprot, field.type);
762
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
737
            }
763
          }
738
            break;
764
          break;
739
          case PURCHASE_ID:
765
        case 4: // PURCHASE_ID
740
            if (field.type == TType.I64) {
766
          if (field.type == org.apache.thrift.protocol.TType.I64) {
741
              this.purchaseId = iprot.readI64();
767
            this.purchaseId = iprot.readI64();
742
              setPurchaseIdIsSet(true);
768
            setPurchaseIdIsSet(true);
743
            } else { 
769
          } else { 
744
              TProtocolUtil.skip(iprot, field.type);
770
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
745
            }
771
          }
746
            break;
772
          break;
747
          case ITEM_NUMBER:
773
        case 5: // ITEM_NUMBER
748
            if (field.type == TType.STRING) {
774
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
749
              this.itemNumber = iprot.readString();
775
            this.itemNumber = iprot.readString();
750
            } else { 
776
          } else { 
751
              TProtocolUtil.skip(iprot, field.type);
777
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
752
            }
778
          }
753
            break;
779
          break;
754
          case IMEI_NUMBER:
780
        case 6: // IMEI_NUMBER
755
            if (field.type == TType.STRING) {
781
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
756
              this.imeiNumber = iprot.readString();
782
            this.imeiNumber = iprot.readString();
757
            } else { 
783
          } else { 
758
              TProtocolUtil.skip(iprot, field.type);
784
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
759
            }
785
          }
760
            break;
786
          break;
761
          case TYPE:
787
        case 7: // TYPE
762
            if (field.type == TType.I32) {
788
          if (field.type == org.apache.thrift.protocol.TType.I32) {
763
              this.type = ScanType.findByValue(iprot.readI32());
789
            this.type = ScanType.findByValue(iprot.readI32());
764
            } else { 
790
          } else { 
765
              TProtocolUtil.skip(iprot, field.type);
791
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
766
            }
792
          }
767
            break;
793
          break;
768
          case SCANNED_AT:
794
        case 8: // SCANNED_AT
769
            if (field.type == TType.I64) {
795
          if (field.type == org.apache.thrift.protocol.TType.I64) {
770
              this.scannedAt = iprot.readI64();
796
            this.scannedAt = iprot.readI64();
771
              setScannedAtIsSet(true);
797
            setScannedAtIsSet(true);
772
            } else { 
798
          } else { 
773
              TProtocolUtil.skip(iprot, field.type);
799
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
774
            }
800
          }
775
            break;
801
          break;
776
        }
802
        default:
777
        iprot.readFieldEnd();
803
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
778
      }
804
      }
-
 
805
      iprot.readFieldEnd();
779
    }
806
    }
780
    iprot.readStructEnd();
807
    iprot.readStructEnd();
781
    validate();
808
    validate();
782
  }
809
  }
783
 
810
 
784
  public void write(TProtocol oprot) throws TException {
811
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
785
    validate();
812
    validate();
786
 
813
 
787
    oprot.writeStructBegin(STRUCT_DESC);
814
    oprot.writeStructBegin(STRUCT_DESC);
788
    oprot.writeFieldBegin(ID_FIELD_DESC);
815
    oprot.writeFieldBegin(ID_FIELD_DESC);
789
    oprot.writeI64(this.id);
816
    oprot.writeI64(this.id);
Line 858... Line 885...
858
    if (!first) sb.append(", ");
885
    if (!first) sb.append(", ");
859
    sb.append("type:");
886
    sb.append("type:");
860
    if (this.type == null) {
887
    if (this.type == null) {
861
      sb.append("null");
888
      sb.append("null");
862
    } else {
889
    } else {
863
      String type_name = type.name();
-
 
864
      if (type_name != null) {
-
 
865
        sb.append(type_name);
-
 
866
        sb.append(" (");
-
 
867
      }
-
 
868
      sb.append(this.type);
890
      sb.append(this.type);
869
      if (type_name != null) {
-
 
870
        sb.append(")");
-
 
871
      }
-
 
872
    }
891
    }
873
    first = false;
892
    first = false;
874
    if (!first) sb.append(", ");
893
    if (!first) sb.append(", ");
875
    sb.append("scannedAt:");
894
    sb.append("scannedAt:");
876
    sb.append(this.scannedAt);
895
    sb.append(this.scannedAt);
877
    first = false;
896
    first = false;
878
    sb.append(")");
897
    sb.append(")");
879
    return sb.toString();
898
    return sb.toString();
880
  }
899
  }
881
 
900
 
882
  public void validate() throws TException {
901
  public void validate() throws org.apache.thrift.TException {
883
    // check for required fields
902
    // check for required fields
884
  }
903
  }
885
 
904
 
-
 
905
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
906
    try {
-
 
907
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
908
    } catch (org.apache.thrift.TException te) {
-
 
909
      throw new java.io.IOException(te);
-
 
910
    }
-
 
911
  }
-
 
912
 
-
 
913
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
914
    try {
-
 
915
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
916
      __isset_bit_vector = new BitSet(1);
-
 
917
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
918
    } catch (org.apache.thrift.TException te) {
-
 
919
      throw new java.io.IOException(te);
-
 
920
    }
-
 
921
  }
-
 
922
 
886
}
923
}
887
 
924