Subversion Repositories SmartDukaan

Rev

Rev 6322 | Rev 6548 | 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
 
5620 mandeep.dh 128
    /**
129
     * Returns inventory item for a given order
130
     * 
131
     * @param orderId
132
     */
133
    public InventoryItem getInventoryItemFromOrder(long orderId) throws WarehouseServiceException, org.apache.thrift.TException;
134
 
5711 mandeep.dh 135
    /**
136
     * Fetches the stock inventory age week-wise
137
     */
138
    public List<InventoryAge> getInventoryAge() throws org.apache.thrift.TException;
139
 
6322 amar.kumar 140
    /**
141
     * Fetches the scanRecords for a given item for a given time interval
142
     * 
143
     * @param itemId
144
     * @param fromDate
145
     * @param toDate
146
     */
147
    public List<Scan> getInventoryScansForItem(long itemId, long fromDate, long toDate) throws org.apache.thrift.TException;
148
 
149
    /**
150
     * Fetches the scanRecords for a given serialNumber for a given time interval
151
     * 
152
     * @param serialNumber
153
     */
154
    public List<Scan> getScanRecordsForSerialNumber(long serialNumber) throws org.apache.thrift.TException;
155
 
6467 amar.kumar 156
    /**
157
     * Inserts outgoing scans for Returned Items and updates returnId in InventoryItem
158
     * 
159
     * @param saleReturnItems
160
     * @param vendorId
161
     */
162
    public void scanForPurchaseReturn(List<InventoryItem> saleReturnItems, long vendorId) throws WarehouseServiceException, org.apache.thrift.TException;
163
 
2820 chandransh 164
  }
165
 
3430 rajveer 166
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
167
 
4496 mandeep.dh 168
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 169
 
5530 mandeep.dh 170
    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 171
 
5361 mandeep.dh 172
    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 173
 
5110 mandeep.dh 174
    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 175
 
5361 mandeep.dh 176
    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 177
 
178
    public void createItemNumberMapping(String itemNumber, long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createItemNumberMapping_call> resultHandler) throws org.apache.thrift.TException;
179
 
4622 amit.gupta 180
    public void getItemNumbers(long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemNumbers_call> resultHandler) throws org.apache.thrift.TException;
181
 
5110 mandeep.dh 182
    public void getItemIds(String itemNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemIds_call> resultHandler) throws org.apache.thrift.TException;
183
 
5185 mandeep.dh 184
    public void getInventoryItemsFromLastScanType(ScanType lastScanType, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemsFromLastScanType_call> resultHandler) throws org.apache.thrift.TException;
185
 
186
    public void getInventoryItemFromId(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemFromId_call> resultHandler) throws org.apache.thrift.TException;
187
 
5372 mandeep.dh 188
    public void getPurchaseScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseScans_call> resultHandler) throws org.apache.thrift.TException;
189
 
5496 mandeep.dh 190
    public void fetchScansPerInvoiceNumber(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fetchScansPerInvoiceNumber_call> resultHandler) throws org.apache.thrift.TException;
191
 
5620 mandeep.dh 192
    public void getInventoryItemFromOrder(long orderId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemFromOrder_call> resultHandler) throws org.apache.thrift.TException;
193
 
5711 mandeep.dh 194
    public void getInventoryAge(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryAge_call> resultHandler) throws org.apache.thrift.TException;
195
 
6322 amar.kumar 196
    public void getInventoryScansForItem(long itemId, long fromDate, long toDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryScansForItem_call> resultHandler) throws org.apache.thrift.TException;
197
 
198
    public void getScanRecordsForSerialNumber(long serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getScanRecordsForSerialNumber_call> resultHandler) throws org.apache.thrift.TException;
199
 
6467 amar.kumar 200
    public void scanForPurchaseReturn(List<InventoryItem> saleReturnItems, long vendorId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanForPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
201
 
3430 rajveer 202
  }
203
 
3374 rajveer 204
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
3430 rajveer 205
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
206
      public Factory() {}
207
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
208
        return new Client(prot);
209
      }
210
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
211
        return new Client(iprot, oprot);
212
      }
213
    }
214
 
215
    public Client(org.apache.thrift.protocol.TProtocol prot)
2820 chandransh 216
    {
3430 rajveer 217
      super(prot, prot);
2820 chandransh 218
    }
219
 
3430 rajveer 220
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
3374 rajveer 221
      super(iprot, oprot);
2820 chandransh 222
    }
223
 
4541 mandeep.dh 224
    public InventoryItem getInventoryItem(String serialNumber) throws WarehouseServiceException, org.apache.thrift.TException
2832 chandransh 225
    {
4496 mandeep.dh 226
      send_getInventoryItem(serialNumber);
227
      return recv_getInventoryItem();
2832 chandransh 228
    }
229
 
4496 mandeep.dh 230
    public void send_getInventoryItem(String serialNumber) throws org.apache.thrift.TException
2832 chandransh 231
    {
4496 mandeep.dh 232
      getInventoryItem_args args = new getInventoryItem_args();
233
      args.setSerialNumber(serialNumber);
234
      sendBase("getInventoryItem", args);
2832 chandransh 235
    }
236
 
4541 mandeep.dh 237
    public InventoryItem recv_getInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException
2832 chandransh 238
    {
4496 mandeep.dh 239
      getInventoryItem_result result = new getInventoryItem_result();
240
      receiveBase(result, "getInventoryItem");
2832 chandransh 241
      if (result.isSetSuccess()) {
242
        return result.success;
243
      }
4541 mandeep.dh 244
      if (result.wex != null) {
245
        throw result.wex;
246
      }
4496 mandeep.dh 247
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItem failed: unknown result");
248
    }
249
 
5530 mandeep.dh 250
    public InventoryItem getNonSeralizedInventoryItem(String itemNumber, long itemId, long fulfilmentWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 251
    {
5530 mandeep.dh 252
      send_getNonSeralizedInventoryItem(itemNumber, itemId, fulfilmentWarehouseId);
5361 mandeep.dh 253
      return recv_getNonSeralizedInventoryItem();
4496 mandeep.dh 254
    }
255
 
5530 mandeep.dh 256
    public void send_getNonSeralizedInventoryItem(String itemNumber, long itemId, long fulfilmentWarehouseId) throws org.apache.thrift.TException
4496 mandeep.dh 257
    {
5361 mandeep.dh 258
      getNonSeralizedInventoryItem_args args = new getNonSeralizedInventoryItem_args();
5530 mandeep.dh 259
      args.setItemNumber(itemNumber);
4496 mandeep.dh 260
      args.setItemId(itemId);
5530 mandeep.dh 261
      args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
5361 mandeep.dh 262
      sendBase("getNonSeralizedInventoryItem", args);
4496 mandeep.dh 263
    }
264
 
5361 mandeep.dh 265
    public InventoryItem recv_getNonSeralizedInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 266
    {
5361 mandeep.dh 267
      getNonSeralizedInventoryItem_result result = new getNonSeralizedInventoryItem_result();
268
      receiveBase(result, "getNonSeralizedInventoryItem");
4496 mandeep.dh 269
      if (result.isSetSuccess()) {
270
        return result.success;
2832 chandransh 271
      }
5361 mandeep.dh 272
      if (result.wex != null) {
273
        throw result.wex;
2820 chandransh 274
      }
5361 mandeep.dh 275
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getNonSeralizedInventoryItem failed: unknown result");
4496 mandeep.dh 276
    }
277
 
5361 mandeep.dh 278
    public void scan(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 279
    {
5361 mandeep.dh 280
      send_scan(inventoryItem, type, quantity, billingWarehouseId);
4496 mandeep.dh 281
      recv_scan();
3383 chandransh 282
    }
283
 
5361 mandeep.dh 284
    public void send_scan(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId) throws org.apache.thrift.TException
3383 chandransh 285
    {
4496 mandeep.dh 286
      scan_args args = new scan_args();
5361 mandeep.dh 287
      args.setInventoryItem(inventoryItem);
4496 mandeep.dh 288
      args.setType(type);
289
      args.setQuantity(quantity);
5361 mandeep.dh 290
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 291
      sendBase("scan", args);
3383 chandransh 292
    }
293
 
4496 mandeep.dh 294
    public void recv_scan() throws WarehouseServiceException, org.apache.thrift.TException
3383 chandransh 295
    {
4496 mandeep.dh 296
      scan_result result = new scan_result();
297
      receiveBase(result, "scan");
298
      if (result.wex != null) {
299
        throw result.wex;
300
      }
301
      return;
302
    }
303
 
5110 mandeep.dh 304
    public InventoryItem scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 305
    {
5110 mandeep.dh 306
      send_scanSerializedItemForOrder(serialNumber, type, orderId, fulfilmentWarehouseId, quantity, billingWarehouseId);
4496 mandeep.dh 307
      return recv_scanSerializedItemForOrder();
308
    }
309
 
5110 mandeep.dh 310
    public void send_scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId) throws org.apache.thrift.TException
4496 mandeep.dh 311
    {
312
      scanSerializedItemForOrder_args args = new scanSerializedItemForOrder_args();
4555 mandeep.dh 313
      args.setSerialNumber(serialNumber);
4496 mandeep.dh 314
      args.setType(type);
315
      args.setOrderId(orderId);
5110 mandeep.dh 316
      args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
317
      args.setQuantity(quantity);
318
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 319
      sendBase("scanSerializedItemForOrder", args);
320
    }
321
 
4555 mandeep.dh 322
    public InventoryItem recv_scanSerializedItemForOrder() throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 323
    {
324
      scanSerializedItemForOrder_result result = new scanSerializedItemForOrder_result();
325
      receiveBase(result, "scanSerializedItemForOrder");
3383 chandransh 326
      if (result.isSetSuccess()) {
327
        return result.success;
328
      }
329
      if (result.wex != null) {
330
        throw result.wex;
331
      }
4496 mandeep.dh 332
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scanSerializedItemForOrder failed: unknown result");
3383 chandransh 333
    }
334
 
5361 mandeep.dh 335
    public InventoryItem scanForOrder(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
3383 chandransh 336
    {
5361 mandeep.dh 337
      send_scanForOrder(inventoryItem, type, quantity, orderId, fulfilmentWarehouseId, billingWarehouseId);
338
      return recv_scanForOrder();
2820 chandransh 339
    }
340
 
5361 mandeep.dh 341
    public void send_scanForOrder(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId) throws org.apache.thrift.TException
2820 chandransh 342
    {
4496 mandeep.dh 343
      scanForOrder_args args = new scanForOrder_args();
5361 mandeep.dh 344
      args.setInventoryItem(inventoryItem);
3430 rajveer 345
      args.setType(type);
4496 mandeep.dh 346
      args.setQuantity(quantity);
347
      args.setOrderId(orderId);
5110 mandeep.dh 348
      args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
5361 mandeep.dh 349
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 350
      sendBase("scanForOrder", args);
2820 chandransh 351
    }
352
 
5361 mandeep.dh 353
    public InventoryItem recv_scanForOrder() throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 354
    {
4496 mandeep.dh 355
      scanForOrder_result result = new scanForOrder_result();
356
      receiveBase(result, "scanForOrder");
5361 mandeep.dh 357
      if (result.isSetSuccess()) {
358
        return result.success;
359
      }
2820 chandransh 360
      if (result.wex != null) {
361
        throw result.wex;
362
      }
5361 mandeep.dh 363
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scanForOrder failed: unknown result");
2820 chandransh 364
    }
365
 
4496 mandeep.dh 366
    public void createItemNumberMapping(String itemNumber, long itemId) throws org.apache.thrift.TException
2820 chandransh 367
    {
4496 mandeep.dh 368
      send_createItemNumberMapping(itemNumber, itemId);
369
      recv_createItemNumberMapping();
2820 chandransh 370
    }
371
 
4496 mandeep.dh 372
    public void send_createItemNumberMapping(String itemNumber, long itemId) throws org.apache.thrift.TException
2820 chandransh 373
    {
4496 mandeep.dh 374
      createItemNumberMapping_args args = new createItemNumberMapping_args();
3430 rajveer 375
      args.setItemNumber(itemNumber);
4496 mandeep.dh 376
      args.setItemId(itemId);
377
      sendBase("createItemNumberMapping", args);
2820 chandransh 378
    }
379
 
4496 mandeep.dh 380
    public void recv_createItemNumberMapping() throws org.apache.thrift.TException
2820 chandransh 381
    {
4496 mandeep.dh 382
      createItemNumberMapping_result result = new createItemNumberMapping_result();
383
      receiveBase(result, "createItemNumberMapping");
2820 chandransh 384
      return;
385
    }
386
 
4622 amit.gupta 387
    public List<String> getItemNumbers(long itemId) throws org.apache.thrift.TException
388
    {
389
      send_getItemNumbers(itemId);
390
      return recv_getItemNumbers();
391
    }
392
 
393
    public void send_getItemNumbers(long itemId) throws org.apache.thrift.TException
394
    {
395
      getItemNumbers_args args = new getItemNumbers_args();
396
      args.setItemId(itemId);
397
      sendBase("getItemNumbers", args);
398
    }
399
 
400
    public List<String> recv_getItemNumbers() throws org.apache.thrift.TException
401
    {
402
      getItemNumbers_result result = new getItemNumbers_result();
403
      receiveBase(result, "getItemNumbers");
404
      if (result.isSetSuccess()) {
405
        return result.success;
406
      }
407
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemNumbers failed: unknown result");
408
    }
409
 
5110 mandeep.dh 410
    public List<Long> getItemIds(String itemNumber) throws org.apache.thrift.TException
411
    {
412
      send_getItemIds(itemNumber);
413
      return recv_getItemIds();
414
    }
415
 
416
    public void send_getItemIds(String itemNumber) throws org.apache.thrift.TException
417
    {
418
      getItemIds_args args = new getItemIds_args();
419
      args.setItemNumber(itemNumber);
420
      sendBase("getItemIds", args);
421
    }
422
 
423
    public List<Long> recv_getItemIds() throws org.apache.thrift.TException
424
    {
425
      getItemIds_result result = new getItemIds_result();
426
      receiveBase(result, "getItemIds");
427
      if (result.isSetSuccess()) {
428
        return result.success;
429
      }
430
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemIds failed: unknown result");
431
    }
432
 
5185 mandeep.dh 433
    public List<InventoryItem> getInventoryItemsFromLastScanType(ScanType lastScanType) throws WarehouseServiceException, org.apache.thrift.TException
434
    {
435
      send_getInventoryItemsFromLastScanType(lastScanType);
436
      return recv_getInventoryItemsFromLastScanType();
437
    }
438
 
439
    public void send_getInventoryItemsFromLastScanType(ScanType lastScanType) throws org.apache.thrift.TException
440
    {
441
      getInventoryItemsFromLastScanType_args args = new getInventoryItemsFromLastScanType_args();
442
      args.setLastScanType(lastScanType);
443
      sendBase("getInventoryItemsFromLastScanType", args);
444
    }
445
 
446
    public List<InventoryItem> recv_getInventoryItemsFromLastScanType() throws WarehouseServiceException, org.apache.thrift.TException
447
    {
448
      getInventoryItemsFromLastScanType_result result = new getInventoryItemsFromLastScanType_result();
449
      receiveBase(result, "getInventoryItemsFromLastScanType");
450
      if (result.isSetSuccess()) {
451
        return result.success;
452
      }
453
      if (result.wex != null) {
454
        throw result.wex;
455
      }
456
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItemsFromLastScanType failed: unknown result");
457
    }
458
 
459
    public InventoryItem getInventoryItemFromId(long inventoryItemId) throws WarehouseServiceException, org.apache.thrift.TException
460
    {
461
      send_getInventoryItemFromId(inventoryItemId);
462
      return recv_getInventoryItemFromId();
463
    }
464
 
465
    public void send_getInventoryItemFromId(long inventoryItemId) throws org.apache.thrift.TException
466
    {
467
      getInventoryItemFromId_args args = new getInventoryItemFromId_args();
468
      args.setInventoryItemId(inventoryItemId);
469
      sendBase("getInventoryItemFromId", args);
470
    }
471
 
472
    public InventoryItem recv_getInventoryItemFromId() throws WarehouseServiceException, org.apache.thrift.TException
473
    {
474
      getInventoryItemFromId_result result = new getInventoryItemFromId_result();
475
      receiveBase(result, "getInventoryItemFromId");
476
      if (result.isSetSuccess()) {
477
        return result.success;
478
      }
479
      if (result.wex != null) {
480
        throw result.wex;
481
      }
482
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItemFromId failed: unknown result");
483
    }
484
 
5372 mandeep.dh 485
    public List<DetailedPurchaseScan> getPurchaseScans(long startDate, long endDate) throws org.apache.thrift.TException
486
    {
487
      send_getPurchaseScans(startDate, endDate);
488
      return recv_getPurchaseScans();
489
    }
490
 
491
    public void send_getPurchaseScans(long startDate, long endDate) throws org.apache.thrift.TException
492
    {
493
      getPurchaseScans_args args = new getPurchaseScans_args();
494
      args.setStartDate(startDate);
495
      args.setEndDate(endDate);
496
      sendBase("getPurchaseScans", args);
497
    }
498
 
499
    public List<DetailedPurchaseScan> recv_getPurchaseScans() throws org.apache.thrift.TException
500
    {
501
      getPurchaseScans_result result = new getPurchaseScans_result();
502
      receiveBase(result, "getPurchaseScans");
503
      if (result.isSetSuccess()) {
504
        return result.success;
505
      }
506
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseScans failed: unknown result");
507
    }
508
 
5496 mandeep.dh 509
    public List<InvoiceScan> fetchScansPerInvoiceNumber(long date) throws org.apache.thrift.TException
510
    {
511
      send_fetchScansPerInvoiceNumber(date);
512
      return recv_fetchScansPerInvoiceNumber();
513
    }
514
 
515
    public void send_fetchScansPerInvoiceNumber(long date) throws org.apache.thrift.TException
516
    {
517
      fetchScansPerInvoiceNumber_args args = new fetchScansPerInvoiceNumber_args();
518
      args.setDate(date);
519
      sendBase("fetchScansPerInvoiceNumber", args);
520
    }
521
 
522
    public List<InvoiceScan> recv_fetchScansPerInvoiceNumber() throws org.apache.thrift.TException
523
    {
524
      fetchScansPerInvoiceNumber_result result = new fetchScansPerInvoiceNumber_result();
525
      receiveBase(result, "fetchScansPerInvoiceNumber");
526
      if (result.isSetSuccess()) {
527
        return result.success;
528
      }
529
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "fetchScansPerInvoiceNumber failed: unknown result");
530
    }
531
 
5620 mandeep.dh 532
    public InventoryItem getInventoryItemFromOrder(long orderId) throws WarehouseServiceException, org.apache.thrift.TException
533
    {
534
      send_getInventoryItemFromOrder(orderId);
535
      return recv_getInventoryItemFromOrder();
536
    }
537
 
538
    public void send_getInventoryItemFromOrder(long orderId) throws org.apache.thrift.TException
539
    {
540
      getInventoryItemFromOrder_args args = new getInventoryItemFromOrder_args();
541
      args.setOrderId(orderId);
542
      sendBase("getInventoryItemFromOrder", args);
543
    }
544
 
545
    public InventoryItem recv_getInventoryItemFromOrder() throws WarehouseServiceException, org.apache.thrift.TException
546
    {
547
      getInventoryItemFromOrder_result result = new getInventoryItemFromOrder_result();
548
      receiveBase(result, "getInventoryItemFromOrder");
549
      if (result.isSetSuccess()) {
550
        return result.success;
551
      }
552
      if (result.we != null) {
553
        throw result.we;
554
      }
555
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItemFromOrder failed: unknown result");
556
    }
557
 
5711 mandeep.dh 558
    public List<InventoryAge> getInventoryAge() throws org.apache.thrift.TException
559
    {
560
      send_getInventoryAge();
561
      return recv_getInventoryAge();
562
    }
563
 
564
    public void send_getInventoryAge() throws org.apache.thrift.TException
565
    {
566
      getInventoryAge_args args = new getInventoryAge_args();
567
      sendBase("getInventoryAge", args);
568
    }
569
 
570
    public List<InventoryAge> recv_getInventoryAge() throws org.apache.thrift.TException
571
    {
572
      getInventoryAge_result result = new getInventoryAge_result();
573
      receiveBase(result, "getInventoryAge");
574
      if (result.isSetSuccess()) {
575
        return result.success;
576
      }
577
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryAge failed: unknown result");
578
    }
579
 
6322 amar.kumar 580
    public List<Scan> getInventoryScansForItem(long itemId, long fromDate, long toDate) throws org.apache.thrift.TException
581
    {
582
      send_getInventoryScansForItem(itemId, fromDate, toDate);
583
      return recv_getInventoryScansForItem();
584
    }
585
 
586
    public void send_getInventoryScansForItem(long itemId, long fromDate, long toDate) throws org.apache.thrift.TException
587
    {
588
      getInventoryScansForItem_args args = new getInventoryScansForItem_args();
589
      args.setItemId(itemId);
590
      args.setFromDate(fromDate);
591
      args.setToDate(toDate);
592
      sendBase("getInventoryScansForItem", args);
593
    }
594
 
595
    public List<Scan> recv_getInventoryScansForItem() throws org.apache.thrift.TException
596
    {
597
      getInventoryScansForItem_result result = new getInventoryScansForItem_result();
598
      receiveBase(result, "getInventoryScansForItem");
599
      if (result.isSetSuccess()) {
600
        return result.success;
601
      }
602
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryScansForItem failed: unknown result");
603
    }
604
 
605
    public List<Scan> getScanRecordsForSerialNumber(long serialNumber) throws org.apache.thrift.TException
606
    {
607
      send_getScanRecordsForSerialNumber(serialNumber);
608
      return recv_getScanRecordsForSerialNumber();
609
    }
610
 
611
    public void send_getScanRecordsForSerialNumber(long serialNumber) throws org.apache.thrift.TException
612
    {
613
      getScanRecordsForSerialNumber_args args = new getScanRecordsForSerialNumber_args();
614
      args.setSerialNumber(serialNumber);
615
      sendBase("getScanRecordsForSerialNumber", args);
616
    }
617
 
618
    public List<Scan> recv_getScanRecordsForSerialNumber() throws org.apache.thrift.TException
619
    {
620
      getScanRecordsForSerialNumber_result result = new getScanRecordsForSerialNumber_result();
621
      receiveBase(result, "getScanRecordsForSerialNumber");
622
      if (result.isSetSuccess()) {
623
        return result.success;
624
      }
625
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getScanRecordsForSerialNumber failed: unknown result");
626
    }
627
 
6467 amar.kumar 628
    public void scanForPurchaseReturn(List<InventoryItem> saleReturnItems, long vendorId) throws WarehouseServiceException, org.apache.thrift.TException
629
    {
630
      send_scanForPurchaseReturn(saleReturnItems, vendorId);
631
      recv_scanForPurchaseReturn();
632
    }
633
 
634
    public void send_scanForPurchaseReturn(List<InventoryItem> saleReturnItems, long vendorId) throws org.apache.thrift.TException
635
    {
636
      scanForPurchaseReturn_args args = new scanForPurchaseReturn_args();
637
      args.setSaleReturnItems(saleReturnItems);
638
      args.setVendorId(vendorId);
639
      sendBase("scanForPurchaseReturn", args);
640
    }
641
 
642
    public void recv_scanForPurchaseReturn() throws WarehouseServiceException, org.apache.thrift.TException
643
    {
644
      scanForPurchaseReturn_result result = new scanForPurchaseReturn_result();
645
      receiveBase(result, "scanForPurchaseReturn");
646
      if (result.ex != null) {
647
        throw result.ex;
648
      }
649
      return;
650
    }
651
 
2820 chandransh 652
  }
3430 rajveer 653
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
654
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
655
      private org.apache.thrift.async.TAsyncClientManager clientManager;
656
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
657
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
658
        this.clientManager = clientManager;
659
        this.protocolFactory = protocolFactory;
660
      }
661
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
662
        return new AsyncClient(protocolFactory, clientManager, transport);
663
      }
2820 chandransh 664
    }
665
 
3430 rajveer 666
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
667
      super(protocolFactory, clientManager, transport);
668
    }
2820 chandransh 669
 
4496 mandeep.dh 670
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<getInventoryItem_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 671
      checkReady();
4496 mandeep.dh 672
      getInventoryItem_call method_call = new getInventoryItem_call(serialNumber, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 673
      this.___currentMethod = method_call;
674
      ___manager.call(method_call);
675
    }
676
 
4496 mandeep.dh 677
    public static class getInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {
678
      private String serialNumber;
679
      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 680
        super(client, protocolFactory, transport, resultHandler, false);
4496 mandeep.dh 681
        this.serialNumber = serialNumber;
3430 rajveer 682
      }
683
 
684
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 685
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
686
        getInventoryItem_args args = new getInventoryItem_args();
687
        args.setSerialNumber(serialNumber);
3430 rajveer 688
        args.write(prot);
689
        prot.writeMessageEnd();
690
      }
691
 
4541 mandeep.dh 692
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
3430 rajveer 693
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
694
          throw new IllegalStateException("Method call not finished!");
695
        }
696
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
697
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 698
        return (new Client(prot)).recv_getInventoryItem();
3430 rajveer 699
      }
700
    }
701
 
5530 mandeep.dh 702
    public void getNonSeralizedInventoryItem(String itemNumber, long itemId, long fulfilmentWarehouseId, org.apache.thrift.async.AsyncMethodCallback<getNonSeralizedInventoryItem_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 703
      checkReady();
5530 mandeep.dh 704
      getNonSeralizedInventoryItem_call method_call = new getNonSeralizedInventoryItem_call(itemNumber, itemId, fulfilmentWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 705
      this.___currentMethod = method_call;
706
      ___manager.call(method_call);
707
    }
708
 
5361 mandeep.dh 709
    public static class getNonSeralizedInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {
5530 mandeep.dh 710
      private String itemNumber;
4496 mandeep.dh 711
      private long itemId;
5530 mandeep.dh 712
      private long fulfilmentWarehouseId;
713
      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 714
        super(client, protocolFactory, transport, resultHandler, false);
5530 mandeep.dh 715
        this.itemNumber = itemNumber;
4496 mandeep.dh 716
        this.itemId = itemId;
5530 mandeep.dh 717
        this.fulfilmentWarehouseId = fulfilmentWarehouseId;
3430 rajveer 718
      }
719
 
720
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
5361 mandeep.dh 721
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getNonSeralizedInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
722
        getNonSeralizedInventoryItem_args args = new getNonSeralizedInventoryItem_args();
5530 mandeep.dh 723
        args.setItemNumber(itemNumber);
4496 mandeep.dh 724
        args.setItemId(itemId);
5530 mandeep.dh 725
        args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
3430 rajveer 726
        args.write(prot);
727
        prot.writeMessageEnd();
728
      }
729
 
5361 mandeep.dh 730
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
3430 rajveer 731
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
732
          throw new IllegalStateException("Method call not finished!");
733
        }
734
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
735
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
5361 mandeep.dh 736
        return (new Client(prot)).recv_getNonSeralizedInventoryItem();
3430 rajveer 737
      }
738
    }
739
 
5361 mandeep.dh 740
    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 741
      checkReady();
5361 mandeep.dh 742
      scan_call method_call = new scan_call(inventoryItem, type, quantity, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 743
      this.___currentMethod = method_call;
744
      ___manager.call(method_call);
745
    }
746
 
4496 mandeep.dh 747
    public static class scan_call extends org.apache.thrift.async.TAsyncMethodCall {
5361 mandeep.dh 748
      private InventoryItem inventoryItem;
3430 rajveer 749
      private ScanType type;
4496 mandeep.dh 750
      private long quantity;
5361 mandeep.dh 751
      private long billingWarehouseId;
752
      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 753
        super(client, protocolFactory, transport, resultHandler, false);
5361 mandeep.dh 754
        this.inventoryItem = inventoryItem;
3430 rajveer 755
        this.type = type;
4496 mandeep.dh 756
        this.quantity = quantity;
5361 mandeep.dh 757
        this.billingWarehouseId = billingWarehouseId;
3430 rajveer 758
      }
759
 
760
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 761
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scan", org.apache.thrift.protocol.TMessageType.CALL, 0));
762
        scan_args args = new scan_args();
5361 mandeep.dh 763
        args.setInventoryItem(inventoryItem);
3430 rajveer 764
        args.setType(type);
4496 mandeep.dh 765
        args.setQuantity(quantity);
5361 mandeep.dh 766
        args.setBillingWarehouseId(billingWarehouseId);
3430 rajveer 767
        args.write(prot);
768
        prot.writeMessageEnd();
769
      }
770
 
771
      public void getResult() throws WarehouseServiceException, org.apache.thrift.TException {
772
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
773
          throw new IllegalStateException("Method call not finished!");
774
        }
775
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
776
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 777
        (new Client(prot)).recv_scan();
3430 rajveer 778
      }
779
    }
780
 
5110 mandeep.dh 781
    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 782
      checkReady();
5110 mandeep.dh 783
      scanSerializedItemForOrder_call method_call = new scanSerializedItemForOrder_call(serialNumber, type, orderId, fulfilmentWarehouseId, quantity, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 784
      this.___currentMethod = method_call;
785
      ___manager.call(method_call);
786
    }
787
 
788
    public static class scanSerializedItemForOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
4555 mandeep.dh 789
      private String serialNumber;
4496 mandeep.dh 790
      private ScanType type;
791
      private long orderId;
5110 mandeep.dh 792
      private long fulfilmentWarehouseId;
793
      private double quantity;
794
      private long billingWarehouseId;
795
      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 796
        super(client, protocolFactory, transport, resultHandler, false);
4555 mandeep.dh 797
        this.serialNumber = serialNumber;
4496 mandeep.dh 798
        this.type = type;
799
        this.orderId = orderId;
5110 mandeep.dh 800
        this.fulfilmentWarehouseId = fulfilmentWarehouseId;
801
        this.quantity = quantity;
802
        this.billingWarehouseId = billingWarehouseId;
4496 mandeep.dh 803
      }
804
 
805
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
806
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanSerializedItemForOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
807
        scanSerializedItemForOrder_args args = new scanSerializedItemForOrder_args();
4555 mandeep.dh 808
        args.setSerialNumber(serialNumber);
4496 mandeep.dh 809
        args.setType(type);
810
        args.setOrderId(orderId);
5110 mandeep.dh 811
        args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
812
        args.setQuantity(quantity);
813
        args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 814
        args.write(prot);
815
        prot.writeMessageEnd();
816
      }
817
 
4555 mandeep.dh 818
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
4496 mandeep.dh 819
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
820
          throw new IllegalStateException("Method call not finished!");
821
        }
822
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
823
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
824
        return (new Client(prot)).recv_scanSerializedItemForOrder();
825
      }
826
    }
827
 
5361 mandeep.dh 828
    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 829
      checkReady();
5361 mandeep.dh 830
      scanForOrder_call method_call = new scanForOrder_call(inventoryItem, type, quantity, orderId, fulfilmentWarehouseId, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 831
      this.___currentMethod = method_call;
832
      ___manager.call(method_call);
833
    }
834
 
835
    public static class scanForOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
5361 mandeep.dh 836
      private InventoryItem inventoryItem;
4496 mandeep.dh 837
      private ScanType type;
838
      private long quantity;
839
      private long orderId;
5110 mandeep.dh 840
      private long fulfilmentWarehouseId;
5361 mandeep.dh 841
      private long billingWarehouseId;
842
      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 843
        super(client, protocolFactory, transport, resultHandler, false);
5361 mandeep.dh 844
        this.inventoryItem = inventoryItem;
4496 mandeep.dh 845
        this.type = type;
846
        this.quantity = quantity;
847
        this.orderId = orderId;
5110 mandeep.dh 848
        this.fulfilmentWarehouseId = fulfilmentWarehouseId;
5361 mandeep.dh 849
        this.billingWarehouseId = billingWarehouseId;
4496 mandeep.dh 850
      }
851
 
852
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
853
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanForOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
854
        scanForOrder_args args = new scanForOrder_args();
5361 mandeep.dh 855
        args.setInventoryItem(inventoryItem);
4496 mandeep.dh 856
        args.setType(type);
857
        args.setQuantity(quantity);
858
        args.setOrderId(orderId);
5110 mandeep.dh 859
        args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
5361 mandeep.dh 860
        args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 861
        args.write(prot);
862
        prot.writeMessageEnd();
863
      }
864
 
5361 mandeep.dh 865
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
4496 mandeep.dh 866
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
867
          throw new IllegalStateException("Method call not finished!");
868
        }
869
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
870
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
5361 mandeep.dh 871
        return (new Client(prot)).recv_scanForOrder();
4496 mandeep.dh 872
      }
873
    }
874
 
875
    public void createItemNumberMapping(String itemNumber, long itemId, org.apache.thrift.async.AsyncMethodCallback<createItemNumberMapping_call> resultHandler) throws org.apache.thrift.TException {
876
      checkReady();
877
      createItemNumberMapping_call method_call = new createItemNumberMapping_call(itemNumber, itemId, resultHandler, this, ___protocolFactory, ___transport);
878
      this.___currentMethod = method_call;
879
      ___manager.call(method_call);
880
    }
881
 
882
    public static class createItemNumberMapping_call extends org.apache.thrift.async.TAsyncMethodCall {
883
      private String itemNumber;
884
      private long itemId;
885
      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 {
886
        super(client, protocolFactory, transport, resultHandler, false);
887
        this.itemNumber = itemNumber;
888
        this.itemId = itemId;
889
      }
890
 
891
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
892
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createItemNumberMapping", org.apache.thrift.protocol.TMessageType.CALL, 0));
893
        createItemNumberMapping_args args = new createItemNumberMapping_args();
894
        args.setItemNumber(itemNumber);
895
        args.setItemId(itemId);
896
        args.write(prot);
897
        prot.writeMessageEnd();
898
      }
899
 
900
      public void getResult() throws org.apache.thrift.TException {
901
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
902
          throw new IllegalStateException("Method call not finished!");
903
        }
904
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
905
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
906
        (new Client(prot)).recv_createItemNumberMapping();
907
      }
908
    }
909
 
4622 amit.gupta 910
    public void getItemNumbers(long itemId, org.apache.thrift.async.AsyncMethodCallback<getItemNumbers_call> resultHandler) throws org.apache.thrift.TException {
911
      checkReady();
912
      getItemNumbers_call method_call = new getItemNumbers_call(itemId, resultHandler, this, ___protocolFactory, ___transport);
913
      this.___currentMethod = method_call;
914
      ___manager.call(method_call);
915
    }
916
 
917
    public static class getItemNumbers_call extends org.apache.thrift.async.TAsyncMethodCall {
918
      private long itemId;
919
      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 {
920
        super(client, protocolFactory, transport, resultHandler, false);
921
        this.itemId = itemId;
922
      }
923
 
924
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
925
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemNumbers", org.apache.thrift.protocol.TMessageType.CALL, 0));
926
        getItemNumbers_args args = new getItemNumbers_args();
927
        args.setItemId(itemId);
928
        args.write(prot);
929
        prot.writeMessageEnd();
930
      }
931
 
932
      public List<String> getResult() throws org.apache.thrift.TException {
933
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
934
          throw new IllegalStateException("Method call not finished!");
935
        }
936
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
937
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
938
        return (new Client(prot)).recv_getItemNumbers();
939
      }
940
    }
941
 
5110 mandeep.dh 942
    public void getItemIds(String itemNumber, org.apache.thrift.async.AsyncMethodCallback<getItemIds_call> resultHandler) throws org.apache.thrift.TException {
943
      checkReady();
944
      getItemIds_call method_call = new getItemIds_call(itemNumber, resultHandler, this, ___protocolFactory, ___transport);
945
      this.___currentMethod = method_call;
946
      ___manager.call(method_call);
947
    }
948
 
949
    public static class getItemIds_call extends org.apache.thrift.async.TAsyncMethodCall {
950
      private String itemNumber;
951
      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 {
952
        super(client, protocolFactory, transport, resultHandler, false);
953
        this.itemNumber = itemNumber;
954
      }
955
 
956
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
957
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemIds", org.apache.thrift.protocol.TMessageType.CALL, 0));
958
        getItemIds_args args = new getItemIds_args();
959
        args.setItemNumber(itemNumber);
960
        args.write(prot);
961
        prot.writeMessageEnd();
962
      }
963
 
964
      public List<Long> getResult() throws org.apache.thrift.TException {
965
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
966
          throw new IllegalStateException("Method call not finished!");
967
        }
968
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
969
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
970
        return (new Client(prot)).recv_getItemIds();
971
      }
972
    }
973
 
5185 mandeep.dh 974
    public void getInventoryItemsFromLastScanType(ScanType lastScanType, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemsFromLastScanType_call> resultHandler) throws org.apache.thrift.TException {
975
      checkReady();
976
      getInventoryItemsFromLastScanType_call method_call = new getInventoryItemsFromLastScanType_call(lastScanType, resultHandler, this, ___protocolFactory, ___transport);
977
      this.___currentMethod = method_call;
978
      ___manager.call(method_call);
979
    }
980
 
981
    public static class getInventoryItemsFromLastScanType_call extends org.apache.thrift.async.TAsyncMethodCall {
982
      private ScanType lastScanType;
983
      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 {
984
        super(client, protocolFactory, transport, resultHandler, false);
985
        this.lastScanType = lastScanType;
986
      }
987
 
988
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
989
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItemsFromLastScanType", org.apache.thrift.protocol.TMessageType.CALL, 0));
990
        getInventoryItemsFromLastScanType_args args = new getInventoryItemsFromLastScanType_args();
991
        args.setLastScanType(lastScanType);
992
        args.write(prot);
993
        prot.writeMessageEnd();
994
      }
995
 
996
      public List<InventoryItem> getResult() throws WarehouseServiceException, org.apache.thrift.TException {
997
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
998
          throw new IllegalStateException("Method call not finished!");
999
        }
1000
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1001
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1002
        return (new Client(prot)).recv_getInventoryItemsFromLastScanType();
1003
      }
1004
    }
1005
 
1006
    public void getInventoryItemFromId(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemFromId_call> resultHandler) throws org.apache.thrift.TException {
1007
      checkReady();
1008
      getInventoryItemFromId_call method_call = new getInventoryItemFromId_call(inventoryItemId, resultHandler, this, ___protocolFactory, ___transport);
1009
      this.___currentMethod = method_call;
1010
      ___manager.call(method_call);
1011
    }
1012
 
1013
    public static class getInventoryItemFromId_call extends org.apache.thrift.async.TAsyncMethodCall {
1014
      private long inventoryItemId;
1015
      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 {
1016
        super(client, protocolFactory, transport, resultHandler, false);
1017
        this.inventoryItemId = inventoryItemId;
1018
      }
1019
 
1020
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1021
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItemFromId", org.apache.thrift.protocol.TMessageType.CALL, 0));
1022
        getInventoryItemFromId_args args = new getInventoryItemFromId_args();
1023
        args.setInventoryItemId(inventoryItemId);
1024
        args.write(prot);
1025
        prot.writeMessageEnd();
1026
      }
1027
 
1028
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1029
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1030
          throw new IllegalStateException("Method call not finished!");
1031
        }
1032
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1033
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1034
        return (new Client(prot)).recv_getInventoryItemFromId();
1035
      }
1036
    }
1037
 
5372 mandeep.dh 1038
    public void getPurchaseScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getPurchaseScans_call> resultHandler) throws org.apache.thrift.TException {
1039
      checkReady();
1040
      getPurchaseScans_call method_call = new getPurchaseScans_call(startDate, endDate, resultHandler, this, ___protocolFactory, ___transport);
1041
      this.___currentMethod = method_call;
1042
      ___manager.call(method_call);
1043
    }
1044
 
1045
    public static class getPurchaseScans_call extends org.apache.thrift.async.TAsyncMethodCall {
1046
      private long startDate;
1047
      private long endDate;
1048
      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 {
1049
        super(client, protocolFactory, transport, resultHandler, false);
1050
        this.startDate = startDate;
1051
        this.endDate = endDate;
1052
      }
1053
 
1054
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1055
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseScans", org.apache.thrift.protocol.TMessageType.CALL, 0));
1056
        getPurchaseScans_args args = new getPurchaseScans_args();
1057
        args.setStartDate(startDate);
1058
        args.setEndDate(endDate);
1059
        args.write(prot);
1060
        prot.writeMessageEnd();
1061
      }
1062
 
1063
      public List<DetailedPurchaseScan> getResult() throws org.apache.thrift.TException {
1064
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1065
          throw new IllegalStateException("Method call not finished!");
1066
        }
1067
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1068
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1069
        return (new Client(prot)).recv_getPurchaseScans();
1070
      }
1071
    }
1072
 
5496 mandeep.dh 1073
    public void fetchScansPerInvoiceNumber(long date, org.apache.thrift.async.AsyncMethodCallback<fetchScansPerInvoiceNumber_call> resultHandler) throws org.apache.thrift.TException {
1074
      checkReady();
1075
      fetchScansPerInvoiceNumber_call method_call = new fetchScansPerInvoiceNumber_call(date, resultHandler, this, ___protocolFactory, ___transport);
1076
      this.___currentMethod = method_call;
1077
      ___manager.call(method_call);
1078
    }
1079
 
1080
    public static class fetchScansPerInvoiceNumber_call extends org.apache.thrift.async.TAsyncMethodCall {
1081
      private long date;
1082
      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 {
1083
        super(client, protocolFactory, transport, resultHandler, false);
1084
        this.date = date;
1085
      }
1086
 
1087
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1088
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fetchScansPerInvoiceNumber", org.apache.thrift.protocol.TMessageType.CALL, 0));
1089
        fetchScansPerInvoiceNumber_args args = new fetchScansPerInvoiceNumber_args();
1090
        args.setDate(date);
1091
        args.write(prot);
1092
        prot.writeMessageEnd();
1093
      }
1094
 
1095
      public List<InvoiceScan> getResult() throws org.apache.thrift.TException {
1096
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1097
          throw new IllegalStateException("Method call not finished!");
1098
        }
1099
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1100
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1101
        return (new Client(prot)).recv_fetchScansPerInvoiceNumber();
1102
      }
1103
    }
1104
 
5620 mandeep.dh 1105
    public void getInventoryItemFromOrder(long orderId, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemFromOrder_call> resultHandler) throws org.apache.thrift.TException {
1106
      checkReady();
1107
      getInventoryItemFromOrder_call method_call = new getInventoryItemFromOrder_call(orderId, resultHandler, this, ___protocolFactory, ___transport);
1108
      this.___currentMethod = method_call;
1109
      ___manager.call(method_call);
1110
    }
1111
 
1112
    public static class getInventoryItemFromOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1113
      private long orderId;
1114
      public getInventoryItemFromOrder_call(long orderId, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemFromOrder_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 {
1115
        super(client, protocolFactory, transport, resultHandler, false);
1116
        this.orderId = orderId;
1117
      }
1118
 
1119
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1120
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItemFromOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1121
        getInventoryItemFromOrder_args args = new getInventoryItemFromOrder_args();
1122
        args.setOrderId(orderId);
1123
        args.write(prot);
1124
        prot.writeMessageEnd();
1125
      }
1126
 
1127
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1128
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1129
          throw new IllegalStateException("Method call not finished!");
1130
        }
1131
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1132
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1133
        return (new Client(prot)).recv_getInventoryItemFromOrder();
1134
      }
1135
    }
1136
 
5711 mandeep.dh 1137
    public void getInventoryAge(org.apache.thrift.async.AsyncMethodCallback<getInventoryAge_call> resultHandler) throws org.apache.thrift.TException {
1138
      checkReady();
1139
      getInventoryAge_call method_call = new getInventoryAge_call(resultHandler, this, ___protocolFactory, ___transport);
1140
      this.___currentMethod = method_call;
1141
      ___manager.call(method_call);
1142
    }
1143
 
1144
    public static class getInventoryAge_call extends org.apache.thrift.async.TAsyncMethodCall {
1145
      public getInventoryAge_call(org.apache.thrift.async.AsyncMethodCallback<getInventoryAge_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 {
1146
        super(client, protocolFactory, transport, resultHandler, false);
1147
      }
1148
 
1149
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1150
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryAge", org.apache.thrift.protocol.TMessageType.CALL, 0));
1151
        getInventoryAge_args args = new getInventoryAge_args();
1152
        args.write(prot);
1153
        prot.writeMessageEnd();
1154
      }
1155
 
1156
      public List<InventoryAge> getResult() throws org.apache.thrift.TException {
1157
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1158
          throw new IllegalStateException("Method call not finished!");
1159
        }
1160
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1161
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1162
        return (new Client(prot)).recv_getInventoryAge();
1163
      }
1164
    }
1165
 
6322 amar.kumar 1166
    public void getInventoryScansForItem(long itemId, long fromDate, long toDate, org.apache.thrift.async.AsyncMethodCallback<getInventoryScansForItem_call> resultHandler) throws org.apache.thrift.TException {
1167
      checkReady();
1168
      getInventoryScansForItem_call method_call = new getInventoryScansForItem_call(itemId, fromDate, toDate, resultHandler, this, ___protocolFactory, ___transport);
1169
      this.___currentMethod = method_call;
1170
      ___manager.call(method_call);
1171
    }
1172
 
1173
    public static class getInventoryScansForItem_call extends org.apache.thrift.async.TAsyncMethodCall {
1174
      private long itemId;
1175
      private long fromDate;
1176
      private long toDate;
1177
      public getInventoryScansForItem_call(long itemId, long fromDate, long toDate, org.apache.thrift.async.AsyncMethodCallback<getInventoryScansForItem_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 {
1178
        super(client, protocolFactory, transport, resultHandler, false);
1179
        this.itemId = itemId;
1180
        this.fromDate = fromDate;
1181
        this.toDate = toDate;
1182
      }
1183
 
1184
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1185
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryScansForItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
1186
        getInventoryScansForItem_args args = new getInventoryScansForItem_args();
1187
        args.setItemId(itemId);
1188
        args.setFromDate(fromDate);
1189
        args.setToDate(toDate);
1190
        args.write(prot);
1191
        prot.writeMessageEnd();
1192
      }
1193
 
1194
      public List<Scan> getResult() throws org.apache.thrift.TException {
1195
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1196
          throw new IllegalStateException("Method call not finished!");
1197
        }
1198
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1199
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1200
        return (new Client(prot)).recv_getInventoryScansForItem();
1201
      }
1202
    }
1203
 
1204
    public void getScanRecordsForSerialNumber(long serialNumber, org.apache.thrift.async.AsyncMethodCallback<getScanRecordsForSerialNumber_call> resultHandler) throws org.apache.thrift.TException {
1205
      checkReady();
1206
      getScanRecordsForSerialNumber_call method_call = new getScanRecordsForSerialNumber_call(serialNumber, resultHandler, this, ___protocolFactory, ___transport);
1207
      this.___currentMethod = method_call;
1208
      ___manager.call(method_call);
1209
    }
1210
 
1211
    public static class getScanRecordsForSerialNumber_call extends org.apache.thrift.async.TAsyncMethodCall {
1212
      private long serialNumber;
1213
      public getScanRecordsForSerialNumber_call(long serialNumber, org.apache.thrift.async.AsyncMethodCallback<getScanRecordsForSerialNumber_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 {
1214
        super(client, protocolFactory, transport, resultHandler, false);
1215
        this.serialNumber = serialNumber;
1216
      }
1217
 
1218
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1219
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getScanRecordsForSerialNumber", org.apache.thrift.protocol.TMessageType.CALL, 0));
1220
        getScanRecordsForSerialNumber_args args = new getScanRecordsForSerialNumber_args();
1221
        args.setSerialNumber(serialNumber);
1222
        args.write(prot);
1223
        prot.writeMessageEnd();
1224
      }
1225
 
1226
      public List<Scan> getResult() throws org.apache.thrift.TException {
1227
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1228
          throw new IllegalStateException("Method call not finished!");
1229
        }
1230
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1231
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1232
        return (new Client(prot)).recv_getScanRecordsForSerialNumber();
1233
      }
1234
    }
1235
 
6467 amar.kumar 1236
    public void scanForPurchaseReturn(List<InventoryItem> saleReturnItems, long vendorId, org.apache.thrift.async.AsyncMethodCallback<scanForPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1237
      checkReady();
1238
      scanForPurchaseReturn_call method_call = new scanForPurchaseReturn_call(saleReturnItems, vendorId, resultHandler, this, ___protocolFactory, ___transport);
1239
      this.___currentMethod = method_call;
1240
      ___manager.call(method_call);
1241
    }
1242
 
1243
    public static class scanForPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1244
      private List<InventoryItem> saleReturnItems;
1245
      private long vendorId;
1246
      public scanForPurchaseReturn_call(List<InventoryItem> saleReturnItems, long vendorId, org.apache.thrift.async.AsyncMethodCallback<scanForPurchaseReturn_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 {
1247
        super(client, protocolFactory, transport, resultHandler, false);
1248
        this.saleReturnItems = saleReturnItems;
1249
        this.vendorId = vendorId;
1250
      }
1251
 
1252
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1253
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanForPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1254
        scanForPurchaseReturn_args args = new scanForPurchaseReturn_args();
1255
        args.setSaleReturnItems(saleReturnItems);
1256
        args.setVendorId(vendorId);
1257
        args.write(prot);
1258
        prot.writeMessageEnd();
1259
      }
1260
 
1261
      public void getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1262
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1263
          throw new IllegalStateException("Method call not finished!");
1264
        }
1265
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1266
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1267
        (new Client(prot)).recv_scanForPurchaseReturn();
1268
      }
1269
    }
1270
 
3430 rajveer 1271
  }
1272
 
1273
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1274
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1275
    public Processor(I iface) {
1276
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
1277
    }
1278
 
1279
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
1280
      super(iface, getProcessMap(processMap));
1281
    }
1282
 
1283
    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 1284
      processMap.put("getInventoryItem", new getInventoryItem());
5361 mandeep.dh 1285
      processMap.put("getNonSeralizedInventoryItem", new getNonSeralizedInventoryItem());
4496 mandeep.dh 1286
      processMap.put("scan", new scan());
1287
      processMap.put("scanSerializedItemForOrder", new scanSerializedItemForOrder());
1288
      processMap.put("scanForOrder", new scanForOrder());
1289
      processMap.put("createItemNumberMapping", new createItemNumberMapping());
4622 amit.gupta 1290
      processMap.put("getItemNumbers", new getItemNumbers());
5110 mandeep.dh 1291
      processMap.put("getItemIds", new getItemIds());
5185 mandeep.dh 1292
      processMap.put("getInventoryItemsFromLastScanType", new getInventoryItemsFromLastScanType());
1293
      processMap.put("getInventoryItemFromId", new getInventoryItemFromId());
5372 mandeep.dh 1294
      processMap.put("getPurchaseScans", new getPurchaseScans());
5496 mandeep.dh 1295
      processMap.put("fetchScansPerInvoiceNumber", new fetchScansPerInvoiceNumber());
5620 mandeep.dh 1296
      processMap.put("getInventoryItemFromOrder", new getInventoryItemFromOrder());
5711 mandeep.dh 1297
      processMap.put("getInventoryAge", new getInventoryAge());
6322 amar.kumar 1298
      processMap.put("getInventoryScansForItem", new getInventoryScansForItem());
1299
      processMap.put("getScanRecordsForSerialNumber", new getScanRecordsForSerialNumber());
6467 amar.kumar 1300
      processMap.put("scanForPurchaseReturn", new scanForPurchaseReturn());
3430 rajveer 1301
      return processMap;
1302
    }
1303
 
4496 mandeep.dh 1304
    private static class getInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItem_args> {
1305
      public getInventoryItem() {
1306
        super("getInventoryItem");
3430 rajveer 1307
      }
1308
 
4496 mandeep.dh 1309
      protected getInventoryItem_args getEmptyArgsInstance() {
1310
        return new getInventoryItem_args();
3430 rajveer 1311
      }
1312
 
4496 mandeep.dh 1313
      protected getInventoryItem_result getResult(I iface, getInventoryItem_args args) throws org.apache.thrift.TException {
1314
        getInventoryItem_result result = new getInventoryItem_result();
4541 mandeep.dh 1315
        try {
1316
          result.success = iface.getInventoryItem(args.serialNumber);
1317
        } catch (WarehouseServiceException wex) {
1318
          result.wex = wex;
1319
        }
3430 rajveer 1320
        return result;
2832 chandransh 1321
      }
1322
    }
1323
 
5361 mandeep.dh 1324
    private static class getNonSeralizedInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getNonSeralizedInventoryItem_args> {
1325
      public getNonSeralizedInventoryItem() {
1326
        super("getNonSeralizedInventoryItem");
3430 rajveer 1327
      }
1328
 
5361 mandeep.dh 1329
      protected getNonSeralizedInventoryItem_args getEmptyArgsInstance() {
1330
        return new getNonSeralizedInventoryItem_args();
3430 rajveer 1331
      }
1332
 
5361 mandeep.dh 1333
      protected getNonSeralizedInventoryItem_result getResult(I iface, getNonSeralizedInventoryItem_args args) throws org.apache.thrift.TException {
1334
        getNonSeralizedInventoryItem_result result = new getNonSeralizedInventoryItem_result();
1335
        try {
5530 mandeep.dh 1336
          result.success = iface.getNonSeralizedInventoryItem(args.itemNumber, args.itemId, args.fulfilmentWarehouseId);
5361 mandeep.dh 1337
        } catch (WarehouseServiceException wex) {
1338
          result.wex = wex;
1339
        }
3430 rajveer 1340
        return result;
2820 chandransh 1341
      }
1342
    }
1343
 
4496 mandeep.dh 1344
    private static class scan<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scan_args> {
1345
      public scan() {
1346
        super("scan");
3430 rajveer 1347
      }
1348
 
4496 mandeep.dh 1349
      protected scan_args getEmptyArgsInstance() {
1350
        return new scan_args();
3430 rajveer 1351
      }
1352
 
4496 mandeep.dh 1353
      protected scan_result getResult(I iface, scan_args args) throws org.apache.thrift.TException {
1354
        scan_result result = new scan_result();
3383 chandransh 1355
        try {
5361 mandeep.dh 1356
          iface.scan(args.inventoryItem, args.type, args.quantity, args.billingWarehouseId);
3383 chandransh 1357
        } catch (WarehouseServiceException wex) {
1358
          result.wex = wex;
1359
        }
3430 rajveer 1360
        return result;
3383 chandransh 1361
      }
1362
    }
1363
 
4496 mandeep.dh 1364
    private static class scanSerializedItemForOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanSerializedItemForOrder_args> {
1365
      public scanSerializedItemForOrder() {
1366
        super("scanSerializedItemForOrder");
3430 rajveer 1367
      }
1368
 
4496 mandeep.dh 1369
      protected scanSerializedItemForOrder_args getEmptyArgsInstance() {
1370
        return new scanSerializedItemForOrder_args();
3430 rajveer 1371
      }
1372
 
4496 mandeep.dh 1373
      protected scanSerializedItemForOrder_result getResult(I iface, scanSerializedItemForOrder_args args) throws org.apache.thrift.TException {
1374
        scanSerializedItemForOrder_result result = new scanSerializedItemForOrder_result();
2820 chandransh 1375
        try {
5110 mandeep.dh 1376
          result.success = iface.scanSerializedItemForOrder(args.serialNumber, args.type, args.orderId, args.fulfilmentWarehouseId, args.quantity, args.billingWarehouseId);
2820 chandransh 1377
        } catch (WarehouseServiceException wex) {
1378
          result.wex = wex;
1379
        }
3430 rajveer 1380
        return result;
2820 chandransh 1381
      }
1382
    }
1383
 
4496 mandeep.dh 1384
    private static class scanForOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanForOrder_args> {
1385
      public scanForOrder() {
1386
        super("scanForOrder");
3430 rajveer 1387
      }
1388
 
4496 mandeep.dh 1389
      protected scanForOrder_args getEmptyArgsInstance() {
1390
        return new scanForOrder_args();
3430 rajveer 1391
      }
1392
 
4496 mandeep.dh 1393
      protected scanForOrder_result getResult(I iface, scanForOrder_args args) throws org.apache.thrift.TException {
1394
        scanForOrder_result result = new scanForOrder_result();
2820 chandransh 1395
        try {
5361 mandeep.dh 1396
          result.success = iface.scanForOrder(args.inventoryItem, args.type, args.quantity, args.orderId, args.fulfilmentWarehouseId, args.billingWarehouseId);
2820 chandransh 1397
        } catch (WarehouseServiceException wex) {
1398
          result.wex = wex;
1399
        }
3430 rajveer 1400
        return result;
2820 chandransh 1401
      }
1402
    }
1403
 
4496 mandeep.dh 1404
    private static class createItemNumberMapping<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createItemNumberMapping_args> {
1405
      public createItemNumberMapping() {
1406
        super("createItemNumberMapping");
1407
      }
1408
 
1409
      protected createItemNumberMapping_args getEmptyArgsInstance() {
1410
        return new createItemNumberMapping_args();
1411
      }
1412
 
1413
      protected createItemNumberMapping_result getResult(I iface, createItemNumberMapping_args args) throws org.apache.thrift.TException {
1414
        createItemNumberMapping_result result = new createItemNumberMapping_result();
1415
        iface.createItemNumberMapping(args.itemNumber, args.itemId);
1416
        return result;
1417
      }
1418
    }
1419
 
4622 amit.gupta 1420
    private static class getItemNumbers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemNumbers_args> {
1421
      public getItemNumbers() {
1422
        super("getItemNumbers");
1423
      }
1424
 
1425
      protected getItemNumbers_args getEmptyArgsInstance() {
1426
        return new getItemNumbers_args();
1427
      }
1428
 
1429
      protected getItemNumbers_result getResult(I iface, getItemNumbers_args args) throws org.apache.thrift.TException {
1430
        getItemNumbers_result result = new getItemNumbers_result();
1431
        result.success = iface.getItemNumbers(args.itemId);
1432
        return result;
1433
      }
1434
    }
1435
 
5110 mandeep.dh 1436
    private static class getItemIds<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemIds_args> {
1437
      public getItemIds() {
1438
        super("getItemIds");
1439
      }
1440
 
1441
      protected getItemIds_args getEmptyArgsInstance() {
1442
        return new getItemIds_args();
1443
      }
1444
 
1445
      protected getItemIds_result getResult(I iface, getItemIds_args args) throws org.apache.thrift.TException {
1446
        getItemIds_result result = new getItemIds_result();
1447
        result.success = iface.getItemIds(args.itemNumber);
1448
        return result;
1449
      }
1450
    }
1451
 
5185 mandeep.dh 1452
    private static class getInventoryItemsFromLastScanType<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItemsFromLastScanType_args> {
1453
      public getInventoryItemsFromLastScanType() {
1454
        super("getInventoryItemsFromLastScanType");
1455
      }
1456
 
1457
      protected getInventoryItemsFromLastScanType_args getEmptyArgsInstance() {
1458
        return new getInventoryItemsFromLastScanType_args();
1459
      }
1460
 
1461
      protected getInventoryItemsFromLastScanType_result getResult(I iface, getInventoryItemsFromLastScanType_args args) throws org.apache.thrift.TException {
1462
        getInventoryItemsFromLastScanType_result result = new getInventoryItemsFromLastScanType_result();
1463
        try {
1464
          result.success = iface.getInventoryItemsFromLastScanType(args.lastScanType);
1465
        } catch (WarehouseServiceException wex) {
1466
          result.wex = wex;
1467
        }
1468
        return result;
1469
      }
1470
    }
1471
 
1472
    private static class getInventoryItemFromId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItemFromId_args> {
1473
      public getInventoryItemFromId() {
1474
        super("getInventoryItemFromId");
1475
      }
1476
 
1477
      protected getInventoryItemFromId_args getEmptyArgsInstance() {
1478
        return new getInventoryItemFromId_args();
1479
      }
1480
 
1481
      protected getInventoryItemFromId_result getResult(I iface, getInventoryItemFromId_args args) throws org.apache.thrift.TException {
1482
        getInventoryItemFromId_result result = new getInventoryItemFromId_result();
1483
        try {
1484
          result.success = iface.getInventoryItemFromId(args.inventoryItemId);
1485
        } catch (WarehouseServiceException wex) {
1486
          result.wex = wex;
1487
        }
1488
        return result;
1489
      }
1490
    }
1491
 
5372 mandeep.dh 1492
    private static class getPurchaseScans<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseScans_args> {
1493
      public getPurchaseScans() {
1494
        super("getPurchaseScans");
1495
      }
1496
 
1497
      protected getPurchaseScans_args getEmptyArgsInstance() {
1498
        return new getPurchaseScans_args();
1499
      }
1500
 
1501
      protected getPurchaseScans_result getResult(I iface, getPurchaseScans_args args) throws org.apache.thrift.TException {
1502
        getPurchaseScans_result result = new getPurchaseScans_result();
1503
        result.success = iface.getPurchaseScans(args.startDate, args.endDate);
1504
        return result;
1505
      }
1506
    }
1507
 
5496 mandeep.dh 1508
    private static class fetchScansPerInvoiceNumber<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fetchScansPerInvoiceNumber_args> {
1509
      public fetchScansPerInvoiceNumber() {
1510
        super("fetchScansPerInvoiceNumber");
1511
      }
1512
 
1513
      protected fetchScansPerInvoiceNumber_args getEmptyArgsInstance() {
1514
        return new fetchScansPerInvoiceNumber_args();
1515
      }
1516
 
1517
      protected fetchScansPerInvoiceNumber_result getResult(I iface, fetchScansPerInvoiceNumber_args args) throws org.apache.thrift.TException {
1518
        fetchScansPerInvoiceNumber_result result = new fetchScansPerInvoiceNumber_result();
1519
        result.success = iface.fetchScansPerInvoiceNumber(args.date);
1520
        return result;
1521
      }
1522
    }
1523
 
5620 mandeep.dh 1524
    private static class getInventoryItemFromOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItemFromOrder_args> {
1525
      public getInventoryItemFromOrder() {
1526
        super("getInventoryItemFromOrder");
1527
      }
1528
 
1529
      protected getInventoryItemFromOrder_args getEmptyArgsInstance() {
1530
        return new getInventoryItemFromOrder_args();
1531
      }
1532
 
1533
      protected getInventoryItemFromOrder_result getResult(I iface, getInventoryItemFromOrder_args args) throws org.apache.thrift.TException {
1534
        getInventoryItemFromOrder_result result = new getInventoryItemFromOrder_result();
1535
        try {
1536
          result.success = iface.getInventoryItemFromOrder(args.orderId);
1537
        } catch (WarehouseServiceException we) {
1538
          result.we = we;
1539
        }
1540
        return result;
1541
      }
1542
    }
1543
 
5711 mandeep.dh 1544
    private static class getInventoryAge<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryAge_args> {
1545
      public getInventoryAge() {
1546
        super("getInventoryAge");
1547
      }
1548
 
1549
      protected getInventoryAge_args getEmptyArgsInstance() {
1550
        return new getInventoryAge_args();
1551
      }
1552
 
1553
      protected getInventoryAge_result getResult(I iface, getInventoryAge_args args) throws org.apache.thrift.TException {
1554
        getInventoryAge_result result = new getInventoryAge_result();
1555
        result.success = iface.getInventoryAge();
1556
        return result;
1557
      }
1558
    }
1559
 
6322 amar.kumar 1560
    private static class getInventoryScansForItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryScansForItem_args> {
1561
      public getInventoryScansForItem() {
1562
        super("getInventoryScansForItem");
1563
      }
1564
 
1565
      protected getInventoryScansForItem_args getEmptyArgsInstance() {
1566
        return new getInventoryScansForItem_args();
1567
      }
1568
 
1569
      protected getInventoryScansForItem_result getResult(I iface, getInventoryScansForItem_args args) throws org.apache.thrift.TException {
1570
        getInventoryScansForItem_result result = new getInventoryScansForItem_result();
1571
        result.success = iface.getInventoryScansForItem(args.itemId, args.fromDate, args.toDate);
1572
        return result;
1573
      }
1574
    }
1575
 
1576
    private static class getScanRecordsForSerialNumber<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getScanRecordsForSerialNumber_args> {
1577
      public getScanRecordsForSerialNumber() {
1578
        super("getScanRecordsForSerialNumber");
1579
      }
1580
 
1581
      protected getScanRecordsForSerialNumber_args getEmptyArgsInstance() {
1582
        return new getScanRecordsForSerialNumber_args();
1583
      }
1584
 
1585
      protected getScanRecordsForSerialNumber_result getResult(I iface, getScanRecordsForSerialNumber_args args) throws org.apache.thrift.TException {
1586
        getScanRecordsForSerialNumber_result result = new getScanRecordsForSerialNumber_result();
1587
        result.success = iface.getScanRecordsForSerialNumber(args.serialNumber);
1588
        return result;
1589
      }
1590
    }
1591
 
6467 amar.kumar 1592
    private static class scanForPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanForPurchaseReturn_args> {
1593
      public scanForPurchaseReturn() {
1594
        super("scanForPurchaseReturn");
1595
      }
1596
 
1597
      protected scanForPurchaseReturn_args getEmptyArgsInstance() {
1598
        return new scanForPurchaseReturn_args();
1599
      }
1600
 
1601
      protected scanForPurchaseReturn_result getResult(I iface, scanForPurchaseReturn_args args) throws org.apache.thrift.TException {
1602
        scanForPurchaseReturn_result result = new scanForPurchaseReturn_result();
1603
        try {
1604
          iface.scanForPurchaseReturn(args.saleReturnItems, args.vendorId);
1605
        } catch (WarehouseServiceException ex) {
1606
          result.ex = ex;
1607
        }
1608
        return result;
1609
      }
1610
    }
1611
 
2820 chandransh 1612
  }
1613
 
4496 mandeep.dh 1614
  public static class getInventoryItem_args implements org.apache.thrift.TBase<getInventoryItem_args, getInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
1615
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_args");
2832 chandransh 1616
 
4496 mandeep.dh 1617
    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 1618
 
4496 mandeep.dh 1619
    private String serialNumber; // required
2832 chandransh 1620
 
1621
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 1622
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 1623
      SERIAL_NUMBER((short)1, "serialNumber");
2832 chandransh 1624
 
1625
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1626
 
1627
      static {
1628
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1629
          byName.put(field.getFieldName(), field);
1630
        }
1631
      }
1632
 
1633
      /**
1634
       * Find the _Fields constant that matches fieldId, or null if its not found.
1635
       */
1636
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 1637
        switch(fieldId) {
4496 mandeep.dh 1638
          case 1: // SERIAL_NUMBER
1639
            return SERIAL_NUMBER;
3430 rajveer 1640
          default:
1641
            return null;
1642
        }
2832 chandransh 1643
      }
1644
 
1645
      /**
1646
       * Find the _Fields constant that matches fieldId, throwing an exception
1647
       * if it is not found.
1648
       */
1649
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1650
        _Fields fields = findByThriftId(fieldId);
1651
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1652
        return fields;
1653
      }
1654
 
1655
      /**
1656
       * Find the _Fields constant that matches name, or null if its not found.
1657
       */
1658
      public static _Fields findByName(String name) {
1659
        return byName.get(name);
1660
      }
1661
 
1662
      private final short _thriftId;
1663
      private final String _fieldName;
1664
 
1665
      _Fields(short thriftId, String fieldName) {
1666
        _thriftId = thriftId;
1667
        _fieldName = fieldName;
1668
      }
1669
 
1670
      public short getThriftFieldId() {
1671
        return _thriftId;
1672
      }
1673
 
1674
      public String getFieldName() {
1675
        return _fieldName;
1676
      }
1677
    }
1678
 
1679
    // isset id assignments
1680
 
3430 rajveer 1681
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2832 chandransh 1682
    static {
3430 rajveer 1683
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 1684
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1685
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
3430 rajveer 1686
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 1687
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItem_args.class, metaDataMap);
2832 chandransh 1688
    }
1689
 
4496 mandeep.dh 1690
    public getInventoryItem_args() {
2832 chandransh 1691
    }
1692
 
4496 mandeep.dh 1693
    public getInventoryItem_args(
1694
      String serialNumber)
2832 chandransh 1695
    {
1696
      this();
4496 mandeep.dh 1697
      this.serialNumber = serialNumber;
2832 chandransh 1698
    }
1699
 
1700
    /**
1701
     * Performs a deep copy on <i>other</i>.
1702
     */
4496 mandeep.dh 1703
    public getInventoryItem_args(getInventoryItem_args other) {
1704
      if (other.isSetSerialNumber()) {
1705
        this.serialNumber = other.serialNumber;
1706
      }
2832 chandransh 1707
    }
1708
 
4496 mandeep.dh 1709
    public getInventoryItem_args deepCopy() {
1710
      return new getInventoryItem_args(this);
2832 chandransh 1711
    }
1712
 
3430 rajveer 1713
    @Override
1714
    public void clear() {
4496 mandeep.dh 1715
      this.serialNumber = null;
2832 chandransh 1716
    }
1717
 
4496 mandeep.dh 1718
    public String getSerialNumber() {
1719
      return this.serialNumber;
2832 chandransh 1720
    }
1721
 
4496 mandeep.dh 1722
    public void setSerialNumber(String serialNumber) {
1723
      this.serialNumber = serialNumber;
2832 chandransh 1724
    }
1725
 
4496 mandeep.dh 1726
    public void unsetSerialNumber() {
1727
      this.serialNumber = null;
2832 chandransh 1728
    }
1729
 
4496 mandeep.dh 1730
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
1731
    public boolean isSetSerialNumber() {
1732
      return this.serialNumber != null;
2832 chandransh 1733
    }
1734
 
4496 mandeep.dh 1735
    public void setSerialNumberIsSet(boolean value) {
1736
      if (!value) {
1737
        this.serialNumber = null;
1738
      }
2832 chandransh 1739
    }
1740
 
1741
    public void setFieldValue(_Fields field, Object value) {
1742
      switch (field) {
4496 mandeep.dh 1743
      case SERIAL_NUMBER:
2832 chandransh 1744
        if (value == null) {
4496 mandeep.dh 1745
          unsetSerialNumber();
2832 chandransh 1746
        } else {
4496 mandeep.dh 1747
          setSerialNumber((String)value);
2832 chandransh 1748
        }
1749
        break;
1750
 
1751
      }
1752
    }
1753
 
1754
    public Object getFieldValue(_Fields field) {
1755
      switch (field) {
4496 mandeep.dh 1756
      case SERIAL_NUMBER:
1757
        return getSerialNumber();
2832 chandransh 1758
 
1759
      }
1760
      throw new IllegalStateException();
1761
    }
1762
 
3430 rajveer 1763
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1764
    public boolean isSet(_Fields field) {
1765
      if (field == null) {
1766
        throw new IllegalArgumentException();
1767
      }
2832 chandransh 1768
 
1769
      switch (field) {
4496 mandeep.dh 1770
      case SERIAL_NUMBER:
1771
        return isSetSerialNumber();
2832 chandransh 1772
      }
1773
      throw new IllegalStateException();
1774
    }
1775
 
1776
    @Override
1777
    public boolean equals(Object that) {
1778
      if (that == null)
1779
        return false;
4496 mandeep.dh 1780
      if (that instanceof getInventoryItem_args)
1781
        return this.equals((getInventoryItem_args)that);
2832 chandransh 1782
      return false;
1783
    }
1784
 
4496 mandeep.dh 1785
    public boolean equals(getInventoryItem_args that) {
2832 chandransh 1786
      if (that == null)
1787
        return false;
1788
 
4496 mandeep.dh 1789
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
1790
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
1791
      if (this_present_serialNumber || that_present_serialNumber) {
1792
        if (!(this_present_serialNumber && that_present_serialNumber))
2832 chandransh 1793
          return false;
4496 mandeep.dh 1794
        if (!this.serialNumber.equals(that.serialNumber))
2832 chandransh 1795
          return false;
1796
      }
1797
 
1798
      return true;
1799
    }
1800
 
1801
    @Override
1802
    public int hashCode() {
1803
      return 0;
1804
    }
1805
 
4496 mandeep.dh 1806
    public int compareTo(getInventoryItem_args other) {
2832 chandransh 1807
      if (!getClass().equals(other.getClass())) {
1808
        return getClass().getName().compareTo(other.getClass().getName());
1809
      }
1810
 
1811
      int lastComparison = 0;
4496 mandeep.dh 1812
      getInventoryItem_args typedOther = (getInventoryItem_args)other;
2832 chandransh 1813
 
4496 mandeep.dh 1814
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
2832 chandransh 1815
      if (lastComparison != 0) {
1816
        return lastComparison;
1817
      }
4496 mandeep.dh 1818
      if (isSetSerialNumber()) {
1819
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
3430 rajveer 1820
        if (lastComparison != 0) {
1821
          return lastComparison;
1822
        }
2832 chandransh 1823
      }
1824
      return 0;
1825
    }
1826
 
3430 rajveer 1827
    public _Fields fieldForId(int fieldId) {
1828
      return _Fields.findByThriftId(fieldId);
1829
    }
1830
 
1831
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1832
      org.apache.thrift.protocol.TField field;
2832 chandransh 1833
      iprot.readStructBegin();
1834
      while (true)
1835
      {
1836
        field = iprot.readFieldBegin();
3430 rajveer 1837
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2832 chandransh 1838
          break;
1839
        }
3430 rajveer 1840
        switch (field.id) {
4496 mandeep.dh 1841
          case 1: // SERIAL_NUMBER
1842
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
1843
              this.serialNumber = iprot.readString();
3430 rajveer 1844
            } else { 
1845
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1846
            }
1847
            break;
1848
          default:
1849
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2832 chandransh 1850
        }
3430 rajveer 1851
        iprot.readFieldEnd();
2832 chandransh 1852
      }
1853
      iprot.readStructEnd();
1854
      validate();
1855
    }
1856
 
3430 rajveer 1857
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2832 chandransh 1858
      validate();
1859
 
1860
      oprot.writeStructBegin(STRUCT_DESC);
4496 mandeep.dh 1861
      if (this.serialNumber != null) {
1862
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
1863
        oprot.writeString(this.serialNumber);
1864
        oprot.writeFieldEnd();
1865
      }
2832 chandransh 1866
      oprot.writeFieldStop();
1867
      oprot.writeStructEnd();
1868
    }
1869
 
1870
    @Override
1871
    public String toString() {
4496 mandeep.dh 1872
      StringBuilder sb = new StringBuilder("getInventoryItem_args(");
2832 chandransh 1873
      boolean first = true;
1874
 
4496 mandeep.dh 1875
      sb.append("serialNumber:");
1876
      if (this.serialNumber == null) {
1877
        sb.append("null");
1878
      } else {
1879
        sb.append(this.serialNumber);
1880
      }
2832 chandransh 1881
      first = false;
1882
      sb.append(")");
1883
      return sb.toString();
1884
    }
1885
 
3430 rajveer 1886
    public void validate() throws org.apache.thrift.TException {
2832 chandransh 1887
      // check for required fields
1888
    }
1889
 
3430 rajveer 1890
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1891
      try {
1892
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1893
      } catch (org.apache.thrift.TException te) {
1894
        throw new java.io.IOException(te);
1895
      }
1896
    }
1897
 
1898
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1899
      try {
1900
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1901
      } catch (org.apache.thrift.TException te) {
1902
        throw new java.io.IOException(te);
1903
      }
1904
    }
1905
 
2832 chandransh 1906
  }
1907
 
4496 mandeep.dh 1908
  public static class getInventoryItem_result implements org.apache.thrift.TBase<getInventoryItem_result, getInventoryItem_result._Fields>, java.io.Serializable, Cloneable   {
1909
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_result");
2832 chandransh 1910
 
3430 rajveer 1911
    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 1912
    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 1913
 
4496 mandeep.dh 1914
    private InventoryItem success; // required
4541 mandeep.dh 1915
    private WarehouseServiceException wex; // required
2832 chandransh 1916
 
1917
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 1918
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4541 mandeep.dh 1919
      SUCCESS((short)0, "success"),
1920
      WEX((short)1, "wex");
2832 chandransh 1921
 
1922
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1923
 
1924
      static {
1925
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1926
          byName.put(field.getFieldName(), field);
1927
        }
1928
      }
1929
 
1930
      /**
1931
       * Find the _Fields constant that matches fieldId, or null if its not found.
1932
       */
1933
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 1934
        switch(fieldId) {
1935
          case 0: // SUCCESS
1936
            return SUCCESS;
4541 mandeep.dh 1937
          case 1: // WEX
1938
            return WEX;
3430 rajveer 1939
          default:
1940
            return null;
1941
        }
2832 chandransh 1942
      }
1943
 
1944
      /**
1945
       * Find the _Fields constant that matches fieldId, throwing an exception
1946
       * if it is not found.
1947
       */
1948
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1949
        _Fields fields = findByThriftId(fieldId);
1950
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1951
        return fields;
1952
      }
1953
 
1954
      /**
1955
       * Find the _Fields constant that matches name, or null if its not found.
1956
       */
1957
      public static _Fields findByName(String name) {
1958
        return byName.get(name);
1959
      }
1960
 
1961
      private final short _thriftId;
1962
      private final String _fieldName;
1963
 
1964
      _Fields(short thriftId, String fieldName) {
1965
        _thriftId = thriftId;
1966
        _fieldName = fieldName;
1967
      }
1968
 
1969
      public short getThriftFieldId() {
1970
        return _thriftId;
1971
      }
1972
 
1973
      public String getFieldName() {
1974
        return _fieldName;
1975
      }
1976
    }
1977
 
1978
    // isset id assignments
1979
 
3430 rajveer 1980
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2832 chandransh 1981
    static {
3430 rajveer 1982
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
1983
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 1984
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
4541 mandeep.dh 1985
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1986
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3430 rajveer 1987
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 1988
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItem_result.class, metaDataMap);
2832 chandransh 1989
    }
1990
 
4496 mandeep.dh 1991
    public getInventoryItem_result() {
2832 chandransh 1992
    }
1993
 
4496 mandeep.dh 1994
    public getInventoryItem_result(
4541 mandeep.dh 1995
      InventoryItem success,
1996
      WarehouseServiceException wex)
2832 chandransh 1997
    {
1998
      this();
1999
      this.success = success;
4541 mandeep.dh 2000
      this.wex = wex;
2832 chandransh 2001
    }
2002
 
2003
    /**
2004
     * Performs a deep copy on <i>other</i>.
2005
     */
4496 mandeep.dh 2006
    public getInventoryItem_result(getInventoryItem_result other) {
2832 chandransh 2007
      if (other.isSetSuccess()) {
4496 mandeep.dh 2008
        this.success = new InventoryItem(other.success);
2832 chandransh 2009
      }
4541 mandeep.dh 2010
      if (other.isSetWex()) {
2011
        this.wex = new WarehouseServiceException(other.wex);
2012
      }
2832 chandransh 2013
    }
2014
 
4496 mandeep.dh 2015
    public getInventoryItem_result deepCopy() {
2016
      return new getInventoryItem_result(this);
2832 chandransh 2017
    }
2018
 
3430 rajveer 2019
    @Override
2020
    public void clear() {
2021
      this.success = null;
4541 mandeep.dh 2022
      this.wex = null;
2832 chandransh 2023
    }
2024
 
4496 mandeep.dh 2025
    public InventoryItem getSuccess() {
2832 chandransh 2026
      return this.success;
2027
    }
2028
 
4496 mandeep.dh 2029
    public void setSuccess(InventoryItem success) {
2832 chandransh 2030
      this.success = success;
2031
    }
2032
 
2033
    public void unsetSuccess() {
2034
      this.success = null;
2035
    }
2036
 
3430 rajveer 2037
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2832 chandransh 2038
    public boolean isSetSuccess() {
2039
      return this.success != null;
2040
    }
2041
 
2042
    public void setSuccessIsSet(boolean value) {
2043
      if (!value) {
2044
        this.success = null;
2045
      }
2046
    }
2047
 
4541 mandeep.dh 2048
    public WarehouseServiceException getWex() {
2049
      return this.wex;
2050
    }
2051
 
2052
    public void setWex(WarehouseServiceException wex) {
2053
      this.wex = wex;
2054
    }
2055
 
2056
    public void unsetWex() {
2057
      this.wex = null;
2058
    }
2059
 
2060
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2061
    public boolean isSetWex() {
2062
      return this.wex != null;
2063
    }
2064
 
2065
    public void setWexIsSet(boolean value) {
2066
      if (!value) {
2067
        this.wex = null;
2068
      }
2069
    }
2070
 
2832 chandransh 2071
    public void setFieldValue(_Fields field, Object value) {
2072
      switch (field) {
2073
      case SUCCESS:
2074
        if (value == null) {
2075
          unsetSuccess();
2076
        } else {
4496 mandeep.dh 2077
          setSuccess((InventoryItem)value);
2832 chandransh 2078
        }
2079
        break;
2080
 
4541 mandeep.dh 2081
      case WEX:
2082
        if (value == null) {
2083
          unsetWex();
2084
        } else {
2085
          setWex((WarehouseServiceException)value);
2086
        }
2087
        break;
2088
 
2832 chandransh 2089
      }
2090
    }
2091
 
2092
    public Object getFieldValue(_Fields field) {
2093
      switch (field) {
2094
      case SUCCESS:
2095
        return getSuccess();
2096
 
4541 mandeep.dh 2097
      case WEX:
2098
        return getWex();
2099
 
2832 chandransh 2100
      }
2101
      throw new IllegalStateException();
2102
    }
2103
 
3430 rajveer 2104
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2105
    public boolean isSet(_Fields field) {
2106
      if (field == null) {
2107
        throw new IllegalArgumentException();
2108
      }
2832 chandransh 2109
 
2110
      switch (field) {
2111
      case SUCCESS:
2112
        return isSetSuccess();
4541 mandeep.dh 2113
      case WEX:
2114
        return isSetWex();
2832 chandransh 2115
      }
2116
      throw new IllegalStateException();
2117
    }
2118
 
2119
    @Override
2120
    public boolean equals(Object that) {
2121
      if (that == null)
2122
        return false;
4496 mandeep.dh 2123
      if (that instanceof getInventoryItem_result)
2124
        return this.equals((getInventoryItem_result)that);
2832 chandransh 2125
      return false;
2126
    }
2127
 
4496 mandeep.dh 2128
    public boolean equals(getInventoryItem_result that) {
2832 chandransh 2129
      if (that == null)
2130
        return false;
2131
 
2132
      boolean this_present_success = true && this.isSetSuccess();
2133
      boolean that_present_success = true && that.isSetSuccess();
2134
      if (this_present_success || that_present_success) {
2135
        if (!(this_present_success && that_present_success))
2136
          return false;
2137
        if (!this.success.equals(that.success))
2138
          return false;
2139
      }
2140
 
4541 mandeep.dh 2141
      boolean this_present_wex = true && this.isSetWex();
2142
      boolean that_present_wex = true && that.isSetWex();
2143
      if (this_present_wex || that_present_wex) {
2144
        if (!(this_present_wex && that_present_wex))
2145
          return false;
2146
        if (!this.wex.equals(that.wex))
2147
          return false;
2148
      }
2149
 
2832 chandransh 2150
      return true;
2151
    }
2152
 
2153
    @Override
2154
    public int hashCode() {
2155
      return 0;
2156
    }
2157
 
4496 mandeep.dh 2158
    public int compareTo(getInventoryItem_result other) {
2832 chandransh 2159
      if (!getClass().equals(other.getClass())) {
2160
        return getClass().getName().compareTo(other.getClass().getName());
2161
      }
2162
 
2163
      int lastComparison = 0;
4496 mandeep.dh 2164
      getInventoryItem_result typedOther = (getInventoryItem_result)other;
2832 chandransh 2165
 
3430 rajveer 2166
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2832 chandransh 2167
      if (lastComparison != 0) {
2168
        return lastComparison;
2169
      }
3430 rajveer 2170
      if (isSetSuccess()) {
2171
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
2172
        if (lastComparison != 0) {
2173
          return lastComparison;
2174
        }
2832 chandransh 2175
      }
4541 mandeep.dh 2176
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2177
      if (lastComparison != 0) {
2178
        return lastComparison;
2179
      }
2180
      if (isSetWex()) {
2181
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
2182
        if (lastComparison != 0) {
2183
          return lastComparison;
2184
        }
2185
      }
2832 chandransh 2186
      return 0;
2187
    }
2188
 
3430 rajveer 2189
    public _Fields fieldForId(int fieldId) {
2190
      return _Fields.findByThriftId(fieldId);
2191
    }
2192
 
2193
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2194
      org.apache.thrift.protocol.TField field;
2832 chandransh 2195
      iprot.readStructBegin();
2196
      while (true)
2197
      {
2198
        field = iprot.readFieldBegin();
3430 rajveer 2199
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2832 chandransh 2200
          break;
2201
        }
3430 rajveer 2202
        switch (field.id) {
2203
          case 0: // SUCCESS
2204
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4496 mandeep.dh 2205
              this.success = new InventoryItem();
3430 rajveer 2206
              this.success.read(iprot);
2207
            } else { 
2208
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2209
            }
2210
            break;
4541 mandeep.dh 2211
          case 1: // WEX
2212
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2213
              this.wex = new WarehouseServiceException();
2214
              this.wex.read(iprot);
2215
            } else { 
2216
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2217
            }
2218
            break;
3430 rajveer 2219
          default:
2220
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2832 chandransh 2221
        }
3430 rajveer 2222
        iprot.readFieldEnd();
2832 chandransh 2223
      }
2224
      iprot.readStructEnd();
2225
      validate();
2226
    }
2227
 
3430 rajveer 2228
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2832 chandransh 2229
      oprot.writeStructBegin(STRUCT_DESC);
2230
 
2231
      if (this.isSetSuccess()) {
2232
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2233
        this.success.write(oprot);
2234
        oprot.writeFieldEnd();
4541 mandeep.dh 2235
      } else if (this.isSetWex()) {
2236
        oprot.writeFieldBegin(WEX_FIELD_DESC);
2237
        this.wex.write(oprot);
2238
        oprot.writeFieldEnd();
2832 chandransh 2239
      }
2240
      oprot.writeFieldStop();
2241
      oprot.writeStructEnd();
2242
    }
2243
 
2244
    @Override
2245
    public String toString() {
4496 mandeep.dh 2246
      StringBuilder sb = new StringBuilder("getInventoryItem_result(");
2832 chandransh 2247
      boolean first = true;
2248
 
2249
      sb.append("success:");
2250
      if (this.success == null) {
2251
        sb.append("null");
2252
      } else {
2253
        sb.append(this.success);
2254
      }
2255
      first = false;
4541 mandeep.dh 2256
      if (!first) sb.append(", ");
2257
      sb.append("wex:");
2258
      if (this.wex == null) {
2259
        sb.append("null");
2260
      } else {
2261
        sb.append(this.wex);
2262
      }
2263
      first = false;
2832 chandransh 2264
      sb.append(")");
2265
      return sb.toString();
2266
    }
2267
 
3430 rajveer 2268
    public void validate() throws org.apache.thrift.TException {
2832 chandransh 2269
      // check for required fields
2270
    }
2271
 
3430 rajveer 2272
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2273
      try {
2274
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2275
      } catch (org.apache.thrift.TException te) {
2276
        throw new java.io.IOException(te);
2277
      }
2278
    }
2279
 
2280
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2281
      try {
2282
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2283
      } catch (org.apache.thrift.TException te) {
2284
        throw new java.io.IOException(te);
2285
      }
2286
    }
2287
 
2832 chandransh 2288
  }
2289
 
5361 mandeep.dh 2290
  public static class getNonSeralizedInventoryItem_args implements org.apache.thrift.TBase<getNonSeralizedInventoryItem_args, getNonSeralizedInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
2291
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNonSeralizedInventoryItem_args");
2820 chandransh 2292
 
5530 mandeep.dh 2293
    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);
2294
    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);
2295
    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 2296
 
5530 mandeep.dh 2297
    private String itemNumber; // required
4496 mandeep.dh 2298
    private long itemId; // required
5530 mandeep.dh 2299
    private long fulfilmentWarehouseId; // required
2820 chandransh 2300
 
2301
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2302
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5530 mandeep.dh 2303
      ITEM_NUMBER((short)1, "itemNumber"),
2304
      ITEM_ID((short)2, "itemId"),
2305
      FULFILMENT_WAREHOUSE_ID((short)3, "fulfilmentWarehouseId");
2820 chandransh 2306
 
2307
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2308
 
2309
      static {
2310
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2311
          byName.put(field.getFieldName(), field);
2312
        }
2313
      }
2314
 
2315
      /**
2316
       * Find the _Fields constant that matches fieldId, or null if its not found.
2317
       */
2318
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2319
        switch(fieldId) {
5530 mandeep.dh 2320
          case 1: // ITEM_NUMBER
2321
            return ITEM_NUMBER;
2322
          case 2: // ITEM_ID
4496 mandeep.dh 2323
            return ITEM_ID;
5530 mandeep.dh 2324
          case 3: // FULFILMENT_WAREHOUSE_ID
2325
            return FULFILMENT_WAREHOUSE_ID;
3430 rajveer 2326
          default:
2327
            return null;
2328
        }
2820 chandransh 2329
      }
2330
 
2331
      /**
2332
       * Find the _Fields constant that matches fieldId, throwing an exception
2333
       * if it is not found.
2334
       */
2335
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2336
        _Fields fields = findByThriftId(fieldId);
2337
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2338
        return fields;
2339
      }
2340
 
2341
      /**
2342
       * Find the _Fields constant that matches name, or null if its not found.
2343
       */
2344
      public static _Fields findByName(String name) {
2345
        return byName.get(name);
2346
      }
2347
 
2348
      private final short _thriftId;
2349
      private final String _fieldName;
2350
 
2351
      _Fields(short thriftId, String fieldName) {
2352
        _thriftId = thriftId;
2353
        _fieldName = fieldName;
2354
      }
2355
 
2356
      public short getThriftFieldId() {
2357
        return _thriftId;
2358
      }
2359
 
2360
      public String getFieldName() {
2361
        return _fieldName;
2362
      }
2363
    }
2364
 
2365
    // isset id assignments
4496 mandeep.dh 2366
    private static final int __ITEMID_ISSET_ID = 0;
5530 mandeep.dh 2367
    private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 1;
5361 mandeep.dh 2368
    private BitSet __isset_bit_vector = new BitSet(2);
2820 chandransh 2369
 
3430 rajveer 2370
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 2371
    static {
3430 rajveer 2372
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5530 mandeep.dh 2373
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2374
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
4496 mandeep.dh 2375
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3430 rajveer 2376
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5530 mandeep.dh 2377
      tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 2378
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 2379
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5361 mandeep.dh 2380
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNonSeralizedInventoryItem_args.class, metaDataMap);
2820 chandransh 2381
    }
2382
 
5361 mandeep.dh 2383
    public getNonSeralizedInventoryItem_args() {
2820 chandransh 2384
    }
2385
 
5361 mandeep.dh 2386
    public getNonSeralizedInventoryItem_args(
5530 mandeep.dh 2387
      String itemNumber,
4496 mandeep.dh 2388
      long itemId,
5530 mandeep.dh 2389
      long fulfilmentWarehouseId)
2820 chandransh 2390
    {
2391
      this();
5530 mandeep.dh 2392
      this.itemNumber = itemNumber;
4496 mandeep.dh 2393
      this.itemId = itemId;
2394
      setItemIdIsSet(true);
5530 mandeep.dh 2395
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
2396
      setFulfilmentWarehouseIdIsSet(true);
2820 chandransh 2397
    }
2398
 
2399
    /**
2400
     * Performs a deep copy on <i>other</i>.
2401
     */
5361 mandeep.dh 2402
    public getNonSeralizedInventoryItem_args(getNonSeralizedInventoryItem_args other) {
2820 chandransh 2403
      __isset_bit_vector.clear();
2404
      __isset_bit_vector.or(other.__isset_bit_vector);
5530 mandeep.dh 2405
      if (other.isSetItemNumber()) {
2406
        this.itemNumber = other.itemNumber;
2407
      }
4496 mandeep.dh 2408
      this.itemId = other.itemId;
5530 mandeep.dh 2409
      this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
2820 chandransh 2410
    }
2411
 
5361 mandeep.dh 2412
    public getNonSeralizedInventoryItem_args deepCopy() {
2413
      return new getNonSeralizedInventoryItem_args(this);
2820 chandransh 2414
    }
2415
 
3430 rajveer 2416
    @Override
2417
    public void clear() {
5530 mandeep.dh 2418
      this.itemNumber = null;
4496 mandeep.dh 2419
      setItemIdIsSet(false);
2420
      this.itemId = 0;
5530 mandeep.dh 2421
      setFulfilmentWarehouseIdIsSet(false);
2422
      this.fulfilmentWarehouseId = 0;
2820 chandransh 2423
    }
2424
 
5530 mandeep.dh 2425
    public String getItemNumber() {
2426
      return this.itemNumber;
2427
    }
2428
 
2429
    public void setItemNumber(String itemNumber) {
2430
      this.itemNumber = itemNumber;
2431
    }
2432
 
2433
    public void unsetItemNumber() {
2434
      this.itemNumber = null;
2435
    }
2436
 
2437
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
2438
    public boolean isSetItemNumber() {
2439
      return this.itemNumber != null;
2440
    }
2441
 
2442
    public void setItemNumberIsSet(boolean value) {
2443
      if (!value) {
2444
        this.itemNumber = null;
2445
      }
2446
    }
2447
 
4496 mandeep.dh 2448
    public long getItemId() {
2449
      return this.itemId;
2820 chandransh 2450
    }
2451
 
4496 mandeep.dh 2452
    public void setItemId(long itemId) {
2453
      this.itemId = itemId;
2454
      setItemIdIsSet(true);
2820 chandransh 2455
    }
2456
 
4496 mandeep.dh 2457
    public void unsetItemId() {
2458
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
2820 chandransh 2459
    }
2460
 
4496 mandeep.dh 2461
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
2462
    public boolean isSetItemId() {
2463
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
2820 chandransh 2464
    }
2465
 
4496 mandeep.dh 2466
    public void setItemIdIsSet(boolean value) {
2467
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
2820 chandransh 2468
    }
2469
 
5530 mandeep.dh 2470
    public long getFulfilmentWarehouseId() {
2471
      return this.fulfilmentWarehouseId;
2820 chandransh 2472
    }
2473
 
5530 mandeep.dh 2474
    public void setFulfilmentWarehouseId(long fulfilmentWarehouseId) {
2475
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
2476
      setFulfilmentWarehouseIdIsSet(true);
2820 chandransh 2477
    }
2478
 
5530 mandeep.dh 2479
    public void unsetFulfilmentWarehouseId() {
2480
      __isset_bit_vector.clear(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 2481
    }
2482
 
5530 mandeep.dh 2483
    /** Returns true if field fulfilmentWarehouseId is set (has been assigned a value) and false otherwise */
2484
    public boolean isSetFulfilmentWarehouseId() {
2485
      return __isset_bit_vector.get(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 2486
    }
2487
 
5530 mandeep.dh 2488
    public void setFulfilmentWarehouseIdIsSet(boolean value) {
2489
      __isset_bit_vector.set(__FULFILMENTWAREHOUSEID_ISSET_ID, value);
2820 chandransh 2490
    }
2491
 
2492
    public void setFieldValue(_Fields field, Object value) {
2493
      switch (field) {
5530 mandeep.dh 2494
      case ITEM_NUMBER:
2495
        if (value == null) {
2496
          unsetItemNumber();
2497
        } else {
2498
          setItemNumber((String)value);
2499
        }
2500
        break;
2501
 
4496 mandeep.dh 2502
      case ITEM_ID:
2820 chandransh 2503
        if (value == null) {
4496 mandeep.dh 2504
          unsetItemId();
2820 chandransh 2505
        } else {
4496 mandeep.dh 2506
          setItemId((Long)value);
2820 chandransh 2507
        }
2508
        break;
2509
 
5530 mandeep.dh 2510
      case FULFILMENT_WAREHOUSE_ID:
2820 chandransh 2511
        if (value == null) {
5530 mandeep.dh 2512
          unsetFulfilmentWarehouseId();
2820 chandransh 2513
        } else {
5530 mandeep.dh 2514
          setFulfilmentWarehouseId((Long)value);
2820 chandransh 2515
        }
2516
        break;
2517
 
2518
      }
2519
    }
2520
 
2521
    public Object getFieldValue(_Fields field) {
2522
      switch (field) {
5530 mandeep.dh 2523
      case ITEM_NUMBER:
2524
        return getItemNumber();
2525
 
4496 mandeep.dh 2526
      case ITEM_ID:
2527
        return Long.valueOf(getItemId());
2820 chandransh 2528
 
5530 mandeep.dh 2529
      case FULFILMENT_WAREHOUSE_ID:
2530
        return Long.valueOf(getFulfilmentWarehouseId());
2820 chandransh 2531
 
2532
      }
2533
      throw new IllegalStateException();
2534
    }
2535
 
3430 rajveer 2536
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2537
    public boolean isSet(_Fields field) {
2538
      if (field == null) {
2539
        throw new IllegalArgumentException();
2540
      }
2820 chandransh 2541
 
2542
      switch (field) {
5530 mandeep.dh 2543
      case ITEM_NUMBER:
2544
        return isSetItemNumber();
4496 mandeep.dh 2545
      case ITEM_ID:
2546
        return isSetItemId();
5530 mandeep.dh 2547
      case FULFILMENT_WAREHOUSE_ID:
2548
        return isSetFulfilmentWarehouseId();
2820 chandransh 2549
      }
2550
      throw new IllegalStateException();
2551
    }
2552
 
2553
    @Override
2554
    public boolean equals(Object that) {
2555
      if (that == null)
2556
        return false;
5361 mandeep.dh 2557
      if (that instanceof getNonSeralizedInventoryItem_args)
2558
        return this.equals((getNonSeralizedInventoryItem_args)that);
2820 chandransh 2559
      return false;
2560
    }
2561
 
5361 mandeep.dh 2562
    public boolean equals(getNonSeralizedInventoryItem_args that) {
2820 chandransh 2563
      if (that == null)
2564
        return false;
2565
 
5530 mandeep.dh 2566
      boolean this_present_itemNumber = true && this.isSetItemNumber();
2567
      boolean that_present_itemNumber = true && that.isSetItemNumber();
2568
      if (this_present_itemNumber || that_present_itemNumber) {
2569
        if (!(this_present_itemNumber && that_present_itemNumber))
2570
          return false;
2571
        if (!this.itemNumber.equals(that.itemNumber))
2572
          return false;
2573
      }
2574
 
4496 mandeep.dh 2575
      boolean this_present_itemId = true;
2576
      boolean that_present_itemId = true;
2577
      if (this_present_itemId || that_present_itemId) {
2578
        if (!(this_present_itemId && that_present_itemId))
2820 chandransh 2579
          return false;
4496 mandeep.dh 2580
        if (this.itemId != that.itemId)
2820 chandransh 2581
          return false;
2582
      }
2583
 
5530 mandeep.dh 2584
      boolean this_present_fulfilmentWarehouseId = true;
2585
      boolean that_present_fulfilmentWarehouseId = true;
2586
      if (this_present_fulfilmentWarehouseId || that_present_fulfilmentWarehouseId) {
2587
        if (!(this_present_fulfilmentWarehouseId && that_present_fulfilmentWarehouseId))
2820 chandransh 2588
          return false;
5530 mandeep.dh 2589
        if (this.fulfilmentWarehouseId != that.fulfilmentWarehouseId)
2820 chandransh 2590
          return false;
2591
      }
2592
 
2593
      return true;
2594
    }
2595
 
2596
    @Override
2597
    public int hashCode() {
2598
      return 0;
2599
    }
2600
 
5361 mandeep.dh 2601
    public int compareTo(getNonSeralizedInventoryItem_args other) {
2820 chandransh 2602
      if (!getClass().equals(other.getClass())) {
2603
        return getClass().getName().compareTo(other.getClass().getName());
2604
      }
2605
 
2606
      int lastComparison = 0;
5361 mandeep.dh 2607
      getNonSeralizedInventoryItem_args typedOther = (getNonSeralizedInventoryItem_args)other;
2820 chandransh 2608
 
5530 mandeep.dh 2609
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
2610
      if (lastComparison != 0) {
2611
        return lastComparison;
2612
      }
2613
      if (isSetItemNumber()) {
2614
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
2615
        if (lastComparison != 0) {
2616
          return lastComparison;
2617
        }
2618
      }
4496 mandeep.dh 2619
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
2820 chandransh 2620
      if (lastComparison != 0) {
2621
        return lastComparison;
2622
      }
4496 mandeep.dh 2623
      if (isSetItemId()) {
2624
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
3430 rajveer 2625
        if (lastComparison != 0) {
2626
          return lastComparison;
2627
        }
2820 chandransh 2628
      }
5530 mandeep.dh 2629
      lastComparison = Boolean.valueOf(isSetFulfilmentWarehouseId()).compareTo(typedOther.isSetFulfilmentWarehouseId());
2820 chandransh 2630
      if (lastComparison != 0) {
2631
        return lastComparison;
2632
      }
5530 mandeep.dh 2633
      if (isSetFulfilmentWarehouseId()) {
2634
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilmentWarehouseId, typedOther.fulfilmentWarehouseId);
3430 rajveer 2635
        if (lastComparison != 0) {
2636
          return lastComparison;
2637
        }
2820 chandransh 2638
      }
2639
      return 0;
2640
    }
2641
 
3430 rajveer 2642
    public _Fields fieldForId(int fieldId) {
2643
      return _Fields.findByThriftId(fieldId);
2644
    }
2645
 
2646
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2647
      org.apache.thrift.protocol.TField field;
2820 chandransh 2648
      iprot.readStructBegin();
2649
      while (true)
2650
      {
2651
        field = iprot.readFieldBegin();
3430 rajveer 2652
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 2653
          break;
2654
        }
3430 rajveer 2655
        switch (field.id) {
5530 mandeep.dh 2656
          case 1: // ITEM_NUMBER
2657
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
2658
              this.itemNumber = iprot.readString();
2659
            } else { 
2660
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2661
            }
2662
            break;
2663
          case 2: // ITEM_ID
3430 rajveer 2664
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4496 mandeep.dh 2665
              this.itemId = iprot.readI64();
2666
              setItemIdIsSet(true);
3430 rajveer 2667
            } else { 
2668
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2669
            }
2670
            break;
5530 mandeep.dh 2671
          case 3: // FULFILMENT_WAREHOUSE_ID
4496 mandeep.dh 2672
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5530 mandeep.dh 2673
              this.fulfilmentWarehouseId = iprot.readI64();
2674
              setFulfilmentWarehouseIdIsSet(true);
3430 rajveer 2675
            } else { 
2676
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2677
            }
2678
            break;
2679
          default:
2680
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 2681
        }
3430 rajveer 2682
        iprot.readFieldEnd();
2820 chandransh 2683
      }
2684
      iprot.readStructEnd();
2685
      validate();
2686
    }
2687
 
3430 rajveer 2688
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 2689
      validate();
2690
 
2691
      oprot.writeStructBegin(STRUCT_DESC);
5530 mandeep.dh 2692
      if (this.itemNumber != null) {
2693
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
2694
        oprot.writeString(this.itemNumber);
2695
        oprot.writeFieldEnd();
2696
      }
4496 mandeep.dh 2697
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
2698
      oprot.writeI64(this.itemId);
2820 chandransh 2699
      oprot.writeFieldEnd();
5530 mandeep.dh 2700
      oprot.writeFieldBegin(FULFILMENT_WAREHOUSE_ID_FIELD_DESC);
2701
      oprot.writeI64(this.fulfilmentWarehouseId);
2820 chandransh 2702
      oprot.writeFieldEnd();
2703
      oprot.writeFieldStop();
2704
      oprot.writeStructEnd();
2705
    }
2706
 
2707
    @Override
2708
    public String toString() {
5361 mandeep.dh 2709
      StringBuilder sb = new StringBuilder("getNonSeralizedInventoryItem_args(");
2820 chandransh 2710
      boolean first = true;
2711
 
5530 mandeep.dh 2712
      sb.append("itemNumber:");
2713
      if (this.itemNumber == null) {
2714
        sb.append("null");
2715
      } else {
2716
        sb.append(this.itemNumber);
2717
      }
2718
      first = false;
2719
      if (!first) sb.append(", ");
4496 mandeep.dh 2720
      sb.append("itemId:");
2721
      sb.append(this.itemId);
2820 chandransh 2722
      first = false;
2723
      if (!first) sb.append(", ");
5530 mandeep.dh 2724
      sb.append("fulfilmentWarehouseId:");
2725
      sb.append(this.fulfilmentWarehouseId);
2820 chandransh 2726
      first = false;
2727
      sb.append(")");
2728
      return sb.toString();
2729
    }
2730
 
3430 rajveer 2731
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 2732
      // check for required fields
2733
    }
2734
 
3430 rajveer 2735
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2736
      try {
2737
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2738
      } catch (org.apache.thrift.TException te) {
2739
        throw new java.io.IOException(te);
2740
      }
2741
    }
2742
 
2743
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2744
      try {
4496 mandeep.dh 2745
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
2746
        __isset_bit_vector = new BitSet(1);
3430 rajveer 2747
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2748
      } catch (org.apache.thrift.TException te) {
2749
        throw new java.io.IOException(te);
2750
      }
2751
    }
2752
 
2820 chandransh 2753
  }
2754
 
5361 mandeep.dh 2755
  public static class getNonSeralizedInventoryItem_result implements org.apache.thrift.TBase<getNonSeralizedInventoryItem_result, getNonSeralizedInventoryItem_result._Fields>, java.io.Serializable, Cloneable   {
2756
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNonSeralizedInventoryItem_result");
2820 chandransh 2757
 
5361 mandeep.dh 2758
    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);
2759
    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 2760
 
5361 mandeep.dh 2761
    private InventoryItem success; // required
2762
    private WarehouseServiceException wex; // required
2820 chandransh 2763
 
2764
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2765
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 2766
      SUCCESS((short)0, "success"),
2767
      WEX((short)1, "wex");
2820 chandransh 2768
 
2769
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2770
 
2771
      static {
2772
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2773
          byName.put(field.getFieldName(), field);
2774
        }
2775
      }
2776
 
2777
      /**
2778
       * Find the _Fields constant that matches fieldId, or null if its not found.
2779
       */
2780
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2781
        switch(fieldId) {
2782
          case 0: // SUCCESS
2783
            return SUCCESS;
5361 mandeep.dh 2784
          case 1: // WEX
2785
            return WEX;
3430 rajveer 2786
          default:
2787
            return null;
2788
        }
2820 chandransh 2789
      }
2790
 
2791
      /**
2792
       * Find the _Fields constant that matches fieldId, throwing an exception
2793
       * if it is not found.
2794
       */
2795
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2796
        _Fields fields = findByThriftId(fieldId);
2797
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2798
        return fields;
2799
      }
2800
 
2801
      /**
2802
       * Find the _Fields constant that matches name, or null if its not found.
2803
       */
2804
      public static _Fields findByName(String name) {
2805
        return byName.get(name);
2806
      }
2807
 
2808
      private final short _thriftId;
2809
      private final String _fieldName;
2810
 
2811
      _Fields(short thriftId, String fieldName) {
2812
        _thriftId = thriftId;
2813
        _fieldName = fieldName;
2814
      }
2815
 
2816
      public short getThriftFieldId() {
2817
        return _thriftId;
2818
      }
2819
 
2820
      public String getFieldName() {
2821
        return _fieldName;
2822
      }
2823
    }
2824
 
2825
    // isset id assignments
2826
 
3430 rajveer 2827
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 2828
    static {
3430 rajveer 2829
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2830
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5361 mandeep.dh 2831
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
2832
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2833
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3430 rajveer 2834
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5361 mandeep.dh 2835
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNonSeralizedInventoryItem_result.class, metaDataMap);
2820 chandransh 2836
    }
2837
 
5361 mandeep.dh 2838
    public getNonSeralizedInventoryItem_result() {
2820 chandransh 2839
    }
2840
 
5361 mandeep.dh 2841
    public getNonSeralizedInventoryItem_result(
2842
      InventoryItem success,
2843
      WarehouseServiceException wex)
2820 chandransh 2844
    {
2845
      this();
2846
      this.success = success;
5361 mandeep.dh 2847
      this.wex = wex;
2820 chandransh 2848
    }
2849
 
2850
    /**
2851
     * Performs a deep copy on <i>other</i>.
2852
     */
5361 mandeep.dh 2853
    public getNonSeralizedInventoryItem_result(getNonSeralizedInventoryItem_result other) {
4496 mandeep.dh 2854
      if (other.isSetSuccess()) {
5361 mandeep.dh 2855
        this.success = new InventoryItem(other.success);
2820 chandransh 2856
      }
5361 mandeep.dh 2857
      if (other.isSetWex()) {
2858
        this.wex = new WarehouseServiceException(other.wex);
2859
      }
2820 chandransh 2860
    }
2861
 
5361 mandeep.dh 2862
    public getNonSeralizedInventoryItem_result deepCopy() {
2863
      return new getNonSeralizedInventoryItem_result(this);
2820 chandransh 2864
    }
2865
 
3430 rajveer 2866
    @Override
2867
    public void clear() {
4496 mandeep.dh 2868
      this.success = null;
5361 mandeep.dh 2869
      this.wex = null;
2820 chandransh 2870
    }
2871
 
5361 mandeep.dh 2872
    public InventoryItem getSuccess() {
2820 chandransh 2873
      return this.success;
2874
    }
2875
 
5361 mandeep.dh 2876
    public void setSuccess(InventoryItem success) {
2820 chandransh 2877
      this.success = success;
2878
    }
2879
 
2880
    public void unsetSuccess() {
4496 mandeep.dh 2881
      this.success = null;
2820 chandransh 2882
    }
2883
 
3430 rajveer 2884
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2820 chandransh 2885
    public boolean isSetSuccess() {
4496 mandeep.dh 2886
      return this.success != null;
2820 chandransh 2887
    }
2888
 
2889
    public void setSuccessIsSet(boolean value) {
4496 mandeep.dh 2890
      if (!value) {
2891
        this.success = null;
2892
      }
2820 chandransh 2893
    }
2894
 
5361 mandeep.dh 2895
    public WarehouseServiceException getWex() {
2896
      return this.wex;
2820 chandransh 2897
    }
2898
 
5361 mandeep.dh 2899
    public void setWex(WarehouseServiceException wex) {
2900
      this.wex = wex;
2820 chandransh 2901
    }
2902
 
5361 mandeep.dh 2903
    public void unsetWex() {
2904
      this.wex = null;
2820 chandransh 2905
    }
2906
 
5361 mandeep.dh 2907
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2908
    public boolean isSetWex() {
2909
      return this.wex != null;
2820 chandransh 2910
    }
2911
 
5361 mandeep.dh 2912
    public void setWexIsSet(boolean value) {
2913
      if (!value) {
2914
        this.wex = null;
2820 chandransh 2915
      }
2916
    }
2917
 
2918
    public void setFieldValue(_Fields field, Object value) {
2919
      switch (field) {
5361 mandeep.dh 2920
      case SUCCESS:
2820 chandransh 2921
        if (value == null) {
5361 mandeep.dh 2922
          unsetSuccess();
2820 chandransh 2923
        } else {
5361 mandeep.dh 2924
          setSuccess((InventoryItem)value);
2820 chandransh 2925
        }
2926
        break;
2927
 
5361 mandeep.dh 2928
      case WEX:
2820 chandransh 2929
        if (value == null) {
5361 mandeep.dh 2930
          unsetWex();
2820 chandransh 2931
        } else {
5361 mandeep.dh 2932
          setWex((WarehouseServiceException)value);
2820 chandransh 2933
        }
2934
        break;
2935
 
2936
      }
2937
    }
2938
 
2939
    public Object getFieldValue(_Fields field) {
2940
      switch (field) {
2941
      case SUCCESS:
4496 mandeep.dh 2942
        return getSuccess();
2820 chandransh 2943
 
5361 mandeep.dh 2944
      case WEX:
2945
        return getWex();
2946
 
2820 chandransh 2947
      }
2948
      throw new IllegalStateException();
2949
    }
2950
 
3430 rajveer 2951
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2952
    public boolean isSet(_Fields field) {
2953
      if (field == null) {
2954
        throw new IllegalArgumentException();
2955
      }
2820 chandransh 2956
 
2957
      switch (field) {
2958
      case SUCCESS:
2959
        return isSetSuccess();
5361 mandeep.dh 2960
      case WEX:
2961
        return isSetWex();
2820 chandransh 2962
      }
2963
      throw new IllegalStateException();
2964
    }
2965
 
2966
    @Override
2967
    public boolean equals(Object that) {
2968
      if (that == null)
2969
        return false;
5361 mandeep.dh 2970
      if (that instanceof getNonSeralizedInventoryItem_result)
2971
        return this.equals((getNonSeralizedInventoryItem_result)that);
2820 chandransh 2972
      return false;
2973
    }
2974
 
5361 mandeep.dh 2975
    public boolean equals(getNonSeralizedInventoryItem_result that) {
2820 chandransh 2976
      if (that == null)
2977
        return false;
2978
 
4496 mandeep.dh 2979
      boolean this_present_success = true && this.isSetSuccess();
2980
      boolean that_present_success = true && that.isSetSuccess();
2820 chandransh 2981
      if (this_present_success || that_present_success) {
2982
        if (!(this_present_success && that_present_success))
2983
          return false;
4496 mandeep.dh 2984
        if (!this.success.equals(that.success))
2820 chandransh 2985
          return false;
2986
      }
2987
 
5361 mandeep.dh 2988
      boolean this_present_wex = true && this.isSetWex();
2989
      boolean that_present_wex = true && that.isSetWex();
2990
      if (this_present_wex || that_present_wex) {
2991
        if (!(this_present_wex && that_present_wex))
4496 mandeep.dh 2992
          return false;
5361 mandeep.dh 2993
        if (!this.wex.equals(that.wex))
4496 mandeep.dh 2994
          return false;
2995
      }
2996
 
2997
      return true;
2998
    }
2999
 
3000
    @Override
3001
    public int hashCode() {
3002
      return 0;
3003
    }
3004
 
5361 mandeep.dh 3005
    public int compareTo(getNonSeralizedInventoryItem_result other) {
4496 mandeep.dh 3006
      if (!getClass().equals(other.getClass())) {
3007
        return getClass().getName().compareTo(other.getClass().getName());
3008
      }
3009
 
3010
      int lastComparison = 0;
5361 mandeep.dh 3011
      getNonSeralizedInventoryItem_result typedOther = (getNonSeralizedInventoryItem_result)other;
4496 mandeep.dh 3012
 
3013
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3014
      if (lastComparison != 0) {
3015
        return lastComparison;
3016
      }
3017
      if (isSetSuccess()) {
3018
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3019
        if (lastComparison != 0) {
3020
          return lastComparison;
3021
        }
3022
      }
5361 mandeep.dh 3023
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 3024
      if (lastComparison != 0) {
3025
        return lastComparison;
3026
      }
5361 mandeep.dh 3027
      if (isSetWex()) {
3028
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
3430 rajveer 3029
        if (lastComparison != 0) {
3030
          return lastComparison;
3031
        }
2820 chandransh 3032
      }
3033
      return 0;
3034
    }
3035
 
3430 rajveer 3036
    public _Fields fieldForId(int fieldId) {
3037
      return _Fields.findByThriftId(fieldId);
3038
    }
3039
 
3040
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3041
      org.apache.thrift.protocol.TField field;
2820 chandransh 3042
      iprot.readStructBegin();
3043
      while (true)
3044
      {
3045
        field = iprot.readFieldBegin();
3430 rajveer 3046
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 3047
          break;
3048
        }
3430 rajveer 3049
        switch (field.id) {
5361 mandeep.dh 3050
          case 0: // SUCCESS
3051
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3052
              this.success = new InventoryItem();
3053
              this.success.read(iprot);
3430 rajveer 3054
            } else { 
3055
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3056
            }
3057
            break;
5361 mandeep.dh 3058
          case 1: // WEX
3059
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3060
              this.wex = new WarehouseServiceException();
3061
              this.wex.read(iprot);
4496 mandeep.dh 3062
            } else { 
3063
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3064
            }
3065
            break;
3066
          default:
3067
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3068
        }
3069
        iprot.readFieldEnd();
3070
      }
3071
      iprot.readStructEnd();
3072
      validate();
3073
    }
3074
 
3075
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3076
      oprot.writeStructBegin(STRUCT_DESC);
3077
 
3078
      if (this.isSetSuccess()) {
3079
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5361 mandeep.dh 3080
        this.success.write(oprot);
4496 mandeep.dh 3081
        oprot.writeFieldEnd();
5361 mandeep.dh 3082
      } else if (this.isSetWex()) {
3083
        oprot.writeFieldBegin(WEX_FIELD_DESC);
3084
        this.wex.write(oprot);
3085
        oprot.writeFieldEnd();
4496 mandeep.dh 3086
      }
3087
      oprot.writeFieldStop();
3088
      oprot.writeStructEnd();
3089
    }
3090
 
3091
    @Override
3092
    public String toString() {
5361 mandeep.dh 3093
      StringBuilder sb = new StringBuilder("getNonSeralizedInventoryItem_result(");
4496 mandeep.dh 3094
      boolean first = true;
3095
 
3096
      sb.append("success:");
3097
      if (this.success == null) {
3098
        sb.append("null");
3099
      } else {
3100
        sb.append(this.success);
3101
      }
3102
      first = false;
5361 mandeep.dh 3103
      if (!first) sb.append(", ");
3104
      sb.append("wex:");
3105
      if (this.wex == null) {
3106
        sb.append("null");
3107
      } else {
3108
        sb.append(this.wex);
3109
      }
3110
      first = false;
4496 mandeep.dh 3111
      sb.append(")");
3112
      return sb.toString();
3113
    }
3114
 
3115
    public void validate() throws org.apache.thrift.TException {
3116
      // check for required fields
3117
    }
3118
 
3119
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3120
      try {
3121
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3122
      } catch (org.apache.thrift.TException te) {
3123
        throw new java.io.IOException(te);
3124
      }
3125
    }
3126
 
3127
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3128
      try {
3129
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3130
      } catch (org.apache.thrift.TException te) {
3131
        throw new java.io.IOException(te);
3132
      }
3133
    }
3134
 
3135
  }
3136
 
3137
  public static class scan_args implements org.apache.thrift.TBase<scan_args, scan_args._Fields>, java.io.Serializable, Cloneable   {
3138
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scan_args");
3383 chandransh 3139
 
5361 mandeep.dh 3140
    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 3141
    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);
3142
    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 3143
    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 3144
 
5361 mandeep.dh 3145
    private InventoryItem inventoryItem; // required
4496 mandeep.dh 3146
    private ScanType type; // required
3147
    private long quantity; // required
5361 mandeep.dh 3148
    private long billingWarehouseId; // required
3383 chandransh 3149
 
3150
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 3151
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 3152
      INVENTORY_ITEM((short)1, "inventoryItem"),
4496 mandeep.dh 3153
      /**
3154
       * 
3155
       * @see ScanType
3156
       */
3157
      TYPE((short)2, "type"),
3158
      QUANTITY((short)3, "quantity"),
5361 mandeep.dh 3159
      BILLING_WAREHOUSE_ID((short)4, "billingWarehouseId");
3383 chandransh 3160
 
3161
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3162
 
3163
      static {
3164
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3165
          byName.put(field.getFieldName(), field);
3166
        }
3167
      }
3168
 
3169
      /**
3170
       * Find the _Fields constant that matches fieldId, or null if its not found.
3171
       */
3172
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 3173
        switch(fieldId) {
5361 mandeep.dh 3174
          case 1: // INVENTORY_ITEM
3175
            return INVENTORY_ITEM;
4496 mandeep.dh 3176
          case 2: // TYPE
3177
            return TYPE;
3178
          case 3: // QUANTITY
3179
            return QUANTITY;
5361 mandeep.dh 3180
          case 4: // BILLING_WAREHOUSE_ID
3181
            return BILLING_WAREHOUSE_ID;
3430 rajveer 3182
          default:
3183
            return null;
3184
        }
3383 chandransh 3185
      }
3186
 
3187
      /**
3188
       * Find the _Fields constant that matches fieldId, throwing an exception
3189
       * if it is not found.
3190
       */
3191
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3192
        _Fields fields = findByThriftId(fieldId);
3193
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3194
        return fields;
3195
      }
3196
 
3197
      /**
3198
       * Find the _Fields constant that matches name, or null if its not found.
3199
       */
3200
      public static _Fields findByName(String name) {
3201
        return byName.get(name);
3202
      }
3203
 
3204
      private final short _thriftId;
3205
      private final String _fieldName;
3206
 
3207
      _Fields(short thriftId, String fieldName) {
3208
        _thriftId = thriftId;
3209
        _fieldName = fieldName;
3210
      }
3211
 
3212
      public short getThriftFieldId() {
3213
        return _thriftId;
3214
      }
3215
 
3216
      public String getFieldName() {
3217
        return _fieldName;
3218
      }
3219
    }
3220
 
3221
    // isset id assignments
5361 mandeep.dh 3222
    private static final int __QUANTITY_ISSET_ID = 0;
3223
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 1;
3224
    private BitSet __isset_bit_vector = new BitSet(2);
3383 chandransh 3225
 
3430 rajveer 3226
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3383 chandransh 3227
    static {
3430 rajveer 3228
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5361 mandeep.dh 3229
      tmpMap.put(_Fields.INVENTORY_ITEM, new org.apache.thrift.meta_data.FieldMetaData("inventoryItem", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3230
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
4496 mandeep.dh 3231
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3232
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
3233
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3234
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5361 mandeep.dh 3235
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 3236
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 3237
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 3238
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scan_args.class, metaDataMap);
3383 chandransh 3239
    }
3240
 
4496 mandeep.dh 3241
    public scan_args() {
3383 chandransh 3242
    }
3243
 
4496 mandeep.dh 3244
    public scan_args(
5361 mandeep.dh 3245
      InventoryItem inventoryItem,
4496 mandeep.dh 3246
      ScanType type,
3247
      long quantity,
5361 mandeep.dh 3248
      long billingWarehouseId)
3383 chandransh 3249
    {
3250
      this();
5361 mandeep.dh 3251
      this.inventoryItem = inventoryItem;
4496 mandeep.dh 3252
      this.type = type;
3253
      this.quantity = quantity;
3254
      setQuantityIsSet(true);
5361 mandeep.dh 3255
      this.billingWarehouseId = billingWarehouseId;
3256
      setBillingWarehouseIdIsSet(true);
3383 chandransh 3257
    }
3258
 
3259
    /**
3260
     * Performs a deep copy on <i>other</i>.
3261
     */
4496 mandeep.dh 3262
    public scan_args(scan_args other) {
3383 chandransh 3263
      __isset_bit_vector.clear();
3264
      __isset_bit_vector.or(other.__isset_bit_vector);
5361 mandeep.dh 3265
      if (other.isSetInventoryItem()) {
3266
        this.inventoryItem = new InventoryItem(other.inventoryItem);
3267
      }
4496 mandeep.dh 3268
      if (other.isSetType()) {
3269
        this.type = other.type;
3270
      }
3271
      this.quantity = other.quantity;
5361 mandeep.dh 3272
      this.billingWarehouseId = other.billingWarehouseId;
3383 chandransh 3273
    }
3274
 
4496 mandeep.dh 3275
    public scan_args deepCopy() {
3276
      return new scan_args(this);
3383 chandransh 3277
    }
3278
 
3430 rajveer 3279
    @Override
3280
    public void clear() {
5361 mandeep.dh 3281
      this.inventoryItem = null;
4496 mandeep.dh 3282
      this.type = null;
3283
      setQuantityIsSet(false);
3284
      this.quantity = 0;
5361 mandeep.dh 3285
      setBillingWarehouseIdIsSet(false);
3286
      this.billingWarehouseId = 0;
3383 chandransh 3287
    }
3288
 
5361 mandeep.dh 3289
    public InventoryItem getInventoryItem() {
3290
      return this.inventoryItem;
3383 chandransh 3291
    }
3292
 
5361 mandeep.dh 3293
    public void setInventoryItem(InventoryItem inventoryItem) {
3294
      this.inventoryItem = inventoryItem;
3383 chandransh 3295
    }
3296
 
5361 mandeep.dh 3297
    public void unsetInventoryItem() {
3298
      this.inventoryItem = null;
3383 chandransh 3299
    }
3300
 
5361 mandeep.dh 3301
    /** Returns true if field inventoryItem is set (has been assigned a value) and false otherwise */
3302
    public boolean isSetInventoryItem() {
3303
      return this.inventoryItem != null;
3383 chandransh 3304
    }
3305
 
5361 mandeep.dh 3306
    public void setInventoryItemIsSet(boolean value) {
3307
      if (!value) {
3308
        this.inventoryItem = null;
3309
      }
3383 chandransh 3310
    }
3311
 
4496 mandeep.dh 3312
    /**
3313
     * 
3314
     * @see ScanType
3315
     */
3316
    public ScanType getType() {
3317
      return this.type;
3383 chandransh 3318
    }
3319
 
4496 mandeep.dh 3320
    /**
3321
     * 
3322
     * @see ScanType
3323
     */
3324
    public void setType(ScanType type) {
3325
      this.type = type;
3383 chandransh 3326
    }
3327
 
4496 mandeep.dh 3328
    public void unsetType() {
3329
      this.type = null;
3383 chandransh 3330
    }
3331
 
4496 mandeep.dh 3332
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
3333
    public boolean isSetType() {
3334
      return this.type != null;
3383 chandransh 3335
    }
3336
 
4496 mandeep.dh 3337
    public void setTypeIsSet(boolean value) {
3338
      if (!value) {
3339
        this.type = null;
3340
      }
3383 chandransh 3341
    }
3342
 
4496 mandeep.dh 3343
    public long getQuantity() {
3344
      return this.quantity;
3345
    }
3346
 
3347
    public void setQuantity(long quantity) {
3348
      this.quantity = quantity;
3349
      setQuantityIsSet(true);
3350
    }
3351
 
3352
    public void unsetQuantity() {
3353
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
3354
    }
3355
 
3356
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
3357
    public boolean isSetQuantity() {
3358
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
3359
    }
3360
 
3361
    public void setQuantityIsSet(boolean value) {
3362
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
3363
    }
3364
 
5361 mandeep.dh 3365
    public long getBillingWarehouseId() {
3366
      return this.billingWarehouseId;
4496 mandeep.dh 3367
    }
3368
 
5361 mandeep.dh 3369
    public void setBillingWarehouseId(long billingWarehouseId) {
3370
      this.billingWarehouseId = billingWarehouseId;
3371
      setBillingWarehouseIdIsSet(true);
4496 mandeep.dh 3372
    }
3373
 
5361 mandeep.dh 3374
    public void unsetBillingWarehouseId() {
3375
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 3376
    }
3377
 
5361 mandeep.dh 3378
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
3379
    public boolean isSetBillingWarehouseId() {
3380
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 3381
    }
3382
 
5361 mandeep.dh 3383
    public void setBillingWarehouseIdIsSet(boolean value) {
3384
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
4496 mandeep.dh 3385
    }
3386
 
3383 chandransh 3387
    public void setFieldValue(_Fields field, Object value) {
3388
      switch (field) {
5361 mandeep.dh 3389
      case INVENTORY_ITEM:
3383 chandransh 3390
        if (value == null) {
5361 mandeep.dh 3391
          unsetInventoryItem();
3383 chandransh 3392
        } else {
5361 mandeep.dh 3393
          setInventoryItem((InventoryItem)value);
3383 chandransh 3394
        }
3395
        break;
3396
 
4496 mandeep.dh 3397
      case TYPE:
3383 chandransh 3398
        if (value == null) {
4496 mandeep.dh 3399
          unsetType();
3383 chandransh 3400
        } else {
4496 mandeep.dh 3401
          setType((ScanType)value);
3383 chandransh 3402
        }
3403
        break;
3404
 
4496 mandeep.dh 3405
      case QUANTITY:
3406
        if (value == null) {
3407
          unsetQuantity();
3408
        } else {
3409
          setQuantity((Long)value);
3410
        }
3411
        break;
3412
 
5361 mandeep.dh 3413
      case BILLING_WAREHOUSE_ID:
4496 mandeep.dh 3414
        if (value == null) {
5361 mandeep.dh 3415
          unsetBillingWarehouseId();
4496 mandeep.dh 3416
        } else {
5361 mandeep.dh 3417
          setBillingWarehouseId((Long)value);
4496 mandeep.dh 3418
        }
3419
        break;
3420
 
3383 chandransh 3421
      }
3422
    }
3423
 
3424
    public Object getFieldValue(_Fields field) {
3425
      switch (field) {
5361 mandeep.dh 3426
      case INVENTORY_ITEM:
3427
        return getInventoryItem();
3383 chandransh 3428
 
4496 mandeep.dh 3429
      case TYPE:
3430
        return getType();
3383 chandransh 3431
 
4496 mandeep.dh 3432
      case QUANTITY:
3433
        return Long.valueOf(getQuantity());
3434
 
5361 mandeep.dh 3435
      case BILLING_WAREHOUSE_ID:
3436
        return Long.valueOf(getBillingWarehouseId());
4496 mandeep.dh 3437
 
3383 chandransh 3438
      }
3439
      throw new IllegalStateException();
3440
    }
3441
 
3430 rajveer 3442
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3443
    public boolean isSet(_Fields field) {
3444
      if (field == null) {
3445
        throw new IllegalArgumentException();
3446
      }
3383 chandransh 3447
 
3448
      switch (field) {
5361 mandeep.dh 3449
      case INVENTORY_ITEM:
3450
        return isSetInventoryItem();
4496 mandeep.dh 3451
      case TYPE:
3452
        return isSetType();
3453
      case QUANTITY:
3454
        return isSetQuantity();
5361 mandeep.dh 3455
      case BILLING_WAREHOUSE_ID:
3456
        return isSetBillingWarehouseId();
3383 chandransh 3457
      }
3458
      throw new IllegalStateException();
3459
    }
3460
 
3461
    @Override
3462
    public boolean equals(Object that) {
3463
      if (that == null)
3464
        return false;
4496 mandeep.dh 3465
      if (that instanceof scan_args)
3466
        return this.equals((scan_args)that);
3383 chandransh 3467
      return false;
3468
    }
3469
 
4496 mandeep.dh 3470
    public boolean equals(scan_args that) {
3383 chandransh 3471
      if (that == null)
3472
        return false;
3473
 
5361 mandeep.dh 3474
      boolean this_present_inventoryItem = true && this.isSetInventoryItem();
3475
      boolean that_present_inventoryItem = true && that.isSetInventoryItem();
3476
      if (this_present_inventoryItem || that_present_inventoryItem) {
3477
        if (!(this_present_inventoryItem && that_present_inventoryItem))
3383 chandransh 3478
          return false;
5361 mandeep.dh 3479
        if (!this.inventoryItem.equals(that.inventoryItem))
3383 chandransh 3480
          return false;
3481
      }
3482
 
4496 mandeep.dh 3483
      boolean this_present_type = true && this.isSetType();
3484
      boolean that_present_type = true && that.isSetType();
3485
      if (this_present_type || that_present_type) {
3486
        if (!(this_present_type && that_present_type))
3383 chandransh 3487
          return false;
4496 mandeep.dh 3488
        if (!this.type.equals(that.type))
3383 chandransh 3489
          return false;
3490
      }
3491
 
4496 mandeep.dh 3492
      boolean this_present_quantity = true;
3493
      boolean that_present_quantity = true;
3494
      if (this_present_quantity || that_present_quantity) {
3495
        if (!(this_present_quantity && that_present_quantity))
3496
          return false;
3497
        if (this.quantity != that.quantity)
3498
          return false;
3499
      }
3500
 
5361 mandeep.dh 3501
      boolean this_present_billingWarehouseId = true;
3502
      boolean that_present_billingWarehouseId = true;
3503
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
3504
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
4496 mandeep.dh 3505
          return false;
5361 mandeep.dh 3506
        if (this.billingWarehouseId != that.billingWarehouseId)
4496 mandeep.dh 3507
          return false;
3508
      }
3509
 
3383 chandransh 3510
      return true;
3511
    }
3512
 
3513
    @Override
3514
    public int hashCode() {
3515
      return 0;
3516
    }
3517
 
4496 mandeep.dh 3518
    public int compareTo(scan_args other) {
3383 chandransh 3519
      if (!getClass().equals(other.getClass())) {
3520
        return getClass().getName().compareTo(other.getClass().getName());
3521
      }
3522
 
3523
      int lastComparison = 0;
4496 mandeep.dh 3524
      scan_args typedOther = (scan_args)other;
3383 chandransh 3525
 
5361 mandeep.dh 3526
      lastComparison = Boolean.valueOf(isSetInventoryItem()).compareTo(typedOther.isSetInventoryItem());
3383 chandransh 3527
      if (lastComparison != 0) {
3528
        return lastComparison;
3529
      }
5361 mandeep.dh 3530
      if (isSetInventoryItem()) {
3531
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItem, typedOther.inventoryItem);
3430 rajveer 3532
        if (lastComparison != 0) {
3533
          return lastComparison;
3534
        }
3383 chandransh 3535
      }
4496 mandeep.dh 3536
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
3383 chandransh 3537
      if (lastComparison != 0) {
3538
        return lastComparison;
3539
      }
4496 mandeep.dh 3540
      if (isSetType()) {
3541
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 3542
        if (lastComparison != 0) {
3543
          return lastComparison;
3544
        }
3383 chandransh 3545
      }
4496 mandeep.dh 3546
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
3547
      if (lastComparison != 0) {
3548
        return lastComparison;
3549
      }
3550
      if (isSetQuantity()) {
3551
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
3552
        if (lastComparison != 0) {
3553
          return lastComparison;
3554
        }
3555
      }
5361 mandeep.dh 3556
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
4496 mandeep.dh 3557
      if (lastComparison != 0) {
3558
        return lastComparison;
3559
      }
5361 mandeep.dh 3560
      if (isSetBillingWarehouseId()) {
3561
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
4496 mandeep.dh 3562
        if (lastComparison != 0) {
3563
          return lastComparison;
3564
        }
3565
      }
3383 chandransh 3566
      return 0;
3567
    }
3568
 
3430 rajveer 3569
    public _Fields fieldForId(int fieldId) {
3570
      return _Fields.findByThriftId(fieldId);
3571
    }
3572
 
3573
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3574
      org.apache.thrift.protocol.TField field;
3383 chandransh 3575
      iprot.readStructBegin();
3576
      while (true)
3577
      {
3578
        field = iprot.readFieldBegin();
3430 rajveer 3579
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3383 chandransh 3580
          break;
3581
        }
3430 rajveer 3582
        switch (field.id) {
5361 mandeep.dh 3583
          case 1: // INVENTORY_ITEM
3584
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3585
              this.inventoryItem = new InventoryItem();
3586
              this.inventoryItem.read(iprot);
3430 rajveer 3587
            } else { 
3588
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3589
            }
3590
            break;
4496 mandeep.dh 3591
          case 2: // TYPE
3592
            if (field.type == org.apache.thrift.protocol.TType.I32) {
3593
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 3594
            } else { 
3595
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3596
            }
3597
            break;
4496 mandeep.dh 3598
          case 3: // QUANTITY
3599
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3600
              this.quantity = iprot.readI64();
3601
              setQuantityIsSet(true);
3602
            } else { 
3603
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3604
            }
3605
            break;
5361 mandeep.dh 3606
          case 4: // BILLING_WAREHOUSE_ID
4496 mandeep.dh 3607
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5361 mandeep.dh 3608
              this.billingWarehouseId = iprot.readI64();
3609
              setBillingWarehouseIdIsSet(true);
4496 mandeep.dh 3610
            } else { 
3611
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3612
            }
3613
            break;
3430 rajveer 3614
          default:
3615
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3383 chandransh 3616
        }
3430 rajveer 3617
        iprot.readFieldEnd();
3383 chandransh 3618
      }
3619
      iprot.readStructEnd();
3620
      validate();
3621
    }
3622
 
3430 rajveer 3623
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3383 chandransh 3624
      validate();
3625
 
3626
      oprot.writeStructBegin(STRUCT_DESC);
5361 mandeep.dh 3627
      if (this.inventoryItem != null) {
3628
        oprot.writeFieldBegin(INVENTORY_ITEM_FIELD_DESC);
3629
        this.inventoryItem.write(oprot);
3630
        oprot.writeFieldEnd();
3631
      }
4496 mandeep.dh 3632
      if (this.type != null) {
3633
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
3634
        oprot.writeI32(this.type.getValue());
3635
        oprot.writeFieldEnd();
3636
      }
3637
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
3638
      oprot.writeI64(this.quantity);
3383 chandransh 3639
      oprot.writeFieldEnd();
5361 mandeep.dh 3640
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
3641
      oprot.writeI64(this.billingWarehouseId);
4496 mandeep.dh 3642
      oprot.writeFieldEnd();
3383 chandransh 3643
      oprot.writeFieldStop();
3644
      oprot.writeStructEnd();
3645
    }
3646
 
3647
    @Override
3648
    public String toString() {
4496 mandeep.dh 3649
      StringBuilder sb = new StringBuilder("scan_args(");
3383 chandransh 3650
      boolean first = true;
3651
 
5361 mandeep.dh 3652
      sb.append("inventoryItem:");
3653
      if (this.inventoryItem == null) {
3654
        sb.append("null");
3655
      } else {
3656
        sb.append(this.inventoryItem);
3657
      }
3383 chandransh 3658
      first = false;
3659
      if (!first) sb.append(", ");
4496 mandeep.dh 3660
      sb.append("type:");
3661
      if (this.type == null) {
3662
        sb.append("null");
3663
      } else {
3664
        sb.append(this.type);
3665
      }
3383 chandransh 3666
      first = false;
4496 mandeep.dh 3667
      if (!first) sb.append(", ");
3668
      sb.append("quantity:");
3669
      sb.append(this.quantity);
3670
      first = false;
3671
      if (!first) sb.append(", ");
5361 mandeep.dh 3672
      sb.append("billingWarehouseId:");
3673
      sb.append(this.billingWarehouseId);
4496 mandeep.dh 3674
      first = false;
3383 chandransh 3675
      sb.append(")");
3676
      return sb.toString();
3677
    }
3678
 
3430 rajveer 3679
    public void validate() throws org.apache.thrift.TException {
3383 chandransh 3680
      // check for required fields
3681
    }
3682
 
3430 rajveer 3683
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3684
      try {
3685
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3686
      } catch (org.apache.thrift.TException te) {
3687
        throw new java.io.IOException(te);
3688
      }
3689
    }
3690
 
3691
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3692
      try {
4496 mandeep.dh 3693
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
3694
        __isset_bit_vector = new BitSet(1);
3430 rajveer 3695
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3696
      } catch (org.apache.thrift.TException te) {
3697
        throw new java.io.IOException(te);
3698
      }
3699
    }
3700
 
3383 chandransh 3701
  }
3702
 
4496 mandeep.dh 3703
  public static class scan_result implements org.apache.thrift.TBase<scan_result, scan_result._Fields>, java.io.Serializable, Cloneable   {
3704
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scan_result");
3383 chandransh 3705
 
3430 rajveer 3706
    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 3707
 
3430 rajveer 3708
    private WarehouseServiceException wex; // required
3383 chandransh 3709
 
3710
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 3711
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3383 chandransh 3712
      WEX((short)1, "wex");
3713
 
3714
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3715
 
3716
      static {
3717
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3718
          byName.put(field.getFieldName(), field);
3719
        }
3720
      }
3721
 
3722
      /**
3723
       * Find the _Fields constant that matches fieldId, or null if its not found.
3724
       */
3725
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 3726
        switch(fieldId) {
3727
          case 1: // WEX
3728
            return WEX;
3729
          default:
3730
            return null;
3731
        }
3383 chandransh 3732
      }
3733
 
3734
      /**
3735
       * Find the _Fields constant that matches fieldId, throwing an exception
3736
       * if it is not found.
3737
       */
3738
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3739
        _Fields fields = findByThriftId(fieldId);
3740
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3741
        return fields;
3742
      }
3743
 
3744
      /**
3745
       * Find the _Fields constant that matches name, or null if its not found.
3746
       */
3747
      public static _Fields findByName(String name) {
3748
        return byName.get(name);
3749
      }
3750
 
3751
      private final short _thriftId;
3752
      private final String _fieldName;
3753
 
3754
      _Fields(short thriftId, String fieldName) {
3755
        _thriftId = thriftId;
3756
        _fieldName = fieldName;
3757
      }
3758
 
3759
      public short getThriftFieldId() {
3760
        return _thriftId;
3761
      }
3762
 
3763
      public String getFieldName() {
3764
        return _fieldName;
3765
      }
3766
    }
3767
 
3768
    // isset id assignments
3769
 
3430 rajveer 3770
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3383 chandransh 3771
    static {
3430 rajveer 3772
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3773
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3774
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3775
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 3776
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scan_result.class, metaDataMap);
3383 chandransh 3777
    }
3778
 
4496 mandeep.dh 3779
    public scan_result() {
3383 chandransh 3780
    }
3781
 
4496 mandeep.dh 3782
    public scan_result(
3383 chandransh 3783
      WarehouseServiceException wex)
3784
    {
3785
      this();
3786
      this.wex = wex;
3787
    }
3788
 
3789
    /**
3790
     * Performs a deep copy on <i>other</i>.
3791
     */
4496 mandeep.dh 3792
    public scan_result(scan_result other) {
3383 chandransh 3793
      if (other.isSetWex()) {
3794
        this.wex = new WarehouseServiceException(other.wex);
3795
      }
3796
    }
3797
 
4496 mandeep.dh 3798
    public scan_result deepCopy() {
3799
      return new scan_result(this);
3383 chandransh 3800
    }
3801
 
3430 rajveer 3802
    @Override
3803
    public void clear() {
3804
      this.wex = null;
3383 chandransh 3805
    }
3806
 
3807
    public WarehouseServiceException getWex() {
3808
      return this.wex;
3809
    }
3810
 
3430 rajveer 3811
    public void setWex(WarehouseServiceException wex) {
3383 chandransh 3812
      this.wex = wex;
3813
    }
3814
 
3815
    public void unsetWex() {
3816
      this.wex = null;
3817
    }
3818
 
3430 rajveer 3819
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
3383 chandransh 3820
    public boolean isSetWex() {
3821
      return this.wex != null;
3822
    }
3823
 
3824
    public void setWexIsSet(boolean value) {
3825
      if (!value) {
3826
        this.wex = null;
3827
      }
3828
    }
3829
 
3830
    public void setFieldValue(_Fields field, Object value) {
3831
      switch (field) {
3832
      case WEX:
3833
        if (value == null) {
3834
          unsetWex();
3835
        } else {
3836
          setWex((WarehouseServiceException)value);
3837
        }
3838
        break;
3839
 
3840
      }
3841
    }
3842
 
3843
    public Object getFieldValue(_Fields field) {
3844
      switch (field) {
3845
      case WEX:
3846
        return getWex();
3847
 
3848
      }
3849
      throw new IllegalStateException();
3850
    }
3851
 
3430 rajveer 3852
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3853
    public boolean isSet(_Fields field) {
3854
      if (field == null) {
3855
        throw new IllegalArgumentException();
3856
      }
3383 chandransh 3857
 
3858
      switch (field) {
3859
      case WEX:
3860
        return isSetWex();
3861
      }
3862
      throw new IllegalStateException();
3863
    }
3864
 
3865
    @Override
3866
    public boolean equals(Object that) {
3867
      if (that == null)
3868
        return false;
4496 mandeep.dh 3869
      if (that instanceof scan_result)
3870
        return this.equals((scan_result)that);
3383 chandransh 3871
      return false;
3872
    }
3873
 
4496 mandeep.dh 3874
    public boolean equals(scan_result that) {
3383 chandransh 3875
      if (that == null)
3876
        return false;
3877
 
3878
      boolean this_present_wex = true && this.isSetWex();
3879
      boolean that_present_wex = true && that.isSetWex();
3880
      if (this_present_wex || that_present_wex) {
3881
        if (!(this_present_wex && that_present_wex))
3882
          return false;
3883
        if (!this.wex.equals(that.wex))
3884
          return false;
3885
      }
3886
 
3887
      return true;
3888
    }
3889
 
3890
    @Override
3891
    public int hashCode() {
3892
      return 0;
3893
    }
3894
 
4496 mandeep.dh 3895
    public int compareTo(scan_result other) {
3383 chandransh 3896
      if (!getClass().equals(other.getClass())) {
3897
        return getClass().getName().compareTo(other.getClass().getName());
3898
      }
3899
 
3900
      int lastComparison = 0;
4496 mandeep.dh 3901
      scan_result typedOther = (scan_result)other;
3383 chandransh 3902
 
3430 rajveer 3903
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
3383 chandransh 3904
      if (lastComparison != 0) {
3905
        return lastComparison;
3906
      }
3430 rajveer 3907
      if (isSetWex()) {
3908
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
3909
        if (lastComparison != 0) {
3910
          return lastComparison;
3911
        }
3383 chandransh 3912
      }
3913
      return 0;
3914
    }
3915
 
3430 rajveer 3916
    public _Fields fieldForId(int fieldId) {
3917
      return _Fields.findByThriftId(fieldId);
3918
    }
3919
 
3920
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3921
      org.apache.thrift.protocol.TField field;
3383 chandransh 3922
      iprot.readStructBegin();
3923
      while (true)
3924
      {
3925
        field = iprot.readFieldBegin();
3430 rajveer 3926
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3383 chandransh 3927
          break;
3928
        }
3430 rajveer 3929
        switch (field.id) {
3930
          case 1: // WEX
3931
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3932
              this.wex = new WarehouseServiceException();
3933
              this.wex.read(iprot);
3934
            } else { 
3935
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3936
            }
3937
            break;
3938
          default:
3939
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3383 chandransh 3940
        }
3430 rajveer 3941
        iprot.readFieldEnd();
3383 chandransh 3942
      }
3943
      iprot.readStructEnd();
3944
      validate();
3945
    }
3946
 
3430 rajveer 3947
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3383 chandransh 3948
      oprot.writeStructBegin(STRUCT_DESC);
3949
 
4496 mandeep.dh 3950
      if (this.isSetWex()) {
3383 chandransh 3951
        oprot.writeFieldBegin(WEX_FIELD_DESC);
3952
        this.wex.write(oprot);
3953
        oprot.writeFieldEnd();
3954
      }
3955
      oprot.writeFieldStop();
3956
      oprot.writeStructEnd();
3957
    }
3958
 
3959
    @Override
3960
    public String toString() {
4496 mandeep.dh 3961
      StringBuilder sb = new StringBuilder("scan_result(");
3383 chandransh 3962
      boolean first = true;
3963
 
3964
      sb.append("wex:");
3965
      if (this.wex == null) {
3966
        sb.append("null");
3967
      } else {
3968
        sb.append(this.wex);
3969
      }
3970
      first = false;
3971
      sb.append(")");
3972
      return sb.toString();
3973
    }
3974
 
3430 rajveer 3975
    public void validate() throws org.apache.thrift.TException {
3383 chandransh 3976
      // check for required fields
3977
    }
3978
 
3430 rajveer 3979
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3980
      try {
3981
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3982
      } catch (org.apache.thrift.TException te) {
3983
        throw new java.io.IOException(te);
3984
      }
3985
    }
3986
 
3987
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3988
      try {
3989
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3990
      } catch (org.apache.thrift.TException te) {
3991
        throw new java.io.IOException(te);
3992
      }
3993
    }
3994
 
3383 chandransh 3995
  }
3996
 
4496 mandeep.dh 3997
  public static class scanSerializedItemForOrder_args implements org.apache.thrift.TBase<scanSerializedItemForOrder_args, scanSerializedItemForOrder_args._Fields>, java.io.Serializable, Cloneable   {
3998
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItemForOrder_args");
2820 chandransh 3999
 
4555 mandeep.dh 4000
    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 4001
    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);
4002
    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 4003
    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);
4004
    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);
4005
    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 4006
 
4555 mandeep.dh 4007
    private String serialNumber; // required
3430 rajveer 4008
    private ScanType type; // required
4496 mandeep.dh 4009
    private long orderId; // required
5110 mandeep.dh 4010
    private long fulfilmentWarehouseId; // required
4011
    private double quantity; // required
4012
    private long billingWarehouseId; // required
2820 chandransh 4013
 
4014
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4015
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4555 mandeep.dh 4016
      SERIAL_NUMBER((short)1, "serialNumber"),
2820 chandransh 4017
      /**
4018
       * 
4019
       * @see ScanType
4020
       */
4496 mandeep.dh 4021
      TYPE((short)2, "type"),
4022
      ORDER_ID((short)3, "orderId"),
5110 mandeep.dh 4023
      FULFILMENT_WAREHOUSE_ID((short)4, "fulfilmentWarehouseId"),
4024
      QUANTITY((short)5, "quantity"),
4025
      BILLING_WAREHOUSE_ID((short)6, "billingWarehouseId");
2820 chandransh 4026
 
4027
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4028
 
4029
      static {
4030
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4031
          byName.put(field.getFieldName(), field);
4032
        }
4033
      }
4034
 
4035
      /**
4036
       * Find the _Fields constant that matches fieldId, or null if its not found.
4037
       */
4038
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4039
        switch(fieldId) {
4555 mandeep.dh 4040
          case 1: // SERIAL_NUMBER
4041
            return SERIAL_NUMBER;
4496 mandeep.dh 4042
          case 2: // TYPE
3430 rajveer 4043
            return TYPE;
4496 mandeep.dh 4044
          case 3: // ORDER_ID
4045
            return ORDER_ID;
5110 mandeep.dh 4046
          case 4: // FULFILMENT_WAREHOUSE_ID
4047
            return FULFILMENT_WAREHOUSE_ID;
4048
          case 5: // QUANTITY
4049
            return QUANTITY;
4050
          case 6: // BILLING_WAREHOUSE_ID
4051
            return BILLING_WAREHOUSE_ID;
3430 rajveer 4052
          default:
4053
            return null;
4054
        }
2820 chandransh 4055
      }
4056
 
4057
      /**
4058
       * Find the _Fields constant that matches fieldId, throwing an exception
4059
       * if it is not found.
4060
       */
4061
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4062
        _Fields fields = findByThriftId(fieldId);
4063
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4064
        return fields;
4065
      }
4066
 
4067
      /**
4068
       * Find the _Fields constant that matches name, or null if its not found.
4069
       */
4070
      public static _Fields findByName(String name) {
4071
        return byName.get(name);
4072
      }
4073
 
4074
      private final short _thriftId;
4075
      private final String _fieldName;
4076
 
4077
      _Fields(short thriftId, String fieldName) {
4078
        _thriftId = thriftId;
4079
        _fieldName = fieldName;
4080
      }
4081
 
4082
      public short getThriftFieldId() {
4083
        return _thriftId;
4084
      }
4085
 
4086
      public String getFieldName() {
4087
        return _fieldName;
4088
      }
4089
    }
4090
 
4091
    // isset id assignments
4555 mandeep.dh 4092
    private static final int __ORDERID_ISSET_ID = 0;
5110 mandeep.dh 4093
    private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 1;
4094
    private static final int __QUANTITY_ISSET_ID = 2;
4095
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 3;
4096
    private BitSet __isset_bit_vector = new BitSet(4);
2820 chandransh 4097
 
3430 rajveer 4098
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 4099
    static {
3430 rajveer 4100
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4555 mandeep.dh 4101
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4102
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
3430 rajveer 4103
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4104
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
4496 mandeep.dh 4105
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4106
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 4107
      tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 4108
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 4109
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4110
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
4111
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4112
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 4113
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 4114
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanSerializedItemForOrder_args.class, metaDataMap);
2820 chandransh 4115
    }
4116
 
4496 mandeep.dh 4117
    public scanSerializedItemForOrder_args() {
2820 chandransh 4118
    }
4119
 
4496 mandeep.dh 4120
    public scanSerializedItemForOrder_args(
4555 mandeep.dh 4121
      String serialNumber,
4496 mandeep.dh 4122
      ScanType type,
4123
      long orderId,
5110 mandeep.dh 4124
      long fulfilmentWarehouseId,
4125
      double quantity,
4126
      long billingWarehouseId)
2820 chandransh 4127
    {
4128
      this();
4555 mandeep.dh 4129
      this.serialNumber = serialNumber;
2820 chandransh 4130
      this.type = type;
4496 mandeep.dh 4131
      this.orderId = orderId;
4132
      setOrderIdIsSet(true);
5110 mandeep.dh 4133
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
4134
      setFulfilmentWarehouseIdIsSet(true);
4135
      this.quantity = quantity;
4136
      setQuantityIsSet(true);
4137
      this.billingWarehouseId = billingWarehouseId;
4138
      setBillingWarehouseIdIsSet(true);
2820 chandransh 4139
    }
4140
 
4141
    /**
4142
     * Performs a deep copy on <i>other</i>.
4143
     */
4496 mandeep.dh 4144
    public scanSerializedItemForOrder_args(scanSerializedItemForOrder_args other) {
2820 chandransh 4145
      __isset_bit_vector.clear();
4146
      __isset_bit_vector.or(other.__isset_bit_vector);
4555 mandeep.dh 4147
      if (other.isSetSerialNumber()) {
4148
        this.serialNumber = other.serialNumber;
4149
      }
2820 chandransh 4150
      if (other.isSetType()) {
4151
        this.type = other.type;
4152
      }
4496 mandeep.dh 4153
      this.orderId = other.orderId;
5110 mandeep.dh 4154
      this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
4155
      this.quantity = other.quantity;
4156
      this.billingWarehouseId = other.billingWarehouseId;
2820 chandransh 4157
    }
4158
 
4496 mandeep.dh 4159
    public scanSerializedItemForOrder_args deepCopy() {
4160
      return new scanSerializedItemForOrder_args(this);
2820 chandransh 4161
    }
4162
 
3430 rajveer 4163
    @Override
4164
    public void clear() {
4555 mandeep.dh 4165
      this.serialNumber = null;
3430 rajveer 4166
      this.type = null;
4496 mandeep.dh 4167
      setOrderIdIsSet(false);
4168
      this.orderId = 0;
5110 mandeep.dh 4169
      setFulfilmentWarehouseIdIsSet(false);
4170
      this.fulfilmentWarehouseId = 0;
4171
      setQuantityIsSet(false);
4172
      this.quantity = 0.0;
4173
      setBillingWarehouseIdIsSet(false);
4174
      this.billingWarehouseId = 0;
2820 chandransh 4175
    }
4176
 
4555 mandeep.dh 4177
    public String getSerialNumber() {
4178
      return this.serialNumber;
2820 chandransh 4179
    }
4180
 
4555 mandeep.dh 4181
    public void setSerialNumber(String serialNumber) {
4182
      this.serialNumber = serialNumber;
2820 chandransh 4183
    }
4184
 
4555 mandeep.dh 4185
    public void unsetSerialNumber() {
4186
      this.serialNumber = null;
2820 chandransh 4187
    }
4188
 
4555 mandeep.dh 4189
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
4190
    public boolean isSetSerialNumber() {
4191
      return this.serialNumber != null;
2820 chandransh 4192
    }
4193
 
4555 mandeep.dh 4194
    public void setSerialNumberIsSet(boolean value) {
4195
      if (!value) {
4196
        this.serialNumber = null;
4197
      }
2820 chandransh 4198
    }
4199
 
4496 mandeep.dh 4200
    /**
4201
     * 
4202
     * @see ScanType
4203
     */
4204
    public ScanType getType() {
4205
      return this.type;
2820 chandransh 4206
    }
4207
 
4496 mandeep.dh 4208
    /**
4209
     * 
4210
     * @see ScanType
4211
     */
4212
    public void setType(ScanType type) {
4213
      this.type = type;
2820 chandransh 4214
    }
4215
 
4496 mandeep.dh 4216
    public void unsetType() {
4217
      this.type = null;
2820 chandransh 4218
    }
4219
 
4496 mandeep.dh 4220
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
4221
    public boolean isSetType() {
4222
      return this.type != null;
2820 chandransh 4223
    }
4224
 
4496 mandeep.dh 4225
    public void setTypeIsSet(boolean value) {
2820 chandransh 4226
      if (!value) {
4496 mandeep.dh 4227
        this.type = null;
2820 chandransh 4228
      }
4229
    }
4230
 
4496 mandeep.dh 4231
    public long getOrderId() {
4232
      return this.orderId;
2820 chandransh 4233
    }
4234
 
4496 mandeep.dh 4235
    public void setOrderId(long orderId) {
4236
      this.orderId = orderId;
4237
      setOrderIdIsSet(true);
2820 chandransh 4238
    }
4239
 
4496 mandeep.dh 4240
    public void unsetOrderId() {
4241
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
2820 chandransh 4242
    }
4243
 
4496 mandeep.dh 4244
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
4245
    public boolean isSetOrderId() {
4246
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
2820 chandransh 4247
    }
4248
 
4496 mandeep.dh 4249
    public void setOrderIdIsSet(boolean value) {
4250
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
2820 chandransh 4251
    }
4252
 
5110 mandeep.dh 4253
    public long getFulfilmentWarehouseId() {
4254
      return this.fulfilmentWarehouseId;
2820 chandransh 4255
    }
4256
 
5110 mandeep.dh 4257
    public void setFulfilmentWarehouseId(long fulfilmentWarehouseId) {
4258
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
4259
      setFulfilmentWarehouseIdIsSet(true);
2820 chandransh 4260
    }
4261
 
5110 mandeep.dh 4262
    public void unsetFulfilmentWarehouseId() {
4263
      __isset_bit_vector.clear(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 4264
    }
4265
 
5110 mandeep.dh 4266
    /** Returns true if field fulfilmentWarehouseId is set (has been assigned a value) and false otherwise */
4267
    public boolean isSetFulfilmentWarehouseId() {
4268
      return __isset_bit_vector.get(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 4269
    }
4270
 
5110 mandeep.dh 4271
    public void setFulfilmentWarehouseIdIsSet(boolean value) {
4272
      __isset_bit_vector.set(__FULFILMENTWAREHOUSEID_ISSET_ID, value);
2820 chandransh 4273
    }
4274
 
5110 mandeep.dh 4275
    public double getQuantity() {
4276
      return this.quantity;
4277
    }
4278
 
4279
    public void setQuantity(double quantity) {
4280
      this.quantity = quantity;
4281
      setQuantityIsSet(true);
4282
    }
4283
 
4284
    public void unsetQuantity() {
4285
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
4286
    }
4287
 
4288
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
4289
    public boolean isSetQuantity() {
4290
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
4291
    }
4292
 
4293
    public void setQuantityIsSet(boolean value) {
4294
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
4295
    }
4296
 
4297
    public long getBillingWarehouseId() {
4298
      return this.billingWarehouseId;
4299
    }
4300
 
4301
    public void setBillingWarehouseId(long billingWarehouseId) {
4302
      this.billingWarehouseId = billingWarehouseId;
4303
      setBillingWarehouseIdIsSet(true);
4304
    }
4305
 
4306
    public void unsetBillingWarehouseId() {
4307
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
4308
    }
4309
 
4310
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
4311
    public boolean isSetBillingWarehouseId() {
4312
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
4313
    }
4314
 
4315
    public void setBillingWarehouseIdIsSet(boolean value) {
4316
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
4317
    }
4318
 
2820 chandransh 4319
    public void setFieldValue(_Fields field, Object value) {
4320
      switch (field) {
4555 mandeep.dh 4321
      case SERIAL_NUMBER:
2820 chandransh 4322
        if (value == null) {
4555 mandeep.dh 4323
          unsetSerialNumber();
2820 chandransh 4324
        } else {
4555 mandeep.dh 4325
          setSerialNumber((String)value);
2820 chandransh 4326
        }
4327
        break;
4328
 
4496 mandeep.dh 4329
      case TYPE:
2820 chandransh 4330
        if (value == null) {
4496 mandeep.dh 4331
          unsetType();
2820 chandransh 4332
        } else {
4496 mandeep.dh 4333
          setType((ScanType)value);
2820 chandransh 4334
        }
4335
        break;
4336
 
4496 mandeep.dh 4337
      case ORDER_ID:
2820 chandransh 4338
        if (value == null) {
4496 mandeep.dh 4339
          unsetOrderId();
2820 chandransh 4340
        } else {
4496 mandeep.dh 4341
          setOrderId((Long)value);
2820 chandransh 4342
        }
4343
        break;
4344
 
5110 mandeep.dh 4345
      case FULFILMENT_WAREHOUSE_ID:
2820 chandransh 4346
        if (value == null) {
5110 mandeep.dh 4347
          unsetFulfilmentWarehouseId();
2820 chandransh 4348
        } else {
5110 mandeep.dh 4349
          setFulfilmentWarehouseId((Long)value);
2820 chandransh 4350
        }
4351
        break;
4352
 
5110 mandeep.dh 4353
      case QUANTITY:
4354
        if (value == null) {
4355
          unsetQuantity();
4356
        } else {
4357
          setQuantity((Double)value);
4358
        }
4359
        break;
4360
 
4361
      case BILLING_WAREHOUSE_ID:
4362
        if (value == null) {
4363
          unsetBillingWarehouseId();
4364
        } else {
4365
          setBillingWarehouseId((Long)value);
4366
        }
4367
        break;
4368
 
2820 chandransh 4369
      }
4370
    }
4371
 
4372
    public Object getFieldValue(_Fields field) {
4373
      switch (field) {
4555 mandeep.dh 4374
      case SERIAL_NUMBER:
4375
        return getSerialNumber();
2820 chandransh 4376
 
4377
      case TYPE:
4378
        return getType();
4379
 
4496 mandeep.dh 4380
      case ORDER_ID:
4381
        return Long.valueOf(getOrderId());
4382
 
5110 mandeep.dh 4383
      case FULFILMENT_WAREHOUSE_ID:
4384
        return Long.valueOf(getFulfilmentWarehouseId());
4496 mandeep.dh 4385
 
5110 mandeep.dh 4386
      case QUANTITY:
4387
        return Double.valueOf(getQuantity());
4388
 
4389
      case BILLING_WAREHOUSE_ID:
4390
        return Long.valueOf(getBillingWarehouseId());
4391
 
2820 chandransh 4392
      }
4393
      throw new IllegalStateException();
4394
    }
4395
 
3430 rajveer 4396
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4397
    public boolean isSet(_Fields field) {
4398
      if (field == null) {
4399
        throw new IllegalArgumentException();
4400
      }
2820 chandransh 4401
 
4402
      switch (field) {
4555 mandeep.dh 4403
      case SERIAL_NUMBER:
4404
        return isSetSerialNumber();
2820 chandransh 4405
      case TYPE:
4406
        return isSetType();
4496 mandeep.dh 4407
      case ORDER_ID:
4408
        return isSetOrderId();
5110 mandeep.dh 4409
      case FULFILMENT_WAREHOUSE_ID:
4410
        return isSetFulfilmentWarehouseId();
4411
      case QUANTITY:
4412
        return isSetQuantity();
4413
      case BILLING_WAREHOUSE_ID:
4414
        return isSetBillingWarehouseId();
2820 chandransh 4415
      }
4416
      throw new IllegalStateException();
4417
    }
4418
 
4419
    @Override
4420
    public boolean equals(Object that) {
4421
      if (that == null)
4422
        return false;
4496 mandeep.dh 4423
      if (that instanceof scanSerializedItemForOrder_args)
4424
        return this.equals((scanSerializedItemForOrder_args)that);
2820 chandransh 4425
      return false;
4426
    }
4427
 
4496 mandeep.dh 4428
    public boolean equals(scanSerializedItemForOrder_args that) {
2820 chandransh 4429
      if (that == null)
4430
        return false;
4431
 
4555 mandeep.dh 4432
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
4433
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
4434
      if (this_present_serialNumber || that_present_serialNumber) {
4435
        if (!(this_present_serialNumber && that_present_serialNumber))
2820 chandransh 4436
          return false;
4555 mandeep.dh 4437
        if (!this.serialNumber.equals(that.serialNumber))
2820 chandransh 4438
          return false;
4439
      }
4440
 
4496 mandeep.dh 4441
      boolean this_present_type = true && this.isSetType();
4442
      boolean that_present_type = true && that.isSetType();
4443
      if (this_present_type || that_present_type) {
4444
        if (!(this_present_type && that_present_type))
2820 chandransh 4445
          return false;
4496 mandeep.dh 4446
        if (!this.type.equals(that.type))
2820 chandransh 4447
          return false;
4448
      }
4449
 
4496 mandeep.dh 4450
      boolean this_present_orderId = true;
4451
      boolean that_present_orderId = true;
4452
      if (this_present_orderId || that_present_orderId) {
4453
        if (!(this_present_orderId && that_present_orderId))
2820 chandransh 4454
          return false;
4496 mandeep.dh 4455
        if (this.orderId != that.orderId)
2820 chandransh 4456
          return false;
4457
      }
4458
 
5110 mandeep.dh 4459
      boolean this_present_fulfilmentWarehouseId = true;
4460
      boolean that_present_fulfilmentWarehouseId = true;
4461
      if (this_present_fulfilmentWarehouseId || that_present_fulfilmentWarehouseId) {
4462
        if (!(this_present_fulfilmentWarehouseId && that_present_fulfilmentWarehouseId))
2820 chandransh 4463
          return false;
5110 mandeep.dh 4464
        if (this.fulfilmentWarehouseId != that.fulfilmentWarehouseId)
2820 chandransh 4465
          return false;
4466
      }
4467
 
5110 mandeep.dh 4468
      boolean this_present_quantity = true;
4469
      boolean that_present_quantity = true;
4470
      if (this_present_quantity || that_present_quantity) {
4471
        if (!(this_present_quantity && that_present_quantity))
4472
          return false;
4473
        if (this.quantity != that.quantity)
4474
          return false;
4475
      }
4476
 
4477
      boolean this_present_billingWarehouseId = true;
4478
      boolean that_present_billingWarehouseId = true;
4479
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
4480
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
4481
          return false;
4482
        if (this.billingWarehouseId != that.billingWarehouseId)
4483
          return false;
4484
      }
4485
 
2820 chandransh 4486
      return true;
4487
    }
4488
 
4489
    @Override
4490
    public int hashCode() {
4491
      return 0;
4492
    }
4493
 
4496 mandeep.dh 4494
    public int compareTo(scanSerializedItemForOrder_args other) {
2820 chandransh 4495
      if (!getClass().equals(other.getClass())) {
4496
        return getClass().getName().compareTo(other.getClass().getName());
4497
      }
4498
 
4499
      int lastComparison = 0;
4496 mandeep.dh 4500
      scanSerializedItemForOrder_args typedOther = (scanSerializedItemForOrder_args)other;
2820 chandransh 4501
 
4555 mandeep.dh 4502
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
2820 chandransh 4503
      if (lastComparison != 0) {
4504
        return lastComparison;
4505
      }
4555 mandeep.dh 4506
      if (isSetSerialNumber()) {
4507
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
3430 rajveer 4508
        if (lastComparison != 0) {
4509
          return lastComparison;
4510
        }
2820 chandransh 4511
      }
4496 mandeep.dh 4512
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
2820 chandransh 4513
      if (lastComparison != 0) {
4514
        return lastComparison;
4515
      }
4496 mandeep.dh 4516
      if (isSetType()) {
4517
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 4518
        if (lastComparison != 0) {
4519
          return lastComparison;
4520
        }
2820 chandransh 4521
      }
4496 mandeep.dh 4522
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
2820 chandransh 4523
      if (lastComparison != 0) {
4524
        return lastComparison;
4525
      }
4496 mandeep.dh 4526
      if (isSetOrderId()) {
4527
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
3430 rajveer 4528
        if (lastComparison != 0) {
4529
          return lastComparison;
4530
        }
2820 chandransh 4531
      }
5110 mandeep.dh 4532
      lastComparison = Boolean.valueOf(isSetFulfilmentWarehouseId()).compareTo(typedOther.isSetFulfilmentWarehouseId());
2820 chandransh 4533
      if (lastComparison != 0) {
4534
        return lastComparison;
4535
      }
5110 mandeep.dh 4536
      if (isSetFulfilmentWarehouseId()) {
4537
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilmentWarehouseId, typedOther.fulfilmentWarehouseId);
3430 rajveer 4538
        if (lastComparison != 0) {
4539
          return lastComparison;
4540
        }
2820 chandransh 4541
      }
5110 mandeep.dh 4542
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
4543
      if (lastComparison != 0) {
4544
        return lastComparison;
4545
      }
4546
      if (isSetQuantity()) {
4547
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
4548
        if (lastComparison != 0) {
4549
          return lastComparison;
4550
        }
4551
      }
4552
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
4553
      if (lastComparison != 0) {
4554
        return lastComparison;
4555
      }
4556
      if (isSetBillingWarehouseId()) {
4557
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
4558
        if (lastComparison != 0) {
4559
          return lastComparison;
4560
        }
4561
      }
2820 chandransh 4562
      return 0;
4563
    }
4564
 
3430 rajveer 4565
    public _Fields fieldForId(int fieldId) {
4566
      return _Fields.findByThriftId(fieldId);
4567
    }
4568
 
4569
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4570
      org.apache.thrift.protocol.TField field;
2820 chandransh 4571
      iprot.readStructBegin();
4572
      while (true)
4573
      {
4574
        field = iprot.readFieldBegin();
3430 rajveer 4575
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 4576
          break;
4577
        }
3430 rajveer 4578
        switch (field.id) {
4555 mandeep.dh 4579
          case 1: // SERIAL_NUMBER
4580
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
4581
              this.serialNumber = iprot.readString();
3430 rajveer 4582
            } else { 
4583
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4584
            }
4585
            break;
4496 mandeep.dh 4586
          case 2: // TYPE
4587
            if (field.type == org.apache.thrift.protocol.TType.I32) {
4588
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 4589
            } else { 
4590
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4591
            }
4592
            break;
4496 mandeep.dh 4593
          case 3: // ORDER_ID
4594
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4595
              this.orderId = iprot.readI64();
4596
              setOrderIdIsSet(true);
3430 rajveer 4597
            } else { 
4598
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4599
            }
4600
            break;
5110 mandeep.dh 4601
          case 4: // FULFILMENT_WAREHOUSE_ID
4496 mandeep.dh 4602
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5110 mandeep.dh 4603
              this.fulfilmentWarehouseId = iprot.readI64();
4604
              setFulfilmentWarehouseIdIsSet(true);
3430 rajveer 4605
            } else { 
4606
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4607
            }
4608
            break;
5110 mandeep.dh 4609
          case 5: // QUANTITY
4610
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
4611
              this.quantity = iprot.readDouble();
4612
              setQuantityIsSet(true);
4613
            } else { 
4614
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4615
            }
4616
            break;
4617
          case 6: // BILLING_WAREHOUSE_ID
4618
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4619
              this.billingWarehouseId = iprot.readI64();
4620
              setBillingWarehouseIdIsSet(true);
4621
            } else { 
4622
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4623
            }
4624
            break;
3430 rajveer 4625
          default:
4626
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 4627
        }
3430 rajveer 4628
        iprot.readFieldEnd();
2820 chandransh 4629
      }
4630
      iprot.readStructEnd();
4631
      validate();
4632
    }
4633
 
3430 rajveer 4634
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 4635
      validate();
4636
 
4637
      oprot.writeStructBegin(STRUCT_DESC);
4555 mandeep.dh 4638
      if (this.serialNumber != null) {
4639
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
4640
        oprot.writeString(this.serialNumber);
4641
        oprot.writeFieldEnd();
4642
      }
2820 chandransh 4643
      if (this.type != null) {
4644
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
4645
        oprot.writeI32(this.type.getValue());
4646
        oprot.writeFieldEnd();
4647
      }
4496 mandeep.dh 4648
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
4649
      oprot.writeI64(this.orderId);
4650
      oprot.writeFieldEnd();
5110 mandeep.dh 4651
      oprot.writeFieldBegin(FULFILMENT_WAREHOUSE_ID_FIELD_DESC);
4652
      oprot.writeI64(this.fulfilmentWarehouseId);
4496 mandeep.dh 4653
      oprot.writeFieldEnd();
5110 mandeep.dh 4654
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
4655
      oprot.writeDouble(this.quantity);
4656
      oprot.writeFieldEnd();
4657
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
4658
      oprot.writeI64(this.billingWarehouseId);
4659
      oprot.writeFieldEnd();
2820 chandransh 4660
      oprot.writeFieldStop();
4661
      oprot.writeStructEnd();
4662
    }
4663
 
4664
    @Override
4665
    public String toString() {
4496 mandeep.dh 4666
      StringBuilder sb = new StringBuilder("scanSerializedItemForOrder_args(");
2820 chandransh 4667
      boolean first = true;
4668
 
4555 mandeep.dh 4669
      sb.append("serialNumber:");
4670
      if (this.serialNumber == null) {
4671
        sb.append("null");
4672
      } else {
4673
        sb.append(this.serialNumber);
4674
      }
2820 chandransh 4675
      first = false;
4676
      if (!first) sb.append(", ");
4496 mandeep.dh 4677
      sb.append("type:");
4678
      if (this.type == null) {
2820 chandransh 4679
        sb.append("null");
4680
      } else {
4496 mandeep.dh 4681
        sb.append(this.type);
2820 chandransh 4682
      }
4683
      first = false;
4684
      if (!first) sb.append(", ");
4496 mandeep.dh 4685
      sb.append("orderId:");
4686
      sb.append(this.orderId);
2820 chandransh 4687
      first = false;
4688
      if (!first) sb.append(", ");
5110 mandeep.dh 4689
      sb.append("fulfilmentWarehouseId:");
4690
      sb.append(this.fulfilmentWarehouseId);
2820 chandransh 4691
      first = false;
5110 mandeep.dh 4692
      if (!first) sb.append(", ");
4693
      sb.append("quantity:");
4694
      sb.append(this.quantity);
4695
      first = false;
4696
      if (!first) sb.append(", ");
4697
      sb.append("billingWarehouseId:");
4698
      sb.append(this.billingWarehouseId);
4699
      first = false;
2820 chandransh 4700
      sb.append(")");
4701
      return sb.toString();
4702
    }
4703
 
3430 rajveer 4704
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 4705
      // check for required fields
4706
    }
4707
 
3430 rajveer 4708
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4709
      try {
4710
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4711
      } catch (org.apache.thrift.TException te) {
4712
        throw new java.io.IOException(te);
4713
      }
4714
    }
4715
 
4716
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4717
      try {
4718
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4719
      } catch (org.apache.thrift.TException te) {
4720
        throw new java.io.IOException(te);
4721
      }
4722
    }
4723
 
2820 chandransh 4724
  }
4725
 
4496 mandeep.dh 4726
  public static class scanSerializedItemForOrder_result implements org.apache.thrift.TBase<scanSerializedItemForOrder_result, scanSerializedItemForOrder_result._Fields>, java.io.Serializable, Cloneable   {
4727
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItemForOrder_result");
2820 chandransh 4728
 
4555 mandeep.dh 4729
    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 4730
    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 4731
 
4555 mandeep.dh 4732
    private InventoryItem success; // required
3430 rajveer 4733
    private WarehouseServiceException wex; // required
2820 chandransh 4734
 
4735
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4736
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 4737
      SUCCESS((short)0, "success"),
2820 chandransh 4738
      WEX((short)1, "wex");
4739
 
4740
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4741
 
4742
      static {
4743
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4744
          byName.put(field.getFieldName(), field);
4745
        }
4746
      }
4747
 
4748
      /**
4749
       * Find the _Fields constant that matches fieldId, or null if its not found.
4750
       */
4751
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4752
        switch(fieldId) {
4496 mandeep.dh 4753
          case 0: // SUCCESS
4754
            return SUCCESS;
3430 rajveer 4755
          case 1: // WEX
4756
            return WEX;
4757
          default:
4758
            return null;
4759
        }
2820 chandransh 4760
      }
4761
 
4762
      /**
4763
       * Find the _Fields constant that matches fieldId, throwing an exception
4764
       * if it is not found.
4765
       */
4766
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4767
        _Fields fields = findByThriftId(fieldId);
4768
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4769
        return fields;
4770
      }
4771
 
4772
      /**
4773
       * Find the _Fields constant that matches name, or null if its not found.
4774
       */
4775
      public static _Fields findByName(String name) {
4776
        return byName.get(name);
4777
      }
4778
 
4779
      private final short _thriftId;
4780
      private final String _fieldName;
4781
 
4782
      _Fields(short thriftId, String fieldName) {
4783
        _thriftId = thriftId;
4784
        _fieldName = fieldName;
4785
      }
4786
 
4787
      public short getThriftFieldId() {
4788
        return _thriftId;
4789
      }
4790
 
4791
      public String getFieldName() {
4792
        return _fieldName;
4793
      }
4794
    }
4795
 
4796
    // isset id assignments
4797
 
3430 rajveer 4798
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 4799
    static {
3430 rajveer 4800
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 4801
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 4802
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 4803
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4804
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4805
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 4806
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanSerializedItemForOrder_result.class, metaDataMap);
2820 chandransh 4807
    }
4808
 
4496 mandeep.dh 4809
    public scanSerializedItemForOrder_result() {
2820 chandransh 4810
    }
4811
 
4496 mandeep.dh 4812
    public scanSerializedItemForOrder_result(
4555 mandeep.dh 4813
      InventoryItem success,
2820 chandransh 4814
      WarehouseServiceException wex)
4815
    {
4816
      this();
4496 mandeep.dh 4817
      this.success = success;
2820 chandransh 4818
      this.wex = wex;
4819
    }
4820
 
4821
    /**
4822
     * Performs a deep copy on <i>other</i>.
4823
     */
4496 mandeep.dh 4824
    public scanSerializedItemForOrder_result(scanSerializedItemForOrder_result other) {
4555 mandeep.dh 4825
      if (other.isSetSuccess()) {
4826
        this.success = new InventoryItem(other.success);
4827
      }
2820 chandransh 4828
      if (other.isSetWex()) {
4829
        this.wex = new WarehouseServiceException(other.wex);
4830
      }
4831
    }
4832
 
4496 mandeep.dh 4833
    public scanSerializedItemForOrder_result deepCopy() {
4834
      return new scanSerializedItemForOrder_result(this);
2820 chandransh 4835
    }
4836
 
3430 rajveer 4837
    @Override
4838
    public void clear() {
4555 mandeep.dh 4839
      this.success = null;
3430 rajveer 4840
      this.wex = null;
2820 chandransh 4841
    }
4842
 
4555 mandeep.dh 4843
    public InventoryItem getSuccess() {
4496 mandeep.dh 4844
      return this.success;
4845
    }
4846
 
4555 mandeep.dh 4847
    public void setSuccess(InventoryItem success) {
4496 mandeep.dh 4848
      this.success = success;
4849
    }
4850
 
4851
    public void unsetSuccess() {
4555 mandeep.dh 4852
      this.success = null;
4496 mandeep.dh 4853
    }
4854
 
4855
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
4856
    public boolean isSetSuccess() {
4555 mandeep.dh 4857
      return this.success != null;
4496 mandeep.dh 4858
    }
4859
 
4860
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 4861
      if (!value) {
4862
        this.success = null;
4863
      }
4496 mandeep.dh 4864
    }
4865
 
2820 chandransh 4866
    public WarehouseServiceException getWex() {
4867
      return this.wex;
4868
    }
4869
 
3430 rajveer 4870
    public void setWex(WarehouseServiceException wex) {
2820 chandransh 4871
      this.wex = wex;
4872
    }
4873
 
4874
    public void unsetWex() {
4875
      this.wex = null;
4876
    }
4877
 
3430 rajveer 4878
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2820 chandransh 4879
    public boolean isSetWex() {
4880
      return this.wex != null;
4881
    }
4882
 
4883
    public void setWexIsSet(boolean value) {
4884
      if (!value) {
4885
        this.wex = null;
4886
      }
4887
    }
4888
 
4889
    public void setFieldValue(_Fields field, Object value) {
4890
      switch (field) {
4496 mandeep.dh 4891
      case SUCCESS:
4892
        if (value == null) {
4893
          unsetSuccess();
4894
        } else {
4555 mandeep.dh 4895
          setSuccess((InventoryItem)value);
4496 mandeep.dh 4896
        }
4897
        break;
4898
 
2820 chandransh 4899
      case WEX:
4900
        if (value == null) {
4901
          unsetWex();
4902
        } else {
4903
          setWex((WarehouseServiceException)value);
4904
        }
4905
        break;
4906
 
4907
      }
4908
    }
4909
 
4910
    public Object getFieldValue(_Fields field) {
4911
      switch (field) {
4496 mandeep.dh 4912
      case SUCCESS:
4555 mandeep.dh 4913
        return getSuccess();
4496 mandeep.dh 4914
 
2820 chandransh 4915
      case WEX:
4916
        return getWex();
4917
 
4918
      }
4919
      throw new IllegalStateException();
4920
    }
4921
 
3430 rajveer 4922
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4923
    public boolean isSet(_Fields field) {
4924
      if (field == null) {
4925
        throw new IllegalArgumentException();
4926
      }
2820 chandransh 4927
 
4928
      switch (field) {
4496 mandeep.dh 4929
      case SUCCESS:
4930
        return isSetSuccess();
2820 chandransh 4931
      case WEX:
4932
        return isSetWex();
4933
      }
4934
      throw new IllegalStateException();
4935
    }
4936
 
4937
    @Override
4938
    public boolean equals(Object that) {
4939
      if (that == null)
4940
        return false;
4496 mandeep.dh 4941
      if (that instanceof scanSerializedItemForOrder_result)
4942
        return this.equals((scanSerializedItemForOrder_result)that);
2820 chandransh 4943
      return false;
4944
    }
4945
 
4496 mandeep.dh 4946
    public boolean equals(scanSerializedItemForOrder_result that) {
2820 chandransh 4947
      if (that == null)
4948
        return false;
4949
 
4555 mandeep.dh 4950
      boolean this_present_success = true && this.isSetSuccess();
4951
      boolean that_present_success = true && that.isSetSuccess();
4496 mandeep.dh 4952
      if (this_present_success || that_present_success) {
4953
        if (!(this_present_success && that_present_success))
4954
          return false;
4555 mandeep.dh 4955
        if (!this.success.equals(that.success))
4496 mandeep.dh 4956
          return false;
4957
      }
4958
 
2820 chandransh 4959
      boolean this_present_wex = true && this.isSetWex();
4960
      boolean that_present_wex = true && that.isSetWex();
4961
      if (this_present_wex || that_present_wex) {
4962
        if (!(this_present_wex && that_present_wex))
4963
          return false;
4964
        if (!this.wex.equals(that.wex))
4965
          return false;
4966
      }
4967
 
4968
      return true;
4969
    }
4970
 
4971
    @Override
4972
    public int hashCode() {
4973
      return 0;
4974
    }
4975
 
4496 mandeep.dh 4976
    public int compareTo(scanSerializedItemForOrder_result other) {
2820 chandransh 4977
      if (!getClass().equals(other.getClass())) {
4978
        return getClass().getName().compareTo(other.getClass().getName());
4979
      }
4980
 
4981
      int lastComparison = 0;
4496 mandeep.dh 4982
      scanSerializedItemForOrder_result typedOther = (scanSerializedItemForOrder_result)other;
2820 chandransh 4983
 
4496 mandeep.dh 4984
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
4985
      if (lastComparison != 0) {
4986
        return lastComparison;
4987
      }
4988
      if (isSetSuccess()) {
4989
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4990
        if (lastComparison != 0) {
4991
          return lastComparison;
4992
        }
4993
      }
3430 rajveer 4994
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 4995
      if (lastComparison != 0) {
4996
        return lastComparison;
4997
      }
3430 rajveer 4998
      if (isSetWex()) {
4999
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
5000
        if (lastComparison != 0) {
5001
          return lastComparison;
5002
        }
2820 chandransh 5003
      }
5004
      return 0;
5005
    }
5006
 
3430 rajveer 5007
    public _Fields fieldForId(int fieldId) {
5008
      return _Fields.findByThriftId(fieldId);
5009
    }
5010
 
5011
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5012
      org.apache.thrift.protocol.TField field;
2820 chandransh 5013
      iprot.readStructBegin();
5014
      while (true)
5015
      {
5016
        field = iprot.readFieldBegin();
3430 rajveer 5017
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 5018
          break;
5019
        }
3430 rajveer 5020
        switch (field.id) {
4496 mandeep.dh 5021
          case 0: // SUCCESS
4555 mandeep.dh 5022
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5023
              this.success = new InventoryItem();
5024
              this.success.read(iprot);
4496 mandeep.dh 5025
            } else { 
5026
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5027
            }
5028
            break;
3430 rajveer 5029
          case 1: // WEX
5030
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5031
              this.wex = new WarehouseServiceException();
5032
              this.wex.read(iprot);
5033
            } else { 
5034
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5035
            }
5036
            break;
5037
          default:
5038
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 5039
        }
3430 rajveer 5040
        iprot.readFieldEnd();
2820 chandransh 5041
      }
5042
      iprot.readStructEnd();
5043
      validate();
5044
    }
5045
 
3430 rajveer 5046
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 5047
      oprot.writeStructBegin(STRUCT_DESC);
5048
 
4496 mandeep.dh 5049
      if (this.isSetSuccess()) {
5050
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 5051
        this.success.write(oprot);
4496 mandeep.dh 5052
        oprot.writeFieldEnd();
5053
      } else if (this.isSetWex()) {
2820 chandransh 5054
        oprot.writeFieldBegin(WEX_FIELD_DESC);
5055
        this.wex.write(oprot);
5056
        oprot.writeFieldEnd();
5057
      }
5058
      oprot.writeFieldStop();
5059
      oprot.writeStructEnd();
5060
    }
5061
 
5062
    @Override
5063
    public String toString() {
4496 mandeep.dh 5064
      StringBuilder sb = new StringBuilder("scanSerializedItemForOrder_result(");
2820 chandransh 5065
      boolean first = true;
5066
 
4496 mandeep.dh 5067
      sb.append("success:");
4555 mandeep.dh 5068
      if (this.success == null) {
5069
        sb.append("null");
5070
      } else {
5071
        sb.append(this.success);
5072
      }
4496 mandeep.dh 5073
      first = false;
5074
      if (!first) sb.append(", ");
2820 chandransh 5075
      sb.append("wex:");
5076
      if (this.wex == null) {
5077
        sb.append("null");
5078
      } else {
5079
        sb.append(this.wex);
5080
      }
5081
      first = false;
5082
      sb.append(")");
5083
      return sb.toString();
5084
    }
5085
 
3430 rajveer 5086
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 5087
      // check for required fields
5088
    }
5089
 
3430 rajveer 5090
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5091
      try {
5092
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5093
      } catch (org.apache.thrift.TException te) {
5094
        throw new java.io.IOException(te);
5095
      }
5096
    }
5097
 
5098
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5099
      try {
5100
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5101
      } catch (org.apache.thrift.TException te) {
5102
        throw new java.io.IOException(te);
5103
      }
5104
    }
5105
 
2820 chandransh 5106
  }
5107
 
4496 mandeep.dh 5108
  public static class scanForOrder_args implements org.apache.thrift.TBase<scanForOrder_args, scanForOrder_args._Fields>, java.io.Serializable, Cloneable   {
5109
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOrder_args");
2820 chandransh 5110
 
5361 mandeep.dh 5111
    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 5112
    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);
5113
    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);
5114
    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 5115
    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 5116
    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 5117
 
5361 mandeep.dh 5118
    private InventoryItem inventoryItem; // required
3430 rajveer 5119
    private ScanType type; // required
4496 mandeep.dh 5120
    private long quantity; // required
5121
    private long orderId; // required
5110 mandeep.dh 5122
    private long fulfilmentWarehouseId; // required
5361 mandeep.dh 5123
    private long billingWarehouseId; // required
2820 chandransh 5124
 
5125
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 5126
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 5127
      INVENTORY_ITEM((short)1, "inventoryItem"),
2820 chandransh 5128
      /**
5129
       * 
5130
       * @see ScanType
5131
       */
4496 mandeep.dh 5132
      TYPE((short)2, "type"),
5133
      QUANTITY((short)3, "quantity"),
5134
      ORDER_ID((short)4, "orderId"),
5361 mandeep.dh 5135
      FULFILMENT_WAREHOUSE_ID((short)5, "fulfilmentWarehouseId"),
5136
      BILLING_WAREHOUSE_ID((short)6, "billingWarehouseId");
2820 chandransh 5137
 
5138
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5139
 
5140
      static {
5141
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5142
          byName.put(field.getFieldName(), field);
5143
        }
5144
      }
5145
 
5146
      /**
5147
       * Find the _Fields constant that matches fieldId, or null if its not found.
5148
       */
5149
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 5150
        switch(fieldId) {
5361 mandeep.dh 5151
          case 1: // INVENTORY_ITEM
5152
            return INVENTORY_ITEM;
4496 mandeep.dh 5153
          case 2: // TYPE
3430 rajveer 5154
            return TYPE;
4496 mandeep.dh 5155
          case 3: // QUANTITY
5156
            return QUANTITY;
5157
          case 4: // ORDER_ID
5158
            return ORDER_ID;
5110 mandeep.dh 5159
          case 5: // FULFILMENT_WAREHOUSE_ID
5160
            return FULFILMENT_WAREHOUSE_ID;
5361 mandeep.dh 5161
          case 6: // BILLING_WAREHOUSE_ID
5162
            return BILLING_WAREHOUSE_ID;
3430 rajveer 5163
          default:
5164
            return null;
5165
        }
2820 chandransh 5166
      }
5167
 
5168
      /**
5169
       * Find the _Fields constant that matches fieldId, throwing an exception
5170
       * if it is not found.
5171
       */
5172
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5173
        _Fields fields = findByThriftId(fieldId);
5174
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5175
        return fields;
5176
      }
5177
 
5178
      /**
5179
       * Find the _Fields constant that matches name, or null if its not found.
5180
       */
5181
      public static _Fields findByName(String name) {
5182
        return byName.get(name);
5183
      }
5184
 
5185
      private final short _thriftId;
5186
      private final String _fieldName;
5187
 
5188
      _Fields(short thriftId, String fieldName) {
5189
        _thriftId = thriftId;
5190
        _fieldName = fieldName;
5191
      }
5192
 
5193
      public short getThriftFieldId() {
5194
        return _thriftId;
5195
      }
5196
 
5197
      public String getFieldName() {
5198
        return _fieldName;
5199
      }
5200
    }
5201
 
5202
    // isset id assignments
5361 mandeep.dh 5203
    private static final int __QUANTITY_ISSET_ID = 0;
5204
    private static final int __ORDERID_ISSET_ID = 1;
5205
    private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 2;
5206
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 3;
4496 mandeep.dh 5207
    private BitSet __isset_bit_vector = new BitSet(4);
2820 chandransh 5208
 
3430 rajveer 5209
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 5210
    static {
3430 rajveer 5211
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5361 mandeep.dh 5212
      tmpMap.put(_Fields.INVENTORY_ITEM, new org.apache.thrift.meta_data.FieldMetaData("inventoryItem", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5213
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 5214
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5215
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
4496 mandeep.dh 5216
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5217
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5218
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5219
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 5220
      tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 5221
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5361 mandeep.dh 5222
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5223
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 5224
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 5225
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOrder_args.class, metaDataMap);
2820 chandransh 5226
    }
5227
 
4496 mandeep.dh 5228
    public scanForOrder_args() {
2820 chandransh 5229
    }
5230
 
4496 mandeep.dh 5231
    public scanForOrder_args(
5361 mandeep.dh 5232
      InventoryItem inventoryItem,
4496 mandeep.dh 5233
      ScanType type,
5234
      long quantity,
5235
      long orderId,
5361 mandeep.dh 5236
      long fulfilmentWarehouseId,
5237
      long billingWarehouseId)
2820 chandransh 5238
    {
5239
      this();
5361 mandeep.dh 5240
      this.inventoryItem = inventoryItem;
2820 chandransh 5241
      this.type = type;
4496 mandeep.dh 5242
      this.quantity = quantity;
5243
      setQuantityIsSet(true);
5244
      this.orderId = orderId;
5245
      setOrderIdIsSet(true);
5110 mandeep.dh 5246
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
5247
      setFulfilmentWarehouseIdIsSet(true);
5361 mandeep.dh 5248
      this.billingWarehouseId = billingWarehouseId;
5249
      setBillingWarehouseIdIsSet(true);
2820 chandransh 5250
    }
5251
 
5252
    /**
5253
     * Performs a deep copy on <i>other</i>.
5254
     */
4496 mandeep.dh 5255
    public scanForOrder_args(scanForOrder_args other) {
5256
      __isset_bit_vector.clear();
5257
      __isset_bit_vector.or(other.__isset_bit_vector);
5361 mandeep.dh 5258
      if (other.isSetInventoryItem()) {
5259
        this.inventoryItem = new InventoryItem(other.inventoryItem);
5260
      }
2820 chandransh 5261
      if (other.isSetType()) {
5262
        this.type = other.type;
5263
      }
4496 mandeep.dh 5264
      this.quantity = other.quantity;
5265
      this.orderId = other.orderId;
5110 mandeep.dh 5266
      this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
5361 mandeep.dh 5267
      this.billingWarehouseId = other.billingWarehouseId;
2820 chandransh 5268
    }
5269
 
4496 mandeep.dh 5270
    public scanForOrder_args deepCopy() {
5271
      return new scanForOrder_args(this);
2820 chandransh 5272
    }
5273
 
3430 rajveer 5274
    @Override
5275
    public void clear() {
5361 mandeep.dh 5276
      this.inventoryItem = null;
3430 rajveer 5277
      this.type = null;
4496 mandeep.dh 5278
      setQuantityIsSet(false);
5279
      this.quantity = 0;
5280
      setOrderIdIsSet(false);
5281
      this.orderId = 0;
5110 mandeep.dh 5282
      setFulfilmentWarehouseIdIsSet(false);
5283
      this.fulfilmentWarehouseId = 0;
5361 mandeep.dh 5284
      setBillingWarehouseIdIsSet(false);
5285
      this.billingWarehouseId = 0;
2820 chandransh 5286
    }
5287
 
5361 mandeep.dh 5288
    public InventoryItem getInventoryItem() {
5289
      return this.inventoryItem;
2820 chandransh 5290
    }
5291
 
5361 mandeep.dh 5292
    public void setInventoryItem(InventoryItem inventoryItem) {
5293
      this.inventoryItem = inventoryItem;
2820 chandransh 5294
    }
5295
 
5361 mandeep.dh 5296
    public void unsetInventoryItem() {
5297
      this.inventoryItem = null;
2820 chandransh 5298
    }
5299
 
5361 mandeep.dh 5300
    /** Returns true if field inventoryItem is set (has been assigned a value) and false otherwise */
5301
    public boolean isSetInventoryItem() {
5302
      return this.inventoryItem != null;
2820 chandransh 5303
    }
5304
 
5361 mandeep.dh 5305
    public void setInventoryItemIsSet(boolean value) {
5306
      if (!value) {
5307
        this.inventoryItem = null;
5308
      }
2820 chandransh 5309
    }
5310
 
5311
    /**
5312
     * 
5313
     * @see ScanType
5314
     */
5315
    public ScanType getType() {
5316
      return this.type;
5317
    }
5318
 
5319
    /**
5320
     * 
5321
     * @see ScanType
5322
     */
3430 rajveer 5323
    public void setType(ScanType type) {
2820 chandransh 5324
      this.type = type;
5325
    }
5326
 
5327
    public void unsetType() {
5328
      this.type = null;
5329
    }
5330
 
3430 rajveer 5331
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
2820 chandransh 5332
    public boolean isSetType() {
5333
      return this.type != null;
5334
    }
5335
 
5336
    public void setTypeIsSet(boolean value) {
5337
      if (!value) {
5338
        this.type = null;
5339
      }
5340
    }
5341
 
4496 mandeep.dh 5342
    public long getQuantity() {
5343
      return this.quantity;
5344
    }
5345
 
5346
    public void setQuantity(long quantity) {
5347
      this.quantity = quantity;
5348
      setQuantityIsSet(true);
5349
    }
5350
 
5351
    public void unsetQuantity() {
5352
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
5353
    }
5354
 
5355
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
5356
    public boolean isSetQuantity() {
5357
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
5358
    }
5359
 
5360
    public void setQuantityIsSet(boolean value) {
5361
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
5362
    }
5363
 
5364
    public long getOrderId() {
5365
      return this.orderId;
5366
    }
5367
 
5368
    public void setOrderId(long orderId) {
5369
      this.orderId = orderId;
5370
      setOrderIdIsSet(true);
5371
    }
5372
 
5373
    public void unsetOrderId() {
5374
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
5375
    }
5376
 
5377
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
5378
    public boolean isSetOrderId() {
5379
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
5380
    }
5381
 
5382
    public void setOrderIdIsSet(boolean value) {
5383
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
5384
    }
5385
 
5110 mandeep.dh 5386
    public long getFulfilmentWarehouseId() {
5387
      return this.fulfilmentWarehouseId;
4496 mandeep.dh 5388
    }
5389
 
5110 mandeep.dh 5390
    public void setFulfilmentWarehouseId(long fulfilmentWarehouseId) {
5391
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
5392
      setFulfilmentWarehouseIdIsSet(true);
4496 mandeep.dh 5393
    }
5394
 
5110 mandeep.dh 5395
    public void unsetFulfilmentWarehouseId() {
5396
      __isset_bit_vector.clear(__FULFILMENTWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 5397
    }
5398
 
5110 mandeep.dh 5399
    /** Returns true if field fulfilmentWarehouseId is set (has been assigned a value) and false otherwise */
5400
    public boolean isSetFulfilmentWarehouseId() {
5401
      return __isset_bit_vector.get(__FULFILMENTWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 5402
    }
5403
 
5110 mandeep.dh 5404
    public void setFulfilmentWarehouseIdIsSet(boolean value) {
5405
      __isset_bit_vector.set(__FULFILMENTWAREHOUSEID_ISSET_ID, value);
4496 mandeep.dh 5406
    }
5407
 
5361 mandeep.dh 5408
    public long getBillingWarehouseId() {
5409
      return this.billingWarehouseId;
5410
    }
5411
 
5412
    public void setBillingWarehouseId(long billingWarehouseId) {
5413
      this.billingWarehouseId = billingWarehouseId;
5414
      setBillingWarehouseIdIsSet(true);
5415
    }
5416
 
5417
    public void unsetBillingWarehouseId() {
5418
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
5419
    }
5420
 
5421
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
5422
    public boolean isSetBillingWarehouseId() {
5423
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
5424
    }
5425
 
5426
    public void setBillingWarehouseIdIsSet(boolean value) {
5427
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
5428
    }
5429
 
2820 chandransh 5430
    public void setFieldValue(_Fields field, Object value) {
5431
      switch (field) {
5361 mandeep.dh 5432
      case INVENTORY_ITEM:
2820 chandransh 5433
        if (value == null) {
5361 mandeep.dh 5434
          unsetInventoryItem();
2820 chandransh 5435
        } else {
5361 mandeep.dh 5436
          setInventoryItem((InventoryItem)value);
2820 chandransh 5437
        }
5438
        break;
5439
 
4496 mandeep.dh 5440
      case TYPE:
2820 chandransh 5441
        if (value == null) {
4496 mandeep.dh 5442
          unsetType();
2820 chandransh 5443
        } else {
4496 mandeep.dh 5444
          setType((ScanType)value);
2820 chandransh 5445
        }
5446
        break;
5447
 
4496 mandeep.dh 5448
      case QUANTITY:
2820 chandransh 5449
        if (value == null) {
4496 mandeep.dh 5450
          unsetQuantity();
2820 chandransh 5451
        } else {
4496 mandeep.dh 5452
          setQuantity((Long)value);
2820 chandransh 5453
        }
5454
        break;
5455
 
4496 mandeep.dh 5456
      case ORDER_ID:
5457
        if (value == null) {
5458
          unsetOrderId();
5459
        } else {
5460
          setOrderId((Long)value);
5461
        }
5462
        break;
5463
 
5110 mandeep.dh 5464
      case FULFILMENT_WAREHOUSE_ID:
4496 mandeep.dh 5465
        if (value == null) {
5110 mandeep.dh 5466
          unsetFulfilmentWarehouseId();
4496 mandeep.dh 5467
        } else {
5110 mandeep.dh 5468
          setFulfilmentWarehouseId((Long)value);
4496 mandeep.dh 5469
        }
5470
        break;
5471
 
5361 mandeep.dh 5472
      case BILLING_WAREHOUSE_ID:
5473
        if (value == null) {
5474
          unsetBillingWarehouseId();
5475
        } else {
5476
          setBillingWarehouseId((Long)value);
5477
        }
5478
        break;
5479
 
2820 chandransh 5480
      }
5481
    }
5482
 
5483
    public Object getFieldValue(_Fields field) {
5484
      switch (field) {
5361 mandeep.dh 5485
      case INVENTORY_ITEM:
5486
        return getInventoryItem();
2820 chandransh 5487
 
5488
      case TYPE:
5489
        return getType();
5490
 
4496 mandeep.dh 5491
      case QUANTITY:
5492
        return Long.valueOf(getQuantity());
5493
 
5494
      case ORDER_ID:
5495
        return Long.valueOf(getOrderId());
5496
 
5110 mandeep.dh 5497
      case FULFILMENT_WAREHOUSE_ID:
5498
        return Long.valueOf(getFulfilmentWarehouseId());
4496 mandeep.dh 5499
 
5361 mandeep.dh 5500
      case BILLING_WAREHOUSE_ID:
5501
        return Long.valueOf(getBillingWarehouseId());
5502
 
2820 chandransh 5503
      }
5504
      throw new IllegalStateException();
5505
    }
5506
 
3430 rajveer 5507
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5508
    public boolean isSet(_Fields field) {
5509
      if (field == null) {
5510
        throw new IllegalArgumentException();
5511
      }
2820 chandransh 5512
 
5513
      switch (field) {
5361 mandeep.dh 5514
      case INVENTORY_ITEM:
5515
        return isSetInventoryItem();
2820 chandransh 5516
      case TYPE:
5517
        return isSetType();
4496 mandeep.dh 5518
      case QUANTITY:
5519
        return isSetQuantity();
5520
      case ORDER_ID:
5521
        return isSetOrderId();
5110 mandeep.dh 5522
      case FULFILMENT_WAREHOUSE_ID:
5523
        return isSetFulfilmentWarehouseId();
5361 mandeep.dh 5524
      case BILLING_WAREHOUSE_ID:
5525
        return isSetBillingWarehouseId();
2820 chandransh 5526
      }
5527
      throw new IllegalStateException();
5528
    }
5529
 
5530
    @Override
5531
    public boolean equals(Object that) {
5532
      if (that == null)
5533
        return false;
4496 mandeep.dh 5534
      if (that instanceof scanForOrder_args)
5535
        return this.equals((scanForOrder_args)that);
2820 chandransh 5536
      return false;
5537
    }
5538
 
4496 mandeep.dh 5539
    public boolean equals(scanForOrder_args that) {
2820 chandransh 5540
      if (that == null)
5541
        return false;
5542
 
5361 mandeep.dh 5543
      boolean this_present_inventoryItem = true && this.isSetInventoryItem();
5544
      boolean that_present_inventoryItem = true && that.isSetInventoryItem();
5545
      if (this_present_inventoryItem || that_present_inventoryItem) {
5546
        if (!(this_present_inventoryItem && that_present_inventoryItem))
2820 chandransh 5547
          return false;
5361 mandeep.dh 5548
        if (!this.inventoryItem.equals(that.inventoryItem))
2820 chandransh 5549
          return false;
5550
      }
5551
 
5552
      boolean this_present_type = true && this.isSetType();
5553
      boolean that_present_type = true && that.isSetType();
5554
      if (this_present_type || that_present_type) {
5555
        if (!(this_present_type && that_present_type))
5556
          return false;
5557
        if (!this.type.equals(that.type))
5558
          return false;
5559
      }
5560
 
4496 mandeep.dh 5561
      boolean this_present_quantity = true;
5562
      boolean that_present_quantity = true;
5563
      if (this_present_quantity || that_present_quantity) {
5564
        if (!(this_present_quantity && that_present_quantity))
5565
          return false;
5566
        if (this.quantity != that.quantity)
5567
          return false;
5568
      }
5569
 
5570
      boolean this_present_orderId = true;
5571
      boolean that_present_orderId = true;
5572
      if (this_present_orderId || that_present_orderId) {
5573
        if (!(this_present_orderId && that_present_orderId))
5574
          return false;
5575
        if (this.orderId != that.orderId)
5576
          return false;
5577
      }
5578
 
5110 mandeep.dh 5579
      boolean this_present_fulfilmentWarehouseId = true;
5580
      boolean that_present_fulfilmentWarehouseId = true;
5581
      if (this_present_fulfilmentWarehouseId || that_present_fulfilmentWarehouseId) {
5582
        if (!(this_present_fulfilmentWarehouseId && that_present_fulfilmentWarehouseId))
4496 mandeep.dh 5583
          return false;
5110 mandeep.dh 5584
        if (this.fulfilmentWarehouseId != that.fulfilmentWarehouseId)
4496 mandeep.dh 5585
          return false;
5586
      }
5587
 
5361 mandeep.dh 5588
      boolean this_present_billingWarehouseId = true;
5589
      boolean that_present_billingWarehouseId = true;
5590
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
5591
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
5592
          return false;
5593
        if (this.billingWarehouseId != that.billingWarehouseId)
5594
          return false;
5595
      }
5596
 
2820 chandransh 5597
      return true;
5598
    }
5599
 
5600
    @Override
5601
    public int hashCode() {
5602
      return 0;
5603
    }
5604
 
4496 mandeep.dh 5605
    public int compareTo(scanForOrder_args other) {
2820 chandransh 5606
      if (!getClass().equals(other.getClass())) {
5607
        return getClass().getName().compareTo(other.getClass().getName());
5608
      }
5609
 
5610
      int lastComparison = 0;
4496 mandeep.dh 5611
      scanForOrder_args typedOther = (scanForOrder_args)other;
2820 chandransh 5612
 
5361 mandeep.dh 5613
      lastComparison = Boolean.valueOf(isSetInventoryItem()).compareTo(typedOther.isSetInventoryItem());
2820 chandransh 5614
      if (lastComparison != 0) {
5615
        return lastComparison;
5616
      }
5361 mandeep.dh 5617
      if (isSetInventoryItem()) {
5618
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItem, typedOther.inventoryItem);
3430 rajveer 5619
        if (lastComparison != 0) {
5620
          return lastComparison;
5621
        }
2820 chandransh 5622
      }
4496 mandeep.dh 5623
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
2820 chandransh 5624
      if (lastComparison != 0) {
5625
        return lastComparison;
5626
      }
4496 mandeep.dh 5627
      if (isSetType()) {
5628
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 5629
        if (lastComparison != 0) {
5630
          return lastComparison;
5631
        }
2820 chandransh 5632
      }
4496 mandeep.dh 5633
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
2820 chandransh 5634
      if (lastComparison != 0) {
5635
        return lastComparison;
5636
      }
4496 mandeep.dh 5637
      if (isSetQuantity()) {
5638
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
3430 rajveer 5639
        if (lastComparison != 0) {
5640
          return lastComparison;
5641
        }
2820 chandransh 5642
      }
4496 mandeep.dh 5643
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
5644
      if (lastComparison != 0) {
5645
        return lastComparison;
5646
      }
5647
      if (isSetOrderId()) {
5648
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
5649
        if (lastComparison != 0) {
5650
          return lastComparison;
5651
        }
5652
      }
5110 mandeep.dh 5653
      lastComparison = Boolean.valueOf(isSetFulfilmentWarehouseId()).compareTo(typedOther.isSetFulfilmentWarehouseId());
4496 mandeep.dh 5654
      if (lastComparison != 0) {
5655
        return lastComparison;
5656
      }
5110 mandeep.dh 5657
      if (isSetFulfilmentWarehouseId()) {
5658
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilmentWarehouseId, typedOther.fulfilmentWarehouseId);
4496 mandeep.dh 5659
        if (lastComparison != 0) {
5660
          return lastComparison;
5661
        }
5662
      }
5361 mandeep.dh 5663
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
5664
      if (lastComparison != 0) {
5665
        return lastComparison;
5666
      }
5667
      if (isSetBillingWarehouseId()) {
5668
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
5669
        if (lastComparison != 0) {
5670
          return lastComparison;
5671
        }
5672
      }
2820 chandransh 5673
      return 0;
5674
    }
5675
 
3430 rajveer 5676
    public _Fields fieldForId(int fieldId) {
5677
      return _Fields.findByThriftId(fieldId);
5678
    }
5679
 
5680
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5681
      org.apache.thrift.protocol.TField field;
2820 chandransh 5682
      iprot.readStructBegin();
5683
      while (true)
5684
      {
5685
        field = iprot.readFieldBegin();
3430 rajveer 5686
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 5687
          break;
5688
        }
3430 rajveer 5689
        switch (field.id) {
5361 mandeep.dh 5690
          case 1: // INVENTORY_ITEM
5691
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5692
              this.inventoryItem = new InventoryItem();
5693
              this.inventoryItem.read(iprot);
3430 rajveer 5694
            } else { 
5695
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5696
            }
5697
            break;
4496 mandeep.dh 5698
          case 2: // TYPE
5699
            if (field.type == org.apache.thrift.protocol.TType.I32) {
5700
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 5701
            } else { 
5702
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5703
            }
5704
            break;
4496 mandeep.dh 5705
          case 3: // QUANTITY
5706
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5707
              this.quantity = iprot.readI64();
5708
              setQuantityIsSet(true);
3430 rajveer 5709
            } else { 
5710
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5711
            }
5712
            break;
4496 mandeep.dh 5713
          case 4: // ORDER_ID
5714
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5715
              this.orderId = iprot.readI64();
5716
              setOrderIdIsSet(true);
5717
            } else { 
5718
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5719
            }
5720
            break;
5110 mandeep.dh 5721
          case 5: // FULFILMENT_WAREHOUSE_ID
4496 mandeep.dh 5722
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5110 mandeep.dh 5723
              this.fulfilmentWarehouseId = iprot.readI64();
5724
              setFulfilmentWarehouseIdIsSet(true);
4496 mandeep.dh 5725
            } else { 
5726
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5727
            }
5728
            break;
5361 mandeep.dh 5729
          case 6: // BILLING_WAREHOUSE_ID
5730
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5731
              this.billingWarehouseId = iprot.readI64();
5732
              setBillingWarehouseIdIsSet(true);
5733
            } else { 
5734
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5735
            }
5736
            break;
3430 rajveer 5737
          default:
5738
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 5739
        }
3430 rajveer 5740
        iprot.readFieldEnd();
2820 chandransh 5741
      }
5742
      iprot.readStructEnd();
5743
      validate();
5744
    }
5745
 
3430 rajveer 5746
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 5747
      validate();
5748
 
5749
      oprot.writeStructBegin(STRUCT_DESC);
5361 mandeep.dh 5750
      if (this.inventoryItem != null) {
5751
        oprot.writeFieldBegin(INVENTORY_ITEM_FIELD_DESC);
5752
        this.inventoryItem.write(oprot);
5753
        oprot.writeFieldEnd();
5754
      }
2820 chandransh 5755
      if (this.type != null) {
5756
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
5757
        oprot.writeI32(this.type.getValue());
5758
        oprot.writeFieldEnd();
5759
      }
4496 mandeep.dh 5760
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
5761
      oprot.writeI64(this.quantity);
5762
      oprot.writeFieldEnd();
5763
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
5764
      oprot.writeI64(this.orderId);
5765
      oprot.writeFieldEnd();
5110 mandeep.dh 5766
      oprot.writeFieldBegin(FULFILMENT_WAREHOUSE_ID_FIELD_DESC);
5767
      oprot.writeI64(this.fulfilmentWarehouseId);
4496 mandeep.dh 5768
      oprot.writeFieldEnd();
5361 mandeep.dh 5769
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
5770
      oprot.writeI64(this.billingWarehouseId);
5771
      oprot.writeFieldEnd();
2820 chandransh 5772
      oprot.writeFieldStop();
5773
      oprot.writeStructEnd();
5774
    }
5775
 
5776
    @Override
5777
    public String toString() {
4496 mandeep.dh 5778
      StringBuilder sb = new StringBuilder("scanForOrder_args(");
2820 chandransh 5779
      boolean first = true;
5780
 
5361 mandeep.dh 5781
      sb.append("inventoryItem:");
5782
      if (this.inventoryItem == null) {
5783
        sb.append("null");
5784
      } else {
5785
        sb.append(this.inventoryItem);
5786
      }
2820 chandransh 5787
      first = false;
5788
      if (!first) sb.append(", ");
5789
      sb.append("type:");
5790
      if (this.type == null) {
5791
        sb.append("null");
5792
      } else {
5793
        sb.append(this.type);
5794
      }
5795
      first = false;
4496 mandeep.dh 5796
      if (!first) sb.append(", ");
5797
      sb.append("quantity:");
5798
      sb.append(this.quantity);
5799
      first = false;
5800
      if (!first) sb.append(", ");
5801
      sb.append("orderId:");
5802
      sb.append(this.orderId);
5803
      first = false;
5804
      if (!first) sb.append(", ");
5110 mandeep.dh 5805
      sb.append("fulfilmentWarehouseId:");
5806
      sb.append(this.fulfilmentWarehouseId);
4496 mandeep.dh 5807
      first = false;
5361 mandeep.dh 5808
      if (!first) sb.append(", ");
5809
      sb.append("billingWarehouseId:");
5810
      sb.append(this.billingWarehouseId);
5811
      first = false;
2820 chandransh 5812
      sb.append(")");
5813
      return sb.toString();
5814
    }
5815
 
3430 rajveer 5816
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 5817
      // check for required fields
5818
    }
5819
 
3430 rajveer 5820
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5821
      try {
5822
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5823
      } catch (org.apache.thrift.TException te) {
5824
        throw new java.io.IOException(te);
5825
      }
5826
    }
5827
 
5828
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5829
      try {
4496 mandeep.dh 5830
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
5831
        __isset_bit_vector = new BitSet(1);
3430 rajveer 5832
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5833
      } catch (org.apache.thrift.TException te) {
5834
        throw new java.io.IOException(te);
5835
      }
5836
    }
5837
 
2820 chandransh 5838
  }
5839
 
4496 mandeep.dh 5840
  public static class scanForOrder_result implements org.apache.thrift.TBase<scanForOrder_result, scanForOrder_result._Fields>, java.io.Serializable, Cloneable   {
5841
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOrder_result");
2820 chandransh 5842
 
5361 mandeep.dh 5843
    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 5844
    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 5845
 
5361 mandeep.dh 5846
    private InventoryItem success; // required
3430 rajveer 5847
    private WarehouseServiceException wex; // required
2820 chandransh 5848
 
5849
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 5850
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 5851
      SUCCESS((short)0, "success"),
2820 chandransh 5852
      WEX((short)1, "wex");
5853
 
5854
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5855
 
5856
      static {
5857
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5858
          byName.put(field.getFieldName(), field);
5859
        }
5860
      }
5861
 
5862
      /**
5863
       * Find the _Fields constant that matches fieldId, or null if its not found.
5864
       */
5865
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 5866
        switch(fieldId) {
5361 mandeep.dh 5867
          case 0: // SUCCESS
5868
            return SUCCESS;
3430 rajveer 5869
          case 1: // WEX
5870
            return WEX;
5871
          default:
5872
            return null;
5873
        }
2820 chandransh 5874
      }
5875
 
5876
      /**
5877
       * Find the _Fields constant that matches fieldId, throwing an exception
5878
       * if it is not found.
5879
       */
5880
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5881
        _Fields fields = findByThriftId(fieldId);
5882
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5883
        return fields;
5884
      }
5885
 
5886
      /**
5887
       * Find the _Fields constant that matches name, or null if its not found.
5888
       */
5889
      public static _Fields findByName(String name) {
5890
        return byName.get(name);
5891
      }
5892
 
5893
      private final short _thriftId;
5894
      private final String _fieldName;
5895
 
5896
      _Fields(short thriftId, String fieldName) {
5897
        _thriftId = thriftId;
5898
        _fieldName = fieldName;
5899
      }
5900
 
5901
      public short getThriftFieldId() {
5902
        return _thriftId;
5903
      }
5904
 
5905
      public String getFieldName() {
5906
        return _fieldName;
5907
      }
5908
    }
5909
 
5910
    // isset id assignments
5911
 
3430 rajveer 5912
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 5913
    static {
3430 rajveer 5914
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5361 mandeep.dh 5915
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5916
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 5917
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5918
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5919
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 5920
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOrder_result.class, metaDataMap);
2820 chandransh 5921
    }
5922
 
4496 mandeep.dh 5923
    public scanForOrder_result() {
2820 chandransh 5924
    }
5925
 
4496 mandeep.dh 5926
    public scanForOrder_result(
5361 mandeep.dh 5927
      InventoryItem success,
2820 chandransh 5928
      WarehouseServiceException wex)
5929
    {
5930
      this();
5361 mandeep.dh 5931
      this.success = success;
2820 chandransh 5932
      this.wex = wex;
5933
    }
5934
 
5935
    /**
5936
     * Performs a deep copy on <i>other</i>.
5937
     */
4496 mandeep.dh 5938
    public scanForOrder_result(scanForOrder_result other) {
5361 mandeep.dh 5939
      if (other.isSetSuccess()) {
5940
        this.success = new InventoryItem(other.success);
5941
      }
2820 chandransh 5942
      if (other.isSetWex()) {
5943
        this.wex = new WarehouseServiceException(other.wex);
5944
      }
5945
    }
5946
 
4496 mandeep.dh 5947
    public scanForOrder_result deepCopy() {
5948
      return new scanForOrder_result(this);
2820 chandransh 5949
    }
5950
 
3430 rajveer 5951
    @Override
5952
    public void clear() {
5361 mandeep.dh 5953
      this.success = null;
3430 rajveer 5954
      this.wex = null;
2820 chandransh 5955
    }
5956
 
5361 mandeep.dh 5957
    public InventoryItem getSuccess() {
5958
      return this.success;
5959
    }
5960
 
5961
    public void setSuccess(InventoryItem success) {
5962
      this.success = success;
5963
    }
5964
 
5965
    public void unsetSuccess() {
5966
      this.success = null;
5967
    }
5968
 
5969
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5970
    public boolean isSetSuccess() {
5971
      return this.success != null;
5972
    }
5973
 
5974
    public void setSuccessIsSet(boolean value) {
5975
      if (!value) {
5976
        this.success = null;
5977
      }
5978
    }
5979
 
2820 chandransh 5980
    public WarehouseServiceException getWex() {
5981
      return this.wex;
5982
    }
5983
 
3430 rajveer 5984
    public void setWex(WarehouseServiceException wex) {
2820 chandransh 5985
      this.wex = wex;
5986
    }
5987
 
5988
    public void unsetWex() {
5989
      this.wex = null;
5990
    }
5991
 
3430 rajveer 5992
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2820 chandransh 5993
    public boolean isSetWex() {
5994
      return this.wex != null;
5995
    }
5996
 
5997
    public void setWexIsSet(boolean value) {
5998
      if (!value) {
5999
        this.wex = null;
6000
      }
6001
    }
6002
 
6003
    public void setFieldValue(_Fields field, Object value) {
6004
      switch (field) {
5361 mandeep.dh 6005
      case SUCCESS:
6006
        if (value == null) {
6007
          unsetSuccess();
6008
        } else {
6009
          setSuccess((InventoryItem)value);
6010
        }
6011
        break;
6012
 
2820 chandransh 6013
      case WEX:
6014
        if (value == null) {
6015
          unsetWex();
6016
        } else {
6017
          setWex((WarehouseServiceException)value);
6018
        }
6019
        break;
6020
 
6021
      }
6022
    }
6023
 
6024
    public Object getFieldValue(_Fields field) {
6025
      switch (field) {
5361 mandeep.dh 6026
      case SUCCESS:
6027
        return getSuccess();
6028
 
2820 chandransh 6029
      case WEX:
6030
        return getWex();
6031
 
6032
      }
6033
      throw new IllegalStateException();
6034
    }
6035
 
3430 rajveer 6036
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6037
    public boolean isSet(_Fields field) {
6038
      if (field == null) {
6039
        throw new IllegalArgumentException();
6040
      }
2820 chandransh 6041
 
6042
      switch (field) {
5361 mandeep.dh 6043
      case SUCCESS:
6044
        return isSetSuccess();
2820 chandransh 6045
      case WEX:
6046
        return isSetWex();
6047
      }
6048
      throw new IllegalStateException();
6049
    }
6050
 
6051
    @Override
6052
    public boolean equals(Object that) {
6053
      if (that == null)
6054
        return false;
4496 mandeep.dh 6055
      if (that instanceof scanForOrder_result)
6056
        return this.equals((scanForOrder_result)that);
2820 chandransh 6057
      return false;
6058
    }
6059
 
4496 mandeep.dh 6060
    public boolean equals(scanForOrder_result that) {
2820 chandransh 6061
      if (that == null)
6062
        return false;
6063
 
5361 mandeep.dh 6064
      boolean this_present_success = true && this.isSetSuccess();
6065
      boolean that_present_success = true && that.isSetSuccess();
6066
      if (this_present_success || that_present_success) {
6067
        if (!(this_present_success && that_present_success))
6068
          return false;
6069
        if (!this.success.equals(that.success))
6070
          return false;
6071
      }
6072
 
2820 chandransh 6073
      boolean this_present_wex = true && this.isSetWex();
6074
      boolean that_present_wex = true && that.isSetWex();
6075
      if (this_present_wex || that_present_wex) {
6076
        if (!(this_present_wex && that_present_wex))
6077
          return false;
6078
        if (!this.wex.equals(that.wex))
6079
          return false;
6080
      }
6081
 
6082
      return true;
6083
    }
6084
 
6085
    @Override
6086
    public int hashCode() {
6087
      return 0;
6088
    }
6089
 
4496 mandeep.dh 6090
    public int compareTo(scanForOrder_result other) {
2820 chandransh 6091
      if (!getClass().equals(other.getClass())) {
6092
        return getClass().getName().compareTo(other.getClass().getName());
6093
      }
6094
 
6095
      int lastComparison = 0;
4496 mandeep.dh 6096
      scanForOrder_result typedOther = (scanForOrder_result)other;
2820 chandransh 6097
 
5361 mandeep.dh 6098
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
6099
      if (lastComparison != 0) {
6100
        return lastComparison;
6101
      }
6102
      if (isSetSuccess()) {
6103
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6104
        if (lastComparison != 0) {
6105
          return lastComparison;
6106
        }
6107
      }
3430 rajveer 6108
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 6109
      if (lastComparison != 0) {
6110
        return lastComparison;
6111
      }
3430 rajveer 6112
      if (isSetWex()) {
6113
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
6114
        if (lastComparison != 0) {
6115
          return lastComparison;
6116
        }
2820 chandransh 6117
      }
6118
      return 0;
6119
    }
6120
 
3430 rajveer 6121
    public _Fields fieldForId(int fieldId) {
6122
      return _Fields.findByThriftId(fieldId);
6123
    }
6124
 
6125
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6126
      org.apache.thrift.protocol.TField field;
2820 chandransh 6127
      iprot.readStructBegin();
6128
      while (true)
6129
      {
6130
        field = iprot.readFieldBegin();
3430 rajveer 6131
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 6132
          break;
6133
        }
3430 rajveer 6134
        switch (field.id) {
5361 mandeep.dh 6135
          case 0: // SUCCESS
6136
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6137
              this.success = new InventoryItem();
6138
              this.success.read(iprot);
6139
            } else { 
6140
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6141
            }
6142
            break;
3430 rajveer 6143
          case 1: // WEX
6144
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6145
              this.wex = new WarehouseServiceException();
6146
              this.wex.read(iprot);
6147
            } else { 
6148
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6149
            }
6150
            break;
6151
          default:
6152
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 6153
        }
3430 rajveer 6154
        iprot.readFieldEnd();
2820 chandransh 6155
      }
6156
      iprot.readStructEnd();
6157
      validate();
6158
    }
6159
 
3430 rajveer 6160
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 6161
      oprot.writeStructBegin(STRUCT_DESC);
6162
 
5361 mandeep.dh 6163
      if (this.isSetSuccess()) {
6164
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6165
        this.success.write(oprot);
6166
        oprot.writeFieldEnd();
6167
      } else if (this.isSetWex()) {
2820 chandransh 6168
        oprot.writeFieldBegin(WEX_FIELD_DESC);
6169
        this.wex.write(oprot);
6170
        oprot.writeFieldEnd();
6171
      }
6172
      oprot.writeFieldStop();
6173
      oprot.writeStructEnd();
6174
    }
6175
 
6176
    @Override
6177
    public String toString() {
4496 mandeep.dh 6178
      StringBuilder sb = new StringBuilder("scanForOrder_result(");
2820 chandransh 6179
      boolean first = true;
6180
 
5361 mandeep.dh 6181
      sb.append("success:");
6182
      if (this.success == null) {
6183
        sb.append("null");
6184
      } else {
6185
        sb.append(this.success);
6186
      }
6187
      first = false;
6188
      if (!first) sb.append(", ");
2820 chandransh 6189
      sb.append("wex:");
6190
      if (this.wex == null) {
6191
        sb.append("null");
6192
      } else {
6193
        sb.append(this.wex);
6194
      }
6195
      first = false;
6196
      sb.append(")");
6197
      return sb.toString();
6198
    }
6199
 
3430 rajveer 6200
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 6201
      // check for required fields
6202
    }
6203
 
3430 rajveer 6204
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6205
      try {
6206
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6207
      } catch (org.apache.thrift.TException te) {
6208
        throw new java.io.IOException(te);
6209
      }
6210
    }
6211
 
6212
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6213
      try {
6214
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6215
      } catch (org.apache.thrift.TException te) {
6216
        throw new java.io.IOException(te);
6217
      }
6218
    }
6219
 
2820 chandransh 6220
  }
6221
 
4496 mandeep.dh 6222
  public static class createItemNumberMapping_args implements org.apache.thrift.TBase<createItemNumberMapping_args, createItemNumberMapping_args._Fields>, java.io.Serializable, Cloneable   {
6223
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createItemNumberMapping_args");
6224
 
6225
    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);
6226
    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);
6227
 
6228
    private String itemNumber; // required
6229
    private long itemId; // required
6230
 
6231
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6232
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6233
      ITEM_NUMBER((short)1, "itemNumber"),
6234
      ITEM_ID((short)2, "itemId");
6235
 
6236
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6237
 
6238
      static {
6239
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6240
          byName.put(field.getFieldName(), field);
6241
        }
6242
      }
6243
 
6244
      /**
6245
       * Find the _Fields constant that matches fieldId, or null if its not found.
6246
       */
6247
      public static _Fields findByThriftId(int fieldId) {
6248
        switch(fieldId) {
6249
          case 1: // ITEM_NUMBER
6250
            return ITEM_NUMBER;
6251
          case 2: // ITEM_ID
6252
            return ITEM_ID;
6253
          default:
6254
            return null;
6255
        }
6256
      }
6257
 
6258
      /**
6259
       * Find the _Fields constant that matches fieldId, throwing an exception
6260
       * if it is not found.
6261
       */
6262
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6263
        _Fields fields = findByThriftId(fieldId);
6264
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6265
        return fields;
6266
      }
6267
 
6268
      /**
6269
       * Find the _Fields constant that matches name, or null if its not found.
6270
       */
6271
      public static _Fields findByName(String name) {
6272
        return byName.get(name);
6273
      }
6274
 
6275
      private final short _thriftId;
6276
      private final String _fieldName;
6277
 
6278
      _Fields(short thriftId, String fieldName) {
6279
        _thriftId = thriftId;
6280
        _fieldName = fieldName;
6281
      }
6282
 
6283
      public short getThriftFieldId() {
6284
        return _thriftId;
6285
      }
6286
 
6287
      public String getFieldName() {
6288
        return _fieldName;
6289
      }
6290
    }
6291
 
6292
    // isset id assignments
6293
    private static final int __ITEMID_ISSET_ID = 0;
6294
    private BitSet __isset_bit_vector = new BitSet(1);
6295
 
6296
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6297
    static {
6298
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6299
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6300
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
6301
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6302
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6303
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6304
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createItemNumberMapping_args.class, metaDataMap);
6305
    }
6306
 
6307
    public createItemNumberMapping_args() {
6308
    }
6309
 
6310
    public createItemNumberMapping_args(
6311
      String itemNumber,
6312
      long itemId)
6313
    {
6314
      this();
6315
      this.itemNumber = itemNumber;
6316
      this.itemId = itemId;
6317
      setItemIdIsSet(true);
6318
    }
6319
 
6320
    /**
6321
     * Performs a deep copy on <i>other</i>.
6322
     */
6323
    public createItemNumberMapping_args(createItemNumberMapping_args other) {
6324
      __isset_bit_vector.clear();
6325
      __isset_bit_vector.or(other.__isset_bit_vector);
6326
      if (other.isSetItemNumber()) {
6327
        this.itemNumber = other.itemNumber;
6328
      }
6329
      this.itemId = other.itemId;
6330
    }
6331
 
6332
    public createItemNumberMapping_args deepCopy() {
6333
      return new createItemNumberMapping_args(this);
6334
    }
6335
 
6336
    @Override
6337
    public void clear() {
6338
      this.itemNumber = null;
6339
      setItemIdIsSet(false);
6340
      this.itemId = 0;
6341
    }
6342
 
6343
    public String getItemNumber() {
6344
      return this.itemNumber;
6345
    }
6346
 
6347
    public void setItemNumber(String itemNumber) {
6348
      this.itemNumber = itemNumber;
6349
    }
6350
 
6351
    public void unsetItemNumber() {
6352
      this.itemNumber = null;
6353
    }
6354
 
6355
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
6356
    public boolean isSetItemNumber() {
6357
      return this.itemNumber != null;
6358
    }
6359
 
6360
    public void setItemNumberIsSet(boolean value) {
6361
      if (!value) {
6362
        this.itemNumber = null;
6363
      }
6364
    }
6365
 
6366
    public long getItemId() {
6367
      return this.itemId;
6368
    }
6369
 
6370
    public void setItemId(long itemId) {
6371
      this.itemId = itemId;
6372
      setItemIdIsSet(true);
6373
    }
6374
 
6375
    public void unsetItemId() {
6376
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
6377
    }
6378
 
6379
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
6380
    public boolean isSetItemId() {
6381
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
6382
    }
6383
 
6384
    public void setItemIdIsSet(boolean value) {
6385
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
6386
    }
6387
 
6388
    public void setFieldValue(_Fields field, Object value) {
6389
      switch (field) {
6390
      case ITEM_NUMBER:
6391
        if (value == null) {
6392
          unsetItemNumber();
6393
        } else {
6394
          setItemNumber((String)value);
6395
        }
6396
        break;
6397
 
6398
      case ITEM_ID:
6399
        if (value == null) {
6400
          unsetItemId();
6401
        } else {
6402
          setItemId((Long)value);
6403
        }
6404
        break;
6405
 
6406
      }
6407
    }
6408
 
6409
    public Object getFieldValue(_Fields field) {
6410
      switch (field) {
6411
      case ITEM_NUMBER:
6412
        return getItemNumber();
6413
 
6414
      case ITEM_ID:
6415
        return Long.valueOf(getItemId());
6416
 
6417
      }
6418
      throw new IllegalStateException();
6419
    }
6420
 
6421
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6422
    public boolean isSet(_Fields field) {
6423
      if (field == null) {
6424
        throw new IllegalArgumentException();
6425
      }
6426
 
6427
      switch (field) {
6428
      case ITEM_NUMBER:
6429
        return isSetItemNumber();
6430
      case ITEM_ID:
6431
        return isSetItemId();
6432
      }
6433
      throw new IllegalStateException();
6434
    }
6435
 
6436
    @Override
6437
    public boolean equals(Object that) {
6438
      if (that == null)
6439
        return false;
6440
      if (that instanceof createItemNumberMapping_args)
6441
        return this.equals((createItemNumberMapping_args)that);
6442
      return false;
6443
    }
6444
 
6445
    public boolean equals(createItemNumberMapping_args that) {
6446
      if (that == null)
6447
        return false;
6448
 
6449
      boolean this_present_itemNumber = true && this.isSetItemNumber();
6450
      boolean that_present_itemNumber = true && that.isSetItemNumber();
6451
      if (this_present_itemNumber || that_present_itemNumber) {
6452
        if (!(this_present_itemNumber && that_present_itemNumber))
6453
          return false;
6454
        if (!this.itemNumber.equals(that.itemNumber))
6455
          return false;
6456
      }
6457
 
6458
      boolean this_present_itemId = true;
6459
      boolean that_present_itemId = true;
6460
      if (this_present_itemId || that_present_itemId) {
6461
        if (!(this_present_itemId && that_present_itemId))
6462
          return false;
6463
        if (this.itemId != that.itemId)
6464
          return false;
6465
      }
6466
 
6467
      return true;
6468
    }
6469
 
6470
    @Override
6471
    public int hashCode() {
6472
      return 0;
6473
    }
6474
 
6475
    public int compareTo(createItemNumberMapping_args other) {
6476
      if (!getClass().equals(other.getClass())) {
6477
        return getClass().getName().compareTo(other.getClass().getName());
6478
      }
6479
 
6480
      int lastComparison = 0;
6481
      createItemNumberMapping_args typedOther = (createItemNumberMapping_args)other;
6482
 
6483
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
6484
      if (lastComparison != 0) {
6485
        return lastComparison;
6486
      }
6487
      if (isSetItemNumber()) {
6488
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
6489
        if (lastComparison != 0) {
6490
          return lastComparison;
6491
        }
6492
      }
6493
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
6494
      if (lastComparison != 0) {
6495
        return lastComparison;
6496
      }
6497
      if (isSetItemId()) {
6498
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
6499
        if (lastComparison != 0) {
6500
          return lastComparison;
6501
        }
6502
      }
6503
      return 0;
6504
    }
6505
 
6506
    public _Fields fieldForId(int fieldId) {
6507
      return _Fields.findByThriftId(fieldId);
6508
    }
6509
 
6510
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6511
      org.apache.thrift.protocol.TField field;
6512
      iprot.readStructBegin();
6513
      while (true)
6514
      {
6515
        field = iprot.readFieldBegin();
6516
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6517
          break;
6518
        }
6519
        switch (field.id) {
6520
          case 1: // ITEM_NUMBER
6521
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
6522
              this.itemNumber = iprot.readString();
6523
            } else { 
6524
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6525
            }
6526
            break;
6527
          case 2: // ITEM_ID
6528
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6529
              this.itemId = iprot.readI64();
6530
              setItemIdIsSet(true);
6531
            } else { 
6532
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6533
            }
6534
            break;
6535
          default:
6536
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6537
        }
6538
        iprot.readFieldEnd();
6539
      }
6540
      iprot.readStructEnd();
6541
      validate();
6542
    }
6543
 
6544
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6545
      validate();
6546
 
6547
      oprot.writeStructBegin(STRUCT_DESC);
6548
      if (this.itemNumber != null) {
6549
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
6550
        oprot.writeString(this.itemNumber);
6551
        oprot.writeFieldEnd();
6552
      }
6553
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
6554
      oprot.writeI64(this.itemId);
6555
      oprot.writeFieldEnd();
6556
      oprot.writeFieldStop();
6557
      oprot.writeStructEnd();
6558
    }
6559
 
6560
    @Override
6561
    public String toString() {
6562
      StringBuilder sb = new StringBuilder("createItemNumberMapping_args(");
6563
      boolean first = true;
6564
 
6565
      sb.append("itemNumber:");
6566
      if (this.itemNumber == null) {
6567
        sb.append("null");
6568
      } else {
6569
        sb.append(this.itemNumber);
6570
      }
6571
      first = false;
6572
      if (!first) sb.append(", ");
6573
      sb.append("itemId:");
6574
      sb.append(this.itemId);
6575
      first = false;
6576
      sb.append(")");
6577
      return sb.toString();
6578
    }
6579
 
6580
    public void validate() throws org.apache.thrift.TException {
6581
      // check for required fields
6582
    }
6583
 
6584
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6585
      try {
6586
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6587
      } catch (org.apache.thrift.TException te) {
6588
        throw new java.io.IOException(te);
6589
      }
6590
    }
6591
 
6592
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6593
      try {
6594
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
6595
        __isset_bit_vector = new BitSet(1);
6596
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6597
      } catch (org.apache.thrift.TException te) {
6598
        throw new java.io.IOException(te);
6599
      }
6600
    }
6601
 
6602
  }
6603
 
6604
  public static class createItemNumberMapping_result implements org.apache.thrift.TBase<createItemNumberMapping_result, createItemNumberMapping_result._Fields>, java.io.Serializable, Cloneable   {
6605
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createItemNumberMapping_result");
6606
 
6607
 
6608
 
6609
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6610
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6611
;
6612
 
6613
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6614
 
6615
      static {
6616
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6617
          byName.put(field.getFieldName(), field);
6618
        }
6619
      }
6620
 
6621
      /**
6622
       * Find the _Fields constant that matches fieldId, or null if its not found.
6623
       */
6624
      public static _Fields findByThriftId(int fieldId) {
6625
        switch(fieldId) {
6626
          default:
6627
            return null;
6628
        }
6629
      }
6630
 
6631
      /**
6632
       * Find the _Fields constant that matches fieldId, throwing an exception
6633
       * if it is not found.
6634
       */
6635
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6636
        _Fields fields = findByThriftId(fieldId);
6637
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6638
        return fields;
6639
      }
6640
 
6641
      /**
6642
       * Find the _Fields constant that matches name, or null if its not found.
6643
       */
6644
      public static _Fields findByName(String name) {
6645
        return byName.get(name);
6646
      }
6647
 
6648
      private final short _thriftId;
6649
      private final String _fieldName;
6650
 
6651
      _Fields(short thriftId, String fieldName) {
6652
        _thriftId = thriftId;
6653
        _fieldName = fieldName;
6654
      }
6655
 
6656
      public short getThriftFieldId() {
6657
        return _thriftId;
6658
      }
6659
 
6660
      public String getFieldName() {
6661
        return _fieldName;
6662
      }
6663
    }
6664
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6665
    static {
6666
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6667
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6668
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createItemNumberMapping_result.class, metaDataMap);
6669
    }
6670
 
6671
    public createItemNumberMapping_result() {
6672
    }
6673
 
6674
    /**
6675
     * Performs a deep copy on <i>other</i>.
6676
     */
6677
    public createItemNumberMapping_result(createItemNumberMapping_result other) {
6678
    }
6679
 
6680
    public createItemNumberMapping_result deepCopy() {
6681
      return new createItemNumberMapping_result(this);
6682
    }
6683
 
6684
    @Override
6685
    public void clear() {
6686
    }
6687
 
6688
    public void setFieldValue(_Fields field, Object value) {
6689
      switch (field) {
6690
      }
6691
    }
6692
 
6693
    public Object getFieldValue(_Fields field) {
6694
      switch (field) {
6695
      }
6696
      throw new IllegalStateException();
6697
    }
6698
 
6699
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6700
    public boolean isSet(_Fields field) {
6701
      if (field == null) {
6702
        throw new IllegalArgumentException();
6703
      }
6704
 
6705
      switch (field) {
6706
      }
6707
      throw new IllegalStateException();
6708
    }
6709
 
6710
    @Override
6711
    public boolean equals(Object that) {
6712
      if (that == null)
6713
        return false;
6714
      if (that instanceof createItemNumberMapping_result)
6715
        return this.equals((createItemNumberMapping_result)that);
6716
      return false;
6717
    }
6718
 
6719
    public boolean equals(createItemNumberMapping_result that) {
6720
      if (that == null)
6721
        return false;
6722
 
6723
      return true;
6724
    }
6725
 
6726
    @Override
6727
    public int hashCode() {
6728
      return 0;
6729
    }
6730
 
6731
    public int compareTo(createItemNumberMapping_result other) {
6732
      if (!getClass().equals(other.getClass())) {
6733
        return getClass().getName().compareTo(other.getClass().getName());
6734
      }
6735
 
6736
      int lastComparison = 0;
6737
      createItemNumberMapping_result typedOther = (createItemNumberMapping_result)other;
6738
 
6739
      return 0;
6740
    }
6741
 
6742
    public _Fields fieldForId(int fieldId) {
6743
      return _Fields.findByThriftId(fieldId);
6744
    }
6745
 
6746
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6747
      org.apache.thrift.protocol.TField field;
6748
      iprot.readStructBegin();
6749
      while (true)
6750
      {
6751
        field = iprot.readFieldBegin();
6752
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6753
          break;
6754
        }
6755
        switch (field.id) {
6756
          default:
6757
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6758
        }
6759
        iprot.readFieldEnd();
6760
      }
6761
      iprot.readStructEnd();
6762
      validate();
6763
    }
6764
 
6765
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6766
      oprot.writeStructBegin(STRUCT_DESC);
6767
 
6768
      oprot.writeFieldStop();
6769
      oprot.writeStructEnd();
6770
    }
6771
 
6772
    @Override
6773
    public String toString() {
6774
      StringBuilder sb = new StringBuilder("createItemNumberMapping_result(");
6775
      boolean first = true;
6776
 
6777
      sb.append(")");
6778
      return sb.toString();
6779
    }
6780
 
6781
    public void validate() throws org.apache.thrift.TException {
6782
      // check for required fields
6783
    }
6784
 
6785
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6786
      try {
6787
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6788
      } catch (org.apache.thrift.TException te) {
6789
        throw new java.io.IOException(te);
6790
      }
6791
    }
6792
 
6793
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6794
      try {
6795
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6796
      } catch (org.apache.thrift.TException te) {
6797
        throw new java.io.IOException(te);
6798
      }
6799
    }
6800
 
6801
  }
6802
 
4622 amit.gupta 6803
  public static class getItemNumbers_args implements org.apache.thrift.TBase<getItemNumbers_args, getItemNumbers_args._Fields>, java.io.Serializable, Cloneable   {
6804
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemNumbers_args");
6805
 
6806
    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);
6807
 
6808
    private long itemId; // required
6809
 
6810
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6811
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6812
      ITEM_ID((short)1, "itemId");
6813
 
6814
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6815
 
6816
      static {
6817
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6818
          byName.put(field.getFieldName(), field);
6819
        }
6820
      }
6821
 
6822
      /**
6823
       * Find the _Fields constant that matches fieldId, or null if its not found.
6824
       */
6825
      public static _Fields findByThriftId(int fieldId) {
6826
        switch(fieldId) {
6827
          case 1: // ITEM_ID
6828
            return ITEM_ID;
6829
          default:
6830
            return null;
6831
        }
6832
      }
6833
 
6834
      /**
6835
       * Find the _Fields constant that matches fieldId, throwing an exception
6836
       * if it is not found.
6837
       */
6838
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6839
        _Fields fields = findByThriftId(fieldId);
6840
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6841
        return fields;
6842
      }
6843
 
6844
      /**
6845
       * Find the _Fields constant that matches name, or null if its not found.
6846
       */
6847
      public static _Fields findByName(String name) {
6848
        return byName.get(name);
6849
      }
6850
 
6851
      private final short _thriftId;
6852
      private final String _fieldName;
6853
 
6854
      _Fields(short thriftId, String fieldName) {
6855
        _thriftId = thriftId;
6856
        _fieldName = fieldName;
6857
      }
6858
 
6859
      public short getThriftFieldId() {
6860
        return _thriftId;
6861
      }
6862
 
6863
      public String getFieldName() {
6864
        return _fieldName;
6865
      }
6866
    }
6867
 
6868
    // isset id assignments
6869
    private static final int __ITEMID_ISSET_ID = 0;
6870
    private BitSet __isset_bit_vector = new BitSet(1);
6871
 
6872
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6873
    static {
6874
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6875
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6876
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6877
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6878
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemNumbers_args.class, metaDataMap);
6879
    }
6880
 
6881
    public getItemNumbers_args() {
6882
    }
6883
 
6884
    public getItemNumbers_args(
6885
      long itemId)
6886
    {
6887
      this();
6888
      this.itemId = itemId;
6889
      setItemIdIsSet(true);
6890
    }
6891
 
6892
    /**
6893
     * Performs a deep copy on <i>other</i>.
6894
     */
6895
    public getItemNumbers_args(getItemNumbers_args other) {
6896
      __isset_bit_vector.clear();
6897
      __isset_bit_vector.or(other.__isset_bit_vector);
6898
      this.itemId = other.itemId;
6899
    }
6900
 
6901
    public getItemNumbers_args deepCopy() {
6902
      return new getItemNumbers_args(this);
6903
    }
6904
 
6905
    @Override
6906
    public void clear() {
6907
      setItemIdIsSet(false);
6908
      this.itemId = 0;
6909
    }
6910
 
6911
    public long getItemId() {
6912
      return this.itemId;
6913
    }
6914
 
6915
    public void setItemId(long itemId) {
6916
      this.itemId = itemId;
6917
      setItemIdIsSet(true);
6918
    }
6919
 
6920
    public void unsetItemId() {
6921
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
6922
    }
6923
 
6924
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
6925
    public boolean isSetItemId() {
6926
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
6927
    }
6928
 
6929
    public void setItemIdIsSet(boolean value) {
6930
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
6931
    }
6932
 
6933
    public void setFieldValue(_Fields field, Object value) {
6934
      switch (field) {
6935
      case ITEM_ID:
6936
        if (value == null) {
6937
          unsetItemId();
6938
        } else {
6939
          setItemId((Long)value);
6940
        }
6941
        break;
6942
 
6943
      }
6944
    }
6945
 
6946
    public Object getFieldValue(_Fields field) {
6947
      switch (field) {
6948
      case ITEM_ID:
6949
        return Long.valueOf(getItemId());
6950
 
6951
      }
6952
      throw new IllegalStateException();
6953
    }
6954
 
6955
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6956
    public boolean isSet(_Fields field) {
6957
      if (field == null) {
6958
        throw new IllegalArgumentException();
6959
      }
6960
 
6961
      switch (field) {
6962
      case ITEM_ID:
6963
        return isSetItemId();
6964
      }
6965
      throw new IllegalStateException();
6966
    }
6967
 
6968
    @Override
6969
    public boolean equals(Object that) {
6970
      if (that == null)
6971
        return false;
6972
      if (that instanceof getItemNumbers_args)
6973
        return this.equals((getItemNumbers_args)that);
6974
      return false;
6975
    }
6976
 
6977
    public boolean equals(getItemNumbers_args that) {
6978
      if (that == null)
6979
        return false;
6980
 
6981
      boolean this_present_itemId = true;
6982
      boolean that_present_itemId = true;
6983
      if (this_present_itemId || that_present_itemId) {
6984
        if (!(this_present_itemId && that_present_itemId))
6985
          return false;
6986
        if (this.itemId != that.itemId)
6987
          return false;
6988
      }
6989
 
6990
      return true;
6991
    }
6992
 
6993
    @Override
6994
    public int hashCode() {
6995
      return 0;
6996
    }
6997
 
6998
    public int compareTo(getItemNumbers_args other) {
6999
      if (!getClass().equals(other.getClass())) {
7000
        return getClass().getName().compareTo(other.getClass().getName());
7001
      }
7002
 
7003
      int lastComparison = 0;
7004
      getItemNumbers_args typedOther = (getItemNumbers_args)other;
7005
 
7006
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
7007
      if (lastComparison != 0) {
7008
        return lastComparison;
7009
      }
7010
      if (isSetItemId()) {
7011
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
7012
        if (lastComparison != 0) {
7013
          return lastComparison;
7014
        }
7015
      }
7016
      return 0;
7017
    }
7018
 
7019
    public _Fields fieldForId(int fieldId) {
7020
      return _Fields.findByThriftId(fieldId);
7021
    }
7022
 
7023
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7024
      org.apache.thrift.protocol.TField field;
7025
      iprot.readStructBegin();
7026
      while (true)
7027
      {
7028
        field = iprot.readFieldBegin();
7029
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7030
          break;
7031
        }
7032
        switch (field.id) {
7033
          case 1: // ITEM_ID
7034
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7035
              this.itemId = iprot.readI64();
7036
              setItemIdIsSet(true);
7037
            } else { 
7038
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7039
            }
7040
            break;
7041
          default:
7042
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7043
        }
7044
        iprot.readFieldEnd();
7045
      }
7046
      iprot.readStructEnd();
7047
      validate();
7048
    }
7049
 
7050
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7051
      validate();
7052
 
7053
      oprot.writeStructBegin(STRUCT_DESC);
7054
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
7055
      oprot.writeI64(this.itemId);
7056
      oprot.writeFieldEnd();
7057
      oprot.writeFieldStop();
7058
      oprot.writeStructEnd();
7059
    }
7060
 
7061
    @Override
7062
    public String toString() {
7063
      StringBuilder sb = new StringBuilder("getItemNumbers_args(");
7064
      boolean first = true;
7065
 
7066
      sb.append("itemId:");
7067
      sb.append(this.itemId);
7068
      first = false;
7069
      sb.append(")");
7070
      return sb.toString();
7071
    }
7072
 
7073
    public void validate() throws org.apache.thrift.TException {
7074
      // check for required fields
7075
    }
7076
 
7077
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7078
      try {
7079
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7080
      } catch (org.apache.thrift.TException te) {
7081
        throw new java.io.IOException(te);
7082
      }
7083
    }
7084
 
7085
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7086
      try {
7087
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
7088
        __isset_bit_vector = new BitSet(1);
7089
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7090
      } catch (org.apache.thrift.TException te) {
7091
        throw new java.io.IOException(te);
7092
      }
7093
    }
7094
 
7095
  }
7096
 
7097
  public static class getItemNumbers_result implements org.apache.thrift.TBase<getItemNumbers_result, getItemNumbers_result._Fields>, java.io.Serializable, Cloneable   {
7098
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemNumbers_result");
7099
 
7100
    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);
7101
 
7102
    private List<String> success; // required
7103
 
7104
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7105
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7106
      SUCCESS((short)0, "success");
7107
 
7108
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7109
 
7110
      static {
7111
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7112
          byName.put(field.getFieldName(), field);
7113
        }
7114
      }
7115
 
7116
      /**
7117
       * Find the _Fields constant that matches fieldId, or null if its not found.
7118
       */
7119
      public static _Fields findByThriftId(int fieldId) {
7120
        switch(fieldId) {
7121
          case 0: // SUCCESS
7122
            return SUCCESS;
7123
          default:
7124
            return null;
7125
        }
7126
      }
7127
 
7128
      /**
7129
       * Find the _Fields constant that matches fieldId, throwing an exception
7130
       * if it is not found.
7131
       */
7132
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7133
        _Fields fields = findByThriftId(fieldId);
7134
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7135
        return fields;
7136
      }
7137
 
7138
      /**
7139
       * Find the _Fields constant that matches name, or null if its not found.
7140
       */
7141
      public static _Fields findByName(String name) {
7142
        return byName.get(name);
7143
      }
7144
 
7145
      private final short _thriftId;
7146
      private final String _fieldName;
7147
 
7148
      _Fields(short thriftId, String fieldName) {
7149
        _thriftId = thriftId;
7150
        _fieldName = fieldName;
7151
      }
7152
 
7153
      public short getThriftFieldId() {
7154
        return _thriftId;
7155
      }
7156
 
7157
      public String getFieldName() {
7158
        return _fieldName;
7159
      }
7160
    }
7161
 
7162
    // isset id assignments
7163
 
7164
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7165
    static {
7166
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7167
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7168
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7169
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
7170
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7171
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemNumbers_result.class, metaDataMap);
7172
    }
7173
 
7174
    public getItemNumbers_result() {
7175
    }
7176
 
7177
    public getItemNumbers_result(
7178
      List<String> success)
7179
    {
7180
      this();
7181
      this.success = success;
7182
    }
7183
 
7184
    /**
7185
     * Performs a deep copy on <i>other</i>.
7186
     */
7187
    public getItemNumbers_result(getItemNumbers_result other) {
7188
      if (other.isSetSuccess()) {
7189
        List<String> __this__success = new ArrayList<String>();
7190
        for (String other_element : other.success) {
7191
          __this__success.add(other_element);
7192
        }
7193
        this.success = __this__success;
7194
      }
7195
    }
7196
 
7197
    public getItemNumbers_result deepCopy() {
7198
      return new getItemNumbers_result(this);
7199
    }
7200
 
7201
    @Override
7202
    public void clear() {
7203
      this.success = null;
7204
    }
7205
 
7206
    public int getSuccessSize() {
7207
      return (this.success == null) ? 0 : this.success.size();
7208
    }
7209
 
7210
    public java.util.Iterator<String> getSuccessIterator() {
7211
      return (this.success == null) ? null : this.success.iterator();
7212
    }
7213
 
7214
    public void addToSuccess(String elem) {
7215
      if (this.success == null) {
7216
        this.success = new ArrayList<String>();
7217
      }
7218
      this.success.add(elem);
7219
    }
7220
 
7221
    public List<String> getSuccess() {
7222
      return this.success;
7223
    }
7224
 
7225
    public void setSuccess(List<String> success) {
7226
      this.success = success;
7227
    }
7228
 
7229
    public void unsetSuccess() {
7230
      this.success = null;
7231
    }
7232
 
7233
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7234
    public boolean isSetSuccess() {
7235
      return this.success != null;
7236
    }
7237
 
7238
    public void setSuccessIsSet(boolean value) {
7239
      if (!value) {
7240
        this.success = null;
7241
      }
7242
    }
7243
 
7244
    public void setFieldValue(_Fields field, Object value) {
7245
      switch (field) {
7246
      case SUCCESS:
7247
        if (value == null) {
7248
          unsetSuccess();
7249
        } else {
7250
          setSuccess((List<String>)value);
7251
        }
7252
        break;
7253
 
7254
      }
7255
    }
7256
 
7257
    public Object getFieldValue(_Fields field) {
7258
      switch (field) {
7259
      case SUCCESS:
7260
        return getSuccess();
7261
 
7262
      }
7263
      throw new IllegalStateException();
7264
    }
7265
 
7266
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7267
    public boolean isSet(_Fields field) {
7268
      if (field == null) {
7269
        throw new IllegalArgumentException();
7270
      }
7271
 
7272
      switch (field) {
7273
      case SUCCESS:
7274
        return isSetSuccess();
7275
      }
7276
      throw new IllegalStateException();
7277
    }
7278
 
7279
    @Override
7280
    public boolean equals(Object that) {
7281
      if (that == null)
7282
        return false;
7283
      if (that instanceof getItemNumbers_result)
7284
        return this.equals((getItemNumbers_result)that);
7285
      return false;
7286
    }
7287
 
7288
    public boolean equals(getItemNumbers_result that) {
7289
      if (that == null)
7290
        return false;
7291
 
7292
      boolean this_present_success = true && this.isSetSuccess();
7293
      boolean that_present_success = true && that.isSetSuccess();
7294
      if (this_present_success || that_present_success) {
7295
        if (!(this_present_success && that_present_success))
7296
          return false;
7297
        if (!this.success.equals(that.success))
7298
          return false;
7299
      }
7300
 
7301
      return true;
7302
    }
7303
 
7304
    @Override
7305
    public int hashCode() {
7306
      return 0;
7307
    }
7308
 
7309
    public int compareTo(getItemNumbers_result other) {
7310
      if (!getClass().equals(other.getClass())) {
7311
        return getClass().getName().compareTo(other.getClass().getName());
7312
      }
7313
 
7314
      int lastComparison = 0;
7315
      getItemNumbers_result typedOther = (getItemNumbers_result)other;
7316
 
7317
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7318
      if (lastComparison != 0) {
7319
        return lastComparison;
7320
      }
7321
      if (isSetSuccess()) {
7322
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7323
        if (lastComparison != 0) {
7324
          return lastComparison;
7325
        }
7326
      }
7327
      return 0;
7328
    }
7329
 
7330
    public _Fields fieldForId(int fieldId) {
7331
      return _Fields.findByThriftId(fieldId);
7332
    }
7333
 
7334
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7335
      org.apache.thrift.protocol.TField field;
7336
      iprot.readStructBegin();
7337
      while (true)
7338
      {
7339
        field = iprot.readFieldBegin();
7340
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7341
          break;
7342
        }
7343
        switch (field.id) {
7344
          case 0: // SUCCESS
7345
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
7346
              {
5361 mandeep.dh 7347
                org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
7348
                this.success = new ArrayList<String>(_list0.size);
7349
                for (int _i1 = 0; _i1 < _list0.size; ++_i1)
4622 amit.gupta 7350
                {
5361 mandeep.dh 7351
                  String _elem2; // required
7352
                  _elem2 = iprot.readString();
7353
                  this.success.add(_elem2);
4622 amit.gupta 7354
                }
7355
                iprot.readListEnd();
7356
              }
7357
            } else { 
7358
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7359
            }
7360
            break;
7361
          default:
7362
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7363
        }
7364
        iprot.readFieldEnd();
7365
      }
7366
      iprot.readStructEnd();
7367
      validate();
7368
    }
7369
 
7370
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7371
      oprot.writeStructBegin(STRUCT_DESC);
7372
 
7373
      if (this.isSetSuccess()) {
7374
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7375
        {
7376
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size()));
5361 mandeep.dh 7377
          for (String _iter3 : this.success)
4622 amit.gupta 7378
          {
5361 mandeep.dh 7379
            oprot.writeString(_iter3);
4622 amit.gupta 7380
          }
7381
          oprot.writeListEnd();
7382
        }
7383
        oprot.writeFieldEnd();
7384
      }
7385
      oprot.writeFieldStop();
7386
      oprot.writeStructEnd();
7387
    }
7388
 
7389
    @Override
7390
    public String toString() {
7391
      StringBuilder sb = new StringBuilder("getItemNumbers_result(");
7392
      boolean first = true;
7393
 
7394
      sb.append("success:");
7395
      if (this.success == null) {
7396
        sb.append("null");
7397
      } else {
7398
        sb.append(this.success);
7399
      }
7400
      first = false;
7401
      sb.append(")");
7402
      return sb.toString();
7403
    }
7404
 
7405
    public void validate() throws org.apache.thrift.TException {
7406
      // check for required fields
7407
    }
7408
 
7409
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7410
      try {
7411
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7412
      } catch (org.apache.thrift.TException te) {
7413
        throw new java.io.IOException(te);
7414
      }
7415
    }
7416
 
7417
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7418
      try {
7419
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7420
      } catch (org.apache.thrift.TException te) {
7421
        throw new java.io.IOException(te);
7422
      }
7423
    }
7424
 
7425
  }
7426
 
5110 mandeep.dh 7427
  public static class getItemIds_args implements org.apache.thrift.TBase<getItemIds_args, getItemIds_args._Fields>, java.io.Serializable, Cloneable   {
7428
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemIds_args");
7429
 
7430
    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);
7431
 
7432
    private String itemNumber; // required
7433
 
7434
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7435
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7436
      ITEM_NUMBER((short)1, "itemNumber");
7437
 
7438
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7439
 
7440
      static {
7441
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7442
          byName.put(field.getFieldName(), field);
7443
        }
7444
      }
7445
 
7446
      /**
7447
       * Find the _Fields constant that matches fieldId, or null if its not found.
7448
       */
7449
      public static _Fields findByThriftId(int fieldId) {
7450
        switch(fieldId) {
7451
          case 1: // ITEM_NUMBER
7452
            return ITEM_NUMBER;
7453
          default:
7454
            return null;
7455
        }
7456
      }
7457
 
7458
      /**
7459
       * Find the _Fields constant that matches fieldId, throwing an exception
7460
       * if it is not found.
7461
       */
7462
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7463
        _Fields fields = findByThriftId(fieldId);
7464
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7465
        return fields;
7466
      }
7467
 
7468
      /**
7469
       * Find the _Fields constant that matches name, or null if its not found.
7470
       */
7471
      public static _Fields findByName(String name) {
7472
        return byName.get(name);
7473
      }
7474
 
7475
      private final short _thriftId;
7476
      private final String _fieldName;
7477
 
7478
      _Fields(short thriftId, String fieldName) {
7479
        _thriftId = thriftId;
7480
        _fieldName = fieldName;
7481
      }
7482
 
7483
      public short getThriftFieldId() {
7484
        return _thriftId;
7485
      }
7486
 
7487
      public String getFieldName() {
7488
        return _fieldName;
7489
      }
7490
    }
7491
 
7492
    // isset id assignments
7493
 
7494
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7495
    static {
7496
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7497
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7498
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
7499
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7500
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemIds_args.class, metaDataMap);
7501
    }
7502
 
7503
    public getItemIds_args() {
7504
    }
7505
 
7506
    public getItemIds_args(
7507
      String itemNumber)
7508
    {
7509
      this();
7510
      this.itemNumber = itemNumber;
7511
    }
7512
 
7513
    /**
7514
     * Performs a deep copy on <i>other</i>.
7515
     */
7516
    public getItemIds_args(getItemIds_args other) {
7517
      if (other.isSetItemNumber()) {
7518
        this.itemNumber = other.itemNumber;
7519
      }
7520
    }
7521
 
7522
    public getItemIds_args deepCopy() {
7523
      return new getItemIds_args(this);
7524
    }
7525
 
7526
    @Override
7527
    public void clear() {
7528
      this.itemNumber = null;
7529
    }
7530
 
7531
    public String getItemNumber() {
7532
      return this.itemNumber;
7533
    }
7534
 
7535
    public void setItemNumber(String itemNumber) {
7536
      this.itemNumber = itemNumber;
7537
    }
7538
 
7539
    public void unsetItemNumber() {
7540
      this.itemNumber = null;
7541
    }
7542
 
7543
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
7544
    public boolean isSetItemNumber() {
7545
      return this.itemNumber != null;
7546
    }
7547
 
7548
    public void setItemNumberIsSet(boolean value) {
7549
      if (!value) {
7550
        this.itemNumber = null;
7551
      }
7552
    }
7553
 
7554
    public void setFieldValue(_Fields field, Object value) {
7555
      switch (field) {
7556
      case ITEM_NUMBER:
7557
        if (value == null) {
7558
          unsetItemNumber();
7559
        } else {
7560
          setItemNumber((String)value);
7561
        }
7562
        break;
7563
 
7564
      }
7565
    }
7566
 
7567
    public Object getFieldValue(_Fields field) {
7568
      switch (field) {
7569
      case ITEM_NUMBER:
7570
        return getItemNumber();
7571
 
7572
      }
7573
      throw new IllegalStateException();
7574
    }
7575
 
7576
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7577
    public boolean isSet(_Fields field) {
7578
      if (field == null) {
7579
        throw new IllegalArgumentException();
7580
      }
7581
 
7582
      switch (field) {
7583
      case ITEM_NUMBER:
7584
        return isSetItemNumber();
7585
      }
7586
      throw new IllegalStateException();
7587
    }
7588
 
7589
    @Override
7590
    public boolean equals(Object that) {
7591
      if (that == null)
7592
        return false;
7593
      if (that instanceof getItemIds_args)
7594
        return this.equals((getItemIds_args)that);
7595
      return false;
7596
    }
7597
 
7598
    public boolean equals(getItemIds_args that) {
7599
      if (that == null)
7600
        return false;
7601
 
7602
      boolean this_present_itemNumber = true && this.isSetItemNumber();
7603
      boolean that_present_itemNumber = true && that.isSetItemNumber();
7604
      if (this_present_itemNumber || that_present_itemNumber) {
7605
        if (!(this_present_itemNumber && that_present_itemNumber))
7606
          return false;
7607
        if (!this.itemNumber.equals(that.itemNumber))
7608
          return false;
7609
      }
7610
 
7611
      return true;
7612
    }
7613
 
7614
    @Override
7615
    public int hashCode() {
7616
      return 0;
7617
    }
7618
 
7619
    public int compareTo(getItemIds_args other) {
7620
      if (!getClass().equals(other.getClass())) {
7621
        return getClass().getName().compareTo(other.getClass().getName());
7622
      }
7623
 
7624
      int lastComparison = 0;
7625
      getItemIds_args typedOther = (getItemIds_args)other;
7626
 
7627
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
7628
      if (lastComparison != 0) {
7629
        return lastComparison;
7630
      }
7631
      if (isSetItemNumber()) {
7632
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
7633
        if (lastComparison != 0) {
7634
          return lastComparison;
7635
        }
7636
      }
7637
      return 0;
7638
    }
7639
 
7640
    public _Fields fieldForId(int fieldId) {
7641
      return _Fields.findByThriftId(fieldId);
7642
    }
7643
 
7644
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7645
      org.apache.thrift.protocol.TField field;
7646
      iprot.readStructBegin();
7647
      while (true)
7648
      {
7649
        field = iprot.readFieldBegin();
7650
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7651
          break;
7652
        }
7653
        switch (field.id) {
7654
          case 1: // ITEM_NUMBER
7655
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
7656
              this.itemNumber = iprot.readString();
7657
            } else { 
7658
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7659
            }
7660
            break;
7661
          default:
7662
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7663
        }
7664
        iprot.readFieldEnd();
7665
      }
7666
      iprot.readStructEnd();
7667
      validate();
7668
    }
7669
 
7670
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7671
      validate();
7672
 
7673
      oprot.writeStructBegin(STRUCT_DESC);
7674
      if (this.itemNumber != null) {
7675
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
7676
        oprot.writeString(this.itemNumber);
7677
        oprot.writeFieldEnd();
7678
      }
7679
      oprot.writeFieldStop();
7680
      oprot.writeStructEnd();
7681
    }
7682
 
7683
    @Override
7684
    public String toString() {
7685
      StringBuilder sb = new StringBuilder("getItemIds_args(");
7686
      boolean first = true;
7687
 
7688
      sb.append("itemNumber:");
7689
      if (this.itemNumber == null) {
7690
        sb.append("null");
7691
      } else {
7692
        sb.append(this.itemNumber);
7693
      }
7694
      first = false;
7695
      sb.append(")");
7696
      return sb.toString();
7697
    }
7698
 
7699
    public void validate() throws org.apache.thrift.TException {
7700
      // check for required fields
7701
    }
7702
 
7703
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7704
      try {
7705
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7706
      } catch (org.apache.thrift.TException te) {
7707
        throw new java.io.IOException(te);
7708
      }
7709
    }
7710
 
7711
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7712
      try {
7713
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7714
      } catch (org.apache.thrift.TException te) {
7715
        throw new java.io.IOException(te);
7716
      }
7717
    }
7718
 
7719
  }
7720
 
7721
  public static class getItemIds_result implements org.apache.thrift.TBase<getItemIds_result, getItemIds_result._Fields>, java.io.Serializable, Cloneable   {
7722
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemIds_result");
7723
 
7724
    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);
7725
 
7726
    private List<Long> success; // required
7727
 
7728
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7729
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7730
      SUCCESS((short)0, "success");
7731
 
7732
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7733
 
7734
      static {
7735
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7736
          byName.put(field.getFieldName(), field);
7737
        }
7738
      }
7739
 
7740
      /**
7741
       * Find the _Fields constant that matches fieldId, or null if its not found.
7742
       */
7743
      public static _Fields findByThriftId(int fieldId) {
7744
        switch(fieldId) {
7745
          case 0: // SUCCESS
7746
            return SUCCESS;
7747
          default:
7748
            return null;
7749
        }
7750
      }
7751
 
7752
      /**
7753
       * Find the _Fields constant that matches fieldId, throwing an exception
7754
       * if it is not found.
7755
       */
7756
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7757
        _Fields fields = findByThriftId(fieldId);
7758
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7759
        return fields;
7760
      }
7761
 
7762
      /**
7763
       * Find the _Fields constant that matches name, or null if its not found.
7764
       */
7765
      public static _Fields findByName(String name) {
7766
        return byName.get(name);
7767
      }
7768
 
7769
      private final short _thriftId;
7770
      private final String _fieldName;
7771
 
7772
      _Fields(short thriftId, String fieldName) {
7773
        _thriftId = thriftId;
7774
        _fieldName = fieldName;
7775
      }
7776
 
7777
      public short getThriftFieldId() {
7778
        return _thriftId;
7779
      }
7780
 
7781
      public String getFieldName() {
7782
        return _fieldName;
7783
      }
7784
    }
7785
 
7786
    // isset id assignments
7787
 
7788
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7789
    static {
7790
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7791
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7792
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7793
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
7794
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7795
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemIds_result.class, metaDataMap);
7796
    }
7797
 
7798
    public getItemIds_result() {
7799
    }
7800
 
7801
    public getItemIds_result(
7802
      List<Long> success)
7803
    {
7804
      this();
7805
      this.success = success;
7806
    }
7807
 
7808
    /**
7809
     * Performs a deep copy on <i>other</i>.
7810
     */
7811
    public getItemIds_result(getItemIds_result other) {
7812
      if (other.isSetSuccess()) {
7813
        List<Long> __this__success = new ArrayList<Long>();
7814
        for (Long other_element : other.success) {
7815
          __this__success.add(other_element);
7816
        }
7817
        this.success = __this__success;
7818
      }
7819
    }
7820
 
7821
    public getItemIds_result deepCopy() {
7822
      return new getItemIds_result(this);
7823
    }
7824
 
7825
    @Override
7826
    public void clear() {
7827
      this.success = null;
7828
    }
7829
 
7830
    public int getSuccessSize() {
7831
      return (this.success == null) ? 0 : this.success.size();
7832
    }
7833
 
7834
    public java.util.Iterator<Long> getSuccessIterator() {
7835
      return (this.success == null) ? null : this.success.iterator();
7836
    }
7837
 
7838
    public void addToSuccess(long elem) {
7839
      if (this.success == null) {
7840
        this.success = new ArrayList<Long>();
7841
      }
7842
      this.success.add(elem);
7843
    }
7844
 
7845
    public List<Long> getSuccess() {
7846
      return this.success;
7847
    }
7848
 
7849
    public void setSuccess(List<Long> success) {
7850
      this.success = success;
7851
    }
7852
 
7853
    public void unsetSuccess() {
7854
      this.success = null;
7855
    }
7856
 
7857
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7858
    public boolean isSetSuccess() {
7859
      return this.success != null;
7860
    }
7861
 
7862
    public void setSuccessIsSet(boolean value) {
7863
      if (!value) {
7864
        this.success = null;
7865
      }
7866
    }
7867
 
7868
    public void setFieldValue(_Fields field, Object value) {
7869
      switch (field) {
7870
      case SUCCESS:
7871
        if (value == null) {
7872
          unsetSuccess();
7873
        } else {
7874
          setSuccess((List<Long>)value);
7875
        }
7876
        break;
7877
 
7878
      }
7879
    }
7880
 
7881
    public Object getFieldValue(_Fields field) {
7882
      switch (field) {
7883
      case SUCCESS:
7884
        return getSuccess();
7885
 
7886
      }
7887
      throw new IllegalStateException();
7888
    }
7889
 
7890
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7891
    public boolean isSet(_Fields field) {
7892
      if (field == null) {
7893
        throw new IllegalArgumentException();
7894
      }
7895
 
7896
      switch (field) {
7897
      case SUCCESS:
7898
        return isSetSuccess();
7899
      }
7900
      throw new IllegalStateException();
7901
    }
7902
 
7903
    @Override
7904
    public boolean equals(Object that) {
7905
      if (that == null)
7906
        return false;
7907
      if (that instanceof getItemIds_result)
7908
        return this.equals((getItemIds_result)that);
7909
      return false;
7910
    }
7911
 
7912
    public boolean equals(getItemIds_result that) {
7913
      if (that == null)
7914
        return false;
7915
 
7916
      boolean this_present_success = true && this.isSetSuccess();
7917
      boolean that_present_success = true && that.isSetSuccess();
7918
      if (this_present_success || that_present_success) {
7919
        if (!(this_present_success && that_present_success))
7920
          return false;
7921
        if (!this.success.equals(that.success))
7922
          return false;
7923
      }
7924
 
7925
      return true;
7926
    }
7927
 
7928
    @Override
7929
    public int hashCode() {
7930
      return 0;
7931
    }
7932
 
7933
    public int compareTo(getItemIds_result other) {
7934
      if (!getClass().equals(other.getClass())) {
7935
        return getClass().getName().compareTo(other.getClass().getName());
7936
      }
7937
 
7938
      int lastComparison = 0;
7939
      getItemIds_result typedOther = (getItemIds_result)other;
7940
 
7941
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7942
      if (lastComparison != 0) {
7943
        return lastComparison;
7944
      }
7945
      if (isSetSuccess()) {
7946
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7947
        if (lastComparison != 0) {
7948
          return lastComparison;
7949
        }
7950
      }
7951
      return 0;
7952
    }
7953
 
7954
    public _Fields fieldForId(int fieldId) {
7955
      return _Fields.findByThriftId(fieldId);
7956
    }
7957
 
7958
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7959
      org.apache.thrift.protocol.TField field;
7960
      iprot.readStructBegin();
7961
      while (true)
7962
      {
7963
        field = iprot.readFieldBegin();
7964
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7965
          break;
7966
        }
7967
        switch (field.id) {
7968
          case 0: // SUCCESS
7969
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
7970
              {
5361 mandeep.dh 7971
                org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
7972
                this.success = new ArrayList<Long>(_list4.size);
7973
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
5110 mandeep.dh 7974
                {
5361 mandeep.dh 7975
                  long _elem6; // required
7976
                  _elem6 = iprot.readI64();
7977
                  this.success.add(_elem6);
5110 mandeep.dh 7978
                }
7979
                iprot.readListEnd();
7980
              }
7981
            } else { 
7982
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7983
            }
7984
            break;
7985
          default:
7986
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7987
        }
7988
        iprot.readFieldEnd();
7989
      }
7990
      iprot.readStructEnd();
7991
      validate();
7992
    }
7993
 
7994
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7995
      oprot.writeStructBegin(STRUCT_DESC);
7996
 
7997
      if (this.isSetSuccess()) {
7998
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7999
        {
8000
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.success.size()));
5361 mandeep.dh 8001
          for (long _iter7 : this.success)
5110 mandeep.dh 8002
          {
5361 mandeep.dh 8003
            oprot.writeI64(_iter7);
5110 mandeep.dh 8004
          }
8005
          oprot.writeListEnd();
8006
        }
8007
        oprot.writeFieldEnd();
8008
      }
8009
      oprot.writeFieldStop();
8010
      oprot.writeStructEnd();
8011
    }
8012
 
8013
    @Override
8014
    public String toString() {
8015
      StringBuilder sb = new StringBuilder("getItemIds_result(");
8016
      boolean first = true;
8017
 
8018
      sb.append("success:");
8019
      if (this.success == null) {
8020
        sb.append("null");
8021
      } else {
8022
        sb.append(this.success);
8023
      }
8024
      first = false;
8025
      sb.append(")");
8026
      return sb.toString();
8027
    }
8028
 
8029
    public void validate() throws org.apache.thrift.TException {
8030
      // check for required fields
8031
    }
8032
 
8033
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8034
      try {
8035
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8036
      } catch (org.apache.thrift.TException te) {
8037
        throw new java.io.IOException(te);
8038
      }
8039
    }
8040
 
8041
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8042
      try {
8043
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8044
      } catch (org.apache.thrift.TException te) {
8045
        throw new java.io.IOException(te);
8046
      }
8047
    }
8048
 
8049
  }
8050
 
5185 mandeep.dh 8051
  public static class getInventoryItemsFromLastScanType_args implements org.apache.thrift.TBase<getInventoryItemsFromLastScanType_args, getInventoryItemsFromLastScanType_args._Fields>, java.io.Serializable, Cloneable   {
8052
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemsFromLastScanType_args");
8053
 
8054
    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);
8055
 
8056
    private ScanType lastScanType; // required
8057
 
8058
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8059
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8060
      /**
8061
       * 
8062
       * @see ScanType
8063
       */
8064
      LAST_SCAN_TYPE((short)1, "lastScanType");
8065
 
8066
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8067
 
8068
      static {
8069
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8070
          byName.put(field.getFieldName(), field);
8071
        }
8072
      }
8073
 
8074
      /**
8075
       * Find the _Fields constant that matches fieldId, or null if its not found.
8076
       */
8077
      public static _Fields findByThriftId(int fieldId) {
8078
        switch(fieldId) {
8079
          case 1: // LAST_SCAN_TYPE
8080
            return LAST_SCAN_TYPE;
8081
          default:
8082
            return null;
8083
        }
8084
      }
8085
 
8086
      /**
8087
       * Find the _Fields constant that matches fieldId, throwing an exception
8088
       * if it is not found.
8089
       */
8090
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8091
        _Fields fields = findByThriftId(fieldId);
8092
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8093
        return fields;
8094
      }
8095
 
8096
      /**
8097
       * Find the _Fields constant that matches name, or null if its not found.
8098
       */
8099
      public static _Fields findByName(String name) {
8100
        return byName.get(name);
8101
      }
8102
 
8103
      private final short _thriftId;
8104
      private final String _fieldName;
8105
 
8106
      _Fields(short thriftId, String fieldName) {
8107
        _thriftId = thriftId;
8108
        _fieldName = fieldName;
8109
      }
8110
 
8111
      public short getThriftFieldId() {
8112
        return _thriftId;
8113
      }
8114
 
8115
      public String getFieldName() {
8116
        return _fieldName;
8117
      }
8118
    }
8119
 
8120
    // isset id assignments
8121
 
8122
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8123
    static {
8124
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8125
      tmpMap.put(_Fields.LAST_SCAN_TYPE, new org.apache.thrift.meta_data.FieldMetaData("lastScanType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8126
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
8127
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8128
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemsFromLastScanType_args.class, metaDataMap);
8129
    }
8130
 
8131
    public getInventoryItemsFromLastScanType_args() {
8132
    }
8133
 
8134
    public getInventoryItemsFromLastScanType_args(
8135
      ScanType lastScanType)
8136
    {
8137
      this();
8138
      this.lastScanType = lastScanType;
8139
    }
8140
 
8141
    /**
8142
     * Performs a deep copy on <i>other</i>.
8143
     */
8144
    public getInventoryItemsFromLastScanType_args(getInventoryItemsFromLastScanType_args other) {
8145
      if (other.isSetLastScanType()) {
8146
        this.lastScanType = other.lastScanType;
8147
      }
8148
    }
8149
 
8150
    public getInventoryItemsFromLastScanType_args deepCopy() {
8151
      return new getInventoryItemsFromLastScanType_args(this);
8152
    }
8153
 
8154
    @Override
8155
    public void clear() {
8156
      this.lastScanType = null;
8157
    }
8158
 
8159
    /**
8160
     * 
8161
     * @see ScanType
8162
     */
8163
    public ScanType getLastScanType() {
8164
      return this.lastScanType;
8165
    }
8166
 
8167
    /**
8168
     * 
8169
     * @see ScanType
8170
     */
8171
    public void setLastScanType(ScanType lastScanType) {
8172
      this.lastScanType = lastScanType;
8173
    }
8174
 
8175
    public void unsetLastScanType() {
8176
      this.lastScanType = null;
8177
    }
8178
 
8179
    /** Returns true if field lastScanType is set (has been assigned a value) and false otherwise */
8180
    public boolean isSetLastScanType() {
8181
      return this.lastScanType != null;
8182
    }
8183
 
8184
    public void setLastScanTypeIsSet(boolean value) {
8185
      if (!value) {
8186
        this.lastScanType = null;
8187
      }
8188
    }
8189
 
8190
    public void setFieldValue(_Fields field, Object value) {
8191
      switch (field) {
8192
      case LAST_SCAN_TYPE:
8193
        if (value == null) {
8194
          unsetLastScanType();
8195
        } else {
8196
          setLastScanType((ScanType)value);
8197
        }
8198
        break;
8199
 
8200
      }
8201
    }
8202
 
8203
    public Object getFieldValue(_Fields field) {
8204
      switch (field) {
8205
      case LAST_SCAN_TYPE:
8206
        return getLastScanType();
8207
 
8208
      }
8209
      throw new IllegalStateException();
8210
    }
8211
 
8212
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8213
    public boolean isSet(_Fields field) {
8214
      if (field == null) {
8215
        throw new IllegalArgumentException();
8216
      }
8217
 
8218
      switch (field) {
8219
      case LAST_SCAN_TYPE:
8220
        return isSetLastScanType();
8221
      }
8222
      throw new IllegalStateException();
8223
    }
8224
 
8225
    @Override
8226
    public boolean equals(Object that) {
8227
      if (that == null)
8228
        return false;
8229
      if (that instanceof getInventoryItemsFromLastScanType_args)
8230
        return this.equals((getInventoryItemsFromLastScanType_args)that);
8231
      return false;
8232
    }
8233
 
8234
    public boolean equals(getInventoryItemsFromLastScanType_args that) {
8235
      if (that == null)
8236
        return false;
8237
 
8238
      boolean this_present_lastScanType = true && this.isSetLastScanType();
8239
      boolean that_present_lastScanType = true && that.isSetLastScanType();
8240
      if (this_present_lastScanType || that_present_lastScanType) {
8241
        if (!(this_present_lastScanType && that_present_lastScanType))
8242
          return false;
8243
        if (!this.lastScanType.equals(that.lastScanType))
8244
          return false;
8245
      }
8246
 
8247
      return true;
8248
    }
8249
 
8250
    @Override
8251
    public int hashCode() {
8252
      return 0;
8253
    }
8254
 
8255
    public int compareTo(getInventoryItemsFromLastScanType_args other) {
8256
      if (!getClass().equals(other.getClass())) {
8257
        return getClass().getName().compareTo(other.getClass().getName());
8258
      }
8259
 
8260
      int lastComparison = 0;
8261
      getInventoryItemsFromLastScanType_args typedOther = (getInventoryItemsFromLastScanType_args)other;
8262
 
8263
      lastComparison = Boolean.valueOf(isSetLastScanType()).compareTo(typedOther.isSetLastScanType());
8264
      if (lastComparison != 0) {
8265
        return lastComparison;
8266
      }
8267
      if (isSetLastScanType()) {
8268
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastScanType, typedOther.lastScanType);
8269
        if (lastComparison != 0) {
8270
          return lastComparison;
8271
        }
8272
      }
8273
      return 0;
8274
    }
8275
 
8276
    public _Fields fieldForId(int fieldId) {
8277
      return _Fields.findByThriftId(fieldId);
8278
    }
8279
 
8280
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8281
      org.apache.thrift.protocol.TField field;
8282
      iprot.readStructBegin();
8283
      while (true)
8284
      {
8285
        field = iprot.readFieldBegin();
8286
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8287
          break;
8288
        }
8289
        switch (field.id) {
8290
          case 1: // LAST_SCAN_TYPE
8291
            if (field.type == org.apache.thrift.protocol.TType.I32) {
8292
              this.lastScanType = ScanType.findByValue(iprot.readI32());
8293
            } else { 
8294
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8295
            }
8296
            break;
8297
          default:
8298
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8299
        }
8300
        iprot.readFieldEnd();
8301
      }
8302
      iprot.readStructEnd();
8303
      validate();
8304
    }
8305
 
8306
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8307
      validate();
8308
 
8309
      oprot.writeStructBegin(STRUCT_DESC);
8310
      if (this.lastScanType != null) {
8311
        oprot.writeFieldBegin(LAST_SCAN_TYPE_FIELD_DESC);
8312
        oprot.writeI32(this.lastScanType.getValue());
8313
        oprot.writeFieldEnd();
8314
      }
8315
      oprot.writeFieldStop();
8316
      oprot.writeStructEnd();
8317
    }
8318
 
8319
    @Override
8320
    public String toString() {
8321
      StringBuilder sb = new StringBuilder("getInventoryItemsFromLastScanType_args(");
8322
      boolean first = true;
8323
 
8324
      sb.append("lastScanType:");
8325
      if (this.lastScanType == null) {
8326
        sb.append("null");
8327
      } else {
8328
        sb.append(this.lastScanType);
8329
      }
8330
      first = false;
8331
      sb.append(")");
8332
      return sb.toString();
8333
    }
8334
 
8335
    public void validate() throws org.apache.thrift.TException {
8336
      // check for required fields
8337
    }
8338
 
8339
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8340
      try {
8341
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8342
      } catch (org.apache.thrift.TException te) {
8343
        throw new java.io.IOException(te);
8344
      }
8345
    }
8346
 
8347
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8348
      try {
8349
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8350
      } catch (org.apache.thrift.TException te) {
8351
        throw new java.io.IOException(te);
8352
      }
8353
    }
8354
 
8355
  }
8356
 
8357
  public static class getInventoryItemsFromLastScanType_result implements org.apache.thrift.TBase<getInventoryItemsFromLastScanType_result, getInventoryItemsFromLastScanType_result._Fields>, java.io.Serializable, Cloneable   {
8358
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemsFromLastScanType_result");
8359
 
8360
    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);
8361
    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);
8362
 
8363
    private List<InventoryItem> success; // required
8364
    private WarehouseServiceException wex; // required
8365
 
8366
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8367
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8368
      SUCCESS((short)0, "success"),
8369
      WEX((short)1, "wex");
8370
 
8371
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8372
 
8373
      static {
8374
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8375
          byName.put(field.getFieldName(), field);
8376
        }
8377
      }
8378
 
8379
      /**
8380
       * Find the _Fields constant that matches fieldId, or null if its not found.
8381
       */
8382
      public static _Fields findByThriftId(int fieldId) {
8383
        switch(fieldId) {
8384
          case 0: // SUCCESS
8385
            return SUCCESS;
8386
          case 1: // WEX
8387
            return WEX;
8388
          default:
8389
            return null;
8390
        }
8391
      }
8392
 
8393
      /**
8394
       * Find the _Fields constant that matches fieldId, throwing an exception
8395
       * if it is not found.
8396
       */
8397
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8398
        _Fields fields = findByThriftId(fieldId);
8399
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8400
        return fields;
8401
      }
8402
 
8403
      /**
8404
       * Find the _Fields constant that matches name, or null if its not found.
8405
       */
8406
      public static _Fields findByName(String name) {
8407
        return byName.get(name);
8408
      }
8409
 
8410
      private final short _thriftId;
8411
      private final String _fieldName;
8412
 
8413
      _Fields(short thriftId, String fieldName) {
8414
        _thriftId = thriftId;
8415
        _fieldName = fieldName;
8416
      }
8417
 
8418
      public short getThriftFieldId() {
8419
        return _thriftId;
8420
      }
8421
 
8422
      public String getFieldName() {
8423
        return _fieldName;
8424
      }
8425
    }
8426
 
8427
    // isset id assignments
8428
 
8429
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8430
    static {
8431
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8432
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8433
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
8434
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class))));
8435
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8436
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
8437
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8438
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemsFromLastScanType_result.class, metaDataMap);
8439
    }
8440
 
8441
    public getInventoryItemsFromLastScanType_result() {
8442
    }
8443
 
8444
    public getInventoryItemsFromLastScanType_result(
8445
      List<InventoryItem> success,
8446
      WarehouseServiceException wex)
8447
    {
8448
      this();
8449
      this.success = success;
8450
      this.wex = wex;
8451
    }
8452
 
8453
    /**
8454
     * Performs a deep copy on <i>other</i>.
8455
     */
8456
    public getInventoryItemsFromLastScanType_result(getInventoryItemsFromLastScanType_result other) {
8457
      if (other.isSetSuccess()) {
8458
        List<InventoryItem> __this__success = new ArrayList<InventoryItem>();
8459
        for (InventoryItem other_element : other.success) {
8460
          __this__success.add(new InventoryItem(other_element));
8461
        }
8462
        this.success = __this__success;
8463
      }
8464
      if (other.isSetWex()) {
8465
        this.wex = new WarehouseServiceException(other.wex);
8466
      }
8467
    }
8468
 
8469
    public getInventoryItemsFromLastScanType_result deepCopy() {
8470
      return new getInventoryItemsFromLastScanType_result(this);
8471
    }
8472
 
8473
    @Override
8474
    public void clear() {
8475
      this.success = null;
8476
      this.wex = null;
8477
    }
8478
 
8479
    public int getSuccessSize() {
8480
      return (this.success == null) ? 0 : this.success.size();
8481
    }
8482
 
8483
    public java.util.Iterator<InventoryItem> getSuccessIterator() {
8484
      return (this.success == null) ? null : this.success.iterator();
8485
    }
8486
 
8487
    public void addToSuccess(InventoryItem elem) {
8488
      if (this.success == null) {
8489
        this.success = new ArrayList<InventoryItem>();
8490
      }
8491
      this.success.add(elem);
8492
    }
8493
 
8494
    public List<InventoryItem> getSuccess() {
8495
      return this.success;
8496
    }
8497
 
8498
    public void setSuccess(List<InventoryItem> success) {
8499
      this.success = success;
8500
    }
8501
 
8502
    public void unsetSuccess() {
8503
      this.success = null;
8504
    }
8505
 
8506
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8507
    public boolean isSetSuccess() {
8508
      return this.success != null;
8509
    }
8510
 
8511
    public void setSuccessIsSet(boolean value) {
8512
      if (!value) {
8513
        this.success = null;
8514
      }
8515
    }
8516
 
8517
    public WarehouseServiceException getWex() {
8518
      return this.wex;
8519
    }
8520
 
8521
    public void setWex(WarehouseServiceException wex) {
8522
      this.wex = wex;
8523
    }
8524
 
8525
    public void unsetWex() {
8526
      this.wex = null;
8527
    }
8528
 
8529
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
8530
    public boolean isSetWex() {
8531
      return this.wex != null;
8532
    }
8533
 
8534
    public void setWexIsSet(boolean value) {
8535
      if (!value) {
8536
        this.wex = null;
8537
      }
8538
    }
8539
 
8540
    public void setFieldValue(_Fields field, Object value) {
8541
      switch (field) {
8542
      case SUCCESS:
8543
        if (value == null) {
8544
          unsetSuccess();
8545
        } else {
8546
          setSuccess((List<InventoryItem>)value);
8547
        }
8548
        break;
8549
 
8550
      case WEX:
8551
        if (value == null) {
8552
          unsetWex();
8553
        } else {
8554
          setWex((WarehouseServiceException)value);
8555
        }
8556
        break;
8557
 
8558
      }
8559
    }
8560
 
8561
    public Object getFieldValue(_Fields field) {
8562
      switch (field) {
8563
      case SUCCESS:
8564
        return getSuccess();
8565
 
8566
      case WEX:
8567
        return getWex();
8568
 
8569
      }
8570
      throw new IllegalStateException();
8571
    }
8572
 
8573
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8574
    public boolean isSet(_Fields field) {
8575
      if (field == null) {
8576
        throw new IllegalArgumentException();
8577
      }
8578
 
8579
      switch (field) {
8580
      case SUCCESS:
8581
        return isSetSuccess();
8582
      case WEX:
8583
        return isSetWex();
8584
      }
8585
      throw new IllegalStateException();
8586
    }
8587
 
8588
    @Override
8589
    public boolean equals(Object that) {
8590
      if (that == null)
8591
        return false;
8592
      if (that instanceof getInventoryItemsFromLastScanType_result)
8593
        return this.equals((getInventoryItemsFromLastScanType_result)that);
8594
      return false;
8595
    }
8596
 
8597
    public boolean equals(getInventoryItemsFromLastScanType_result that) {
8598
      if (that == null)
8599
        return false;
8600
 
8601
      boolean this_present_success = true && this.isSetSuccess();
8602
      boolean that_present_success = true && that.isSetSuccess();
8603
      if (this_present_success || that_present_success) {
8604
        if (!(this_present_success && that_present_success))
8605
          return false;
8606
        if (!this.success.equals(that.success))
8607
          return false;
8608
      }
8609
 
8610
      boolean this_present_wex = true && this.isSetWex();
8611
      boolean that_present_wex = true && that.isSetWex();
8612
      if (this_present_wex || that_present_wex) {
8613
        if (!(this_present_wex && that_present_wex))
8614
          return false;
8615
        if (!this.wex.equals(that.wex))
8616
          return false;
8617
      }
8618
 
8619
      return true;
8620
    }
8621
 
8622
    @Override
8623
    public int hashCode() {
8624
      return 0;
8625
    }
8626
 
8627
    public int compareTo(getInventoryItemsFromLastScanType_result other) {
8628
      if (!getClass().equals(other.getClass())) {
8629
        return getClass().getName().compareTo(other.getClass().getName());
8630
      }
8631
 
8632
      int lastComparison = 0;
8633
      getInventoryItemsFromLastScanType_result typedOther = (getInventoryItemsFromLastScanType_result)other;
8634
 
8635
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8636
      if (lastComparison != 0) {
8637
        return lastComparison;
8638
      }
8639
      if (isSetSuccess()) {
8640
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8641
        if (lastComparison != 0) {
8642
          return lastComparison;
8643
        }
8644
      }
8645
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
8646
      if (lastComparison != 0) {
8647
        return lastComparison;
8648
      }
8649
      if (isSetWex()) {
8650
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
8651
        if (lastComparison != 0) {
8652
          return lastComparison;
8653
        }
8654
      }
8655
      return 0;
8656
    }
8657
 
8658
    public _Fields fieldForId(int fieldId) {
8659
      return _Fields.findByThriftId(fieldId);
8660
    }
8661
 
8662
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8663
      org.apache.thrift.protocol.TField field;
8664
      iprot.readStructBegin();
8665
      while (true)
8666
      {
8667
        field = iprot.readFieldBegin();
8668
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8669
          break;
8670
        }
8671
        switch (field.id) {
8672
          case 0: // SUCCESS
8673
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8674
              {
5361 mandeep.dh 8675
                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
8676
                this.success = new ArrayList<InventoryItem>(_list8.size);
8677
                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
5185 mandeep.dh 8678
                {
5361 mandeep.dh 8679
                  InventoryItem _elem10; // required
8680
                  _elem10 = new InventoryItem();
8681
                  _elem10.read(iprot);
8682
                  this.success.add(_elem10);
5185 mandeep.dh 8683
                }
8684
                iprot.readListEnd();
8685
              }
8686
            } else { 
8687
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8688
            }
8689
            break;
8690
          case 1: // WEX
8691
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8692
              this.wex = new WarehouseServiceException();
8693
              this.wex.read(iprot);
8694
            } else { 
8695
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8696
            }
8697
            break;
8698
          default:
8699
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8700
        }
8701
        iprot.readFieldEnd();
8702
      }
8703
      iprot.readStructEnd();
8704
      validate();
8705
    }
8706
 
8707
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8708
      oprot.writeStructBegin(STRUCT_DESC);
8709
 
8710
      if (this.isSetSuccess()) {
8711
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8712
        {
8713
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
5361 mandeep.dh 8714
          for (InventoryItem _iter11 : this.success)
5185 mandeep.dh 8715
          {
5361 mandeep.dh 8716
            _iter11.write(oprot);
5185 mandeep.dh 8717
          }
8718
          oprot.writeListEnd();
8719
        }
8720
        oprot.writeFieldEnd();
8721
      } else if (this.isSetWex()) {
8722
        oprot.writeFieldBegin(WEX_FIELD_DESC);
8723
        this.wex.write(oprot);
8724
        oprot.writeFieldEnd();
8725
      }
8726
      oprot.writeFieldStop();
8727
      oprot.writeStructEnd();
8728
    }
8729
 
8730
    @Override
8731
    public String toString() {
8732
      StringBuilder sb = new StringBuilder("getInventoryItemsFromLastScanType_result(");
8733
      boolean first = true;
8734
 
8735
      sb.append("success:");
8736
      if (this.success == null) {
8737
        sb.append("null");
8738
      } else {
8739
        sb.append(this.success);
8740
      }
8741
      first = false;
8742
      if (!first) sb.append(", ");
8743
      sb.append("wex:");
8744
      if (this.wex == null) {
8745
        sb.append("null");
8746
      } else {
8747
        sb.append(this.wex);
8748
      }
8749
      first = false;
8750
      sb.append(")");
8751
      return sb.toString();
8752
    }
8753
 
8754
    public void validate() throws org.apache.thrift.TException {
8755
      // check for required fields
8756
    }
8757
 
8758
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8759
      try {
8760
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8761
      } catch (org.apache.thrift.TException te) {
8762
        throw new java.io.IOException(te);
8763
      }
8764
    }
8765
 
8766
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8767
      try {
8768
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8769
      } catch (org.apache.thrift.TException te) {
8770
        throw new java.io.IOException(te);
8771
      }
8772
    }
8773
 
8774
  }
8775
 
8776
  public static class getInventoryItemFromId_args implements org.apache.thrift.TBase<getInventoryItemFromId_args, getInventoryItemFromId_args._Fields>, java.io.Serializable, Cloneable   {
8777
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromId_args");
8778
 
8779
    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);
8780
 
8781
    private long inventoryItemId; // required
8782
 
8783
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8784
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8785
      INVENTORY_ITEM_ID((short)1, "inventoryItemId");
8786
 
8787
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8788
 
8789
      static {
8790
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8791
          byName.put(field.getFieldName(), field);
8792
        }
8793
      }
8794
 
8795
      /**
8796
       * Find the _Fields constant that matches fieldId, or null if its not found.
8797
       */
8798
      public static _Fields findByThriftId(int fieldId) {
8799
        switch(fieldId) {
8800
          case 1: // INVENTORY_ITEM_ID
8801
            return INVENTORY_ITEM_ID;
8802
          default:
8803
            return null;
8804
        }
8805
      }
8806
 
8807
      /**
8808
       * Find the _Fields constant that matches fieldId, throwing an exception
8809
       * if it is not found.
8810
       */
8811
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8812
        _Fields fields = findByThriftId(fieldId);
8813
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8814
        return fields;
8815
      }
8816
 
8817
      /**
8818
       * Find the _Fields constant that matches name, or null if its not found.
8819
       */
8820
      public static _Fields findByName(String name) {
8821
        return byName.get(name);
8822
      }
8823
 
8824
      private final short _thriftId;
8825
      private final String _fieldName;
8826
 
8827
      _Fields(short thriftId, String fieldName) {
8828
        _thriftId = thriftId;
8829
        _fieldName = fieldName;
8830
      }
8831
 
8832
      public short getThriftFieldId() {
8833
        return _thriftId;
8834
      }
8835
 
8836
      public String getFieldName() {
8837
        return _fieldName;
8838
      }
8839
    }
8840
 
8841
    // isset id assignments
8842
    private static final int __INVENTORYITEMID_ISSET_ID = 0;
8843
    private BitSet __isset_bit_vector = new BitSet(1);
8844
 
8845
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8846
    static {
8847
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8848
      tmpMap.put(_Fields.INVENTORY_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("inventoryItemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8849
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8850
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8851
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromId_args.class, metaDataMap);
8852
    }
8853
 
8854
    public getInventoryItemFromId_args() {
8855
    }
8856
 
8857
    public getInventoryItemFromId_args(
8858
      long inventoryItemId)
8859
    {
8860
      this();
8861
      this.inventoryItemId = inventoryItemId;
8862
      setInventoryItemIdIsSet(true);
8863
    }
8864
 
8865
    /**
8866
     * Performs a deep copy on <i>other</i>.
8867
     */
8868
    public getInventoryItemFromId_args(getInventoryItemFromId_args other) {
8869
      __isset_bit_vector.clear();
8870
      __isset_bit_vector.or(other.__isset_bit_vector);
8871
      this.inventoryItemId = other.inventoryItemId;
8872
    }
8873
 
8874
    public getInventoryItemFromId_args deepCopy() {
8875
      return new getInventoryItemFromId_args(this);
8876
    }
8877
 
8878
    @Override
8879
    public void clear() {
8880
      setInventoryItemIdIsSet(false);
8881
      this.inventoryItemId = 0;
8882
    }
8883
 
8884
    public long getInventoryItemId() {
8885
      return this.inventoryItemId;
8886
    }
8887
 
8888
    public void setInventoryItemId(long inventoryItemId) {
8889
      this.inventoryItemId = inventoryItemId;
8890
      setInventoryItemIdIsSet(true);
8891
    }
8892
 
8893
    public void unsetInventoryItemId() {
8894
      __isset_bit_vector.clear(__INVENTORYITEMID_ISSET_ID);
8895
    }
8896
 
8897
    /** Returns true if field inventoryItemId is set (has been assigned a value) and false otherwise */
8898
    public boolean isSetInventoryItemId() {
8899
      return __isset_bit_vector.get(__INVENTORYITEMID_ISSET_ID);
8900
    }
8901
 
8902
    public void setInventoryItemIdIsSet(boolean value) {
8903
      __isset_bit_vector.set(__INVENTORYITEMID_ISSET_ID, value);
8904
    }
8905
 
8906
    public void setFieldValue(_Fields field, Object value) {
8907
      switch (field) {
8908
      case INVENTORY_ITEM_ID:
8909
        if (value == null) {
8910
          unsetInventoryItemId();
8911
        } else {
8912
          setInventoryItemId((Long)value);
8913
        }
8914
        break;
8915
 
8916
      }
8917
    }
8918
 
8919
    public Object getFieldValue(_Fields field) {
8920
      switch (field) {
8921
      case INVENTORY_ITEM_ID:
8922
        return Long.valueOf(getInventoryItemId());
8923
 
8924
      }
8925
      throw new IllegalStateException();
8926
    }
8927
 
8928
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8929
    public boolean isSet(_Fields field) {
8930
      if (field == null) {
8931
        throw new IllegalArgumentException();
8932
      }
8933
 
8934
      switch (field) {
8935
      case INVENTORY_ITEM_ID:
8936
        return isSetInventoryItemId();
8937
      }
8938
      throw new IllegalStateException();
8939
    }
8940
 
8941
    @Override
8942
    public boolean equals(Object that) {
8943
      if (that == null)
8944
        return false;
8945
      if (that instanceof getInventoryItemFromId_args)
8946
        return this.equals((getInventoryItemFromId_args)that);
8947
      return false;
8948
    }
8949
 
8950
    public boolean equals(getInventoryItemFromId_args that) {
8951
      if (that == null)
8952
        return false;
8953
 
8954
      boolean this_present_inventoryItemId = true;
8955
      boolean that_present_inventoryItemId = true;
8956
      if (this_present_inventoryItemId || that_present_inventoryItemId) {
8957
        if (!(this_present_inventoryItemId && that_present_inventoryItemId))
8958
          return false;
8959
        if (this.inventoryItemId != that.inventoryItemId)
8960
          return false;
8961
      }
8962
 
8963
      return true;
8964
    }
8965
 
8966
    @Override
8967
    public int hashCode() {
8968
      return 0;
8969
    }
8970
 
8971
    public int compareTo(getInventoryItemFromId_args other) {
8972
      if (!getClass().equals(other.getClass())) {
8973
        return getClass().getName().compareTo(other.getClass().getName());
8974
      }
8975
 
8976
      int lastComparison = 0;
8977
      getInventoryItemFromId_args typedOther = (getInventoryItemFromId_args)other;
8978
 
8979
      lastComparison = Boolean.valueOf(isSetInventoryItemId()).compareTo(typedOther.isSetInventoryItemId());
8980
      if (lastComparison != 0) {
8981
        return lastComparison;
8982
      }
8983
      if (isSetInventoryItemId()) {
8984
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItemId, typedOther.inventoryItemId);
8985
        if (lastComparison != 0) {
8986
          return lastComparison;
8987
        }
8988
      }
8989
      return 0;
8990
    }
8991
 
8992
    public _Fields fieldForId(int fieldId) {
8993
      return _Fields.findByThriftId(fieldId);
8994
    }
8995
 
8996
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8997
      org.apache.thrift.protocol.TField field;
8998
      iprot.readStructBegin();
8999
      while (true)
9000
      {
9001
        field = iprot.readFieldBegin();
9002
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9003
          break;
9004
        }
9005
        switch (field.id) {
9006
          case 1: // INVENTORY_ITEM_ID
9007
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9008
              this.inventoryItemId = iprot.readI64();
9009
              setInventoryItemIdIsSet(true);
9010
            } else { 
9011
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9012
            }
9013
            break;
9014
          default:
9015
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9016
        }
9017
        iprot.readFieldEnd();
9018
      }
9019
      iprot.readStructEnd();
9020
      validate();
9021
    }
9022
 
9023
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9024
      validate();
9025
 
9026
      oprot.writeStructBegin(STRUCT_DESC);
9027
      oprot.writeFieldBegin(INVENTORY_ITEM_ID_FIELD_DESC);
9028
      oprot.writeI64(this.inventoryItemId);
9029
      oprot.writeFieldEnd();
9030
      oprot.writeFieldStop();
9031
      oprot.writeStructEnd();
9032
    }
9033
 
9034
    @Override
9035
    public String toString() {
9036
      StringBuilder sb = new StringBuilder("getInventoryItemFromId_args(");
9037
      boolean first = true;
9038
 
9039
      sb.append("inventoryItemId:");
9040
      sb.append(this.inventoryItemId);
9041
      first = false;
9042
      sb.append(")");
9043
      return sb.toString();
9044
    }
9045
 
9046
    public void validate() throws org.apache.thrift.TException {
9047
      // check for required fields
9048
    }
9049
 
9050
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9051
      try {
9052
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9053
      } catch (org.apache.thrift.TException te) {
9054
        throw new java.io.IOException(te);
9055
      }
9056
    }
9057
 
9058
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9059
      try {
5372 mandeep.dh 9060
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
9061
        __isset_bit_vector = new BitSet(1);
5185 mandeep.dh 9062
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9063
      } catch (org.apache.thrift.TException te) {
9064
        throw new java.io.IOException(te);
9065
      }
9066
    }
9067
 
9068
  }
9069
 
9070
  public static class getInventoryItemFromId_result implements org.apache.thrift.TBase<getInventoryItemFromId_result, getInventoryItemFromId_result._Fields>, java.io.Serializable, Cloneable   {
9071
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromId_result");
9072
 
9073
    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);
9074
    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);
9075
 
9076
    private InventoryItem success; // required
9077
    private WarehouseServiceException wex; // required
9078
 
9079
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9080
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9081
      SUCCESS((short)0, "success"),
9082
      WEX((short)1, "wex");
9083
 
9084
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9085
 
9086
      static {
9087
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9088
          byName.put(field.getFieldName(), field);
9089
        }
9090
      }
9091
 
9092
      /**
9093
       * Find the _Fields constant that matches fieldId, or null if its not found.
9094
       */
9095
      public static _Fields findByThriftId(int fieldId) {
9096
        switch(fieldId) {
9097
          case 0: // SUCCESS
9098
            return SUCCESS;
9099
          case 1: // WEX
9100
            return WEX;
9101
          default:
9102
            return null;
9103
        }
9104
      }
9105
 
9106
      /**
9107
       * Find the _Fields constant that matches fieldId, throwing an exception
9108
       * if it is not found.
9109
       */
9110
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9111
        _Fields fields = findByThriftId(fieldId);
9112
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9113
        return fields;
9114
      }
9115
 
9116
      /**
9117
       * Find the _Fields constant that matches name, or null if its not found.
9118
       */
9119
      public static _Fields findByName(String name) {
9120
        return byName.get(name);
9121
      }
9122
 
9123
      private final short _thriftId;
9124
      private final String _fieldName;
9125
 
9126
      _Fields(short thriftId, String fieldName) {
9127
        _thriftId = thriftId;
9128
        _fieldName = fieldName;
9129
      }
9130
 
9131
      public short getThriftFieldId() {
9132
        return _thriftId;
9133
      }
9134
 
9135
      public String getFieldName() {
9136
        return _fieldName;
9137
      }
9138
    }
9139
 
9140
    // isset id assignments
9141
 
9142
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9143
    static {
9144
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9145
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9146
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
9147
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9148
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9149
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9150
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromId_result.class, metaDataMap);
9151
    }
9152
 
9153
    public getInventoryItemFromId_result() {
9154
    }
9155
 
9156
    public getInventoryItemFromId_result(
9157
      InventoryItem success,
9158
      WarehouseServiceException wex)
9159
    {
9160
      this();
9161
      this.success = success;
9162
      this.wex = wex;
9163
    }
9164
 
9165
    /**
9166
     * Performs a deep copy on <i>other</i>.
9167
     */
9168
    public getInventoryItemFromId_result(getInventoryItemFromId_result other) {
9169
      if (other.isSetSuccess()) {
9170
        this.success = new InventoryItem(other.success);
9171
      }
9172
      if (other.isSetWex()) {
9173
        this.wex = new WarehouseServiceException(other.wex);
9174
      }
9175
    }
9176
 
9177
    public getInventoryItemFromId_result deepCopy() {
9178
      return new getInventoryItemFromId_result(this);
9179
    }
9180
 
9181
    @Override
9182
    public void clear() {
9183
      this.success = null;
9184
      this.wex = null;
9185
    }
9186
 
9187
    public InventoryItem getSuccess() {
9188
      return this.success;
9189
    }
9190
 
9191
    public void setSuccess(InventoryItem success) {
9192
      this.success = success;
9193
    }
9194
 
9195
    public void unsetSuccess() {
9196
      this.success = null;
9197
    }
9198
 
9199
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9200
    public boolean isSetSuccess() {
9201
      return this.success != null;
9202
    }
9203
 
9204
    public void setSuccessIsSet(boolean value) {
9205
      if (!value) {
9206
        this.success = null;
9207
      }
9208
    }
9209
 
9210
    public WarehouseServiceException getWex() {
9211
      return this.wex;
9212
    }
9213
 
9214
    public void setWex(WarehouseServiceException wex) {
9215
      this.wex = wex;
9216
    }
9217
 
9218
    public void unsetWex() {
9219
      this.wex = null;
9220
    }
9221
 
9222
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
9223
    public boolean isSetWex() {
9224
      return this.wex != null;
9225
    }
9226
 
9227
    public void setWexIsSet(boolean value) {
9228
      if (!value) {
9229
        this.wex = null;
9230
      }
9231
    }
9232
 
9233
    public void setFieldValue(_Fields field, Object value) {
9234
      switch (field) {
9235
      case SUCCESS:
9236
        if (value == null) {
9237
          unsetSuccess();
9238
        } else {
9239
          setSuccess((InventoryItem)value);
9240
        }
9241
        break;
9242
 
9243
      case WEX:
9244
        if (value == null) {
9245
          unsetWex();
9246
        } else {
9247
          setWex((WarehouseServiceException)value);
9248
        }
9249
        break;
9250
 
9251
      }
9252
    }
9253
 
9254
    public Object getFieldValue(_Fields field) {
9255
      switch (field) {
9256
      case SUCCESS:
9257
        return getSuccess();
9258
 
9259
      case WEX:
9260
        return getWex();
9261
 
9262
      }
9263
      throw new IllegalStateException();
9264
    }
9265
 
9266
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9267
    public boolean isSet(_Fields field) {
9268
      if (field == null) {
9269
        throw new IllegalArgumentException();
9270
      }
9271
 
9272
      switch (field) {
9273
      case SUCCESS:
9274
        return isSetSuccess();
9275
      case WEX:
9276
        return isSetWex();
9277
      }
9278
      throw new IllegalStateException();
9279
    }
9280
 
9281
    @Override
9282
    public boolean equals(Object that) {
9283
      if (that == null)
9284
        return false;
9285
      if (that instanceof getInventoryItemFromId_result)
9286
        return this.equals((getInventoryItemFromId_result)that);
9287
      return false;
9288
    }
9289
 
9290
    public boolean equals(getInventoryItemFromId_result that) {
9291
      if (that == null)
9292
        return false;
9293
 
9294
      boolean this_present_success = true && this.isSetSuccess();
9295
      boolean that_present_success = true && that.isSetSuccess();
9296
      if (this_present_success || that_present_success) {
9297
        if (!(this_present_success && that_present_success))
9298
          return false;
9299
        if (!this.success.equals(that.success))
9300
          return false;
9301
      }
9302
 
9303
      boolean this_present_wex = true && this.isSetWex();
9304
      boolean that_present_wex = true && that.isSetWex();
9305
      if (this_present_wex || that_present_wex) {
9306
        if (!(this_present_wex && that_present_wex))
9307
          return false;
9308
        if (!this.wex.equals(that.wex))
9309
          return false;
9310
      }
9311
 
9312
      return true;
9313
    }
9314
 
9315
    @Override
9316
    public int hashCode() {
9317
      return 0;
9318
    }
9319
 
9320
    public int compareTo(getInventoryItemFromId_result other) {
9321
      if (!getClass().equals(other.getClass())) {
9322
        return getClass().getName().compareTo(other.getClass().getName());
9323
      }
9324
 
9325
      int lastComparison = 0;
9326
      getInventoryItemFromId_result typedOther = (getInventoryItemFromId_result)other;
9327
 
9328
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9329
      if (lastComparison != 0) {
9330
        return lastComparison;
9331
      }
9332
      if (isSetSuccess()) {
9333
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9334
        if (lastComparison != 0) {
9335
          return lastComparison;
9336
        }
9337
      }
9338
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
9339
      if (lastComparison != 0) {
9340
        return lastComparison;
9341
      }
9342
      if (isSetWex()) {
9343
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
9344
        if (lastComparison != 0) {
9345
          return lastComparison;
9346
        }
9347
      }
9348
      return 0;
9349
    }
9350
 
9351
    public _Fields fieldForId(int fieldId) {
9352
      return _Fields.findByThriftId(fieldId);
9353
    }
9354
 
9355
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9356
      org.apache.thrift.protocol.TField field;
9357
      iprot.readStructBegin();
9358
      while (true)
9359
      {
9360
        field = iprot.readFieldBegin();
9361
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9362
          break;
9363
        }
9364
        switch (field.id) {
9365
          case 0: // SUCCESS
9366
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9367
              this.success = new InventoryItem();
9368
              this.success.read(iprot);
9369
            } else { 
9370
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9371
            }
9372
            break;
9373
          case 1: // WEX
9374
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9375
              this.wex = new WarehouseServiceException();
9376
              this.wex.read(iprot);
9377
            } else { 
9378
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9379
            }
9380
            break;
9381
          default:
9382
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9383
        }
9384
        iprot.readFieldEnd();
9385
      }
9386
      iprot.readStructEnd();
9387
      validate();
9388
    }
9389
 
9390
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9391
      oprot.writeStructBegin(STRUCT_DESC);
9392
 
9393
      if (this.isSetSuccess()) {
9394
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9395
        this.success.write(oprot);
9396
        oprot.writeFieldEnd();
9397
      } else if (this.isSetWex()) {
9398
        oprot.writeFieldBegin(WEX_FIELD_DESC);
9399
        this.wex.write(oprot);
9400
        oprot.writeFieldEnd();
9401
      }
9402
      oprot.writeFieldStop();
9403
      oprot.writeStructEnd();
9404
    }
9405
 
9406
    @Override
9407
    public String toString() {
9408
      StringBuilder sb = new StringBuilder("getInventoryItemFromId_result(");
9409
      boolean first = true;
9410
 
9411
      sb.append("success:");
9412
      if (this.success == null) {
9413
        sb.append("null");
9414
      } else {
9415
        sb.append(this.success);
9416
      }
9417
      first = false;
9418
      if (!first) sb.append(", ");
9419
      sb.append("wex:");
9420
      if (this.wex == null) {
9421
        sb.append("null");
9422
      } else {
9423
        sb.append(this.wex);
9424
      }
9425
      first = false;
9426
      sb.append(")");
9427
      return sb.toString();
9428
    }
9429
 
9430
    public void validate() throws org.apache.thrift.TException {
9431
      // check for required fields
9432
    }
9433
 
9434
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9435
      try {
9436
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9437
      } catch (org.apache.thrift.TException te) {
9438
        throw new java.io.IOException(te);
9439
      }
9440
    }
9441
 
9442
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9443
      try {
9444
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9445
      } catch (org.apache.thrift.TException te) {
9446
        throw new java.io.IOException(te);
9447
      }
9448
    }
9449
 
9450
  }
9451
 
5372 mandeep.dh 9452
  public static class getPurchaseScans_args implements org.apache.thrift.TBase<getPurchaseScans_args, getPurchaseScans_args._Fields>, java.io.Serializable, Cloneable   {
9453
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseScans_args");
9454
 
9455
    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);
9456
    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);
9457
 
9458
    private long startDate; // required
9459
    private long endDate; // required
9460
 
9461
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9462
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9463
      START_DATE((short)1, "startDate"),
9464
      END_DATE((short)2, "endDate");
9465
 
9466
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9467
 
9468
      static {
9469
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9470
          byName.put(field.getFieldName(), field);
9471
        }
9472
      }
9473
 
9474
      /**
9475
       * Find the _Fields constant that matches fieldId, or null if its not found.
9476
       */
9477
      public static _Fields findByThriftId(int fieldId) {
9478
        switch(fieldId) {
9479
          case 1: // START_DATE
9480
            return START_DATE;
9481
          case 2: // END_DATE
9482
            return END_DATE;
9483
          default:
9484
            return null;
9485
        }
9486
      }
9487
 
9488
      /**
9489
       * Find the _Fields constant that matches fieldId, throwing an exception
9490
       * if it is not found.
9491
       */
9492
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9493
        _Fields fields = findByThriftId(fieldId);
9494
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9495
        return fields;
9496
      }
9497
 
9498
      /**
9499
       * Find the _Fields constant that matches name, or null if its not found.
9500
       */
9501
      public static _Fields findByName(String name) {
9502
        return byName.get(name);
9503
      }
9504
 
9505
      private final short _thriftId;
9506
      private final String _fieldName;
9507
 
9508
      _Fields(short thriftId, String fieldName) {
9509
        _thriftId = thriftId;
9510
        _fieldName = fieldName;
9511
      }
9512
 
9513
      public short getThriftFieldId() {
9514
        return _thriftId;
9515
      }
9516
 
9517
      public String getFieldName() {
9518
        return _fieldName;
9519
      }
9520
    }
9521
 
9522
    // isset id assignments
9523
    private static final int __STARTDATE_ISSET_ID = 0;
9524
    private static final int __ENDDATE_ISSET_ID = 1;
9525
    private BitSet __isset_bit_vector = new BitSet(2);
9526
 
9527
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9528
    static {
9529
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9530
      tmpMap.put(_Fields.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9531
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9532
      tmpMap.put(_Fields.END_DATE, new org.apache.thrift.meta_data.FieldMetaData("endDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9533
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9534
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9535
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseScans_args.class, metaDataMap);
9536
    }
9537
 
9538
    public getPurchaseScans_args() {
9539
    }
9540
 
9541
    public getPurchaseScans_args(
9542
      long startDate,
9543
      long endDate)
9544
    {
9545
      this();
9546
      this.startDate = startDate;
9547
      setStartDateIsSet(true);
9548
      this.endDate = endDate;
9549
      setEndDateIsSet(true);
9550
    }
9551
 
9552
    /**
9553
     * Performs a deep copy on <i>other</i>.
9554
     */
9555
    public getPurchaseScans_args(getPurchaseScans_args other) {
9556
      __isset_bit_vector.clear();
9557
      __isset_bit_vector.or(other.__isset_bit_vector);
9558
      this.startDate = other.startDate;
9559
      this.endDate = other.endDate;
9560
    }
9561
 
9562
    public getPurchaseScans_args deepCopy() {
9563
      return new getPurchaseScans_args(this);
9564
    }
9565
 
9566
    @Override
9567
    public void clear() {
9568
      setStartDateIsSet(false);
9569
      this.startDate = 0;
9570
      setEndDateIsSet(false);
9571
      this.endDate = 0;
9572
    }
9573
 
9574
    public long getStartDate() {
9575
      return this.startDate;
9576
    }
9577
 
9578
    public void setStartDate(long startDate) {
9579
      this.startDate = startDate;
9580
      setStartDateIsSet(true);
9581
    }
9582
 
9583
    public void unsetStartDate() {
9584
      __isset_bit_vector.clear(__STARTDATE_ISSET_ID);
9585
    }
9586
 
9587
    /** Returns true if field startDate is set (has been assigned a value) and false otherwise */
9588
    public boolean isSetStartDate() {
9589
      return __isset_bit_vector.get(__STARTDATE_ISSET_ID);
9590
    }
9591
 
9592
    public void setStartDateIsSet(boolean value) {
9593
      __isset_bit_vector.set(__STARTDATE_ISSET_ID, value);
9594
    }
9595
 
9596
    public long getEndDate() {
9597
      return this.endDate;
9598
    }
9599
 
9600
    public void setEndDate(long endDate) {
9601
      this.endDate = endDate;
9602
      setEndDateIsSet(true);
9603
    }
9604
 
9605
    public void unsetEndDate() {
9606
      __isset_bit_vector.clear(__ENDDATE_ISSET_ID);
9607
    }
9608
 
9609
    /** Returns true if field endDate is set (has been assigned a value) and false otherwise */
9610
    public boolean isSetEndDate() {
9611
      return __isset_bit_vector.get(__ENDDATE_ISSET_ID);
9612
    }
9613
 
9614
    public void setEndDateIsSet(boolean value) {
9615
      __isset_bit_vector.set(__ENDDATE_ISSET_ID, value);
9616
    }
9617
 
9618
    public void setFieldValue(_Fields field, Object value) {
9619
      switch (field) {
9620
      case START_DATE:
9621
        if (value == null) {
9622
          unsetStartDate();
9623
        } else {
9624
          setStartDate((Long)value);
9625
        }
9626
        break;
9627
 
9628
      case END_DATE:
9629
        if (value == null) {
9630
          unsetEndDate();
9631
        } else {
9632
          setEndDate((Long)value);
9633
        }
9634
        break;
9635
 
9636
      }
9637
    }
9638
 
9639
    public Object getFieldValue(_Fields field) {
9640
      switch (field) {
9641
      case START_DATE:
9642
        return Long.valueOf(getStartDate());
9643
 
9644
      case END_DATE:
9645
        return Long.valueOf(getEndDate());
9646
 
9647
      }
9648
      throw new IllegalStateException();
9649
    }
9650
 
9651
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9652
    public boolean isSet(_Fields field) {
9653
      if (field == null) {
9654
        throw new IllegalArgumentException();
9655
      }
9656
 
9657
      switch (field) {
9658
      case START_DATE:
9659
        return isSetStartDate();
9660
      case END_DATE:
9661
        return isSetEndDate();
9662
      }
9663
      throw new IllegalStateException();
9664
    }
9665
 
9666
    @Override
9667
    public boolean equals(Object that) {
9668
      if (that == null)
9669
        return false;
9670
      if (that instanceof getPurchaseScans_args)
9671
        return this.equals((getPurchaseScans_args)that);
9672
      return false;
9673
    }
9674
 
9675
    public boolean equals(getPurchaseScans_args that) {
9676
      if (that == null)
9677
        return false;
9678
 
9679
      boolean this_present_startDate = true;
9680
      boolean that_present_startDate = true;
9681
      if (this_present_startDate || that_present_startDate) {
9682
        if (!(this_present_startDate && that_present_startDate))
9683
          return false;
9684
        if (this.startDate != that.startDate)
9685
          return false;
9686
      }
9687
 
9688
      boolean this_present_endDate = true;
9689
      boolean that_present_endDate = true;
9690
      if (this_present_endDate || that_present_endDate) {
9691
        if (!(this_present_endDate && that_present_endDate))
9692
          return false;
9693
        if (this.endDate != that.endDate)
9694
          return false;
9695
      }
9696
 
9697
      return true;
9698
    }
9699
 
9700
    @Override
9701
    public int hashCode() {
9702
      return 0;
9703
    }
9704
 
9705
    public int compareTo(getPurchaseScans_args other) {
9706
      if (!getClass().equals(other.getClass())) {
9707
        return getClass().getName().compareTo(other.getClass().getName());
9708
      }
9709
 
9710
      int lastComparison = 0;
9711
      getPurchaseScans_args typedOther = (getPurchaseScans_args)other;
9712
 
9713
      lastComparison = Boolean.valueOf(isSetStartDate()).compareTo(typedOther.isSetStartDate());
9714
      if (lastComparison != 0) {
9715
        return lastComparison;
9716
      }
9717
      if (isSetStartDate()) {
9718
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startDate, typedOther.startDate);
9719
        if (lastComparison != 0) {
9720
          return lastComparison;
9721
        }
9722
      }
9723
      lastComparison = Boolean.valueOf(isSetEndDate()).compareTo(typedOther.isSetEndDate());
9724
      if (lastComparison != 0) {
9725
        return lastComparison;
9726
      }
9727
      if (isSetEndDate()) {
9728
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endDate, typedOther.endDate);
9729
        if (lastComparison != 0) {
9730
          return lastComparison;
9731
        }
9732
      }
9733
      return 0;
9734
    }
9735
 
9736
    public _Fields fieldForId(int fieldId) {
9737
      return _Fields.findByThriftId(fieldId);
9738
    }
9739
 
9740
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9741
      org.apache.thrift.protocol.TField field;
9742
      iprot.readStructBegin();
9743
      while (true)
9744
      {
9745
        field = iprot.readFieldBegin();
9746
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9747
          break;
9748
        }
9749
        switch (field.id) {
9750
          case 1: // START_DATE
9751
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9752
              this.startDate = iprot.readI64();
9753
              setStartDateIsSet(true);
9754
            } else { 
9755
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9756
            }
9757
            break;
9758
          case 2: // END_DATE
9759
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9760
              this.endDate = iprot.readI64();
9761
              setEndDateIsSet(true);
9762
            } else { 
9763
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9764
            }
9765
            break;
9766
          default:
9767
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9768
        }
9769
        iprot.readFieldEnd();
9770
      }
9771
      iprot.readStructEnd();
9772
      validate();
9773
    }
9774
 
9775
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9776
      validate();
9777
 
9778
      oprot.writeStructBegin(STRUCT_DESC);
9779
      oprot.writeFieldBegin(START_DATE_FIELD_DESC);
9780
      oprot.writeI64(this.startDate);
9781
      oprot.writeFieldEnd();
9782
      oprot.writeFieldBegin(END_DATE_FIELD_DESC);
9783
      oprot.writeI64(this.endDate);
9784
      oprot.writeFieldEnd();
9785
      oprot.writeFieldStop();
9786
      oprot.writeStructEnd();
9787
    }
9788
 
9789
    @Override
9790
    public String toString() {
9791
      StringBuilder sb = new StringBuilder("getPurchaseScans_args(");
9792
      boolean first = true;
9793
 
9794
      sb.append("startDate:");
9795
      sb.append(this.startDate);
9796
      first = false;
9797
      if (!first) sb.append(", ");
9798
      sb.append("endDate:");
9799
      sb.append(this.endDate);
9800
      first = false;
9801
      sb.append(")");
9802
      return sb.toString();
9803
    }
9804
 
9805
    public void validate() throws org.apache.thrift.TException {
9806
      // check for required fields
9807
    }
9808
 
9809
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9810
      try {
9811
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9812
      } catch (org.apache.thrift.TException te) {
9813
        throw new java.io.IOException(te);
9814
      }
9815
    }
9816
 
9817
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9818
      try {
9819
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
9820
        __isset_bit_vector = new BitSet(1);
9821
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9822
      } catch (org.apache.thrift.TException te) {
9823
        throw new java.io.IOException(te);
9824
      }
9825
    }
9826
 
9827
  }
9828
 
9829
  public static class getPurchaseScans_result implements org.apache.thrift.TBase<getPurchaseScans_result, getPurchaseScans_result._Fields>, java.io.Serializable, Cloneable   {
9830
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseScans_result");
9831
 
9832
    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);
9833
 
9834
    private List<DetailedPurchaseScan> success; // required
9835
 
9836
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9837
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9838
      SUCCESS((short)0, "success");
9839
 
9840
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9841
 
9842
      static {
9843
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9844
          byName.put(field.getFieldName(), field);
9845
        }
9846
      }
9847
 
9848
      /**
9849
       * Find the _Fields constant that matches fieldId, or null if its not found.
9850
       */
9851
      public static _Fields findByThriftId(int fieldId) {
9852
        switch(fieldId) {
9853
          case 0: // SUCCESS
9854
            return SUCCESS;
9855
          default:
9856
            return null;
9857
        }
9858
      }
9859
 
9860
      /**
9861
       * Find the _Fields constant that matches fieldId, throwing an exception
9862
       * if it is not found.
9863
       */
9864
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9865
        _Fields fields = findByThriftId(fieldId);
9866
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9867
        return fields;
9868
      }
9869
 
9870
      /**
9871
       * Find the _Fields constant that matches name, or null if its not found.
9872
       */
9873
      public static _Fields findByName(String name) {
9874
        return byName.get(name);
9875
      }
9876
 
9877
      private final short _thriftId;
9878
      private final String _fieldName;
9879
 
9880
      _Fields(short thriftId, String fieldName) {
9881
        _thriftId = thriftId;
9882
        _fieldName = fieldName;
9883
      }
9884
 
9885
      public short getThriftFieldId() {
9886
        return _thriftId;
9887
      }
9888
 
9889
      public String getFieldName() {
9890
        return _fieldName;
9891
      }
9892
    }
9893
 
9894
    // isset id assignments
9895
 
9896
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9897
    static {
9898
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9899
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9900
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
9901
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DetailedPurchaseScan.class))));
9902
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9903
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseScans_result.class, metaDataMap);
9904
    }
9905
 
9906
    public getPurchaseScans_result() {
9907
    }
9908
 
9909
    public getPurchaseScans_result(
9910
      List<DetailedPurchaseScan> success)
9911
    {
9912
      this();
9913
      this.success = success;
9914
    }
9915
 
9916
    /**
9917
     * Performs a deep copy on <i>other</i>.
9918
     */
9919
    public getPurchaseScans_result(getPurchaseScans_result other) {
9920
      if (other.isSetSuccess()) {
9921
        List<DetailedPurchaseScan> __this__success = new ArrayList<DetailedPurchaseScan>();
9922
        for (DetailedPurchaseScan other_element : other.success) {
9923
          __this__success.add(new DetailedPurchaseScan(other_element));
9924
        }
9925
        this.success = __this__success;
9926
      }
9927
    }
9928
 
9929
    public getPurchaseScans_result deepCopy() {
9930
      return new getPurchaseScans_result(this);
9931
    }
9932
 
9933
    @Override
9934
    public void clear() {
9935
      this.success = null;
9936
    }
9937
 
9938
    public int getSuccessSize() {
9939
      return (this.success == null) ? 0 : this.success.size();
9940
    }
9941
 
9942
    public java.util.Iterator<DetailedPurchaseScan> getSuccessIterator() {
9943
      return (this.success == null) ? null : this.success.iterator();
9944
    }
9945
 
9946
    public void addToSuccess(DetailedPurchaseScan elem) {
9947
      if (this.success == null) {
9948
        this.success = new ArrayList<DetailedPurchaseScan>();
9949
      }
9950
      this.success.add(elem);
9951
    }
9952
 
9953
    public List<DetailedPurchaseScan> getSuccess() {
9954
      return this.success;
9955
    }
9956
 
9957
    public void setSuccess(List<DetailedPurchaseScan> success) {
9958
      this.success = success;
9959
    }
9960
 
9961
    public void unsetSuccess() {
9962
      this.success = null;
9963
    }
9964
 
9965
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9966
    public boolean isSetSuccess() {
9967
      return this.success != null;
9968
    }
9969
 
9970
    public void setSuccessIsSet(boolean value) {
9971
      if (!value) {
9972
        this.success = null;
9973
      }
9974
    }
9975
 
9976
    public void setFieldValue(_Fields field, Object value) {
9977
      switch (field) {
9978
      case SUCCESS:
9979
        if (value == null) {
9980
          unsetSuccess();
9981
        } else {
9982
          setSuccess((List<DetailedPurchaseScan>)value);
9983
        }
9984
        break;
9985
 
9986
      }
9987
    }
9988
 
9989
    public Object getFieldValue(_Fields field) {
9990
      switch (field) {
9991
      case SUCCESS:
9992
        return getSuccess();
9993
 
9994
      }
9995
      throw new IllegalStateException();
9996
    }
9997
 
9998
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9999
    public boolean isSet(_Fields field) {
10000
      if (field == null) {
10001
        throw new IllegalArgumentException();
10002
      }
10003
 
10004
      switch (field) {
10005
      case SUCCESS:
10006
        return isSetSuccess();
10007
      }
10008
      throw new IllegalStateException();
10009
    }
10010
 
10011
    @Override
10012
    public boolean equals(Object that) {
10013
      if (that == null)
10014
        return false;
10015
      if (that instanceof getPurchaseScans_result)
10016
        return this.equals((getPurchaseScans_result)that);
10017
      return false;
10018
    }
10019
 
10020
    public boolean equals(getPurchaseScans_result that) {
10021
      if (that == null)
10022
        return false;
10023
 
10024
      boolean this_present_success = true && this.isSetSuccess();
10025
      boolean that_present_success = true && that.isSetSuccess();
10026
      if (this_present_success || that_present_success) {
10027
        if (!(this_present_success && that_present_success))
10028
          return false;
10029
        if (!this.success.equals(that.success))
10030
          return false;
10031
      }
10032
 
10033
      return true;
10034
    }
10035
 
10036
    @Override
10037
    public int hashCode() {
10038
      return 0;
10039
    }
10040
 
10041
    public int compareTo(getPurchaseScans_result other) {
10042
      if (!getClass().equals(other.getClass())) {
10043
        return getClass().getName().compareTo(other.getClass().getName());
10044
      }
10045
 
10046
      int lastComparison = 0;
10047
      getPurchaseScans_result typedOther = (getPurchaseScans_result)other;
10048
 
10049
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
10050
      if (lastComparison != 0) {
10051
        return lastComparison;
10052
      }
10053
      if (isSetSuccess()) {
10054
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
10055
        if (lastComparison != 0) {
10056
          return lastComparison;
10057
        }
10058
      }
10059
      return 0;
10060
    }
10061
 
10062
    public _Fields fieldForId(int fieldId) {
10063
      return _Fields.findByThriftId(fieldId);
10064
    }
10065
 
10066
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10067
      org.apache.thrift.protocol.TField field;
10068
      iprot.readStructBegin();
10069
      while (true)
10070
      {
10071
        field = iprot.readFieldBegin();
10072
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10073
          break;
10074
        }
10075
        switch (field.id) {
10076
          case 0: // SUCCESS
10077
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
10078
              {
10079
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
10080
                this.success = new ArrayList<DetailedPurchaseScan>(_list12.size);
10081
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
10082
                {
10083
                  DetailedPurchaseScan _elem14; // required
10084
                  _elem14 = new DetailedPurchaseScan();
10085
                  _elem14.read(iprot);
10086
                  this.success.add(_elem14);
10087
                }
10088
                iprot.readListEnd();
10089
              }
10090
            } else { 
10091
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10092
            }
10093
            break;
10094
          default:
10095
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10096
        }
10097
        iprot.readFieldEnd();
10098
      }
10099
      iprot.readStructEnd();
10100
      validate();
10101
    }
10102
 
10103
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10104
      oprot.writeStructBegin(STRUCT_DESC);
10105
 
10106
      if (this.isSetSuccess()) {
10107
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10108
        {
10109
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
10110
          for (DetailedPurchaseScan _iter15 : this.success)
10111
          {
10112
            _iter15.write(oprot);
10113
          }
10114
          oprot.writeListEnd();
10115
        }
10116
        oprot.writeFieldEnd();
10117
      }
10118
      oprot.writeFieldStop();
10119
      oprot.writeStructEnd();
10120
    }
10121
 
10122
    @Override
10123
    public String toString() {
10124
      StringBuilder sb = new StringBuilder("getPurchaseScans_result(");
10125
      boolean first = true;
10126
 
10127
      sb.append("success:");
10128
      if (this.success == null) {
10129
        sb.append("null");
10130
      } else {
10131
        sb.append(this.success);
10132
      }
10133
      first = false;
10134
      sb.append(")");
10135
      return sb.toString();
10136
    }
10137
 
10138
    public void validate() throws org.apache.thrift.TException {
10139
      // check for required fields
10140
    }
10141
 
10142
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10143
      try {
10144
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10145
      } catch (org.apache.thrift.TException te) {
10146
        throw new java.io.IOException(te);
10147
      }
10148
    }
10149
 
10150
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10151
      try {
10152
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10153
      } catch (org.apache.thrift.TException te) {
10154
        throw new java.io.IOException(te);
10155
      }
10156
    }
10157
 
10158
  }
10159
 
5496 mandeep.dh 10160
  public static class fetchScansPerInvoiceNumber_args implements org.apache.thrift.TBase<fetchScansPerInvoiceNumber_args, fetchScansPerInvoiceNumber_args._Fields>, java.io.Serializable, Cloneable   {
10161
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchScansPerInvoiceNumber_args");
10162
 
10163
    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);
10164
 
10165
    private long date; // required
10166
 
10167
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10168
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10169
      DATE((short)1, "date");
10170
 
10171
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10172
 
10173
      static {
10174
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10175
          byName.put(field.getFieldName(), field);
10176
        }
10177
      }
10178
 
10179
      /**
10180
       * Find the _Fields constant that matches fieldId, or null if its not found.
10181
       */
10182
      public static _Fields findByThriftId(int fieldId) {
10183
        switch(fieldId) {
10184
          case 1: // DATE
10185
            return DATE;
10186
          default:
10187
            return null;
10188
        }
10189
      }
10190
 
10191
      /**
10192
       * Find the _Fields constant that matches fieldId, throwing an exception
10193
       * if it is not found.
10194
       */
10195
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10196
        _Fields fields = findByThriftId(fieldId);
10197
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10198
        return fields;
10199
      }
10200
 
10201
      /**
10202
       * Find the _Fields constant that matches name, or null if its not found.
10203
       */
10204
      public static _Fields findByName(String name) {
10205
        return byName.get(name);
10206
      }
10207
 
10208
      private final short _thriftId;
10209
      private final String _fieldName;
10210
 
10211
      _Fields(short thriftId, String fieldName) {
10212
        _thriftId = thriftId;
10213
        _fieldName = fieldName;
10214
      }
10215
 
10216
      public short getThriftFieldId() {
10217
        return _thriftId;
10218
      }
10219
 
10220
      public String getFieldName() {
10221
        return _fieldName;
10222
      }
10223
    }
10224
 
10225
    // isset id assignments
10226
    private static final int __DATE_ISSET_ID = 0;
10227
    private BitSet __isset_bit_vector = new BitSet(1);
10228
 
10229
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10230
    static {
10231
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10232
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10233
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10234
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10235
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchScansPerInvoiceNumber_args.class, metaDataMap);
10236
    }
10237
 
10238
    public fetchScansPerInvoiceNumber_args() {
10239
    }
10240
 
10241
    public fetchScansPerInvoiceNumber_args(
10242
      long date)
10243
    {
10244
      this();
10245
      this.date = date;
10246
      setDateIsSet(true);
10247
    }
10248
 
10249
    /**
10250
     * Performs a deep copy on <i>other</i>.
10251
     */
10252
    public fetchScansPerInvoiceNumber_args(fetchScansPerInvoiceNumber_args other) {
10253
      __isset_bit_vector.clear();
10254
      __isset_bit_vector.or(other.__isset_bit_vector);
10255
      this.date = other.date;
10256
    }
10257
 
10258
    public fetchScansPerInvoiceNumber_args deepCopy() {
10259
      return new fetchScansPerInvoiceNumber_args(this);
10260
    }
10261
 
10262
    @Override
10263
    public void clear() {
10264
      setDateIsSet(false);
10265
      this.date = 0;
10266
    }
10267
 
10268
    public long getDate() {
10269
      return this.date;
10270
    }
10271
 
10272
    public void setDate(long date) {
10273
      this.date = date;
10274
      setDateIsSet(true);
10275
    }
10276
 
10277
    public void unsetDate() {
10278
      __isset_bit_vector.clear(__DATE_ISSET_ID);
10279
    }
10280
 
10281
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
10282
    public boolean isSetDate() {
10283
      return __isset_bit_vector.get(__DATE_ISSET_ID);
10284
    }
10285
 
10286
    public void setDateIsSet(boolean value) {
10287
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
10288
    }
10289
 
10290
    public void setFieldValue(_Fields field, Object value) {
10291
      switch (field) {
10292
      case DATE:
10293
        if (value == null) {
10294
          unsetDate();
10295
        } else {
10296
          setDate((Long)value);
10297
        }
10298
        break;
10299
 
10300
      }
10301
    }
10302
 
10303
    public Object getFieldValue(_Fields field) {
10304
      switch (field) {
10305
      case DATE:
10306
        return Long.valueOf(getDate());
10307
 
10308
      }
10309
      throw new IllegalStateException();
10310
    }
10311
 
10312
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10313
    public boolean isSet(_Fields field) {
10314
      if (field == null) {
10315
        throw new IllegalArgumentException();
10316
      }
10317
 
10318
      switch (field) {
10319
      case DATE:
10320
        return isSetDate();
10321
      }
10322
      throw new IllegalStateException();
10323
    }
10324
 
10325
    @Override
10326
    public boolean equals(Object that) {
10327
      if (that == null)
10328
        return false;
10329
      if (that instanceof fetchScansPerInvoiceNumber_args)
10330
        return this.equals((fetchScansPerInvoiceNumber_args)that);
10331
      return false;
10332
    }
10333
 
10334
    public boolean equals(fetchScansPerInvoiceNumber_args that) {
10335
      if (that == null)
10336
        return false;
10337
 
10338
      boolean this_present_date = true;
10339
      boolean that_present_date = true;
10340
      if (this_present_date || that_present_date) {
10341
        if (!(this_present_date && that_present_date))
10342
          return false;
10343
        if (this.date != that.date)
10344
          return false;
10345
      }
10346
 
10347
      return true;
10348
    }
10349
 
10350
    @Override
10351
    public int hashCode() {
10352
      return 0;
10353
    }
10354
 
10355
    public int compareTo(fetchScansPerInvoiceNumber_args other) {
10356
      if (!getClass().equals(other.getClass())) {
10357
        return getClass().getName().compareTo(other.getClass().getName());
10358
      }
10359
 
10360
      int lastComparison = 0;
10361
      fetchScansPerInvoiceNumber_args typedOther = (fetchScansPerInvoiceNumber_args)other;
10362
 
10363
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
10364
      if (lastComparison != 0) {
10365
        return lastComparison;
10366
      }
10367
      if (isSetDate()) {
10368
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
10369
        if (lastComparison != 0) {
10370
          return lastComparison;
10371
        }
10372
      }
10373
      return 0;
10374
    }
10375
 
10376
    public _Fields fieldForId(int fieldId) {
10377
      return _Fields.findByThriftId(fieldId);
10378
    }
10379
 
10380
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10381
      org.apache.thrift.protocol.TField field;
10382
      iprot.readStructBegin();
10383
      while (true)
10384
      {
10385
        field = iprot.readFieldBegin();
10386
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10387
          break;
10388
        }
10389
        switch (field.id) {
10390
          case 1: // DATE
10391
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10392
              this.date = iprot.readI64();
10393
              setDateIsSet(true);
10394
            } else { 
10395
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10396
            }
10397
            break;
10398
          default:
10399
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10400
        }
10401
        iprot.readFieldEnd();
10402
      }
10403
      iprot.readStructEnd();
10404
      validate();
10405
    }
10406
 
10407
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10408
      validate();
10409
 
10410
      oprot.writeStructBegin(STRUCT_DESC);
10411
      oprot.writeFieldBegin(DATE_FIELD_DESC);
10412
      oprot.writeI64(this.date);
10413
      oprot.writeFieldEnd();
10414
      oprot.writeFieldStop();
10415
      oprot.writeStructEnd();
10416
    }
10417
 
10418
    @Override
10419
    public String toString() {
10420
      StringBuilder sb = new StringBuilder("fetchScansPerInvoiceNumber_args(");
10421
      boolean first = true;
10422
 
10423
      sb.append("date:");
10424
      sb.append(this.date);
10425
      first = false;
10426
      sb.append(")");
10427
      return sb.toString();
10428
    }
10429
 
10430
    public void validate() throws org.apache.thrift.TException {
10431
      // check for required fields
10432
    }
10433
 
10434
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10435
      try {
10436
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10437
      } catch (org.apache.thrift.TException te) {
10438
        throw new java.io.IOException(te);
10439
      }
10440
    }
10441
 
10442
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10443
      try {
5711 mandeep.dh 10444
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
10445
        __isset_bit_vector = new BitSet(1);
5496 mandeep.dh 10446
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10447
      } catch (org.apache.thrift.TException te) {
10448
        throw new java.io.IOException(te);
10449
      }
10450
    }
10451
 
10452
  }
10453
 
10454
  public static class fetchScansPerInvoiceNumber_result implements org.apache.thrift.TBase<fetchScansPerInvoiceNumber_result, fetchScansPerInvoiceNumber_result._Fields>, java.io.Serializable, Cloneable   {
10455
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchScansPerInvoiceNumber_result");
10456
 
10457
    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);
10458
 
10459
    private List<InvoiceScan> success; // required
10460
 
10461
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10462
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10463
      SUCCESS((short)0, "success");
10464
 
10465
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10466
 
10467
      static {
10468
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10469
          byName.put(field.getFieldName(), field);
10470
        }
10471
      }
10472
 
10473
      /**
10474
       * Find the _Fields constant that matches fieldId, or null if its not found.
10475
       */
10476
      public static _Fields findByThriftId(int fieldId) {
10477
        switch(fieldId) {
10478
          case 0: // SUCCESS
10479
            return SUCCESS;
10480
          default:
10481
            return null;
10482
        }
10483
      }
10484
 
10485
      /**
10486
       * Find the _Fields constant that matches fieldId, throwing an exception
10487
       * if it is not found.
10488
       */
10489
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10490
        _Fields fields = findByThriftId(fieldId);
10491
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10492
        return fields;
10493
      }
10494
 
10495
      /**
10496
       * Find the _Fields constant that matches name, or null if its not found.
10497
       */
10498
      public static _Fields findByName(String name) {
10499
        return byName.get(name);
10500
      }
10501
 
10502
      private final short _thriftId;
10503
      private final String _fieldName;
10504
 
10505
      _Fields(short thriftId, String fieldName) {
10506
        _thriftId = thriftId;
10507
        _fieldName = fieldName;
10508
      }
10509
 
10510
      public short getThriftFieldId() {
10511
        return _thriftId;
10512
      }
10513
 
10514
      public String getFieldName() {
10515
        return _fieldName;
10516
      }
10517
    }
10518
 
10519
    // isset id assignments
10520
 
10521
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10522
    static {
10523
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10524
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10525
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
10526
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InvoiceScan.class))));
10527
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10528
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchScansPerInvoiceNumber_result.class, metaDataMap);
10529
    }
10530
 
10531
    public fetchScansPerInvoiceNumber_result() {
10532
    }
10533
 
10534
    public fetchScansPerInvoiceNumber_result(
10535
      List<InvoiceScan> success)
10536
    {
10537
      this();
10538
      this.success = success;
10539
    }
10540
 
10541
    /**
10542
     * Performs a deep copy on <i>other</i>.
10543
     */
10544
    public fetchScansPerInvoiceNumber_result(fetchScansPerInvoiceNumber_result other) {
10545
      if (other.isSetSuccess()) {
10546
        List<InvoiceScan> __this__success = new ArrayList<InvoiceScan>();
10547
        for (InvoiceScan other_element : other.success) {
10548
          __this__success.add(new InvoiceScan(other_element));
10549
        }
10550
        this.success = __this__success;
10551
      }
10552
    }
10553
 
10554
    public fetchScansPerInvoiceNumber_result deepCopy() {
10555
      return new fetchScansPerInvoiceNumber_result(this);
10556
    }
10557
 
10558
    @Override
10559
    public void clear() {
10560
      this.success = null;
10561
    }
10562
 
10563
    public int getSuccessSize() {
10564
      return (this.success == null) ? 0 : this.success.size();
10565
    }
10566
 
10567
    public java.util.Iterator<InvoiceScan> getSuccessIterator() {
10568
      return (this.success == null) ? null : this.success.iterator();
10569
    }
10570
 
10571
    public void addToSuccess(InvoiceScan elem) {
10572
      if (this.success == null) {
10573
        this.success = new ArrayList<InvoiceScan>();
10574
      }
10575
      this.success.add(elem);
10576
    }
10577
 
10578
    public List<InvoiceScan> getSuccess() {
10579
      return this.success;
10580
    }
10581
 
10582
    public void setSuccess(List<InvoiceScan> success) {
10583
      this.success = success;
10584
    }
10585
 
10586
    public void unsetSuccess() {
10587
      this.success = null;
10588
    }
10589
 
10590
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
10591
    public boolean isSetSuccess() {
10592
      return this.success != null;
10593
    }
10594
 
10595
    public void setSuccessIsSet(boolean value) {
10596
      if (!value) {
10597
        this.success = null;
10598
      }
10599
    }
10600
 
10601
    public void setFieldValue(_Fields field, Object value) {
10602
      switch (field) {
10603
      case SUCCESS:
10604
        if (value == null) {
10605
          unsetSuccess();
10606
        } else {
10607
          setSuccess((List<InvoiceScan>)value);
10608
        }
10609
        break;
10610
 
10611
      }
10612
    }
10613
 
10614
    public Object getFieldValue(_Fields field) {
10615
      switch (field) {
10616
      case SUCCESS:
10617
        return getSuccess();
10618
 
10619
      }
10620
      throw new IllegalStateException();
10621
    }
10622
 
10623
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10624
    public boolean isSet(_Fields field) {
10625
      if (field == null) {
10626
        throw new IllegalArgumentException();
10627
      }
10628
 
10629
      switch (field) {
10630
      case SUCCESS:
10631
        return isSetSuccess();
10632
      }
10633
      throw new IllegalStateException();
10634
    }
10635
 
10636
    @Override
10637
    public boolean equals(Object that) {
10638
      if (that == null)
10639
        return false;
10640
      if (that instanceof fetchScansPerInvoiceNumber_result)
10641
        return this.equals((fetchScansPerInvoiceNumber_result)that);
10642
      return false;
10643
    }
10644
 
10645
    public boolean equals(fetchScansPerInvoiceNumber_result that) {
10646
      if (that == null)
10647
        return false;
10648
 
10649
      boolean this_present_success = true && this.isSetSuccess();
10650
      boolean that_present_success = true && that.isSetSuccess();
10651
      if (this_present_success || that_present_success) {
10652
        if (!(this_present_success && that_present_success))
10653
          return false;
10654
        if (!this.success.equals(that.success))
10655
          return false;
10656
      }
10657
 
10658
      return true;
10659
    }
10660
 
10661
    @Override
10662
    public int hashCode() {
10663
      return 0;
10664
    }
10665
 
10666
    public int compareTo(fetchScansPerInvoiceNumber_result other) {
10667
      if (!getClass().equals(other.getClass())) {
10668
        return getClass().getName().compareTo(other.getClass().getName());
10669
      }
10670
 
10671
      int lastComparison = 0;
10672
      fetchScansPerInvoiceNumber_result typedOther = (fetchScansPerInvoiceNumber_result)other;
10673
 
10674
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
10675
      if (lastComparison != 0) {
10676
        return lastComparison;
10677
      }
10678
      if (isSetSuccess()) {
10679
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
10680
        if (lastComparison != 0) {
10681
          return lastComparison;
10682
        }
10683
      }
10684
      return 0;
10685
    }
10686
 
10687
    public _Fields fieldForId(int fieldId) {
10688
      return _Fields.findByThriftId(fieldId);
10689
    }
10690
 
10691
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10692
      org.apache.thrift.protocol.TField field;
10693
      iprot.readStructBegin();
10694
      while (true)
10695
      {
10696
        field = iprot.readFieldBegin();
10697
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10698
          break;
10699
        }
10700
        switch (field.id) {
10701
          case 0: // SUCCESS
10702
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
10703
              {
10704
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
10705
                this.success = new ArrayList<InvoiceScan>(_list16.size);
10706
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
10707
                {
10708
                  InvoiceScan _elem18; // required
10709
                  _elem18 = new InvoiceScan();
10710
                  _elem18.read(iprot);
10711
                  this.success.add(_elem18);
10712
                }
10713
                iprot.readListEnd();
10714
              }
10715
            } else { 
10716
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10717
            }
10718
            break;
10719
          default:
10720
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10721
        }
10722
        iprot.readFieldEnd();
10723
      }
10724
      iprot.readStructEnd();
10725
      validate();
10726
    }
10727
 
10728
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10729
      oprot.writeStructBegin(STRUCT_DESC);
10730
 
10731
      if (this.isSetSuccess()) {
10732
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10733
        {
10734
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
10735
          for (InvoiceScan _iter19 : this.success)
10736
          {
10737
            _iter19.write(oprot);
10738
          }
10739
          oprot.writeListEnd();
10740
        }
10741
        oprot.writeFieldEnd();
10742
      }
10743
      oprot.writeFieldStop();
10744
      oprot.writeStructEnd();
10745
    }
10746
 
10747
    @Override
10748
    public String toString() {
10749
      StringBuilder sb = new StringBuilder("fetchScansPerInvoiceNumber_result(");
10750
      boolean first = true;
10751
 
10752
      sb.append("success:");
10753
      if (this.success == null) {
10754
        sb.append("null");
10755
      } else {
10756
        sb.append(this.success);
10757
      }
10758
      first = false;
10759
      sb.append(")");
10760
      return sb.toString();
10761
    }
10762
 
10763
    public void validate() throws org.apache.thrift.TException {
10764
      // check for required fields
10765
    }
10766
 
10767
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10768
      try {
10769
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10770
      } catch (org.apache.thrift.TException te) {
10771
        throw new java.io.IOException(te);
10772
      }
10773
    }
10774
 
10775
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10776
      try {
10777
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10778
      } catch (org.apache.thrift.TException te) {
10779
        throw new java.io.IOException(te);
10780
      }
10781
    }
10782
 
10783
  }
10784
 
5620 mandeep.dh 10785
  public static class getInventoryItemFromOrder_args implements org.apache.thrift.TBase<getInventoryItemFromOrder_args, getInventoryItemFromOrder_args._Fields>, java.io.Serializable, Cloneable   {
10786
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromOrder_args");
10787
 
10788
    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)1);
10789
 
10790
    private long orderId; // required
10791
 
10792
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10793
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10794
      ORDER_ID((short)1, "orderId");
10795
 
10796
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10797
 
10798
      static {
10799
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10800
          byName.put(field.getFieldName(), field);
10801
        }
10802
      }
10803
 
10804
      /**
10805
       * Find the _Fields constant that matches fieldId, or null if its not found.
10806
       */
10807
      public static _Fields findByThriftId(int fieldId) {
10808
        switch(fieldId) {
10809
          case 1: // ORDER_ID
10810
            return ORDER_ID;
10811
          default:
10812
            return null;
10813
        }
10814
      }
10815
 
10816
      /**
10817
       * Find the _Fields constant that matches fieldId, throwing an exception
10818
       * if it is not found.
10819
       */
10820
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10821
        _Fields fields = findByThriftId(fieldId);
10822
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10823
        return fields;
10824
      }
10825
 
10826
      /**
10827
       * Find the _Fields constant that matches name, or null if its not found.
10828
       */
10829
      public static _Fields findByName(String name) {
10830
        return byName.get(name);
10831
      }
10832
 
10833
      private final short _thriftId;
10834
      private final String _fieldName;
10835
 
10836
      _Fields(short thriftId, String fieldName) {
10837
        _thriftId = thriftId;
10838
        _fieldName = fieldName;
10839
      }
10840
 
10841
      public short getThriftFieldId() {
10842
        return _thriftId;
10843
      }
10844
 
10845
      public String getFieldName() {
10846
        return _fieldName;
10847
      }
10848
    }
10849
 
10850
    // isset id assignments
10851
    private static final int __ORDERID_ISSET_ID = 0;
10852
    private BitSet __isset_bit_vector = new BitSet(1);
10853
 
10854
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10855
    static {
10856
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10857
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10858
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10859
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10860
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromOrder_args.class, metaDataMap);
10861
    }
10862
 
10863
    public getInventoryItemFromOrder_args() {
10864
    }
10865
 
10866
    public getInventoryItemFromOrder_args(
10867
      long orderId)
10868
    {
10869
      this();
10870
      this.orderId = orderId;
10871
      setOrderIdIsSet(true);
10872
    }
10873
 
10874
    /**
10875
     * Performs a deep copy on <i>other</i>.
10876
     */
10877
    public getInventoryItemFromOrder_args(getInventoryItemFromOrder_args other) {
10878
      __isset_bit_vector.clear();
10879
      __isset_bit_vector.or(other.__isset_bit_vector);
10880
      this.orderId = other.orderId;
10881
    }
10882
 
10883
    public getInventoryItemFromOrder_args deepCopy() {
10884
      return new getInventoryItemFromOrder_args(this);
10885
    }
10886
 
10887
    @Override
10888
    public void clear() {
10889
      setOrderIdIsSet(false);
10890
      this.orderId = 0;
10891
    }
10892
 
10893
    public long getOrderId() {
10894
      return this.orderId;
10895
    }
10896
 
10897
    public void setOrderId(long orderId) {
10898
      this.orderId = orderId;
10899
      setOrderIdIsSet(true);
10900
    }
10901
 
10902
    public void unsetOrderId() {
10903
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
10904
    }
10905
 
10906
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
10907
    public boolean isSetOrderId() {
10908
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
10909
    }
10910
 
10911
    public void setOrderIdIsSet(boolean value) {
10912
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
10913
    }
10914
 
10915
    public void setFieldValue(_Fields field, Object value) {
10916
      switch (field) {
10917
      case ORDER_ID:
10918
        if (value == null) {
10919
          unsetOrderId();
10920
        } else {
10921
          setOrderId((Long)value);
10922
        }
10923
        break;
10924
 
10925
      }
10926
    }
10927
 
10928
    public Object getFieldValue(_Fields field) {
10929
      switch (field) {
10930
      case ORDER_ID:
10931
        return Long.valueOf(getOrderId());
10932
 
10933
      }
10934
      throw new IllegalStateException();
10935
    }
10936
 
10937
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10938
    public boolean isSet(_Fields field) {
10939
      if (field == null) {
10940
        throw new IllegalArgumentException();
10941
      }
10942
 
10943
      switch (field) {
10944
      case ORDER_ID:
10945
        return isSetOrderId();
10946
      }
10947
      throw new IllegalStateException();
10948
    }
10949
 
10950
    @Override
10951
    public boolean equals(Object that) {
10952
      if (that == null)
10953
        return false;
10954
      if (that instanceof getInventoryItemFromOrder_args)
10955
        return this.equals((getInventoryItemFromOrder_args)that);
10956
      return false;
10957
    }
10958
 
10959
    public boolean equals(getInventoryItemFromOrder_args that) {
10960
      if (that == null)
10961
        return false;
10962
 
10963
      boolean this_present_orderId = true;
10964
      boolean that_present_orderId = true;
10965
      if (this_present_orderId || that_present_orderId) {
10966
        if (!(this_present_orderId && that_present_orderId))
10967
          return false;
10968
        if (this.orderId != that.orderId)
10969
          return false;
10970
      }
10971
 
10972
      return true;
10973
    }
10974
 
10975
    @Override
10976
    public int hashCode() {
10977
      return 0;
10978
    }
10979
 
10980
    public int compareTo(getInventoryItemFromOrder_args other) {
10981
      if (!getClass().equals(other.getClass())) {
10982
        return getClass().getName().compareTo(other.getClass().getName());
10983
      }
10984
 
10985
      int lastComparison = 0;
10986
      getInventoryItemFromOrder_args typedOther = (getInventoryItemFromOrder_args)other;
10987
 
10988
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
10989
      if (lastComparison != 0) {
10990
        return lastComparison;
10991
      }
10992
      if (isSetOrderId()) {
10993
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
10994
        if (lastComparison != 0) {
10995
          return lastComparison;
10996
        }
10997
      }
10998
      return 0;
10999
    }
11000
 
11001
    public _Fields fieldForId(int fieldId) {
11002
      return _Fields.findByThriftId(fieldId);
11003
    }
11004
 
11005
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11006
      org.apache.thrift.protocol.TField field;
11007
      iprot.readStructBegin();
11008
      while (true)
11009
      {
11010
        field = iprot.readFieldBegin();
11011
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11012
          break;
11013
        }
11014
        switch (field.id) {
11015
          case 1: // ORDER_ID
11016
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11017
              this.orderId = iprot.readI64();
11018
              setOrderIdIsSet(true);
11019
            } else { 
11020
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11021
            }
11022
            break;
11023
          default:
11024
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11025
        }
11026
        iprot.readFieldEnd();
11027
      }
11028
      iprot.readStructEnd();
11029
      validate();
11030
    }
11031
 
11032
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11033
      validate();
11034
 
11035
      oprot.writeStructBegin(STRUCT_DESC);
11036
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
11037
      oprot.writeI64(this.orderId);
11038
      oprot.writeFieldEnd();
11039
      oprot.writeFieldStop();
11040
      oprot.writeStructEnd();
11041
    }
11042
 
11043
    @Override
11044
    public String toString() {
11045
      StringBuilder sb = new StringBuilder("getInventoryItemFromOrder_args(");
11046
      boolean first = true;
11047
 
11048
      sb.append("orderId:");
11049
      sb.append(this.orderId);
11050
      first = false;
11051
      sb.append(")");
11052
      return sb.toString();
11053
    }
11054
 
11055
    public void validate() throws org.apache.thrift.TException {
11056
      // check for required fields
11057
    }
11058
 
11059
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11060
      try {
11061
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11062
      } catch (org.apache.thrift.TException te) {
11063
        throw new java.io.IOException(te);
11064
      }
11065
    }
11066
 
11067
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11068
      try {
11069
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
11070
        __isset_bit_vector = new BitSet(1);
11071
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11072
      } catch (org.apache.thrift.TException te) {
11073
        throw new java.io.IOException(te);
11074
      }
11075
    }
11076
 
11077
  }
11078
 
11079
  public static class getInventoryItemFromOrder_result implements org.apache.thrift.TBase<getInventoryItemFromOrder_result, getInventoryItemFromOrder_result._Fields>, java.io.Serializable, Cloneable   {
11080
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromOrder_result");
11081
 
11082
    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);
11083
    private static final org.apache.thrift.protocol.TField WE_FIELD_DESC = new org.apache.thrift.protocol.TField("we", org.apache.thrift.protocol.TType.STRUCT, (short)1);
11084
 
11085
    private InventoryItem success; // required
11086
    private WarehouseServiceException we; // required
11087
 
11088
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11089
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11090
      SUCCESS((short)0, "success"),
11091
      WE((short)1, "we");
11092
 
11093
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11094
 
11095
      static {
11096
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11097
          byName.put(field.getFieldName(), field);
11098
        }
11099
      }
11100
 
11101
      /**
11102
       * Find the _Fields constant that matches fieldId, or null if its not found.
11103
       */
11104
      public static _Fields findByThriftId(int fieldId) {
11105
        switch(fieldId) {
11106
          case 0: // SUCCESS
11107
            return SUCCESS;
11108
          case 1: // WE
11109
            return WE;
11110
          default:
11111
            return null;
11112
        }
11113
      }
11114
 
11115
      /**
11116
       * Find the _Fields constant that matches fieldId, throwing an exception
11117
       * if it is not found.
11118
       */
11119
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11120
        _Fields fields = findByThriftId(fieldId);
11121
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11122
        return fields;
11123
      }
11124
 
11125
      /**
11126
       * Find the _Fields constant that matches name, or null if its not found.
11127
       */
11128
      public static _Fields findByName(String name) {
11129
        return byName.get(name);
11130
      }
11131
 
11132
      private final short _thriftId;
11133
      private final String _fieldName;
11134
 
11135
      _Fields(short thriftId, String fieldName) {
11136
        _thriftId = thriftId;
11137
        _fieldName = fieldName;
11138
      }
11139
 
11140
      public short getThriftFieldId() {
11141
        return _thriftId;
11142
      }
11143
 
11144
      public String getFieldName() {
11145
        return _fieldName;
11146
      }
11147
    }
11148
 
11149
    // isset id assignments
11150
 
11151
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11152
    static {
11153
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11154
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11155
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
11156
      tmpMap.put(_Fields.WE, new org.apache.thrift.meta_data.FieldMetaData("we", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11157
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11158
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11159
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromOrder_result.class, metaDataMap);
11160
    }
11161
 
11162
    public getInventoryItemFromOrder_result() {
11163
    }
11164
 
11165
    public getInventoryItemFromOrder_result(
11166
      InventoryItem success,
11167
      WarehouseServiceException we)
11168
    {
11169
      this();
11170
      this.success = success;
11171
      this.we = we;
11172
    }
11173
 
11174
    /**
11175
     * Performs a deep copy on <i>other</i>.
11176
     */
11177
    public getInventoryItemFromOrder_result(getInventoryItemFromOrder_result other) {
11178
      if (other.isSetSuccess()) {
11179
        this.success = new InventoryItem(other.success);
11180
      }
11181
      if (other.isSetWe()) {
11182
        this.we = new WarehouseServiceException(other.we);
11183
      }
11184
    }
11185
 
11186
    public getInventoryItemFromOrder_result deepCopy() {
11187
      return new getInventoryItemFromOrder_result(this);
11188
    }
11189
 
11190
    @Override
11191
    public void clear() {
11192
      this.success = null;
11193
      this.we = null;
11194
    }
11195
 
11196
    public InventoryItem getSuccess() {
11197
      return this.success;
11198
    }
11199
 
11200
    public void setSuccess(InventoryItem success) {
11201
      this.success = success;
11202
    }
11203
 
11204
    public void unsetSuccess() {
11205
      this.success = null;
11206
    }
11207
 
11208
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
11209
    public boolean isSetSuccess() {
11210
      return this.success != null;
11211
    }
11212
 
11213
    public void setSuccessIsSet(boolean value) {
11214
      if (!value) {
11215
        this.success = null;
11216
      }
11217
    }
11218
 
11219
    public WarehouseServiceException getWe() {
11220
      return this.we;
11221
    }
11222
 
11223
    public void setWe(WarehouseServiceException we) {
11224
      this.we = we;
11225
    }
11226
 
11227
    public void unsetWe() {
11228
      this.we = null;
11229
    }
11230
 
11231
    /** Returns true if field we is set (has been assigned a value) and false otherwise */
11232
    public boolean isSetWe() {
11233
      return this.we != null;
11234
    }
11235
 
11236
    public void setWeIsSet(boolean value) {
11237
      if (!value) {
11238
        this.we = null;
11239
      }
11240
    }
11241
 
11242
    public void setFieldValue(_Fields field, Object value) {
11243
      switch (field) {
11244
      case SUCCESS:
11245
        if (value == null) {
11246
          unsetSuccess();
11247
        } else {
11248
          setSuccess((InventoryItem)value);
11249
        }
11250
        break;
11251
 
11252
      case WE:
11253
        if (value == null) {
11254
          unsetWe();
11255
        } else {
11256
          setWe((WarehouseServiceException)value);
11257
        }
11258
        break;
11259
 
11260
      }
11261
    }
11262
 
11263
    public Object getFieldValue(_Fields field) {
11264
      switch (field) {
11265
      case SUCCESS:
11266
        return getSuccess();
11267
 
11268
      case WE:
11269
        return getWe();
11270
 
11271
      }
11272
      throw new IllegalStateException();
11273
    }
11274
 
11275
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11276
    public boolean isSet(_Fields field) {
11277
      if (field == null) {
11278
        throw new IllegalArgumentException();
11279
      }
11280
 
11281
      switch (field) {
11282
      case SUCCESS:
11283
        return isSetSuccess();
11284
      case WE:
11285
        return isSetWe();
11286
      }
11287
      throw new IllegalStateException();
11288
    }
11289
 
11290
    @Override
11291
    public boolean equals(Object that) {
11292
      if (that == null)
11293
        return false;
11294
      if (that instanceof getInventoryItemFromOrder_result)
11295
        return this.equals((getInventoryItemFromOrder_result)that);
11296
      return false;
11297
    }
11298
 
11299
    public boolean equals(getInventoryItemFromOrder_result that) {
11300
      if (that == null)
11301
        return false;
11302
 
11303
      boolean this_present_success = true && this.isSetSuccess();
11304
      boolean that_present_success = true && that.isSetSuccess();
11305
      if (this_present_success || that_present_success) {
11306
        if (!(this_present_success && that_present_success))
11307
          return false;
11308
        if (!this.success.equals(that.success))
11309
          return false;
11310
      }
11311
 
11312
      boolean this_present_we = true && this.isSetWe();
11313
      boolean that_present_we = true && that.isSetWe();
11314
      if (this_present_we || that_present_we) {
11315
        if (!(this_present_we && that_present_we))
11316
          return false;
11317
        if (!this.we.equals(that.we))
11318
          return false;
11319
      }
11320
 
11321
      return true;
11322
    }
11323
 
11324
    @Override
11325
    public int hashCode() {
11326
      return 0;
11327
    }
11328
 
11329
    public int compareTo(getInventoryItemFromOrder_result other) {
11330
      if (!getClass().equals(other.getClass())) {
11331
        return getClass().getName().compareTo(other.getClass().getName());
11332
      }
11333
 
11334
      int lastComparison = 0;
11335
      getInventoryItemFromOrder_result typedOther = (getInventoryItemFromOrder_result)other;
11336
 
11337
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
11338
      if (lastComparison != 0) {
11339
        return lastComparison;
11340
      }
11341
      if (isSetSuccess()) {
11342
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
11343
        if (lastComparison != 0) {
11344
          return lastComparison;
11345
        }
11346
      }
11347
      lastComparison = Boolean.valueOf(isSetWe()).compareTo(typedOther.isSetWe());
11348
      if (lastComparison != 0) {
11349
        return lastComparison;
11350
      }
11351
      if (isSetWe()) {
11352
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.we, typedOther.we);
11353
        if (lastComparison != 0) {
11354
          return lastComparison;
11355
        }
11356
      }
11357
      return 0;
11358
    }
11359
 
11360
    public _Fields fieldForId(int fieldId) {
11361
      return _Fields.findByThriftId(fieldId);
11362
    }
11363
 
11364
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11365
      org.apache.thrift.protocol.TField field;
11366
      iprot.readStructBegin();
11367
      while (true)
11368
      {
11369
        field = iprot.readFieldBegin();
11370
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11371
          break;
11372
        }
11373
        switch (field.id) {
11374
          case 0: // SUCCESS
11375
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11376
              this.success = new InventoryItem();
11377
              this.success.read(iprot);
11378
            } else { 
11379
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11380
            }
11381
            break;
11382
          case 1: // WE
11383
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11384
              this.we = new WarehouseServiceException();
11385
              this.we.read(iprot);
11386
            } else { 
11387
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11388
            }
11389
            break;
11390
          default:
11391
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11392
        }
11393
        iprot.readFieldEnd();
11394
      }
11395
      iprot.readStructEnd();
11396
      validate();
11397
    }
11398
 
11399
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11400
      oprot.writeStructBegin(STRUCT_DESC);
11401
 
11402
      if (this.isSetSuccess()) {
11403
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11404
        this.success.write(oprot);
11405
        oprot.writeFieldEnd();
11406
      } else if (this.isSetWe()) {
11407
        oprot.writeFieldBegin(WE_FIELD_DESC);
11408
        this.we.write(oprot);
11409
        oprot.writeFieldEnd();
11410
      }
11411
      oprot.writeFieldStop();
11412
      oprot.writeStructEnd();
11413
    }
11414
 
11415
    @Override
11416
    public String toString() {
11417
      StringBuilder sb = new StringBuilder("getInventoryItemFromOrder_result(");
11418
      boolean first = true;
11419
 
11420
      sb.append("success:");
11421
      if (this.success == null) {
11422
        sb.append("null");
11423
      } else {
11424
        sb.append(this.success);
11425
      }
11426
      first = false;
11427
      if (!first) sb.append(", ");
11428
      sb.append("we:");
11429
      if (this.we == null) {
11430
        sb.append("null");
11431
      } else {
11432
        sb.append(this.we);
11433
      }
11434
      first = false;
11435
      sb.append(")");
11436
      return sb.toString();
11437
    }
11438
 
11439
    public void validate() throws org.apache.thrift.TException {
11440
      // check for required fields
11441
    }
11442
 
11443
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11444
      try {
11445
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11446
      } catch (org.apache.thrift.TException te) {
11447
        throw new java.io.IOException(te);
11448
      }
11449
    }
11450
 
11451
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11452
      try {
11453
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11454
      } catch (org.apache.thrift.TException te) {
11455
        throw new java.io.IOException(te);
11456
      }
11457
    }
11458
 
11459
  }
11460
 
5711 mandeep.dh 11461
  public static class getInventoryAge_args implements org.apache.thrift.TBase<getInventoryAge_args, getInventoryAge_args._Fields>, java.io.Serializable, Cloneable   {
11462
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryAge_args");
11463
 
11464
 
11465
 
11466
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11467
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11468
;
11469
 
11470
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11471
 
11472
      static {
11473
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11474
          byName.put(field.getFieldName(), field);
11475
        }
11476
      }
11477
 
11478
      /**
11479
       * Find the _Fields constant that matches fieldId, or null if its not found.
11480
       */
11481
      public static _Fields findByThriftId(int fieldId) {
11482
        switch(fieldId) {
11483
          default:
11484
            return null;
11485
        }
11486
      }
11487
 
11488
      /**
11489
       * Find the _Fields constant that matches fieldId, throwing an exception
11490
       * if it is not found.
11491
       */
11492
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11493
        _Fields fields = findByThriftId(fieldId);
11494
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11495
        return fields;
11496
      }
11497
 
11498
      /**
11499
       * Find the _Fields constant that matches name, or null if its not found.
11500
       */
11501
      public static _Fields findByName(String name) {
11502
        return byName.get(name);
11503
      }
11504
 
11505
      private final short _thriftId;
11506
      private final String _fieldName;
11507
 
11508
      _Fields(short thriftId, String fieldName) {
11509
        _thriftId = thriftId;
11510
        _fieldName = fieldName;
11511
      }
11512
 
11513
      public short getThriftFieldId() {
11514
        return _thriftId;
11515
      }
11516
 
11517
      public String getFieldName() {
11518
        return _fieldName;
11519
      }
11520
    }
11521
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11522
    static {
11523
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11524
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11525
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryAge_args.class, metaDataMap);
11526
    }
11527
 
11528
    public getInventoryAge_args() {
11529
    }
11530
 
11531
    /**
11532
     * Performs a deep copy on <i>other</i>.
11533
     */
11534
    public getInventoryAge_args(getInventoryAge_args other) {
11535
    }
11536
 
11537
    public getInventoryAge_args deepCopy() {
11538
      return new getInventoryAge_args(this);
11539
    }
11540
 
11541
    @Override
11542
    public void clear() {
11543
    }
11544
 
11545
    public void setFieldValue(_Fields field, Object value) {
11546
      switch (field) {
11547
      }
11548
    }
11549
 
11550
    public Object getFieldValue(_Fields field) {
11551
      switch (field) {
11552
      }
11553
      throw new IllegalStateException();
11554
    }
11555
 
11556
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11557
    public boolean isSet(_Fields field) {
11558
      if (field == null) {
11559
        throw new IllegalArgumentException();
11560
      }
11561
 
11562
      switch (field) {
11563
      }
11564
      throw new IllegalStateException();
11565
    }
11566
 
11567
    @Override
11568
    public boolean equals(Object that) {
11569
      if (that == null)
11570
        return false;
11571
      if (that instanceof getInventoryAge_args)
11572
        return this.equals((getInventoryAge_args)that);
11573
      return false;
11574
    }
11575
 
11576
    public boolean equals(getInventoryAge_args that) {
11577
      if (that == null)
11578
        return false;
11579
 
11580
      return true;
11581
    }
11582
 
11583
    @Override
11584
    public int hashCode() {
11585
      return 0;
11586
    }
11587
 
11588
    public int compareTo(getInventoryAge_args other) {
11589
      if (!getClass().equals(other.getClass())) {
11590
        return getClass().getName().compareTo(other.getClass().getName());
11591
      }
11592
 
11593
      int lastComparison = 0;
11594
      getInventoryAge_args typedOther = (getInventoryAge_args)other;
11595
 
11596
      return 0;
11597
    }
11598
 
11599
    public _Fields fieldForId(int fieldId) {
11600
      return _Fields.findByThriftId(fieldId);
11601
    }
11602
 
11603
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11604
      org.apache.thrift.protocol.TField field;
11605
      iprot.readStructBegin();
11606
      while (true)
11607
      {
11608
        field = iprot.readFieldBegin();
11609
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11610
          break;
11611
        }
11612
        switch (field.id) {
11613
          default:
11614
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11615
        }
11616
        iprot.readFieldEnd();
11617
      }
11618
      iprot.readStructEnd();
11619
      validate();
11620
    }
11621
 
11622
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11623
      validate();
11624
 
11625
      oprot.writeStructBegin(STRUCT_DESC);
11626
      oprot.writeFieldStop();
11627
      oprot.writeStructEnd();
11628
    }
11629
 
11630
    @Override
11631
    public String toString() {
11632
      StringBuilder sb = new StringBuilder("getInventoryAge_args(");
11633
      boolean first = true;
11634
 
11635
      sb.append(")");
11636
      return sb.toString();
11637
    }
11638
 
11639
    public void validate() throws org.apache.thrift.TException {
11640
      // check for required fields
11641
    }
11642
 
11643
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11644
      try {
11645
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11646
      } catch (org.apache.thrift.TException te) {
11647
        throw new java.io.IOException(te);
11648
      }
11649
    }
11650
 
11651
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11652
      try {
11653
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11654
      } catch (org.apache.thrift.TException te) {
11655
        throw new java.io.IOException(te);
11656
      }
11657
    }
11658
 
11659
  }
11660
 
11661
  public static class getInventoryAge_result implements org.apache.thrift.TBase<getInventoryAge_result, getInventoryAge_result._Fields>, java.io.Serializable, Cloneable   {
11662
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryAge_result");
11663
 
11664
    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);
11665
 
11666
    private List<InventoryAge> success; // required
11667
 
11668
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11669
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11670
      SUCCESS((short)0, "success");
11671
 
11672
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11673
 
11674
      static {
11675
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11676
          byName.put(field.getFieldName(), field);
11677
        }
11678
      }
11679
 
11680
      /**
11681
       * Find the _Fields constant that matches fieldId, or null if its not found.
11682
       */
11683
      public static _Fields findByThriftId(int fieldId) {
11684
        switch(fieldId) {
11685
          case 0: // SUCCESS
11686
            return SUCCESS;
11687
          default:
11688
            return null;
11689
        }
11690
      }
11691
 
11692
      /**
11693
       * Find the _Fields constant that matches fieldId, throwing an exception
11694
       * if it is not found.
11695
       */
11696
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11697
        _Fields fields = findByThriftId(fieldId);
11698
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11699
        return fields;
11700
      }
11701
 
11702
      /**
11703
       * Find the _Fields constant that matches name, or null if its not found.
11704
       */
11705
      public static _Fields findByName(String name) {
11706
        return byName.get(name);
11707
      }
11708
 
11709
      private final short _thriftId;
11710
      private final String _fieldName;
11711
 
11712
      _Fields(short thriftId, String fieldName) {
11713
        _thriftId = thriftId;
11714
        _fieldName = fieldName;
11715
      }
11716
 
11717
      public short getThriftFieldId() {
11718
        return _thriftId;
11719
      }
11720
 
11721
      public String getFieldName() {
11722
        return _fieldName;
11723
      }
11724
    }
11725
 
11726
    // isset id assignments
11727
 
11728
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11729
    static {
11730
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11731
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11732
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
11733
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryAge.class))));
11734
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11735
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryAge_result.class, metaDataMap);
11736
    }
11737
 
11738
    public getInventoryAge_result() {
11739
    }
11740
 
11741
    public getInventoryAge_result(
11742
      List<InventoryAge> success)
11743
    {
11744
      this();
11745
      this.success = success;
11746
    }
11747
 
11748
    /**
11749
     * Performs a deep copy on <i>other</i>.
11750
     */
11751
    public getInventoryAge_result(getInventoryAge_result other) {
11752
      if (other.isSetSuccess()) {
11753
        List<InventoryAge> __this__success = new ArrayList<InventoryAge>();
11754
        for (InventoryAge other_element : other.success) {
11755
          __this__success.add(new InventoryAge(other_element));
11756
        }
11757
        this.success = __this__success;
11758
      }
11759
    }
11760
 
11761
    public getInventoryAge_result deepCopy() {
11762
      return new getInventoryAge_result(this);
11763
    }
11764
 
11765
    @Override
11766
    public void clear() {
11767
      this.success = null;
11768
    }
11769
 
11770
    public int getSuccessSize() {
11771
      return (this.success == null) ? 0 : this.success.size();
11772
    }
11773
 
11774
    public java.util.Iterator<InventoryAge> getSuccessIterator() {
11775
      return (this.success == null) ? null : this.success.iterator();
11776
    }
11777
 
11778
    public void addToSuccess(InventoryAge elem) {
11779
      if (this.success == null) {
11780
        this.success = new ArrayList<InventoryAge>();
11781
      }
11782
      this.success.add(elem);
11783
    }
11784
 
11785
    public List<InventoryAge> getSuccess() {
11786
      return this.success;
11787
    }
11788
 
11789
    public void setSuccess(List<InventoryAge> success) {
11790
      this.success = success;
11791
    }
11792
 
11793
    public void unsetSuccess() {
11794
      this.success = null;
11795
    }
11796
 
11797
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
11798
    public boolean isSetSuccess() {
11799
      return this.success != null;
11800
    }
11801
 
11802
    public void setSuccessIsSet(boolean value) {
11803
      if (!value) {
11804
        this.success = null;
11805
      }
11806
    }
11807
 
11808
    public void setFieldValue(_Fields field, Object value) {
11809
      switch (field) {
11810
      case SUCCESS:
11811
        if (value == null) {
11812
          unsetSuccess();
11813
        } else {
11814
          setSuccess((List<InventoryAge>)value);
11815
        }
11816
        break;
11817
 
11818
      }
11819
    }
11820
 
11821
    public Object getFieldValue(_Fields field) {
11822
      switch (field) {
11823
      case SUCCESS:
11824
        return getSuccess();
11825
 
11826
      }
11827
      throw new IllegalStateException();
11828
    }
11829
 
11830
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11831
    public boolean isSet(_Fields field) {
11832
      if (field == null) {
11833
        throw new IllegalArgumentException();
11834
      }
11835
 
11836
      switch (field) {
11837
      case SUCCESS:
11838
        return isSetSuccess();
11839
      }
11840
      throw new IllegalStateException();
11841
    }
11842
 
11843
    @Override
11844
    public boolean equals(Object that) {
11845
      if (that == null)
11846
        return false;
11847
      if (that instanceof getInventoryAge_result)
11848
        return this.equals((getInventoryAge_result)that);
11849
      return false;
11850
    }
11851
 
11852
    public boolean equals(getInventoryAge_result that) {
11853
      if (that == null)
11854
        return false;
11855
 
11856
      boolean this_present_success = true && this.isSetSuccess();
11857
      boolean that_present_success = true && that.isSetSuccess();
11858
      if (this_present_success || that_present_success) {
11859
        if (!(this_present_success && that_present_success))
11860
          return false;
11861
        if (!this.success.equals(that.success))
11862
          return false;
11863
      }
11864
 
11865
      return true;
11866
    }
11867
 
11868
    @Override
11869
    public int hashCode() {
11870
      return 0;
11871
    }
11872
 
11873
    public int compareTo(getInventoryAge_result other) {
11874
      if (!getClass().equals(other.getClass())) {
11875
        return getClass().getName().compareTo(other.getClass().getName());
11876
      }
11877
 
11878
      int lastComparison = 0;
11879
      getInventoryAge_result typedOther = (getInventoryAge_result)other;
11880
 
11881
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
11882
      if (lastComparison != 0) {
11883
        return lastComparison;
11884
      }
11885
      if (isSetSuccess()) {
11886
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
11887
        if (lastComparison != 0) {
11888
          return lastComparison;
11889
        }
11890
      }
11891
      return 0;
11892
    }
11893
 
11894
    public _Fields fieldForId(int fieldId) {
11895
      return _Fields.findByThriftId(fieldId);
11896
    }
11897
 
11898
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11899
      org.apache.thrift.protocol.TField field;
11900
      iprot.readStructBegin();
11901
      while (true)
11902
      {
11903
        field = iprot.readFieldBegin();
11904
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11905
          break;
11906
        }
11907
        switch (field.id) {
11908
          case 0: // SUCCESS
11909
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
11910
              {
11911
                org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
11912
                this.success = new ArrayList<InventoryAge>(_list20.size);
11913
                for (int _i21 = 0; _i21 < _list20.size; ++_i21)
11914
                {
11915
                  InventoryAge _elem22; // required
11916
                  _elem22 = new InventoryAge();
11917
                  _elem22.read(iprot);
11918
                  this.success.add(_elem22);
11919
                }
11920
                iprot.readListEnd();
11921
              }
11922
            } else { 
11923
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11924
            }
11925
            break;
11926
          default:
11927
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11928
        }
11929
        iprot.readFieldEnd();
11930
      }
11931
      iprot.readStructEnd();
11932
      validate();
11933
    }
11934
 
11935
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11936
      oprot.writeStructBegin(STRUCT_DESC);
11937
 
11938
      if (this.isSetSuccess()) {
11939
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11940
        {
11941
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
11942
          for (InventoryAge _iter23 : this.success)
11943
          {
11944
            _iter23.write(oprot);
11945
          }
11946
          oprot.writeListEnd();
11947
        }
11948
        oprot.writeFieldEnd();
11949
      }
11950
      oprot.writeFieldStop();
11951
      oprot.writeStructEnd();
11952
    }
11953
 
11954
    @Override
11955
    public String toString() {
11956
      StringBuilder sb = new StringBuilder("getInventoryAge_result(");
11957
      boolean first = true;
11958
 
11959
      sb.append("success:");
11960
      if (this.success == null) {
11961
        sb.append("null");
11962
      } else {
11963
        sb.append(this.success);
11964
      }
11965
      first = false;
11966
      sb.append(")");
11967
      return sb.toString();
11968
    }
11969
 
11970
    public void validate() throws org.apache.thrift.TException {
11971
      // check for required fields
11972
    }
11973
 
11974
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11975
      try {
11976
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11977
      } catch (org.apache.thrift.TException te) {
11978
        throw new java.io.IOException(te);
11979
      }
11980
    }
11981
 
11982
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11983
      try {
11984
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11985
      } catch (org.apache.thrift.TException te) {
11986
        throw new java.io.IOException(te);
11987
      }
11988
    }
11989
 
11990
  }
11991
 
6322 amar.kumar 11992
  public static class getInventoryScansForItem_args implements org.apache.thrift.TBase<getInventoryScansForItem_args, getInventoryScansForItem_args._Fields>, java.io.Serializable, Cloneable   {
11993
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryScansForItem_args");
11994
 
11995
    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);
11996
    private static final org.apache.thrift.protocol.TField FROM_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("fromDate", org.apache.thrift.protocol.TType.I64, (short)2);
11997
    private static final org.apache.thrift.protocol.TField TO_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("toDate", org.apache.thrift.protocol.TType.I64, (short)3);
11998
 
11999
    private long itemId; // required
12000
    private long fromDate; // required
12001
    private long toDate; // required
12002
 
12003
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12004
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12005
      ITEM_ID((short)1, "itemId"),
12006
      FROM_DATE((short)2, "fromDate"),
12007
      TO_DATE((short)3, "toDate");
12008
 
12009
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12010
 
12011
      static {
12012
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12013
          byName.put(field.getFieldName(), field);
12014
        }
12015
      }
12016
 
12017
      /**
12018
       * Find the _Fields constant that matches fieldId, or null if its not found.
12019
       */
12020
      public static _Fields findByThriftId(int fieldId) {
12021
        switch(fieldId) {
12022
          case 1: // ITEM_ID
12023
            return ITEM_ID;
12024
          case 2: // FROM_DATE
12025
            return FROM_DATE;
12026
          case 3: // TO_DATE
12027
            return TO_DATE;
12028
          default:
12029
            return null;
12030
        }
12031
      }
12032
 
12033
      /**
12034
       * Find the _Fields constant that matches fieldId, throwing an exception
12035
       * if it is not found.
12036
       */
12037
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12038
        _Fields fields = findByThriftId(fieldId);
12039
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12040
        return fields;
12041
      }
12042
 
12043
      /**
12044
       * Find the _Fields constant that matches name, or null if its not found.
12045
       */
12046
      public static _Fields findByName(String name) {
12047
        return byName.get(name);
12048
      }
12049
 
12050
      private final short _thriftId;
12051
      private final String _fieldName;
12052
 
12053
      _Fields(short thriftId, String fieldName) {
12054
        _thriftId = thriftId;
12055
        _fieldName = fieldName;
12056
      }
12057
 
12058
      public short getThriftFieldId() {
12059
        return _thriftId;
12060
      }
12061
 
12062
      public String getFieldName() {
12063
        return _fieldName;
12064
      }
12065
    }
12066
 
12067
    // isset id assignments
12068
    private static final int __ITEMID_ISSET_ID = 0;
12069
    private static final int __FROMDATE_ISSET_ID = 1;
12070
    private static final int __TODATE_ISSET_ID = 2;
12071
    private BitSet __isset_bit_vector = new BitSet(3);
12072
 
12073
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12074
    static {
12075
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12076
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12077
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12078
      tmpMap.put(_Fields.FROM_DATE, new org.apache.thrift.meta_data.FieldMetaData("fromDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12079
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12080
      tmpMap.put(_Fields.TO_DATE, new org.apache.thrift.meta_data.FieldMetaData("toDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12081
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12082
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12083
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryScansForItem_args.class, metaDataMap);
12084
    }
12085
 
12086
    public getInventoryScansForItem_args() {
12087
    }
12088
 
12089
    public getInventoryScansForItem_args(
12090
      long itemId,
12091
      long fromDate,
12092
      long toDate)
12093
    {
12094
      this();
12095
      this.itemId = itemId;
12096
      setItemIdIsSet(true);
12097
      this.fromDate = fromDate;
12098
      setFromDateIsSet(true);
12099
      this.toDate = toDate;
12100
      setToDateIsSet(true);
12101
    }
12102
 
12103
    /**
12104
     * Performs a deep copy on <i>other</i>.
12105
     */
12106
    public getInventoryScansForItem_args(getInventoryScansForItem_args other) {
12107
      __isset_bit_vector.clear();
12108
      __isset_bit_vector.or(other.__isset_bit_vector);
12109
      this.itemId = other.itemId;
12110
      this.fromDate = other.fromDate;
12111
      this.toDate = other.toDate;
12112
    }
12113
 
12114
    public getInventoryScansForItem_args deepCopy() {
12115
      return new getInventoryScansForItem_args(this);
12116
    }
12117
 
12118
    @Override
12119
    public void clear() {
12120
      setItemIdIsSet(false);
12121
      this.itemId = 0;
12122
      setFromDateIsSet(false);
12123
      this.fromDate = 0;
12124
      setToDateIsSet(false);
12125
      this.toDate = 0;
12126
    }
12127
 
12128
    public long getItemId() {
12129
      return this.itemId;
12130
    }
12131
 
12132
    public void setItemId(long itemId) {
12133
      this.itemId = itemId;
12134
      setItemIdIsSet(true);
12135
    }
12136
 
12137
    public void unsetItemId() {
12138
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
12139
    }
12140
 
12141
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
12142
    public boolean isSetItemId() {
12143
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
12144
    }
12145
 
12146
    public void setItemIdIsSet(boolean value) {
12147
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
12148
    }
12149
 
12150
    public long getFromDate() {
12151
      return this.fromDate;
12152
    }
12153
 
12154
    public void setFromDate(long fromDate) {
12155
      this.fromDate = fromDate;
12156
      setFromDateIsSet(true);
12157
    }
12158
 
12159
    public void unsetFromDate() {
12160
      __isset_bit_vector.clear(__FROMDATE_ISSET_ID);
12161
    }
12162
 
12163
    /** Returns true if field fromDate is set (has been assigned a value) and false otherwise */
12164
    public boolean isSetFromDate() {
12165
      return __isset_bit_vector.get(__FROMDATE_ISSET_ID);
12166
    }
12167
 
12168
    public void setFromDateIsSet(boolean value) {
12169
      __isset_bit_vector.set(__FROMDATE_ISSET_ID, value);
12170
    }
12171
 
12172
    public long getToDate() {
12173
      return this.toDate;
12174
    }
12175
 
12176
    public void setToDate(long toDate) {
12177
      this.toDate = toDate;
12178
      setToDateIsSet(true);
12179
    }
12180
 
12181
    public void unsetToDate() {
12182
      __isset_bit_vector.clear(__TODATE_ISSET_ID);
12183
    }
12184
 
12185
    /** Returns true if field toDate is set (has been assigned a value) and false otherwise */
12186
    public boolean isSetToDate() {
12187
      return __isset_bit_vector.get(__TODATE_ISSET_ID);
12188
    }
12189
 
12190
    public void setToDateIsSet(boolean value) {
12191
      __isset_bit_vector.set(__TODATE_ISSET_ID, value);
12192
    }
12193
 
12194
    public void setFieldValue(_Fields field, Object value) {
12195
      switch (field) {
12196
      case ITEM_ID:
12197
        if (value == null) {
12198
          unsetItemId();
12199
        } else {
12200
          setItemId((Long)value);
12201
        }
12202
        break;
12203
 
12204
      case FROM_DATE:
12205
        if (value == null) {
12206
          unsetFromDate();
12207
        } else {
12208
          setFromDate((Long)value);
12209
        }
12210
        break;
12211
 
12212
      case TO_DATE:
12213
        if (value == null) {
12214
          unsetToDate();
12215
        } else {
12216
          setToDate((Long)value);
12217
        }
12218
        break;
12219
 
12220
      }
12221
    }
12222
 
12223
    public Object getFieldValue(_Fields field) {
12224
      switch (field) {
12225
      case ITEM_ID:
12226
        return Long.valueOf(getItemId());
12227
 
12228
      case FROM_DATE:
12229
        return Long.valueOf(getFromDate());
12230
 
12231
      case TO_DATE:
12232
        return Long.valueOf(getToDate());
12233
 
12234
      }
12235
      throw new IllegalStateException();
12236
    }
12237
 
12238
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12239
    public boolean isSet(_Fields field) {
12240
      if (field == null) {
12241
        throw new IllegalArgumentException();
12242
      }
12243
 
12244
      switch (field) {
12245
      case ITEM_ID:
12246
        return isSetItemId();
12247
      case FROM_DATE:
12248
        return isSetFromDate();
12249
      case TO_DATE:
12250
        return isSetToDate();
12251
      }
12252
      throw new IllegalStateException();
12253
    }
12254
 
12255
    @Override
12256
    public boolean equals(Object that) {
12257
      if (that == null)
12258
        return false;
12259
      if (that instanceof getInventoryScansForItem_args)
12260
        return this.equals((getInventoryScansForItem_args)that);
12261
      return false;
12262
    }
12263
 
12264
    public boolean equals(getInventoryScansForItem_args that) {
12265
      if (that == null)
12266
        return false;
12267
 
12268
      boolean this_present_itemId = true;
12269
      boolean that_present_itemId = true;
12270
      if (this_present_itemId || that_present_itemId) {
12271
        if (!(this_present_itemId && that_present_itemId))
12272
          return false;
12273
        if (this.itemId != that.itemId)
12274
          return false;
12275
      }
12276
 
12277
      boolean this_present_fromDate = true;
12278
      boolean that_present_fromDate = true;
12279
      if (this_present_fromDate || that_present_fromDate) {
12280
        if (!(this_present_fromDate && that_present_fromDate))
12281
          return false;
12282
        if (this.fromDate != that.fromDate)
12283
          return false;
12284
      }
12285
 
12286
      boolean this_present_toDate = true;
12287
      boolean that_present_toDate = true;
12288
      if (this_present_toDate || that_present_toDate) {
12289
        if (!(this_present_toDate && that_present_toDate))
12290
          return false;
12291
        if (this.toDate != that.toDate)
12292
          return false;
12293
      }
12294
 
12295
      return true;
12296
    }
12297
 
12298
    @Override
12299
    public int hashCode() {
12300
      return 0;
12301
    }
12302
 
12303
    public int compareTo(getInventoryScansForItem_args other) {
12304
      if (!getClass().equals(other.getClass())) {
12305
        return getClass().getName().compareTo(other.getClass().getName());
12306
      }
12307
 
12308
      int lastComparison = 0;
12309
      getInventoryScansForItem_args typedOther = (getInventoryScansForItem_args)other;
12310
 
12311
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
12312
      if (lastComparison != 0) {
12313
        return lastComparison;
12314
      }
12315
      if (isSetItemId()) {
12316
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
12317
        if (lastComparison != 0) {
12318
          return lastComparison;
12319
        }
12320
      }
12321
      lastComparison = Boolean.valueOf(isSetFromDate()).compareTo(typedOther.isSetFromDate());
12322
      if (lastComparison != 0) {
12323
        return lastComparison;
12324
      }
12325
      if (isSetFromDate()) {
12326
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fromDate, typedOther.fromDate);
12327
        if (lastComparison != 0) {
12328
          return lastComparison;
12329
        }
12330
      }
12331
      lastComparison = Boolean.valueOf(isSetToDate()).compareTo(typedOther.isSetToDate());
12332
      if (lastComparison != 0) {
12333
        return lastComparison;
12334
      }
12335
      if (isSetToDate()) {
12336
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.toDate, typedOther.toDate);
12337
        if (lastComparison != 0) {
12338
          return lastComparison;
12339
        }
12340
      }
12341
      return 0;
12342
    }
12343
 
12344
    public _Fields fieldForId(int fieldId) {
12345
      return _Fields.findByThriftId(fieldId);
12346
    }
12347
 
12348
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12349
      org.apache.thrift.protocol.TField field;
12350
      iprot.readStructBegin();
12351
      while (true)
12352
      {
12353
        field = iprot.readFieldBegin();
12354
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12355
          break;
12356
        }
12357
        switch (field.id) {
12358
          case 1: // ITEM_ID
12359
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12360
              this.itemId = iprot.readI64();
12361
              setItemIdIsSet(true);
12362
            } else { 
12363
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12364
            }
12365
            break;
12366
          case 2: // FROM_DATE
12367
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12368
              this.fromDate = iprot.readI64();
12369
              setFromDateIsSet(true);
12370
            } else { 
12371
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12372
            }
12373
            break;
12374
          case 3: // TO_DATE
12375
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12376
              this.toDate = iprot.readI64();
12377
              setToDateIsSet(true);
12378
            } else { 
12379
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12380
            }
12381
            break;
12382
          default:
12383
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12384
        }
12385
        iprot.readFieldEnd();
12386
      }
12387
      iprot.readStructEnd();
12388
      validate();
12389
    }
12390
 
12391
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12392
      validate();
12393
 
12394
      oprot.writeStructBegin(STRUCT_DESC);
12395
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
12396
      oprot.writeI64(this.itemId);
12397
      oprot.writeFieldEnd();
12398
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
12399
      oprot.writeI64(this.fromDate);
12400
      oprot.writeFieldEnd();
12401
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
12402
      oprot.writeI64(this.toDate);
12403
      oprot.writeFieldEnd();
12404
      oprot.writeFieldStop();
12405
      oprot.writeStructEnd();
12406
    }
12407
 
12408
    @Override
12409
    public String toString() {
12410
      StringBuilder sb = new StringBuilder("getInventoryScansForItem_args(");
12411
      boolean first = true;
12412
 
12413
      sb.append("itemId:");
12414
      sb.append(this.itemId);
12415
      first = false;
12416
      if (!first) sb.append(", ");
12417
      sb.append("fromDate:");
12418
      sb.append(this.fromDate);
12419
      first = false;
12420
      if (!first) sb.append(", ");
12421
      sb.append("toDate:");
12422
      sb.append(this.toDate);
12423
      first = false;
12424
      sb.append(")");
12425
      return sb.toString();
12426
    }
12427
 
12428
    public void validate() throws org.apache.thrift.TException {
12429
      // check for required fields
12430
    }
12431
 
12432
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12433
      try {
12434
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12435
      } catch (org.apache.thrift.TException te) {
12436
        throw new java.io.IOException(te);
12437
      }
12438
    }
12439
 
12440
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12441
      try {
12442
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12443
      } catch (org.apache.thrift.TException te) {
12444
        throw new java.io.IOException(te);
12445
      }
12446
    }
12447
 
12448
  }
12449
 
12450
  public static class getInventoryScansForItem_result implements org.apache.thrift.TBase<getInventoryScansForItem_result, getInventoryScansForItem_result._Fields>, java.io.Serializable, Cloneable   {
12451
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryScansForItem_result");
12452
 
12453
    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);
12454
 
12455
    private List<Scan> success; // required
12456
 
12457
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12458
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12459
      SUCCESS((short)0, "success");
12460
 
12461
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12462
 
12463
      static {
12464
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12465
          byName.put(field.getFieldName(), field);
12466
        }
12467
      }
12468
 
12469
      /**
12470
       * Find the _Fields constant that matches fieldId, or null if its not found.
12471
       */
12472
      public static _Fields findByThriftId(int fieldId) {
12473
        switch(fieldId) {
12474
          case 0: // SUCCESS
12475
            return SUCCESS;
12476
          default:
12477
            return null;
12478
        }
12479
      }
12480
 
12481
      /**
12482
       * Find the _Fields constant that matches fieldId, throwing an exception
12483
       * if it is not found.
12484
       */
12485
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12486
        _Fields fields = findByThriftId(fieldId);
12487
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12488
        return fields;
12489
      }
12490
 
12491
      /**
12492
       * Find the _Fields constant that matches name, or null if its not found.
12493
       */
12494
      public static _Fields findByName(String name) {
12495
        return byName.get(name);
12496
      }
12497
 
12498
      private final short _thriftId;
12499
      private final String _fieldName;
12500
 
12501
      _Fields(short thriftId, String fieldName) {
12502
        _thriftId = thriftId;
12503
        _fieldName = fieldName;
12504
      }
12505
 
12506
      public short getThriftFieldId() {
12507
        return _thriftId;
12508
      }
12509
 
12510
      public String getFieldName() {
12511
        return _fieldName;
12512
      }
12513
    }
12514
 
12515
    // isset id assignments
12516
 
12517
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12518
    static {
12519
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12520
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12521
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
12522
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Scan.class))));
12523
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12524
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryScansForItem_result.class, metaDataMap);
12525
    }
12526
 
12527
    public getInventoryScansForItem_result() {
12528
    }
12529
 
12530
    public getInventoryScansForItem_result(
12531
      List<Scan> success)
12532
    {
12533
      this();
12534
      this.success = success;
12535
    }
12536
 
12537
    /**
12538
     * Performs a deep copy on <i>other</i>.
12539
     */
12540
    public getInventoryScansForItem_result(getInventoryScansForItem_result other) {
12541
      if (other.isSetSuccess()) {
12542
        List<Scan> __this__success = new ArrayList<Scan>();
12543
        for (Scan other_element : other.success) {
12544
          __this__success.add(new Scan(other_element));
12545
        }
12546
        this.success = __this__success;
12547
      }
12548
    }
12549
 
12550
    public getInventoryScansForItem_result deepCopy() {
12551
      return new getInventoryScansForItem_result(this);
12552
    }
12553
 
12554
    @Override
12555
    public void clear() {
12556
      this.success = null;
12557
    }
12558
 
12559
    public int getSuccessSize() {
12560
      return (this.success == null) ? 0 : this.success.size();
12561
    }
12562
 
12563
    public java.util.Iterator<Scan> getSuccessIterator() {
12564
      return (this.success == null) ? null : this.success.iterator();
12565
    }
12566
 
12567
    public void addToSuccess(Scan elem) {
12568
      if (this.success == null) {
12569
        this.success = new ArrayList<Scan>();
12570
      }
12571
      this.success.add(elem);
12572
    }
12573
 
12574
    public List<Scan> getSuccess() {
12575
      return this.success;
12576
    }
12577
 
12578
    public void setSuccess(List<Scan> success) {
12579
      this.success = success;
12580
    }
12581
 
12582
    public void unsetSuccess() {
12583
      this.success = null;
12584
    }
12585
 
12586
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
12587
    public boolean isSetSuccess() {
12588
      return this.success != null;
12589
    }
12590
 
12591
    public void setSuccessIsSet(boolean value) {
12592
      if (!value) {
12593
        this.success = null;
12594
      }
12595
    }
12596
 
12597
    public void setFieldValue(_Fields field, Object value) {
12598
      switch (field) {
12599
      case SUCCESS:
12600
        if (value == null) {
12601
          unsetSuccess();
12602
        } else {
12603
          setSuccess((List<Scan>)value);
12604
        }
12605
        break;
12606
 
12607
      }
12608
    }
12609
 
12610
    public Object getFieldValue(_Fields field) {
12611
      switch (field) {
12612
      case SUCCESS:
12613
        return getSuccess();
12614
 
12615
      }
12616
      throw new IllegalStateException();
12617
    }
12618
 
12619
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12620
    public boolean isSet(_Fields field) {
12621
      if (field == null) {
12622
        throw new IllegalArgumentException();
12623
      }
12624
 
12625
      switch (field) {
12626
      case SUCCESS:
12627
        return isSetSuccess();
12628
      }
12629
      throw new IllegalStateException();
12630
    }
12631
 
12632
    @Override
12633
    public boolean equals(Object that) {
12634
      if (that == null)
12635
        return false;
12636
      if (that instanceof getInventoryScansForItem_result)
12637
        return this.equals((getInventoryScansForItem_result)that);
12638
      return false;
12639
    }
12640
 
12641
    public boolean equals(getInventoryScansForItem_result that) {
12642
      if (that == null)
12643
        return false;
12644
 
12645
      boolean this_present_success = true && this.isSetSuccess();
12646
      boolean that_present_success = true && that.isSetSuccess();
12647
      if (this_present_success || that_present_success) {
12648
        if (!(this_present_success && that_present_success))
12649
          return false;
12650
        if (!this.success.equals(that.success))
12651
          return false;
12652
      }
12653
 
12654
      return true;
12655
    }
12656
 
12657
    @Override
12658
    public int hashCode() {
12659
      return 0;
12660
    }
12661
 
12662
    public int compareTo(getInventoryScansForItem_result other) {
12663
      if (!getClass().equals(other.getClass())) {
12664
        return getClass().getName().compareTo(other.getClass().getName());
12665
      }
12666
 
12667
      int lastComparison = 0;
12668
      getInventoryScansForItem_result typedOther = (getInventoryScansForItem_result)other;
12669
 
12670
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
12671
      if (lastComparison != 0) {
12672
        return lastComparison;
12673
      }
12674
      if (isSetSuccess()) {
12675
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
12676
        if (lastComparison != 0) {
12677
          return lastComparison;
12678
        }
12679
      }
12680
      return 0;
12681
    }
12682
 
12683
    public _Fields fieldForId(int fieldId) {
12684
      return _Fields.findByThriftId(fieldId);
12685
    }
12686
 
12687
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12688
      org.apache.thrift.protocol.TField field;
12689
      iprot.readStructBegin();
12690
      while (true)
12691
      {
12692
        field = iprot.readFieldBegin();
12693
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12694
          break;
12695
        }
12696
        switch (field.id) {
12697
          case 0: // SUCCESS
12698
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
12699
              {
12700
                org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
12701
                this.success = new ArrayList<Scan>(_list24.size);
12702
                for (int _i25 = 0; _i25 < _list24.size; ++_i25)
12703
                {
12704
                  Scan _elem26; // required
12705
                  _elem26 = new Scan();
12706
                  _elem26.read(iprot);
12707
                  this.success.add(_elem26);
12708
                }
12709
                iprot.readListEnd();
12710
              }
12711
            } else { 
12712
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12713
            }
12714
            break;
12715
          default:
12716
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12717
        }
12718
        iprot.readFieldEnd();
12719
      }
12720
      iprot.readStructEnd();
12721
      validate();
12722
    }
12723
 
12724
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12725
      oprot.writeStructBegin(STRUCT_DESC);
12726
 
12727
      if (this.isSetSuccess()) {
12728
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12729
        {
12730
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
12731
          for (Scan _iter27 : this.success)
12732
          {
12733
            _iter27.write(oprot);
12734
          }
12735
          oprot.writeListEnd();
12736
        }
12737
        oprot.writeFieldEnd();
12738
      }
12739
      oprot.writeFieldStop();
12740
      oprot.writeStructEnd();
12741
    }
12742
 
12743
    @Override
12744
    public String toString() {
12745
      StringBuilder sb = new StringBuilder("getInventoryScansForItem_result(");
12746
      boolean first = true;
12747
 
12748
      sb.append("success:");
12749
      if (this.success == null) {
12750
        sb.append("null");
12751
      } else {
12752
        sb.append(this.success);
12753
      }
12754
      first = false;
12755
      sb.append(")");
12756
      return sb.toString();
12757
    }
12758
 
12759
    public void validate() throws org.apache.thrift.TException {
12760
      // check for required fields
12761
    }
12762
 
12763
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12764
      try {
12765
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12766
      } catch (org.apache.thrift.TException te) {
12767
        throw new java.io.IOException(te);
12768
      }
12769
    }
12770
 
12771
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12772
      try {
12773
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12774
      } catch (org.apache.thrift.TException te) {
12775
        throw new java.io.IOException(te);
12776
      }
12777
    }
12778
 
12779
  }
12780
 
12781
  public static class getScanRecordsForSerialNumber_args implements org.apache.thrift.TBase<getScanRecordsForSerialNumber_args, getScanRecordsForSerialNumber_args._Fields>, java.io.Serializable, Cloneable   {
12782
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScanRecordsForSerialNumber_args");
12783
 
12784
    private static final org.apache.thrift.protocol.TField SERIAL_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("serialNumber", org.apache.thrift.protocol.TType.I64, (short)1);
12785
 
12786
    private long serialNumber; // required
12787
 
12788
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12789
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12790
      SERIAL_NUMBER((short)1, "serialNumber");
12791
 
12792
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12793
 
12794
      static {
12795
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12796
          byName.put(field.getFieldName(), field);
12797
        }
12798
      }
12799
 
12800
      /**
12801
       * Find the _Fields constant that matches fieldId, or null if its not found.
12802
       */
12803
      public static _Fields findByThriftId(int fieldId) {
12804
        switch(fieldId) {
12805
          case 1: // SERIAL_NUMBER
12806
            return SERIAL_NUMBER;
12807
          default:
12808
            return null;
12809
        }
12810
      }
12811
 
12812
      /**
12813
       * Find the _Fields constant that matches fieldId, throwing an exception
12814
       * if it is not found.
12815
       */
12816
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12817
        _Fields fields = findByThriftId(fieldId);
12818
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12819
        return fields;
12820
      }
12821
 
12822
      /**
12823
       * Find the _Fields constant that matches name, or null if its not found.
12824
       */
12825
      public static _Fields findByName(String name) {
12826
        return byName.get(name);
12827
      }
12828
 
12829
      private final short _thriftId;
12830
      private final String _fieldName;
12831
 
12832
      _Fields(short thriftId, String fieldName) {
12833
        _thriftId = thriftId;
12834
        _fieldName = fieldName;
12835
      }
12836
 
12837
      public short getThriftFieldId() {
12838
        return _thriftId;
12839
      }
12840
 
12841
      public String getFieldName() {
12842
        return _fieldName;
12843
      }
12844
    }
12845
 
12846
    // isset id assignments
12847
    private static final int __SERIALNUMBER_ISSET_ID = 0;
12848
    private BitSet __isset_bit_vector = new BitSet(1);
12849
 
12850
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12851
    static {
12852
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12853
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12854
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12855
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12856
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScanRecordsForSerialNumber_args.class, metaDataMap);
12857
    }
12858
 
12859
    public getScanRecordsForSerialNumber_args() {
12860
    }
12861
 
12862
    public getScanRecordsForSerialNumber_args(
12863
      long serialNumber)
12864
    {
12865
      this();
12866
      this.serialNumber = serialNumber;
12867
      setSerialNumberIsSet(true);
12868
    }
12869
 
12870
    /**
12871
     * Performs a deep copy on <i>other</i>.
12872
     */
12873
    public getScanRecordsForSerialNumber_args(getScanRecordsForSerialNumber_args other) {
12874
      __isset_bit_vector.clear();
12875
      __isset_bit_vector.or(other.__isset_bit_vector);
12876
      this.serialNumber = other.serialNumber;
12877
    }
12878
 
12879
    public getScanRecordsForSerialNumber_args deepCopy() {
12880
      return new getScanRecordsForSerialNumber_args(this);
12881
    }
12882
 
12883
    @Override
12884
    public void clear() {
12885
      setSerialNumberIsSet(false);
12886
      this.serialNumber = 0;
12887
    }
12888
 
12889
    public long getSerialNumber() {
12890
      return this.serialNumber;
12891
    }
12892
 
12893
    public void setSerialNumber(long serialNumber) {
12894
      this.serialNumber = serialNumber;
12895
      setSerialNumberIsSet(true);
12896
    }
12897
 
12898
    public void unsetSerialNumber() {
12899
      __isset_bit_vector.clear(__SERIALNUMBER_ISSET_ID);
12900
    }
12901
 
12902
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
12903
    public boolean isSetSerialNumber() {
12904
      return __isset_bit_vector.get(__SERIALNUMBER_ISSET_ID);
12905
    }
12906
 
12907
    public void setSerialNumberIsSet(boolean value) {
12908
      __isset_bit_vector.set(__SERIALNUMBER_ISSET_ID, value);
12909
    }
12910
 
12911
    public void setFieldValue(_Fields field, Object value) {
12912
      switch (field) {
12913
      case SERIAL_NUMBER:
12914
        if (value == null) {
12915
          unsetSerialNumber();
12916
        } else {
12917
          setSerialNumber((Long)value);
12918
        }
12919
        break;
12920
 
12921
      }
12922
    }
12923
 
12924
    public Object getFieldValue(_Fields field) {
12925
      switch (field) {
12926
      case SERIAL_NUMBER:
12927
        return Long.valueOf(getSerialNumber());
12928
 
12929
      }
12930
      throw new IllegalStateException();
12931
    }
12932
 
12933
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12934
    public boolean isSet(_Fields field) {
12935
      if (field == null) {
12936
        throw new IllegalArgumentException();
12937
      }
12938
 
12939
      switch (field) {
12940
      case SERIAL_NUMBER:
12941
        return isSetSerialNumber();
12942
      }
12943
      throw new IllegalStateException();
12944
    }
12945
 
12946
    @Override
12947
    public boolean equals(Object that) {
12948
      if (that == null)
12949
        return false;
12950
      if (that instanceof getScanRecordsForSerialNumber_args)
12951
        return this.equals((getScanRecordsForSerialNumber_args)that);
12952
      return false;
12953
    }
12954
 
12955
    public boolean equals(getScanRecordsForSerialNumber_args that) {
12956
      if (that == null)
12957
        return false;
12958
 
12959
      boolean this_present_serialNumber = true;
12960
      boolean that_present_serialNumber = true;
12961
      if (this_present_serialNumber || that_present_serialNumber) {
12962
        if (!(this_present_serialNumber && that_present_serialNumber))
12963
          return false;
12964
        if (this.serialNumber != that.serialNumber)
12965
          return false;
12966
      }
12967
 
12968
      return true;
12969
    }
12970
 
12971
    @Override
12972
    public int hashCode() {
12973
      return 0;
12974
    }
12975
 
12976
    public int compareTo(getScanRecordsForSerialNumber_args other) {
12977
      if (!getClass().equals(other.getClass())) {
12978
        return getClass().getName().compareTo(other.getClass().getName());
12979
      }
12980
 
12981
      int lastComparison = 0;
12982
      getScanRecordsForSerialNumber_args typedOther = (getScanRecordsForSerialNumber_args)other;
12983
 
12984
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
12985
      if (lastComparison != 0) {
12986
        return lastComparison;
12987
      }
12988
      if (isSetSerialNumber()) {
12989
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
12990
        if (lastComparison != 0) {
12991
          return lastComparison;
12992
        }
12993
      }
12994
      return 0;
12995
    }
12996
 
12997
    public _Fields fieldForId(int fieldId) {
12998
      return _Fields.findByThriftId(fieldId);
12999
    }
13000
 
13001
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13002
      org.apache.thrift.protocol.TField field;
13003
      iprot.readStructBegin();
13004
      while (true)
13005
      {
13006
        field = iprot.readFieldBegin();
13007
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13008
          break;
13009
        }
13010
        switch (field.id) {
13011
          case 1: // SERIAL_NUMBER
13012
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13013
              this.serialNumber = iprot.readI64();
13014
              setSerialNumberIsSet(true);
13015
            } else { 
13016
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13017
            }
13018
            break;
13019
          default:
13020
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13021
        }
13022
        iprot.readFieldEnd();
13023
      }
13024
      iprot.readStructEnd();
13025
      validate();
13026
    }
13027
 
13028
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13029
      validate();
13030
 
13031
      oprot.writeStructBegin(STRUCT_DESC);
13032
      oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
13033
      oprot.writeI64(this.serialNumber);
13034
      oprot.writeFieldEnd();
13035
      oprot.writeFieldStop();
13036
      oprot.writeStructEnd();
13037
    }
13038
 
13039
    @Override
13040
    public String toString() {
13041
      StringBuilder sb = new StringBuilder("getScanRecordsForSerialNumber_args(");
13042
      boolean first = true;
13043
 
13044
      sb.append("serialNumber:");
13045
      sb.append(this.serialNumber);
13046
      first = false;
13047
      sb.append(")");
13048
      return sb.toString();
13049
    }
13050
 
13051
    public void validate() throws org.apache.thrift.TException {
13052
      // check for required fields
13053
    }
13054
 
13055
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13056
      try {
13057
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13058
      } catch (org.apache.thrift.TException te) {
13059
        throw new java.io.IOException(te);
13060
      }
13061
    }
13062
 
13063
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13064
      try {
13065
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
13066
        __isset_bit_vector = new BitSet(1);
13067
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13068
      } catch (org.apache.thrift.TException te) {
13069
        throw new java.io.IOException(te);
13070
      }
13071
    }
13072
 
13073
  }
13074
 
13075
  public static class getScanRecordsForSerialNumber_result implements org.apache.thrift.TBase<getScanRecordsForSerialNumber_result, getScanRecordsForSerialNumber_result._Fields>, java.io.Serializable, Cloneable   {
13076
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScanRecordsForSerialNumber_result");
13077
 
13078
    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);
13079
 
13080
    private List<Scan> success; // required
13081
 
13082
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13083
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13084
      SUCCESS((short)0, "success");
13085
 
13086
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13087
 
13088
      static {
13089
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13090
          byName.put(field.getFieldName(), field);
13091
        }
13092
      }
13093
 
13094
      /**
13095
       * Find the _Fields constant that matches fieldId, or null if its not found.
13096
       */
13097
      public static _Fields findByThriftId(int fieldId) {
13098
        switch(fieldId) {
13099
          case 0: // SUCCESS
13100
            return SUCCESS;
13101
          default:
13102
            return null;
13103
        }
13104
      }
13105
 
13106
      /**
13107
       * Find the _Fields constant that matches fieldId, throwing an exception
13108
       * if it is not found.
13109
       */
13110
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13111
        _Fields fields = findByThriftId(fieldId);
13112
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13113
        return fields;
13114
      }
13115
 
13116
      /**
13117
       * Find the _Fields constant that matches name, or null if its not found.
13118
       */
13119
      public static _Fields findByName(String name) {
13120
        return byName.get(name);
13121
      }
13122
 
13123
      private final short _thriftId;
13124
      private final String _fieldName;
13125
 
13126
      _Fields(short thriftId, String fieldName) {
13127
        _thriftId = thriftId;
13128
        _fieldName = fieldName;
13129
      }
13130
 
13131
      public short getThriftFieldId() {
13132
        return _thriftId;
13133
      }
13134
 
13135
      public String getFieldName() {
13136
        return _fieldName;
13137
      }
13138
    }
13139
 
13140
    // isset id assignments
13141
 
13142
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13143
    static {
13144
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13145
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13146
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
13147
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Scan.class))));
13148
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13149
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScanRecordsForSerialNumber_result.class, metaDataMap);
13150
    }
13151
 
13152
    public getScanRecordsForSerialNumber_result() {
13153
    }
13154
 
13155
    public getScanRecordsForSerialNumber_result(
13156
      List<Scan> success)
13157
    {
13158
      this();
13159
      this.success = success;
13160
    }
13161
 
13162
    /**
13163
     * Performs a deep copy on <i>other</i>.
13164
     */
13165
    public getScanRecordsForSerialNumber_result(getScanRecordsForSerialNumber_result other) {
13166
      if (other.isSetSuccess()) {
13167
        List<Scan> __this__success = new ArrayList<Scan>();
13168
        for (Scan other_element : other.success) {
13169
          __this__success.add(new Scan(other_element));
13170
        }
13171
        this.success = __this__success;
13172
      }
13173
    }
13174
 
13175
    public getScanRecordsForSerialNumber_result deepCopy() {
13176
      return new getScanRecordsForSerialNumber_result(this);
13177
    }
13178
 
13179
    @Override
13180
    public void clear() {
13181
      this.success = null;
13182
    }
13183
 
13184
    public int getSuccessSize() {
13185
      return (this.success == null) ? 0 : this.success.size();
13186
    }
13187
 
13188
    public java.util.Iterator<Scan> getSuccessIterator() {
13189
      return (this.success == null) ? null : this.success.iterator();
13190
    }
13191
 
13192
    public void addToSuccess(Scan elem) {
13193
      if (this.success == null) {
13194
        this.success = new ArrayList<Scan>();
13195
      }
13196
      this.success.add(elem);
13197
    }
13198
 
13199
    public List<Scan> getSuccess() {
13200
      return this.success;
13201
    }
13202
 
13203
    public void setSuccess(List<Scan> success) {
13204
      this.success = success;
13205
    }
13206
 
13207
    public void unsetSuccess() {
13208
      this.success = null;
13209
    }
13210
 
13211
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
13212
    public boolean isSetSuccess() {
13213
      return this.success != null;
13214
    }
13215
 
13216
    public void setSuccessIsSet(boolean value) {
13217
      if (!value) {
13218
        this.success = null;
13219
      }
13220
    }
13221
 
13222
    public void setFieldValue(_Fields field, Object value) {
13223
      switch (field) {
13224
      case SUCCESS:
13225
        if (value == null) {
13226
          unsetSuccess();
13227
        } else {
13228
          setSuccess((List<Scan>)value);
13229
        }
13230
        break;
13231
 
13232
      }
13233
    }
13234
 
13235
    public Object getFieldValue(_Fields field) {
13236
      switch (field) {
13237
      case SUCCESS:
13238
        return getSuccess();
13239
 
13240
      }
13241
      throw new IllegalStateException();
13242
    }
13243
 
13244
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13245
    public boolean isSet(_Fields field) {
13246
      if (field == null) {
13247
        throw new IllegalArgumentException();
13248
      }
13249
 
13250
      switch (field) {
13251
      case SUCCESS:
13252
        return isSetSuccess();
13253
      }
13254
      throw new IllegalStateException();
13255
    }
13256
 
13257
    @Override
13258
    public boolean equals(Object that) {
13259
      if (that == null)
13260
        return false;
13261
      if (that instanceof getScanRecordsForSerialNumber_result)
13262
        return this.equals((getScanRecordsForSerialNumber_result)that);
13263
      return false;
13264
    }
13265
 
13266
    public boolean equals(getScanRecordsForSerialNumber_result that) {
13267
      if (that == null)
13268
        return false;
13269
 
13270
      boolean this_present_success = true && this.isSetSuccess();
13271
      boolean that_present_success = true && that.isSetSuccess();
13272
      if (this_present_success || that_present_success) {
13273
        if (!(this_present_success && that_present_success))
13274
          return false;
13275
        if (!this.success.equals(that.success))
13276
          return false;
13277
      }
13278
 
13279
      return true;
13280
    }
13281
 
13282
    @Override
13283
    public int hashCode() {
13284
      return 0;
13285
    }
13286
 
13287
    public int compareTo(getScanRecordsForSerialNumber_result other) {
13288
      if (!getClass().equals(other.getClass())) {
13289
        return getClass().getName().compareTo(other.getClass().getName());
13290
      }
13291
 
13292
      int lastComparison = 0;
13293
      getScanRecordsForSerialNumber_result typedOther = (getScanRecordsForSerialNumber_result)other;
13294
 
13295
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
13296
      if (lastComparison != 0) {
13297
        return lastComparison;
13298
      }
13299
      if (isSetSuccess()) {
13300
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
13301
        if (lastComparison != 0) {
13302
          return lastComparison;
13303
        }
13304
      }
13305
      return 0;
13306
    }
13307
 
13308
    public _Fields fieldForId(int fieldId) {
13309
      return _Fields.findByThriftId(fieldId);
13310
    }
13311
 
13312
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13313
      org.apache.thrift.protocol.TField field;
13314
      iprot.readStructBegin();
13315
      while (true)
13316
      {
13317
        field = iprot.readFieldBegin();
13318
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13319
          break;
13320
        }
13321
        switch (field.id) {
13322
          case 0: // SUCCESS
13323
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
13324
              {
13325
                org.apache.thrift.protocol.TList _list28 = iprot.readListBegin();
13326
                this.success = new ArrayList<Scan>(_list28.size);
13327
                for (int _i29 = 0; _i29 < _list28.size; ++_i29)
13328
                {
13329
                  Scan _elem30; // required
13330
                  _elem30 = new Scan();
13331
                  _elem30.read(iprot);
13332
                  this.success.add(_elem30);
13333
                }
13334
                iprot.readListEnd();
13335
              }
13336
            } else { 
13337
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13338
            }
13339
            break;
13340
          default:
13341
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13342
        }
13343
        iprot.readFieldEnd();
13344
      }
13345
      iprot.readStructEnd();
13346
      validate();
13347
    }
13348
 
13349
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13350
      oprot.writeStructBegin(STRUCT_DESC);
13351
 
13352
      if (this.isSetSuccess()) {
13353
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13354
        {
13355
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
13356
          for (Scan _iter31 : this.success)
13357
          {
13358
            _iter31.write(oprot);
13359
          }
13360
          oprot.writeListEnd();
13361
        }
13362
        oprot.writeFieldEnd();
13363
      }
13364
      oprot.writeFieldStop();
13365
      oprot.writeStructEnd();
13366
    }
13367
 
13368
    @Override
13369
    public String toString() {
13370
      StringBuilder sb = new StringBuilder("getScanRecordsForSerialNumber_result(");
13371
      boolean first = true;
13372
 
13373
      sb.append("success:");
13374
      if (this.success == null) {
13375
        sb.append("null");
13376
      } else {
13377
        sb.append(this.success);
13378
      }
13379
      first = false;
13380
      sb.append(")");
13381
      return sb.toString();
13382
    }
13383
 
13384
    public void validate() throws org.apache.thrift.TException {
13385
      // check for required fields
13386
    }
13387
 
13388
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13389
      try {
13390
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13391
      } catch (org.apache.thrift.TException te) {
13392
        throw new java.io.IOException(te);
13393
      }
13394
    }
13395
 
13396
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13397
      try {
13398
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13399
      } catch (org.apache.thrift.TException te) {
13400
        throw new java.io.IOException(te);
13401
      }
13402
    }
13403
 
13404
  }
13405
 
6467 amar.kumar 13406
  public static class scanForPurchaseReturn_args implements org.apache.thrift.TBase<scanForPurchaseReturn_args, scanForPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
13407
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForPurchaseReturn_args");
13408
 
13409
    private static final org.apache.thrift.protocol.TField SALE_RETURN_ITEMS_FIELD_DESC = new org.apache.thrift.protocol.TField("saleReturnItems", org.apache.thrift.protocol.TType.LIST, (short)1);
13410
    private static final org.apache.thrift.protocol.TField VENDOR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("vendorId", org.apache.thrift.protocol.TType.I64, (short)2);
13411
 
13412
    private List<InventoryItem> saleReturnItems; // required
13413
    private long vendorId; // required
13414
 
13415
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13416
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13417
      SALE_RETURN_ITEMS((short)1, "saleReturnItems"),
13418
      VENDOR_ID((short)2, "vendorId");
13419
 
13420
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13421
 
13422
      static {
13423
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13424
          byName.put(field.getFieldName(), field);
13425
        }
13426
      }
13427
 
13428
      /**
13429
       * Find the _Fields constant that matches fieldId, or null if its not found.
13430
       */
13431
      public static _Fields findByThriftId(int fieldId) {
13432
        switch(fieldId) {
13433
          case 1: // SALE_RETURN_ITEMS
13434
            return SALE_RETURN_ITEMS;
13435
          case 2: // VENDOR_ID
13436
            return VENDOR_ID;
13437
          default:
13438
            return null;
13439
        }
13440
      }
13441
 
13442
      /**
13443
       * Find the _Fields constant that matches fieldId, throwing an exception
13444
       * if it is not found.
13445
       */
13446
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13447
        _Fields fields = findByThriftId(fieldId);
13448
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13449
        return fields;
13450
      }
13451
 
13452
      /**
13453
       * Find the _Fields constant that matches name, or null if its not found.
13454
       */
13455
      public static _Fields findByName(String name) {
13456
        return byName.get(name);
13457
      }
13458
 
13459
      private final short _thriftId;
13460
      private final String _fieldName;
13461
 
13462
      _Fields(short thriftId, String fieldName) {
13463
        _thriftId = thriftId;
13464
        _fieldName = fieldName;
13465
      }
13466
 
13467
      public short getThriftFieldId() {
13468
        return _thriftId;
13469
      }
13470
 
13471
      public String getFieldName() {
13472
        return _fieldName;
13473
      }
13474
    }
13475
 
13476
    // isset id assignments
13477
    private static final int __VENDORID_ISSET_ID = 0;
13478
    private BitSet __isset_bit_vector = new BitSet(1);
13479
 
13480
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13481
    static {
13482
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13483
      tmpMap.put(_Fields.SALE_RETURN_ITEMS, new org.apache.thrift.meta_data.FieldMetaData("saleReturnItems", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13484
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
13485
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class))));
13486
      tmpMap.put(_Fields.VENDOR_ID, new org.apache.thrift.meta_data.FieldMetaData("vendorId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13487
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13488
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13489
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForPurchaseReturn_args.class, metaDataMap);
13490
    }
13491
 
13492
    public scanForPurchaseReturn_args() {
13493
    }
13494
 
13495
    public scanForPurchaseReturn_args(
13496
      List<InventoryItem> saleReturnItems,
13497
      long vendorId)
13498
    {
13499
      this();
13500
      this.saleReturnItems = saleReturnItems;
13501
      this.vendorId = vendorId;
13502
      setVendorIdIsSet(true);
13503
    }
13504
 
13505
    /**
13506
     * Performs a deep copy on <i>other</i>.
13507
     */
13508
    public scanForPurchaseReturn_args(scanForPurchaseReturn_args other) {
13509
      __isset_bit_vector.clear();
13510
      __isset_bit_vector.or(other.__isset_bit_vector);
13511
      if (other.isSetSaleReturnItems()) {
13512
        List<InventoryItem> __this__saleReturnItems = new ArrayList<InventoryItem>();
13513
        for (InventoryItem other_element : other.saleReturnItems) {
13514
          __this__saleReturnItems.add(new InventoryItem(other_element));
13515
        }
13516
        this.saleReturnItems = __this__saleReturnItems;
13517
      }
13518
      this.vendorId = other.vendorId;
13519
    }
13520
 
13521
    public scanForPurchaseReturn_args deepCopy() {
13522
      return new scanForPurchaseReturn_args(this);
13523
    }
13524
 
13525
    @Override
13526
    public void clear() {
13527
      this.saleReturnItems = null;
13528
      setVendorIdIsSet(false);
13529
      this.vendorId = 0;
13530
    }
13531
 
13532
    public int getSaleReturnItemsSize() {
13533
      return (this.saleReturnItems == null) ? 0 : this.saleReturnItems.size();
13534
    }
13535
 
13536
    public java.util.Iterator<InventoryItem> getSaleReturnItemsIterator() {
13537
      return (this.saleReturnItems == null) ? null : this.saleReturnItems.iterator();
13538
    }
13539
 
13540
    public void addToSaleReturnItems(InventoryItem elem) {
13541
      if (this.saleReturnItems == null) {
13542
        this.saleReturnItems = new ArrayList<InventoryItem>();
13543
      }
13544
      this.saleReturnItems.add(elem);
13545
    }
13546
 
13547
    public List<InventoryItem> getSaleReturnItems() {
13548
      return this.saleReturnItems;
13549
    }
13550
 
13551
    public void setSaleReturnItems(List<InventoryItem> saleReturnItems) {
13552
      this.saleReturnItems = saleReturnItems;
13553
    }
13554
 
13555
    public void unsetSaleReturnItems() {
13556
      this.saleReturnItems = null;
13557
    }
13558
 
13559
    /** Returns true if field saleReturnItems is set (has been assigned a value) and false otherwise */
13560
    public boolean isSetSaleReturnItems() {
13561
      return this.saleReturnItems != null;
13562
    }
13563
 
13564
    public void setSaleReturnItemsIsSet(boolean value) {
13565
      if (!value) {
13566
        this.saleReturnItems = null;
13567
      }
13568
    }
13569
 
13570
    public long getVendorId() {
13571
      return this.vendorId;
13572
    }
13573
 
13574
    public void setVendorId(long vendorId) {
13575
      this.vendorId = vendorId;
13576
      setVendorIdIsSet(true);
13577
    }
13578
 
13579
    public void unsetVendorId() {
13580
      __isset_bit_vector.clear(__VENDORID_ISSET_ID);
13581
    }
13582
 
13583
    /** Returns true if field vendorId is set (has been assigned a value) and false otherwise */
13584
    public boolean isSetVendorId() {
13585
      return __isset_bit_vector.get(__VENDORID_ISSET_ID);
13586
    }
13587
 
13588
    public void setVendorIdIsSet(boolean value) {
13589
      __isset_bit_vector.set(__VENDORID_ISSET_ID, value);
13590
    }
13591
 
13592
    public void setFieldValue(_Fields field, Object value) {
13593
      switch (field) {
13594
      case SALE_RETURN_ITEMS:
13595
        if (value == null) {
13596
          unsetSaleReturnItems();
13597
        } else {
13598
          setSaleReturnItems((List<InventoryItem>)value);
13599
        }
13600
        break;
13601
 
13602
      case VENDOR_ID:
13603
        if (value == null) {
13604
          unsetVendorId();
13605
        } else {
13606
          setVendorId((Long)value);
13607
        }
13608
        break;
13609
 
13610
      }
13611
    }
13612
 
13613
    public Object getFieldValue(_Fields field) {
13614
      switch (field) {
13615
      case SALE_RETURN_ITEMS:
13616
        return getSaleReturnItems();
13617
 
13618
      case VENDOR_ID:
13619
        return Long.valueOf(getVendorId());
13620
 
13621
      }
13622
      throw new IllegalStateException();
13623
    }
13624
 
13625
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13626
    public boolean isSet(_Fields field) {
13627
      if (field == null) {
13628
        throw new IllegalArgumentException();
13629
      }
13630
 
13631
      switch (field) {
13632
      case SALE_RETURN_ITEMS:
13633
        return isSetSaleReturnItems();
13634
      case VENDOR_ID:
13635
        return isSetVendorId();
13636
      }
13637
      throw new IllegalStateException();
13638
    }
13639
 
13640
    @Override
13641
    public boolean equals(Object that) {
13642
      if (that == null)
13643
        return false;
13644
      if (that instanceof scanForPurchaseReturn_args)
13645
        return this.equals((scanForPurchaseReturn_args)that);
13646
      return false;
13647
    }
13648
 
13649
    public boolean equals(scanForPurchaseReturn_args that) {
13650
      if (that == null)
13651
        return false;
13652
 
13653
      boolean this_present_saleReturnItems = true && this.isSetSaleReturnItems();
13654
      boolean that_present_saleReturnItems = true && that.isSetSaleReturnItems();
13655
      if (this_present_saleReturnItems || that_present_saleReturnItems) {
13656
        if (!(this_present_saleReturnItems && that_present_saleReturnItems))
13657
          return false;
13658
        if (!this.saleReturnItems.equals(that.saleReturnItems))
13659
          return false;
13660
      }
13661
 
13662
      boolean this_present_vendorId = true;
13663
      boolean that_present_vendorId = true;
13664
      if (this_present_vendorId || that_present_vendorId) {
13665
        if (!(this_present_vendorId && that_present_vendorId))
13666
          return false;
13667
        if (this.vendorId != that.vendorId)
13668
          return false;
13669
      }
13670
 
13671
      return true;
13672
    }
13673
 
13674
    @Override
13675
    public int hashCode() {
13676
      return 0;
13677
    }
13678
 
13679
    public int compareTo(scanForPurchaseReturn_args other) {
13680
      if (!getClass().equals(other.getClass())) {
13681
        return getClass().getName().compareTo(other.getClass().getName());
13682
      }
13683
 
13684
      int lastComparison = 0;
13685
      scanForPurchaseReturn_args typedOther = (scanForPurchaseReturn_args)other;
13686
 
13687
      lastComparison = Boolean.valueOf(isSetSaleReturnItems()).compareTo(typedOther.isSetSaleReturnItems());
13688
      if (lastComparison != 0) {
13689
        return lastComparison;
13690
      }
13691
      if (isSetSaleReturnItems()) {
13692
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.saleReturnItems, typedOther.saleReturnItems);
13693
        if (lastComparison != 0) {
13694
          return lastComparison;
13695
        }
13696
      }
13697
      lastComparison = Boolean.valueOf(isSetVendorId()).compareTo(typedOther.isSetVendorId());
13698
      if (lastComparison != 0) {
13699
        return lastComparison;
13700
      }
13701
      if (isSetVendorId()) {
13702
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vendorId, typedOther.vendorId);
13703
        if (lastComparison != 0) {
13704
          return lastComparison;
13705
        }
13706
      }
13707
      return 0;
13708
    }
13709
 
13710
    public _Fields fieldForId(int fieldId) {
13711
      return _Fields.findByThriftId(fieldId);
13712
    }
13713
 
13714
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13715
      org.apache.thrift.protocol.TField field;
13716
      iprot.readStructBegin();
13717
      while (true)
13718
      {
13719
        field = iprot.readFieldBegin();
13720
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13721
          break;
13722
        }
13723
        switch (field.id) {
13724
          case 1: // SALE_RETURN_ITEMS
13725
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
13726
              {
13727
                org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
13728
                this.saleReturnItems = new ArrayList<InventoryItem>(_list32.size);
13729
                for (int _i33 = 0; _i33 < _list32.size; ++_i33)
13730
                {
13731
                  InventoryItem _elem34; // required
13732
                  _elem34 = new InventoryItem();
13733
                  _elem34.read(iprot);
13734
                  this.saleReturnItems.add(_elem34);
13735
                }
13736
                iprot.readListEnd();
13737
              }
13738
            } else { 
13739
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13740
            }
13741
            break;
13742
          case 2: // VENDOR_ID
13743
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13744
              this.vendorId = iprot.readI64();
13745
              setVendorIdIsSet(true);
13746
            } else { 
13747
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13748
            }
13749
            break;
13750
          default:
13751
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13752
        }
13753
        iprot.readFieldEnd();
13754
      }
13755
      iprot.readStructEnd();
13756
      validate();
13757
    }
13758
 
13759
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13760
      validate();
13761
 
13762
      oprot.writeStructBegin(STRUCT_DESC);
13763
      if (this.saleReturnItems != null) {
13764
        oprot.writeFieldBegin(SALE_RETURN_ITEMS_FIELD_DESC);
13765
        {
13766
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.saleReturnItems.size()));
13767
          for (InventoryItem _iter35 : this.saleReturnItems)
13768
          {
13769
            _iter35.write(oprot);
13770
          }
13771
          oprot.writeListEnd();
13772
        }
13773
        oprot.writeFieldEnd();
13774
      }
13775
      oprot.writeFieldBegin(VENDOR_ID_FIELD_DESC);
13776
      oprot.writeI64(this.vendorId);
13777
      oprot.writeFieldEnd();
13778
      oprot.writeFieldStop();
13779
      oprot.writeStructEnd();
13780
    }
13781
 
13782
    @Override
13783
    public String toString() {
13784
      StringBuilder sb = new StringBuilder("scanForPurchaseReturn_args(");
13785
      boolean first = true;
13786
 
13787
      sb.append("saleReturnItems:");
13788
      if (this.saleReturnItems == null) {
13789
        sb.append("null");
13790
      } else {
13791
        sb.append(this.saleReturnItems);
13792
      }
13793
      first = false;
13794
      if (!first) sb.append(", ");
13795
      sb.append("vendorId:");
13796
      sb.append(this.vendorId);
13797
      first = false;
13798
      sb.append(")");
13799
      return sb.toString();
13800
    }
13801
 
13802
    public void validate() throws org.apache.thrift.TException {
13803
      // check for required fields
13804
    }
13805
 
13806
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13807
      try {
13808
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13809
      } catch (org.apache.thrift.TException te) {
13810
        throw new java.io.IOException(te);
13811
      }
13812
    }
13813
 
13814
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13815
      try {
13816
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13817
      } catch (org.apache.thrift.TException te) {
13818
        throw new java.io.IOException(te);
13819
      }
13820
    }
13821
 
13822
  }
13823
 
13824
  public static class scanForPurchaseReturn_result implements org.apache.thrift.TBase<scanForPurchaseReturn_result, scanForPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
13825
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForPurchaseReturn_result");
13826
 
13827
    private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
13828
 
13829
    private WarehouseServiceException ex; // required
13830
 
13831
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13832
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13833
      EX((short)1, "ex");
13834
 
13835
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13836
 
13837
      static {
13838
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13839
          byName.put(field.getFieldName(), field);
13840
        }
13841
      }
13842
 
13843
      /**
13844
       * Find the _Fields constant that matches fieldId, or null if its not found.
13845
       */
13846
      public static _Fields findByThriftId(int fieldId) {
13847
        switch(fieldId) {
13848
          case 1: // EX
13849
            return EX;
13850
          default:
13851
            return null;
13852
        }
13853
      }
13854
 
13855
      /**
13856
       * Find the _Fields constant that matches fieldId, throwing an exception
13857
       * if it is not found.
13858
       */
13859
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13860
        _Fields fields = findByThriftId(fieldId);
13861
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13862
        return fields;
13863
      }
13864
 
13865
      /**
13866
       * Find the _Fields constant that matches name, or null if its not found.
13867
       */
13868
      public static _Fields findByName(String name) {
13869
        return byName.get(name);
13870
      }
13871
 
13872
      private final short _thriftId;
13873
      private final String _fieldName;
13874
 
13875
      _Fields(short thriftId, String fieldName) {
13876
        _thriftId = thriftId;
13877
        _fieldName = fieldName;
13878
      }
13879
 
13880
      public short getThriftFieldId() {
13881
        return _thriftId;
13882
      }
13883
 
13884
      public String getFieldName() {
13885
        return _fieldName;
13886
      }
13887
    }
13888
 
13889
    // isset id assignments
13890
 
13891
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13892
    static {
13893
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13894
      tmpMap.put(_Fields.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13895
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
13896
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13897
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForPurchaseReturn_result.class, metaDataMap);
13898
    }
13899
 
13900
    public scanForPurchaseReturn_result() {
13901
    }
13902
 
13903
    public scanForPurchaseReturn_result(
13904
      WarehouseServiceException ex)
13905
    {
13906
      this();
13907
      this.ex = ex;
13908
    }
13909
 
13910
    /**
13911
     * Performs a deep copy on <i>other</i>.
13912
     */
13913
    public scanForPurchaseReturn_result(scanForPurchaseReturn_result other) {
13914
      if (other.isSetEx()) {
13915
        this.ex = new WarehouseServiceException(other.ex);
13916
      }
13917
    }
13918
 
13919
    public scanForPurchaseReturn_result deepCopy() {
13920
      return new scanForPurchaseReturn_result(this);
13921
    }
13922
 
13923
    @Override
13924
    public void clear() {
13925
      this.ex = null;
13926
    }
13927
 
13928
    public WarehouseServiceException getEx() {
13929
      return this.ex;
13930
    }
13931
 
13932
    public void setEx(WarehouseServiceException ex) {
13933
      this.ex = ex;
13934
    }
13935
 
13936
    public void unsetEx() {
13937
      this.ex = null;
13938
    }
13939
 
13940
    /** Returns true if field ex is set (has been assigned a value) and false otherwise */
13941
    public boolean isSetEx() {
13942
      return this.ex != null;
13943
    }
13944
 
13945
    public void setExIsSet(boolean value) {
13946
      if (!value) {
13947
        this.ex = null;
13948
      }
13949
    }
13950
 
13951
    public void setFieldValue(_Fields field, Object value) {
13952
      switch (field) {
13953
      case EX:
13954
        if (value == null) {
13955
          unsetEx();
13956
        } else {
13957
          setEx((WarehouseServiceException)value);
13958
        }
13959
        break;
13960
 
13961
      }
13962
    }
13963
 
13964
    public Object getFieldValue(_Fields field) {
13965
      switch (field) {
13966
      case EX:
13967
        return getEx();
13968
 
13969
      }
13970
      throw new IllegalStateException();
13971
    }
13972
 
13973
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13974
    public boolean isSet(_Fields field) {
13975
      if (field == null) {
13976
        throw new IllegalArgumentException();
13977
      }
13978
 
13979
      switch (field) {
13980
      case EX:
13981
        return isSetEx();
13982
      }
13983
      throw new IllegalStateException();
13984
    }
13985
 
13986
    @Override
13987
    public boolean equals(Object that) {
13988
      if (that == null)
13989
        return false;
13990
      if (that instanceof scanForPurchaseReturn_result)
13991
        return this.equals((scanForPurchaseReturn_result)that);
13992
      return false;
13993
    }
13994
 
13995
    public boolean equals(scanForPurchaseReturn_result that) {
13996
      if (that == null)
13997
        return false;
13998
 
13999
      boolean this_present_ex = true && this.isSetEx();
14000
      boolean that_present_ex = true && that.isSetEx();
14001
      if (this_present_ex || that_present_ex) {
14002
        if (!(this_present_ex && that_present_ex))
14003
          return false;
14004
        if (!this.ex.equals(that.ex))
14005
          return false;
14006
      }
14007
 
14008
      return true;
14009
    }
14010
 
14011
    @Override
14012
    public int hashCode() {
14013
      return 0;
14014
    }
14015
 
14016
    public int compareTo(scanForPurchaseReturn_result other) {
14017
      if (!getClass().equals(other.getClass())) {
14018
        return getClass().getName().compareTo(other.getClass().getName());
14019
      }
14020
 
14021
      int lastComparison = 0;
14022
      scanForPurchaseReturn_result typedOther = (scanForPurchaseReturn_result)other;
14023
 
14024
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx());
14025
      if (lastComparison != 0) {
14026
        return lastComparison;
14027
      }
14028
      if (isSetEx()) {
14029
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, typedOther.ex);
14030
        if (lastComparison != 0) {
14031
          return lastComparison;
14032
        }
14033
      }
14034
      return 0;
14035
    }
14036
 
14037
    public _Fields fieldForId(int fieldId) {
14038
      return _Fields.findByThriftId(fieldId);
14039
    }
14040
 
14041
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14042
      org.apache.thrift.protocol.TField field;
14043
      iprot.readStructBegin();
14044
      while (true)
14045
      {
14046
        field = iprot.readFieldBegin();
14047
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14048
          break;
14049
        }
14050
        switch (field.id) {
14051
          case 1: // EX
14052
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14053
              this.ex = new WarehouseServiceException();
14054
              this.ex.read(iprot);
14055
            } else { 
14056
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14057
            }
14058
            break;
14059
          default:
14060
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14061
        }
14062
        iprot.readFieldEnd();
14063
      }
14064
      iprot.readStructEnd();
14065
      validate();
14066
    }
14067
 
14068
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14069
      oprot.writeStructBegin(STRUCT_DESC);
14070
 
14071
      if (this.isSetEx()) {
14072
        oprot.writeFieldBegin(EX_FIELD_DESC);
14073
        this.ex.write(oprot);
14074
        oprot.writeFieldEnd();
14075
      }
14076
      oprot.writeFieldStop();
14077
      oprot.writeStructEnd();
14078
    }
14079
 
14080
    @Override
14081
    public String toString() {
14082
      StringBuilder sb = new StringBuilder("scanForPurchaseReturn_result(");
14083
      boolean first = true;
14084
 
14085
      sb.append("ex:");
14086
      if (this.ex == null) {
14087
        sb.append("null");
14088
      } else {
14089
        sb.append(this.ex);
14090
      }
14091
      first = false;
14092
      sb.append(")");
14093
      return sb.toString();
14094
    }
14095
 
14096
    public void validate() throws org.apache.thrift.TException {
14097
      // check for required fields
14098
    }
14099
 
14100
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14101
      try {
14102
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14103
      } catch (org.apache.thrift.TException te) {
14104
        throw new java.io.IOException(te);
14105
      }
14106
    }
14107
 
14108
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14109
      try {
14110
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14111
      } catch (org.apache.thrift.TException te) {
14112
        throw new java.io.IOException(te);
14113
      }
14114
    }
14115
 
14116
  }
14117
 
2820 chandransh 14118
}