Subversion Repositories SmartDukaan

Rev

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