Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
2820 chandransh 1
/**
3430 rajveer 2
 * Autogenerated by Thrift Compiler (0.7.0)
2820 chandransh 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;
3430 rajveer 18
import java.nio.ByteBuffer;
2820 chandransh 19
import java.util.Arrays;
20
import org.slf4j.Logger;
21
import org.slf4j.LoggerFactory;
22
 
23
public class WarehouseService {
24
 
3374 rajveer 25
  public interface Iface extends in.shop2020.generic.GenericService.Iface {
2820 chandransh 26
 
27
    /**
4496 mandeep.dh 28
     * Retrieves serialized inventory item given a serial number
2832 chandransh 29
     * 
4496 mandeep.dh 30
     * @param serialNumber
2832 chandransh 31
     */
4541 mandeep.dh 32
    public InventoryItem getInventoryItem(String serialNumber) throws WarehouseServiceException, org.apache.thrift.TException;
2832 chandransh 33
 
34
    /**
5361 mandeep.dh 35
     * Retrieves non-serialized inventory item from a given supplier
2820 chandransh 36
     * 
5530 mandeep.dh 37
     * @param itemNumber
4496 mandeep.dh 38
     * @param itemId
5530 mandeep.dh 39
     * @param fulfilmentWarehouseId
2820 chandransh 40
     */
5530 mandeep.dh 41
    public InventoryItem getNonSeralizedInventoryItem(String itemNumber, long itemId, long fulfilmentWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException;
2820 chandransh 42
 
43
    /**
4496 mandeep.dh 44
     * Scan non-serialized items.
2820 chandransh 45
     * 
5361 mandeep.dh 46
     * @param inventoryItem
2820 chandransh 47
     * @param type
4496 mandeep.dh 48
     * @param quantity
5361 mandeep.dh 49
     * @param billingWarehouseId
2820 chandransh 50
     */
5361 mandeep.dh 51
    public void scan(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException;
2820 chandransh 52
 
4496 mandeep.dh 53
    /**
54
     * Scan serialized items linked with an order. Returns its price.
55
     * 
4555 mandeep.dh 56
     * @param serialNumber
4496 mandeep.dh 57
     * @param type
58
     * @param orderId
5110 mandeep.dh 59
     * @param fulfilmentWarehouseId
60
     * @param quantity
61
     * @param billingWarehouseId
4496 mandeep.dh 62
     */
5110 mandeep.dh 63
    public InventoryItem scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException;
4496 mandeep.dh 64
 
65
    /**
66
     * Scan non-serialized items linked with an order.
67
     * 
5361 mandeep.dh 68
     * @param inventoryItem
4496 mandeep.dh 69
     * @param type
70
     * @param quantity
71
     * @param orderId
5110 mandeep.dh 72
     * @param fulfilmentWarehouseId
5361 mandeep.dh 73
     * @param billingWarehouseId
4496 mandeep.dh 74
     */
5361 mandeep.dh 75
    public InventoryItem scanForOrder(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException;
4496 mandeep.dh 76
 
77
    /**
78
     * Created item number to item id mapping
79
     * 
80
     * @param itemNumber
81
     * @param itemId
82
     */
83
    public void createItemNumberMapping(String itemNumber, long itemId) throws org.apache.thrift.TException;
84
 
4622 amit.gupta 85
    /**
86
     * Get itemNumber mappings for itemId
87
     * 
88
     * @param itemId
89
     */
90
    public List<String> getItemNumbers(long itemId) throws org.apache.thrift.TException;
91
 
5110 mandeep.dh 92
    /**
93
     * Gets item ids for a given item number
94
     * 
95
     * @param itemNumber
96
     */
97
    public List<Long> getItemIds(String itemNumber) throws org.apache.thrift.TException;
98
 
5185 mandeep.dh 99
    /**
100
     * Retrieves all inventory items given a last scan type
101
     * 
102
     * @param lastScanType
103
     */
104
    public List<InventoryItem> getInventoryItemsFromLastScanType(ScanType lastScanType) throws WarehouseServiceException, org.apache.thrift.TException;
105
 
106
    /**
107
     * Retrieves inventory item given a inventoryItem id
108
     * 
109
     * @param inventoryItemId
110
     */
111
    public InventoryItem getInventoryItemFromId(long inventoryItemId) throws WarehouseServiceException, org.apache.thrift.TException;
112
 
5372 mandeep.dh 113
    /**
114
     * Returns the purchase scans grouped by items for Purchase register reconciliation
115
     * 
116
     * @param startDate
117
     * @param endDate
118
     */
119
    public List<DetailedPurchaseScan> getPurchaseScans(long startDate, long endDate) throws org.apache.thrift.TException;
120
 
5496 mandeep.dh 121
    /**
122
     * Returns the invoices and the count of scans against on a given day.
123
     * 
124
     * @param date
125
     */
126
    public List<InvoiceScan> fetchScansPerInvoiceNumber(long date) throws org.apache.thrift.TException;
127
 
2820 chandransh 128
  }
129
 
3430 rajveer 130
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
131
 
4496 mandeep.dh 132
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 133
 
5530 mandeep.dh 134
    public void getNonSeralizedInventoryItem(String itemNumber, long itemId, long fulfilmentWarehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getNonSeralizedInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 135
 
5361 mandeep.dh 136
    public void scan(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scan_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 137
 
5110 mandeep.dh 138
    public void scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanSerializedItemForOrder_call> resultHandler) throws org.apache.thrift.TException;
4496 mandeep.dh 139
 
5361 mandeep.dh 140
    public void scanForOrder(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanForOrder_call> resultHandler) throws org.apache.thrift.TException;
4496 mandeep.dh 141
 
142
    public void createItemNumberMapping(String itemNumber, long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createItemNumberMapping_call> resultHandler) throws org.apache.thrift.TException;
143
 
4622 amit.gupta 144
    public void getItemNumbers(long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemNumbers_call> resultHandler) throws org.apache.thrift.TException;
145
 
5110 mandeep.dh 146
    public void getItemIds(String itemNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemIds_call> resultHandler) throws org.apache.thrift.TException;
147
 
5185 mandeep.dh 148
    public void getInventoryItemsFromLastScanType(ScanType lastScanType, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemsFromLastScanType_call> resultHandler) throws org.apache.thrift.TException;
149
 
150
    public void getInventoryItemFromId(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemFromId_call> resultHandler) throws org.apache.thrift.TException;
151
 
5372 mandeep.dh 152
    public void getPurchaseScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseScans_call> resultHandler) throws org.apache.thrift.TException;
153
 
5496 mandeep.dh 154
    public void fetchScansPerInvoiceNumber(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fetchScansPerInvoiceNumber_call> resultHandler) throws org.apache.thrift.TException;
155
 
3430 rajveer 156
  }
157
 
3374 rajveer 158
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
3430 rajveer 159
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
160
      public Factory() {}
161
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
162
        return new Client(prot);
163
      }
164
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
165
        return new Client(iprot, oprot);
166
      }
167
    }
168
 
169
    public Client(org.apache.thrift.protocol.TProtocol prot)
2820 chandransh 170
    {
3430 rajveer 171
      super(prot, prot);
2820 chandransh 172
    }
173
 
3430 rajveer 174
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
3374 rajveer 175
      super(iprot, oprot);
2820 chandransh 176
    }
177
 
4541 mandeep.dh 178
    public InventoryItem getInventoryItem(String serialNumber) throws WarehouseServiceException, org.apache.thrift.TException
2832 chandransh 179
    {
4496 mandeep.dh 180
      send_getInventoryItem(serialNumber);
181
      return recv_getInventoryItem();
2832 chandransh 182
    }
183
 
4496 mandeep.dh 184
    public void send_getInventoryItem(String serialNumber) throws org.apache.thrift.TException
2832 chandransh 185
    {
4496 mandeep.dh 186
      getInventoryItem_args args = new getInventoryItem_args();
187
      args.setSerialNumber(serialNumber);
188
      sendBase("getInventoryItem", args);
2832 chandransh 189
    }
190
 
4541 mandeep.dh 191
    public InventoryItem recv_getInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException
2832 chandransh 192
    {
4496 mandeep.dh 193
      getInventoryItem_result result = new getInventoryItem_result();
194
      receiveBase(result, "getInventoryItem");
2832 chandransh 195
      if (result.isSetSuccess()) {
196
        return result.success;
197
      }
4541 mandeep.dh 198
      if (result.wex != null) {
199
        throw result.wex;
200
      }
4496 mandeep.dh 201
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItem failed: unknown result");
202
    }
203
 
5530 mandeep.dh 204
    public InventoryItem getNonSeralizedInventoryItem(String itemNumber, long itemId, long fulfilmentWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 205
    {
5530 mandeep.dh 206
      send_getNonSeralizedInventoryItem(itemNumber, itemId, fulfilmentWarehouseId);
5361 mandeep.dh 207
      return recv_getNonSeralizedInventoryItem();
4496 mandeep.dh 208
    }
209
 
5530 mandeep.dh 210
    public void send_getNonSeralizedInventoryItem(String itemNumber, long itemId, long fulfilmentWarehouseId) throws org.apache.thrift.TException
4496 mandeep.dh 211
    {
5361 mandeep.dh 212
      getNonSeralizedInventoryItem_args args = new getNonSeralizedInventoryItem_args();
5530 mandeep.dh 213
      args.setItemNumber(itemNumber);
4496 mandeep.dh 214
      args.setItemId(itemId);
5530 mandeep.dh 215
      args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
5361 mandeep.dh 216
      sendBase("getNonSeralizedInventoryItem", args);
4496 mandeep.dh 217
    }
218
 
5361 mandeep.dh 219
    public InventoryItem recv_getNonSeralizedInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 220
    {
5361 mandeep.dh 221
      getNonSeralizedInventoryItem_result result = new getNonSeralizedInventoryItem_result();
222
      receiveBase(result, "getNonSeralizedInventoryItem");
4496 mandeep.dh 223
      if (result.isSetSuccess()) {
224
        return result.success;
2832 chandransh 225
      }
5361 mandeep.dh 226
      if (result.wex != null) {
227
        throw result.wex;
2820 chandransh 228
      }
5361 mandeep.dh 229
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getNonSeralizedInventoryItem failed: unknown result");
4496 mandeep.dh 230
    }
231
 
5361 mandeep.dh 232
    public void scan(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 233
    {
5361 mandeep.dh 234
      send_scan(inventoryItem, type, quantity, billingWarehouseId);
4496 mandeep.dh 235
      recv_scan();
3383 chandransh 236
    }
237
 
5361 mandeep.dh 238
    public void send_scan(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId) throws org.apache.thrift.TException
3383 chandransh 239
    {
4496 mandeep.dh 240
      scan_args args = new scan_args();
5361 mandeep.dh 241
      args.setInventoryItem(inventoryItem);
4496 mandeep.dh 242
      args.setType(type);
243
      args.setQuantity(quantity);
5361 mandeep.dh 244
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 245
      sendBase("scan", args);
3383 chandransh 246
    }
247
 
4496 mandeep.dh 248
    public void recv_scan() throws WarehouseServiceException, org.apache.thrift.TException
3383 chandransh 249
    {
4496 mandeep.dh 250
      scan_result result = new scan_result();
251
      receiveBase(result, "scan");
252
      if (result.wex != null) {
253
        throw result.wex;
254
      }
255
      return;
256
    }
257
 
5110 mandeep.dh 258
    public InventoryItem scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 259
    {
5110 mandeep.dh 260
      send_scanSerializedItemForOrder(serialNumber, type, orderId, fulfilmentWarehouseId, quantity, billingWarehouseId);
4496 mandeep.dh 261
      return recv_scanSerializedItemForOrder();
262
    }
263
 
5110 mandeep.dh 264
    public void send_scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId) throws org.apache.thrift.TException
4496 mandeep.dh 265
    {
266
      scanSerializedItemForOrder_args args = new scanSerializedItemForOrder_args();
4555 mandeep.dh 267
      args.setSerialNumber(serialNumber);
4496 mandeep.dh 268
      args.setType(type);
269
      args.setOrderId(orderId);
5110 mandeep.dh 270
      args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
271
      args.setQuantity(quantity);
272
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 273
      sendBase("scanSerializedItemForOrder", args);
274
    }
275
 
4555 mandeep.dh 276
    public InventoryItem recv_scanSerializedItemForOrder() throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 277
    {
278
      scanSerializedItemForOrder_result result = new scanSerializedItemForOrder_result();
279
      receiveBase(result, "scanSerializedItemForOrder");
3383 chandransh 280
      if (result.isSetSuccess()) {
281
        return result.success;
282
      }
283
      if (result.wex != null) {
284
        throw result.wex;
285
      }
4496 mandeep.dh 286
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scanSerializedItemForOrder failed: unknown result");
3383 chandransh 287
    }
288
 
5361 mandeep.dh 289
    public InventoryItem scanForOrder(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
3383 chandransh 290
    {
5361 mandeep.dh 291
      send_scanForOrder(inventoryItem, type, quantity, orderId, fulfilmentWarehouseId, billingWarehouseId);
292
      return recv_scanForOrder();
2820 chandransh 293
    }
294
 
5361 mandeep.dh 295
    public void send_scanForOrder(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId) throws org.apache.thrift.TException
2820 chandransh 296
    {
4496 mandeep.dh 297
      scanForOrder_args args = new scanForOrder_args();
5361 mandeep.dh 298
      args.setInventoryItem(inventoryItem);
3430 rajveer 299
      args.setType(type);
4496 mandeep.dh 300
      args.setQuantity(quantity);
301
      args.setOrderId(orderId);
5110 mandeep.dh 302
      args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
5361 mandeep.dh 303
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 304
      sendBase("scanForOrder", args);
2820 chandransh 305
    }
306
 
5361 mandeep.dh 307
    public InventoryItem recv_scanForOrder() throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 308
    {
4496 mandeep.dh 309
      scanForOrder_result result = new scanForOrder_result();
310
      receiveBase(result, "scanForOrder");
5361 mandeep.dh 311
      if (result.isSetSuccess()) {
312
        return result.success;
313
      }
2820 chandransh 314
      if (result.wex != null) {
315
        throw result.wex;
316
      }
5361 mandeep.dh 317
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scanForOrder failed: unknown result");
2820 chandransh 318
    }
319
 
4496 mandeep.dh 320
    public void createItemNumberMapping(String itemNumber, long itemId) throws org.apache.thrift.TException
2820 chandransh 321
    {
4496 mandeep.dh 322
      send_createItemNumberMapping(itemNumber, itemId);
323
      recv_createItemNumberMapping();
2820 chandransh 324
    }
325
 
4496 mandeep.dh 326
    public void send_createItemNumberMapping(String itemNumber, long itemId) throws org.apache.thrift.TException
2820 chandransh 327
    {
4496 mandeep.dh 328
      createItemNumberMapping_args args = new createItemNumberMapping_args();
3430 rajveer 329
      args.setItemNumber(itemNumber);
4496 mandeep.dh 330
      args.setItemId(itemId);
331
      sendBase("createItemNumberMapping", args);
2820 chandransh 332
    }
333
 
4496 mandeep.dh 334
    public void recv_createItemNumberMapping() throws org.apache.thrift.TException
2820 chandransh 335
    {
4496 mandeep.dh 336
      createItemNumberMapping_result result = new createItemNumberMapping_result();
337
      receiveBase(result, "createItemNumberMapping");
2820 chandransh 338
      return;
339
    }
340
 
4622 amit.gupta 341
    public List<String> getItemNumbers(long itemId) throws org.apache.thrift.TException
342
    {
343
      send_getItemNumbers(itemId);
344
      return recv_getItemNumbers();
345
    }
346
 
347
    public void send_getItemNumbers(long itemId) throws org.apache.thrift.TException
348
    {
349
      getItemNumbers_args args = new getItemNumbers_args();
350
      args.setItemId(itemId);
351
      sendBase("getItemNumbers", args);
352
    }
353
 
354
    public List<String> recv_getItemNumbers() throws org.apache.thrift.TException
355
    {
356
      getItemNumbers_result result = new getItemNumbers_result();
357
      receiveBase(result, "getItemNumbers");
358
      if (result.isSetSuccess()) {
359
        return result.success;
360
      }
361
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemNumbers failed: unknown result");
362
    }
363
 
5110 mandeep.dh 364
    public List<Long> getItemIds(String itemNumber) throws org.apache.thrift.TException
365
    {
366
      send_getItemIds(itemNumber);
367
      return recv_getItemIds();
368
    }
369
 
370
    public void send_getItemIds(String itemNumber) throws org.apache.thrift.TException
371
    {
372
      getItemIds_args args = new getItemIds_args();
373
      args.setItemNumber(itemNumber);
374
      sendBase("getItemIds", args);
375
    }
376
 
377
    public List<Long> recv_getItemIds() throws org.apache.thrift.TException
378
    {
379
      getItemIds_result result = new getItemIds_result();
380
      receiveBase(result, "getItemIds");
381
      if (result.isSetSuccess()) {
382
        return result.success;
383
      }
384
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemIds failed: unknown result");
385
    }
386
 
5185 mandeep.dh 387
    public List<InventoryItem> getInventoryItemsFromLastScanType(ScanType lastScanType) throws WarehouseServiceException, org.apache.thrift.TException
388
    {
389
      send_getInventoryItemsFromLastScanType(lastScanType);
390
      return recv_getInventoryItemsFromLastScanType();
391
    }
392
 
393
    public void send_getInventoryItemsFromLastScanType(ScanType lastScanType) throws org.apache.thrift.TException
394
    {
395
      getInventoryItemsFromLastScanType_args args = new getInventoryItemsFromLastScanType_args();
396
      args.setLastScanType(lastScanType);
397
      sendBase("getInventoryItemsFromLastScanType", args);
398
    }
399
 
400
    public List<InventoryItem> recv_getInventoryItemsFromLastScanType() throws WarehouseServiceException, org.apache.thrift.TException
401
    {
402
      getInventoryItemsFromLastScanType_result result = new getInventoryItemsFromLastScanType_result();
403
      receiveBase(result, "getInventoryItemsFromLastScanType");
404
      if (result.isSetSuccess()) {
405
        return result.success;
406
      }
407
      if (result.wex != null) {
408
        throw result.wex;
409
      }
410
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItemsFromLastScanType failed: unknown result");
411
    }
412
 
413
    public InventoryItem getInventoryItemFromId(long inventoryItemId) throws WarehouseServiceException, org.apache.thrift.TException
414
    {
415
      send_getInventoryItemFromId(inventoryItemId);
416
      return recv_getInventoryItemFromId();
417
    }
418
 
419
    public void send_getInventoryItemFromId(long inventoryItemId) throws org.apache.thrift.TException
420
    {
421
      getInventoryItemFromId_args args = new getInventoryItemFromId_args();
422
      args.setInventoryItemId(inventoryItemId);
423
      sendBase("getInventoryItemFromId", args);
424
    }
425
 
426
    public InventoryItem recv_getInventoryItemFromId() throws WarehouseServiceException, org.apache.thrift.TException
427
    {
428
      getInventoryItemFromId_result result = new getInventoryItemFromId_result();
429
      receiveBase(result, "getInventoryItemFromId");
430
      if (result.isSetSuccess()) {
431
        return result.success;
432
      }
433
      if (result.wex != null) {
434
        throw result.wex;
435
      }
436
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItemFromId failed: unknown result");
437
    }
438
 
5372 mandeep.dh 439
    public List<DetailedPurchaseScan> getPurchaseScans(long startDate, long endDate) throws org.apache.thrift.TException
440
    {
441
      send_getPurchaseScans(startDate, endDate);
442
      return recv_getPurchaseScans();
443
    }
444
 
445
    public void send_getPurchaseScans(long startDate, long endDate) throws org.apache.thrift.TException
446
    {
447
      getPurchaseScans_args args = new getPurchaseScans_args();
448
      args.setStartDate(startDate);
449
      args.setEndDate(endDate);
450
      sendBase("getPurchaseScans", args);
451
    }
452
 
453
    public List<DetailedPurchaseScan> recv_getPurchaseScans() throws org.apache.thrift.TException
454
    {
455
      getPurchaseScans_result result = new getPurchaseScans_result();
456
      receiveBase(result, "getPurchaseScans");
457
      if (result.isSetSuccess()) {
458
        return result.success;
459
      }
460
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseScans failed: unknown result");
461
    }
462
 
5496 mandeep.dh 463
    public List<InvoiceScan> fetchScansPerInvoiceNumber(long date) throws org.apache.thrift.TException
464
    {
465
      send_fetchScansPerInvoiceNumber(date);
466
      return recv_fetchScansPerInvoiceNumber();
467
    }
468
 
469
    public void send_fetchScansPerInvoiceNumber(long date) throws org.apache.thrift.TException
470
    {
471
      fetchScansPerInvoiceNumber_args args = new fetchScansPerInvoiceNumber_args();
472
      args.setDate(date);
473
      sendBase("fetchScansPerInvoiceNumber", args);
474
    }
475
 
476
    public List<InvoiceScan> recv_fetchScansPerInvoiceNumber() throws org.apache.thrift.TException
477
    {
478
      fetchScansPerInvoiceNumber_result result = new fetchScansPerInvoiceNumber_result();
479
      receiveBase(result, "fetchScansPerInvoiceNumber");
480
      if (result.isSetSuccess()) {
481
        return result.success;
482
      }
483
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "fetchScansPerInvoiceNumber failed: unknown result");
484
    }
485
 
2820 chandransh 486
  }
3430 rajveer 487
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
488
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
489
      private org.apache.thrift.async.TAsyncClientManager clientManager;
490
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
491
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
492
        this.clientManager = clientManager;
493
        this.protocolFactory = protocolFactory;
494
      }
495
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
496
        return new AsyncClient(protocolFactory, clientManager, transport);
497
      }
2820 chandransh 498
    }
499
 
3430 rajveer 500
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
501
      super(protocolFactory, clientManager, transport);
502
    }
2820 chandransh 503
 
4496 mandeep.dh 504
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<getInventoryItem_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 505
      checkReady();
4496 mandeep.dh 506
      getInventoryItem_call method_call = new getInventoryItem_call(serialNumber, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 507
      this.___currentMethod = method_call;
508
      ___manager.call(method_call);
509
    }
510
 
4496 mandeep.dh 511
    public static class getInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {
512
      private String serialNumber;
513
      public getInventoryItem_call(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<getInventoryItem_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
3430 rajveer 514
        super(client, protocolFactory, transport, resultHandler, false);
4496 mandeep.dh 515
        this.serialNumber = serialNumber;
3430 rajveer 516
      }
517
 
518
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 519
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
520
        getInventoryItem_args args = new getInventoryItem_args();
521
        args.setSerialNumber(serialNumber);
3430 rajveer 522
        args.write(prot);
523
        prot.writeMessageEnd();
524
      }
525
 
4541 mandeep.dh 526
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
3430 rajveer 527
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
528
          throw new IllegalStateException("Method call not finished!");
529
        }
530
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
531
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 532
        return (new Client(prot)).recv_getInventoryItem();
3430 rajveer 533
      }
534
    }
535
 
5530 mandeep.dh 536
    public void getNonSeralizedInventoryItem(String itemNumber, long itemId, long fulfilmentWarehouseId, org.apache.thrift.async.AsyncMethodCallback<getNonSeralizedInventoryItem_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 537
      checkReady();
5530 mandeep.dh 538
      getNonSeralizedInventoryItem_call method_call = new getNonSeralizedInventoryItem_call(itemNumber, itemId, fulfilmentWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 539
      this.___currentMethod = method_call;
540
      ___manager.call(method_call);
541
    }
542
 
5361 mandeep.dh 543
    public static class getNonSeralizedInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {
5530 mandeep.dh 544
      private String itemNumber;
4496 mandeep.dh 545
      private long itemId;
5530 mandeep.dh 546
      private long fulfilmentWarehouseId;
547
      public getNonSeralizedInventoryItem_call(String itemNumber, long itemId, long fulfilmentWarehouseId, org.apache.thrift.async.AsyncMethodCallback<getNonSeralizedInventoryItem_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
3430 rajveer 548
        super(client, protocolFactory, transport, resultHandler, false);
5530 mandeep.dh 549
        this.itemNumber = itemNumber;
4496 mandeep.dh 550
        this.itemId = itemId;
5530 mandeep.dh 551
        this.fulfilmentWarehouseId = fulfilmentWarehouseId;
3430 rajveer 552
      }
553
 
554
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
5361 mandeep.dh 555
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getNonSeralizedInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
556
        getNonSeralizedInventoryItem_args args = new getNonSeralizedInventoryItem_args();
5530 mandeep.dh 557
        args.setItemNumber(itemNumber);
4496 mandeep.dh 558
        args.setItemId(itemId);
5530 mandeep.dh 559
        args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
3430 rajveer 560
        args.write(prot);
561
        prot.writeMessageEnd();
562
      }
563
 
5361 mandeep.dh 564
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
3430 rajveer 565
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
566
          throw new IllegalStateException("Method call not finished!");
567
        }
568
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
569
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
5361 mandeep.dh 570
        return (new Client(prot)).recv_getNonSeralizedInventoryItem();
3430 rajveer 571
      }
572
    }
573
 
5361 mandeep.dh 574
    public void scan(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<scan_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 575
      checkReady();
5361 mandeep.dh 576
      scan_call method_call = new scan_call(inventoryItem, type, quantity, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 577
      this.___currentMethod = method_call;
578
      ___manager.call(method_call);
579
    }
580
 
4496 mandeep.dh 581
    public static class scan_call extends org.apache.thrift.async.TAsyncMethodCall {
5361 mandeep.dh 582
      private InventoryItem inventoryItem;
3430 rajveer 583
      private ScanType type;
4496 mandeep.dh 584
      private long quantity;
5361 mandeep.dh 585
      private long billingWarehouseId;
586
      public scan_call(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<scan_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
3430 rajveer 587
        super(client, protocolFactory, transport, resultHandler, false);
5361 mandeep.dh 588
        this.inventoryItem = inventoryItem;
3430 rajveer 589
        this.type = type;
4496 mandeep.dh 590
        this.quantity = quantity;
5361 mandeep.dh 591
        this.billingWarehouseId = billingWarehouseId;
3430 rajveer 592
      }
593
 
594
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 595
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scan", org.apache.thrift.protocol.TMessageType.CALL, 0));
596
        scan_args args = new scan_args();
5361 mandeep.dh 597
        args.setInventoryItem(inventoryItem);
3430 rajveer 598
        args.setType(type);
4496 mandeep.dh 599
        args.setQuantity(quantity);
5361 mandeep.dh 600
        args.setBillingWarehouseId(billingWarehouseId);
3430 rajveer 601
        args.write(prot);
602
        prot.writeMessageEnd();
603
      }
604
 
605
      public void getResult() throws WarehouseServiceException, org.apache.thrift.TException {
606
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
607
          throw new IllegalStateException("Method call not finished!");
608
        }
609
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
610
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 611
        (new Client(prot)).recv_scan();
3430 rajveer 612
      }
613
    }
614
 
5110 mandeep.dh 615
    public void scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<scanSerializedItemForOrder_call> resultHandler) throws org.apache.thrift.TException {
4496 mandeep.dh 616
      checkReady();
5110 mandeep.dh 617
      scanSerializedItemForOrder_call method_call = new scanSerializedItemForOrder_call(serialNumber, type, orderId, fulfilmentWarehouseId, quantity, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 618
      this.___currentMethod = method_call;
619
      ___manager.call(method_call);
620
    }
621
 
622
    public static class scanSerializedItemForOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
4555 mandeep.dh 623
      private String serialNumber;
4496 mandeep.dh 624
      private ScanType type;
625
      private long orderId;
5110 mandeep.dh 626
      private long fulfilmentWarehouseId;
627
      private double quantity;
628
      private long billingWarehouseId;
629
      public scanSerializedItemForOrder_call(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<scanSerializedItemForOrder_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
4496 mandeep.dh 630
        super(client, protocolFactory, transport, resultHandler, false);
4555 mandeep.dh 631
        this.serialNumber = serialNumber;
4496 mandeep.dh 632
        this.type = type;
633
        this.orderId = orderId;
5110 mandeep.dh 634
        this.fulfilmentWarehouseId = fulfilmentWarehouseId;
635
        this.quantity = quantity;
636
        this.billingWarehouseId = billingWarehouseId;
4496 mandeep.dh 637
      }
638
 
639
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
640
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanSerializedItemForOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
641
        scanSerializedItemForOrder_args args = new scanSerializedItemForOrder_args();
4555 mandeep.dh 642
        args.setSerialNumber(serialNumber);
4496 mandeep.dh 643
        args.setType(type);
644
        args.setOrderId(orderId);
5110 mandeep.dh 645
        args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
646
        args.setQuantity(quantity);
647
        args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 648
        args.write(prot);
649
        prot.writeMessageEnd();
650
      }
651
 
4555 mandeep.dh 652
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
4496 mandeep.dh 653
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
654
          throw new IllegalStateException("Method call not finished!");
655
        }
656
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
657
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
658
        return (new Client(prot)).recv_scanSerializedItemForOrder();
659
      }
660
    }
661
 
5361 mandeep.dh 662
    public void scanForOrder(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<scanForOrder_call> resultHandler) throws org.apache.thrift.TException {
4496 mandeep.dh 663
      checkReady();
5361 mandeep.dh 664
      scanForOrder_call method_call = new scanForOrder_call(inventoryItem, type, quantity, orderId, fulfilmentWarehouseId, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 665
      this.___currentMethod = method_call;
666
      ___manager.call(method_call);
667
    }
668
 
669
    public static class scanForOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
5361 mandeep.dh 670
      private InventoryItem inventoryItem;
4496 mandeep.dh 671
      private ScanType type;
672
      private long quantity;
673
      private long orderId;
5110 mandeep.dh 674
      private long fulfilmentWarehouseId;
5361 mandeep.dh 675
      private long billingWarehouseId;
676
      public scanForOrder_call(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<scanForOrder_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
4496 mandeep.dh 677
        super(client, protocolFactory, transport, resultHandler, false);
5361 mandeep.dh 678
        this.inventoryItem = inventoryItem;
4496 mandeep.dh 679
        this.type = type;
680
        this.quantity = quantity;
681
        this.orderId = orderId;
5110 mandeep.dh 682
        this.fulfilmentWarehouseId = fulfilmentWarehouseId;
5361 mandeep.dh 683
        this.billingWarehouseId = billingWarehouseId;
4496 mandeep.dh 684
      }
685
 
686
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
687
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanForOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
688
        scanForOrder_args args = new scanForOrder_args();
5361 mandeep.dh 689
        args.setInventoryItem(inventoryItem);
4496 mandeep.dh 690
        args.setType(type);
691
        args.setQuantity(quantity);
692
        args.setOrderId(orderId);
5110 mandeep.dh 693
        args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
5361 mandeep.dh 694
        args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 695
        args.write(prot);
696
        prot.writeMessageEnd();
697
      }
698
 
5361 mandeep.dh 699
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
4496 mandeep.dh 700
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
701
          throw new IllegalStateException("Method call not finished!");
702
        }
703
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
704
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
5361 mandeep.dh 705
        return (new Client(prot)).recv_scanForOrder();
4496 mandeep.dh 706
      }
707
    }
708
 
709
    public void createItemNumberMapping(String itemNumber, long itemId, org.apache.thrift.async.AsyncMethodCallback<createItemNumberMapping_call> resultHandler) throws org.apache.thrift.TException {
710
      checkReady();
711
      createItemNumberMapping_call method_call = new createItemNumberMapping_call(itemNumber, itemId, resultHandler, this, ___protocolFactory, ___transport);
712
      this.___currentMethod = method_call;
713
      ___manager.call(method_call);
714
    }
715
 
716
    public static class createItemNumberMapping_call extends org.apache.thrift.async.TAsyncMethodCall {
717
      private String itemNumber;
718
      private long itemId;
719
      public createItemNumberMapping_call(String itemNumber, long itemId, org.apache.thrift.async.AsyncMethodCallback<createItemNumberMapping_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
720
        super(client, protocolFactory, transport, resultHandler, false);
721
        this.itemNumber = itemNumber;
722
        this.itemId = itemId;
723
      }
724
 
725
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
726
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createItemNumberMapping", org.apache.thrift.protocol.TMessageType.CALL, 0));
727
        createItemNumberMapping_args args = new createItemNumberMapping_args();
728
        args.setItemNumber(itemNumber);
729
        args.setItemId(itemId);
730
        args.write(prot);
731
        prot.writeMessageEnd();
732
      }
733
 
734
      public void getResult() throws org.apache.thrift.TException {
735
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
736
          throw new IllegalStateException("Method call not finished!");
737
        }
738
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
739
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
740
        (new Client(prot)).recv_createItemNumberMapping();
741
      }
742
    }
743
 
4622 amit.gupta 744
    public void getItemNumbers(long itemId, org.apache.thrift.async.AsyncMethodCallback<getItemNumbers_call> resultHandler) throws org.apache.thrift.TException {
745
      checkReady();
746
      getItemNumbers_call method_call = new getItemNumbers_call(itemId, resultHandler, this, ___protocolFactory, ___transport);
747
      this.___currentMethod = method_call;
748
      ___manager.call(method_call);
749
    }
750
 
751
    public static class getItemNumbers_call extends org.apache.thrift.async.TAsyncMethodCall {
752
      private long itemId;
753
      public getItemNumbers_call(long itemId, org.apache.thrift.async.AsyncMethodCallback<getItemNumbers_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
754
        super(client, protocolFactory, transport, resultHandler, false);
755
        this.itemId = itemId;
756
      }
757
 
758
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
759
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemNumbers", org.apache.thrift.protocol.TMessageType.CALL, 0));
760
        getItemNumbers_args args = new getItemNumbers_args();
761
        args.setItemId(itemId);
762
        args.write(prot);
763
        prot.writeMessageEnd();
764
      }
765
 
766
      public List<String> getResult() throws org.apache.thrift.TException {
767
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
768
          throw new IllegalStateException("Method call not finished!");
769
        }
770
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
771
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
772
        return (new Client(prot)).recv_getItemNumbers();
773
      }
774
    }
775
 
5110 mandeep.dh 776
    public void getItemIds(String itemNumber, org.apache.thrift.async.AsyncMethodCallback<getItemIds_call> resultHandler) throws org.apache.thrift.TException {
777
      checkReady();
778
      getItemIds_call method_call = new getItemIds_call(itemNumber, resultHandler, this, ___protocolFactory, ___transport);
779
      this.___currentMethod = method_call;
780
      ___manager.call(method_call);
781
    }
782
 
783
    public static class getItemIds_call extends org.apache.thrift.async.TAsyncMethodCall {
784
      private String itemNumber;
785
      public getItemIds_call(String itemNumber, org.apache.thrift.async.AsyncMethodCallback<getItemIds_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
786
        super(client, protocolFactory, transport, resultHandler, false);
787
        this.itemNumber = itemNumber;
788
      }
789
 
790
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
791
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemIds", org.apache.thrift.protocol.TMessageType.CALL, 0));
792
        getItemIds_args args = new getItemIds_args();
793
        args.setItemNumber(itemNumber);
794
        args.write(prot);
795
        prot.writeMessageEnd();
796
      }
797
 
798
      public List<Long> getResult() throws org.apache.thrift.TException {
799
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
800
          throw new IllegalStateException("Method call not finished!");
801
        }
802
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
803
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
804
        return (new Client(prot)).recv_getItemIds();
805
      }
806
    }
807
 
5185 mandeep.dh 808
    public void getInventoryItemsFromLastScanType(ScanType lastScanType, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemsFromLastScanType_call> resultHandler) throws org.apache.thrift.TException {
809
      checkReady();
810
      getInventoryItemsFromLastScanType_call method_call = new getInventoryItemsFromLastScanType_call(lastScanType, resultHandler, this, ___protocolFactory, ___transport);
811
      this.___currentMethod = method_call;
812
      ___manager.call(method_call);
813
    }
814
 
815
    public static class getInventoryItemsFromLastScanType_call extends org.apache.thrift.async.TAsyncMethodCall {
816
      private ScanType lastScanType;
817
      public getInventoryItemsFromLastScanType_call(ScanType lastScanType, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemsFromLastScanType_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
818
        super(client, protocolFactory, transport, resultHandler, false);
819
        this.lastScanType = lastScanType;
820
      }
821
 
822
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
823
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItemsFromLastScanType", org.apache.thrift.protocol.TMessageType.CALL, 0));
824
        getInventoryItemsFromLastScanType_args args = new getInventoryItemsFromLastScanType_args();
825
        args.setLastScanType(lastScanType);
826
        args.write(prot);
827
        prot.writeMessageEnd();
828
      }
829
 
830
      public List<InventoryItem> getResult() throws WarehouseServiceException, org.apache.thrift.TException {
831
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
832
          throw new IllegalStateException("Method call not finished!");
833
        }
834
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
835
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
836
        return (new Client(prot)).recv_getInventoryItemsFromLastScanType();
837
      }
838
    }
839
 
840
    public void getInventoryItemFromId(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemFromId_call> resultHandler) throws org.apache.thrift.TException {
841
      checkReady();
842
      getInventoryItemFromId_call method_call = new getInventoryItemFromId_call(inventoryItemId, resultHandler, this, ___protocolFactory, ___transport);
843
      this.___currentMethod = method_call;
844
      ___manager.call(method_call);
845
    }
846
 
847
    public static class getInventoryItemFromId_call extends org.apache.thrift.async.TAsyncMethodCall {
848
      private long inventoryItemId;
849
      public getInventoryItemFromId_call(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemFromId_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
850
        super(client, protocolFactory, transport, resultHandler, false);
851
        this.inventoryItemId = inventoryItemId;
852
      }
853
 
854
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
855
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItemFromId", org.apache.thrift.protocol.TMessageType.CALL, 0));
856
        getInventoryItemFromId_args args = new getInventoryItemFromId_args();
857
        args.setInventoryItemId(inventoryItemId);
858
        args.write(prot);
859
        prot.writeMessageEnd();
860
      }
861
 
862
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
863
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
864
          throw new IllegalStateException("Method call not finished!");
865
        }
866
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
867
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
868
        return (new Client(prot)).recv_getInventoryItemFromId();
869
      }
870
    }
871
 
5372 mandeep.dh 872
    public void getPurchaseScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getPurchaseScans_call> resultHandler) throws org.apache.thrift.TException {
873
      checkReady();
874
      getPurchaseScans_call method_call = new getPurchaseScans_call(startDate, endDate, resultHandler, this, ___protocolFactory, ___transport);
875
      this.___currentMethod = method_call;
876
      ___manager.call(method_call);
877
    }
878
 
879
    public static class getPurchaseScans_call extends org.apache.thrift.async.TAsyncMethodCall {
880
      private long startDate;
881
      private long endDate;
882
      public getPurchaseScans_call(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getPurchaseScans_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
883
        super(client, protocolFactory, transport, resultHandler, false);
884
        this.startDate = startDate;
885
        this.endDate = endDate;
886
      }
887
 
888
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
889
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseScans", org.apache.thrift.protocol.TMessageType.CALL, 0));
890
        getPurchaseScans_args args = new getPurchaseScans_args();
891
        args.setStartDate(startDate);
892
        args.setEndDate(endDate);
893
        args.write(prot);
894
        prot.writeMessageEnd();
895
      }
896
 
897
      public List<DetailedPurchaseScan> getResult() throws org.apache.thrift.TException {
898
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
899
          throw new IllegalStateException("Method call not finished!");
900
        }
901
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
902
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
903
        return (new Client(prot)).recv_getPurchaseScans();
904
      }
905
    }
906
 
5496 mandeep.dh 907
    public void fetchScansPerInvoiceNumber(long date, org.apache.thrift.async.AsyncMethodCallback<fetchScansPerInvoiceNumber_call> resultHandler) throws org.apache.thrift.TException {
908
      checkReady();
909
      fetchScansPerInvoiceNumber_call method_call = new fetchScansPerInvoiceNumber_call(date, resultHandler, this, ___protocolFactory, ___transport);
910
      this.___currentMethod = method_call;
911
      ___manager.call(method_call);
912
    }
913
 
914
    public static class fetchScansPerInvoiceNumber_call extends org.apache.thrift.async.TAsyncMethodCall {
915
      private long date;
916
      public fetchScansPerInvoiceNumber_call(long date, org.apache.thrift.async.AsyncMethodCallback<fetchScansPerInvoiceNumber_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
917
        super(client, protocolFactory, transport, resultHandler, false);
918
        this.date = date;
919
      }
920
 
921
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
922
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fetchScansPerInvoiceNumber", org.apache.thrift.protocol.TMessageType.CALL, 0));
923
        fetchScansPerInvoiceNumber_args args = new fetchScansPerInvoiceNumber_args();
924
        args.setDate(date);
925
        args.write(prot);
926
        prot.writeMessageEnd();
927
      }
928
 
929
      public List<InvoiceScan> getResult() throws org.apache.thrift.TException {
930
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
931
          throw new IllegalStateException("Method call not finished!");
932
        }
933
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
934
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
935
        return (new Client(prot)).recv_fetchScansPerInvoiceNumber();
936
      }
937
    }
938
 
3430 rajveer 939
  }
940
 
941
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
942
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
943
    public Processor(I iface) {
944
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
945
    }
946
 
947
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
948
      super(iface, getProcessMap(processMap));
949
    }
950
 
951
    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
4496 mandeep.dh 952
      processMap.put("getInventoryItem", new getInventoryItem());
5361 mandeep.dh 953
      processMap.put("getNonSeralizedInventoryItem", new getNonSeralizedInventoryItem());
4496 mandeep.dh 954
      processMap.put("scan", new scan());
955
      processMap.put("scanSerializedItemForOrder", new scanSerializedItemForOrder());
956
      processMap.put("scanForOrder", new scanForOrder());
957
      processMap.put("createItemNumberMapping", new createItemNumberMapping());
4622 amit.gupta 958
      processMap.put("getItemNumbers", new getItemNumbers());
5110 mandeep.dh 959
      processMap.put("getItemIds", new getItemIds());
5185 mandeep.dh 960
      processMap.put("getInventoryItemsFromLastScanType", new getInventoryItemsFromLastScanType());
961
      processMap.put("getInventoryItemFromId", new getInventoryItemFromId());
5372 mandeep.dh 962
      processMap.put("getPurchaseScans", new getPurchaseScans());
5496 mandeep.dh 963
      processMap.put("fetchScansPerInvoiceNumber", new fetchScansPerInvoiceNumber());
3430 rajveer 964
      return processMap;
965
    }
966
 
4496 mandeep.dh 967
    private static class getInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItem_args> {
968
      public getInventoryItem() {
969
        super("getInventoryItem");
3430 rajveer 970
      }
971
 
4496 mandeep.dh 972
      protected getInventoryItem_args getEmptyArgsInstance() {
973
        return new getInventoryItem_args();
3430 rajveer 974
      }
975
 
4496 mandeep.dh 976
      protected getInventoryItem_result getResult(I iface, getInventoryItem_args args) throws org.apache.thrift.TException {
977
        getInventoryItem_result result = new getInventoryItem_result();
4541 mandeep.dh 978
        try {
979
          result.success = iface.getInventoryItem(args.serialNumber);
980
        } catch (WarehouseServiceException wex) {
981
          result.wex = wex;
982
        }
3430 rajveer 983
        return result;
2832 chandransh 984
      }
985
    }
986
 
5361 mandeep.dh 987
    private static class getNonSeralizedInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getNonSeralizedInventoryItem_args> {
988
      public getNonSeralizedInventoryItem() {
989
        super("getNonSeralizedInventoryItem");
3430 rajveer 990
      }
991
 
5361 mandeep.dh 992
      protected getNonSeralizedInventoryItem_args getEmptyArgsInstance() {
993
        return new getNonSeralizedInventoryItem_args();
3430 rajveer 994
      }
995
 
5361 mandeep.dh 996
      protected getNonSeralizedInventoryItem_result getResult(I iface, getNonSeralizedInventoryItem_args args) throws org.apache.thrift.TException {
997
        getNonSeralizedInventoryItem_result result = new getNonSeralizedInventoryItem_result();
998
        try {
5530 mandeep.dh 999
          result.success = iface.getNonSeralizedInventoryItem(args.itemNumber, args.itemId, args.fulfilmentWarehouseId);
5361 mandeep.dh 1000
        } catch (WarehouseServiceException wex) {
1001
          result.wex = wex;
1002
        }
3430 rajveer 1003
        return result;
2820 chandransh 1004
      }
1005
    }
1006
 
4496 mandeep.dh 1007
    private static class scan<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scan_args> {
1008
      public scan() {
1009
        super("scan");
3430 rajveer 1010
      }
1011
 
4496 mandeep.dh 1012
      protected scan_args getEmptyArgsInstance() {
1013
        return new scan_args();
3430 rajveer 1014
      }
1015
 
4496 mandeep.dh 1016
      protected scan_result getResult(I iface, scan_args args) throws org.apache.thrift.TException {
1017
        scan_result result = new scan_result();
3383 chandransh 1018
        try {
5361 mandeep.dh 1019
          iface.scan(args.inventoryItem, args.type, args.quantity, args.billingWarehouseId);
3383 chandransh 1020
        } catch (WarehouseServiceException wex) {
1021
          result.wex = wex;
1022
        }
3430 rajveer 1023
        return result;
3383 chandransh 1024
      }
1025
    }
1026
 
4496 mandeep.dh 1027
    private static class scanSerializedItemForOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanSerializedItemForOrder_args> {
1028
      public scanSerializedItemForOrder() {
1029
        super("scanSerializedItemForOrder");
3430 rajveer 1030
      }
1031
 
4496 mandeep.dh 1032
      protected scanSerializedItemForOrder_args getEmptyArgsInstance() {
1033
        return new scanSerializedItemForOrder_args();
3430 rajveer 1034
      }
1035
 
4496 mandeep.dh 1036
      protected scanSerializedItemForOrder_result getResult(I iface, scanSerializedItemForOrder_args args) throws org.apache.thrift.TException {
1037
        scanSerializedItemForOrder_result result = new scanSerializedItemForOrder_result();
2820 chandransh 1038
        try {
5110 mandeep.dh 1039
          result.success = iface.scanSerializedItemForOrder(args.serialNumber, args.type, args.orderId, args.fulfilmentWarehouseId, args.quantity, args.billingWarehouseId);
2820 chandransh 1040
        } catch (WarehouseServiceException wex) {
1041
          result.wex = wex;
1042
        }
3430 rajveer 1043
        return result;
2820 chandransh 1044
      }
1045
    }
1046
 
4496 mandeep.dh 1047
    private static class scanForOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanForOrder_args> {
1048
      public scanForOrder() {
1049
        super("scanForOrder");
3430 rajveer 1050
      }
1051
 
4496 mandeep.dh 1052
      protected scanForOrder_args getEmptyArgsInstance() {
1053
        return new scanForOrder_args();
3430 rajveer 1054
      }
1055
 
4496 mandeep.dh 1056
      protected scanForOrder_result getResult(I iface, scanForOrder_args args) throws org.apache.thrift.TException {
1057
        scanForOrder_result result = new scanForOrder_result();
2820 chandransh 1058
        try {
5361 mandeep.dh 1059
          result.success = iface.scanForOrder(args.inventoryItem, args.type, args.quantity, args.orderId, args.fulfilmentWarehouseId, args.billingWarehouseId);
2820 chandransh 1060
        } catch (WarehouseServiceException wex) {
1061
          result.wex = wex;
1062
        }
3430 rajveer 1063
        return result;
2820 chandransh 1064
      }
1065
    }
1066
 
4496 mandeep.dh 1067
    private static class createItemNumberMapping<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createItemNumberMapping_args> {
1068
      public createItemNumberMapping() {
1069
        super("createItemNumberMapping");
1070
      }
1071
 
1072
      protected createItemNumberMapping_args getEmptyArgsInstance() {
1073
        return new createItemNumberMapping_args();
1074
      }
1075
 
1076
      protected createItemNumberMapping_result getResult(I iface, createItemNumberMapping_args args) throws org.apache.thrift.TException {
1077
        createItemNumberMapping_result result = new createItemNumberMapping_result();
1078
        iface.createItemNumberMapping(args.itemNumber, args.itemId);
1079
        return result;
1080
      }
1081
    }
1082
 
4622 amit.gupta 1083
    private static class getItemNumbers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemNumbers_args> {
1084
      public getItemNumbers() {
1085
        super("getItemNumbers");
1086
      }
1087
 
1088
      protected getItemNumbers_args getEmptyArgsInstance() {
1089
        return new getItemNumbers_args();
1090
      }
1091
 
1092
      protected getItemNumbers_result getResult(I iface, getItemNumbers_args args) throws org.apache.thrift.TException {
1093
        getItemNumbers_result result = new getItemNumbers_result();
1094
        result.success = iface.getItemNumbers(args.itemId);
1095
        return result;
1096
      }
1097
    }
1098
 
5110 mandeep.dh 1099
    private static class getItemIds<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemIds_args> {
1100
      public getItemIds() {
1101
        super("getItemIds");
1102
      }
1103
 
1104
      protected getItemIds_args getEmptyArgsInstance() {
1105
        return new getItemIds_args();
1106
      }
1107
 
1108
      protected getItemIds_result getResult(I iface, getItemIds_args args) throws org.apache.thrift.TException {
1109
        getItemIds_result result = new getItemIds_result();
1110
        result.success = iface.getItemIds(args.itemNumber);
1111
        return result;
1112
      }
1113
    }
1114
 
5185 mandeep.dh 1115
    private static class getInventoryItemsFromLastScanType<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItemsFromLastScanType_args> {
1116
      public getInventoryItemsFromLastScanType() {
1117
        super("getInventoryItemsFromLastScanType");
1118
      }
1119
 
1120
      protected getInventoryItemsFromLastScanType_args getEmptyArgsInstance() {
1121
        return new getInventoryItemsFromLastScanType_args();
1122
      }
1123
 
1124
      protected getInventoryItemsFromLastScanType_result getResult(I iface, getInventoryItemsFromLastScanType_args args) throws org.apache.thrift.TException {
1125
        getInventoryItemsFromLastScanType_result result = new getInventoryItemsFromLastScanType_result();
1126
        try {
1127
          result.success = iface.getInventoryItemsFromLastScanType(args.lastScanType);
1128
        } catch (WarehouseServiceException wex) {
1129
          result.wex = wex;
1130
        }
1131
        return result;
1132
      }
1133
    }
1134
 
1135
    private static class getInventoryItemFromId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItemFromId_args> {
1136
      public getInventoryItemFromId() {
1137
        super("getInventoryItemFromId");
1138
      }
1139
 
1140
      protected getInventoryItemFromId_args getEmptyArgsInstance() {
1141
        return new getInventoryItemFromId_args();
1142
      }
1143
 
1144
      protected getInventoryItemFromId_result getResult(I iface, getInventoryItemFromId_args args) throws org.apache.thrift.TException {
1145
        getInventoryItemFromId_result result = new getInventoryItemFromId_result();
1146
        try {
1147
          result.success = iface.getInventoryItemFromId(args.inventoryItemId);
1148
        } catch (WarehouseServiceException wex) {
1149
          result.wex = wex;
1150
        }
1151
        return result;
1152
      }
1153
    }
1154
 
5372 mandeep.dh 1155
    private static class getPurchaseScans<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseScans_args> {
1156
      public getPurchaseScans() {
1157
        super("getPurchaseScans");
1158
      }
1159
 
1160
      protected getPurchaseScans_args getEmptyArgsInstance() {
1161
        return new getPurchaseScans_args();
1162
      }
1163
 
1164
      protected getPurchaseScans_result getResult(I iface, getPurchaseScans_args args) throws org.apache.thrift.TException {
1165
        getPurchaseScans_result result = new getPurchaseScans_result();
1166
        result.success = iface.getPurchaseScans(args.startDate, args.endDate);
1167
        return result;
1168
      }
1169
    }
1170
 
5496 mandeep.dh 1171
    private static class fetchScansPerInvoiceNumber<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fetchScansPerInvoiceNumber_args> {
1172
      public fetchScansPerInvoiceNumber() {
1173
        super("fetchScansPerInvoiceNumber");
1174
      }
1175
 
1176
      protected fetchScansPerInvoiceNumber_args getEmptyArgsInstance() {
1177
        return new fetchScansPerInvoiceNumber_args();
1178
      }
1179
 
1180
      protected fetchScansPerInvoiceNumber_result getResult(I iface, fetchScansPerInvoiceNumber_args args) throws org.apache.thrift.TException {
1181
        fetchScansPerInvoiceNumber_result result = new fetchScansPerInvoiceNumber_result();
1182
        result.success = iface.fetchScansPerInvoiceNumber(args.date);
1183
        return result;
1184
      }
1185
    }
1186
 
2820 chandransh 1187
  }
1188
 
4496 mandeep.dh 1189
  public static class getInventoryItem_args implements org.apache.thrift.TBase<getInventoryItem_args, getInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
1190
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_args");
2832 chandransh 1191
 
4496 mandeep.dh 1192
    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)1);
2832 chandransh 1193
 
4496 mandeep.dh 1194
    private String serialNumber; // required
2832 chandransh 1195
 
1196
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 1197
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 1198
      SERIAL_NUMBER((short)1, "serialNumber");
2832 chandransh 1199
 
1200
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1201
 
1202
      static {
1203
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1204
          byName.put(field.getFieldName(), field);
1205
        }
1206
      }
1207
 
1208
      /**
1209
       * Find the _Fields constant that matches fieldId, or null if its not found.
1210
       */
1211
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 1212
        switch(fieldId) {
4496 mandeep.dh 1213
          case 1: // SERIAL_NUMBER
1214
            return SERIAL_NUMBER;
3430 rajveer 1215
          default:
1216
            return null;
1217
        }
2832 chandransh 1218
      }
1219
 
1220
      /**
1221
       * Find the _Fields constant that matches fieldId, throwing an exception
1222
       * if it is not found.
1223
       */
1224
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1225
        _Fields fields = findByThriftId(fieldId);
1226
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1227
        return fields;
1228
      }
1229
 
1230
      /**
1231
       * Find the _Fields constant that matches name, or null if its not found.
1232
       */
1233
      public static _Fields findByName(String name) {
1234
        return byName.get(name);
1235
      }
1236
 
1237
      private final short _thriftId;
1238
      private final String _fieldName;
1239
 
1240
      _Fields(short thriftId, String fieldName) {
1241
        _thriftId = thriftId;
1242
        _fieldName = fieldName;
1243
      }
1244
 
1245
      public short getThriftFieldId() {
1246
        return _thriftId;
1247
      }
1248
 
1249
      public String getFieldName() {
1250
        return _fieldName;
1251
      }
1252
    }
1253
 
1254
    // isset id assignments
1255
 
3430 rajveer 1256
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2832 chandransh 1257
    static {
3430 rajveer 1258
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 1259
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1260
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
3430 rajveer 1261
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 1262
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItem_args.class, metaDataMap);
2832 chandransh 1263
    }
1264
 
4496 mandeep.dh 1265
    public getInventoryItem_args() {
2832 chandransh 1266
    }
1267
 
4496 mandeep.dh 1268
    public getInventoryItem_args(
1269
      String serialNumber)
2832 chandransh 1270
    {
1271
      this();
4496 mandeep.dh 1272
      this.serialNumber = serialNumber;
2832 chandransh 1273
    }
1274
 
1275
    /**
1276
     * Performs a deep copy on <i>other</i>.
1277
     */
4496 mandeep.dh 1278
    public getInventoryItem_args(getInventoryItem_args other) {
1279
      if (other.isSetSerialNumber()) {
1280
        this.serialNumber = other.serialNumber;
1281
      }
2832 chandransh 1282
    }
1283
 
4496 mandeep.dh 1284
    public getInventoryItem_args deepCopy() {
1285
      return new getInventoryItem_args(this);
2832 chandransh 1286
    }
1287
 
3430 rajveer 1288
    @Override
1289
    public void clear() {
4496 mandeep.dh 1290
      this.serialNumber = null;
2832 chandransh 1291
    }
1292
 
4496 mandeep.dh 1293
    public String getSerialNumber() {
1294
      return this.serialNumber;
2832 chandransh 1295
    }
1296
 
4496 mandeep.dh 1297
    public void setSerialNumber(String serialNumber) {
1298
      this.serialNumber = serialNumber;
2832 chandransh 1299
    }
1300
 
4496 mandeep.dh 1301
    public void unsetSerialNumber() {
1302
      this.serialNumber = null;
2832 chandransh 1303
    }
1304
 
4496 mandeep.dh 1305
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
1306
    public boolean isSetSerialNumber() {
1307
      return this.serialNumber != null;
2832 chandransh 1308
    }
1309
 
4496 mandeep.dh 1310
    public void setSerialNumberIsSet(boolean value) {
1311
      if (!value) {
1312
        this.serialNumber = null;
1313
      }
2832 chandransh 1314
    }
1315
 
1316
    public void setFieldValue(_Fields field, Object value) {
1317
      switch (field) {
4496 mandeep.dh 1318
      case SERIAL_NUMBER:
2832 chandransh 1319
        if (value == null) {
4496 mandeep.dh 1320
          unsetSerialNumber();
2832 chandransh 1321
        } else {
4496 mandeep.dh 1322
          setSerialNumber((String)value);
2832 chandransh 1323
        }
1324
        break;
1325
 
1326
      }
1327
    }
1328
 
1329
    public Object getFieldValue(_Fields field) {
1330
      switch (field) {
4496 mandeep.dh 1331
      case SERIAL_NUMBER:
1332
        return getSerialNumber();
2832 chandransh 1333
 
1334
      }
1335
      throw new IllegalStateException();
1336
    }
1337
 
3430 rajveer 1338
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1339
    public boolean isSet(_Fields field) {
1340
      if (field == null) {
1341
        throw new IllegalArgumentException();
1342
      }
2832 chandransh 1343
 
1344
      switch (field) {
4496 mandeep.dh 1345
      case SERIAL_NUMBER:
1346
        return isSetSerialNumber();
2832 chandransh 1347
      }
1348
      throw new IllegalStateException();
1349
    }
1350
 
1351
    @Override
1352
    public boolean equals(Object that) {
1353
      if (that == null)
1354
        return false;
4496 mandeep.dh 1355
      if (that instanceof getInventoryItem_args)
1356
        return this.equals((getInventoryItem_args)that);
2832 chandransh 1357
      return false;
1358
    }
1359
 
4496 mandeep.dh 1360
    public boolean equals(getInventoryItem_args that) {
2832 chandransh 1361
      if (that == null)
1362
        return false;
1363
 
4496 mandeep.dh 1364
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
1365
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
1366
      if (this_present_serialNumber || that_present_serialNumber) {
1367
        if (!(this_present_serialNumber && that_present_serialNumber))
2832 chandransh 1368
          return false;
4496 mandeep.dh 1369
        if (!this.serialNumber.equals(that.serialNumber))
2832 chandransh 1370
          return false;
1371
      }
1372
 
1373
      return true;
1374
    }
1375
 
1376
    @Override
1377
    public int hashCode() {
1378
      return 0;
1379
    }
1380
 
4496 mandeep.dh 1381
    public int compareTo(getInventoryItem_args other) {
2832 chandransh 1382
      if (!getClass().equals(other.getClass())) {
1383
        return getClass().getName().compareTo(other.getClass().getName());
1384
      }
1385
 
1386
      int lastComparison = 0;
4496 mandeep.dh 1387
      getInventoryItem_args typedOther = (getInventoryItem_args)other;
2832 chandransh 1388
 
4496 mandeep.dh 1389
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
2832 chandransh 1390
      if (lastComparison != 0) {
1391
        return lastComparison;
1392
      }
4496 mandeep.dh 1393
      if (isSetSerialNumber()) {
1394
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
3430 rajveer 1395
        if (lastComparison != 0) {
1396
          return lastComparison;
1397
        }
2832 chandransh 1398
      }
1399
      return 0;
1400
    }
1401
 
3430 rajveer 1402
    public _Fields fieldForId(int fieldId) {
1403
      return _Fields.findByThriftId(fieldId);
1404
    }
1405
 
1406
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1407
      org.apache.thrift.protocol.TField field;
2832 chandransh 1408
      iprot.readStructBegin();
1409
      while (true)
1410
      {
1411
        field = iprot.readFieldBegin();
3430 rajveer 1412
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2832 chandransh 1413
          break;
1414
        }
3430 rajveer 1415
        switch (field.id) {
4496 mandeep.dh 1416
          case 1: // SERIAL_NUMBER
1417
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
1418
              this.serialNumber = iprot.readString();
3430 rajveer 1419
            } else { 
1420
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1421
            }
1422
            break;
1423
          default:
1424
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2832 chandransh 1425
        }
3430 rajveer 1426
        iprot.readFieldEnd();
2832 chandransh 1427
      }
1428
      iprot.readStructEnd();
1429
      validate();
1430
    }
1431
 
3430 rajveer 1432
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2832 chandransh 1433
      validate();
1434
 
1435
      oprot.writeStructBegin(STRUCT_DESC);
4496 mandeep.dh 1436
      if (this.serialNumber != null) {
1437
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
1438
        oprot.writeString(this.serialNumber);
1439
        oprot.writeFieldEnd();
1440
      }
2832 chandransh 1441
      oprot.writeFieldStop();
1442
      oprot.writeStructEnd();
1443
    }
1444
 
1445
    @Override
1446
    public String toString() {
4496 mandeep.dh 1447
      StringBuilder sb = new StringBuilder("getInventoryItem_args(");
2832 chandransh 1448
      boolean first = true;
1449
 
4496 mandeep.dh 1450
      sb.append("serialNumber:");
1451
      if (this.serialNumber == null) {
1452
        sb.append("null");
1453
      } else {
1454
        sb.append(this.serialNumber);
1455
      }
2832 chandransh 1456
      first = false;
1457
      sb.append(")");
1458
      return sb.toString();
1459
    }
1460
 
3430 rajveer 1461
    public void validate() throws org.apache.thrift.TException {
2832 chandransh 1462
      // check for required fields
1463
    }
1464
 
3430 rajveer 1465
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1466
      try {
1467
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1468
      } catch (org.apache.thrift.TException te) {
1469
        throw new java.io.IOException(te);
1470
      }
1471
    }
1472
 
1473
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1474
      try {
1475
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1476
      } catch (org.apache.thrift.TException te) {
1477
        throw new java.io.IOException(te);
1478
      }
1479
    }
1480
 
2832 chandransh 1481
  }
1482
 
4496 mandeep.dh 1483
  public static class getInventoryItem_result implements org.apache.thrift.TBase<getInventoryItem_result, getInventoryItem_result._Fields>, java.io.Serializable, Cloneable   {
1484
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_result");
2832 chandransh 1485
 
3430 rajveer 1486
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
4541 mandeep.dh 1487
    private static final org.apache.thrift.protocol.TField WEX_FIELD_DESC = new org.apache.thrift.protocol.TField("wex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
2832 chandransh 1488
 
4496 mandeep.dh 1489
    private InventoryItem success; // required
4541 mandeep.dh 1490
    private WarehouseServiceException wex; // required
2832 chandransh 1491
 
1492
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 1493
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4541 mandeep.dh 1494
      SUCCESS((short)0, "success"),
1495
      WEX((short)1, "wex");
2832 chandransh 1496
 
1497
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1498
 
1499
      static {
1500
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1501
          byName.put(field.getFieldName(), field);
1502
        }
1503
      }
1504
 
1505
      /**
1506
       * Find the _Fields constant that matches fieldId, or null if its not found.
1507
       */
1508
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 1509
        switch(fieldId) {
1510
          case 0: // SUCCESS
1511
            return SUCCESS;
4541 mandeep.dh 1512
          case 1: // WEX
1513
            return WEX;
3430 rajveer 1514
          default:
1515
            return null;
1516
        }
2832 chandransh 1517
      }
1518
 
1519
      /**
1520
       * Find the _Fields constant that matches fieldId, throwing an exception
1521
       * if it is not found.
1522
       */
1523
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1524
        _Fields fields = findByThriftId(fieldId);
1525
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1526
        return fields;
1527
      }
1528
 
1529
      /**
1530
       * Find the _Fields constant that matches name, or null if its not found.
1531
       */
1532
      public static _Fields findByName(String name) {
1533
        return byName.get(name);
1534
      }
1535
 
1536
      private final short _thriftId;
1537
      private final String _fieldName;
1538
 
1539
      _Fields(short thriftId, String fieldName) {
1540
        _thriftId = thriftId;
1541
        _fieldName = fieldName;
1542
      }
1543
 
1544
      public short getThriftFieldId() {
1545
        return _thriftId;
1546
      }
1547
 
1548
      public String getFieldName() {
1549
        return _fieldName;
1550
      }
1551
    }
1552
 
1553
    // isset id assignments
1554
 
3430 rajveer 1555
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2832 chandransh 1556
    static {
3430 rajveer 1557
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
1558
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 1559
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
4541 mandeep.dh 1560
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1561
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3430 rajveer 1562
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 1563
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItem_result.class, metaDataMap);
2832 chandransh 1564
    }
1565
 
4496 mandeep.dh 1566
    public getInventoryItem_result() {
2832 chandransh 1567
    }
1568
 
4496 mandeep.dh 1569
    public getInventoryItem_result(
4541 mandeep.dh 1570
      InventoryItem success,
1571
      WarehouseServiceException wex)
2832 chandransh 1572
    {
1573
      this();
1574
      this.success = success;
4541 mandeep.dh 1575
      this.wex = wex;
2832 chandransh 1576
    }
1577
 
1578
    /**
1579
     * Performs a deep copy on <i>other</i>.
1580
     */
4496 mandeep.dh 1581
    public getInventoryItem_result(getInventoryItem_result other) {
2832 chandransh 1582
      if (other.isSetSuccess()) {
4496 mandeep.dh 1583
        this.success = new InventoryItem(other.success);
2832 chandransh 1584
      }
4541 mandeep.dh 1585
      if (other.isSetWex()) {
1586
        this.wex = new WarehouseServiceException(other.wex);
1587
      }
2832 chandransh 1588
    }
1589
 
4496 mandeep.dh 1590
    public getInventoryItem_result deepCopy() {
1591
      return new getInventoryItem_result(this);
2832 chandransh 1592
    }
1593
 
3430 rajveer 1594
    @Override
1595
    public void clear() {
1596
      this.success = null;
4541 mandeep.dh 1597
      this.wex = null;
2832 chandransh 1598
    }
1599
 
4496 mandeep.dh 1600
    public InventoryItem getSuccess() {
2832 chandransh 1601
      return this.success;
1602
    }
1603
 
4496 mandeep.dh 1604
    public void setSuccess(InventoryItem success) {
2832 chandransh 1605
      this.success = success;
1606
    }
1607
 
1608
    public void unsetSuccess() {
1609
      this.success = null;
1610
    }
1611
 
3430 rajveer 1612
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2832 chandransh 1613
    public boolean isSetSuccess() {
1614
      return this.success != null;
1615
    }
1616
 
1617
    public void setSuccessIsSet(boolean value) {
1618
      if (!value) {
1619
        this.success = null;
1620
      }
1621
    }
1622
 
4541 mandeep.dh 1623
    public WarehouseServiceException getWex() {
1624
      return this.wex;
1625
    }
1626
 
1627
    public void setWex(WarehouseServiceException wex) {
1628
      this.wex = wex;
1629
    }
1630
 
1631
    public void unsetWex() {
1632
      this.wex = null;
1633
    }
1634
 
1635
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
1636
    public boolean isSetWex() {
1637
      return this.wex != null;
1638
    }
1639
 
1640
    public void setWexIsSet(boolean value) {
1641
      if (!value) {
1642
        this.wex = null;
1643
      }
1644
    }
1645
 
2832 chandransh 1646
    public void setFieldValue(_Fields field, Object value) {
1647
      switch (field) {
1648
      case SUCCESS:
1649
        if (value == null) {
1650
          unsetSuccess();
1651
        } else {
4496 mandeep.dh 1652
          setSuccess((InventoryItem)value);
2832 chandransh 1653
        }
1654
        break;
1655
 
4541 mandeep.dh 1656
      case WEX:
1657
        if (value == null) {
1658
          unsetWex();
1659
        } else {
1660
          setWex((WarehouseServiceException)value);
1661
        }
1662
        break;
1663
 
2832 chandransh 1664
      }
1665
    }
1666
 
1667
    public Object getFieldValue(_Fields field) {
1668
      switch (field) {
1669
      case SUCCESS:
1670
        return getSuccess();
1671
 
4541 mandeep.dh 1672
      case WEX:
1673
        return getWex();
1674
 
2832 chandransh 1675
      }
1676
      throw new IllegalStateException();
1677
    }
1678
 
3430 rajveer 1679
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1680
    public boolean isSet(_Fields field) {
1681
      if (field == null) {
1682
        throw new IllegalArgumentException();
1683
      }
2832 chandransh 1684
 
1685
      switch (field) {
1686
      case SUCCESS:
1687
        return isSetSuccess();
4541 mandeep.dh 1688
      case WEX:
1689
        return isSetWex();
2832 chandransh 1690
      }
1691
      throw new IllegalStateException();
1692
    }
1693
 
1694
    @Override
1695
    public boolean equals(Object that) {
1696
      if (that == null)
1697
        return false;
4496 mandeep.dh 1698
      if (that instanceof getInventoryItem_result)
1699
        return this.equals((getInventoryItem_result)that);
2832 chandransh 1700
      return false;
1701
    }
1702
 
4496 mandeep.dh 1703
    public boolean equals(getInventoryItem_result that) {
2832 chandransh 1704
      if (that == null)
1705
        return false;
1706
 
1707
      boolean this_present_success = true && this.isSetSuccess();
1708
      boolean that_present_success = true && that.isSetSuccess();
1709
      if (this_present_success || that_present_success) {
1710
        if (!(this_present_success && that_present_success))
1711
          return false;
1712
        if (!this.success.equals(that.success))
1713
          return false;
1714
      }
1715
 
4541 mandeep.dh 1716
      boolean this_present_wex = true && this.isSetWex();
1717
      boolean that_present_wex = true && that.isSetWex();
1718
      if (this_present_wex || that_present_wex) {
1719
        if (!(this_present_wex && that_present_wex))
1720
          return false;
1721
        if (!this.wex.equals(that.wex))
1722
          return false;
1723
      }
1724
 
2832 chandransh 1725
      return true;
1726
    }
1727
 
1728
    @Override
1729
    public int hashCode() {
1730
      return 0;
1731
    }
1732
 
4496 mandeep.dh 1733
    public int compareTo(getInventoryItem_result other) {
2832 chandransh 1734
      if (!getClass().equals(other.getClass())) {
1735
        return getClass().getName().compareTo(other.getClass().getName());
1736
      }
1737
 
1738
      int lastComparison = 0;
4496 mandeep.dh 1739
      getInventoryItem_result typedOther = (getInventoryItem_result)other;
2832 chandransh 1740
 
3430 rajveer 1741
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2832 chandransh 1742
      if (lastComparison != 0) {
1743
        return lastComparison;
1744
      }
3430 rajveer 1745
      if (isSetSuccess()) {
1746
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
1747
        if (lastComparison != 0) {
1748
          return lastComparison;
1749
        }
2832 chandransh 1750
      }
4541 mandeep.dh 1751
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
1752
      if (lastComparison != 0) {
1753
        return lastComparison;
1754
      }
1755
      if (isSetWex()) {
1756
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
1757
        if (lastComparison != 0) {
1758
          return lastComparison;
1759
        }
1760
      }
2832 chandransh 1761
      return 0;
1762
    }
1763
 
3430 rajveer 1764
    public _Fields fieldForId(int fieldId) {
1765
      return _Fields.findByThriftId(fieldId);
1766
    }
1767
 
1768
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1769
      org.apache.thrift.protocol.TField field;
2832 chandransh 1770
      iprot.readStructBegin();
1771
      while (true)
1772
      {
1773
        field = iprot.readFieldBegin();
3430 rajveer 1774
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2832 chandransh 1775
          break;
1776
        }
3430 rajveer 1777
        switch (field.id) {
1778
          case 0: // SUCCESS
1779
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4496 mandeep.dh 1780
              this.success = new InventoryItem();
3430 rajveer 1781
              this.success.read(iprot);
1782
            } else { 
1783
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1784
            }
1785
            break;
4541 mandeep.dh 1786
          case 1: // WEX
1787
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
1788
              this.wex = new WarehouseServiceException();
1789
              this.wex.read(iprot);
1790
            } else { 
1791
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1792
            }
1793
            break;
3430 rajveer 1794
          default:
1795
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2832 chandransh 1796
        }
3430 rajveer 1797
        iprot.readFieldEnd();
2832 chandransh 1798
      }
1799
      iprot.readStructEnd();
1800
      validate();
1801
    }
1802
 
3430 rajveer 1803
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2832 chandransh 1804
      oprot.writeStructBegin(STRUCT_DESC);
1805
 
1806
      if (this.isSetSuccess()) {
1807
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
1808
        this.success.write(oprot);
1809
        oprot.writeFieldEnd();
4541 mandeep.dh 1810
      } else if (this.isSetWex()) {
1811
        oprot.writeFieldBegin(WEX_FIELD_DESC);
1812
        this.wex.write(oprot);
1813
        oprot.writeFieldEnd();
2832 chandransh 1814
      }
1815
      oprot.writeFieldStop();
1816
      oprot.writeStructEnd();
1817
    }
1818
 
1819
    @Override
1820
    public String toString() {
4496 mandeep.dh 1821
      StringBuilder sb = new StringBuilder("getInventoryItem_result(");
2832 chandransh 1822
      boolean first = true;
1823
 
1824
      sb.append("success:");
1825
      if (this.success == null) {
1826
        sb.append("null");
1827
      } else {
1828
        sb.append(this.success);
1829
      }
1830
      first = false;
4541 mandeep.dh 1831
      if (!first) sb.append(", ");
1832
      sb.append("wex:");
1833
      if (this.wex == null) {
1834
        sb.append("null");
1835
      } else {
1836
        sb.append(this.wex);
1837
      }
1838
      first = false;
2832 chandransh 1839
      sb.append(")");
1840
      return sb.toString();
1841
    }
1842
 
3430 rajveer 1843
    public void validate() throws org.apache.thrift.TException {
2832 chandransh 1844
      // check for required fields
1845
    }
1846
 
3430 rajveer 1847
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1848
      try {
1849
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1850
      } catch (org.apache.thrift.TException te) {
1851
        throw new java.io.IOException(te);
1852
      }
1853
    }
1854
 
1855
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1856
      try {
1857
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1858
      } catch (org.apache.thrift.TException te) {
1859
        throw new java.io.IOException(te);
1860
      }
1861
    }
1862
 
2832 chandransh 1863
  }
1864
 
5361 mandeep.dh 1865
  public static class getNonSeralizedInventoryItem_args implements org.apache.thrift.TBase<getNonSeralizedInventoryItem_args, getNonSeralizedInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
1866
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNonSeralizedInventoryItem_args");
2820 chandransh 1867
 
5530 mandeep.dh 1868
    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)1);
1869
    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);
1870
    private static final org.apache.thrift.protocol.TField FULFILMENT_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("fulfilmentWarehouseId", org.apache.thrift.protocol.TType.I64, (short)3);
2820 chandransh 1871
 
5530 mandeep.dh 1872
    private String itemNumber; // required
4496 mandeep.dh 1873
    private long itemId; // required
5530 mandeep.dh 1874
    private long fulfilmentWarehouseId; // required
2820 chandransh 1875
 
1876
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 1877
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5530 mandeep.dh 1878
      ITEM_NUMBER((short)1, "itemNumber"),
1879
      ITEM_ID((short)2, "itemId"),
1880
      FULFILMENT_WAREHOUSE_ID((short)3, "fulfilmentWarehouseId");
2820 chandransh 1881
 
1882
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1883
 
1884
      static {
1885
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1886
          byName.put(field.getFieldName(), field);
1887
        }
1888
      }
1889
 
1890
      /**
1891
       * Find the _Fields constant that matches fieldId, or null if its not found.
1892
       */
1893
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 1894
        switch(fieldId) {
5530 mandeep.dh 1895
          case 1: // ITEM_NUMBER
1896
            return ITEM_NUMBER;
1897
          case 2: // ITEM_ID
4496 mandeep.dh 1898
            return ITEM_ID;
5530 mandeep.dh 1899
          case 3: // FULFILMENT_WAREHOUSE_ID
1900
            return FULFILMENT_WAREHOUSE_ID;
3430 rajveer 1901
          default:
1902
            return null;
1903
        }
2820 chandransh 1904
      }
1905
 
1906
      /**
1907
       * Find the _Fields constant that matches fieldId, throwing an exception
1908
       * if it is not found.
1909
       */
1910
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1911
        _Fields fields = findByThriftId(fieldId);
1912
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1913
        return fields;
1914
      }
1915
 
1916
      /**
1917
       * Find the _Fields constant that matches name, or null if its not found.
1918
       */
1919
      public static _Fields findByName(String name) {
1920
        return byName.get(name);
1921
      }
1922
 
1923
      private final short _thriftId;
1924
      private final String _fieldName;
1925
 
1926
      _Fields(short thriftId, String fieldName) {
1927
        _thriftId = thriftId;
1928
        _fieldName = fieldName;
1929
      }
1930
 
1931
      public short getThriftFieldId() {
1932
        return _thriftId;
1933
      }
1934
 
1935
      public String getFieldName() {
1936
        return _fieldName;
1937
      }
1938
    }
1939
 
1940
    // isset id assignments
4496 mandeep.dh 1941
    private static final int __ITEMID_ISSET_ID = 0;
5530 mandeep.dh 1942
    private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 1;
5361 mandeep.dh 1943
    private BitSet __isset_bit_vector = new BitSet(2);
2820 chandransh 1944
 
3430 rajveer 1945
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 1946
    static {
3430 rajveer 1947
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5530 mandeep.dh 1948
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1949
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
4496 mandeep.dh 1950
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3430 rajveer 1951
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5530 mandeep.dh 1952
      tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 1953
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 1954
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5361 mandeep.dh 1955
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNonSeralizedInventoryItem_args.class, metaDataMap);
2820 chandransh 1956
    }
1957
 
5361 mandeep.dh 1958
    public getNonSeralizedInventoryItem_args() {
2820 chandransh 1959
    }
1960
 
5361 mandeep.dh 1961
    public getNonSeralizedInventoryItem_args(
5530 mandeep.dh 1962
      String itemNumber,
4496 mandeep.dh 1963
      long itemId,
5530 mandeep.dh 1964
      long fulfilmentWarehouseId)
2820 chandransh 1965
    {
1966
      this();
5530 mandeep.dh 1967
      this.itemNumber = itemNumber;
4496 mandeep.dh 1968
      this.itemId = itemId;
1969
      setItemIdIsSet(true);
5530 mandeep.dh 1970
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
1971
      setFulfilmentWarehouseIdIsSet(true);
2820 chandransh 1972
    }
1973
 
1974
    /**
1975
     * Performs a deep copy on <i>other</i>.
1976
     */
5361 mandeep.dh 1977
    public getNonSeralizedInventoryItem_args(getNonSeralizedInventoryItem_args other) {
2820 chandransh 1978
      __isset_bit_vector.clear();
1979
      __isset_bit_vector.or(other.__isset_bit_vector);
5530 mandeep.dh 1980
      if (other.isSetItemNumber()) {
1981
        this.itemNumber = other.itemNumber;
1982
      }
4496 mandeep.dh 1983
      this.itemId = other.itemId;
5530 mandeep.dh 1984
      this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
2820 chandransh 1985
    }
1986
 
5361 mandeep.dh 1987
    public getNonSeralizedInventoryItem_args deepCopy() {
1988
      return new getNonSeralizedInventoryItem_args(this);
2820 chandransh 1989
    }
1990
 
3430 rajveer 1991
    @Override
1992
    public void clear() {
5530 mandeep.dh 1993
      this.itemNumber = null;
4496 mandeep.dh 1994
      setItemIdIsSet(false);
1995
      this.itemId = 0;
5530 mandeep.dh 1996
      setFulfilmentWarehouseIdIsSet(false);
1997
      this.fulfilmentWarehouseId = 0;
2820 chandransh 1998
    }
1999
 
5530 mandeep.dh 2000
    public String getItemNumber() {
2001
      return this.itemNumber;
2002
    }
2003
 
2004
    public void setItemNumber(String itemNumber) {
2005
      this.itemNumber = itemNumber;
2006
    }
2007
 
2008
    public void unsetItemNumber() {
2009
      this.itemNumber = null;
2010
    }
2011
 
2012
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
2013
    public boolean isSetItemNumber() {
2014
      return this.itemNumber != null;
2015
    }
2016
 
2017
    public void setItemNumberIsSet(boolean value) {
2018
      if (!value) {
2019
        this.itemNumber = null;
2020
      }
2021
    }
2022
 
4496 mandeep.dh 2023
    public long getItemId() {
2024
      return this.itemId;
2820 chandransh 2025
    }
2026
 
4496 mandeep.dh 2027
    public void setItemId(long itemId) {
2028
      this.itemId = itemId;
2029
      setItemIdIsSet(true);
2820 chandransh 2030
    }
2031
 
4496 mandeep.dh 2032
    public void unsetItemId() {
2033
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
2820 chandransh 2034
    }
2035
 
4496 mandeep.dh 2036
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
2037
    public boolean isSetItemId() {
2038
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
2820 chandransh 2039
    }
2040
 
4496 mandeep.dh 2041
    public void setItemIdIsSet(boolean value) {
2042
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
2820 chandransh 2043
    }
2044
 
5530 mandeep.dh 2045
    public long getFulfilmentWarehouseId() {
2046
      return this.fulfilmentWarehouseId;
2820 chandransh 2047
    }
2048
 
5530 mandeep.dh 2049
    public void setFulfilmentWarehouseId(long fulfilmentWarehouseId) {
2050
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
2051
      setFulfilmentWarehouseIdIsSet(true);
2820 chandransh 2052
    }
2053
 
5530 mandeep.dh 2054
    public void unsetFulfilmentWarehouseId() {
2055
      __isset_bit_vector.clear(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 2056
    }
2057
 
5530 mandeep.dh 2058
    /** Returns true if field fulfilmentWarehouseId is set (has been assigned a value) and false otherwise */
2059
    public boolean isSetFulfilmentWarehouseId() {
2060
      return __isset_bit_vector.get(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 2061
    }
2062
 
5530 mandeep.dh 2063
    public void setFulfilmentWarehouseIdIsSet(boolean value) {
2064
      __isset_bit_vector.set(__FULFILMENTWAREHOUSEID_ISSET_ID, value);
2820 chandransh 2065
    }
2066
 
2067
    public void setFieldValue(_Fields field, Object value) {
2068
      switch (field) {
5530 mandeep.dh 2069
      case ITEM_NUMBER:
2070
        if (value == null) {
2071
          unsetItemNumber();
2072
        } else {
2073
          setItemNumber((String)value);
2074
        }
2075
        break;
2076
 
4496 mandeep.dh 2077
      case ITEM_ID:
2820 chandransh 2078
        if (value == null) {
4496 mandeep.dh 2079
          unsetItemId();
2820 chandransh 2080
        } else {
4496 mandeep.dh 2081
          setItemId((Long)value);
2820 chandransh 2082
        }
2083
        break;
2084
 
5530 mandeep.dh 2085
      case FULFILMENT_WAREHOUSE_ID:
2820 chandransh 2086
        if (value == null) {
5530 mandeep.dh 2087
          unsetFulfilmentWarehouseId();
2820 chandransh 2088
        } else {
5530 mandeep.dh 2089
          setFulfilmentWarehouseId((Long)value);
2820 chandransh 2090
        }
2091
        break;
2092
 
2093
      }
2094
    }
2095
 
2096
    public Object getFieldValue(_Fields field) {
2097
      switch (field) {
5530 mandeep.dh 2098
      case ITEM_NUMBER:
2099
        return getItemNumber();
2100
 
4496 mandeep.dh 2101
      case ITEM_ID:
2102
        return Long.valueOf(getItemId());
2820 chandransh 2103
 
5530 mandeep.dh 2104
      case FULFILMENT_WAREHOUSE_ID:
2105
        return Long.valueOf(getFulfilmentWarehouseId());
2820 chandransh 2106
 
2107
      }
2108
      throw new IllegalStateException();
2109
    }
2110
 
3430 rajveer 2111
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2112
    public boolean isSet(_Fields field) {
2113
      if (field == null) {
2114
        throw new IllegalArgumentException();
2115
      }
2820 chandransh 2116
 
2117
      switch (field) {
5530 mandeep.dh 2118
      case ITEM_NUMBER:
2119
        return isSetItemNumber();
4496 mandeep.dh 2120
      case ITEM_ID:
2121
        return isSetItemId();
5530 mandeep.dh 2122
      case FULFILMENT_WAREHOUSE_ID:
2123
        return isSetFulfilmentWarehouseId();
2820 chandransh 2124
      }
2125
      throw new IllegalStateException();
2126
    }
2127
 
2128
    @Override
2129
    public boolean equals(Object that) {
2130
      if (that == null)
2131
        return false;
5361 mandeep.dh 2132
      if (that instanceof getNonSeralizedInventoryItem_args)
2133
        return this.equals((getNonSeralizedInventoryItem_args)that);
2820 chandransh 2134
      return false;
2135
    }
2136
 
5361 mandeep.dh 2137
    public boolean equals(getNonSeralizedInventoryItem_args that) {
2820 chandransh 2138
      if (that == null)
2139
        return false;
2140
 
5530 mandeep.dh 2141
      boolean this_present_itemNumber = true && this.isSetItemNumber();
2142
      boolean that_present_itemNumber = true && that.isSetItemNumber();
2143
      if (this_present_itemNumber || that_present_itemNumber) {
2144
        if (!(this_present_itemNumber && that_present_itemNumber))
2145
          return false;
2146
        if (!this.itemNumber.equals(that.itemNumber))
2147
          return false;
2148
      }
2149
 
4496 mandeep.dh 2150
      boolean this_present_itemId = true;
2151
      boolean that_present_itemId = true;
2152
      if (this_present_itemId || that_present_itemId) {
2153
        if (!(this_present_itemId && that_present_itemId))
2820 chandransh 2154
          return false;
4496 mandeep.dh 2155
        if (this.itemId != that.itemId)
2820 chandransh 2156
          return false;
2157
      }
2158
 
5530 mandeep.dh 2159
      boolean this_present_fulfilmentWarehouseId = true;
2160
      boolean that_present_fulfilmentWarehouseId = true;
2161
      if (this_present_fulfilmentWarehouseId || that_present_fulfilmentWarehouseId) {
2162
        if (!(this_present_fulfilmentWarehouseId && that_present_fulfilmentWarehouseId))
2820 chandransh 2163
          return false;
5530 mandeep.dh 2164
        if (this.fulfilmentWarehouseId != that.fulfilmentWarehouseId)
2820 chandransh 2165
          return false;
2166
      }
2167
 
2168
      return true;
2169
    }
2170
 
2171
    @Override
2172
    public int hashCode() {
2173
      return 0;
2174
    }
2175
 
5361 mandeep.dh 2176
    public int compareTo(getNonSeralizedInventoryItem_args other) {
2820 chandransh 2177
      if (!getClass().equals(other.getClass())) {
2178
        return getClass().getName().compareTo(other.getClass().getName());
2179
      }
2180
 
2181
      int lastComparison = 0;
5361 mandeep.dh 2182
      getNonSeralizedInventoryItem_args typedOther = (getNonSeralizedInventoryItem_args)other;
2820 chandransh 2183
 
5530 mandeep.dh 2184
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
2185
      if (lastComparison != 0) {
2186
        return lastComparison;
2187
      }
2188
      if (isSetItemNumber()) {
2189
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
2190
        if (lastComparison != 0) {
2191
          return lastComparison;
2192
        }
2193
      }
4496 mandeep.dh 2194
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
2820 chandransh 2195
      if (lastComparison != 0) {
2196
        return lastComparison;
2197
      }
4496 mandeep.dh 2198
      if (isSetItemId()) {
2199
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
3430 rajveer 2200
        if (lastComparison != 0) {
2201
          return lastComparison;
2202
        }
2820 chandransh 2203
      }
5530 mandeep.dh 2204
      lastComparison = Boolean.valueOf(isSetFulfilmentWarehouseId()).compareTo(typedOther.isSetFulfilmentWarehouseId());
2820 chandransh 2205
      if (lastComparison != 0) {
2206
        return lastComparison;
2207
      }
5530 mandeep.dh 2208
      if (isSetFulfilmentWarehouseId()) {
2209
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilmentWarehouseId, typedOther.fulfilmentWarehouseId);
3430 rajveer 2210
        if (lastComparison != 0) {
2211
          return lastComparison;
2212
        }
2820 chandransh 2213
      }
2214
      return 0;
2215
    }
2216
 
3430 rajveer 2217
    public _Fields fieldForId(int fieldId) {
2218
      return _Fields.findByThriftId(fieldId);
2219
    }
2220
 
2221
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2222
      org.apache.thrift.protocol.TField field;
2820 chandransh 2223
      iprot.readStructBegin();
2224
      while (true)
2225
      {
2226
        field = iprot.readFieldBegin();
3430 rajveer 2227
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 2228
          break;
2229
        }
3430 rajveer 2230
        switch (field.id) {
5530 mandeep.dh 2231
          case 1: // ITEM_NUMBER
2232
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
2233
              this.itemNumber = iprot.readString();
2234
            } else { 
2235
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2236
            }
2237
            break;
2238
          case 2: // ITEM_ID
3430 rajveer 2239
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4496 mandeep.dh 2240
              this.itemId = iprot.readI64();
2241
              setItemIdIsSet(true);
3430 rajveer 2242
            } else { 
2243
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2244
            }
2245
            break;
5530 mandeep.dh 2246
          case 3: // FULFILMENT_WAREHOUSE_ID
4496 mandeep.dh 2247
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5530 mandeep.dh 2248
              this.fulfilmentWarehouseId = iprot.readI64();
2249
              setFulfilmentWarehouseIdIsSet(true);
3430 rajveer 2250
            } else { 
2251
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2252
            }
2253
            break;
2254
          default:
2255
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 2256
        }
3430 rajveer 2257
        iprot.readFieldEnd();
2820 chandransh 2258
      }
2259
      iprot.readStructEnd();
2260
      validate();
2261
    }
2262
 
3430 rajveer 2263
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 2264
      validate();
2265
 
2266
      oprot.writeStructBegin(STRUCT_DESC);
5530 mandeep.dh 2267
      if (this.itemNumber != null) {
2268
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
2269
        oprot.writeString(this.itemNumber);
2270
        oprot.writeFieldEnd();
2271
      }
4496 mandeep.dh 2272
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
2273
      oprot.writeI64(this.itemId);
2820 chandransh 2274
      oprot.writeFieldEnd();
5530 mandeep.dh 2275
      oprot.writeFieldBegin(FULFILMENT_WAREHOUSE_ID_FIELD_DESC);
2276
      oprot.writeI64(this.fulfilmentWarehouseId);
2820 chandransh 2277
      oprot.writeFieldEnd();
2278
      oprot.writeFieldStop();
2279
      oprot.writeStructEnd();
2280
    }
2281
 
2282
    @Override
2283
    public String toString() {
5361 mandeep.dh 2284
      StringBuilder sb = new StringBuilder("getNonSeralizedInventoryItem_args(");
2820 chandransh 2285
      boolean first = true;
2286
 
5530 mandeep.dh 2287
      sb.append("itemNumber:");
2288
      if (this.itemNumber == null) {
2289
        sb.append("null");
2290
      } else {
2291
        sb.append(this.itemNumber);
2292
      }
2293
      first = false;
2294
      if (!first) sb.append(", ");
4496 mandeep.dh 2295
      sb.append("itemId:");
2296
      sb.append(this.itemId);
2820 chandransh 2297
      first = false;
2298
      if (!first) sb.append(", ");
5530 mandeep.dh 2299
      sb.append("fulfilmentWarehouseId:");
2300
      sb.append(this.fulfilmentWarehouseId);
2820 chandransh 2301
      first = false;
2302
      sb.append(")");
2303
      return sb.toString();
2304
    }
2305
 
3430 rajveer 2306
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 2307
      // check for required fields
2308
    }
2309
 
3430 rajveer 2310
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2311
      try {
2312
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2313
      } catch (org.apache.thrift.TException te) {
2314
        throw new java.io.IOException(te);
2315
      }
2316
    }
2317
 
2318
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2319
      try {
4496 mandeep.dh 2320
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
2321
        __isset_bit_vector = new BitSet(1);
3430 rajveer 2322
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2323
      } catch (org.apache.thrift.TException te) {
2324
        throw new java.io.IOException(te);
2325
      }
2326
    }
2327
 
2820 chandransh 2328
  }
2329
 
5361 mandeep.dh 2330
  public static class getNonSeralizedInventoryItem_result implements org.apache.thrift.TBase<getNonSeralizedInventoryItem_result, getNonSeralizedInventoryItem_result._Fields>, java.io.Serializable, Cloneable   {
2331
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNonSeralizedInventoryItem_result");
2820 chandransh 2332
 
5361 mandeep.dh 2333
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
2334
    private static final org.apache.thrift.protocol.TField WEX_FIELD_DESC = new org.apache.thrift.protocol.TField("wex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
2820 chandransh 2335
 
5361 mandeep.dh 2336
    private InventoryItem success; // required
2337
    private WarehouseServiceException wex; // required
2820 chandransh 2338
 
2339
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2340
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 2341
      SUCCESS((short)0, "success"),
2342
      WEX((short)1, "wex");
2820 chandransh 2343
 
2344
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2345
 
2346
      static {
2347
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2348
          byName.put(field.getFieldName(), field);
2349
        }
2350
      }
2351
 
2352
      /**
2353
       * Find the _Fields constant that matches fieldId, or null if its not found.
2354
       */
2355
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2356
        switch(fieldId) {
2357
          case 0: // SUCCESS
2358
            return SUCCESS;
5361 mandeep.dh 2359
          case 1: // WEX
2360
            return WEX;
3430 rajveer 2361
          default:
2362
            return null;
2363
        }
2820 chandransh 2364
      }
2365
 
2366
      /**
2367
       * Find the _Fields constant that matches fieldId, throwing an exception
2368
       * if it is not found.
2369
       */
2370
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2371
        _Fields fields = findByThriftId(fieldId);
2372
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2373
        return fields;
2374
      }
2375
 
2376
      /**
2377
       * Find the _Fields constant that matches name, or null if its not found.
2378
       */
2379
      public static _Fields findByName(String name) {
2380
        return byName.get(name);
2381
      }
2382
 
2383
      private final short _thriftId;
2384
      private final String _fieldName;
2385
 
2386
      _Fields(short thriftId, String fieldName) {
2387
        _thriftId = thriftId;
2388
        _fieldName = fieldName;
2389
      }
2390
 
2391
      public short getThriftFieldId() {
2392
        return _thriftId;
2393
      }
2394
 
2395
      public String getFieldName() {
2396
        return _fieldName;
2397
      }
2398
    }
2399
 
2400
    // isset id assignments
2401
 
3430 rajveer 2402
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 2403
    static {
3430 rajveer 2404
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2405
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5361 mandeep.dh 2406
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
2407
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2408
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3430 rajveer 2409
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5361 mandeep.dh 2410
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNonSeralizedInventoryItem_result.class, metaDataMap);
2820 chandransh 2411
    }
2412
 
5361 mandeep.dh 2413
    public getNonSeralizedInventoryItem_result() {
2820 chandransh 2414
    }
2415
 
5361 mandeep.dh 2416
    public getNonSeralizedInventoryItem_result(
2417
      InventoryItem success,
2418
      WarehouseServiceException wex)
2820 chandransh 2419
    {
2420
      this();
2421
      this.success = success;
5361 mandeep.dh 2422
      this.wex = wex;
2820 chandransh 2423
    }
2424
 
2425
    /**
2426
     * Performs a deep copy on <i>other</i>.
2427
     */
5361 mandeep.dh 2428
    public getNonSeralizedInventoryItem_result(getNonSeralizedInventoryItem_result other) {
4496 mandeep.dh 2429
      if (other.isSetSuccess()) {
5361 mandeep.dh 2430
        this.success = new InventoryItem(other.success);
2820 chandransh 2431
      }
5361 mandeep.dh 2432
      if (other.isSetWex()) {
2433
        this.wex = new WarehouseServiceException(other.wex);
2434
      }
2820 chandransh 2435
    }
2436
 
5361 mandeep.dh 2437
    public getNonSeralizedInventoryItem_result deepCopy() {
2438
      return new getNonSeralizedInventoryItem_result(this);
2820 chandransh 2439
    }
2440
 
3430 rajveer 2441
    @Override
2442
    public void clear() {
4496 mandeep.dh 2443
      this.success = null;
5361 mandeep.dh 2444
      this.wex = null;
2820 chandransh 2445
    }
2446
 
5361 mandeep.dh 2447
    public InventoryItem getSuccess() {
2820 chandransh 2448
      return this.success;
2449
    }
2450
 
5361 mandeep.dh 2451
    public void setSuccess(InventoryItem success) {
2820 chandransh 2452
      this.success = success;
2453
    }
2454
 
2455
    public void unsetSuccess() {
4496 mandeep.dh 2456
      this.success = null;
2820 chandransh 2457
    }
2458
 
3430 rajveer 2459
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2820 chandransh 2460
    public boolean isSetSuccess() {
4496 mandeep.dh 2461
      return this.success != null;
2820 chandransh 2462
    }
2463
 
2464
    public void setSuccessIsSet(boolean value) {
4496 mandeep.dh 2465
      if (!value) {
2466
        this.success = null;
2467
      }
2820 chandransh 2468
    }
2469
 
5361 mandeep.dh 2470
    public WarehouseServiceException getWex() {
2471
      return this.wex;
2820 chandransh 2472
    }
2473
 
5361 mandeep.dh 2474
    public void setWex(WarehouseServiceException wex) {
2475
      this.wex = wex;
2820 chandransh 2476
    }
2477
 
5361 mandeep.dh 2478
    public void unsetWex() {
2479
      this.wex = null;
2820 chandransh 2480
    }
2481
 
5361 mandeep.dh 2482
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2483
    public boolean isSetWex() {
2484
      return this.wex != null;
2820 chandransh 2485
    }
2486
 
5361 mandeep.dh 2487
    public void setWexIsSet(boolean value) {
2488
      if (!value) {
2489
        this.wex = null;
2820 chandransh 2490
      }
2491
    }
2492
 
2493
    public void setFieldValue(_Fields field, Object value) {
2494
      switch (field) {
5361 mandeep.dh 2495
      case SUCCESS:
2820 chandransh 2496
        if (value == null) {
5361 mandeep.dh 2497
          unsetSuccess();
2820 chandransh 2498
        } else {
5361 mandeep.dh 2499
          setSuccess((InventoryItem)value);
2820 chandransh 2500
        }
2501
        break;
2502
 
5361 mandeep.dh 2503
      case WEX:
2820 chandransh 2504
        if (value == null) {
5361 mandeep.dh 2505
          unsetWex();
2820 chandransh 2506
        } else {
5361 mandeep.dh 2507
          setWex((WarehouseServiceException)value);
2820 chandransh 2508
        }
2509
        break;
2510
 
2511
      }
2512
    }
2513
 
2514
    public Object getFieldValue(_Fields field) {
2515
      switch (field) {
2516
      case SUCCESS:
4496 mandeep.dh 2517
        return getSuccess();
2820 chandransh 2518
 
5361 mandeep.dh 2519
      case WEX:
2520
        return getWex();
2521
 
2820 chandransh 2522
      }
2523
      throw new IllegalStateException();
2524
    }
2525
 
3430 rajveer 2526
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2527
    public boolean isSet(_Fields field) {
2528
      if (field == null) {
2529
        throw new IllegalArgumentException();
2530
      }
2820 chandransh 2531
 
2532
      switch (field) {
2533
      case SUCCESS:
2534
        return isSetSuccess();
5361 mandeep.dh 2535
      case WEX:
2536
        return isSetWex();
2820 chandransh 2537
      }
2538
      throw new IllegalStateException();
2539
    }
2540
 
2541
    @Override
2542
    public boolean equals(Object that) {
2543
      if (that == null)
2544
        return false;
5361 mandeep.dh 2545
      if (that instanceof getNonSeralizedInventoryItem_result)
2546
        return this.equals((getNonSeralizedInventoryItem_result)that);
2820 chandransh 2547
      return false;
2548
    }
2549
 
5361 mandeep.dh 2550
    public boolean equals(getNonSeralizedInventoryItem_result that) {
2820 chandransh 2551
      if (that == null)
2552
        return false;
2553
 
4496 mandeep.dh 2554
      boolean this_present_success = true && this.isSetSuccess();
2555
      boolean that_present_success = true && that.isSetSuccess();
2820 chandransh 2556
      if (this_present_success || that_present_success) {
2557
        if (!(this_present_success && that_present_success))
2558
          return false;
4496 mandeep.dh 2559
        if (!this.success.equals(that.success))
2820 chandransh 2560
          return false;
2561
      }
2562
 
5361 mandeep.dh 2563
      boolean this_present_wex = true && this.isSetWex();
2564
      boolean that_present_wex = true && that.isSetWex();
2565
      if (this_present_wex || that_present_wex) {
2566
        if (!(this_present_wex && that_present_wex))
4496 mandeep.dh 2567
          return false;
5361 mandeep.dh 2568
        if (!this.wex.equals(that.wex))
4496 mandeep.dh 2569
          return false;
2570
      }
2571
 
2572
      return true;
2573
    }
2574
 
2575
    @Override
2576
    public int hashCode() {
2577
      return 0;
2578
    }
2579
 
5361 mandeep.dh 2580
    public int compareTo(getNonSeralizedInventoryItem_result other) {
4496 mandeep.dh 2581
      if (!getClass().equals(other.getClass())) {
2582
        return getClass().getName().compareTo(other.getClass().getName());
2583
      }
2584
 
2585
      int lastComparison = 0;
5361 mandeep.dh 2586
      getNonSeralizedInventoryItem_result typedOther = (getNonSeralizedInventoryItem_result)other;
4496 mandeep.dh 2587
 
2588
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2589
      if (lastComparison != 0) {
2590
        return lastComparison;
2591
      }
2592
      if (isSetSuccess()) {
2593
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
2594
        if (lastComparison != 0) {
2595
          return lastComparison;
2596
        }
2597
      }
5361 mandeep.dh 2598
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 2599
      if (lastComparison != 0) {
2600
        return lastComparison;
2601
      }
5361 mandeep.dh 2602
      if (isSetWex()) {
2603
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
3430 rajveer 2604
        if (lastComparison != 0) {
2605
          return lastComparison;
2606
        }
2820 chandransh 2607
      }
2608
      return 0;
2609
    }
2610
 
3430 rajveer 2611
    public _Fields fieldForId(int fieldId) {
2612
      return _Fields.findByThriftId(fieldId);
2613
    }
2614
 
2615
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2616
      org.apache.thrift.protocol.TField field;
2820 chandransh 2617
      iprot.readStructBegin();
2618
      while (true)
2619
      {
2620
        field = iprot.readFieldBegin();
3430 rajveer 2621
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 2622
          break;
2623
        }
3430 rajveer 2624
        switch (field.id) {
5361 mandeep.dh 2625
          case 0: // SUCCESS
2626
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2627
              this.success = new InventoryItem();
2628
              this.success.read(iprot);
3430 rajveer 2629
            } else { 
2630
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2631
            }
2632
            break;
5361 mandeep.dh 2633
          case 1: // WEX
2634
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2635
              this.wex = new WarehouseServiceException();
2636
              this.wex.read(iprot);
4496 mandeep.dh 2637
            } else { 
2638
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2639
            }
2640
            break;
2641
          default:
2642
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2643
        }
2644
        iprot.readFieldEnd();
2645
      }
2646
      iprot.readStructEnd();
2647
      validate();
2648
    }
2649
 
2650
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2651
      oprot.writeStructBegin(STRUCT_DESC);
2652
 
2653
      if (this.isSetSuccess()) {
2654
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5361 mandeep.dh 2655
        this.success.write(oprot);
4496 mandeep.dh 2656
        oprot.writeFieldEnd();
5361 mandeep.dh 2657
      } else if (this.isSetWex()) {
2658
        oprot.writeFieldBegin(WEX_FIELD_DESC);
2659
        this.wex.write(oprot);
2660
        oprot.writeFieldEnd();
4496 mandeep.dh 2661
      }
2662
      oprot.writeFieldStop();
2663
      oprot.writeStructEnd();
2664
    }
2665
 
2666
    @Override
2667
    public String toString() {
5361 mandeep.dh 2668
      StringBuilder sb = new StringBuilder("getNonSeralizedInventoryItem_result(");
4496 mandeep.dh 2669
      boolean first = true;
2670
 
2671
      sb.append("success:");
2672
      if (this.success == null) {
2673
        sb.append("null");
2674
      } else {
2675
        sb.append(this.success);
2676
      }
2677
      first = false;
5361 mandeep.dh 2678
      if (!first) sb.append(", ");
2679
      sb.append("wex:");
2680
      if (this.wex == null) {
2681
        sb.append("null");
2682
      } else {
2683
        sb.append(this.wex);
2684
      }
2685
      first = false;
4496 mandeep.dh 2686
      sb.append(")");
2687
      return sb.toString();
2688
    }
2689
 
2690
    public void validate() throws org.apache.thrift.TException {
2691
      // check for required fields
2692
    }
2693
 
2694
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2695
      try {
2696
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2697
      } catch (org.apache.thrift.TException te) {
2698
        throw new java.io.IOException(te);
2699
      }
2700
    }
2701
 
2702
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2703
      try {
2704
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2705
      } catch (org.apache.thrift.TException te) {
2706
        throw new java.io.IOException(te);
2707
      }
2708
    }
2709
 
2710
  }
2711
 
2712
  public static class scan_args implements org.apache.thrift.TBase<scan_args, scan_args._Fields>, java.io.Serializable, Cloneable   {
2713
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scan_args");
3383 chandransh 2714
 
5361 mandeep.dh 2715
    private static final org.apache.thrift.protocol.TField INVENTORY_ITEM_FIELD_DESC = new org.apache.thrift.protocol.TField("inventoryItem", org.apache.thrift.protocol.TType.STRUCT, (short)1);
4496 mandeep.dh 2716
    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)2);
2717
    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);
5361 mandeep.dh 2718
    private static final org.apache.thrift.protocol.TField BILLING_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("billingWarehouseId", org.apache.thrift.protocol.TType.I64, (short)4);
3383 chandransh 2719
 
5361 mandeep.dh 2720
    private InventoryItem inventoryItem; // required
4496 mandeep.dh 2721
    private ScanType type; // required
2722
    private long quantity; // required
5361 mandeep.dh 2723
    private long billingWarehouseId; // required
3383 chandransh 2724
 
2725
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2726
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 2727
      INVENTORY_ITEM((short)1, "inventoryItem"),
4496 mandeep.dh 2728
      /**
2729
       * 
2730
       * @see ScanType
2731
       */
2732
      TYPE((short)2, "type"),
2733
      QUANTITY((short)3, "quantity"),
5361 mandeep.dh 2734
      BILLING_WAREHOUSE_ID((short)4, "billingWarehouseId");
3383 chandransh 2735
 
2736
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2737
 
2738
      static {
2739
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2740
          byName.put(field.getFieldName(), field);
2741
        }
2742
      }
2743
 
2744
      /**
2745
       * Find the _Fields constant that matches fieldId, or null if its not found.
2746
       */
2747
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2748
        switch(fieldId) {
5361 mandeep.dh 2749
          case 1: // INVENTORY_ITEM
2750
            return INVENTORY_ITEM;
4496 mandeep.dh 2751
          case 2: // TYPE
2752
            return TYPE;
2753
          case 3: // QUANTITY
2754
            return QUANTITY;
5361 mandeep.dh 2755
          case 4: // BILLING_WAREHOUSE_ID
2756
            return BILLING_WAREHOUSE_ID;
3430 rajveer 2757
          default:
2758
            return null;
2759
        }
3383 chandransh 2760
      }
2761
 
2762
      /**
2763
       * Find the _Fields constant that matches fieldId, throwing an exception
2764
       * if it is not found.
2765
       */
2766
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2767
        _Fields fields = findByThriftId(fieldId);
2768
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2769
        return fields;
2770
      }
2771
 
2772
      /**
2773
       * Find the _Fields constant that matches name, or null if its not found.
2774
       */
2775
      public static _Fields findByName(String name) {
2776
        return byName.get(name);
2777
      }
2778
 
2779
      private final short _thriftId;
2780
      private final String _fieldName;
2781
 
2782
      _Fields(short thriftId, String fieldName) {
2783
        _thriftId = thriftId;
2784
        _fieldName = fieldName;
2785
      }
2786
 
2787
      public short getThriftFieldId() {
2788
        return _thriftId;
2789
      }
2790
 
2791
      public String getFieldName() {
2792
        return _fieldName;
2793
      }
2794
    }
2795
 
2796
    // isset id assignments
5361 mandeep.dh 2797
    private static final int __QUANTITY_ISSET_ID = 0;
2798
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 1;
2799
    private BitSet __isset_bit_vector = new BitSet(2);
3383 chandransh 2800
 
3430 rajveer 2801
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3383 chandransh 2802
    static {
3430 rajveer 2803
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5361 mandeep.dh 2804
      tmpMap.put(_Fields.INVENTORY_ITEM, new org.apache.thrift.meta_data.FieldMetaData("inventoryItem", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2805
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
4496 mandeep.dh 2806
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2807
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
2808
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2809
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5361 mandeep.dh 2810
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 2811
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 2812
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 2813
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scan_args.class, metaDataMap);
3383 chandransh 2814
    }
2815
 
4496 mandeep.dh 2816
    public scan_args() {
3383 chandransh 2817
    }
2818
 
4496 mandeep.dh 2819
    public scan_args(
5361 mandeep.dh 2820
      InventoryItem inventoryItem,
4496 mandeep.dh 2821
      ScanType type,
2822
      long quantity,
5361 mandeep.dh 2823
      long billingWarehouseId)
3383 chandransh 2824
    {
2825
      this();
5361 mandeep.dh 2826
      this.inventoryItem = inventoryItem;
4496 mandeep.dh 2827
      this.type = type;
2828
      this.quantity = quantity;
2829
      setQuantityIsSet(true);
5361 mandeep.dh 2830
      this.billingWarehouseId = billingWarehouseId;
2831
      setBillingWarehouseIdIsSet(true);
3383 chandransh 2832
    }
2833
 
2834
    /**
2835
     * Performs a deep copy on <i>other</i>.
2836
     */
4496 mandeep.dh 2837
    public scan_args(scan_args other) {
3383 chandransh 2838
      __isset_bit_vector.clear();
2839
      __isset_bit_vector.or(other.__isset_bit_vector);
5361 mandeep.dh 2840
      if (other.isSetInventoryItem()) {
2841
        this.inventoryItem = new InventoryItem(other.inventoryItem);
2842
      }
4496 mandeep.dh 2843
      if (other.isSetType()) {
2844
        this.type = other.type;
2845
      }
2846
      this.quantity = other.quantity;
5361 mandeep.dh 2847
      this.billingWarehouseId = other.billingWarehouseId;
3383 chandransh 2848
    }
2849
 
4496 mandeep.dh 2850
    public scan_args deepCopy() {
2851
      return new scan_args(this);
3383 chandransh 2852
    }
2853
 
3430 rajveer 2854
    @Override
2855
    public void clear() {
5361 mandeep.dh 2856
      this.inventoryItem = null;
4496 mandeep.dh 2857
      this.type = null;
2858
      setQuantityIsSet(false);
2859
      this.quantity = 0;
5361 mandeep.dh 2860
      setBillingWarehouseIdIsSet(false);
2861
      this.billingWarehouseId = 0;
3383 chandransh 2862
    }
2863
 
5361 mandeep.dh 2864
    public InventoryItem getInventoryItem() {
2865
      return this.inventoryItem;
3383 chandransh 2866
    }
2867
 
5361 mandeep.dh 2868
    public void setInventoryItem(InventoryItem inventoryItem) {
2869
      this.inventoryItem = inventoryItem;
3383 chandransh 2870
    }
2871
 
5361 mandeep.dh 2872
    public void unsetInventoryItem() {
2873
      this.inventoryItem = null;
3383 chandransh 2874
    }
2875
 
5361 mandeep.dh 2876
    /** Returns true if field inventoryItem is set (has been assigned a value) and false otherwise */
2877
    public boolean isSetInventoryItem() {
2878
      return this.inventoryItem != null;
3383 chandransh 2879
    }
2880
 
5361 mandeep.dh 2881
    public void setInventoryItemIsSet(boolean value) {
2882
      if (!value) {
2883
        this.inventoryItem = null;
2884
      }
3383 chandransh 2885
    }
2886
 
4496 mandeep.dh 2887
    /**
2888
     * 
2889
     * @see ScanType
2890
     */
2891
    public ScanType getType() {
2892
      return this.type;
3383 chandransh 2893
    }
2894
 
4496 mandeep.dh 2895
    /**
2896
     * 
2897
     * @see ScanType
2898
     */
2899
    public void setType(ScanType type) {
2900
      this.type = type;
3383 chandransh 2901
    }
2902
 
4496 mandeep.dh 2903
    public void unsetType() {
2904
      this.type = null;
3383 chandransh 2905
    }
2906
 
4496 mandeep.dh 2907
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
2908
    public boolean isSetType() {
2909
      return this.type != null;
3383 chandransh 2910
    }
2911
 
4496 mandeep.dh 2912
    public void setTypeIsSet(boolean value) {
2913
      if (!value) {
2914
        this.type = null;
2915
      }
3383 chandransh 2916
    }
2917
 
4496 mandeep.dh 2918
    public long getQuantity() {
2919
      return this.quantity;
2920
    }
2921
 
2922
    public void setQuantity(long quantity) {
2923
      this.quantity = quantity;
2924
      setQuantityIsSet(true);
2925
    }
2926
 
2927
    public void unsetQuantity() {
2928
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
2929
    }
2930
 
2931
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
2932
    public boolean isSetQuantity() {
2933
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
2934
    }
2935
 
2936
    public void setQuantityIsSet(boolean value) {
2937
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
2938
    }
2939
 
5361 mandeep.dh 2940
    public long getBillingWarehouseId() {
2941
      return this.billingWarehouseId;
4496 mandeep.dh 2942
    }
2943
 
5361 mandeep.dh 2944
    public void setBillingWarehouseId(long billingWarehouseId) {
2945
      this.billingWarehouseId = billingWarehouseId;
2946
      setBillingWarehouseIdIsSet(true);
4496 mandeep.dh 2947
    }
2948
 
5361 mandeep.dh 2949
    public void unsetBillingWarehouseId() {
2950
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 2951
    }
2952
 
5361 mandeep.dh 2953
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
2954
    public boolean isSetBillingWarehouseId() {
2955
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 2956
    }
2957
 
5361 mandeep.dh 2958
    public void setBillingWarehouseIdIsSet(boolean value) {
2959
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
4496 mandeep.dh 2960
    }
2961
 
3383 chandransh 2962
    public void setFieldValue(_Fields field, Object value) {
2963
      switch (field) {
5361 mandeep.dh 2964
      case INVENTORY_ITEM:
3383 chandransh 2965
        if (value == null) {
5361 mandeep.dh 2966
          unsetInventoryItem();
3383 chandransh 2967
        } else {
5361 mandeep.dh 2968
          setInventoryItem((InventoryItem)value);
3383 chandransh 2969
        }
2970
        break;
2971
 
4496 mandeep.dh 2972
      case TYPE:
3383 chandransh 2973
        if (value == null) {
4496 mandeep.dh 2974
          unsetType();
3383 chandransh 2975
        } else {
4496 mandeep.dh 2976
          setType((ScanType)value);
3383 chandransh 2977
        }
2978
        break;
2979
 
4496 mandeep.dh 2980
      case QUANTITY:
2981
        if (value == null) {
2982
          unsetQuantity();
2983
        } else {
2984
          setQuantity((Long)value);
2985
        }
2986
        break;
2987
 
5361 mandeep.dh 2988
      case BILLING_WAREHOUSE_ID:
4496 mandeep.dh 2989
        if (value == null) {
5361 mandeep.dh 2990
          unsetBillingWarehouseId();
4496 mandeep.dh 2991
        } else {
5361 mandeep.dh 2992
          setBillingWarehouseId((Long)value);
4496 mandeep.dh 2993
        }
2994
        break;
2995
 
3383 chandransh 2996
      }
2997
    }
2998
 
2999
    public Object getFieldValue(_Fields field) {
3000
      switch (field) {
5361 mandeep.dh 3001
      case INVENTORY_ITEM:
3002
        return getInventoryItem();
3383 chandransh 3003
 
4496 mandeep.dh 3004
      case TYPE:
3005
        return getType();
3383 chandransh 3006
 
4496 mandeep.dh 3007
      case QUANTITY:
3008
        return Long.valueOf(getQuantity());
3009
 
5361 mandeep.dh 3010
      case BILLING_WAREHOUSE_ID:
3011
        return Long.valueOf(getBillingWarehouseId());
4496 mandeep.dh 3012
 
3383 chandransh 3013
      }
3014
      throw new IllegalStateException();
3015
    }
3016
 
3430 rajveer 3017
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3018
    public boolean isSet(_Fields field) {
3019
      if (field == null) {
3020
        throw new IllegalArgumentException();
3021
      }
3383 chandransh 3022
 
3023
      switch (field) {
5361 mandeep.dh 3024
      case INVENTORY_ITEM:
3025
        return isSetInventoryItem();
4496 mandeep.dh 3026
      case TYPE:
3027
        return isSetType();
3028
      case QUANTITY:
3029
        return isSetQuantity();
5361 mandeep.dh 3030
      case BILLING_WAREHOUSE_ID:
3031
        return isSetBillingWarehouseId();
3383 chandransh 3032
      }
3033
      throw new IllegalStateException();
3034
    }
3035
 
3036
    @Override
3037
    public boolean equals(Object that) {
3038
      if (that == null)
3039
        return false;
4496 mandeep.dh 3040
      if (that instanceof scan_args)
3041
        return this.equals((scan_args)that);
3383 chandransh 3042
      return false;
3043
    }
3044
 
4496 mandeep.dh 3045
    public boolean equals(scan_args that) {
3383 chandransh 3046
      if (that == null)
3047
        return false;
3048
 
5361 mandeep.dh 3049
      boolean this_present_inventoryItem = true && this.isSetInventoryItem();
3050
      boolean that_present_inventoryItem = true && that.isSetInventoryItem();
3051
      if (this_present_inventoryItem || that_present_inventoryItem) {
3052
        if (!(this_present_inventoryItem && that_present_inventoryItem))
3383 chandransh 3053
          return false;
5361 mandeep.dh 3054
        if (!this.inventoryItem.equals(that.inventoryItem))
3383 chandransh 3055
          return false;
3056
      }
3057
 
4496 mandeep.dh 3058
      boolean this_present_type = true && this.isSetType();
3059
      boolean that_present_type = true && that.isSetType();
3060
      if (this_present_type || that_present_type) {
3061
        if (!(this_present_type && that_present_type))
3383 chandransh 3062
          return false;
4496 mandeep.dh 3063
        if (!this.type.equals(that.type))
3383 chandransh 3064
          return false;
3065
      }
3066
 
4496 mandeep.dh 3067
      boolean this_present_quantity = true;
3068
      boolean that_present_quantity = true;
3069
      if (this_present_quantity || that_present_quantity) {
3070
        if (!(this_present_quantity && that_present_quantity))
3071
          return false;
3072
        if (this.quantity != that.quantity)
3073
          return false;
3074
      }
3075
 
5361 mandeep.dh 3076
      boolean this_present_billingWarehouseId = true;
3077
      boolean that_present_billingWarehouseId = true;
3078
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
3079
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
4496 mandeep.dh 3080
          return false;
5361 mandeep.dh 3081
        if (this.billingWarehouseId != that.billingWarehouseId)
4496 mandeep.dh 3082
          return false;
3083
      }
3084
 
3383 chandransh 3085
      return true;
3086
    }
3087
 
3088
    @Override
3089
    public int hashCode() {
3090
      return 0;
3091
    }
3092
 
4496 mandeep.dh 3093
    public int compareTo(scan_args other) {
3383 chandransh 3094
      if (!getClass().equals(other.getClass())) {
3095
        return getClass().getName().compareTo(other.getClass().getName());
3096
      }
3097
 
3098
      int lastComparison = 0;
4496 mandeep.dh 3099
      scan_args typedOther = (scan_args)other;
3383 chandransh 3100
 
5361 mandeep.dh 3101
      lastComparison = Boolean.valueOf(isSetInventoryItem()).compareTo(typedOther.isSetInventoryItem());
3383 chandransh 3102
      if (lastComparison != 0) {
3103
        return lastComparison;
3104
      }
5361 mandeep.dh 3105
      if (isSetInventoryItem()) {
3106
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItem, typedOther.inventoryItem);
3430 rajveer 3107
        if (lastComparison != 0) {
3108
          return lastComparison;
3109
        }
3383 chandransh 3110
      }
4496 mandeep.dh 3111
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
3383 chandransh 3112
      if (lastComparison != 0) {
3113
        return lastComparison;
3114
      }
4496 mandeep.dh 3115
      if (isSetType()) {
3116
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 3117
        if (lastComparison != 0) {
3118
          return lastComparison;
3119
        }
3383 chandransh 3120
      }
4496 mandeep.dh 3121
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
3122
      if (lastComparison != 0) {
3123
        return lastComparison;
3124
      }
3125
      if (isSetQuantity()) {
3126
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
3127
        if (lastComparison != 0) {
3128
          return lastComparison;
3129
        }
3130
      }
5361 mandeep.dh 3131
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
4496 mandeep.dh 3132
      if (lastComparison != 0) {
3133
        return lastComparison;
3134
      }
5361 mandeep.dh 3135
      if (isSetBillingWarehouseId()) {
3136
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
4496 mandeep.dh 3137
        if (lastComparison != 0) {
3138
          return lastComparison;
3139
        }
3140
      }
3383 chandransh 3141
      return 0;
3142
    }
3143
 
3430 rajveer 3144
    public _Fields fieldForId(int fieldId) {
3145
      return _Fields.findByThriftId(fieldId);
3146
    }
3147
 
3148
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3149
      org.apache.thrift.protocol.TField field;
3383 chandransh 3150
      iprot.readStructBegin();
3151
      while (true)
3152
      {
3153
        field = iprot.readFieldBegin();
3430 rajveer 3154
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3383 chandransh 3155
          break;
3156
        }
3430 rajveer 3157
        switch (field.id) {
5361 mandeep.dh 3158
          case 1: // INVENTORY_ITEM
3159
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3160
              this.inventoryItem = new InventoryItem();
3161
              this.inventoryItem.read(iprot);
3430 rajveer 3162
            } else { 
3163
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3164
            }
3165
            break;
4496 mandeep.dh 3166
          case 2: // TYPE
3167
            if (field.type == org.apache.thrift.protocol.TType.I32) {
3168
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 3169
            } else { 
3170
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3171
            }
3172
            break;
4496 mandeep.dh 3173
          case 3: // QUANTITY
3174
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3175
              this.quantity = iprot.readI64();
3176
              setQuantityIsSet(true);
3177
            } else { 
3178
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3179
            }
3180
            break;
5361 mandeep.dh 3181
          case 4: // BILLING_WAREHOUSE_ID
4496 mandeep.dh 3182
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5361 mandeep.dh 3183
              this.billingWarehouseId = iprot.readI64();
3184
              setBillingWarehouseIdIsSet(true);
4496 mandeep.dh 3185
            } else { 
3186
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3187
            }
3188
            break;
3430 rajveer 3189
          default:
3190
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3383 chandransh 3191
        }
3430 rajveer 3192
        iprot.readFieldEnd();
3383 chandransh 3193
      }
3194
      iprot.readStructEnd();
3195
      validate();
3196
    }
3197
 
3430 rajveer 3198
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3383 chandransh 3199
      validate();
3200
 
3201
      oprot.writeStructBegin(STRUCT_DESC);
5361 mandeep.dh 3202
      if (this.inventoryItem != null) {
3203
        oprot.writeFieldBegin(INVENTORY_ITEM_FIELD_DESC);
3204
        this.inventoryItem.write(oprot);
3205
        oprot.writeFieldEnd();
3206
      }
4496 mandeep.dh 3207
      if (this.type != null) {
3208
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
3209
        oprot.writeI32(this.type.getValue());
3210
        oprot.writeFieldEnd();
3211
      }
3212
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
3213
      oprot.writeI64(this.quantity);
3383 chandransh 3214
      oprot.writeFieldEnd();
5361 mandeep.dh 3215
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
3216
      oprot.writeI64(this.billingWarehouseId);
4496 mandeep.dh 3217
      oprot.writeFieldEnd();
3383 chandransh 3218
      oprot.writeFieldStop();
3219
      oprot.writeStructEnd();
3220
    }
3221
 
3222
    @Override
3223
    public String toString() {
4496 mandeep.dh 3224
      StringBuilder sb = new StringBuilder("scan_args(");
3383 chandransh 3225
      boolean first = true;
3226
 
5361 mandeep.dh 3227
      sb.append("inventoryItem:");
3228
      if (this.inventoryItem == null) {
3229
        sb.append("null");
3230
      } else {
3231
        sb.append(this.inventoryItem);
3232
      }
3383 chandransh 3233
      first = false;
3234
      if (!first) sb.append(", ");
4496 mandeep.dh 3235
      sb.append("type:");
3236
      if (this.type == null) {
3237
        sb.append("null");
3238
      } else {
3239
        sb.append(this.type);
3240
      }
3383 chandransh 3241
      first = false;
4496 mandeep.dh 3242
      if (!first) sb.append(", ");
3243
      sb.append("quantity:");
3244
      sb.append(this.quantity);
3245
      first = false;
3246
      if (!first) sb.append(", ");
5361 mandeep.dh 3247
      sb.append("billingWarehouseId:");
3248
      sb.append(this.billingWarehouseId);
4496 mandeep.dh 3249
      first = false;
3383 chandransh 3250
      sb.append(")");
3251
      return sb.toString();
3252
    }
3253
 
3430 rajveer 3254
    public void validate() throws org.apache.thrift.TException {
3383 chandransh 3255
      // check for required fields
3256
    }
3257
 
3430 rajveer 3258
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3259
      try {
3260
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3261
      } catch (org.apache.thrift.TException te) {
3262
        throw new java.io.IOException(te);
3263
      }
3264
    }
3265
 
3266
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3267
      try {
4496 mandeep.dh 3268
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
3269
        __isset_bit_vector = new BitSet(1);
3430 rajveer 3270
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3271
      } catch (org.apache.thrift.TException te) {
3272
        throw new java.io.IOException(te);
3273
      }
3274
    }
3275
 
3383 chandransh 3276
  }
3277
 
4496 mandeep.dh 3278
  public static class scan_result implements org.apache.thrift.TBase<scan_result, scan_result._Fields>, java.io.Serializable, Cloneable   {
3279
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scan_result");
3383 chandransh 3280
 
3430 rajveer 3281
    private static final org.apache.thrift.protocol.TField WEX_FIELD_DESC = new org.apache.thrift.protocol.TField("wex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
3383 chandransh 3282
 
3430 rajveer 3283
    private WarehouseServiceException wex; // required
3383 chandransh 3284
 
3285
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 3286
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3383 chandransh 3287
      WEX((short)1, "wex");
3288
 
3289
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3290
 
3291
      static {
3292
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3293
          byName.put(field.getFieldName(), field);
3294
        }
3295
      }
3296
 
3297
      /**
3298
       * Find the _Fields constant that matches fieldId, or null if its not found.
3299
       */
3300
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 3301
        switch(fieldId) {
3302
          case 1: // WEX
3303
            return WEX;
3304
          default:
3305
            return null;
3306
        }
3383 chandransh 3307
      }
3308
 
3309
      /**
3310
       * Find the _Fields constant that matches fieldId, throwing an exception
3311
       * if it is not found.
3312
       */
3313
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3314
        _Fields fields = findByThriftId(fieldId);
3315
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3316
        return fields;
3317
      }
3318
 
3319
      /**
3320
       * Find the _Fields constant that matches name, or null if its not found.
3321
       */
3322
      public static _Fields findByName(String name) {
3323
        return byName.get(name);
3324
      }
3325
 
3326
      private final short _thriftId;
3327
      private final String _fieldName;
3328
 
3329
      _Fields(short thriftId, String fieldName) {
3330
        _thriftId = thriftId;
3331
        _fieldName = fieldName;
3332
      }
3333
 
3334
      public short getThriftFieldId() {
3335
        return _thriftId;
3336
      }
3337
 
3338
      public String getFieldName() {
3339
        return _fieldName;
3340
      }
3341
    }
3342
 
3343
    // isset id assignments
3344
 
3430 rajveer 3345
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3383 chandransh 3346
    static {
3430 rajveer 3347
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3348
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3349
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3350
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 3351
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scan_result.class, metaDataMap);
3383 chandransh 3352
    }
3353
 
4496 mandeep.dh 3354
    public scan_result() {
3383 chandransh 3355
    }
3356
 
4496 mandeep.dh 3357
    public scan_result(
3383 chandransh 3358
      WarehouseServiceException wex)
3359
    {
3360
      this();
3361
      this.wex = wex;
3362
    }
3363
 
3364
    /**
3365
     * Performs a deep copy on <i>other</i>.
3366
     */
4496 mandeep.dh 3367
    public scan_result(scan_result other) {
3383 chandransh 3368
      if (other.isSetWex()) {
3369
        this.wex = new WarehouseServiceException(other.wex);
3370
      }
3371
    }
3372
 
4496 mandeep.dh 3373
    public scan_result deepCopy() {
3374
      return new scan_result(this);
3383 chandransh 3375
    }
3376
 
3430 rajveer 3377
    @Override
3378
    public void clear() {
3379
      this.wex = null;
3383 chandransh 3380
    }
3381
 
3382
    public WarehouseServiceException getWex() {
3383
      return this.wex;
3384
    }
3385
 
3430 rajveer 3386
    public void setWex(WarehouseServiceException wex) {
3383 chandransh 3387
      this.wex = wex;
3388
    }
3389
 
3390
    public void unsetWex() {
3391
      this.wex = null;
3392
    }
3393
 
3430 rajveer 3394
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
3383 chandransh 3395
    public boolean isSetWex() {
3396
      return this.wex != null;
3397
    }
3398
 
3399
    public void setWexIsSet(boolean value) {
3400
      if (!value) {
3401
        this.wex = null;
3402
      }
3403
    }
3404
 
3405
    public void setFieldValue(_Fields field, Object value) {
3406
      switch (field) {
3407
      case WEX:
3408
        if (value == null) {
3409
          unsetWex();
3410
        } else {
3411
          setWex((WarehouseServiceException)value);
3412
        }
3413
        break;
3414
 
3415
      }
3416
    }
3417
 
3418
    public Object getFieldValue(_Fields field) {
3419
      switch (field) {
3420
      case WEX:
3421
        return getWex();
3422
 
3423
      }
3424
      throw new IllegalStateException();
3425
    }
3426
 
3430 rajveer 3427
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3428
    public boolean isSet(_Fields field) {
3429
      if (field == null) {
3430
        throw new IllegalArgumentException();
3431
      }
3383 chandransh 3432
 
3433
      switch (field) {
3434
      case WEX:
3435
        return isSetWex();
3436
      }
3437
      throw new IllegalStateException();
3438
    }
3439
 
3440
    @Override
3441
    public boolean equals(Object that) {
3442
      if (that == null)
3443
        return false;
4496 mandeep.dh 3444
      if (that instanceof scan_result)
3445
        return this.equals((scan_result)that);
3383 chandransh 3446
      return false;
3447
    }
3448
 
4496 mandeep.dh 3449
    public boolean equals(scan_result that) {
3383 chandransh 3450
      if (that == null)
3451
        return false;
3452
 
3453
      boolean this_present_wex = true && this.isSetWex();
3454
      boolean that_present_wex = true && that.isSetWex();
3455
      if (this_present_wex || that_present_wex) {
3456
        if (!(this_present_wex && that_present_wex))
3457
          return false;
3458
        if (!this.wex.equals(that.wex))
3459
          return false;
3460
      }
3461
 
3462
      return true;
3463
    }
3464
 
3465
    @Override
3466
    public int hashCode() {
3467
      return 0;
3468
    }
3469
 
4496 mandeep.dh 3470
    public int compareTo(scan_result other) {
3383 chandransh 3471
      if (!getClass().equals(other.getClass())) {
3472
        return getClass().getName().compareTo(other.getClass().getName());
3473
      }
3474
 
3475
      int lastComparison = 0;
4496 mandeep.dh 3476
      scan_result typedOther = (scan_result)other;
3383 chandransh 3477
 
3430 rajveer 3478
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
3383 chandransh 3479
      if (lastComparison != 0) {
3480
        return lastComparison;
3481
      }
3430 rajveer 3482
      if (isSetWex()) {
3483
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
3484
        if (lastComparison != 0) {
3485
          return lastComparison;
3486
        }
3383 chandransh 3487
      }
3488
      return 0;
3489
    }
3490
 
3430 rajveer 3491
    public _Fields fieldForId(int fieldId) {
3492
      return _Fields.findByThriftId(fieldId);
3493
    }
3494
 
3495
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3496
      org.apache.thrift.protocol.TField field;
3383 chandransh 3497
      iprot.readStructBegin();
3498
      while (true)
3499
      {
3500
        field = iprot.readFieldBegin();
3430 rajveer 3501
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3383 chandransh 3502
          break;
3503
        }
3430 rajveer 3504
        switch (field.id) {
3505
          case 1: // WEX
3506
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3507
              this.wex = new WarehouseServiceException();
3508
              this.wex.read(iprot);
3509
            } else { 
3510
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3511
            }
3512
            break;
3513
          default:
3514
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3383 chandransh 3515
        }
3430 rajveer 3516
        iprot.readFieldEnd();
3383 chandransh 3517
      }
3518
      iprot.readStructEnd();
3519
      validate();
3520
    }
3521
 
3430 rajveer 3522
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3383 chandransh 3523
      oprot.writeStructBegin(STRUCT_DESC);
3524
 
4496 mandeep.dh 3525
      if (this.isSetWex()) {
3383 chandransh 3526
        oprot.writeFieldBegin(WEX_FIELD_DESC);
3527
        this.wex.write(oprot);
3528
        oprot.writeFieldEnd();
3529
      }
3530
      oprot.writeFieldStop();
3531
      oprot.writeStructEnd();
3532
    }
3533
 
3534
    @Override
3535
    public String toString() {
4496 mandeep.dh 3536
      StringBuilder sb = new StringBuilder("scan_result(");
3383 chandransh 3537
      boolean first = true;
3538
 
3539
      sb.append("wex:");
3540
      if (this.wex == null) {
3541
        sb.append("null");
3542
      } else {
3543
        sb.append(this.wex);
3544
      }
3545
      first = false;
3546
      sb.append(")");
3547
      return sb.toString();
3548
    }
3549
 
3430 rajveer 3550
    public void validate() throws org.apache.thrift.TException {
3383 chandransh 3551
      // check for required fields
3552
    }
3553
 
3430 rajveer 3554
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3555
      try {
3556
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3557
      } catch (org.apache.thrift.TException te) {
3558
        throw new java.io.IOException(te);
3559
      }
3560
    }
3561
 
3562
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3563
      try {
3564
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3565
      } catch (org.apache.thrift.TException te) {
3566
        throw new java.io.IOException(te);
3567
      }
3568
    }
3569
 
3383 chandransh 3570
  }
3571
 
4496 mandeep.dh 3572
  public static class scanSerializedItemForOrder_args implements org.apache.thrift.TBase<scanSerializedItemForOrder_args, scanSerializedItemForOrder_args._Fields>, java.io.Serializable, Cloneable   {
3573
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItemForOrder_args");
2820 chandransh 3574
 
4555 mandeep.dh 3575
    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)1);
4496 mandeep.dh 3576
    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)2);
3577
    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)3);
5110 mandeep.dh 3578
    private static final org.apache.thrift.protocol.TField FULFILMENT_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("fulfilmentWarehouseId", org.apache.thrift.protocol.TType.I64, (short)4);
3579
    private static final org.apache.thrift.protocol.TField QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("quantity", org.apache.thrift.protocol.TType.DOUBLE, (short)5);
3580
    private static final org.apache.thrift.protocol.TField BILLING_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("billingWarehouseId", org.apache.thrift.protocol.TType.I64, (short)6);
2820 chandransh 3581
 
4555 mandeep.dh 3582
    private String serialNumber; // required
3430 rajveer 3583
    private ScanType type; // required
4496 mandeep.dh 3584
    private long orderId; // required
5110 mandeep.dh 3585
    private long fulfilmentWarehouseId; // required
3586
    private double quantity; // required
3587
    private long billingWarehouseId; // required
2820 chandransh 3588
 
3589
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 3590
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4555 mandeep.dh 3591
      SERIAL_NUMBER((short)1, "serialNumber"),
2820 chandransh 3592
      /**
3593
       * 
3594
       * @see ScanType
3595
       */
4496 mandeep.dh 3596
      TYPE((short)2, "type"),
3597
      ORDER_ID((short)3, "orderId"),
5110 mandeep.dh 3598
      FULFILMENT_WAREHOUSE_ID((short)4, "fulfilmentWarehouseId"),
3599
      QUANTITY((short)5, "quantity"),
3600
      BILLING_WAREHOUSE_ID((short)6, "billingWarehouseId");
2820 chandransh 3601
 
3602
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3603
 
3604
      static {
3605
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3606
          byName.put(field.getFieldName(), field);
3607
        }
3608
      }
3609
 
3610
      /**
3611
       * Find the _Fields constant that matches fieldId, or null if its not found.
3612
       */
3613
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 3614
        switch(fieldId) {
4555 mandeep.dh 3615
          case 1: // SERIAL_NUMBER
3616
            return SERIAL_NUMBER;
4496 mandeep.dh 3617
          case 2: // TYPE
3430 rajveer 3618
            return TYPE;
4496 mandeep.dh 3619
          case 3: // ORDER_ID
3620
            return ORDER_ID;
5110 mandeep.dh 3621
          case 4: // FULFILMENT_WAREHOUSE_ID
3622
            return FULFILMENT_WAREHOUSE_ID;
3623
          case 5: // QUANTITY
3624
            return QUANTITY;
3625
          case 6: // BILLING_WAREHOUSE_ID
3626
            return BILLING_WAREHOUSE_ID;
3430 rajveer 3627
          default:
3628
            return null;
3629
        }
2820 chandransh 3630
      }
3631
 
3632
      /**
3633
       * Find the _Fields constant that matches fieldId, throwing an exception
3634
       * if it is not found.
3635
       */
3636
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3637
        _Fields fields = findByThriftId(fieldId);
3638
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3639
        return fields;
3640
      }
3641
 
3642
      /**
3643
       * Find the _Fields constant that matches name, or null if its not found.
3644
       */
3645
      public static _Fields findByName(String name) {
3646
        return byName.get(name);
3647
      }
3648
 
3649
      private final short _thriftId;
3650
      private final String _fieldName;
3651
 
3652
      _Fields(short thriftId, String fieldName) {
3653
        _thriftId = thriftId;
3654
        _fieldName = fieldName;
3655
      }
3656
 
3657
      public short getThriftFieldId() {
3658
        return _thriftId;
3659
      }
3660
 
3661
      public String getFieldName() {
3662
        return _fieldName;
3663
      }
3664
    }
3665
 
3666
    // isset id assignments
4555 mandeep.dh 3667
    private static final int __ORDERID_ISSET_ID = 0;
5110 mandeep.dh 3668
    private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 1;
3669
    private static final int __QUANTITY_ISSET_ID = 2;
3670
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 3;
3671
    private BitSet __isset_bit_vector = new BitSet(4);
2820 chandransh 3672
 
3430 rajveer 3673
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 3674
    static {
3430 rajveer 3675
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4555 mandeep.dh 3676
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3677
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
3430 rajveer 3678
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3679
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
4496 mandeep.dh 3680
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3681
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 3682
      tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 3683
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 3684
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3685
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
3686
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3687
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 3688
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 3689
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanSerializedItemForOrder_args.class, metaDataMap);
2820 chandransh 3690
    }
3691
 
4496 mandeep.dh 3692
    public scanSerializedItemForOrder_args() {
2820 chandransh 3693
    }
3694
 
4496 mandeep.dh 3695
    public scanSerializedItemForOrder_args(
4555 mandeep.dh 3696
      String serialNumber,
4496 mandeep.dh 3697
      ScanType type,
3698
      long orderId,
5110 mandeep.dh 3699
      long fulfilmentWarehouseId,
3700
      double quantity,
3701
      long billingWarehouseId)
2820 chandransh 3702
    {
3703
      this();
4555 mandeep.dh 3704
      this.serialNumber = serialNumber;
2820 chandransh 3705
      this.type = type;
4496 mandeep.dh 3706
      this.orderId = orderId;
3707
      setOrderIdIsSet(true);
5110 mandeep.dh 3708
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
3709
      setFulfilmentWarehouseIdIsSet(true);
3710
      this.quantity = quantity;
3711
      setQuantityIsSet(true);
3712
      this.billingWarehouseId = billingWarehouseId;
3713
      setBillingWarehouseIdIsSet(true);
2820 chandransh 3714
    }
3715
 
3716
    /**
3717
     * Performs a deep copy on <i>other</i>.
3718
     */
4496 mandeep.dh 3719
    public scanSerializedItemForOrder_args(scanSerializedItemForOrder_args other) {
2820 chandransh 3720
      __isset_bit_vector.clear();
3721
      __isset_bit_vector.or(other.__isset_bit_vector);
4555 mandeep.dh 3722
      if (other.isSetSerialNumber()) {
3723
        this.serialNumber = other.serialNumber;
3724
      }
2820 chandransh 3725
      if (other.isSetType()) {
3726
        this.type = other.type;
3727
      }
4496 mandeep.dh 3728
      this.orderId = other.orderId;
5110 mandeep.dh 3729
      this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
3730
      this.quantity = other.quantity;
3731
      this.billingWarehouseId = other.billingWarehouseId;
2820 chandransh 3732
    }
3733
 
4496 mandeep.dh 3734
    public scanSerializedItemForOrder_args deepCopy() {
3735
      return new scanSerializedItemForOrder_args(this);
2820 chandransh 3736
    }
3737
 
3430 rajveer 3738
    @Override
3739
    public void clear() {
4555 mandeep.dh 3740
      this.serialNumber = null;
3430 rajveer 3741
      this.type = null;
4496 mandeep.dh 3742
      setOrderIdIsSet(false);
3743
      this.orderId = 0;
5110 mandeep.dh 3744
      setFulfilmentWarehouseIdIsSet(false);
3745
      this.fulfilmentWarehouseId = 0;
3746
      setQuantityIsSet(false);
3747
      this.quantity = 0.0;
3748
      setBillingWarehouseIdIsSet(false);
3749
      this.billingWarehouseId = 0;
2820 chandransh 3750
    }
3751
 
4555 mandeep.dh 3752
    public String getSerialNumber() {
3753
      return this.serialNumber;
2820 chandransh 3754
    }
3755
 
4555 mandeep.dh 3756
    public void setSerialNumber(String serialNumber) {
3757
      this.serialNumber = serialNumber;
2820 chandransh 3758
    }
3759
 
4555 mandeep.dh 3760
    public void unsetSerialNumber() {
3761
      this.serialNumber = null;
2820 chandransh 3762
    }
3763
 
4555 mandeep.dh 3764
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
3765
    public boolean isSetSerialNumber() {
3766
      return this.serialNumber != null;
2820 chandransh 3767
    }
3768
 
4555 mandeep.dh 3769
    public void setSerialNumberIsSet(boolean value) {
3770
      if (!value) {
3771
        this.serialNumber = null;
3772
      }
2820 chandransh 3773
    }
3774
 
4496 mandeep.dh 3775
    /**
3776
     * 
3777
     * @see ScanType
3778
     */
3779
    public ScanType getType() {
3780
      return this.type;
2820 chandransh 3781
    }
3782
 
4496 mandeep.dh 3783
    /**
3784
     * 
3785
     * @see ScanType
3786
     */
3787
    public void setType(ScanType type) {
3788
      this.type = type;
2820 chandransh 3789
    }
3790
 
4496 mandeep.dh 3791
    public void unsetType() {
3792
      this.type = null;
2820 chandransh 3793
    }
3794
 
4496 mandeep.dh 3795
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
3796
    public boolean isSetType() {
3797
      return this.type != null;
2820 chandransh 3798
    }
3799
 
4496 mandeep.dh 3800
    public void setTypeIsSet(boolean value) {
2820 chandransh 3801
      if (!value) {
4496 mandeep.dh 3802
        this.type = null;
2820 chandransh 3803
      }
3804
    }
3805
 
4496 mandeep.dh 3806
    public long getOrderId() {
3807
      return this.orderId;
2820 chandransh 3808
    }
3809
 
4496 mandeep.dh 3810
    public void setOrderId(long orderId) {
3811
      this.orderId = orderId;
3812
      setOrderIdIsSet(true);
2820 chandransh 3813
    }
3814
 
4496 mandeep.dh 3815
    public void unsetOrderId() {
3816
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
2820 chandransh 3817
    }
3818
 
4496 mandeep.dh 3819
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
3820
    public boolean isSetOrderId() {
3821
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
2820 chandransh 3822
    }
3823
 
4496 mandeep.dh 3824
    public void setOrderIdIsSet(boolean value) {
3825
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
2820 chandransh 3826
    }
3827
 
5110 mandeep.dh 3828
    public long getFulfilmentWarehouseId() {
3829
      return this.fulfilmentWarehouseId;
2820 chandransh 3830
    }
3831
 
5110 mandeep.dh 3832
    public void setFulfilmentWarehouseId(long fulfilmentWarehouseId) {
3833
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
3834
      setFulfilmentWarehouseIdIsSet(true);
2820 chandransh 3835
    }
3836
 
5110 mandeep.dh 3837
    public void unsetFulfilmentWarehouseId() {
3838
      __isset_bit_vector.clear(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 3839
    }
3840
 
5110 mandeep.dh 3841
    /** Returns true if field fulfilmentWarehouseId is set (has been assigned a value) and false otherwise */
3842
    public boolean isSetFulfilmentWarehouseId() {
3843
      return __isset_bit_vector.get(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 3844
    }
3845
 
5110 mandeep.dh 3846
    public void setFulfilmentWarehouseIdIsSet(boolean value) {
3847
      __isset_bit_vector.set(__FULFILMENTWAREHOUSEID_ISSET_ID, value);
2820 chandransh 3848
    }
3849
 
5110 mandeep.dh 3850
    public double getQuantity() {
3851
      return this.quantity;
3852
    }
3853
 
3854
    public void setQuantity(double quantity) {
3855
      this.quantity = quantity;
3856
      setQuantityIsSet(true);
3857
    }
3858
 
3859
    public void unsetQuantity() {
3860
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
3861
    }
3862
 
3863
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
3864
    public boolean isSetQuantity() {
3865
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
3866
    }
3867
 
3868
    public void setQuantityIsSet(boolean value) {
3869
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
3870
    }
3871
 
3872
    public long getBillingWarehouseId() {
3873
      return this.billingWarehouseId;
3874
    }
3875
 
3876
    public void setBillingWarehouseId(long billingWarehouseId) {
3877
      this.billingWarehouseId = billingWarehouseId;
3878
      setBillingWarehouseIdIsSet(true);
3879
    }
3880
 
3881
    public void unsetBillingWarehouseId() {
3882
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
3883
    }
3884
 
3885
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
3886
    public boolean isSetBillingWarehouseId() {
3887
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
3888
    }
3889
 
3890
    public void setBillingWarehouseIdIsSet(boolean value) {
3891
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
3892
    }
3893
 
2820 chandransh 3894
    public void setFieldValue(_Fields field, Object value) {
3895
      switch (field) {
4555 mandeep.dh 3896
      case SERIAL_NUMBER:
2820 chandransh 3897
        if (value == null) {
4555 mandeep.dh 3898
          unsetSerialNumber();
2820 chandransh 3899
        } else {
4555 mandeep.dh 3900
          setSerialNumber((String)value);
2820 chandransh 3901
        }
3902
        break;
3903
 
4496 mandeep.dh 3904
      case TYPE:
2820 chandransh 3905
        if (value == null) {
4496 mandeep.dh 3906
          unsetType();
2820 chandransh 3907
        } else {
4496 mandeep.dh 3908
          setType((ScanType)value);
2820 chandransh 3909
        }
3910
        break;
3911
 
4496 mandeep.dh 3912
      case ORDER_ID:
2820 chandransh 3913
        if (value == null) {
4496 mandeep.dh 3914
          unsetOrderId();
2820 chandransh 3915
        } else {
4496 mandeep.dh 3916
          setOrderId((Long)value);
2820 chandransh 3917
        }
3918
        break;
3919
 
5110 mandeep.dh 3920
      case FULFILMENT_WAREHOUSE_ID:
2820 chandransh 3921
        if (value == null) {
5110 mandeep.dh 3922
          unsetFulfilmentWarehouseId();
2820 chandransh 3923
        } else {
5110 mandeep.dh 3924
          setFulfilmentWarehouseId((Long)value);
2820 chandransh 3925
        }
3926
        break;
3927
 
5110 mandeep.dh 3928
      case QUANTITY:
3929
        if (value == null) {
3930
          unsetQuantity();
3931
        } else {
3932
          setQuantity((Double)value);
3933
        }
3934
        break;
3935
 
3936
      case BILLING_WAREHOUSE_ID:
3937
        if (value == null) {
3938
          unsetBillingWarehouseId();
3939
        } else {
3940
          setBillingWarehouseId((Long)value);
3941
        }
3942
        break;
3943
 
2820 chandransh 3944
      }
3945
    }
3946
 
3947
    public Object getFieldValue(_Fields field) {
3948
      switch (field) {
4555 mandeep.dh 3949
      case SERIAL_NUMBER:
3950
        return getSerialNumber();
2820 chandransh 3951
 
3952
      case TYPE:
3953
        return getType();
3954
 
4496 mandeep.dh 3955
      case ORDER_ID:
3956
        return Long.valueOf(getOrderId());
3957
 
5110 mandeep.dh 3958
      case FULFILMENT_WAREHOUSE_ID:
3959
        return Long.valueOf(getFulfilmentWarehouseId());
4496 mandeep.dh 3960
 
5110 mandeep.dh 3961
      case QUANTITY:
3962
        return Double.valueOf(getQuantity());
3963
 
3964
      case BILLING_WAREHOUSE_ID:
3965
        return Long.valueOf(getBillingWarehouseId());
3966
 
2820 chandransh 3967
      }
3968
      throw new IllegalStateException();
3969
    }
3970
 
3430 rajveer 3971
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3972
    public boolean isSet(_Fields field) {
3973
      if (field == null) {
3974
        throw new IllegalArgumentException();
3975
      }
2820 chandransh 3976
 
3977
      switch (field) {
4555 mandeep.dh 3978
      case SERIAL_NUMBER:
3979
        return isSetSerialNumber();
2820 chandransh 3980
      case TYPE:
3981
        return isSetType();
4496 mandeep.dh 3982
      case ORDER_ID:
3983
        return isSetOrderId();
5110 mandeep.dh 3984
      case FULFILMENT_WAREHOUSE_ID:
3985
        return isSetFulfilmentWarehouseId();
3986
      case QUANTITY:
3987
        return isSetQuantity();
3988
      case BILLING_WAREHOUSE_ID:
3989
        return isSetBillingWarehouseId();
2820 chandransh 3990
      }
3991
      throw new IllegalStateException();
3992
    }
3993
 
3994
    @Override
3995
    public boolean equals(Object that) {
3996
      if (that == null)
3997
        return false;
4496 mandeep.dh 3998
      if (that instanceof scanSerializedItemForOrder_args)
3999
        return this.equals((scanSerializedItemForOrder_args)that);
2820 chandransh 4000
      return false;
4001
    }
4002
 
4496 mandeep.dh 4003
    public boolean equals(scanSerializedItemForOrder_args that) {
2820 chandransh 4004
      if (that == null)
4005
        return false;
4006
 
4555 mandeep.dh 4007
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
4008
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
4009
      if (this_present_serialNumber || that_present_serialNumber) {
4010
        if (!(this_present_serialNumber && that_present_serialNumber))
2820 chandransh 4011
          return false;
4555 mandeep.dh 4012
        if (!this.serialNumber.equals(that.serialNumber))
2820 chandransh 4013
          return false;
4014
      }
4015
 
4496 mandeep.dh 4016
      boolean this_present_type = true && this.isSetType();
4017
      boolean that_present_type = true && that.isSetType();
4018
      if (this_present_type || that_present_type) {
4019
        if (!(this_present_type && that_present_type))
2820 chandransh 4020
          return false;
4496 mandeep.dh 4021
        if (!this.type.equals(that.type))
2820 chandransh 4022
          return false;
4023
      }
4024
 
4496 mandeep.dh 4025
      boolean this_present_orderId = true;
4026
      boolean that_present_orderId = true;
4027
      if (this_present_orderId || that_present_orderId) {
4028
        if (!(this_present_orderId && that_present_orderId))
2820 chandransh 4029
          return false;
4496 mandeep.dh 4030
        if (this.orderId != that.orderId)
2820 chandransh 4031
          return false;
4032
      }
4033
 
5110 mandeep.dh 4034
      boolean this_present_fulfilmentWarehouseId = true;
4035
      boolean that_present_fulfilmentWarehouseId = true;
4036
      if (this_present_fulfilmentWarehouseId || that_present_fulfilmentWarehouseId) {
4037
        if (!(this_present_fulfilmentWarehouseId && that_present_fulfilmentWarehouseId))
2820 chandransh 4038
          return false;
5110 mandeep.dh 4039
        if (this.fulfilmentWarehouseId != that.fulfilmentWarehouseId)
2820 chandransh 4040
          return false;
4041
      }
4042
 
5110 mandeep.dh 4043
      boolean this_present_quantity = true;
4044
      boolean that_present_quantity = true;
4045
      if (this_present_quantity || that_present_quantity) {
4046
        if (!(this_present_quantity && that_present_quantity))
4047
          return false;
4048
        if (this.quantity != that.quantity)
4049
          return false;
4050
      }
4051
 
4052
      boolean this_present_billingWarehouseId = true;
4053
      boolean that_present_billingWarehouseId = true;
4054
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
4055
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
4056
          return false;
4057
        if (this.billingWarehouseId != that.billingWarehouseId)
4058
          return false;
4059
      }
4060
 
2820 chandransh 4061
      return true;
4062
    }
4063
 
4064
    @Override
4065
    public int hashCode() {
4066
      return 0;
4067
    }
4068
 
4496 mandeep.dh 4069
    public int compareTo(scanSerializedItemForOrder_args other) {
2820 chandransh 4070
      if (!getClass().equals(other.getClass())) {
4071
        return getClass().getName().compareTo(other.getClass().getName());
4072
      }
4073
 
4074
      int lastComparison = 0;
4496 mandeep.dh 4075
      scanSerializedItemForOrder_args typedOther = (scanSerializedItemForOrder_args)other;
2820 chandransh 4076
 
4555 mandeep.dh 4077
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
2820 chandransh 4078
      if (lastComparison != 0) {
4079
        return lastComparison;
4080
      }
4555 mandeep.dh 4081
      if (isSetSerialNumber()) {
4082
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
3430 rajveer 4083
        if (lastComparison != 0) {
4084
          return lastComparison;
4085
        }
2820 chandransh 4086
      }
4496 mandeep.dh 4087
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
2820 chandransh 4088
      if (lastComparison != 0) {
4089
        return lastComparison;
4090
      }
4496 mandeep.dh 4091
      if (isSetType()) {
4092
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 4093
        if (lastComparison != 0) {
4094
          return lastComparison;
4095
        }
2820 chandransh 4096
      }
4496 mandeep.dh 4097
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
2820 chandransh 4098
      if (lastComparison != 0) {
4099
        return lastComparison;
4100
      }
4496 mandeep.dh 4101
      if (isSetOrderId()) {
4102
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
3430 rajveer 4103
        if (lastComparison != 0) {
4104
          return lastComparison;
4105
        }
2820 chandransh 4106
      }
5110 mandeep.dh 4107
      lastComparison = Boolean.valueOf(isSetFulfilmentWarehouseId()).compareTo(typedOther.isSetFulfilmentWarehouseId());
2820 chandransh 4108
      if (lastComparison != 0) {
4109
        return lastComparison;
4110
      }
5110 mandeep.dh 4111
      if (isSetFulfilmentWarehouseId()) {
4112
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilmentWarehouseId, typedOther.fulfilmentWarehouseId);
3430 rajveer 4113
        if (lastComparison != 0) {
4114
          return lastComparison;
4115
        }
2820 chandransh 4116
      }
5110 mandeep.dh 4117
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
4118
      if (lastComparison != 0) {
4119
        return lastComparison;
4120
      }
4121
      if (isSetQuantity()) {
4122
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
4123
        if (lastComparison != 0) {
4124
          return lastComparison;
4125
        }
4126
      }
4127
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
4128
      if (lastComparison != 0) {
4129
        return lastComparison;
4130
      }
4131
      if (isSetBillingWarehouseId()) {
4132
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
4133
        if (lastComparison != 0) {
4134
          return lastComparison;
4135
        }
4136
      }
2820 chandransh 4137
      return 0;
4138
    }
4139
 
3430 rajveer 4140
    public _Fields fieldForId(int fieldId) {
4141
      return _Fields.findByThriftId(fieldId);
4142
    }
4143
 
4144
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4145
      org.apache.thrift.protocol.TField field;
2820 chandransh 4146
      iprot.readStructBegin();
4147
      while (true)
4148
      {
4149
        field = iprot.readFieldBegin();
3430 rajveer 4150
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 4151
          break;
4152
        }
3430 rajveer 4153
        switch (field.id) {
4555 mandeep.dh 4154
          case 1: // SERIAL_NUMBER
4155
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
4156
              this.serialNumber = iprot.readString();
3430 rajveer 4157
            } else { 
4158
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4159
            }
4160
            break;
4496 mandeep.dh 4161
          case 2: // TYPE
4162
            if (field.type == org.apache.thrift.protocol.TType.I32) {
4163
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 4164
            } else { 
4165
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4166
            }
4167
            break;
4496 mandeep.dh 4168
          case 3: // ORDER_ID
4169
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4170
              this.orderId = iprot.readI64();
4171
              setOrderIdIsSet(true);
3430 rajveer 4172
            } else { 
4173
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4174
            }
4175
            break;
5110 mandeep.dh 4176
          case 4: // FULFILMENT_WAREHOUSE_ID
4496 mandeep.dh 4177
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5110 mandeep.dh 4178
              this.fulfilmentWarehouseId = iprot.readI64();
4179
              setFulfilmentWarehouseIdIsSet(true);
3430 rajveer 4180
            } else { 
4181
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4182
            }
4183
            break;
5110 mandeep.dh 4184
          case 5: // QUANTITY
4185
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
4186
              this.quantity = iprot.readDouble();
4187
              setQuantityIsSet(true);
4188
            } else { 
4189
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4190
            }
4191
            break;
4192
          case 6: // BILLING_WAREHOUSE_ID
4193
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4194
              this.billingWarehouseId = iprot.readI64();
4195
              setBillingWarehouseIdIsSet(true);
4196
            } else { 
4197
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4198
            }
4199
            break;
3430 rajveer 4200
          default:
4201
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 4202
        }
3430 rajveer 4203
        iprot.readFieldEnd();
2820 chandransh 4204
      }
4205
      iprot.readStructEnd();
4206
      validate();
4207
    }
4208
 
3430 rajveer 4209
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 4210
      validate();
4211
 
4212
      oprot.writeStructBegin(STRUCT_DESC);
4555 mandeep.dh 4213
      if (this.serialNumber != null) {
4214
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
4215
        oprot.writeString(this.serialNumber);
4216
        oprot.writeFieldEnd();
4217
      }
2820 chandransh 4218
      if (this.type != null) {
4219
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
4220
        oprot.writeI32(this.type.getValue());
4221
        oprot.writeFieldEnd();
4222
      }
4496 mandeep.dh 4223
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
4224
      oprot.writeI64(this.orderId);
4225
      oprot.writeFieldEnd();
5110 mandeep.dh 4226
      oprot.writeFieldBegin(FULFILMENT_WAREHOUSE_ID_FIELD_DESC);
4227
      oprot.writeI64(this.fulfilmentWarehouseId);
4496 mandeep.dh 4228
      oprot.writeFieldEnd();
5110 mandeep.dh 4229
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
4230
      oprot.writeDouble(this.quantity);
4231
      oprot.writeFieldEnd();
4232
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
4233
      oprot.writeI64(this.billingWarehouseId);
4234
      oprot.writeFieldEnd();
2820 chandransh 4235
      oprot.writeFieldStop();
4236
      oprot.writeStructEnd();
4237
    }
4238
 
4239
    @Override
4240
    public String toString() {
4496 mandeep.dh 4241
      StringBuilder sb = new StringBuilder("scanSerializedItemForOrder_args(");
2820 chandransh 4242
      boolean first = true;
4243
 
4555 mandeep.dh 4244
      sb.append("serialNumber:");
4245
      if (this.serialNumber == null) {
4246
        sb.append("null");
4247
      } else {
4248
        sb.append(this.serialNumber);
4249
      }
2820 chandransh 4250
      first = false;
4251
      if (!first) sb.append(", ");
4496 mandeep.dh 4252
      sb.append("type:");
4253
      if (this.type == null) {
2820 chandransh 4254
        sb.append("null");
4255
      } else {
4496 mandeep.dh 4256
        sb.append(this.type);
2820 chandransh 4257
      }
4258
      first = false;
4259
      if (!first) sb.append(", ");
4496 mandeep.dh 4260
      sb.append("orderId:");
4261
      sb.append(this.orderId);
2820 chandransh 4262
      first = false;
4263
      if (!first) sb.append(", ");
5110 mandeep.dh 4264
      sb.append("fulfilmentWarehouseId:");
4265
      sb.append(this.fulfilmentWarehouseId);
2820 chandransh 4266
      first = false;
5110 mandeep.dh 4267
      if (!first) sb.append(", ");
4268
      sb.append("quantity:");
4269
      sb.append(this.quantity);
4270
      first = false;
4271
      if (!first) sb.append(", ");
4272
      sb.append("billingWarehouseId:");
4273
      sb.append(this.billingWarehouseId);
4274
      first = false;
2820 chandransh 4275
      sb.append(")");
4276
      return sb.toString();
4277
    }
4278
 
3430 rajveer 4279
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 4280
      // check for required fields
4281
    }
4282
 
3430 rajveer 4283
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4284
      try {
4285
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4286
      } catch (org.apache.thrift.TException te) {
4287
        throw new java.io.IOException(te);
4288
      }
4289
    }
4290
 
4291
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4292
      try {
4293
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4294
      } catch (org.apache.thrift.TException te) {
4295
        throw new java.io.IOException(te);
4296
      }
4297
    }
4298
 
2820 chandransh 4299
  }
4300
 
4496 mandeep.dh 4301
  public static class scanSerializedItemForOrder_result implements org.apache.thrift.TBase<scanSerializedItemForOrder_result, scanSerializedItemForOrder_result._Fields>, java.io.Serializable, Cloneable   {
4302
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItemForOrder_result");
2820 chandransh 4303
 
4555 mandeep.dh 4304
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
3430 rajveer 4305
    private static final org.apache.thrift.protocol.TField WEX_FIELD_DESC = new org.apache.thrift.protocol.TField("wex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
2820 chandransh 4306
 
4555 mandeep.dh 4307
    private InventoryItem success; // required
3430 rajveer 4308
    private WarehouseServiceException wex; // required
2820 chandransh 4309
 
4310
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4311
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 4312
      SUCCESS((short)0, "success"),
2820 chandransh 4313
      WEX((short)1, "wex");
4314
 
4315
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4316
 
4317
      static {
4318
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4319
          byName.put(field.getFieldName(), field);
4320
        }
4321
      }
4322
 
4323
      /**
4324
       * Find the _Fields constant that matches fieldId, or null if its not found.
4325
       */
4326
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4327
        switch(fieldId) {
4496 mandeep.dh 4328
          case 0: // SUCCESS
4329
            return SUCCESS;
3430 rajveer 4330
          case 1: // WEX
4331
            return WEX;
4332
          default:
4333
            return null;
4334
        }
2820 chandransh 4335
      }
4336
 
4337
      /**
4338
       * Find the _Fields constant that matches fieldId, throwing an exception
4339
       * if it is not found.
4340
       */
4341
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4342
        _Fields fields = findByThriftId(fieldId);
4343
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4344
        return fields;
4345
      }
4346
 
4347
      /**
4348
       * Find the _Fields constant that matches name, or null if its not found.
4349
       */
4350
      public static _Fields findByName(String name) {
4351
        return byName.get(name);
4352
      }
4353
 
4354
      private final short _thriftId;
4355
      private final String _fieldName;
4356
 
4357
      _Fields(short thriftId, String fieldName) {
4358
        _thriftId = thriftId;
4359
        _fieldName = fieldName;
4360
      }
4361
 
4362
      public short getThriftFieldId() {
4363
        return _thriftId;
4364
      }
4365
 
4366
      public String getFieldName() {
4367
        return _fieldName;
4368
      }
4369
    }
4370
 
4371
    // isset id assignments
4372
 
3430 rajveer 4373
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 4374
    static {
3430 rajveer 4375
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 4376
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 4377
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 4378
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4379
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4380
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 4381
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanSerializedItemForOrder_result.class, metaDataMap);
2820 chandransh 4382
    }
4383
 
4496 mandeep.dh 4384
    public scanSerializedItemForOrder_result() {
2820 chandransh 4385
    }
4386
 
4496 mandeep.dh 4387
    public scanSerializedItemForOrder_result(
4555 mandeep.dh 4388
      InventoryItem success,
2820 chandransh 4389
      WarehouseServiceException wex)
4390
    {
4391
      this();
4496 mandeep.dh 4392
      this.success = success;
2820 chandransh 4393
      this.wex = wex;
4394
    }
4395
 
4396
    /**
4397
     * Performs a deep copy on <i>other</i>.
4398
     */
4496 mandeep.dh 4399
    public scanSerializedItemForOrder_result(scanSerializedItemForOrder_result other) {
4555 mandeep.dh 4400
      if (other.isSetSuccess()) {
4401
        this.success = new InventoryItem(other.success);
4402
      }
2820 chandransh 4403
      if (other.isSetWex()) {
4404
        this.wex = new WarehouseServiceException(other.wex);
4405
      }
4406
    }
4407
 
4496 mandeep.dh 4408
    public scanSerializedItemForOrder_result deepCopy() {
4409
      return new scanSerializedItemForOrder_result(this);
2820 chandransh 4410
    }
4411
 
3430 rajveer 4412
    @Override
4413
    public void clear() {
4555 mandeep.dh 4414
      this.success = null;
3430 rajveer 4415
      this.wex = null;
2820 chandransh 4416
    }
4417
 
4555 mandeep.dh 4418
    public InventoryItem getSuccess() {
4496 mandeep.dh 4419
      return this.success;
4420
    }
4421
 
4555 mandeep.dh 4422
    public void setSuccess(InventoryItem success) {
4496 mandeep.dh 4423
      this.success = success;
4424
    }
4425
 
4426
    public void unsetSuccess() {
4555 mandeep.dh 4427
      this.success = null;
4496 mandeep.dh 4428
    }
4429
 
4430
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
4431
    public boolean isSetSuccess() {
4555 mandeep.dh 4432
      return this.success != null;
4496 mandeep.dh 4433
    }
4434
 
4435
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 4436
      if (!value) {
4437
        this.success = null;
4438
      }
4496 mandeep.dh 4439
    }
4440
 
2820 chandransh 4441
    public WarehouseServiceException getWex() {
4442
      return this.wex;
4443
    }
4444
 
3430 rajveer 4445
    public void setWex(WarehouseServiceException wex) {
2820 chandransh 4446
      this.wex = wex;
4447
    }
4448
 
4449
    public void unsetWex() {
4450
      this.wex = null;
4451
    }
4452
 
3430 rajveer 4453
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2820 chandransh 4454
    public boolean isSetWex() {
4455
      return this.wex != null;
4456
    }
4457
 
4458
    public void setWexIsSet(boolean value) {
4459
      if (!value) {
4460
        this.wex = null;
4461
      }
4462
    }
4463
 
4464
    public void setFieldValue(_Fields field, Object value) {
4465
      switch (field) {
4496 mandeep.dh 4466
      case SUCCESS:
4467
        if (value == null) {
4468
          unsetSuccess();
4469
        } else {
4555 mandeep.dh 4470
          setSuccess((InventoryItem)value);
4496 mandeep.dh 4471
        }
4472
        break;
4473
 
2820 chandransh 4474
      case WEX:
4475
        if (value == null) {
4476
          unsetWex();
4477
        } else {
4478
          setWex((WarehouseServiceException)value);
4479
        }
4480
        break;
4481
 
4482
      }
4483
    }
4484
 
4485
    public Object getFieldValue(_Fields field) {
4486
      switch (field) {
4496 mandeep.dh 4487
      case SUCCESS:
4555 mandeep.dh 4488
        return getSuccess();
4496 mandeep.dh 4489
 
2820 chandransh 4490
      case WEX:
4491
        return getWex();
4492
 
4493
      }
4494
      throw new IllegalStateException();
4495
    }
4496
 
3430 rajveer 4497
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4498
    public boolean isSet(_Fields field) {
4499
      if (field == null) {
4500
        throw new IllegalArgumentException();
4501
      }
2820 chandransh 4502
 
4503
      switch (field) {
4496 mandeep.dh 4504
      case SUCCESS:
4505
        return isSetSuccess();
2820 chandransh 4506
      case WEX:
4507
        return isSetWex();
4508
      }
4509
      throw new IllegalStateException();
4510
    }
4511
 
4512
    @Override
4513
    public boolean equals(Object that) {
4514
      if (that == null)
4515
        return false;
4496 mandeep.dh 4516
      if (that instanceof scanSerializedItemForOrder_result)
4517
        return this.equals((scanSerializedItemForOrder_result)that);
2820 chandransh 4518
      return false;
4519
    }
4520
 
4496 mandeep.dh 4521
    public boolean equals(scanSerializedItemForOrder_result that) {
2820 chandransh 4522
      if (that == null)
4523
        return false;
4524
 
4555 mandeep.dh 4525
      boolean this_present_success = true && this.isSetSuccess();
4526
      boolean that_present_success = true && that.isSetSuccess();
4496 mandeep.dh 4527
      if (this_present_success || that_present_success) {
4528
        if (!(this_present_success && that_present_success))
4529
          return false;
4555 mandeep.dh 4530
        if (!this.success.equals(that.success))
4496 mandeep.dh 4531
          return false;
4532
      }
4533
 
2820 chandransh 4534
      boolean this_present_wex = true && this.isSetWex();
4535
      boolean that_present_wex = true && that.isSetWex();
4536
      if (this_present_wex || that_present_wex) {
4537
        if (!(this_present_wex && that_present_wex))
4538
          return false;
4539
        if (!this.wex.equals(that.wex))
4540
          return false;
4541
      }
4542
 
4543
      return true;
4544
    }
4545
 
4546
    @Override
4547
    public int hashCode() {
4548
      return 0;
4549
    }
4550
 
4496 mandeep.dh 4551
    public int compareTo(scanSerializedItemForOrder_result other) {
2820 chandransh 4552
      if (!getClass().equals(other.getClass())) {
4553
        return getClass().getName().compareTo(other.getClass().getName());
4554
      }
4555
 
4556
      int lastComparison = 0;
4496 mandeep.dh 4557
      scanSerializedItemForOrder_result typedOther = (scanSerializedItemForOrder_result)other;
2820 chandransh 4558
 
4496 mandeep.dh 4559
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
4560
      if (lastComparison != 0) {
4561
        return lastComparison;
4562
      }
4563
      if (isSetSuccess()) {
4564
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4565
        if (lastComparison != 0) {
4566
          return lastComparison;
4567
        }
4568
      }
3430 rajveer 4569
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 4570
      if (lastComparison != 0) {
4571
        return lastComparison;
4572
      }
3430 rajveer 4573
      if (isSetWex()) {
4574
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
4575
        if (lastComparison != 0) {
4576
          return lastComparison;
4577
        }
2820 chandransh 4578
      }
4579
      return 0;
4580
    }
4581
 
3430 rajveer 4582
    public _Fields fieldForId(int fieldId) {
4583
      return _Fields.findByThriftId(fieldId);
4584
    }
4585
 
4586
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4587
      org.apache.thrift.protocol.TField field;
2820 chandransh 4588
      iprot.readStructBegin();
4589
      while (true)
4590
      {
4591
        field = iprot.readFieldBegin();
3430 rajveer 4592
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 4593
          break;
4594
        }
3430 rajveer 4595
        switch (field.id) {
4496 mandeep.dh 4596
          case 0: // SUCCESS
4555 mandeep.dh 4597
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4598
              this.success = new InventoryItem();
4599
              this.success.read(iprot);
4496 mandeep.dh 4600
            } else { 
4601
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4602
            }
4603
            break;
3430 rajveer 4604
          case 1: // WEX
4605
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4606
              this.wex = new WarehouseServiceException();
4607
              this.wex.read(iprot);
4608
            } else { 
4609
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4610
            }
4611
            break;
4612
          default:
4613
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 4614
        }
3430 rajveer 4615
        iprot.readFieldEnd();
2820 chandransh 4616
      }
4617
      iprot.readStructEnd();
4618
      validate();
4619
    }
4620
 
3430 rajveer 4621
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 4622
      oprot.writeStructBegin(STRUCT_DESC);
4623
 
4496 mandeep.dh 4624
      if (this.isSetSuccess()) {
4625
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 4626
        this.success.write(oprot);
4496 mandeep.dh 4627
        oprot.writeFieldEnd();
4628
      } else if (this.isSetWex()) {
2820 chandransh 4629
        oprot.writeFieldBegin(WEX_FIELD_DESC);
4630
        this.wex.write(oprot);
4631
        oprot.writeFieldEnd();
4632
      }
4633
      oprot.writeFieldStop();
4634
      oprot.writeStructEnd();
4635
    }
4636
 
4637
    @Override
4638
    public String toString() {
4496 mandeep.dh 4639
      StringBuilder sb = new StringBuilder("scanSerializedItemForOrder_result(");
2820 chandransh 4640
      boolean first = true;
4641
 
4496 mandeep.dh 4642
      sb.append("success:");
4555 mandeep.dh 4643
      if (this.success == null) {
4644
        sb.append("null");
4645
      } else {
4646
        sb.append(this.success);
4647
      }
4496 mandeep.dh 4648
      first = false;
4649
      if (!first) sb.append(", ");
2820 chandransh 4650
      sb.append("wex:");
4651
      if (this.wex == null) {
4652
        sb.append("null");
4653
      } else {
4654
        sb.append(this.wex);
4655
      }
4656
      first = false;
4657
      sb.append(")");
4658
      return sb.toString();
4659
    }
4660
 
3430 rajveer 4661
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 4662
      // check for required fields
4663
    }
4664
 
3430 rajveer 4665
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4666
      try {
4667
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4668
      } catch (org.apache.thrift.TException te) {
4669
        throw new java.io.IOException(te);
4670
      }
4671
    }
4672
 
4673
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4674
      try {
4675
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4676
      } catch (org.apache.thrift.TException te) {
4677
        throw new java.io.IOException(te);
4678
      }
4679
    }
4680
 
2820 chandransh 4681
  }
4682
 
4496 mandeep.dh 4683
  public static class scanForOrder_args implements org.apache.thrift.TBase<scanForOrder_args, scanForOrder_args._Fields>, java.io.Serializable, Cloneable   {
4684
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOrder_args");
2820 chandransh 4685
 
5361 mandeep.dh 4686
    private static final org.apache.thrift.protocol.TField INVENTORY_ITEM_FIELD_DESC = new org.apache.thrift.protocol.TField("inventoryItem", org.apache.thrift.protocol.TType.STRUCT, (short)1);
4496 mandeep.dh 4687
    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)2);
4688
    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);
4689
    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);
5110 mandeep.dh 4690
    private static final org.apache.thrift.protocol.TField FULFILMENT_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("fulfilmentWarehouseId", org.apache.thrift.protocol.TType.I64, (short)5);
5361 mandeep.dh 4691
    private static final org.apache.thrift.protocol.TField BILLING_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("billingWarehouseId", org.apache.thrift.protocol.TType.I64, (short)6);
2820 chandransh 4692
 
5361 mandeep.dh 4693
    private InventoryItem inventoryItem; // required
3430 rajveer 4694
    private ScanType type; // required
4496 mandeep.dh 4695
    private long quantity; // required
4696
    private long orderId; // required
5110 mandeep.dh 4697
    private long fulfilmentWarehouseId; // required
5361 mandeep.dh 4698
    private long billingWarehouseId; // required
2820 chandransh 4699
 
4700
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4701
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 4702
      INVENTORY_ITEM((short)1, "inventoryItem"),
2820 chandransh 4703
      /**
4704
       * 
4705
       * @see ScanType
4706
       */
4496 mandeep.dh 4707
      TYPE((short)2, "type"),
4708
      QUANTITY((short)3, "quantity"),
4709
      ORDER_ID((short)4, "orderId"),
5361 mandeep.dh 4710
      FULFILMENT_WAREHOUSE_ID((short)5, "fulfilmentWarehouseId"),
4711
      BILLING_WAREHOUSE_ID((short)6, "billingWarehouseId");
2820 chandransh 4712
 
4713
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4714
 
4715
      static {
4716
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4717
          byName.put(field.getFieldName(), field);
4718
        }
4719
      }
4720
 
4721
      /**
4722
       * Find the _Fields constant that matches fieldId, or null if its not found.
4723
       */
4724
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4725
        switch(fieldId) {
5361 mandeep.dh 4726
          case 1: // INVENTORY_ITEM
4727
            return INVENTORY_ITEM;
4496 mandeep.dh 4728
          case 2: // TYPE
3430 rajveer 4729
            return TYPE;
4496 mandeep.dh 4730
          case 3: // QUANTITY
4731
            return QUANTITY;
4732
          case 4: // ORDER_ID
4733
            return ORDER_ID;
5110 mandeep.dh 4734
          case 5: // FULFILMENT_WAREHOUSE_ID
4735
            return FULFILMENT_WAREHOUSE_ID;
5361 mandeep.dh 4736
          case 6: // BILLING_WAREHOUSE_ID
4737
            return BILLING_WAREHOUSE_ID;
3430 rajveer 4738
          default:
4739
            return null;
4740
        }
2820 chandransh 4741
      }
4742
 
4743
      /**
4744
       * Find the _Fields constant that matches fieldId, throwing an exception
4745
       * if it is not found.
4746
       */
4747
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4748
        _Fields fields = findByThriftId(fieldId);
4749
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4750
        return fields;
4751
      }
4752
 
4753
      /**
4754
       * Find the _Fields constant that matches name, or null if its not found.
4755
       */
4756
      public static _Fields findByName(String name) {
4757
        return byName.get(name);
4758
      }
4759
 
4760
      private final short _thriftId;
4761
      private final String _fieldName;
4762
 
4763
      _Fields(short thriftId, String fieldName) {
4764
        _thriftId = thriftId;
4765
        _fieldName = fieldName;
4766
      }
4767
 
4768
      public short getThriftFieldId() {
4769
        return _thriftId;
4770
      }
4771
 
4772
      public String getFieldName() {
4773
        return _fieldName;
4774
      }
4775
    }
4776
 
4777
    // isset id assignments
5361 mandeep.dh 4778
    private static final int __QUANTITY_ISSET_ID = 0;
4779
    private static final int __ORDERID_ISSET_ID = 1;
4780
    private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 2;
4781
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 3;
4496 mandeep.dh 4782
    private BitSet __isset_bit_vector = new BitSet(4);
2820 chandransh 4783
 
3430 rajveer 4784
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 4785
    static {
3430 rajveer 4786
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5361 mandeep.dh 4787
      tmpMap.put(_Fields.INVENTORY_ITEM, new org.apache.thrift.meta_data.FieldMetaData("inventoryItem", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4788
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 4789
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4790
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
4496 mandeep.dh 4791
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4792
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4793
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4794
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 4795
      tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 4796
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5361 mandeep.dh 4797
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4798
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 4799
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 4800
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOrder_args.class, metaDataMap);
2820 chandransh 4801
    }
4802
 
4496 mandeep.dh 4803
    public scanForOrder_args() {
2820 chandransh 4804
    }
4805
 
4496 mandeep.dh 4806
    public scanForOrder_args(
5361 mandeep.dh 4807
      InventoryItem inventoryItem,
4496 mandeep.dh 4808
      ScanType type,
4809
      long quantity,
4810
      long orderId,
5361 mandeep.dh 4811
      long fulfilmentWarehouseId,
4812
      long billingWarehouseId)
2820 chandransh 4813
    {
4814
      this();
5361 mandeep.dh 4815
      this.inventoryItem = inventoryItem;
2820 chandransh 4816
      this.type = type;
4496 mandeep.dh 4817
      this.quantity = quantity;
4818
      setQuantityIsSet(true);
4819
      this.orderId = orderId;
4820
      setOrderIdIsSet(true);
5110 mandeep.dh 4821
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
4822
      setFulfilmentWarehouseIdIsSet(true);
5361 mandeep.dh 4823
      this.billingWarehouseId = billingWarehouseId;
4824
      setBillingWarehouseIdIsSet(true);
2820 chandransh 4825
    }
4826
 
4827
    /**
4828
     * Performs a deep copy on <i>other</i>.
4829
     */
4496 mandeep.dh 4830
    public scanForOrder_args(scanForOrder_args other) {
4831
      __isset_bit_vector.clear();
4832
      __isset_bit_vector.or(other.__isset_bit_vector);
5361 mandeep.dh 4833
      if (other.isSetInventoryItem()) {
4834
        this.inventoryItem = new InventoryItem(other.inventoryItem);
4835
      }
2820 chandransh 4836
      if (other.isSetType()) {
4837
        this.type = other.type;
4838
      }
4496 mandeep.dh 4839
      this.quantity = other.quantity;
4840
      this.orderId = other.orderId;
5110 mandeep.dh 4841
      this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
5361 mandeep.dh 4842
      this.billingWarehouseId = other.billingWarehouseId;
2820 chandransh 4843
    }
4844
 
4496 mandeep.dh 4845
    public scanForOrder_args deepCopy() {
4846
      return new scanForOrder_args(this);
2820 chandransh 4847
    }
4848
 
3430 rajveer 4849
    @Override
4850
    public void clear() {
5361 mandeep.dh 4851
      this.inventoryItem = null;
3430 rajveer 4852
      this.type = null;
4496 mandeep.dh 4853
      setQuantityIsSet(false);
4854
      this.quantity = 0;
4855
      setOrderIdIsSet(false);
4856
      this.orderId = 0;
5110 mandeep.dh 4857
      setFulfilmentWarehouseIdIsSet(false);
4858
      this.fulfilmentWarehouseId = 0;
5361 mandeep.dh 4859
      setBillingWarehouseIdIsSet(false);
4860
      this.billingWarehouseId = 0;
2820 chandransh 4861
    }
4862
 
5361 mandeep.dh 4863
    public InventoryItem getInventoryItem() {
4864
      return this.inventoryItem;
2820 chandransh 4865
    }
4866
 
5361 mandeep.dh 4867
    public void setInventoryItem(InventoryItem inventoryItem) {
4868
      this.inventoryItem = inventoryItem;
2820 chandransh 4869
    }
4870
 
5361 mandeep.dh 4871
    public void unsetInventoryItem() {
4872
      this.inventoryItem = null;
2820 chandransh 4873
    }
4874
 
5361 mandeep.dh 4875
    /** Returns true if field inventoryItem is set (has been assigned a value) and false otherwise */
4876
    public boolean isSetInventoryItem() {
4877
      return this.inventoryItem != null;
2820 chandransh 4878
    }
4879
 
5361 mandeep.dh 4880
    public void setInventoryItemIsSet(boolean value) {
4881
      if (!value) {
4882
        this.inventoryItem = null;
4883
      }
2820 chandransh 4884
    }
4885
 
4886
    /**
4887
     * 
4888
     * @see ScanType
4889
     */
4890
    public ScanType getType() {
4891
      return this.type;
4892
    }
4893
 
4894
    /**
4895
     * 
4896
     * @see ScanType
4897
     */
3430 rajveer 4898
    public void setType(ScanType type) {
2820 chandransh 4899
      this.type = type;
4900
    }
4901
 
4902
    public void unsetType() {
4903
      this.type = null;
4904
    }
4905
 
3430 rajveer 4906
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
2820 chandransh 4907
    public boolean isSetType() {
4908
      return this.type != null;
4909
    }
4910
 
4911
    public void setTypeIsSet(boolean value) {
4912
      if (!value) {
4913
        this.type = null;
4914
      }
4915
    }
4916
 
4496 mandeep.dh 4917
    public long getQuantity() {
4918
      return this.quantity;
4919
    }
4920
 
4921
    public void setQuantity(long quantity) {
4922
      this.quantity = quantity;
4923
      setQuantityIsSet(true);
4924
    }
4925
 
4926
    public void unsetQuantity() {
4927
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
4928
    }
4929
 
4930
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
4931
    public boolean isSetQuantity() {
4932
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
4933
    }
4934
 
4935
    public void setQuantityIsSet(boolean value) {
4936
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
4937
    }
4938
 
4939
    public long getOrderId() {
4940
      return this.orderId;
4941
    }
4942
 
4943
    public void setOrderId(long orderId) {
4944
      this.orderId = orderId;
4945
      setOrderIdIsSet(true);
4946
    }
4947
 
4948
    public void unsetOrderId() {
4949
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
4950
    }
4951
 
4952
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
4953
    public boolean isSetOrderId() {
4954
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
4955
    }
4956
 
4957
    public void setOrderIdIsSet(boolean value) {
4958
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
4959
    }
4960
 
5110 mandeep.dh 4961
    public long getFulfilmentWarehouseId() {
4962
      return this.fulfilmentWarehouseId;
4496 mandeep.dh 4963
    }
4964
 
5110 mandeep.dh 4965
    public void setFulfilmentWarehouseId(long fulfilmentWarehouseId) {
4966
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
4967
      setFulfilmentWarehouseIdIsSet(true);
4496 mandeep.dh 4968
    }
4969
 
5110 mandeep.dh 4970
    public void unsetFulfilmentWarehouseId() {
4971
      __isset_bit_vector.clear(__FULFILMENTWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 4972
    }
4973
 
5110 mandeep.dh 4974
    /** Returns true if field fulfilmentWarehouseId is set (has been assigned a value) and false otherwise */
4975
    public boolean isSetFulfilmentWarehouseId() {
4976
      return __isset_bit_vector.get(__FULFILMENTWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 4977
    }
4978
 
5110 mandeep.dh 4979
    public void setFulfilmentWarehouseIdIsSet(boolean value) {
4980
      __isset_bit_vector.set(__FULFILMENTWAREHOUSEID_ISSET_ID, value);
4496 mandeep.dh 4981
    }
4982
 
5361 mandeep.dh 4983
    public long getBillingWarehouseId() {
4984
      return this.billingWarehouseId;
4985
    }
4986
 
4987
    public void setBillingWarehouseId(long billingWarehouseId) {
4988
      this.billingWarehouseId = billingWarehouseId;
4989
      setBillingWarehouseIdIsSet(true);
4990
    }
4991
 
4992
    public void unsetBillingWarehouseId() {
4993
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
4994
    }
4995
 
4996
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
4997
    public boolean isSetBillingWarehouseId() {
4998
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
4999
    }
5000
 
5001
    public void setBillingWarehouseIdIsSet(boolean value) {
5002
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
5003
    }
5004
 
2820 chandransh 5005
    public void setFieldValue(_Fields field, Object value) {
5006
      switch (field) {
5361 mandeep.dh 5007
      case INVENTORY_ITEM:
2820 chandransh 5008
        if (value == null) {
5361 mandeep.dh 5009
          unsetInventoryItem();
2820 chandransh 5010
        } else {
5361 mandeep.dh 5011
          setInventoryItem((InventoryItem)value);
2820 chandransh 5012
        }
5013
        break;
5014
 
4496 mandeep.dh 5015
      case TYPE:
2820 chandransh 5016
        if (value == null) {
4496 mandeep.dh 5017
          unsetType();
2820 chandransh 5018
        } else {
4496 mandeep.dh 5019
          setType((ScanType)value);
2820 chandransh 5020
        }
5021
        break;
5022
 
4496 mandeep.dh 5023
      case QUANTITY:
2820 chandransh 5024
        if (value == null) {
4496 mandeep.dh 5025
          unsetQuantity();
2820 chandransh 5026
        } else {
4496 mandeep.dh 5027
          setQuantity((Long)value);
2820 chandransh 5028
        }
5029
        break;
5030
 
4496 mandeep.dh 5031
      case ORDER_ID:
5032
        if (value == null) {
5033
          unsetOrderId();
5034
        } else {
5035
          setOrderId((Long)value);
5036
        }
5037
        break;
5038
 
5110 mandeep.dh 5039
      case FULFILMENT_WAREHOUSE_ID:
4496 mandeep.dh 5040
        if (value == null) {
5110 mandeep.dh 5041
          unsetFulfilmentWarehouseId();
4496 mandeep.dh 5042
        } else {
5110 mandeep.dh 5043
          setFulfilmentWarehouseId((Long)value);
4496 mandeep.dh 5044
        }
5045
        break;
5046
 
5361 mandeep.dh 5047
      case BILLING_WAREHOUSE_ID:
5048
        if (value == null) {
5049
          unsetBillingWarehouseId();
5050
        } else {
5051
          setBillingWarehouseId((Long)value);
5052
        }
5053
        break;
5054
 
2820 chandransh 5055
      }
5056
    }
5057
 
5058
    public Object getFieldValue(_Fields field) {
5059
      switch (field) {
5361 mandeep.dh 5060
      case INVENTORY_ITEM:
5061
        return getInventoryItem();
2820 chandransh 5062
 
5063
      case TYPE:
5064
        return getType();
5065
 
4496 mandeep.dh 5066
      case QUANTITY:
5067
        return Long.valueOf(getQuantity());
5068
 
5069
      case ORDER_ID:
5070
        return Long.valueOf(getOrderId());
5071
 
5110 mandeep.dh 5072
      case FULFILMENT_WAREHOUSE_ID:
5073
        return Long.valueOf(getFulfilmentWarehouseId());
4496 mandeep.dh 5074
 
5361 mandeep.dh 5075
      case BILLING_WAREHOUSE_ID:
5076
        return Long.valueOf(getBillingWarehouseId());
5077
 
2820 chandransh 5078
      }
5079
      throw new IllegalStateException();
5080
    }
5081
 
3430 rajveer 5082
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5083
    public boolean isSet(_Fields field) {
5084
      if (field == null) {
5085
        throw new IllegalArgumentException();
5086
      }
2820 chandransh 5087
 
5088
      switch (field) {
5361 mandeep.dh 5089
      case INVENTORY_ITEM:
5090
        return isSetInventoryItem();
2820 chandransh 5091
      case TYPE:
5092
        return isSetType();
4496 mandeep.dh 5093
      case QUANTITY:
5094
        return isSetQuantity();
5095
      case ORDER_ID:
5096
        return isSetOrderId();
5110 mandeep.dh 5097
      case FULFILMENT_WAREHOUSE_ID:
5098
        return isSetFulfilmentWarehouseId();
5361 mandeep.dh 5099
      case BILLING_WAREHOUSE_ID:
5100
        return isSetBillingWarehouseId();
2820 chandransh 5101
      }
5102
      throw new IllegalStateException();
5103
    }
5104
 
5105
    @Override
5106
    public boolean equals(Object that) {
5107
      if (that == null)
5108
        return false;
4496 mandeep.dh 5109
      if (that instanceof scanForOrder_args)
5110
        return this.equals((scanForOrder_args)that);
2820 chandransh 5111
      return false;
5112
    }
5113
 
4496 mandeep.dh 5114
    public boolean equals(scanForOrder_args that) {
2820 chandransh 5115
      if (that == null)
5116
        return false;
5117
 
5361 mandeep.dh 5118
      boolean this_present_inventoryItem = true && this.isSetInventoryItem();
5119
      boolean that_present_inventoryItem = true && that.isSetInventoryItem();
5120
      if (this_present_inventoryItem || that_present_inventoryItem) {
5121
        if (!(this_present_inventoryItem && that_present_inventoryItem))
2820 chandransh 5122
          return false;
5361 mandeep.dh 5123
        if (!this.inventoryItem.equals(that.inventoryItem))
2820 chandransh 5124
          return false;
5125
      }
5126
 
5127
      boolean this_present_type = true && this.isSetType();
5128
      boolean that_present_type = true && that.isSetType();
5129
      if (this_present_type || that_present_type) {
5130
        if (!(this_present_type && that_present_type))
5131
          return false;
5132
        if (!this.type.equals(that.type))
5133
          return false;
5134
      }
5135
 
4496 mandeep.dh 5136
      boolean this_present_quantity = true;
5137
      boolean that_present_quantity = true;
5138
      if (this_present_quantity || that_present_quantity) {
5139
        if (!(this_present_quantity && that_present_quantity))
5140
          return false;
5141
        if (this.quantity != that.quantity)
5142
          return false;
5143
      }
5144
 
5145
      boolean this_present_orderId = true;
5146
      boolean that_present_orderId = true;
5147
      if (this_present_orderId || that_present_orderId) {
5148
        if (!(this_present_orderId && that_present_orderId))
5149
          return false;
5150
        if (this.orderId != that.orderId)
5151
          return false;
5152
      }
5153
 
5110 mandeep.dh 5154
      boolean this_present_fulfilmentWarehouseId = true;
5155
      boolean that_present_fulfilmentWarehouseId = true;
5156
      if (this_present_fulfilmentWarehouseId || that_present_fulfilmentWarehouseId) {
5157
        if (!(this_present_fulfilmentWarehouseId && that_present_fulfilmentWarehouseId))
4496 mandeep.dh 5158
          return false;
5110 mandeep.dh 5159
        if (this.fulfilmentWarehouseId != that.fulfilmentWarehouseId)
4496 mandeep.dh 5160
          return false;
5161
      }
5162
 
5361 mandeep.dh 5163
      boolean this_present_billingWarehouseId = true;
5164
      boolean that_present_billingWarehouseId = true;
5165
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
5166
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
5167
          return false;
5168
        if (this.billingWarehouseId != that.billingWarehouseId)
5169
          return false;
5170
      }
5171
 
2820 chandransh 5172
      return true;
5173
    }
5174
 
5175
    @Override
5176
    public int hashCode() {
5177
      return 0;
5178
    }
5179
 
4496 mandeep.dh 5180
    public int compareTo(scanForOrder_args other) {
2820 chandransh 5181
      if (!getClass().equals(other.getClass())) {
5182
        return getClass().getName().compareTo(other.getClass().getName());
5183
      }
5184
 
5185
      int lastComparison = 0;
4496 mandeep.dh 5186
      scanForOrder_args typedOther = (scanForOrder_args)other;
2820 chandransh 5187
 
5361 mandeep.dh 5188
      lastComparison = Boolean.valueOf(isSetInventoryItem()).compareTo(typedOther.isSetInventoryItem());
2820 chandransh 5189
      if (lastComparison != 0) {
5190
        return lastComparison;
5191
      }
5361 mandeep.dh 5192
      if (isSetInventoryItem()) {
5193
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItem, typedOther.inventoryItem);
3430 rajveer 5194
        if (lastComparison != 0) {
5195
          return lastComparison;
5196
        }
2820 chandransh 5197
      }
4496 mandeep.dh 5198
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
2820 chandransh 5199
      if (lastComparison != 0) {
5200
        return lastComparison;
5201
      }
4496 mandeep.dh 5202
      if (isSetType()) {
5203
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 5204
        if (lastComparison != 0) {
5205
          return lastComparison;
5206
        }
2820 chandransh 5207
      }
4496 mandeep.dh 5208
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
2820 chandransh 5209
      if (lastComparison != 0) {
5210
        return lastComparison;
5211
      }
4496 mandeep.dh 5212
      if (isSetQuantity()) {
5213
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
3430 rajveer 5214
        if (lastComparison != 0) {
5215
          return lastComparison;
5216
        }
2820 chandransh 5217
      }
4496 mandeep.dh 5218
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
5219
      if (lastComparison != 0) {
5220
        return lastComparison;
5221
      }
5222
      if (isSetOrderId()) {
5223
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
5224
        if (lastComparison != 0) {
5225
          return lastComparison;
5226
        }
5227
      }
5110 mandeep.dh 5228
      lastComparison = Boolean.valueOf(isSetFulfilmentWarehouseId()).compareTo(typedOther.isSetFulfilmentWarehouseId());
4496 mandeep.dh 5229
      if (lastComparison != 0) {
5230
        return lastComparison;
5231
      }
5110 mandeep.dh 5232
      if (isSetFulfilmentWarehouseId()) {
5233
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilmentWarehouseId, typedOther.fulfilmentWarehouseId);
4496 mandeep.dh 5234
        if (lastComparison != 0) {
5235
          return lastComparison;
5236
        }
5237
      }
5361 mandeep.dh 5238
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
5239
      if (lastComparison != 0) {
5240
        return lastComparison;
5241
      }
5242
      if (isSetBillingWarehouseId()) {
5243
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
5244
        if (lastComparison != 0) {
5245
          return lastComparison;
5246
        }
5247
      }
2820 chandransh 5248
      return 0;
5249
    }
5250
 
3430 rajveer 5251
    public _Fields fieldForId(int fieldId) {
5252
      return _Fields.findByThriftId(fieldId);
5253
    }
5254
 
5255
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5256
      org.apache.thrift.protocol.TField field;
2820 chandransh 5257
      iprot.readStructBegin();
5258
      while (true)
5259
      {
5260
        field = iprot.readFieldBegin();
3430 rajveer 5261
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 5262
          break;
5263
        }
3430 rajveer 5264
        switch (field.id) {
5361 mandeep.dh 5265
          case 1: // INVENTORY_ITEM
5266
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5267
              this.inventoryItem = new InventoryItem();
5268
              this.inventoryItem.read(iprot);
3430 rajveer 5269
            } else { 
5270
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5271
            }
5272
            break;
4496 mandeep.dh 5273
          case 2: // TYPE
5274
            if (field.type == org.apache.thrift.protocol.TType.I32) {
5275
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 5276
            } else { 
5277
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5278
            }
5279
            break;
4496 mandeep.dh 5280
          case 3: // QUANTITY
5281
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5282
              this.quantity = iprot.readI64();
5283
              setQuantityIsSet(true);
3430 rajveer 5284
            } else { 
5285
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5286
            }
5287
            break;
4496 mandeep.dh 5288
          case 4: // ORDER_ID
5289
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5290
              this.orderId = iprot.readI64();
5291
              setOrderIdIsSet(true);
5292
            } else { 
5293
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5294
            }
5295
            break;
5110 mandeep.dh 5296
          case 5: // FULFILMENT_WAREHOUSE_ID
4496 mandeep.dh 5297
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5110 mandeep.dh 5298
              this.fulfilmentWarehouseId = iprot.readI64();
5299
              setFulfilmentWarehouseIdIsSet(true);
4496 mandeep.dh 5300
            } else { 
5301
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5302
            }
5303
            break;
5361 mandeep.dh 5304
          case 6: // BILLING_WAREHOUSE_ID
5305
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5306
              this.billingWarehouseId = iprot.readI64();
5307
              setBillingWarehouseIdIsSet(true);
5308
            } else { 
5309
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5310
            }
5311
            break;
3430 rajveer 5312
          default:
5313
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 5314
        }
3430 rajveer 5315
        iprot.readFieldEnd();
2820 chandransh 5316
      }
5317
      iprot.readStructEnd();
5318
      validate();
5319
    }
5320
 
3430 rajveer 5321
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 5322
      validate();
5323
 
5324
      oprot.writeStructBegin(STRUCT_DESC);
5361 mandeep.dh 5325
      if (this.inventoryItem != null) {
5326
        oprot.writeFieldBegin(INVENTORY_ITEM_FIELD_DESC);
5327
        this.inventoryItem.write(oprot);
5328
        oprot.writeFieldEnd();
5329
      }
2820 chandransh 5330
      if (this.type != null) {
5331
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
5332
        oprot.writeI32(this.type.getValue());
5333
        oprot.writeFieldEnd();
5334
      }
4496 mandeep.dh 5335
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
5336
      oprot.writeI64(this.quantity);
5337
      oprot.writeFieldEnd();
5338
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
5339
      oprot.writeI64(this.orderId);
5340
      oprot.writeFieldEnd();
5110 mandeep.dh 5341
      oprot.writeFieldBegin(FULFILMENT_WAREHOUSE_ID_FIELD_DESC);
5342
      oprot.writeI64(this.fulfilmentWarehouseId);
4496 mandeep.dh 5343
      oprot.writeFieldEnd();
5361 mandeep.dh 5344
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
5345
      oprot.writeI64(this.billingWarehouseId);
5346
      oprot.writeFieldEnd();
2820 chandransh 5347
      oprot.writeFieldStop();
5348
      oprot.writeStructEnd();
5349
    }
5350
 
5351
    @Override
5352
    public String toString() {
4496 mandeep.dh 5353
      StringBuilder sb = new StringBuilder("scanForOrder_args(");
2820 chandransh 5354
      boolean first = true;
5355
 
5361 mandeep.dh 5356
      sb.append("inventoryItem:");
5357
      if (this.inventoryItem == null) {
5358
        sb.append("null");
5359
      } else {
5360
        sb.append(this.inventoryItem);
5361
      }
2820 chandransh 5362
      first = false;
5363
      if (!first) sb.append(", ");
5364
      sb.append("type:");
5365
      if (this.type == null) {
5366
        sb.append("null");
5367
      } else {
5368
        sb.append(this.type);
5369
      }
5370
      first = false;
4496 mandeep.dh 5371
      if (!first) sb.append(", ");
5372
      sb.append("quantity:");
5373
      sb.append(this.quantity);
5374
      first = false;
5375
      if (!first) sb.append(", ");
5376
      sb.append("orderId:");
5377
      sb.append(this.orderId);
5378
      first = false;
5379
      if (!first) sb.append(", ");
5110 mandeep.dh 5380
      sb.append("fulfilmentWarehouseId:");
5381
      sb.append(this.fulfilmentWarehouseId);
4496 mandeep.dh 5382
      first = false;
5361 mandeep.dh 5383
      if (!first) sb.append(", ");
5384
      sb.append("billingWarehouseId:");
5385
      sb.append(this.billingWarehouseId);
5386
      first = false;
2820 chandransh 5387
      sb.append(")");
5388
      return sb.toString();
5389
    }
5390
 
3430 rajveer 5391
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 5392
      // check for required fields
5393
    }
5394
 
3430 rajveer 5395
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5396
      try {
5397
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5398
      } catch (org.apache.thrift.TException te) {
5399
        throw new java.io.IOException(te);
5400
      }
5401
    }
5402
 
5403
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5404
      try {
4496 mandeep.dh 5405
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
5406
        __isset_bit_vector = new BitSet(1);
3430 rajveer 5407
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5408
      } catch (org.apache.thrift.TException te) {
5409
        throw new java.io.IOException(te);
5410
      }
5411
    }
5412
 
2820 chandransh 5413
  }
5414
 
4496 mandeep.dh 5415
  public static class scanForOrder_result implements org.apache.thrift.TBase<scanForOrder_result, scanForOrder_result._Fields>, java.io.Serializable, Cloneable   {
5416
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOrder_result");
2820 chandransh 5417
 
5361 mandeep.dh 5418
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
3430 rajveer 5419
    private static final org.apache.thrift.protocol.TField WEX_FIELD_DESC = new org.apache.thrift.protocol.TField("wex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
2820 chandransh 5420
 
5361 mandeep.dh 5421
    private InventoryItem success; // required
3430 rajveer 5422
    private WarehouseServiceException wex; // required
2820 chandransh 5423
 
5424
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 5425
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 5426
      SUCCESS((short)0, "success"),
2820 chandransh 5427
      WEX((short)1, "wex");
5428
 
5429
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5430
 
5431
      static {
5432
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5433
          byName.put(field.getFieldName(), field);
5434
        }
5435
      }
5436
 
5437
      /**
5438
       * Find the _Fields constant that matches fieldId, or null if its not found.
5439
       */
5440
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 5441
        switch(fieldId) {
5361 mandeep.dh 5442
          case 0: // SUCCESS
5443
            return SUCCESS;
3430 rajveer 5444
          case 1: // WEX
5445
            return WEX;
5446
          default:
5447
            return null;
5448
        }
2820 chandransh 5449
      }
5450
 
5451
      /**
5452
       * Find the _Fields constant that matches fieldId, throwing an exception
5453
       * if it is not found.
5454
       */
5455
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5456
        _Fields fields = findByThriftId(fieldId);
5457
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5458
        return fields;
5459
      }
5460
 
5461
      /**
5462
       * Find the _Fields constant that matches name, or null if its not found.
5463
       */
5464
      public static _Fields findByName(String name) {
5465
        return byName.get(name);
5466
      }
5467
 
5468
      private final short _thriftId;
5469
      private final String _fieldName;
5470
 
5471
      _Fields(short thriftId, String fieldName) {
5472
        _thriftId = thriftId;
5473
        _fieldName = fieldName;
5474
      }
5475
 
5476
      public short getThriftFieldId() {
5477
        return _thriftId;
5478
      }
5479
 
5480
      public String getFieldName() {
5481
        return _fieldName;
5482
      }
5483
    }
5484
 
5485
    // isset id assignments
5486
 
3430 rajveer 5487
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 5488
    static {
3430 rajveer 5489
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5361 mandeep.dh 5490
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5491
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 5492
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5493
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5494
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 5495
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOrder_result.class, metaDataMap);
2820 chandransh 5496
    }
5497
 
4496 mandeep.dh 5498
    public scanForOrder_result() {
2820 chandransh 5499
    }
5500
 
4496 mandeep.dh 5501
    public scanForOrder_result(
5361 mandeep.dh 5502
      InventoryItem success,
2820 chandransh 5503
      WarehouseServiceException wex)
5504
    {
5505
      this();
5361 mandeep.dh 5506
      this.success = success;
2820 chandransh 5507
      this.wex = wex;
5508
    }
5509
 
5510
    /**
5511
     * Performs a deep copy on <i>other</i>.
5512
     */
4496 mandeep.dh 5513
    public scanForOrder_result(scanForOrder_result other) {
5361 mandeep.dh 5514
      if (other.isSetSuccess()) {
5515
        this.success = new InventoryItem(other.success);
5516
      }
2820 chandransh 5517
      if (other.isSetWex()) {
5518
        this.wex = new WarehouseServiceException(other.wex);
5519
      }
5520
    }
5521
 
4496 mandeep.dh 5522
    public scanForOrder_result deepCopy() {
5523
      return new scanForOrder_result(this);
2820 chandransh 5524
    }
5525
 
3430 rajveer 5526
    @Override
5527
    public void clear() {
5361 mandeep.dh 5528
      this.success = null;
3430 rajveer 5529
      this.wex = null;
2820 chandransh 5530
    }
5531
 
5361 mandeep.dh 5532
    public InventoryItem getSuccess() {
5533
      return this.success;
5534
    }
5535
 
5536
    public void setSuccess(InventoryItem success) {
5537
      this.success = success;
5538
    }
5539
 
5540
    public void unsetSuccess() {
5541
      this.success = null;
5542
    }
5543
 
5544
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5545
    public boolean isSetSuccess() {
5546
      return this.success != null;
5547
    }
5548
 
5549
    public void setSuccessIsSet(boolean value) {
5550
      if (!value) {
5551
        this.success = null;
5552
      }
5553
    }
5554
 
2820 chandransh 5555
    public WarehouseServiceException getWex() {
5556
      return this.wex;
5557
    }
5558
 
3430 rajveer 5559
    public void setWex(WarehouseServiceException wex) {
2820 chandransh 5560
      this.wex = wex;
5561
    }
5562
 
5563
    public void unsetWex() {
5564
      this.wex = null;
5565
    }
5566
 
3430 rajveer 5567
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2820 chandransh 5568
    public boolean isSetWex() {
5569
      return this.wex != null;
5570
    }
5571
 
5572
    public void setWexIsSet(boolean value) {
5573
      if (!value) {
5574
        this.wex = null;
5575
      }
5576
    }
5577
 
5578
    public void setFieldValue(_Fields field, Object value) {
5579
      switch (field) {
5361 mandeep.dh 5580
      case SUCCESS:
5581
        if (value == null) {
5582
          unsetSuccess();
5583
        } else {
5584
          setSuccess((InventoryItem)value);
5585
        }
5586
        break;
5587
 
2820 chandransh 5588
      case WEX:
5589
        if (value == null) {
5590
          unsetWex();
5591
        } else {
5592
          setWex((WarehouseServiceException)value);
5593
        }
5594
        break;
5595
 
5596
      }
5597
    }
5598
 
5599
    public Object getFieldValue(_Fields field) {
5600
      switch (field) {
5361 mandeep.dh 5601
      case SUCCESS:
5602
        return getSuccess();
5603
 
2820 chandransh 5604
      case WEX:
5605
        return getWex();
5606
 
5607
      }
5608
      throw new IllegalStateException();
5609
    }
5610
 
3430 rajveer 5611
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5612
    public boolean isSet(_Fields field) {
5613
      if (field == null) {
5614
        throw new IllegalArgumentException();
5615
      }
2820 chandransh 5616
 
5617
      switch (field) {
5361 mandeep.dh 5618
      case SUCCESS:
5619
        return isSetSuccess();
2820 chandransh 5620
      case WEX:
5621
        return isSetWex();
5622
      }
5623
      throw new IllegalStateException();
5624
    }
5625
 
5626
    @Override
5627
    public boolean equals(Object that) {
5628
      if (that == null)
5629
        return false;
4496 mandeep.dh 5630
      if (that instanceof scanForOrder_result)
5631
        return this.equals((scanForOrder_result)that);
2820 chandransh 5632
      return false;
5633
    }
5634
 
4496 mandeep.dh 5635
    public boolean equals(scanForOrder_result that) {
2820 chandransh 5636
      if (that == null)
5637
        return false;
5638
 
5361 mandeep.dh 5639
      boolean this_present_success = true && this.isSetSuccess();
5640
      boolean that_present_success = true && that.isSetSuccess();
5641
      if (this_present_success || that_present_success) {
5642
        if (!(this_present_success && that_present_success))
5643
          return false;
5644
        if (!this.success.equals(that.success))
5645
          return false;
5646
      }
5647
 
2820 chandransh 5648
      boolean this_present_wex = true && this.isSetWex();
5649
      boolean that_present_wex = true && that.isSetWex();
5650
      if (this_present_wex || that_present_wex) {
5651
        if (!(this_present_wex && that_present_wex))
5652
          return false;
5653
        if (!this.wex.equals(that.wex))
5654
          return false;
5655
      }
5656
 
5657
      return true;
5658
    }
5659
 
5660
    @Override
5661
    public int hashCode() {
5662
      return 0;
5663
    }
5664
 
4496 mandeep.dh 5665
    public int compareTo(scanForOrder_result other) {
2820 chandransh 5666
      if (!getClass().equals(other.getClass())) {
5667
        return getClass().getName().compareTo(other.getClass().getName());
5668
      }
5669
 
5670
      int lastComparison = 0;
4496 mandeep.dh 5671
      scanForOrder_result typedOther = (scanForOrder_result)other;
2820 chandransh 5672
 
5361 mandeep.dh 5673
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5674
      if (lastComparison != 0) {
5675
        return lastComparison;
5676
      }
5677
      if (isSetSuccess()) {
5678
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5679
        if (lastComparison != 0) {
5680
          return lastComparison;
5681
        }
5682
      }
3430 rajveer 5683
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 5684
      if (lastComparison != 0) {
5685
        return lastComparison;
5686
      }
3430 rajveer 5687
      if (isSetWex()) {
5688
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
5689
        if (lastComparison != 0) {
5690
          return lastComparison;
5691
        }
2820 chandransh 5692
      }
5693
      return 0;
5694
    }
5695
 
3430 rajveer 5696
    public _Fields fieldForId(int fieldId) {
5697
      return _Fields.findByThriftId(fieldId);
5698
    }
5699
 
5700
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5701
      org.apache.thrift.protocol.TField field;
2820 chandransh 5702
      iprot.readStructBegin();
5703
      while (true)
5704
      {
5705
        field = iprot.readFieldBegin();
3430 rajveer 5706
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 5707
          break;
5708
        }
3430 rajveer 5709
        switch (field.id) {
5361 mandeep.dh 5710
          case 0: // SUCCESS
5711
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5712
              this.success = new InventoryItem();
5713
              this.success.read(iprot);
5714
            } else { 
5715
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5716
            }
5717
            break;
3430 rajveer 5718
          case 1: // WEX
5719
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5720
              this.wex = new WarehouseServiceException();
5721
              this.wex.read(iprot);
5722
            } else { 
5723
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5724
            }
5725
            break;
5726
          default:
5727
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 5728
        }
3430 rajveer 5729
        iprot.readFieldEnd();
2820 chandransh 5730
      }
5731
      iprot.readStructEnd();
5732
      validate();
5733
    }
5734
 
3430 rajveer 5735
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 5736
      oprot.writeStructBegin(STRUCT_DESC);
5737
 
5361 mandeep.dh 5738
      if (this.isSetSuccess()) {
5739
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5740
        this.success.write(oprot);
5741
        oprot.writeFieldEnd();
5742
      } else if (this.isSetWex()) {
2820 chandransh 5743
        oprot.writeFieldBegin(WEX_FIELD_DESC);
5744
        this.wex.write(oprot);
5745
        oprot.writeFieldEnd();
5746
      }
5747
      oprot.writeFieldStop();
5748
      oprot.writeStructEnd();
5749
    }
5750
 
5751
    @Override
5752
    public String toString() {
4496 mandeep.dh 5753
      StringBuilder sb = new StringBuilder("scanForOrder_result(");
2820 chandransh 5754
      boolean first = true;
5755
 
5361 mandeep.dh 5756
      sb.append("success:");
5757
      if (this.success == null) {
5758
        sb.append("null");
5759
      } else {
5760
        sb.append(this.success);
5761
      }
5762
      first = false;
5763
      if (!first) sb.append(", ");
2820 chandransh 5764
      sb.append("wex:");
5765
      if (this.wex == null) {
5766
        sb.append("null");
5767
      } else {
5768
        sb.append(this.wex);
5769
      }
5770
      first = false;
5771
      sb.append(")");
5772
      return sb.toString();
5773
    }
5774
 
3430 rajveer 5775
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 5776
      // check for required fields
5777
    }
5778
 
3430 rajveer 5779
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5780
      try {
5781
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5782
      } catch (org.apache.thrift.TException te) {
5783
        throw new java.io.IOException(te);
5784
      }
5785
    }
5786
 
5787
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5788
      try {
5789
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5790
      } catch (org.apache.thrift.TException te) {
5791
        throw new java.io.IOException(te);
5792
      }
5793
    }
5794
 
2820 chandransh 5795
  }
5796
 
4496 mandeep.dh 5797
  public static class createItemNumberMapping_args implements org.apache.thrift.TBase<createItemNumberMapping_args, createItemNumberMapping_args._Fields>, java.io.Serializable, Cloneable   {
5798
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createItemNumberMapping_args");
5799
 
5800
    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)1);
5801
    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);
5802
 
5803
    private String itemNumber; // required
5804
    private long itemId; // required
5805
 
5806
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5807
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5808
      ITEM_NUMBER((short)1, "itemNumber"),
5809
      ITEM_ID((short)2, "itemId");
5810
 
5811
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5812
 
5813
      static {
5814
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5815
          byName.put(field.getFieldName(), field);
5816
        }
5817
      }
5818
 
5819
      /**
5820
       * Find the _Fields constant that matches fieldId, or null if its not found.
5821
       */
5822
      public static _Fields findByThriftId(int fieldId) {
5823
        switch(fieldId) {
5824
          case 1: // ITEM_NUMBER
5825
            return ITEM_NUMBER;
5826
          case 2: // ITEM_ID
5827
            return ITEM_ID;
5828
          default:
5829
            return null;
5830
        }
5831
      }
5832
 
5833
      /**
5834
       * Find the _Fields constant that matches fieldId, throwing an exception
5835
       * if it is not found.
5836
       */
5837
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5838
        _Fields fields = findByThriftId(fieldId);
5839
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5840
        return fields;
5841
      }
5842
 
5843
      /**
5844
       * Find the _Fields constant that matches name, or null if its not found.
5845
       */
5846
      public static _Fields findByName(String name) {
5847
        return byName.get(name);
5848
      }
5849
 
5850
      private final short _thriftId;
5851
      private final String _fieldName;
5852
 
5853
      _Fields(short thriftId, String fieldName) {
5854
        _thriftId = thriftId;
5855
        _fieldName = fieldName;
5856
      }
5857
 
5858
      public short getThriftFieldId() {
5859
        return _thriftId;
5860
      }
5861
 
5862
      public String getFieldName() {
5863
        return _fieldName;
5864
      }
5865
    }
5866
 
5867
    // isset id assignments
5868
    private static final int __ITEMID_ISSET_ID = 0;
5869
    private BitSet __isset_bit_vector = new BitSet(1);
5870
 
5871
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5872
    static {
5873
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5874
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5875
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
5876
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5877
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5878
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5879
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createItemNumberMapping_args.class, metaDataMap);
5880
    }
5881
 
5882
    public createItemNumberMapping_args() {
5883
    }
5884
 
5885
    public createItemNumberMapping_args(
5886
      String itemNumber,
5887
      long itemId)
5888
    {
5889
      this();
5890
      this.itemNumber = itemNumber;
5891
      this.itemId = itemId;
5892
      setItemIdIsSet(true);
5893
    }
5894
 
5895
    /**
5896
     * Performs a deep copy on <i>other</i>.
5897
     */
5898
    public createItemNumberMapping_args(createItemNumberMapping_args other) {
5899
      __isset_bit_vector.clear();
5900
      __isset_bit_vector.or(other.__isset_bit_vector);
5901
      if (other.isSetItemNumber()) {
5902
        this.itemNumber = other.itemNumber;
5903
      }
5904
      this.itemId = other.itemId;
5905
    }
5906
 
5907
    public createItemNumberMapping_args deepCopy() {
5908
      return new createItemNumberMapping_args(this);
5909
    }
5910
 
5911
    @Override
5912
    public void clear() {
5913
      this.itemNumber = null;
5914
      setItemIdIsSet(false);
5915
      this.itemId = 0;
5916
    }
5917
 
5918
    public String getItemNumber() {
5919
      return this.itemNumber;
5920
    }
5921
 
5922
    public void setItemNumber(String itemNumber) {
5923
      this.itemNumber = itemNumber;
5924
    }
5925
 
5926
    public void unsetItemNumber() {
5927
      this.itemNumber = null;
5928
    }
5929
 
5930
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
5931
    public boolean isSetItemNumber() {
5932
      return this.itemNumber != null;
5933
    }
5934
 
5935
    public void setItemNumberIsSet(boolean value) {
5936
      if (!value) {
5937
        this.itemNumber = null;
5938
      }
5939
    }
5940
 
5941
    public long getItemId() {
5942
      return this.itemId;
5943
    }
5944
 
5945
    public void setItemId(long itemId) {
5946
      this.itemId = itemId;
5947
      setItemIdIsSet(true);
5948
    }
5949
 
5950
    public void unsetItemId() {
5951
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
5952
    }
5953
 
5954
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
5955
    public boolean isSetItemId() {
5956
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
5957
    }
5958
 
5959
    public void setItemIdIsSet(boolean value) {
5960
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
5961
    }
5962
 
5963
    public void setFieldValue(_Fields field, Object value) {
5964
      switch (field) {
5965
      case ITEM_NUMBER:
5966
        if (value == null) {
5967
          unsetItemNumber();
5968
        } else {
5969
          setItemNumber((String)value);
5970
        }
5971
        break;
5972
 
5973
      case ITEM_ID:
5974
        if (value == null) {
5975
          unsetItemId();
5976
        } else {
5977
          setItemId((Long)value);
5978
        }
5979
        break;
5980
 
5981
      }
5982
    }
5983
 
5984
    public Object getFieldValue(_Fields field) {
5985
      switch (field) {
5986
      case ITEM_NUMBER:
5987
        return getItemNumber();
5988
 
5989
      case ITEM_ID:
5990
        return Long.valueOf(getItemId());
5991
 
5992
      }
5993
      throw new IllegalStateException();
5994
    }
5995
 
5996
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5997
    public boolean isSet(_Fields field) {
5998
      if (field == null) {
5999
        throw new IllegalArgumentException();
6000
      }
6001
 
6002
      switch (field) {
6003
      case ITEM_NUMBER:
6004
        return isSetItemNumber();
6005
      case ITEM_ID:
6006
        return isSetItemId();
6007
      }
6008
      throw new IllegalStateException();
6009
    }
6010
 
6011
    @Override
6012
    public boolean equals(Object that) {
6013
      if (that == null)
6014
        return false;
6015
      if (that instanceof createItemNumberMapping_args)
6016
        return this.equals((createItemNumberMapping_args)that);
6017
      return false;
6018
    }
6019
 
6020
    public boolean equals(createItemNumberMapping_args that) {
6021
      if (that == null)
6022
        return false;
6023
 
6024
      boolean this_present_itemNumber = true && this.isSetItemNumber();
6025
      boolean that_present_itemNumber = true && that.isSetItemNumber();
6026
      if (this_present_itemNumber || that_present_itemNumber) {
6027
        if (!(this_present_itemNumber && that_present_itemNumber))
6028
          return false;
6029
        if (!this.itemNumber.equals(that.itemNumber))
6030
          return false;
6031
      }
6032
 
6033
      boolean this_present_itemId = true;
6034
      boolean that_present_itemId = true;
6035
      if (this_present_itemId || that_present_itemId) {
6036
        if (!(this_present_itemId && that_present_itemId))
6037
          return false;
6038
        if (this.itemId != that.itemId)
6039
          return false;
6040
      }
6041
 
6042
      return true;
6043
    }
6044
 
6045
    @Override
6046
    public int hashCode() {
6047
      return 0;
6048
    }
6049
 
6050
    public int compareTo(createItemNumberMapping_args other) {
6051
      if (!getClass().equals(other.getClass())) {
6052
        return getClass().getName().compareTo(other.getClass().getName());
6053
      }
6054
 
6055
      int lastComparison = 0;
6056
      createItemNumberMapping_args typedOther = (createItemNumberMapping_args)other;
6057
 
6058
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
6059
      if (lastComparison != 0) {
6060
        return lastComparison;
6061
      }
6062
      if (isSetItemNumber()) {
6063
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
6064
        if (lastComparison != 0) {
6065
          return lastComparison;
6066
        }
6067
      }
6068
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
6069
      if (lastComparison != 0) {
6070
        return lastComparison;
6071
      }
6072
      if (isSetItemId()) {
6073
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
6074
        if (lastComparison != 0) {
6075
          return lastComparison;
6076
        }
6077
      }
6078
      return 0;
6079
    }
6080
 
6081
    public _Fields fieldForId(int fieldId) {
6082
      return _Fields.findByThriftId(fieldId);
6083
    }
6084
 
6085
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6086
      org.apache.thrift.protocol.TField field;
6087
      iprot.readStructBegin();
6088
      while (true)
6089
      {
6090
        field = iprot.readFieldBegin();
6091
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6092
          break;
6093
        }
6094
        switch (field.id) {
6095
          case 1: // ITEM_NUMBER
6096
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
6097
              this.itemNumber = iprot.readString();
6098
            } else { 
6099
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6100
            }
6101
            break;
6102
          case 2: // ITEM_ID
6103
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6104
              this.itemId = iprot.readI64();
6105
              setItemIdIsSet(true);
6106
            } else { 
6107
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6108
            }
6109
            break;
6110
          default:
6111
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6112
        }
6113
        iprot.readFieldEnd();
6114
      }
6115
      iprot.readStructEnd();
6116
      validate();
6117
    }
6118
 
6119
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6120
      validate();
6121
 
6122
      oprot.writeStructBegin(STRUCT_DESC);
6123
      if (this.itemNumber != null) {
6124
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
6125
        oprot.writeString(this.itemNumber);
6126
        oprot.writeFieldEnd();
6127
      }
6128
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
6129
      oprot.writeI64(this.itemId);
6130
      oprot.writeFieldEnd();
6131
      oprot.writeFieldStop();
6132
      oprot.writeStructEnd();
6133
    }
6134
 
6135
    @Override
6136
    public String toString() {
6137
      StringBuilder sb = new StringBuilder("createItemNumberMapping_args(");
6138
      boolean first = true;
6139
 
6140
      sb.append("itemNumber:");
6141
      if (this.itemNumber == null) {
6142
        sb.append("null");
6143
      } else {
6144
        sb.append(this.itemNumber);
6145
      }
6146
      first = false;
6147
      if (!first) sb.append(", ");
6148
      sb.append("itemId:");
6149
      sb.append(this.itemId);
6150
      first = false;
6151
      sb.append(")");
6152
      return sb.toString();
6153
    }
6154
 
6155
    public void validate() throws org.apache.thrift.TException {
6156
      // check for required fields
6157
    }
6158
 
6159
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6160
      try {
6161
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6162
      } catch (org.apache.thrift.TException te) {
6163
        throw new java.io.IOException(te);
6164
      }
6165
    }
6166
 
6167
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6168
      try {
6169
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
6170
        __isset_bit_vector = new BitSet(1);
6171
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6172
      } catch (org.apache.thrift.TException te) {
6173
        throw new java.io.IOException(te);
6174
      }
6175
    }
6176
 
6177
  }
6178
 
6179
  public static class createItemNumberMapping_result implements org.apache.thrift.TBase<createItemNumberMapping_result, createItemNumberMapping_result._Fields>, java.io.Serializable, Cloneable   {
6180
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createItemNumberMapping_result");
6181
 
6182
 
6183
 
6184
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6185
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6186
;
6187
 
6188
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6189
 
6190
      static {
6191
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6192
          byName.put(field.getFieldName(), field);
6193
        }
6194
      }
6195
 
6196
      /**
6197
       * Find the _Fields constant that matches fieldId, or null if its not found.
6198
       */
6199
      public static _Fields findByThriftId(int fieldId) {
6200
        switch(fieldId) {
6201
          default:
6202
            return null;
6203
        }
6204
      }
6205
 
6206
      /**
6207
       * Find the _Fields constant that matches fieldId, throwing an exception
6208
       * if it is not found.
6209
       */
6210
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6211
        _Fields fields = findByThriftId(fieldId);
6212
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6213
        return fields;
6214
      }
6215
 
6216
      /**
6217
       * Find the _Fields constant that matches name, or null if its not found.
6218
       */
6219
      public static _Fields findByName(String name) {
6220
        return byName.get(name);
6221
      }
6222
 
6223
      private final short _thriftId;
6224
      private final String _fieldName;
6225
 
6226
      _Fields(short thriftId, String fieldName) {
6227
        _thriftId = thriftId;
6228
        _fieldName = fieldName;
6229
      }
6230
 
6231
      public short getThriftFieldId() {
6232
        return _thriftId;
6233
      }
6234
 
6235
      public String getFieldName() {
6236
        return _fieldName;
6237
      }
6238
    }
6239
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6240
    static {
6241
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6242
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6243
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createItemNumberMapping_result.class, metaDataMap);
6244
    }
6245
 
6246
    public createItemNumberMapping_result() {
6247
    }
6248
 
6249
    /**
6250
     * Performs a deep copy on <i>other</i>.
6251
     */
6252
    public createItemNumberMapping_result(createItemNumberMapping_result other) {
6253
    }
6254
 
6255
    public createItemNumberMapping_result deepCopy() {
6256
      return new createItemNumberMapping_result(this);
6257
    }
6258
 
6259
    @Override
6260
    public void clear() {
6261
    }
6262
 
6263
    public void setFieldValue(_Fields field, Object value) {
6264
      switch (field) {
6265
      }
6266
    }
6267
 
6268
    public Object getFieldValue(_Fields field) {
6269
      switch (field) {
6270
      }
6271
      throw new IllegalStateException();
6272
    }
6273
 
6274
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6275
    public boolean isSet(_Fields field) {
6276
      if (field == null) {
6277
        throw new IllegalArgumentException();
6278
      }
6279
 
6280
      switch (field) {
6281
      }
6282
      throw new IllegalStateException();
6283
    }
6284
 
6285
    @Override
6286
    public boolean equals(Object that) {
6287
      if (that == null)
6288
        return false;
6289
      if (that instanceof createItemNumberMapping_result)
6290
        return this.equals((createItemNumberMapping_result)that);
6291
      return false;
6292
    }
6293
 
6294
    public boolean equals(createItemNumberMapping_result that) {
6295
      if (that == null)
6296
        return false;
6297
 
6298
      return true;
6299
    }
6300
 
6301
    @Override
6302
    public int hashCode() {
6303
      return 0;
6304
    }
6305
 
6306
    public int compareTo(createItemNumberMapping_result other) {
6307
      if (!getClass().equals(other.getClass())) {
6308
        return getClass().getName().compareTo(other.getClass().getName());
6309
      }
6310
 
6311
      int lastComparison = 0;
6312
      createItemNumberMapping_result typedOther = (createItemNumberMapping_result)other;
6313
 
6314
      return 0;
6315
    }
6316
 
6317
    public _Fields fieldForId(int fieldId) {
6318
      return _Fields.findByThriftId(fieldId);
6319
    }
6320
 
6321
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6322
      org.apache.thrift.protocol.TField field;
6323
      iprot.readStructBegin();
6324
      while (true)
6325
      {
6326
        field = iprot.readFieldBegin();
6327
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6328
          break;
6329
        }
6330
        switch (field.id) {
6331
          default:
6332
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6333
        }
6334
        iprot.readFieldEnd();
6335
      }
6336
      iprot.readStructEnd();
6337
      validate();
6338
    }
6339
 
6340
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6341
      oprot.writeStructBegin(STRUCT_DESC);
6342
 
6343
      oprot.writeFieldStop();
6344
      oprot.writeStructEnd();
6345
    }
6346
 
6347
    @Override
6348
    public String toString() {
6349
      StringBuilder sb = new StringBuilder("createItemNumberMapping_result(");
6350
      boolean first = true;
6351
 
6352
      sb.append(")");
6353
      return sb.toString();
6354
    }
6355
 
6356
    public void validate() throws org.apache.thrift.TException {
6357
      // check for required fields
6358
    }
6359
 
6360
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6361
      try {
6362
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6363
      } catch (org.apache.thrift.TException te) {
6364
        throw new java.io.IOException(te);
6365
      }
6366
    }
6367
 
6368
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6369
      try {
6370
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6371
      } catch (org.apache.thrift.TException te) {
6372
        throw new java.io.IOException(te);
6373
      }
6374
    }
6375
 
6376
  }
6377
 
4622 amit.gupta 6378
  public static class getItemNumbers_args implements org.apache.thrift.TBase<getItemNumbers_args, getItemNumbers_args._Fields>, java.io.Serializable, Cloneable   {
6379
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemNumbers_args");
6380
 
6381
    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)1);
6382
 
6383
    private long itemId; // required
6384
 
6385
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6386
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6387
      ITEM_ID((short)1, "itemId");
6388
 
6389
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6390
 
6391
      static {
6392
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6393
          byName.put(field.getFieldName(), field);
6394
        }
6395
      }
6396
 
6397
      /**
6398
       * Find the _Fields constant that matches fieldId, or null if its not found.
6399
       */
6400
      public static _Fields findByThriftId(int fieldId) {
6401
        switch(fieldId) {
6402
          case 1: // ITEM_ID
6403
            return ITEM_ID;
6404
          default:
6405
            return null;
6406
        }
6407
      }
6408
 
6409
      /**
6410
       * Find the _Fields constant that matches fieldId, throwing an exception
6411
       * if it is not found.
6412
       */
6413
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6414
        _Fields fields = findByThriftId(fieldId);
6415
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6416
        return fields;
6417
      }
6418
 
6419
      /**
6420
       * Find the _Fields constant that matches name, or null if its not found.
6421
       */
6422
      public static _Fields findByName(String name) {
6423
        return byName.get(name);
6424
      }
6425
 
6426
      private final short _thriftId;
6427
      private final String _fieldName;
6428
 
6429
      _Fields(short thriftId, String fieldName) {
6430
        _thriftId = thriftId;
6431
        _fieldName = fieldName;
6432
      }
6433
 
6434
      public short getThriftFieldId() {
6435
        return _thriftId;
6436
      }
6437
 
6438
      public String getFieldName() {
6439
        return _fieldName;
6440
      }
6441
    }
6442
 
6443
    // isset id assignments
6444
    private static final int __ITEMID_ISSET_ID = 0;
6445
    private BitSet __isset_bit_vector = new BitSet(1);
6446
 
6447
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6448
    static {
6449
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6450
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6451
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6452
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6453
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemNumbers_args.class, metaDataMap);
6454
    }
6455
 
6456
    public getItemNumbers_args() {
6457
    }
6458
 
6459
    public getItemNumbers_args(
6460
      long itemId)
6461
    {
6462
      this();
6463
      this.itemId = itemId;
6464
      setItemIdIsSet(true);
6465
    }
6466
 
6467
    /**
6468
     * Performs a deep copy on <i>other</i>.
6469
     */
6470
    public getItemNumbers_args(getItemNumbers_args other) {
6471
      __isset_bit_vector.clear();
6472
      __isset_bit_vector.or(other.__isset_bit_vector);
6473
      this.itemId = other.itemId;
6474
    }
6475
 
6476
    public getItemNumbers_args deepCopy() {
6477
      return new getItemNumbers_args(this);
6478
    }
6479
 
6480
    @Override
6481
    public void clear() {
6482
      setItemIdIsSet(false);
6483
      this.itemId = 0;
6484
    }
6485
 
6486
    public long getItemId() {
6487
      return this.itemId;
6488
    }
6489
 
6490
    public void setItemId(long itemId) {
6491
      this.itemId = itemId;
6492
      setItemIdIsSet(true);
6493
    }
6494
 
6495
    public void unsetItemId() {
6496
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
6497
    }
6498
 
6499
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
6500
    public boolean isSetItemId() {
6501
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
6502
    }
6503
 
6504
    public void setItemIdIsSet(boolean value) {
6505
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
6506
    }
6507
 
6508
    public void setFieldValue(_Fields field, Object value) {
6509
      switch (field) {
6510
      case ITEM_ID:
6511
        if (value == null) {
6512
          unsetItemId();
6513
        } else {
6514
          setItemId((Long)value);
6515
        }
6516
        break;
6517
 
6518
      }
6519
    }
6520
 
6521
    public Object getFieldValue(_Fields field) {
6522
      switch (field) {
6523
      case ITEM_ID:
6524
        return Long.valueOf(getItemId());
6525
 
6526
      }
6527
      throw new IllegalStateException();
6528
    }
6529
 
6530
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6531
    public boolean isSet(_Fields field) {
6532
      if (field == null) {
6533
        throw new IllegalArgumentException();
6534
      }
6535
 
6536
      switch (field) {
6537
      case ITEM_ID:
6538
        return isSetItemId();
6539
      }
6540
      throw new IllegalStateException();
6541
    }
6542
 
6543
    @Override
6544
    public boolean equals(Object that) {
6545
      if (that == null)
6546
        return false;
6547
      if (that instanceof getItemNumbers_args)
6548
        return this.equals((getItemNumbers_args)that);
6549
      return false;
6550
    }
6551
 
6552
    public boolean equals(getItemNumbers_args that) {
6553
      if (that == null)
6554
        return false;
6555
 
6556
      boolean this_present_itemId = true;
6557
      boolean that_present_itemId = true;
6558
      if (this_present_itemId || that_present_itemId) {
6559
        if (!(this_present_itemId && that_present_itemId))
6560
          return false;
6561
        if (this.itemId != that.itemId)
6562
          return false;
6563
      }
6564
 
6565
      return true;
6566
    }
6567
 
6568
    @Override
6569
    public int hashCode() {
6570
      return 0;
6571
    }
6572
 
6573
    public int compareTo(getItemNumbers_args other) {
6574
      if (!getClass().equals(other.getClass())) {
6575
        return getClass().getName().compareTo(other.getClass().getName());
6576
      }
6577
 
6578
      int lastComparison = 0;
6579
      getItemNumbers_args typedOther = (getItemNumbers_args)other;
6580
 
6581
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
6582
      if (lastComparison != 0) {
6583
        return lastComparison;
6584
      }
6585
      if (isSetItemId()) {
6586
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
6587
        if (lastComparison != 0) {
6588
          return lastComparison;
6589
        }
6590
      }
6591
      return 0;
6592
    }
6593
 
6594
    public _Fields fieldForId(int fieldId) {
6595
      return _Fields.findByThriftId(fieldId);
6596
    }
6597
 
6598
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6599
      org.apache.thrift.protocol.TField field;
6600
      iprot.readStructBegin();
6601
      while (true)
6602
      {
6603
        field = iprot.readFieldBegin();
6604
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6605
          break;
6606
        }
6607
        switch (field.id) {
6608
          case 1: // ITEM_ID
6609
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6610
              this.itemId = iprot.readI64();
6611
              setItemIdIsSet(true);
6612
            } else { 
6613
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6614
            }
6615
            break;
6616
          default:
6617
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6618
        }
6619
        iprot.readFieldEnd();
6620
      }
6621
      iprot.readStructEnd();
6622
      validate();
6623
    }
6624
 
6625
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6626
      validate();
6627
 
6628
      oprot.writeStructBegin(STRUCT_DESC);
6629
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
6630
      oprot.writeI64(this.itemId);
6631
      oprot.writeFieldEnd();
6632
      oprot.writeFieldStop();
6633
      oprot.writeStructEnd();
6634
    }
6635
 
6636
    @Override
6637
    public String toString() {
6638
      StringBuilder sb = new StringBuilder("getItemNumbers_args(");
6639
      boolean first = true;
6640
 
6641
      sb.append("itemId:");
6642
      sb.append(this.itemId);
6643
      first = false;
6644
      sb.append(")");
6645
      return sb.toString();
6646
    }
6647
 
6648
    public void validate() throws org.apache.thrift.TException {
6649
      // check for required fields
6650
    }
6651
 
6652
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6653
      try {
6654
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6655
      } catch (org.apache.thrift.TException te) {
6656
        throw new java.io.IOException(te);
6657
      }
6658
    }
6659
 
6660
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6661
      try {
6662
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
6663
        __isset_bit_vector = new BitSet(1);
6664
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6665
      } catch (org.apache.thrift.TException te) {
6666
        throw new java.io.IOException(te);
6667
      }
6668
    }
6669
 
6670
  }
6671
 
6672
  public static class getItemNumbers_result implements org.apache.thrift.TBase<getItemNumbers_result, getItemNumbers_result._Fields>, java.io.Serializable, Cloneable   {
6673
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemNumbers_result");
6674
 
6675
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
6676
 
6677
    private List<String> success; // required
6678
 
6679
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6680
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6681
      SUCCESS((short)0, "success");
6682
 
6683
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6684
 
6685
      static {
6686
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6687
          byName.put(field.getFieldName(), field);
6688
        }
6689
      }
6690
 
6691
      /**
6692
       * Find the _Fields constant that matches fieldId, or null if its not found.
6693
       */
6694
      public static _Fields findByThriftId(int fieldId) {
6695
        switch(fieldId) {
6696
          case 0: // SUCCESS
6697
            return SUCCESS;
6698
          default:
6699
            return null;
6700
        }
6701
      }
6702
 
6703
      /**
6704
       * Find the _Fields constant that matches fieldId, throwing an exception
6705
       * if it is not found.
6706
       */
6707
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6708
        _Fields fields = findByThriftId(fieldId);
6709
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6710
        return fields;
6711
      }
6712
 
6713
      /**
6714
       * Find the _Fields constant that matches name, or null if its not found.
6715
       */
6716
      public static _Fields findByName(String name) {
6717
        return byName.get(name);
6718
      }
6719
 
6720
      private final short _thriftId;
6721
      private final String _fieldName;
6722
 
6723
      _Fields(short thriftId, String fieldName) {
6724
        _thriftId = thriftId;
6725
        _fieldName = fieldName;
6726
      }
6727
 
6728
      public short getThriftFieldId() {
6729
        return _thriftId;
6730
      }
6731
 
6732
      public String getFieldName() {
6733
        return _fieldName;
6734
      }
6735
    }
6736
 
6737
    // isset id assignments
6738
 
6739
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6740
    static {
6741
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6742
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6743
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
6744
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
6745
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6746
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemNumbers_result.class, metaDataMap);
6747
    }
6748
 
6749
    public getItemNumbers_result() {
6750
    }
6751
 
6752
    public getItemNumbers_result(
6753
      List<String> success)
6754
    {
6755
      this();
6756
      this.success = success;
6757
    }
6758
 
6759
    /**
6760
     * Performs a deep copy on <i>other</i>.
6761
     */
6762
    public getItemNumbers_result(getItemNumbers_result other) {
6763
      if (other.isSetSuccess()) {
6764
        List<String> __this__success = new ArrayList<String>();
6765
        for (String other_element : other.success) {
6766
          __this__success.add(other_element);
6767
        }
6768
        this.success = __this__success;
6769
      }
6770
    }
6771
 
6772
    public getItemNumbers_result deepCopy() {
6773
      return new getItemNumbers_result(this);
6774
    }
6775
 
6776
    @Override
6777
    public void clear() {
6778
      this.success = null;
6779
    }
6780
 
6781
    public int getSuccessSize() {
6782
      return (this.success == null) ? 0 : this.success.size();
6783
    }
6784
 
6785
    public java.util.Iterator<String> getSuccessIterator() {
6786
      return (this.success == null) ? null : this.success.iterator();
6787
    }
6788
 
6789
    public void addToSuccess(String elem) {
6790
      if (this.success == null) {
6791
        this.success = new ArrayList<String>();
6792
      }
6793
      this.success.add(elem);
6794
    }
6795
 
6796
    public List<String> getSuccess() {
6797
      return this.success;
6798
    }
6799
 
6800
    public void setSuccess(List<String> success) {
6801
      this.success = success;
6802
    }
6803
 
6804
    public void unsetSuccess() {
6805
      this.success = null;
6806
    }
6807
 
6808
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
6809
    public boolean isSetSuccess() {
6810
      return this.success != null;
6811
    }
6812
 
6813
    public void setSuccessIsSet(boolean value) {
6814
      if (!value) {
6815
        this.success = null;
6816
      }
6817
    }
6818
 
6819
    public void setFieldValue(_Fields field, Object value) {
6820
      switch (field) {
6821
      case SUCCESS:
6822
        if (value == null) {
6823
          unsetSuccess();
6824
        } else {
6825
          setSuccess((List<String>)value);
6826
        }
6827
        break;
6828
 
6829
      }
6830
    }
6831
 
6832
    public Object getFieldValue(_Fields field) {
6833
      switch (field) {
6834
      case SUCCESS:
6835
        return getSuccess();
6836
 
6837
      }
6838
      throw new IllegalStateException();
6839
    }
6840
 
6841
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6842
    public boolean isSet(_Fields field) {
6843
      if (field == null) {
6844
        throw new IllegalArgumentException();
6845
      }
6846
 
6847
      switch (field) {
6848
      case SUCCESS:
6849
        return isSetSuccess();
6850
      }
6851
      throw new IllegalStateException();
6852
    }
6853
 
6854
    @Override
6855
    public boolean equals(Object that) {
6856
      if (that == null)
6857
        return false;
6858
      if (that instanceof getItemNumbers_result)
6859
        return this.equals((getItemNumbers_result)that);
6860
      return false;
6861
    }
6862
 
6863
    public boolean equals(getItemNumbers_result that) {
6864
      if (that == null)
6865
        return false;
6866
 
6867
      boolean this_present_success = true && this.isSetSuccess();
6868
      boolean that_present_success = true && that.isSetSuccess();
6869
      if (this_present_success || that_present_success) {
6870
        if (!(this_present_success && that_present_success))
6871
          return false;
6872
        if (!this.success.equals(that.success))
6873
          return false;
6874
      }
6875
 
6876
      return true;
6877
    }
6878
 
6879
    @Override
6880
    public int hashCode() {
6881
      return 0;
6882
    }
6883
 
6884
    public int compareTo(getItemNumbers_result other) {
6885
      if (!getClass().equals(other.getClass())) {
6886
        return getClass().getName().compareTo(other.getClass().getName());
6887
      }
6888
 
6889
      int lastComparison = 0;
6890
      getItemNumbers_result typedOther = (getItemNumbers_result)other;
6891
 
6892
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
6893
      if (lastComparison != 0) {
6894
        return lastComparison;
6895
      }
6896
      if (isSetSuccess()) {
6897
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6898
        if (lastComparison != 0) {
6899
          return lastComparison;
6900
        }
6901
      }
6902
      return 0;
6903
    }
6904
 
6905
    public _Fields fieldForId(int fieldId) {
6906
      return _Fields.findByThriftId(fieldId);
6907
    }
6908
 
6909
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6910
      org.apache.thrift.protocol.TField field;
6911
      iprot.readStructBegin();
6912
      while (true)
6913
      {
6914
        field = iprot.readFieldBegin();
6915
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6916
          break;
6917
        }
6918
        switch (field.id) {
6919
          case 0: // SUCCESS
6920
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
6921
              {
5361 mandeep.dh 6922
                org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
6923
                this.success = new ArrayList<String>(_list0.size);
6924
                for (int _i1 = 0; _i1 < _list0.size; ++_i1)
4622 amit.gupta 6925
                {
5361 mandeep.dh 6926
                  String _elem2; // required
6927
                  _elem2 = iprot.readString();
6928
                  this.success.add(_elem2);
4622 amit.gupta 6929
                }
6930
                iprot.readListEnd();
6931
              }
6932
            } else { 
6933
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6934
            }
6935
            break;
6936
          default:
6937
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6938
        }
6939
        iprot.readFieldEnd();
6940
      }
6941
      iprot.readStructEnd();
6942
      validate();
6943
    }
6944
 
6945
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6946
      oprot.writeStructBegin(STRUCT_DESC);
6947
 
6948
      if (this.isSetSuccess()) {
6949
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6950
        {
6951
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size()));
5361 mandeep.dh 6952
          for (String _iter3 : this.success)
4622 amit.gupta 6953
          {
5361 mandeep.dh 6954
            oprot.writeString(_iter3);
4622 amit.gupta 6955
          }
6956
          oprot.writeListEnd();
6957
        }
6958
        oprot.writeFieldEnd();
6959
      }
6960
      oprot.writeFieldStop();
6961
      oprot.writeStructEnd();
6962
    }
6963
 
6964
    @Override
6965
    public String toString() {
6966
      StringBuilder sb = new StringBuilder("getItemNumbers_result(");
6967
      boolean first = true;
6968
 
6969
      sb.append("success:");
6970
      if (this.success == null) {
6971
        sb.append("null");
6972
      } else {
6973
        sb.append(this.success);
6974
      }
6975
      first = false;
6976
      sb.append(")");
6977
      return sb.toString();
6978
    }
6979
 
6980
    public void validate() throws org.apache.thrift.TException {
6981
      // check for required fields
6982
    }
6983
 
6984
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6985
      try {
6986
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6987
      } catch (org.apache.thrift.TException te) {
6988
        throw new java.io.IOException(te);
6989
      }
6990
    }
6991
 
6992
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6993
      try {
6994
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6995
      } catch (org.apache.thrift.TException te) {
6996
        throw new java.io.IOException(te);
6997
      }
6998
    }
6999
 
7000
  }
7001
 
5110 mandeep.dh 7002
  public static class getItemIds_args implements org.apache.thrift.TBase<getItemIds_args, getItemIds_args._Fields>, java.io.Serializable, Cloneable   {
7003
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemIds_args");
7004
 
7005
    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)1);
7006
 
7007
    private String itemNumber; // required
7008
 
7009
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7010
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7011
      ITEM_NUMBER((short)1, "itemNumber");
7012
 
7013
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7014
 
7015
      static {
7016
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7017
          byName.put(field.getFieldName(), field);
7018
        }
7019
      }
7020
 
7021
      /**
7022
       * Find the _Fields constant that matches fieldId, or null if its not found.
7023
       */
7024
      public static _Fields findByThriftId(int fieldId) {
7025
        switch(fieldId) {
7026
          case 1: // ITEM_NUMBER
7027
            return ITEM_NUMBER;
7028
          default:
7029
            return null;
7030
        }
7031
      }
7032
 
7033
      /**
7034
       * Find the _Fields constant that matches fieldId, throwing an exception
7035
       * if it is not found.
7036
       */
7037
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7038
        _Fields fields = findByThriftId(fieldId);
7039
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7040
        return fields;
7041
      }
7042
 
7043
      /**
7044
       * Find the _Fields constant that matches name, or null if its not found.
7045
       */
7046
      public static _Fields findByName(String name) {
7047
        return byName.get(name);
7048
      }
7049
 
7050
      private final short _thriftId;
7051
      private final String _fieldName;
7052
 
7053
      _Fields(short thriftId, String fieldName) {
7054
        _thriftId = thriftId;
7055
        _fieldName = fieldName;
7056
      }
7057
 
7058
      public short getThriftFieldId() {
7059
        return _thriftId;
7060
      }
7061
 
7062
      public String getFieldName() {
7063
        return _fieldName;
7064
      }
7065
    }
7066
 
7067
    // isset id assignments
7068
 
7069
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7070
    static {
7071
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7072
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7073
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
7074
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7075
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemIds_args.class, metaDataMap);
7076
    }
7077
 
7078
    public getItemIds_args() {
7079
    }
7080
 
7081
    public getItemIds_args(
7082
      String itemNumber)
7083
    {
7084
      this();
7085
      this.itemNumber = itemNumber;
7086
    }
7087
 
7088
    /**
7089
     * Performs a deep copy on <i>other</i>.
7090
     */
7091
    public getItemIds_args(getItemIds_args other) {
7092
      if (other.isSetItemNumber()) {
7093
        this.itemNumber = other.itemNumber;
7094
      }
7095
    }
7096
 
7097
    public getItemIds_args deepCopy() {
7098
      return new getItemIds_args(this);
7099
    }
7100
 
7101
    @Override
7102
    public void clear() {
7103
      this.itemNumber = null;
7104
    }
7105
 
7106
    public String getItemNumber() {
7107
      return this.itemNumber;
7108
    }
7109
 
7110
    public void setItemNumber(String itemNumber) {
7111
      this.itemNumber = itemNumber;
7112
    }
7113
 
7114
    public void unsetItemNumber() {
7115
      this.itemNumber = null;
7116
    }
7117
 
7118
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
7119
    public boolean isSetItemNumber() {
7120
      return this.itemNumber != null;
7121
    }
7122
 
7123
    public void setItemNumberIsSet(boolean value) {
7124
      if (!value) {
7125
        this.itemNumber = null;
7126
      }
7127
    }
7128
 
7129
    public void setFieldValue(_Fields field, Object value) {
7130
      switch (field) {
7131
      case ITEM_NUMBER:
7132
        if (value == null) {
7133
          unsetItemNumber();
7134
        } else {
7135
          setItemNumber((String)value);
7136
        }
7137
        break;
7138
 
7139
      }
7140
    }
7141
 
7142
    public Object getFieldValue(_Fields field) {
7143
      switch (field) {
7144
      case ITEM_NUMBER:
7145
        return getItemNumber();
7146
 
7147
      }
7148
      throw new IllegalStateException();
7149
    }
7150
 
7151
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7152
    public boolean isSet(_Fields field) {
7153
      if (field == null) {
7154
        throw new IllegalArgumentException();
7155
      }
7156
 
7157
      switch (field) {
7158
      case ITEM_NUMBER:
7159
        return isSetItemNumber();
7160
      }
7161
      throw new IllegalStateException();
7162
    }
7163
 
7164
    @Override
7165
    public boolean equals(Object that) {
7166
      if (that == null)
7167
        return false;
7168
      if (that instanceof getItemIds_args)
7169
        return this.equals((getItemIds_args)that);
7170
      return false;
7171
    }
7172
 
7173
    public boolean equals(getItemIds_args that) {
7174
      if (that == null)
7175
        return false;
7176
 
7177
      boolean this_present_itemNumber = true && this.isSetItemNumber();
7178
      boolean that_present_itemNumber = true && that.isSetItemNumber();
7179
      if (this_present_itemNumber || that_present_itemNumber) {
7180
        if (!(this_present_itemNumber && that_present_itemNumber))
7181
          return false;
7182
        if (!this.itemNumber.equals(that.itemNumber))
7183
          return false;
7184
      }
7185
 
7186
      return true;
7187
    }
7188
 
7189
    @Override
7190
    public int hashCode() {
7191
      return 0;
7192
    }
7193
 
7194
    public int compareTo(getItemIds_args other) {
7195
      if (!getClass().equals(other.getClass())) {
7196
        return getClass().getName().compareTo(other.getClass().getName());
7197
      }
7198
 
7199
      int lastComparison = 0;
7200
      getItemIds_args typedOther = (getItemIds_args)other;
7201
 
7202
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
7203
      if (lastComparison != 0) {
7204
        return lastComparison;
7205
      }
7206
      if (isSetItemNumber()) {
7207
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
7208
        if (lastComparison != 0) {
7209
          return lastComparison;
7210
        }
7211
      }
7212
      return 0;
7213
    }
7214
 
7215
    public _Fields fieldForId(int fieldId) {
7216
      return _Fields.findByThriftId(fieldId);
7217
    }
7218
 
7219
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7220
      org.apache.thrift.protocol.TField field;
7221
      iprot.readStructBegin();
7222
      while (true)
7223
      {
7224
        field = iprot.readFieldBegin();
7225
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7226
          break;
7227
        }
7228
        switch (field.id) {
7229
          case 1: // ITEM_NUMBER
7230
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
7231
              this.itemNumber = iprot.readString();
7232
            } else { 
7233
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7234
            }
7235
            break;
7236
          default:
7237
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7238
        }
7239
        iprot.readFieldEnd();
7240
      }
7241
      iprot.readStructEnd();
7242
      validate();
7243
    }
7244
 
7245
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7246
      validate();
7247
 
7248
      oprot.writeStructBegin(STRUCT_DESC);
7249
      if (this.itemNumber != null) {
7250
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
7251
        oprot.writeString(this.itemNumber);
7252
        oprot.writeFieldEnd();
7253
      }
7254
      oprot.writeFieldStop();
7255
      oprot.writeStructEnd();
7256
    }
7257
 
7258
    @Override
7259
    public String toString() {
7260
      StringBuilder sb = new StringBuilder("getItemIds_args(");
7261
      boolean first = true;
7262
 
7263
      sb.append("itemNumber:");
7264
      if (this.itemNumber == null) {
7265
        sb.append("null");
7266
      } else {
7267
        sb.append(this.itemNumber);
7268
      }
7269
      first = false;
7270
      sb.append(")");
7271
      return sb.toString();
7272
    }
7273
 
7274
    public void validate() throws org.apache.thrift.TException {
7275
      // check for required fields
7276
    }
7277
 
7278
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7279
      try {
7280
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7281
      } catch (org.apache.thrift.TException te) {
7282
        throw new java.io.IOException(te);
7283
      }
7284
    }
7285
 
7286
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7287
      try {
7288
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7289
      } catch (org.apache.thrift.TException te) {
7290
        throw new java.io.IOException(te);
7291
      }
7292
    }
7293
 
7294
  }
7295
 
7296
  public static class getItemIds_result implements org.apache.thrift.TBase<getItemIds_result, getItemIds_result._Fields>, java.io.Serializable, Cloneable   {
7297
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemIds_result");
7298
 
7299
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
7300
 
7301
    private List<Long> success; // required
7302
 
7303
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7304
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7305
      SUCCESS((short)0, "success");
7306
 
7307
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7308
 
7309
      static {
7310
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7311
          byName.put(field.getFieldName(), field);
7312
        }
7313
      }
7314
 
7315
      /**
7316
       * Find the _Fields constant that matches fieldId, or null if its not found.
7317
       */
7318
      public static _Fields findByThriftId(int fieldId) {
7319
        switch(fieldId) {
7320
          case 0: // SUCCESS
7321
            return SUCCESS;
7322
          default:
7323
            return null;
7324
        }
7325
      }
7326
 
7327
      /**
7328
       * Find the _Fields constant that matches fieldId, throwing an exception
7329
       * if it is not found.
7330
       */
7331
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7332
        _Fields fields = findByThriftId(fieldId);
7333
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7334
        return fields;
7335
      }
7336
 
7337
      /**
7338
       * Find the _Fields constant that matches name, or null if its not found.
7339
       */
7340
      public static _Fields findByName(String name) {
7341
        return byName.get(name);
7342
      }
7343
 
7344
      private final short _thriftId;
7345
      private final String _fieldName;
7346
 
7347
      _Fields(short thriftId, String fieldName) {
7348
        _thriftId = thriftId;
7349
        _fieldName = fieldName;
7350
      }
7351
 
7352
      public short getThriftFieldId() {
7353
        return _thriftId;
7354
      }
7355
 
7356
      public String getFieldName() {
7357
        return _fieldName;
7358
      }
7359
    }
7360
 
7361
    // isset id assignments
7362
 
7363
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7364
    static {
7365
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7366
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7367
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7368
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
7369
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7370
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemIds_result.class, metaDataMap);
7371
    }
7372
 
7373
    public getItemIds_result() {
7374
    }
7375
 
7376
    public getItemIds_result(
7377
      List<Long> success)
7378
    {
7379
      this();
7380
      this.success = success;
7381
    }
7382
 
7383
    /**
7384
     * Performs a deep copy on <i>other</i>.
7385
     */
7386
    public getItemIds_result(getItemIds_result other) {
7387
      if (other.isSetSuccess()) {
7388
        List<Long> __this__success = new ArrayList<Long>();
7389
        for (Long other_element : other.success) {
7390
          __this__success.add(other_element);
7391
        }
7392
        this.success = __this__success;
7393
      }
7394
    }
7395
 
7396
    public getItemIds_result deepCopy() {
7397
      return new getItemIds_result(this);
7398
    }
7399
 
7400
    @Override
7401
    public void clear() {
7402
      this.success = null;
7403
    }
7404
 
7405
    public int getSuccessSize() {
7406
      return (this.success == null) ? 0 : this.success.size();
7407
    }
7408
 
7409
    public java.util.Iterator<Long> getSuccessIterator() {
7410
      return (this.success == null) ? null : this.success.iterator();
7411
    }
7412
 
7413
    public void addToSuccess(long elem) {
7414
      if (this.success == null) {
7415
        this.success = new ArrayList<Long>();
7416
      }
7417
      this.success.add(elem);
7418
    }
7419
 
7420
    public List<Long> getSuccess() {
7421
      return this.success;
7422
    }
7423
 
7424
    public void setSuccess(List<Long> success) {
7425
      this.success = success;
7426
    }
7427
 
7428
    public void unsetSuccess() {
7429
      this.success = null;
7430
    }
7431
 
7432
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7433
    public boolean isSetSuccess() {
7434
      return this.success != null;
7435
    }
7436
 
7437
    public void setSuccessIsSet(boolean value) {
7438
      if (!value) {
7439
        this.success = null;
7440
      }
7441
    }
7442
 
7443
    public void setFieldValue(_Fields field, Object value) {
7444
      switch (field) {
7445
      case SUCCESS:
7446
        if (value == null) {
7447
          unsetSuccess();
7448
        } else {
7449
          setSuccess((List<Long>)value);
7450
        }
7451
        break;
7452
 
7453
      }
7454
    }
7455
 
7456
    public Object getFieldValue(_Fields field) {
7457
      switch (field) {
7458
      case SUCCESS:
7459
        return getSuccess();
7460
 
7461
      }
7462
      throw new IllegalStateException();
7463
    }
7464
 
7465
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7466
    public boolean isSet(_Fields field) {
7467
      if (field == null) {
7468
        throw new IllegalArgumentException();
7469
      }
7470
 
7471
      switch (field) {
7472
      case SUCCESS:
7473
        return isSetSuccess();
7474
      }
7475
      throw new IllegalStateException();
7476
    }
7477
 
7478
    @Override
7479
    public boolean equals(Object that) {
7480
      if (that == null)
7481
        return false;
7482
      if (that instanceof getItemIds_result)
7483
        return this.equals((getItemIds_result)that);
7484
      return false;
7485
    }
7486
 
7487
    public boolean equals(getItemIds_result that) {
7488
      if (that == null)
7489
        return false;
7490
 
7491
      boolean this_present_success = true && this.isSetSuccess();
7492
      boolean that_present_success = true && that.isSetSuccess();
7493
      if (this_present_success || that_present_success) {
7494
        if (!(this_present_success && that_present_success))
7495
          return false;
7496
        if (!this.success.equals(that.success))
7497
          return false;
7498
      }
7499
 
7500
      return true;
7501
    }
7502
 
7503
    @Override
7504
    public int hashCode() {
7505
      return 0;
7506
    }
7507
 
7508
    public int compareTo(getItemIds_result other) {
7509
      if (!getClass().equals(other.getClass())) {
7510
        return getClass().getName().compareTo(other.getClass().getName());
7511
      }
7512
 
7513
      int lastComparison = 0;
7514
      getItemIds_result typedOther = (getItemIds_result)other;
7515
 
7516
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7517
      if (lastComparison != 0) {
7518
        return lastComparison;
7519
      }
7520
      if (isSetSuccess()) {
7521
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7522
        if (lastComparison != 0) {
7523
          return lastComparison;
7524
        }
7525
      }
7526
      return 0;
7527
    }
7528
 
7529
    public _Fields fieldForId(int fieldId) {
7530
      return _Fields.findByThriftId(fieldId);
7531
    }
7532
 
7533
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7534
      org.apache.thrift.protocol.TField field;
7535
      iprot.readStructBegin();
7536
      while (true)
7537
      {
7538
        field = iprot.readFieldBegin();
7539
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7540
          break;
7541
        }
7542
        switch (field.id) {
7543
          case 0: // SUCCESS
7544
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
7545
              {
5361 mandeep.dh 7546
                org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
7547
                this.success = new ArrayList<Long>(_list4.size);
7548
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
5110 mandeep.dh 7549
                {
5361 mandeep.dh 7550
                  long _elem6; // required
7551
                  _elem6 = iprot.readI64();
7552
                  this.success.add(_elem6);
5110 mandeep.dh 7553
                }
7554
                iprot.readListEnd();
7555
              }
7556
            } else { 
7557
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7558
            }
7559
            break;
7560
          default:
7561
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7562
        }
7563
        iprot.readFieldEnd();
7564
      }
7565
      iprot.readStructEnd();
7566
      validate();
7567
    }
7568
 
7569
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7570
      oprot.writeStructBegin(STRUCT_DESC);
7571
 
7572
      if (this.isSetSuccess()) {
7573
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7574
        {
7575
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.success.size()));
5361 mandeep.dh 7576
          for (long _iter7 : this.success)
5110 mandeep.dh 7577
          {
5361 mandeep.dh 7578
            oprot.writeI64(_iter7);
5110 mandeep.dh 7579
          }
7580
          oprot.writeListEnd();
7581
        }
7582
        oprot.writeFieldEnd();
7583
      }
7584
      oprot.writeFieldStop();
7585
      oprot.writeStructEnd();
7586
    }
7587
 
7588
    @Override
7589
    public String toString() {
7590
      StringBuilder sb = new StringBuilder("getItemIds_result(");
7591
      boolean first = true;
7592
 
7593
      sb.append("success:");
7594
      if (this.success == null) {
7595
        sb.append("null");
7596
      } else {
7597
        sb.append(this.success);
7598
      }
7599
      first = false;
7600
      sb.append(")");
7601
      return sb.toString();
7602
    }
7603
 
7604
    public void validate() throws org.apache.thrift.TException {
7605
      // check for required fields
7606
    }
7607
 
7608
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7609
      try {
7610
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7611
      } catch (org.apache.thrift.TException te) {
7612
        throw new java.io.IOException(te);
7613
      }
7614
    }
7615
 
7616
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7617
      try {
7618
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7619
      } catch (org.apache.thrift.TException te) {
7620
        throw new java.io.IOException(te);
7621
      }
7622
    }
7623
 
7624
  }
7625
 
5185 mandeep.dh 7626
  public static class getInventoryItemsFromLastScanType_args implements org.apache.thrift.TBase<getInventoryItemsFromLastScanType_args, getInventoryItemsFromLastScanType_args._Fields>, java.io.Serializable, Cloneable   {
7627
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemsFromLastScanType_args");
7628
 
7629
    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)1);
7630
 
7631
    private ScanType lastScanType; // required
7632
 
7633
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7634
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7635
      /**
7636
       * 
7637
       * @see ScanType
7638
       */
7639
      LAST_SCAN_TYPE((short)1, "lastScanType");
7640
 
7641
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7642
 
7643
      static {
7644
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7645
          byName.put(field.getFieldName(), field);
7646
        }
7647
      }
7648
 
7649
      /**
7650
       * Find the _Fields constant that matches fieldId, or null if its not found.
7651
       */
7652
      public static _Fields findByThriftId(int fieldId) {
7653
        switch(fieldId) {
7654
          case 1: // LAST_SCAN_TYPE
7655
            return LAST_SCAN_TYPE;
7656
          default:
7657
            return null;
7658
        }
7659
      }
7660
 
7661
      /**
7662
       * Find the _Fields constant that matches fieldId, throwing an exception
7663
       * if it is not found.
7664
       */
7665
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7666
        _Fields fields = findByThriftId(fieldId);
7667
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7668
        return fields;
7669
      }
7670
 
7671
      /**
7672
       * Find the _Fields constant that matches name, or null if its not found.
7673
       */
7674
      public static _Fields findByName(String name) {
7675
        return byName.get(name);
7676
      }
7677
 
7678
      private final short _thriftId;
7679
      private final String _fieldName;
7680
 
7681
      _Fields(short thriftId, String fieldName) {
7682
        _thriftId = thriftId;
7683
        _fieldName = fieldName;
7684
      }
7685
 
7686
      public short getThriftFieldId() {
7687
        return _thriftId;
7688
      }
7689
 
7690
      public String getFieldName() {
7691
        return _fieldName;
7692
      }
7693
    }
7694
 
7695
    // isset id assignments
7696
 
7697
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7698
    static {
7699
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7700
      tmpMap.put(_Fields.LAST_SCAN_TYPE, new org.apache.thrift.meta_data.FieldMetaData("lastScanType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7701
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
7702
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7703
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemsFromLastScanType_args.class, metaDataMap);
7704
    }
7705
 
7706
    public getInventoryItemsFromLastScanType_args() {
7707
    }
7708
 
7709
    public getInventoryItemsFromLastScanType_args(
7710
      ScanType lastScanType)
7711
    {
7712
      this();
7713
      this.lastScanType = lastScanType;
7714
    }
7715
 
7716
    /**
7717
     * Performs a deep copy on <i>other</i>.
7718
     */
7719
    public getInventoryItemsFromLastScanType_args(getInventoryItemsFromLastScanType_args other) {
7720
      if (other.isSetLastScanType()) {
7721
        this.lastScanType = other.lastScanType;
7722
      }
7723
    }
7724
 
7725
    public getInventoryItemsFromLastScanType_args deepCopy() {
7726
      return new getInventoryItemsFromLastScanType_args(this);
7727
    }
7728
 
7729
    @Override
7730
    public void clear() {
7731
      this.lastScanType = null;
7732
    }
7733
 
7734
    /**
7735
     * 
7736
     * @see ScanType
7737
     */
7738
    public ScanType getLastScanType() {
7739
      return this.lastScanType;
7740
    }
7741
 
7742
    /**
7743
     * 
7744
     * @see ScanType
7745
     */
7746
    public void setLastScanType(ScanType lastScanType) {
7747
      this.lastScanType = lastScanType;
7748
    }
7749
 
7750
    public void unsetLastScanType() {
7751
      this.lastScanType = null;
7752
    }
7753
 
7754
    /** Returns true if field lastScanType is set (has been assigned a value) and false otherwise */
7755
    public boolean isSetLastScanType() {
7756
      return this.lastScanType != null;
7757
    }
7758
 
7759
    public void setLastScanTypeIsSet(boolean value) {
7760
      if (!value) {
7761
        this.lastScanType = null;
7762
      }
7763
    }
7764
 
7765
    public void setFieldValue(_Fields field, Object value) {
7766
      switch (field) {
7767
      case LAST_SCAN_TYPE:
7768
        if (value == null) {
7769
          unsetLastScanType();
7770
        } else {
7771
          setLastScanType((ScanType)value);
7772
        }
7773
        break;
7774
 
7775
      }
7776
    }
7777
 
7778
    public Object getFieldValue(_Fields field) {
7779
      switch (field) {
7780
      case LAST_SCAN_TYPE:
7781
        return getLastScanType();
7782
 
7783
      }
7784
      throw new IllegalStateException();
7785
    }
7786
 
7787
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7788
    public boolean isSet(_Fields field) {
7789
      if (field == null) {
7790
        throw new IllegalArgumentException();
7791
      }
7792
 
7793
      switch (field) {
7794
      case LAST_SCAN_TYPE:
7795
        return isSetLastScanType();
7796
      }
7797
      throw new IllegalStateException();
7798
    }
7799
 
7800
    @Override
7801
    public boolean equals(Object that) {
7802
      if (that == null)
7803
        return false;
7804
      if (that instanceof getInventoryItemsFromLastScanType_args)
7805
        return this.equals((getInventoryItemsFromLastScanType_args)that);
7806
      return false;
7807
    }
7808
 
7809
    public boolean equals(getInventoryItemsFromLastScanType_args that) {
7810
      if (that == null)
7811
        return false;
7812
 
7813
      boolean this_present_lastScanType = true && this.isSetLastScanType();
7814
      boolean that_present_lastScanType = true && that.isSetLastScanType();
7815
      if (this_present_lastScanType || that_present_lastScanType) {
7816
        if (!(this_present_lastScanType && that_present_lastScanType))
7817
          return false;
7818
        if (!this.lastScanType.equals(that.lastScanType))
7819
          return false;
7820
      }
7821
 
7822
      return true;
7823
    }
7824
 
7825
    @Override
7826
    public int hashCode() {
7827
      return 0;
7828
    }
7829
 
7830
    public int compareTo(getInventoryItemsFromLastScanType_args other) {
7831
      if (!getClass().equals(other.getClass())) {
7832
        return getClass().getName().compareTo(other.getClass().getName());
7833
      }
7834
 
7835
      int lastComparison = 0;
7836
      getInventoryItemsFromLastScanType_args typedOther = (getInventoryItemsFromLastScanType_args)other;
7837
 
7838
      lastComparison = Boolean.valueOf(isSetLastScanType()).compareTo(typedOther.isSetLastScanType());
7839
      if (lastComparison != 0) {
7840
        return lastComparison;
7841
      }
7842
      if (isSetLastScanType()) {
7843
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastScanType, typedOther.lastScanType);
7844
        if (lastComparison != 0) {
7845
          return lastComparison;
7846
        }
7847
      }
7848
      return 0;
7849
    }
7850
 
7851
    public _Fields fieldForId(int fieldId) {
7852
      return _Fields.findByThriftId(fieldId);
7853
    }
7854
 
7855
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7856
      org.apache.thrift.protocol.TField field;
7857
      iprot.readStructBegin();
7858
      while (true)
7859
      {
7860
        field = iprot.readFieldBegin();
7861
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7862
          break;
7863
        }
7864
        switch (field.id) {
7865
          case 1: // LAST_SCAN_TYPE
7866
            if (field.type == org.apache.thrift.protocol.TType.I32) {
7867
              this.lastScanType = ScanType.findByValue(iprot.readI32());
7868
            } else { 
7869
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7870
            }
7871
            break;
7872
          default:
7873
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7874
        }
7875
        iprot.readFieldEnd();
7876
      }
7877
      iprot.readStructEnd();
7878
      validate();
7879
    }
7880
 
7881
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7882
      validate();
7883
 
7884
      oprot.writeStructBegin(STRUCT_DESC);
7885
      if (this.lastScanType != null) {
7886
        oprot.writeFieldBegin(LAST_SCAN_TYPE_FIELD_DESC);
7887
        oprot.writeI32(this.lastScanType.getValue());
7888
        oprot.writeFieldEnd();
7889
      }
7890
      oprot.writeFieldStop();
7891
      oprot.writeStructEnd();
7892
    }
7893
 
7894
    @Override
7895
    public String toString() {
7896
      StringBuilder sb = new StringBuilder("getInventoryItemsFromLastScanType_args(");
7897
      boolean first = true;
7898
 
7899
      sb.append("lastScanType:");
7900
      if (this.lastScanType == null) {
7901
        sb.append("null");
7902
      } else {
7903
        sb.append(this.lastScanType);
7904
      }
7905
      first = false;
7906
      sb.append(")");
7907
      return sb.toString();
7908
    }
7909
 
7910
    public void validate() throws org.apache.thrift.TException {
7911
      // check for required fields
7912
    }
7913
 
7914
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7915
      try {
7916
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7917
      } catch (org.apache.thrift.TException te) {
7918
        throw new java.io.IOException(te);
7919
      }
7920
    }
7921
 
7922
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7923
      try {
7924
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7925
      } catch (org.apache.thrift.TException te) {
7926
        throw new java.io.IOException(te);
7927
      }
7928
    }
7929
 
7930
  }
7931
 
7932
  public static class getInventoryItemsFromLastScanType_result implements org.apache.thrift.TBase<getInventoryItemsFromLastScanType_result, getInventoryItemsFromLastScanType_result._Fields>, java.io.Serializable, Cloneable   {
7933
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemsFromLastScanType_result");
7934
 
7935
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
7936
    private static final org.apache.thrift.protocol.TField WEX_FIELD_DESC = new org.apache.thrift.protocol.TField("wex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
7937
 
7938
    private List<InventoryItem> success; // required
7939
    private WarehouseServiceException wex; // required
7940
 
7941
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7942
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7943
      SUCCESS((short)0, "success"),
7944
      WEX((short)1, "wex");
7945
 
7946
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7947
 
7948
      static {
7949
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7950
          byName.put(field.getFieldName(), field);
7951
        }
7952
      }
7953
 
7954
      /**
7955
       * Find the _Fields constant that matches fieldId, or null if its not found.
7956
       */
7957
      public static _Fields findByThriftId(int fieldId) {
7958
        switch(fieldId) {
7959
          case 0: // SUCCESS
7960
            return SUCCESS;
7961
          case 1: // WEX
7962
            return WEX;
7963
          default:
7964
            return null;
7965
        }
7966
      }
7967
 
7968
      /**
7969
       * Find the _Fields constant that matches fieldId, throwing an exception
7970
       * if it is not found.
7971
       */
7972
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7973
        _Fields fields = findByThriftId(fieldId);
7974
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7975
        return fields;
7976
      }
7977
 
7978
      /**
7979
       * Find the _Fields constant that matches name, or null if its not found.
7980
       */
7981
      public static _Fields findByName(String name) {
7982
        return byName.get(name);
7983
      }
7984
 
7985
      private final short _thriftId;
7986
      private final String _fieldName;
7987
 
7988
      _Fields(short thriftId, String fieldName) {
7989
        _thriftId = thriftId;
7990
        _fieldName = fieldName;
7991
      }
7992
 
7993
      public short getThriftFieldId() {
7994
        return _thriftId;
7995
      }
7996
 
7997
      public String getFieldName() {
7998
        return _fieldName;
7999
      }
8000
    }
8001
 
8002
    // isset id assignments
8003
 
8004
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8005
    static {
8006
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8007
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8008
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
8009
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class))));
8010
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8011
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
8012
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8013
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemsFromLastScanType_result.class, metaDataMap);
8014
    }
8015
 
8016
    public getInventoryItemsFromLastScanType_result() {
8017
    }
8018
 
8019
    public getInventoryItemsFromLastScanType_result(
8020
      List<InventoryItem> success,
8021
      WarehouseServiceException wex)
8022
    {
8023
      this();
8024
      this.success = success;
8025
      this.wex = wex;
8026
    }
8027
 
8028
    /**
8029
     * Performs a deep copy on <i>other</i>.
8030
     */
8031
    public getInventoryItemsFromLastScanType_result(getInventoryItemsFromLastScanType_result other) {
8032
      if (other.isSetSuccess()) {
8033
        List<InventoryItem> __this__success = new ArrayList<InventoryItem>();
8034
        for (InventoryItem other_element : other.success) {
8035
          __this__success.add(new InventoryItem(other_element));
8036
        }
8037
        this.success = __this__success;
8038
      }
8039
      if (other.isSetWex()) {
8040
        this.wex = new WarehouseServiceException(other.wex);
8041
      }
8042
    }
8043
 
8044
    public getInventoryItemsFromLastScanType_result deepCopy() {
8045
      return new getInventoryItemsFromLastScanType_result(this);
8046
    }
8047
 
8048
    @Override
8049
    public void clear() {
8050
      this.success = null;
8051
      this.wex = null;
8052
    }
8053
 
8054
    public int getSuccessSize() {
8055
      return (this.success == null) ? 0 : this.success.size();
8056
    }
8057
 
8058
    public java.util.Iterator<InventoryItem> getSuccessIterator() {
8059
      return (this.success == null) ? null : this.success.iterator();
8060
    }
8061
 
8062
    public void addToSuccess(InventoryItem elem) {
8063
      if (this.success == null) {
8064
        this.success = new ArrayList<InventoryItem>();
8065
      }
8066
      this.success.add(elem);
8067
    }
8068
 
8069
    public List<InventoryItem> getSuccess() {
8070
      return this.success;
8071
    }
8072
 
8073
    public void setSuccess(List<InventoryItem> success) {
8074
      this.success = success;
8075
    }
8076
 
8077
    public void unsetSuccess() {
8078
      this.success = null;
8079
    }
8080
 
8081
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8082
    public boolean isSetSuccess() {
8083
      return this.success != null;
8084
    }
8085
 
8086
    public void setSuccessIsSet(boolean value) {
8087
      if (!value) {
8088
        this.success = null;
8089
      }
8090
    }
8091
 
8092
    public WarehouseServiceException getWex() {
8093
      return this.wex;
8094
    }
8095
 
8096
    public void setWex(WarehouseServiceException wex) {
8097
      this.wex = wex;
8098
    }
8099
 
8100
    public void unsetWex() {
8101
      this.wex = null;
8102
    }
8103
 
8104
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
8105
    public boolean isSetWex() {
8106
      return this.wex != null;
8107
    }
8108
 
8109
    public void setWexIsSet(boolean value) {
8110
      if (!value) {
8111
        this.wex = null;
8112
      }
8113
    }
8114
 
8115
    public void setFieldValue(_Fields field, Object value) {
8116
      switch (field) {
8117
      case SUCCESS:
8118
        if (value == null) {
8119
          unsetSuccess();
8120
        } else {
8121
          setSuccess((List<InventoryItem>)value);
8122
        }
8123
        break;
8124
 
8125
      case WEX:
8126
        if (value == null) {
8127
          unsetWex();
8128
        } else {
8129
          setWex((WarehouseServiceException)value);
8130
        }
8131
        break;
8132
 
8133
      }
8134
    }
8135
 
8136
    public Object getFieldValue(_Fields field) {
8137
      switch (field) {
8138
      case SUCCESS:
8139
        return getSuccess();
8140
 
8141
      case WEX:
8142
        return getWex();
8143
 
8144
      }
8145
      throw new IllegalStateException();
8146
    }
8147
 
8148
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8149
    public boolean isSet(_Fields field) {
8150
      if (field == null) {
8151
        throw new IllegalArgumentException();
8152
      }
8153
 
8154
      switch (field) {
8155
      case SUCCESS:
8156
        return isSetSuccess();
8157
      case WEX:
8158
        return isSetWex();
8159
      }
8160
      throw new IllegalStateException();
8161
    }
8162
 
8163
    @Override
8164
    public boolean equals(Object that) {
8165
      if (that == null)
8166
        return false;
8167
      if (that instanceof getInventoryItemsFromLastScanType_result)
8168
        return this.equals((getInventoryItemsFromLastScanType_result)that);
8169
      return false;
8170
    }
8171
 
8172
    public boolean equals(getInventoryItemsFromLastScanType_result that) {
8173
      if (that == null)
8174
        return false;
8175
 
8176
      boolean this_present_success = true && this.isSetSuccess();
8177
      boolean that_present_success = true && that.isSetSuccess();
8178
      if (this_present_success || that_present_success) {
8179
        if (!(this_present_success && that_present_success))
8180
          return false;
8181
        if (!this.success.equals(that.success))
8182
          return false;
8183
      }
8184
 
8185
      boolean this_present_wex = true && this.isSetWex();
8186
      boolean that_present_wex = true && that.isSetWex();
8187
      if (this_present_wex || that_present_wex) {
8188
        if (!(this_present_wex && that_present_wex))
8189
          return false;
8190
        if (!this.wex.equals(that.wex))
8191
          return false;
8192
      }
8193
 
8194
      return true;
8195
    }
8196
 
8197
    @Override
8198
    public int hashCode() {
8199
      return 0;
8200
    }
8201
 
8202
    public int compareTo(getInventoryItemsFromLastScanType_result other) {
8203
      if (!getClass().equals(other.getClass())) {
8204
        return getClass().getName().compareTo(other.getClass().getName());
8205
      }
8206
 
8207
      int lastComparison = 0;
8208
      getInventoryItemsFromLastScanType_result typedOther = (getInventoryItemsFromLastScanType_result)other;
8209
 
8210
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8211
      if (lastComparison != 0) {
8212
        return lastComparison;
8213
      }
8214
      if (isSetSuccess()) {
8215
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8216
        if (lastComparison != 0) {
8217
          return lastComparison;
8218
        }
8219
      }
8220
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
8221
      if (lastComparison != 0) {
8222
        return lastComparison;
8223
      }
8224
      if (isSetWex()) {
8225
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
8226
        if (lastComparison != 0) {
8227
          return lastComparison;
8228
        }
8229
      }
8230
      return 0;
8231
    }
8232
 
8233
    public _Fields fieldForId(int fieldId) {
8234
      return _Fields.findByThriftId(fieldId);
8235
    }
8236
 
8237
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8238
      org.apache.thrift.protocol.TField field;
8239
      iprot.readStructBegin();
8240
      while (true)
8241
      {
8242
        field = iprot.readFieldBegin();
8243
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8244
          break;
8245
        }
8246
        switch (field.id) {
8247
          case 0: // SUCCESS
8248
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8249
              {
5361 mandeep.dh 8250
                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
8251
                this.success = new ArrayList<InventoryItem>(_list8.size);
8252
                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
5185 mandeep.dh 8253
                {
5361 mandeep.dh 8254
                  InventoryItem _elem10; // required
8255
                  _elem10 = new InventoryItem();
8256
                  _elem10.read(iprot);
8257
                  this.success.add(_elem10);
5185 mandeep.dh 8258
                }
8259
                iprot.readListEnd();
8260
              }
8261
            } else { 
8262
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8263
            }
8264
            break;
8265
          case 1: // WEX
8266
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8267
              this.wex = new WarehouseServiceException();
8268
              this.wex.read(iprot);
8269
            } else { 
8270
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8271
            }
8272
            break;
8273
          default:
8274
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8275
        }
8276
        iprot.readFieldEnd();
8277
      }
8278
      iprot.readStructEnd();
8279
      validate();
8280
    }
8281
 
8282
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8283
      oprot.writeStructBegin(STRUCT_DESC);
8284
 
8285
      if (this.isSetSuccess()) {
8286
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8287
        {
8288
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
5361 mandeep.dh 8289
          for (InventoryItem _iter11 : this.success)
5185 mandeep.dh 8290
          {
5361 mandeep.dh 8291
            _iter11.write(oprot);
5185 mandeep.dh 8292
          }
8293
          oprot.writeListEnd();
8294
        }
8295
        oprot.writeFieldEnd();
8296
      } else if (this.isSetWex()) {
8297
        oprot.writeFieldBegin(WEX_FIELD_DESC);
8298
        this.wex.write(oprot);
8299
        oprot.writeFieldEnd();
8300
      }
8301
      oprot.writeFieldStop();
8302
      oprot.writeStructEnd();
8303
    }
8304
 
8305
    @Override
8306
    public String toString() {
8307
      StringBuilder sb = new StringBuilder("getInventoryItemsFromLastScanType_result(");
8308
      boolean first = true;
8309
 
8310
      sb.append("success:");
8311
      if (this.success == null) {
8312
        sb.append("null");
8313
      } else {
8314
        sb.append(this.success);
8315
      }
8316
      first = false;
8317
      if (!first) sb.append(", ");
8318
      sb.append("wex:");
8319
      if (this.wex == null) {
8320
        sb.append("null");
8321
      } else {
8322
        sb.append(this.wex);
8323
      }
8324
      first = false;
8325
      sb.append(")");
8326
      return sb.toString();
8327
    }
8328
 
8329
    public void validate() throws org.apache.thrift.TException {
8330
      // check for required fields
8331
    }
8332
 
8333
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8334
      try {
8335
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8336
      } catch (org.apache.thrift.TException te) {
8337
        throw new java.io.IOException(te);
8338
      }
8339
    }
8340
 
8341
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8342
      try {
8343
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8344
      } catch (org.apache.thrift.TException te) {
8345
        throw new java.io.IOException(te);
8346
      }
8347
    }
8348
 
8349
  }
8350
 
8351
  public static class getInventoryItemFromId_args implements org.apache.thrift.TBase<getInventoryItemFromId_args, getInventoryItemFromId_args._Fields>, java.io.Serializable, Cloneable   {
8352
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromId_args");
8353
 
8354
    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)1);
8355
 
8356
    private long inventoryItemId; // required
8357
 
8358
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8359
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8360
      INVENTORY_ITEM_ID((short)1, "inventoryItemId");
8361
 
8362
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8363
 
8364
      static {
8365
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8366
          byName.put(field.getFieldName(), field);
8367
        }
8368
      }
8369
 
8370
      /**
8371
       * Find the _Fields constant that matches fieldId, or null if its not found.
8372
       */
8373
      public static _Fields findByThriftId(int fieldId) {
8374
        switch(fieldId) {
8375
          case 1: // INVENTORY_ITEM_ID
8376
            return INVENTORY_ITEM_ID;
8377
          default:
8378
            return null;
8379
        }
8380
      }
8381
 
8382
      /**
8383
       * Find the _Fields constant that matches fieldId, throwing an exception
8384
       * if it is not found.
8385
       */
8386
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8387
        _Fields fields = findByThriftId(fieldId);
8388
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8389
        return fields;
8390
      }
8391
 
8392
      /**
8393
       * Find the _Fields constant that matches name, or null if its not found.
8394
       */
8395
      public static _Fields findByName(String name) {
8396
        return byName.get(name);
8397
      }
8398
 
8399
      private final short _thriftId;
8400
      private final String _fieldName;
8401
 
8402
      _Fields(short thriftId, String fieldName) {
8403
        _thriftId = thriftId;
8404
        _fieldName = fieldName;
8405
      }
8406
 
8407
      public short getThriftFieldId() {
8408
        return _thriftId;
8409
      }
8410
 
8411
      public String getFieldName() {
8412
        return _fieldName;
8413
      }
8414
    }
8415
 
8416
    // isset id assignments
8417
    private static final int __INVENTORYITEMID_ISSET_ID = 0;
8418
    private BitSet __isset_bit_vector = new BitSet(1);
8419
 
8420
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8421
    static {
8422
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8423
      tmpMap.put(_Fields.INVENTORY_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("inventoryItemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8424
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8425
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8426
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromId_args.class, metaDataMap);
8427
    }
8428
 
8429
    public getInventoryItemFromId_args() {
8430
    }
8431
 
8432
    public getInventoryItemFromId_args(
8433
      long inventoryItemId)
8434
    {
8435
      this();
8436
      this.inventoryItemId = inventoryItemId;
8437
      setInventoryItemIdIsSet(true);
8438
    }
8439
 
8440
    /**
8441
     * Performs a deep copy on <i>other</i>.
8442
     */
8443
    public getInventoryItemFromId_args(getInventoryItemFromId_args other) {
8444
      __isset_bit_vector.clear();
8445
      __isset_bit_vector.or(other.__isset_bit_vector);
8446
      this.inventoryItemId = other.inventoryItemId;
8447
    }
8448
 
8449
    public getInventoryItemFromId_args deepCopy() {
8450
      return new getInventoryItemFromId_args(this);
8451
    }
8452
 
8453
    @Override
8454
    public void clear() {
8455
      setInventoryItemIdIsSet(false);
8456
      this.inventoryItemId = 0;
8457
    }
8458
 
8459
    public long getInventoryItemId() {
8460
      return this.inventoryItemId;
8461
    }
8462
 
8463
    public void setInventoryItemId(long inventoryItemId) {
8464
      this.inventoryItemId = inventoryItemId;
8465
      setInventoryItemIdIsSet(true);
8466
    }
8467
 
8468
    public void unsetInventoryItemId() {
8469
      __isset_bit_vector.clear(__INVENTORYITEMID_ISSET_ID);
8470
    }
8471
 
8472
    /** Returns true if field inventoryItemId is set (has been assigned a value) and false otherwise */
8473
    public boolean isSetInventoryItemId() {
8474
      return __isset_bit_vector.get(__INVENTORYITEMID_ISSET_ID);
8475
    }
8476
 
8477
    public void setInventoryItemIdIsSet(boolean value) {
8478
      __isset_bit_vector.set(__INVENTORYITEMID_ISSET_ID, value);
8479
    }
8480
 
8481
    public void setFieldValue(_Fields field, Object value) {
8482
      switch (field) {
8483
      case INVENTORY_ITEM_ID:
8484
        if (value == null) {
8485
          unsetInventoryItemId();
8486
        } else {
8487
          setInventoryItemId((Long)value);
8488
        }
8489
        break;
8490
 
8491
      }
8492
    }
8493
 
8494
    public Object getFieldValue(_Fields field) {
8495
      switch (field) {
8496
      case INVENTORY_ITEM_ID:
8497
        return Long.valueOf(getInventoryItemId());
8498
 
8499
      }
8500
      throw new IllegalStateException();
8501
    }
8502
 
8503
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8504
    public boolean isSet(_Fields field) {
8505
      if (field == null) {
8506
        throw new IllegalArgumentException();
8507
      }
8508
 
8509
      switch (field) {
8510
      case INVENTORY_ITEM_ID:
8511
        return isSetInventoryItemId();
8512
      }
8513
      throw new IllegalStateException();
8514
    }
8515
 
8516
    @Override
8517
    public boolean equals(Object that) {
8518
      if (that == null)
8519
        return false;
8520
      if (that instanceof getInventoryItemFromId_args)
8521
        return this.equals((getInventoryItemFromId_args)that);
8522
      return false;
8523
    }
8524
 
8525
    public boolean equals(getInventoryItemFromId_args that) {
8526
      if (that == null)
8527
        return false;
8528
 
8529
      boolean this_present_inventoryItemId = true;
8530
      boolean that_present_inventoryItemId = true;
8531
      if (this_present_inventoryItemId || that_present_inventoryItemId) {
8532
        if (!(this_present_inventoryItemId && that_present_inventoryItemId))
8533
          return false;
8534
        if (this.inventoryItemId != that.inventoryItemId)
8535
          return false;
8536
      }
8537
 
8538
      return true;
8539
    }
8540
 
8541
    @Override
8542
    public int hashCode() {
8543
      return 0;
8544
    }
8545
 
8546
    public int compareTo(getInventoryItemFromId_args other) {
8547
      if (!getClass().equals(other.getClass())) {
8548
        return getClass().getName().compareTo(other.getClass().getName());
8549
      }
8550
 
8551
      int lastComparison = 0;
8552
      getInventoryItemFromId_args typedOther = (getInventoryItemFromId_args)other;
8553
 
8554
      lastComparison = Boolean.valueOf(isSetInventoryItemId()).compareTo(typedOther.isSetInventoryItemId());
8555
      if (lastComparison != 0) {
8556
        return lastComparison;
8557
      }
8558
      if (isSetInventoryItemId()) {
8559
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItemId, typedOther.inventoryItemId);
8560
        if (lastComparison != 0) {
8561
          return lastComparison;
8562
        }
8563
      }
8564
      return 0;
8565
    }
8566
 
8567
    public _Fields fieldForId(int fieldId) {
8568
      return _Fields.findByThriftId(fieldId);
8569
    }
8570
 
8571
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8572
      org.apache.thrift.protocol.TField field;
8573
      iprot.readStructBegin();
8574
      while (true)
8575
      {
8576
        field = iprot.readFieldBegin();
8577
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8578
          break;
8579
        }
8580
        switch (field.id) {
8581
          case 1: // INVENTORY_ITEM_ID
8582
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8583
              this.inventoryItemId = iprot.readI64();
8584
              setInventoryItemIdIsSet(true);
8585
            } else { 
8586
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8587
            }
8588
            break;
8589
          default:
8590
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8591
        }
8592
        iprot.readFieldEnd();
8593
      }
8594
      iprot.readStructEnd();
8595
      validate();
8596
    }
8597
 
8598
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8599
      validate();
8600
 
8601
      oprot.writeStructBegin(STRUCT_DESC);
8602
      oprot.writeFieldBegin(INVENTORY_ITEM_ID_FIELD_DESC);
8603
      oprot.writeI64(this.inventoryItemId);
8604
      oprot.writeFieldEnd();
8605
      oprot.writeFieldStop();
8606
      oprot.writeStructEnd();
8607
    }
8608
 
8609
    @Override
8610
    public String toString() {
8611
      StringBuilder sb = new StringBuilder("getInventoryItemFromId_args(");
8612
      boolean first = true;
8613
 
8614
      sb.append("inventoryItemId:");
8615
      sb.append(this.inventoryItemId);
8616
      first = false;
8617
      sb.append(")");
8618
      return sb.toString();
8619
    }
8620
 
8621
    public void validate() throws org.apache.thrift.TException {
8622
      // check for required fields
8623
    }
8624
 
8625
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8626
      try {
8627
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8628
      } catch (org.apache.thrift.TException te) {
8629
        throw new java.io.IOException(te);
8630
      }
8631
    }
8632
 
8633
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8634
      try {
5372 mandeep.dh 8635
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8636
        __isset_bit_vector = new BitSet(1);
5185 mandeep.dh 8637
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8638
      } catch (org.apache.thrift.TException te) {
8639
        throw new java.io.IOException(te);
8640
      }
8641
    }
8642
 
8643
  }
8644
 
8645
  public static class getInventoryItemFromId_result implements org.apache.thrift.TBase<getInventoryItemFromId_result, getInventoryItemFromId_result._Fields>, java.io.Serializable, Cloneable   {
8646
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromId_result");
8647
 
8648
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
8649
    private static final org.apache.thrift.protocol.TField WEX_FIELD_DESC = new org.apache.thrift.protocol.TField("wex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
8650
 
8651
    private InventoryItem success; // required
8652
    private WarehouseServiceException wex; // required
8653
 
8654
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8655
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8656
      SUCCESS((short)0, "success"),
8657
      WEX((short)1, "wex");
8658
 
8659
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8660
 
8661
      static {
8662
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8663
          byName.put(field.getFieldName(), field);
8664
        }
8665
      }
8666
 
8667
      /**
8668
       * Find the _Fields constant that matches fieldId, or null if its not found.
8669
       */
8670
      public static _Fields findByThriftId(int fieldId) {
8671
        switch(fieldId) {
8672
          case 0: // SUCCESS
8673
            return SUCCESS;
8674
          case 1: // WEX
8675
            return WEX;
8676
          default:
8677
            return null;
8678
        }
8679
      }
8680
 
8681
      /**
8682
       * Find the _Fields constant that matches fieldId, throwing an exception
8683
       * if it is not found.
8684
       */
8685
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8686
        _Fields fields = findByThriftId(fieldId);
8687
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8688
        return fields;
8689
      }
8690
 
8691
      /**
8692
       * Find the _Fields constant that matches name, or null if its not found.
8693
       */
8694
      public static _Fields findByName(String name) {
8695
        return byName.get(name);
8696
      }
8697
 
8698
      private final short _thriftId;
8699
      private final String _fieldName;
8700
 
8701
      _Fields(short thriftId, String fieldName) {
8702
        _thriftId = thriftId;
8703
        _fieldName = fieldName;
8704
      }
8705
 
8706
      public short getThriftFieldId() {
8707
        return _thriftId;
8708
      }
8709
 
8710
      public String getFieldName() {
8711
        return _fieldName;
8712
      }
8713
    }
8714
 
8715
    // isset id assignments
8716
 
8717
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8718
    static {
8719
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8720
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8721
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
8722
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8723
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
8724
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8725
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromId_result.class, metaDataMap);
8726
    }
8727
 
8728
    public getInventoryItemFromId_result() {
8729
    }
8730
 
8731
    public getInventoryItemFromId_result(
8732
      InventoryItem success,
8733
      WarehouseServiceException wex)
8734
    {
8735
      this();
8736
      this.success = success;
8737
      this.wex = wex;
8738
    }
8739
 
8740
    /**
8741
     * Performs a deep copy on <i>other</i>.
8742
     */
8743
    public getInventoryItemFromId_result(getInventoryItemFromId_result other) {
8744
      if (other.isSetSuccess()) {
8745
        this.success = new InventoryItem(other.success);
8746
      }
8747
      if (other.isSetWex()) {
8748
        this.wex = new WarehouseServiceException(other.wex);
8749
      }
8750
    }
8751
 
8752
    public getInventoryItemFromId_result deepCopy() {
8753
      return new getInventoryItemFromId_result(this);
8754
    }
8755
 
8756
    @Override
8757
    public void clear() {
8758
      this.success = null;
8759
      this.wex = null;
8760
    }
8761
 
8762
    public InventoryItem getSuccess() {
8763
      return this.success;
8764
    }
8765
 
8766
    public void setSuccess(InventoryItem success) {
8767
      this.success = success;
8768
    }
8769
 
8770
    public void unsetSuccess() {
8771
      this.success = null;
8772
    }
8773
 
8774
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8775
    public boolean isSetSuccess() {
8776
      return this.success != null;
8777
    }
8778
 
8779
    public void setSuccessIsSet(boolean value) {
8780
      if (!value) {
8781
        this.success = null;
8782
      }
8783
    }
8784
 
8785
    public WarehouseServiceException getWex() {
8786
      return this.wex;
8787
    }
8788
 
8789
    public void setWex(WarehouseServiceException wex) {
8790
      this.wex = wex;
8791
    }
8792
 
8793
    public void unsetWex() {
8794
      this.wex = null;
8795
    }
8796
 
8797
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
8798
    public boolean isSetWex() {
8799
      return this.wex != null;
8800
    }
8801
 
8802
    public void setWexIsSet(boolean value) {
8803
      if (!value) {
8804
        this.wex = null;
8805
      }
8806
    }
8807
 
8808
    public void setFieldValue(_Fields field, Object value) {
8809
      switch (field) {
8810
      case SUCCESS:
8811
        if (value == null) {
8812
          unsetSuccess();
8813
        } else {
8814
          setSuccess((InventoryItem)value);
8815
        }
8816
        break;
8817
 
8818
      case WEX:
8819
        if (value == null) {
8820
          unsetWex();
8821
        } else {
8822
          setWex((WarehouseServiceException)value);
8823
        }
8824
        break;
8825
 
8826
      }
8827
    }
8828
 
8829
    public Object getFieldValue(_Fields field) {
8830
      switch (field) {
8831
      case SUCCESS:
8832
        return getSuccess();
8833
 
8834
      case WEX:
8835
        return getWex();
8836
 
8837
      }
8838
      throw new IllegalStateException();
8839
    }
8840
 
8841
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8842
    public boolean isSet(_Fields field) {
8843
      if (field == null) {
8844
        throw new IllegalArgumentException();
8845
      }
8846
 
8847
      switch (field) {
8848
      case SUCCESS:
8849
        return isSetSuccess();
8850
      case WEX:
8851
        return isSetWex();
8852
      }
8853
      throw new IllegalStateException();
8854
    }
8855
 
8856
    @Override
8857
    public boolean equals(Object that) {
8858
      if (that == null)
8859
        return false;
8860
      if (that instanceof getInventoryItemFromId_result)
8861
        return this.equals((getInventoryItemFromId_result)that);
8862
      return false;
8863
    }
8864
 
8865
    public boolean equals(getInventoryItemFromId_result that) {
8866
      if (that == null)
8867
        return false;
8868
 
8869
      boolean this_present_success = true && this.isSetSuccess();
8870
      boolean that_present_success = true && that.isSetSuccess();
8871
      if (this_present_success || that_present_success) {
8872
        if (!(this_present_success && that_present_success))
8873
          return false;
8874
        if (!this.success.equals(that.success))
8875
          return false;
8876
      }
8877
 
8878
      boolean this_present_wex = true && this.isSetWex();
8879
      boolean that_present_wex = true && that.isSetWex();
8880
      if (this_present_wex || that_present_wex) {
8881
        if (!(this_present_wex && that_present_wex))
8882
          return false;
8883
        if (!this.wex.equals(that.wex))
8884
          return false;
8885
      }
8886
 
8887
      return true;
8888
    }
8889
 
8890
    @Override
8891
    public int hashCode() {
8892
      return 0;
8893
    }
8894
 
8895
    public int compareTo(getInventoryItemFromId_result other) {
8896
      if (!getClass().equals(other.getClass())) {
8897
        return getClass().getName().compareTo(other.getClass().getName());
8898
      }
8899
 
8900
      int lastComparison = 0;
8901
      getInventoryItemFromId_result typedOther = (getInventoryItemFromId_result)other;
8902
 
8903
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8904
      if (lastComparison != 0) {
8905
        return lastComparison;
8906
      }
8907
      if (isSetSuccess()) {
8908
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8909
        if (lastComparison != 0) {
8910
          return lastComparison;
8911
        }
8912
      }
8913
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
8914
      if (lastComparison != 0) {
8915
        return lastComparison;
8916
      }
8917
      if (isSetWex()) {
8918
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
8919
        if (lastComparison != 0) {
8920
          return lastComparison;
8921
        }
8922
      }
8923
      return 0;
8924
    }
8925
 
8926
    public _Fields fieldForId(int fieldId) {
8927
      return _Fields.findByThriftId(fieldId);
8928
    }
8929
 
8930
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8931
      org.apache.thrift.protocol.TField field;
8932
      iprot.readStructBegin();
8933
      while (true)
8934
      {
8935
        field = iprot.readFieldBegin();
8936
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8937
          break;
8938
        }
8939
        switch (field.id) {
8940
          case 0: // SUCCESS
8941
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8942
              this.success = new InventoryItem();
8943
              this.success.read(iprot);
8944
            } else { 
8945
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8946
            }
8947
            break;
8948
          case 1: // WEX
8949
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8950
              this.wex = new WarehouseServiceException();
8951
              this.wex.read(iprot);
8952
            } else { 
8953
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8954
            }
8955
            break;
8956
          default:
8957
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8958
        }
8959
        iprot.readFieldEnd();
8960
      }
8961
      iprot.readStructEnd();
8962
      validate();
8963
    }
8964
 
8965
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8966
      oprot.writeStructBegin(STRUCT_DESC);
8967
 
8968
      if (this.isSetSuccess()) {
8969
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8970
        this.success.write(oprot);
8971
        oprot.writeFieldEnd();
8972
      } else if (this.isSetWex()) {
8973
        oprot.writeFieldBegin(WEX_FIELD_DESC);
8974
        this.wex.write(oprot);
8975
        oprot.writeFieldEnd();
8976
      }
8977
      oprot.writeFieldStop();
8978
      oprot.writeStructEnd();
8979
    }
8980
 
8981
    @Override
8982
    public String toString() {
8983
      StringBuilder sb = new StringBuilder("getInventoryItemFromId_result(");
8984
      boolean first = true;
8985
 
8986
      sb.append("success:");
8987
      if (this.success == null) {
8988
        sb.append("null");
8989
      } else {
8990
        sb.append(this.success);
8991
      }
8992
      first = false;
8993
      if (!first) sb.append(", ");
8994
      sb.append("wex:");
8995
      if (this.wex == null) {
8996
        sb.append("null");
8997
      } else {
8998
        sb.append(this.wex);
8999
      }
9000
      first = false;
9001
      sb.append(")");
9002
      return sb.toString();
9003
    }
9004
 
9005
    public void validate() throws org.apache.thrift.TException {
9006
      // check for required fields
9007
    }
9008
 
9009
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9010
      try {
9011
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9012
      } catch (org.apache.thrift.TException te) {
9013
        throw new java.io.IOException(te);
9014
      }
9015
    }
9016
 
9017
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9018
      try {
9019
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9020
      } catch (org.apache.thrift.TException te) {
9021
        throw new java.io.IOException(te);
9022
      }
9023
    }
9024
 
9025
  }
9026
 
5372 mandeep.dh 9027
  public static class getPurchaseScans_args implements org.apache.thrift.TBase<getPurchaseScans_args, getPurchaseScans_args._Fields>, java.io.Serializable, Cloneable   {
9028
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseScans_args");
9029
 
9030
    private static final org.apache.thrift.protocol.TField START_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("startDate", org.apache.thrift.protocol.TType.I64, (short)1);
9031
    private static final org.apache.thrift.protocol.TField END_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("endDate", org.apache.thrift.protocol.TType.I64, (short)2);
9032
 
9033
    private long startDate; // required
9034
    private long endDate; // required
9035
 
9036
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9037
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9038
      START_DATE((short)1, "startDate"),
9039
      END_DATE((short)2, "endDate");
9040
 
9041
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9042
 
9043
      static {
9044
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9045
          byName.put(field.getFieldName(), field);
9046
        }
9047
      }
9048
 
9049
      /**
9050
       * Find the _Fields constant that matches fieldId, or null if its not found.
9051
       */
9052
      public static _Fields findByThriftId(int fieldId) {
9053
        switch(fieldId) {
9054
          case 1: // START_DATE
9055
            return START_DATE;
9056
          case 2: // END_DATE
9057
            return END_DATE;
9058
          default:
9059
            return null;
9060
        }
9061
      }
9062
 
9063
      /**
9064
       * Find the _Fields constant that matches fieldId, throwing an exception
9065
       * if it is not found.
9066
       */
9067
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9068
        _Fields fields = findByThriftId(fieldId);
9069
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9070
        return fields;
9071
      }
9072
 
9073
      /**
9074
       * Find the _Fields constant that matches name, or null if its not found.
9075
       */
9076
      public static _Fields findByName(String name) {
9077
        return byName.get(name);
9078
      }
9079
 
9080
      private final short _thriftId;
9081
      private final String _fieldName;
9082
 
9083
      _Fields(short thriftId, String fieldName) {
9084
        _thriftId = thriftId;
9085
        _fieldName = fieldName;
9086
      }
9087
 
9088
      public short getThriftFieldId() {
9089
        return _thriftId;
9090
      }
9091
 
9092
      public String getFieldName() {
9093
        return _fieldName;
9094
      }
9095
    }
9096
 
9097
    // isset id assignments
9098
    private static final int __STARTDATE_ISSET_ID = 0;
9099
    private static final int __ENDDATE_ISSET_ID = 1;
9100
    private BitSet __isset_bit_vector = new BitSet(2);
9101
 
9102
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9103
    static {
9104
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9105
      tmpMap.put(_Fields.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9106
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9107
      tmpMap.put(_Fields.END_DATE, new org.apache.thrift.meta_data.FieldMetaData("endDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9108
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9109
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9110
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseScans_args.class, metaDataMap);
9111
    }
9112
 
9113
    public getPurchaseScans_args() {
9114
    }
9115
 
9116
    public getPurchaseScans_args(
9117
      long startDate,
9118
      long endDate)
9119
    {
9120
      this();
9121
      this.startDate = startDate;
9122
      setStartDateIsSet(true);
9123
      this.endDate = endDate;
9124
      setEndDateIsSet(true);
9125
    }
9126
 
9127
    /**
9128
     * Performs a deep copy on <i>other</i>.
9129
     */
9130
    public getPurchaseScans_args(getPurchaseScans_args other) {
9131
      __isset_bit_vector.clear();
9132
      __isset_bit_vector.or(other.__isset_bit_vector);
9133
      this.startDate = other.startDate;
9134
      this.endDate = other.endDate;
9135
    }
9136
 
9137
    public getPurchaseScans_args deepCopy() {
9138
      return new getPurchaseScans_args(this);
9139
    }
9140
 
9141
    @Override
9142
    public void clear() {
9143
      setStartDateIsSet(false);
9144
      this.startDate = 0;
9145
      setEndDateIsSet(false);
9146
      this.endDate = 0;
9147
    }
9148
 
9149
    public long getStartDate() {
9150
      return this.startDate;
9151
    }
9152
 
9153
    public void setStartDate(long startDate) {
9154
      this.startDate = startDate;
9155
      setStartDateIsSet(true);
9156
    }
9157
 
9158
    public void unsetStartDate() {
9159
      __isset_bit_vector.clear(__STARTDATE_ISSET_ID);
9160
    }
9161
 
9162
    /** Returns true if field startDate is set (has been assigned a value) and false otherwise */
9163
    public boolean isSetStartDate() {
9164
      return __isset_bit_vector.get(__STARTDATE_ISSET_ID);
9165
    }
9166
 
9167
    public void setStartDateIsSet(boolean value) {
9168
      __isset_bit_vector.set(__STARTDATE_ISSET_ID, value);
9169
    }
9170
 
9171
    public long getEndDate() {
9172
      return this.endDate;
9173
    }
9174
 
9175
    public void setEndDate(long endDate) {
9176
      this.endDate = endDate;
9177
      setEndDateIsSet(true);
9178
    }
9179
 
9180
    public void unsetEndDate() {
9181
      __isset_bit_vector.clear(__ENDDATE_ISSET_ID);
9182
    }
9183
 
9184
    /** Returns true if field endDate is set (has been assigned a value) and false otherwise */
9185
    public boolean isSetEndDate() {
9186
      return __isset_bit_vector.get(__ENDDATE_ISSET_ID);
9187
    }
9188
 
9189
    public void setEndDateIsSet(boolean value) {
9190
      __isset_bit_vector.set(__ENDDATE_ISSET_ID, value);
9191
    }
9192
 
9193
    public void setFieldValue(_Fields field, Object value) {
9194
      switch (field) {
9195
      case START_DATE:
9196
        if (value == null) {
9197
          unsetStartDate();
9198
        } else {
9199
          setStartDate((Long)value);
9200
        }
9201
        break;
9202
 
9203
      case END_DATE:
9204
        if (value == null) {
9205
          unsetEndDate();
9206
        } else {
9207
          setEndDate((Long)value);
9208
        }
9209
        break;
9210
 
9211
      }
9212
    }
9213
 
9214
    public Object getFieldValue(_Fields field) {
9215
      switch (field) {
9216
      case START_DATE:
9217
        return Long.valueOf(getStartDate());
9218
 
9219
      case END_DATE:
9220
        return Long.valueOf(getEndDate());
9221
 
9222
      }
9223
      throw new IllegalStateException();
9224
    }
9225
 
9226
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9227
    public boolean isSet(_Fields field) {
9228
      if (field == null) {
9229
        throw new IllegalArgumentException();
9230
      }
9231
 
9232
      switch (field) {
9233
      case START_DATE:
9234
        return isSetStartDate();
9235
      case END_DATE:
9236
        return isSetEndDate();
9237
      }
9238
      throw new IllegalStateException();
9239
    }
9240
 
9241
    @Override
9242
    public boolean equals(Object that) {
9243
      if (that == null)
9244
        return false;
9245
      if (that instanceof getPurchaseScans_args)
9246
        return this.equals((getPurchaseScans_args)that);
9247
      return false;
9248
    }
9249
 
9250
    public boolean equals(getPurchaseScans_args that) {
9251
      if (that == null)
9252
        return false;
9253
 
9254
      boolean this_present_startDate = true;
9255
      boolean that_present_startDate = true;
9256
      if (this_present_startDate || that_present_startDate) {
9257
        if (!(this_present_startDate && that_present_startDate))
9258
          return false;
9259
        if (this.startDate != that.startDate)
9260
          return false;
9261
      }
9262
 
9263
      boolean this_present_endDate = true;
9264
      boolean that_present_endDate = true;
9265
      if (this_present_endDate || that_present_endDate) {
9266
        if (!(this_present_endDate && that_present_endDate))
9267
          return false;
9268
        if (this.endDate != that.endDate)
9269
          return false;
9270
      }
9271
 
9272
      return true;
9273
    }
9274
 
9275
    @Override
9276
    public int hashCode() {
9277
      return 0;
9278
    }
9279
 
9280
    public int compareTo(getPurchaseScans_args other) {
9281
      if (!getClass().equals(other.getClass())) {
9282
        return getClass().getName().compareTo(other.getClass().getName());
9283
      }
9284
 
9285
      int lastComparison = 0;
9286
      getPurchaseScans_args typedOther = (getPurchaseScans_args)other;
9287
 
9288
      lastComparison = Boolean.valueOf(isSetStartDate()).compareTo(typedOther.isSetStartDate());
9289
      if (lastComparison != 0) {
9290
        return lastComparison;
9291
      }
9292
      if (isSetStartDate()) {
9293
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startDate, typedOther.startDate);
9294
        if (lastComparison != 0) {
9295
          return lastComparison;
9296
        }
9297
      }
9298
      lastComparison = Boolean.valueOf(isSetEndDate()).compareTo(typedOther.isSetEndDate());
9299
      if (lastComparison != 0) {
9300
        return lastComparison;
9301
      }
9302
      if (isSetEndDate()) {
9303
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endDate, typedOther.endDate);
9304
        if (lastComparison != 0) {
9305
          return lastComparison;
9306
        }
9307
      }
9308
      return 0;
9309
    }
9310
 
9311
    public _Fields fieldForId(int fieldId) {
9312
      return _Fields.findByThriftId(fieldId);
9313
    }
9314
 
9315
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9316
      org.apache.thrift.protocol.TField field;
9317
      iprot.readStructBegin();
9318
      while (true)
9319
      {
9320
        field = iprot.readFieldBegin();
9321
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9322
          break;
9323
        }
9324
        switch (field.id) {
9325
          case 1: // START_DATE
9326
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9327
              this.startDate = iprot.readI64();
9328
              setStartDateIsSet(true);
9329
            } else { 
9330
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9331
            }
9332
            break;
9333
          case 2: // END_DATE
9334
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9335
              this.endDate = iprot.readI64();
9336
              setEndDateIsSet(true);
9337
            } else { 
9338
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9339
            }
9340
            break;
9341
          default:
9342
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9343
        }
9344
        iprot.readFieldEnd();
9345
      }
9346
      iprot.readStructEnd();
9347
      validate();
9348
    }
9349
 
9350
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9351
      validate();
9352
 
9353
      oprot.writeStructBegin(STRUCT_DESC);
9354
      oprot.writeFieldBegin(START_DATE_FIELD_DESC);
9355
      oprot.writeI64(this.startDate);
9356
      oprot.writeFieldEnd();
9357
      oprot.writeFieldBegin(END_DATE_FIELD_DESC);
9358
      oprot.writeI64(this.endDate);
9359
      oprot.writeFieldEnd();
9360
      oprot.writeFieldStop();
9361
      oprot.writeStructEnd();
9362
    }
9363
 
9364
    @Override
9365
    public String toString() {
9366
      StringBuilder sb = new StringBuilder("getPurchaseScans_args(");
9367
      boolean first = true;
9368
 
9369
      sb.append("startDate:");
9370
      sb.append(this.startDate);
9371
      first = false;
9372
      if (!first) sb.append(", ");
9373
      sb.append("endDate:");
9374
      sb.append(this.endDate);
9375
      first = false;
9376
      sb.append(")");
9377
      return sb.toString();
9378
    }
9379
 
9380
    public void validate() throws org.apache.thrift.TException {
9381
      // check for required fields
9382
    }
9383
 
9384
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9385
      try {
9386
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9387
      } catch (org.apache.thrift.TException te) {
9388
        throw new java.io.IOException(te);
9389
      }
9390
    }
9391
 
9392
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9393
      try {
9394
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
9395
        __isset_bit_vector = new BitSet(1);
9396
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9397
      } catch (org.apache.thrift.TException te) {
9398
        throw new java.io.IOException(te);
9399
      }
9400
    }
9401
 
9402
  }
9403
 
9404
  public static class getPurchaseScans_result implements org.apache.thrift.TBase<getPurchaseScans_result, getPurchaseScans_result._Fields>, java.io.Serializable, Cloneable   {
9405
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseScans_result");
9406
 
9407
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
9408
 
9409
    private List<DetailedPurchaseScan> success; // required
9410
 
9411
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9412
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9413
      SUCCESS((short)0, "success");
9414
 
9415
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9416
 
9417
      static {
9418
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9419
          byName.put(field.getFieldName(), field);
9420
        }
9421
      }
9422
 
9423
      /**
9424
       * Find the _Fields constant that matches fieldId, or null if its not found.
9425
       */
9426
      public static _Fields findByThriftId(int fieldId) {
9427
        switch(fieldId) {
9428
          case 0: // SUCCESS
9429
            return SUCCESS;
9430
          default:
9431
            return null;
9432
        }
9433
      }
9434
 
9435
      /**
9436
       * Find the _Fields constant that matches fieldId, throwing an exception
9437
       * if it is not found.
9438
       */
9439
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9440
        _Fields fields = findByThriftId(fieldId);
9441
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9442
        return fields;
9443
      }
9444
 
9445
      /**
9446
       * Find the _Fields constant that matches name, or null if its not found.
9447
       */
9448
      public static _Fields findByName(String name) {
9449
        return byName.get(name);
9450
      }
9451
 
9452
      private final short _thriftId;
9453
      private final String _fieldName;
9454
 
9455
      _Fields(short thriftId, String fieldName) {
9456
        _thriftId = thriftId;
9457
        _fieldName = fieldName;
9458
      }
9459
 
9460
      public short getThriftFieldId() {
9461
        return _thriftId;
9462
      }
9463
 
9464
      public String getFieldName() {
9465
        return _fieldName;
9466
      }
9467
    }
9468
 
9469
    // isset id assignments
9470
 
9471
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9472
    static {
9473
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9474
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9475
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
9476
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DetailedPurchaseScan.class))));
9477
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9478
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseScans_result.class, metaDataMap);
9479
    }
9480
 
9481
    public getPurchaseScans_result() {
9482
    }
9483
 
9484
    public getPurchaseScans_result(
9485
      List<DetailedPurchaseScan> success)
9486
    {
9487
      this();
9488
      this.success = success;
9489
    }
9490
 
9491
    /**
9492
     * Performs a deep copy on <i>other</i>.
9493
     */
9494
    public getPurchaseScans_result(getPurchaseScans_result other) {
9495
      if (other.isSetSuccess()) {
9496
        List<DetailedPurchaseScan> __this__success = new ArrayList<DetailedPurchaseScan>();
9497
        for (DetailedPurchaseScan other_element : other.success) {
9498
          __this__success.add(new DetailedPurchaseScan(other_element));
9499
        }
9500
        this.success = __this__success;
9501
      }
9502
    }
9503
 
9504
    public getPurchaseScans_result deepCopy() {
9505
      return new getPurchaseScans_result(this);
9506
    }
9507
 
9508
    @Override
9509
    public void clear() {
9510
      this.success = null;
9511
    }
9512
 
9513
    public int getSuccessSize() {
9514
      return (this.success == null) ? 0 : this.success.size();
9515
    }
9516
 
9517
    public java.util.Iterator<DetailedPurchaseScan> getSuccessIterator() {
9518
      return (this.success == null) ? null : this.success.iterator();
9519
    }
9520
 
9521
    public void addToSuccess(DetailedPurchaseScan elem) {
9522
      if (this.success == null) {
9523
        this.success = new ArrayList<DetailedPurchaseScan>();
9524
      }
9525
      this.success.add(elem);
9526
    }
9527
 
9528
    public List<DetailedPurchaseScan> getSuccess() {
9529
      return this.success;
9530
    }
9531
 
9532
    public void setSuccess(List<DetailedPurchaseScan> success) {
9533
      this.success = success;
9534
    }
9535
 
9536
    public void unsetSuccess() {
9537
      this.success = null;
9538
    }
9539
 
9540
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9541
    public boolean isSetSuccess() {
9542
      return this.success != null;
9543
    }
9544
 
9545
    public void setSuccessIsSet(boolean value) {
9546
      if (!value) {
9547
        this.success = null;
9548
      }
9549
    }
9550
 
9551
    public void setFieldValue(_Fields field, Object value) {
9552
      switch (field) {
9553
      case SUCCESS:
9554
        if (value == null) {
9555
          unsetSuccess();
9556
        } else {
9557
          setSuccess((List<DetailedPurchaseScan>)value);
9558
        }
9559
        break;
9560
 
9561
      }
9562
    }
9563
 
9564
    public Object getFieldValue(_Fields field) {
9565
      switch (field) {
9566
      case SUCCESS:
9567
        return getSuccess();
9568
 
9569
      }
9570
      throw new IllegalStateException();
9571
    }
9572
 
9573
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9574
    public boolean isSet(_Fields field) {
9575
      if (field == null) {
9576
        throw new IllegalArgumentException();
9577
      }
9578
 
9579
      switch (field) {
9580
      case SUCCESS:
9581
        return isSetSuccess();
9582
      }
9583
      throw new IllegalStateException();
9584
    }
9585
 
9586
    @Override
9587
    public boolean equals(Object that) {
9588
      if (that == null)
9589
        return false;
9590
      if (that instanceof getPurchaseScans_result)
9591
        return this.equals((getPurchaseScans_result)that);
9592
      return false;
9593
    }
9594
 
9595
    public boolean equals(getPurchaseScans_result that) {
9596
      if (that == null)
9597
        return false;
9598
 
9599
      boolean this_present_success = true && this.isSetSuccess();
9600
      boolean that_present_success = true && that.isSetSuccess();
9601
      if (this_present_success || that_present_success) {
9602
        if (!(this_present_success && that_present_success))
9603
          return false;
9604
        if (!this.success.equals(that.success))
9605
          return false;
9606
      }
9607
 
9608
      return true;
9609
    }
9610
 
9611
    @Override
9612
    public int hashCode() {
9613
      return 0;
9614
    }
9615
 
9616
    public int compareTo(getPurchaseScans_result other) {
9617
      if (!getClass().equals(other.getClass())) {
9618
        return getClass().getName().compareTo(other.getClass().getName());
9619
      }
9620
 
9621
      int lastComparison = 0;
9622
      getPurchaseScans_result typedOther = (getPurchaseScans_result)other;
9623
 
9624
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9625
      if (lastComparison != 0) {
9626
        return lastComparison;
9627
      }
9628
      if (isSetSuccess()) {
9629
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9630
        if (lastComparison != 0) {
9631
          return lastComparison;
9632
        }
9633
      }
9634
      return 0;
9635
    }
9636
 
9637
    public _Fields fieldForId(int fieldId) {
9638
      return _Fields.findByThriftId(fieldId);
9639
    }
9640
 
9641
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9642
      org.apache.thrift.protocol.TField field;
9643
      iprot.readStructBegin();
9644
      while (true)
9645
      {
9646
        field = iprot.readFieldBegin();
9647
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9648
          break;
9649
        }
9650
        switch (field.id) {
9651
          case 0: // SUCCESS
9652
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
9653
              {
9654
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
9655
                this.success = new ArrayList<DetailedPurchaseScan>(_list12.size);
9656
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
9657
                {
9658
                  DetailedPurchaseScan _elem14; // required
9659
                  _elem14 = new DetailedPurchaseScan();
9660
                  _elem14.read(iprot);
9661
                  this.success.add(_elem14);
9662
                }
9663
                iprot.readListEnd();
9664
              }
9665
            } else { 
9666
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9667
            }
9668
            break;
9669
          default:
9670
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9671
        }
9672
        iprot.readFieldEnd();
9673
      }
9674
      iprot.readStructEnd();
9675
      validate();
9676
    }
9677
 
9678
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9679
      oprot.writeStructBegin(STRUCT_DESC);
9680
 
9681
      if (this.isSetSuccess()) {
9682
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9683
        {
9684
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
9685
          for (DetailedPurchaseScan _iter15 : this.success)
9686
          {
9687
            _iter15.write(oprot);
9688
          }
9689
          oprot.writeListEnd();
9690
        }
9691
        oprot.writeFieldEnd();
9692
      }
9693
      oprot.writeFieldStop();
9694
      oprot.writeStructEnd();
9695
    }
9696
 
9697
    @Override
9698
    public String toString() {
9699
      StringBuilder sb = new StringBuilder("getPurchaseScans_result(");
9700
      boolean first = true;
9701
 
9702
      sb.append("success:");
9703
      if (this.success == null) {
9704
        sb.append("null");
9705
      } else {
9706
        sb.append(this.success);
9707
      }
9708
      first = false;
9709
      sb.append(")");
9710
      return sb.toString();
9711
    }
9712
 
9713
    public void validate() throws org.apache.thrift.TException {
9714
      // check for required fields
9715
    }
9716
 
9717
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9718
      try {
9719
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9720
      } catch (org.apache.thrift.TException te) {
9721
        throw new java.io.IOException(te);
9722
      }
9723
    }
9724
 
9725
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9726
      try {
9727
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9728
      } catch (org.apache.thrift.TException te) {
9729
        throw new java.io.IOException(te);
9730
      }
9731
    }
9732
 
9733
  }
9734
 
5496 mandeep.dh 9735
  public static class fetchScansPerInvoiceNumber_args implements org.apache.thrift.TBase<fetchScansPerInvoiceNumber_args, fetchScansPerInvoiceNumber_args._Fields>, java.io.Serializable, Cloneable   {
9736
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchScansPerInvoiceNumber_args");
9737
 
9738
    private static final org.apache.thrift.protocol.TField DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("date", org.apache.thrift.protocol.TType.I64, (short)1);
9739
 
9740
    private long date; // required
9741
 
9742
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9743
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9744
      DATE((short)1, "date");
9745
 
9746
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9747
 
9748
      static {
9749
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9750
          byName.put(field.getFieldName(), field);
9751
        }
9752
      }
9753
 
9754
      /**
9755
       * Find the _Fields constant that matches fieldId, or null if its not found.
9756
       */
9757
      public static _Fields findByThriftId(int fieldId) {
9758
        switch(fieldId) {
9759
          case 1: // DATE
9760
            return DATE;
9761
          default:
9762
            return null;
9763
        }
9764
      }
9765
 
9766
      /**
9767
       * Find the _Fields constant that matches fieldId, throwing an exception
9768
       * if it is not found.
9769
       */
9770
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9771
        _Fields fields = findByThriftId(fieldId);
9772
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9773
        return fields;
9774
      }
9775
 
9776
      /**
9777
       * Find the _Fields constant that matches name, or null if its not found.
9778
       */
9779
      public static _Fields findByName(String name) {
9780
        return byName.get(name);
9781
      }
9782
 
9783
      private final short _thriftId;
9784
      private final String _fieldName;
9785
 
9786
      _Fields(short thriftId, String fieldName) {
9787
        _thriftId = thriftId;
9788
        _fieldName = fieldName;
9789
      }
9790
 
9791
      public short getThriftFieldId() {
9792
        return _thriftId;
9793
      }
9794
 
9795
      public String getFieldName() {
9796
        return _fieldName;
9797
      }
9798
    }
9799
 
9800
    // isset id assignments
9801
    private static final int __DATE_ISSET_ID = 0;
9802
    private BitSet __isset_bit_vector = new BitSet(1);
9803
 
9804
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9805
    static {
9806
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9807
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9808
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9809
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9810
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchScansPerInvoiceNumber_args.class, metaDataMap);
9811
    }
9812
 
9813
    public fetchScansPerInvoiceNumber_args() {
9814
    }
9815
 
9816
    public fetchScansPerInvoiceNumber_args(
9817
      long date)
9818
    {
9819
      this();
9820
      this.date = date;
9821
      setDateIsSet(true);
9822
    }
9823
 
9824
    /**
9825
     * Performs a deep copy on <i>other</i>.
9826
     */
9827
    public fetchScansPerInvoiceNumber_args(fetchScansPerInvoiceNumber_args other) {
9828
      __isset_bit_vector.clear();
9829
      __isset_bit_vector.or(other.__isset_bit_vector);
9830
      this.date = other.date;
9831
    }
9832
 
9833
    public fetchScansPerInvoiceNumber_args deepCopy() {
9834
      return new fetchScansPerInvoiceNumber_args(this);
9835
    }
9836
 
9837
    @Override
9838
    public void clear() {
9839
      setDateIsSet(false);
9840
      this.date = 0;
9841
    }
9842
 
9843
    public long getDate() {
9844
      return this.date;
9845
    }
9846
 
9847
    public void setDate(long date) {
9848
      this.date = date;
9849
      setDateIsSet(true);
9850
    }
9851
 
9852
    public void unsetDate() {
9853
      __isset_bit_vector.clear(__DATE_ISSET_ID);
9854
    }
9855
 
9856
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
9857
    public boolean isSetDate() {
9858
      return __isset_bit_vector.get(__DATE_ISSET_ID);
9859
    }
9860
 
9861
    public void setDateIsSet(boolean value) {
9862
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
9863
    }
9864
 
9865
    public void setFieldValue(_Fields field, Object value) {
9866
      switch (field) {
9867
      case DATE:
9868
        if (value == null) {
9869
          unsetDate();
9870
        } else {
9871
          setDate((Long)value);
9872
        }
9873
        break;
9874
 
9875
      }
9876
    }
9877
 
9878
    public Object getFieldValue(_Fields field) {
9879
      switch (field) {
9880
      case DATE:
9881
        return Long.valueOf(getDate());
9882
 
9883
      }
9884
      throw new IllegalStateException();
9885
    }
9886
 
9887
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9888
    public boolean isSet(_Fields field) {
9889
      if (field == null) {
9890
        throw new IllegalArgumentException();
9891
      }
9892
 
9893
      switch (field) {
9894
      case DATE:
9895
        return isSetDate();
9896
      }
9897
      throw new IllegalStateException();
9898
    }
9899
 
9900
    @Override
9901
    public boolean equals(Object that) {
9902
      if (that == null)
9903
        return false;
9904
      if (that instanceof fetchScansPerInvoiceNumber_args)
9905
        return this.equals((fetchScansPerInvoiceNumber_args)that);
9906
      return false;
9907
    }
9908
 
9909
    public boolean equals(fetchScansPerInvoiceNumber_args that) {
9910
      if (that == null)
9911
        return false;
9912
 
9913
      boolean this_present_date = true;
9914
      boolean that_present_date = true;
9915
      if (this_present_date || that_present_date) {
9916
        if (!(this_present_date && that_present_date))
9917
          return false;
9918
        if (this.date != that.date)
9919
          return false;
9920
      }
9921
 
9922
      return true;
9923
    }
9924
 
9925
    @Override
9926
    public int hashCode() {
9927
      return 0;
9928
    }
9929
 
9930
    public int compareTo(fetchScansPerInvoiceNumber_args other) {
9931
      if (!getClass().equals(other.getClass())) {
9932
        return getClass().getName().compareTo(other.getClass().getName());
9933
      }
9934
 
9935
      int lastComparison = 0;
9936
      fetchScansPerInvoiceNumber_args typedOther = (fetchScansPerInvoiceNumber_args)other;
9937
 
9938
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
9939
      if (lastComparison != 0) {
9940
        return lastComparison;
9941
      }
9942
      if (isSetDate()) {
9943
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
9944
        if (lastComparison != 0) {
9945
          return lastComparison;
9946
        }
9947
      }
9948
      return 0;
9949
    }
9950
 
9951
    public _Fields fieldForId(int fieldId) {
9952
      return _Fields.findByThriftId(fieldId);
9953
    }
9954
 
9955
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9956
      org.apache.thrift.protocol.TField field;
9957
      iprot.readStructBegin();
9958
      while (true)
9959
      {
9960
        field = iprot.readFieldBegin();
9961
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9962
          break;
9963
        }
9964
        switch (field.id) {
9965
          case 1: // DATE
9966
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9967
              this.date = iprot.readI64();
9968
              setDateIsSet(true);
9969
            } else { 
9970
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9971
            }
9972
            break;
9973
          default:
9974
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9975
        }
9976
        iprot.readFieldEnd();
9977
      }
9978
      iprot.readStructEnd();
9979
      validate();
9980
    }
9981
 
9982
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9983
      validate();
9984
 
9985
      oprot.writeStructBegin(STRUCT_DESC);
9986
      oprot.writeFieldBegin(DATE_FIELD_DESC);
9987
      oprot.writeI64(this.date);
9988
      oprot.writeFieldEnd();
9989
      oprot.writeFieldStop();
9990
      oprot.writeStructEnd();
9991
    }
9992
 
9993
    @Override
9994
    public String toString() {
9995
      StringBuilder sb = new StringBuilder("fetchScansPerInvoiceNumber_args(");
9996
      boolean first = true;
9997
 
9998
      sb.append("date:");
9999
      sb.append(this.date);
10000
      first = false;
10001
      sb.append(")");
10002
      return sb.toString();
10003
    }
10004
 
10005
    public void validate() throws org.apache.thrift.TException {
10006
      // check for required fields
10007
    }
10008
 
10009
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10010
      try {
10011
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10012
      } catch (org.apache.thrift.TException te) {
10013
        throw new java.io.IOException(te);
10014
      }
10015
    }
10016
 
10017
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10018
      try {
10019
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
10020
        __isset_bit_vector = new BitSet(1);
10021
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10022
      } catch (org.apache.thrift.TException te) {
10023
        throw new java.io.IOException(te);
10024
      }
10025
    }
10026
 
10027
  }
10028
 
10029
  public static class fetchScansPerInvoiceNumber_result implements org.apache.thrift.TBase<fetchScansPerInvoiceNumber_result, fetchScansPerInvoiceNumber_result._Fields>, java.io.Serializable, Cloneable   {
10030
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchScansPerInvoiceNumber_result");
10031
 
10032
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
10033
 
10034
    private List<InvoiceScan> success; // required
10035
 
10036
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10037
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10038
      SUCCESS((short)0, "success");
10039
 
10040
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10041
 
10042
      static {
10043
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10044
          byName.put(field.getFieldName(), field);
10045
        }
10046
      }
10047
 
10048
      /**
10049
       * Find the _Fields constant that matches fieldId, or null if its not found.
10050
       */
10051
      public static _Fields findByThriftId(int fieldId) {
10052
        switch(fieldId) {
10053
          case 0: // SUCCESS
10054
            return SUCCESS;
10055
          default:
10056
            return null;
10057
        }
10058
      }
10059
 
10060
      /**
10061
       * Find the _Fields constant that matches fieldId, throwing an exception
10062
       * if it is not found.
10063
       */
10064
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10065
        _Fields fields = findByThriftId(fieldId);
10066
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10067
        return fields;
10068
      }
10069
 
10070
      /**
10071
       * Find the _Fields constant that matches name, or null if its not found.
10072
       */
10073
      public static _Fields findByName(String name) {
10074
        return byName.get(name);
10075
      }
10076
 
10077
      private final short _thriftId;
10078
      private final String _fieldName;
10079
 
10080
      _Fields(short thriftId, String fieldName) {
10081
        _thriftId = thriftId;
10082
        _fieldName = fieldName;
10083
      }
10084
 
10085
      public short getThriftFieldId() {
10086
        return _thriftId;
10087
      }
10088
 
10089
      public String getFieldName() {
10090
        return _fieldName;
10091
      }
10092
    }
10093
 
10094
    // isset id assignments
10095
 
10096
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10097
    static {
10098
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10099
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10100
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
10101
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InvoiceScan.class))));
10102
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10103
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchScansPerInvoiceNumber_result.class, metaDataMap);
10104
    }
10105
 
10106
    public fetchScansPerInvoiceNumber_result() {
10107
    }
10108
 
10109
    public fetchScansPerInvoiceNumber_result(
10110
      List<InvoiceScan> success)
10111
    {
10112
      this();
10113
      this.success = success;
10114
    }
10115
 
10116
    /**
10117
     * Performs a deep copy on <i>other</i>.
10118
     */
10119
    public fetchScansPerInvoiceNumber_result(fetchScansPerInvoiceNumber_result other) {
10120
      if (other.isSetSuccess()) {
10121
        List<InvoiceScan> __this__success = new ArrayList<InvoiceScan>();
10122
        for (InvoiceScan other_element : other.success) {
10123
          __this__success.add(new InvoiceScan(other_element));
10124
        }
10125
        this.success = __this__success;
10126
      }
10127
    }
10128
 
10129
    public fetchScansPerInvoiceNumber_result deepCopy() {
10130
      return new fetchScansPerInvoiceNumber_result(this);
10131
    }
10132
 
10133
    @Override
10134
    public void clear() {
10135
      this.success = null;
10136
    }
10137
 
10138
    public int getSuccessSize() {
10139
      return (this.success == null) ? 0 : this.success.size();
10140
    }
10141
 
10142
    public java.util.Iterator<InvoiceScan> getSuccessIterator() {
10143
      return (this.success == null) ? null : this.success.iterator();
10144
    }
10145
 
10146
    public void addToSuccess(InvoiceScan elem) {
10147
      if (this.success == null) {
10148
        this.success = new ArrayList<InvoiceScan>();
10149
      }
10150
      this.success.add(elem);
10151
    }
10152
 
10153
    public List<InvoiceScan> getSuccess() {
10154
      return this.success;
10155
    }
10156
 
10157
    public void setSuccess(List<InvoiceScan> success) {
10158
      this.success = success;
10159
    }
10160
 
10161
    public void unsetSuccess() {
10162
      this.success = null;
10163
    }
10164
 
10165
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
10166
    public boolean isSetSuccess() {
10167
      return this.success != null;
10168
    }
10169
 
10170
    public void setSuccessIsSet(boolean value) {
10171
      if (!value) {
10172
        this.success = null;
10173
      }
10174
    }
10175
 
10176
    public void setFieldValue(_Fields field, Object value) {
10177
      switch (field) {
10178
      case SUCCESS:
10179
        if (value == null) {
10180
          unsetSuccess();
10181
        } else {
10182
          setSuccess((List<InvoiceScan>)value);
10183
        }
10184
        break;
10185
 
10186
      }
10187
    }
10188
 
10189
    public Object getFieldValue(_Fields field) {
10190
      switch (field) {
10191
      case SUCCESS:
10192
        return getSuccess();
10193
 
10194
      }
10195
      throw new IllegalStateException();
10196
    }
10197
 
10198
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10199
    public boolean isSet(_Fields field) {
10200
      if (field == null) {
10201
        throw new IllegalArgumentException();
10202
      }
10203
 
10204
      switch (field) {
10205
      case SUCCESS:
10206
        return isSetSuccess();
10207
      }
10208
      throw new IllegalStateException();
10209
    }
10210
 
10211
    @Override
10212
    public boolean equals(Object that) {
10213
      if (that == null)
10214
        return false;
10215
      if (that instanceof fetchScansPerInvoiceNumber_result)
10216
        return this.equals((fetchScansPerInvoiceNumber_result)that);
10217
      return false;
10218
    }
10219
 
10220
    public boolean equals(fetchScansPerInvoiceNumber_result that) {
10221
      if (that == null)
10222
        return false;
10223
 
10224
      boolean this_present_success = true && this.isSetSuccess();
10225
      boolean that_present_success = true && that.isSetSuccess();
10226
      if (this_present_success || that_present_success) {
10227
        if (!(this_present_success && that_present_success))
10228
          return false;
10229
        if (!this.success.equals(that.success))
10230
          return false;
10231
      }
10232
 
10233
      return true;
10234
    }
10235
 
10236
    @Override
10237
    public int hashCode() {
10238
      return 0;
10239
    }
10240
 
10241
    public int compareTo(fetchScansPerInvoiceNumber_result other) {
10242
      if (!getClass().equals(other.getClass())) {
10243
        return getClass().getName().compareTo(other.getClass().getName());
10244
      }
10245
 
10246
      int lastComparison = 0;
10247
      fetchScansPerInvoiceNumber_result typedOther = (fetchScansPerInvoiceNumber_result)other;
10248
 
10249
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
10250
      if (lastComparison != 0) {
10251
        return lastComparison;
10252
      }
10253
      if (isSetSuccess()) {
10254
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
10255
        if (lastComparison != 0) {
10256
          return lastComparison;
10257
        }
10258
      }
10259
      return 0;
10260
    }
10261
 
10262
    public _Fields fieldForId(int fieldId) {
10263
      return _Fields.findByThriftId(fieldId);
10264
    }
10265
 
10266
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10267
      org.apache.thrift.protocol.TField field;
10268
      iprot.readStructBegin();
10269
      while (true)
10270
      {
10271
        field = iprot.readFieldBegin();
10272
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10273
          break;
10274
        }
10275
        switch (field.id) {
10276
          case 0: // SUCCESS
10277
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
10278
              {
10279
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
10280
                this.success = new ArrayList<InvoiceScan>(_list16.size);
10281
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
10282
                {
10283
                  InvoiceScan _elem18; // required
10284
                  _elem18 = new InvoiceScan();
10285
                  _elem18.read(iprot);
10286
                  this.success.add(_elem18);
10287
                }
10288
                iprot.readListEnd();
10289
              }
10290
            } else { 
10291
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10292
            }
10293
            break;
10294
          default:
10295
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10296
        }
10297
        iprot.readFieldEnd();
10298
      }
10299
      iprot.readStructEnd();
10300
      validate();
10301
    }
10302
 
10303
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10304
      oprot.writeStructBegin(STRUCT_DESC);
10305
 
10306
      if (this.isSetSuccess()) {
10307
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10308
        {
10309
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
10310
          for (InvoiceScan _iter19 : this.success)
10311
          {
10312
            _iter19.write(oprot);
10313
          }
10314
          oprot.writeListEnd();
10315
        }
10316
        oprot.writeFieldEnd();
10317
      }
10318
      oprot.writeFieldStop();
10319
      oprot.writeStructEnd();
10320
    }
10321
 
10322
    @Override
10323
    public String toString() {
10324
      StringBuilder sb = new StringBuilder("fetchScansPerInvoiceNumber_result(");
10325
      boolean first = true;
10326
 
10327
      sb.append("success:");
10328
      if (this.success == null) {
10329
        sb.append("null");
10330
      } else {
10331
        sb.append(this.success);
10332
      }
10333
      first = false;
10334
      sb.append(")");
10335
      return sb.toString();
10336
    }
10337
 
10338
    public void validate() throws org.apache.thrift.TException {
10339
      // check for required fields
10340
    }
10341
 
10342
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10343
      try {
10344
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10345
      } catch (org.apache.thrift.TException te) {
10346
        throw new java.io.IOException(te);
10347
      }
10348
    }
10349
 
10350
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10351
      try {
10352
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10353
      } catch (org.apache.thrift.TException te) {
10354
        throw new java.io.IOException(te);
10355
      }
10356
    }
10357
 
10358
  }
10359
 
2820 chandransh 10360
}