Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
2820 chandransh 1
/**
3430 rajveer 2
 * Autogenerated by Thrift Compiler (0.7.0)
2820 chandransh 3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.warehouse;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
3430 rajveer 18
import java.nio.ByteBuffer;
2820 chandransh 19
import java.util.Arrays;
20
import org.slf4j.Logger;
21
import org.slf4j.LoggerFactory;
22
 
23
public class WarehouseService {
24
 
3374 rajveer 25
  public interface Iface extends in.shop2020.generic.GenericService.Iface {
2820 chandransh 26
 
27
    /**
4496 mandeep.dh 28
     * Retrieves serialized inventory item given a serial number
2832 chandransh 29
     * 
4496 mandeep.dh 30
     * @param serialNumber
2832 chandransh 31
     */
4541 mandeep.dh 32
    public InventoryItem getInventoryItem(String serialNumber) throws WarehouseServiceException, org.apache.thrift.TException;
2832 chandransh 33
 
34
    /**
5361 mandeep.dh 35
     * Retrieves non-serialized inventory item from a given supplier
2820 chandransh 36
     * 
5530 mandeep.dh 37
     * @param itemNumber
4496 mandeep.dh 38
     * @param itemId
5530 mandeep.dh 39
     * @param fulfilmentWarehouseId
2820 chandransh 40
     */
5530 mandeep.dh 41
    public InventoryItem getNonSeralizedInventoryItem(String itemNumber, long itemId, long fulfilmentWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException;
2820 chandransh 42
 
43
    /**
4496 mandeep.dh 44
     * Scan non-serialized items.
2820 chandransh 45
     * 
5361 mandeep.dh 46
     * @param inventoryItem
2820 chandransh 47
     * @param type
4496 mandeep.dh 48
     * @param quantity
5361 mandeep.dh 49
     * @param billingWarehouseId
2820 chandransh 50
     */
5361 mandeep.dh 51
    public void scan(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException;
2820 chandransh 52
 
4496 mandeep.dh 53
    /**
54
     * Scan serialized items linked with an order. Returns its price.
55
     * 
4555 mandeep.dh 56
     * @param serialNumber
4496 mandeep.dh 57
     * @param type
58
     * @param orderId
5110 mandeep.dh 59
     * @param fulfilmentWarehouseId
60
     * @param quantity
61
     * @param billingWarehouseId
4496 mandeep.dh 62
     */
5110 mandeep.dh 63
    public InventoryItem scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException;
4496 mandeep.dh 64
 
65
    /**
66
     * Scan non-serialized items linked with an order.
67
     * 
5361 mandeep.dh 68
     * @param inventoryItem
4496 mandeep.dh 69
     * @param type
70
     * @param quantity
71
     * @param orderId
5110 mandeep.dh 72
     * @param fulfilmentWarehouseId
5361 mandeep.dh 73
     * @param billingWarehouseId
4496 mandeep.dh 74
     */
5361 mandeep.dh 75
    public InventoryItem scanForOrder(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException;
4496 mandeep.dh 76
 
77
    /**
78
     * Created item number to item id mapping
79
     * 
80
     * @param itemNumber
81
     * @param itemId
82
     */
83
    public void createItemNumberMapping(String itemNumber, long itemId) throws org.apache.thrift.TException;
84
 
4622 amit.gupta 85
    /**
86
     * Get itemNumber mappings for itemId
87
     * 
88
     * @param itemId
89
     */
90
    public List<String> getItemNumbers(long itemId) throws org.apache.thrift.TException;
91
 
5110 mandeep.dh 92
    /**
93
     * Gets item ids for a given item number
94
     * 
95
     * @param itemNumber
96
     */
97
    public List<Long> getItemIds(String itemNumber) throws org.apache.thrift.TException;
98
 
5185 mandeep.dh 99
    /**
100
     * Retrieves all inventory items given a last scan type
101
     * 
102
     * @param lastScanType
103
     */
104
    public List<InventoryItem> getInventoryItemsFromLastScanType(ScanType lastScanType) throws WarehouseServiceException, org.apache.thrift.TException;
105
 
106
    /**
107
     * Retrieves inventory item given a inventoryItem id
108
     * 
109
     * @param inventoryItemId
110
     */
111
    public InventoryItem getInventoryItemFromId(long inventoryItemId) throws WarehouseServiceException, org.apache.thrift.TException;
112
 
5372 mandeep.dh 113
    /**
114
     * Returns the purchase scans grouped by items for Purchase register reconciliation
115
     * 
116
     * @param startDate
117
     * @param endDate
118
     */
119
    public List<DetailedPurchaseScan> getPurchaseScans(long startDate, long endDate) throws org.apache.thrift.TException;
120
 
5496 mandeep.dh 121
    /**
122
     * Returns the invoices and the count of scans against on a given day.
123
     * 
124
     * @param date
125
     */
126
    public List<InvoiceScan> fetchScansPerInvoiceNumber(long date) throws org.apache.thrift.TException;
127
 
5620 mandeep.dh 128
    /**
129
     * Returns inventory item for a given order
130
     * 
131
     * @param orderId
132
     */
133
    public InventoryItem getInventoryItemFromOrder(long orderId) throws WarehouseServiceException, org.apache.thrift.TException;
134
 
5711 mandeep.dh 135
    /**
136
     * Fetches the stock inventory age week-wise
137
     */
138
    public List<InventoryAge> getInventoryAge() throws org.apache.thrift.TException;
139
 
6322 amar.kumar 140
    /**
141
     * Fetches the scanRecords for a given item for a given time interval
142
     * 
143
     * @param itemId
144
     * @param fromDate
145
     * @param toDate
146
     */
147
    public List<Scan> getInventoryScansForItem(long itemId, long fromDate, long toDate) throws org.apache.thrift.TException;
148
 
149
    /**
150
     * Fetches the scanRecords for a given serialNumber for a given time interval
151
     * 
152
     * @param serialNumber
153
     */
154
    public List<Scan> getScanRecordsForSerialNumber(long serialNumber) throws org.apache.thrift.TException;
155
 
6467 amar.kumar 156
    /**
6548 amar.kumar 157
     * Inserts outgoing scans for Returned Items and updates returnId in InventoryItems
6467 amar.kumar 158
     * 
159
     * @param saleReturnItems
160
     * @param vendorId
161
     */
162
    public void scanForPurchaseReturn(List<InventoryItem> saleReturnItems, long vendorId) throws WarehouseServiceException, org.apache.thrift.TException;
163
 
6548 amar.kumar 164
    /**
165
     * Inserts scans for lost Items and updates lastScanType in InventoryItems
166
     * 
167
     * @param lostItems
168
     * @param vendorId
169
     */
170
    public void scanForLostItem(List<InventoryItem> lostItems, long vendorId) throws WarehouseServiceException, org.apache.thrift.TException;
171
 
172
    /**
173
     * Get inventory count for available Serialized items in our warehouses using entries in ScanNew table
174
     */
175
    public List<InventoryAvailability> getCurrentSerializedInventoryByScans() throws org.apache.thrift.TException;
176
 
2820 chandransh 177
  }
178
 
3430 rajveer 179
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
180
 
4496 mandeep.dh 181
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 182
 
5530 mandeep.dh 183
    public void getNonSeralizedInventoryItem(String itemNumber, long itemId, long fulfilmentWarehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getNonSeralizedInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 184
 
5361 mandeep.dh 185
    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 186
 
5110 mandeep.dh 187
    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 188
 
5361 mandeep.dh 189
    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 190
 
191
    public void createItemNumberMapping(String itemNumber, long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createItemNumberMapping_call> resultHandler) throws org.apache.thrift.TException;
192
 
4622 amit.gupta 193
    public void getItemNumbers(long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemNumbers_call> resultHandler) throws org.apache.thrift.TException;
194
 
5110 mandeep.dh 195
    public void getItemIds(String itemNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemIds_call> resultHandler) throws org.apache.thrift.TException;
196
 
5185 mandeep.dh 197
    public void getInventoryItemsFromLastScanType(ScanType lastScanType, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemsFromLastScanType_call> resultHandler) throws org.apache.thrift.TException;
198
 
199
    public void getInventoryItemFromId(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemFromId_call> resultHandler) throws org.apache.thrift.TException;
200
 
5372 mandeep.dh 201
    public void getPurchaseScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseScans_call> resultHandler) throws org.apache.thrift.TException;
202
 
5496 mandeep.dh 203
    public void fetchScansPerInvoiceNumber(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fetchScansPerInvoiceNumber_call> resultHandler) throws org.apache.thrift.TException;
204
 
5620 mandeep.dh 205
    public void getInventoryItemFromOrder(long orderId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemFromOrder_call> resultHandler) throws org.apache.thrift.TException;
206
 
5711 mandeep.dh 207
    public void getInventoryAge(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryAge_call> resultHandler) throws org.apache.thrift.TException;
208
 
6322 amar.kumar 209
    public void getInventoryScansForItem(long itemId, long fromDate, long toDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryScansForItem_call> resultHandler) throws org.apache.thrift.TException;
210
 
211
    public void getScanRecordsForSerialNumber(long serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getScanRecordsForSerialNumber_call> resultHandler) throws org.apache.thrift.TException;
212
 
6467 amar.kumar 213
    public void scanForPurchaseReturn(List<InventoryItem> saleReturnItems, long vendorId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanForPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
214
 
6548 amar.kumar 215
    public void scanForLostItem(List<InventoryItem> lostItems, long vendorId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanForLostItem_call> resultHandler) throws org.apache.thrift.TException;
216
 
217
    public void getCurrentSerializedInventoryByScans(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCurrentSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException;
218
 
3430 rajveer 219
  }
220
 
3374 rajveer 221
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
3430 rajveer 222
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
223
      public Factory() {}
224
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
225
        return new Client(prot);
226
      }
227
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
228
        return new Client(iprot, oprot);
229
      }
230
    }
231
 
232
    public Client(org.apache.thrift.protocol.TProtocol prot)
2820 chandransh 233
    {
3430 rajveer 234
      super(prot, prot);
2820 chandransh 235
    }
236
 
3430 rajveer 237
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
3374 rajveer 238
      super(iprot, oprot);
2820 chandransh 239
    }
240
 
4541 mandeep.dh 241
    public InventoryItem getInventoryItem(String serialNumber) throws WarehouseServiceException, org.apache.thrift.TException
2832 chandransh 242
    {
4496 mandeep.dh 243
      send_getInventoryItem(serialNumber);
244
      return recv_getInventoryItem();
2832 chandransh 245
    }
246
 
4496 mandeep.dh 247
    public void send_getInventoryItem(String serialNumber) throws org.apache.thrift.TException
2832 chandransh 248
    {
4496 mandeep.dh 249
      getInventoryItem_args args = new getInventoryItem_args();
250
      args.setSerialNumber(serialNumber);
251
      sendBase("getInventoryItem", args);
2832 chandransh 252
    }
253
 
4541 mandeep.dh 254
    public InventoryItem recv_getInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException
2832 chandransh 255
    {
4496 mandeep.dh 256
      getInventoryItem_result result = new getInventoryItem_result();
257
      receiveBase(result, "getInventoryItem");
2832 chandransh 258
      if (result.isSetSuccess()) {
259
        return result.success;
260
      }
4541 mandeep.dh 261
      if (result.wex != null) {
262
        throw result.wex;
263
      }
4496 mandeep.dh 264
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItem failed: unknown result");
265
    }
266
 
5530 mandeep.dh 267
    public InventoryItem getNonSeralizedInventoryItem(String itemNumber, long itemId, long fulfilmentWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 268
    {
5530 mandeep.dh 269
      send_getNonSeralizedInventoryItem(itemNumber, itemId, fulfilmentWarehouseId);
5361 mandeep.dh 270
      return recv_getNonSeralizedInventoryItem();
4496 mandeep.dh 271
    }
272
 
5530 mandeep.dh 273
    public void send_getNonSeralizedInventoryItem(String itemNumber, long itemId, long fulfilmentWarehouseId) throws org.apache.thrift.TException
4496 mandeep.dh 274
    {
5361 mandeep.dh 275
      getNonSeralizedInventoryItem_args args = new getNonSeralizedInventoryItem_args();
5530 mandeep.dh 276
      args.setItemNumber(itemNumber);
4496 mandeep.dh 277
      args.setItemId(itemId);
5530 mandeep.dh 278
      args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
5361 mandeep.dh 279
      sendBase("getNonSeralizedInventoryItem", args);
4496 mandeep.dh 280
    }
281
 
5361 mandeep.dh 282
    public InventoryItem recv_getNonSeralizedInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 283
    {
5361 mandeep.dh 284
      getNonSeralizedInventoryItem_result result = new getNonSeralizedInventoryItem_result();
285
      receiveBase(result, "getNonSeralizedInventoryItem");
4496 mandeep.dh 286
      if (result.isSetSuccess()) {
287
        return result.success;
2832 chandransh 288
      }
5361 mandeep.dh 289
      if (result.wex != null) {
290
        throw result.wex;
2820 chandransh 291
      }
5361 mandeep.dh 292
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getNonSeralizedInventoryItem failed: unknown result");
4496 mandeep.dh 293
    }
294
 
5361 mandeep.dh 295
    public void scan(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 296
    {
5361 mandeep.dh 297
      send_scan(inventoryItem, type, quantity, billingWarehouseId);
4496 mandeep.dh 298
      recv_scan();
3383 chandransh 299
    }
300
 
5361 mandeep.dh 301
    public void send_scan(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId) throws org.apache.thrift.TException
3383 chandransh 302
    {
4496 mandeep.dh 303
      scan_args args = new scan_args();
5361 mandeep.dh 304
      args.setInventoryItem(inventoryItem);
4496 mandeep.dh 305
      args.setType(type);
306
      args.setQuantity(quantity);
5361 mandeep.dh 307
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 308
      sendBase("scan", args);
3383 chandransh 309
    }
310
 
4496 mandeep.dh 311
    public void recv_scan() throws WarehouseServiceException, org.apache.thrift.TException
3383 chandransh 312
    {
4496 mandeep.dh 313
      scan_result result = new scan_result();
314
      receiveBase(result, "scan");
315
      if (result.wex != null) {
316
        throw result.wex;
317
      }
318
      return;
319
    }
320
 
5110 mandeep.dh 321
    public InventoryItem scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 322
    {
5110 mandeep.dh 323
      send_scanSerializedItemForOrder(serialNumber, type, orderId, fulfilmentWarehouseId, quantity, billingWarehouseId);
4496 mandeep.dh 324
      return recv_scanSerializedItemForOrder();
325
    }
326
 
5110 mandeep.dh 327
    public void send_scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId) throws org.apache.thrift.TException
4496 mandeep.dh 328
    {
329
      scanSerializedItemForOrder_args args = new scanSerializedItemForOrder_args();
4555 mandeep.dh 330
      args.setSerialNumber(serialNumber);
4496 mandeep.dh 331
      args.setType(type);
332
      args.setOrderId(orderId);
5110 mandeep.dh 333
      args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
334
      args.setQuantity(quantity);
335
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 336
      sendBase("scanSerializedItemForOrder", args);
337
    }
338
 
4555 mandeep.dh 339
    public InventoryItem recv_scanSerializedItemForOrder() throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 340
    {
341
      scanSerializedItemForOrder_result result = new scanSerializedItemForOrder_result();
342
      receiveBase(result, "scanSerializedItemForOrder");
3383 chandransh 343
      if (result.isSetSuccess()) {
344
        return result.success;
345
      }
346
      if (result.wex != null) {
347
        throw result.wex;
348
      }
4496 mandeep.dh 349
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scanSerializedItemForOrder failed: unknown result");
3383 chandransh 350
    }
351
 
5361 mandeep.dh 352
    public InventoryItem scanForOrder(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
3383 chandransh 353
    {
5361 mandeep.dh 354
      send_scanForOrder(inventoryItem, type, quantity, orderId, fulfilmentWarehouseId, billingWarehouseId);
355
      return recv_scanForOrder();
2820 chandransh 356
    }
357
 
5361 mandeep.dh 358
    public void send_scanForOrder(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId) throws org.apache.thrift.TException
2820 chandransh 359
    {
4496 mandeep.dh 360
      scanForOrder_args args = new scanForOrder_args();
5361 mandeep.dh 361
      args.setInventoryItem(inventoryItem);
3430 rajveer 362
      args.setType(type);
4496 mandeep.dh 363
      args.setQuantity(quantity);
364
      args.setOrderId(orderId);
5110 mandeep.dh 365
      args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
5361 mandeep.dh 366
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 367
      sendBase("scanForOrder", args);
2820 chandransh 368
    }
369
 
5361 mandeep.dh 370
    public InventoryItem recv_scanForOrder() throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 371
    {
4496 mandeep.dh 372
      scanForOrder_result result = new scanForOrder_result();
373
      receiveBase(result, "scanForOrder");
5361 mandeep.dh 374
      if (result.isSetSuccess()) {
375
        return result.success;
376
      }
2820 chandransh 377
      if (result.wex != null) {
378
        throw result.wex;
379
      }
5361 mandeep.dh 380
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scanForOrder failed: unknown result");
2820 chandransh 381
    }
382
 
4496 mandeep.dh 383
    public void createItemNumberMapping(String itemNumber, long itemId) throws org.apache.thrift.TException
2820 chandransh 384
    {
4496 mandeep.dh 385
      send_createItemNumberMapping(itemNumber, itemId);
386
      recv_createItemNumberMapping();
2820 chandransh 387
    }
388
 
4496 mandeep.dh 389
    public void send_createItemNumberMapping(String itemNumber, long itemId) throws org.apache.thrift.TException
2820 chandransh 390
    {
4496 mandeep.dh 391
      createItemNumberMapping_args args = new createItemNumberMapping_args();
3430 rajveer 392
      args.setItemNumber(itemNumber);
4496 mandeep.dh 393
      args.setItemId(itemId);
394
      sendBase("createItemNumberMapping", args);
2820 chandransh 395
    }
396
 
4496 mandeep.dh 397
    public void recv_createItemNumberMapping() throws org.apache.thrift.TException
2820 chandransh 398
    {
4496 mandeep.dh 399
      createItemNumberMapping_result result = new createItemNumberMapping_result();
400
      receiveBase(result, "createItemNumberMapping");
2820 chandransh 401
      return;
402
    }
403
 
4622 amit.gupta 404
    public List<String> getItemNumbers(long itemId) throws org.apache.thrift.TException
405
    {
406
      send_getItemNumbers(itemId);
407
      return recv_getItemNumbers();
408
    }
409
 
410
    public void send_getItemNumbers(long itemId) throws org.apache.thrift.TException
411
    {
412
      getItemNumbers_args args = new getItemNumbers_args();
413
      args.setItemId(itemId);
414
      sendBase("getItemNumbers", args);
415
    }
416
 
417
    public List<String> recv_getItemNumbers() throws org.apache.thrift.TException
418
    {
419
      getItemNumbers_result result = new getItemNumbers_result();
420
      receiveBase(result, "getItemNumbers");
421
      if (result.isSetSuccess()) {
422
        return result.success;
423
      }
424
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemNumbers failed: unknown result");
425
    }
426
 
5110 mandeep.dh 427
    public List<Long> getItemIds(String itemNumber) throws org.apache.thrift.TException
428
    {
429
      send_getItemIds(itemNumber);
430
      return recv_getItemIds();
431
    }
432
 
433
    public void send_getItemIds(String itemNumber) throws org.apache.thrift.TException
434
    {
435
      getItemIds_args args = new getItemIds_args();
436
      args.setItemNumber(itemNumber);
437
      sendBase("getItemIds", args);
438
    }
439
 
440
    public List<Long> recv_getItemIds() throws org.apache.thrift.TException
441
    {
442
      getItemIds_result result = new getItemIds_result();
443
      receiveBase(result, "getItemIds");
444
      if (result.isSetSuccess()) {
445
        return result.success;
446
      }
447
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemIds failed: unknown result");
448
    }
449
 
5185 mandeep.dh 450
    public List<InventoryItem> getInventoryItemsFromLastScanType(ScanType lastScanType) throws WarehouseServiceException, org.apache.thrift.TException
451
    {
452
      send_getInventoryItemsFromLastScanType(lastScanType);
453
      return recv_getInventoryItemsFromLastScanType();
454
    }
455
 
456
    public void send_getInventoryItemsFromLastScanType(ScanType lastScanType) throws org.apache.thrift.TException
457
    {
458
      getInventoryItemsFromLastScanType_args args = new getInventoryItemsFromLastScanType_args();
459
      args.setLastScanType(lastScanType);
460
      sendBase("getInventoryItemsFromLastScanType", args);
461
    }
462
 
463
    public List<InventoryItem> recv_getInventoryItemsFromLastScanType() throws WarehouseServiceException, org.apache.thrift.TException
464
    {
465
      getInventoryItemsFromLastScanType_result result = new getInventoryItemsFromLastScanType_result();
466
      receiveBase(result, "getInventoryItemsFromLastScanType");
467
      if (result.isSetSuccess()) {
468
        return result.success;
469
      }
470
      if (result.wex != null) {
471
        throw result.wex;
472
      }
473
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItemsFromLastScanType failed: unknown result");
474
    }
475
 
476
    public InventoryItem getInventoryItemFromId(long inventoryItemId) throws WarehouseServiceException, org.apache.thrift.TException
477
    {
478
      send_getInventoryItemFromId(inventoryItemId);
479
      return recv_getInventoryItemFromId();
480
    }
481
 
482
    public void send_getInventoryItemFromId(long inventoryItemId) throws org.apache.thrift.TException
483
    {
484
      getInventoryItemFromId_args args = new getInventoryItemFromId_args();
485
      args.setInventoryItemId(inventoryItemId);
486
      sendBase("getInventoryItemFromId", args);
487
    }
488
 
489
    public InventoryItem recv_getInventoryItemFromId() throws WarehouseServiceException, org.apache.thrift.TException
490
    {
491
      getInventoryItemFromId_result result = new getInventoryItemFromId_result();
492
      receiveBase(result, "getInventoryItemFromId");
493
      if (result.isSetSuccess()) {
494
        return result.success;
495
      }
496
      if (result.wex != null) {
497
        throw result.wex;
498
      }
499
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItemFromId failed: unknown result");
500
    }
501
 
5372 mandeep.dh 502
    public List<DetailedPurchaseScan> getPurchaseScans(long startDate, long endDate) throws org.apache.thrift.TException
503
    {
504
      send_getPurchaseScans(startDate, endDate);
505
      return recv_getPurchaseScans();
506
    }
507
 
508
    public void send_getPurchaseScans(long startDate, long endDate) throws org.apache.thrift.TException
509
    {
510
      getPurchaseScans_args args = new getPurchaseScans_args();
511
      args.setStartDate(startDate);
512
      args.setEndDate(endDate);
513
      sendBase("getPurchaseScans", args);
514
    }
515
 
516
    public List<DetailedPurchaseScan> recv_getPurchaseScans() throws org.apache.thrift.TException
517
    {
518
      getPurchaseScans_result result = new getPurchaseScans_result();
519
      receiveBase(result, "getPurchaseScans");
520
      if (result.isSetSuccess()) {
521
        return result.success;
522
      }
523
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseScans failed: unknown result");
524
    }
525
 
5496 mandeep.dh 526
    public List<InvoiceScan> fetchScansPerInvoiceNumber(long date) throws org.apache.thrift.TException
527
    {
528
      send_fetchScansPerInvoiceNumber(date);
529
      return recv_fetchScansPerInvoiceNumber();
530
    }
531
 
532
    public void send_fetchScansPerInvoiceNumber(long date) throws org.apache.thrift.TException
533
    {
534
      fetchScansPerInvoiceNumber_args args = new fetchScansPerInvoiceNumber_args();
535
      args.setDate(date);
536
      sendBase("fetchScansPerInvoiceNumber", args);
537
    }
538
 
539
    public List<InvoiceScan> recv_fetchScansPerInvoiceNumber() throws org.apache.thrift.TException
540
    {
541
      fetchScansPerInvoiceNumber_result result = new fetchScansPerInvoiceNumber_result();
542
      receiveBase(result, "fetchScansPerInvoiceNumber");
543
      if (result.isSetSuccess()) {
544
        return result.success;
545
      }
546
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "fetchScansPerInvoiceNumber failed: unknown result");
547
    }
548
 
5620 mandeep.dh 549
    public InventoryItem getInventoryItemFromOrder(long orderId) throws WarehouseServiceException, org.apache.thrift.TException
550
    {
551
      send_getInventoryItemFromOrder(orderId);
552
      return recv_getInventoryItemFromOrder();
553
    }
554
 
555
    public void send_getInventoryItemFromOrder(long orderId) throws org.apache.thrift.TException
556
    {
557
      getInventoryItemFromOrder_args args = new getInventoryItemFromOrder_args();
558
      args.setOrderId(orderId);
559
      sendBase("getInventoryItemFromOrder", args);
560
    }
561
 
562
    public InventoryItem recv_getInventoryItemFromOrder() throws WarehouseServiceException, org.apache.thrift.TException
563
    {
564
      getInventoryItemFromOrder_result result = new getInventoryItemFromOrder_result();
565
      receiveBase(result, "getInventoryItemFromOrder");
566
      if (result.isSetSuccess()) {
567
        return result.success;
568
      }
569
      if (result.we != null) {
570
        throw result.we;
571
      }
572
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItemFromOrder failed: unknown result");
573
    }
574
 
5711 mandeep.dh 575
    public List<InventoryAge> getInventoryAge() throws org.apache.thrift.TException
576
    {
577
      send_getInventoryAge();
578
      return recv_getInventoryAge();
579
    }
580
 
581
    public void send_getInventoryAge() throws org.apache.thrift.TException
582
    {
583
      getInventoryAge_args args = new getInventoryAge_args();
584
      sendBase("getInventoryAge", args);
585
    }
586
 
587
    public List<InventoryAge> recv_getInventoryAge() throws org.apache.thrift.TException
588
    {
589
      getInventoryAge_result result = new getInventoryAge_result();
590
      receiveBase(result, "getInventoryAge");
591
      if (result.isSetSuccess()) {
592
        return result.success;
593
      }
594
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryAge failed: unknown result");
595
    }
596
 
6322 amar.kumar 597
    public List<Scan> getInventoryScansForItem(long itemId, long fromDate, long toDate) throws org.apache.thrift.TException
598
    {
599
      send_getInventoryScansForItem(itemId, fromDate, toDate);
600
      return recv_getInventoryScansForItem();
601
    }
602
 
603
    public void send_getInventoryScansForItem(long itemId, long fromDate, long toDate) throws org.apache.thrift.TException
604
    {
605
      getInventoryScansForItem_args args = new getInventoryScansForItem_args();
606
      args.setItemId(itemId);
607
      args.setFromDate(fromDate);
608
      args.setToDate(toDate);
609
      sendBase("getInventoryScansForItem", args);
610
    }
611
 
612
    public List<Scan> recv_getInventoryScansForItem() throws org.apache.thrift.TException
613
    {
614
      getInventoryScansForItem_result result = new getInventoryScansForItem_result();
615
      receiveBase(result, "getInventoryScansForItem");
616
      if (result.isSetSuccess()) {
617
        return result.success;
618
      }
619
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryScansForItem failed: unknown result");
620
    }
621
 
622
    public List<Scan> getScanRecordsForSerialNumber(long serialNumber) throws org.apache.thrift.TException
623
    {
624
      send_getScanRecordsForSerialNumber(serialNumber);
625
      return recv_getScanRecordsForSerialNumber();
626
    }
627
 
628
    public void send_getScanRecordsForSerialNumber(long serialNumber) throws org.apache.thrift.TException
629
    {
630
      getScanRecordsForSerialNumber_args args = new getScanRecordsForSerialNumber_args();
631
      args.setSerialNumber(serialNumber);
632
      sendBase("getScanRecordsForSerialNumber", args);
633
    }
634
 
635
    public List<Scan> recv_getScanRecordsForSerialNumber() throws org.apache.thrift.TException
636
    {
637
      getScanRecordsForSerialNumber_result result = new getScanRecordsForSerialNumber_result();
638
      receiveBase(result, "getScanRecordsForSerialNumber");
639
      if (result.isSetSuccess()) {
640
        return result.success;
641
      }
642
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getScanRecordsForSerialNumber failed: unknown result");
643
    }
644
 
6467 amar.kumar 645
    public void scanForPurchaseReturn(List<InventoryItem> saleReturnItems, long vendorId) throws WarehouseServiceException, org.apache.thrift.TException
646
    {
647
      send_scanForPurchaseReturn(saleReturnItems, vendorId);
648
      recv_scanForPurchaseReturn();
649
    }
650
 
651
    public void send_scanForPurchaseReturn(List<InventoryItem> saleReturnItems, long vendorId) throws org.apache.thrift.TException
652
    {
653
      scanForPurchaseReturn_args args = new scanForPurchaseReturn_args();
654
      args.setSaleReturnItems(saleReturnItems);
655
      args.setVendorId(vendorId);
656
      sendBase("scanForPurchaseReturn", args);
657
    }
658
 
659
    public void recv_scanForPurchaseReturn() throws WarehouseServiceException, org.apache.thrift.TException
660
    {
661
      scanForPurchaseReturn_result result = new scanForPurchaseReturn_result();
662
      receiveBase(result, "scanForPurchaseReturn");
663
      if (result.ex != null) {
664
        throw result.ex;
665
      }
666
      return;
667
    }
668
 
6548 amar.kumar 669
    public void scanForLostItem(List<InventoryItem> lostItems, long vendorId) throws WarehouseServiceException, org.apache.thrift.TException
670
    {
671
      send_scanForLostItem(lostItems, vendorId);
672
      recv_scanForLostItem();
673
    }
674
 
675
    public void send_scanForLostItem(List<InventoryItem> lostItems, long vendorId) throws org.apache.thrift.TException
676
    {
677
      scanForLostItem_args args = new scanForLostItem_args();
678
      args.setLostItems(lostItems);
679
      args.setVendorId(vendorId);
680
      sendBase("scanForLostItem", args);
681
    }
682
 
683
    public void recv_scanForLostItem() throws WarehouseServiceException, org.apache.thrift.TException
684
    {
685
      scanForLostItem_result result = new scanForLostItem_result();
686
      receiveBase(result, "scanForLostItem");
687
      if (result.ex != null) {
688
        throw result.ex;
689
      }
690
      return;
691
    }
692
 
693
    public List<InventoryAvailability> getCurrentSerializedInventoryByScans() throws org.apache.thrift.TException
694
    {
695
      send_getCurrentSerializedInventoryByScans();
696
      return recv_getCurrentSerializedInventoryByScans();
697
    }
698
 
699
    public void send_getCurrentSerializedInventoryByScans() throws org.apache.thrift.TException
700
    {
701
      getCurrentSerializedInventoryByScans_args args = new getCurrentSerializedInventoryByScans_args();
702
      sendBase("getCurrentSerializedInventoryByScans", args);
703
    }
704
 
705
    public List<InventoryAvailability> recv_getCurrentSerializedInventoryByScans() throws org.apache.thrift.TException
706
    {
707
      getCurrentSerializedInventoryByScans_result result = new getCurrentSerializedInventoryByScans_result();
708
      receiveBase(result, "getCurrentSerializedInventoryByScans");
709
      if (result.isSetSuccess()) {
710
        return result.success;
711
      }
712
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCurrentSerializedInventoryByScans failed: unknown result");
713
    }
714
 
2820 chandransh 715
  }
3430 rajveer 716
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
717
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
718
      private org.apache.thrift.async.TAsyncClientManager clientManager;
719
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
720
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
721
        this.clientManager = clientManager;
722
        this.protocolFactory = protocolFactory;
723
      }
724
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
725
        return new AsyncClient(protocolFactory, clientManager, transport);
726
      }
2820 chandransh 727
    }
728
 
3430 rajveer 729
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
730
      super(protocolFactory, clientManager, transport);
731
    }
2820 chandransh 732
 
4496 mandeep.dh 733
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<getInventoryItem_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 734
      checkReady();
4496 mandeep.dh 735
      getInventoryItem_call method_call = new getInventoryItem_call(serialNumber, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 736
      this.___currentMethod = method_call;
737
      ___manager.call(method_call);
738
    }
739
 
4496 mandeep.dh 740
    public static class getInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {
741
      private String serialNumber;
742
      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 743
        super(client, protocolFactory, transport, resultHandler, false);
4496 mandeep.dh 744
        this.serialNumber = serialNumber;
3430 rajveer 745
      }
746
 
747
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 748
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
749
        getInventoryItem_args args = new getInventoryItem_args();
750
        args.setSerialNumber(serialNumber);
3430 rajveer 751
        args.write(prot);
752
        prot.writeMessageEnd();
753
      }
754
 
4541 mandeep.dh 755
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
3430 rajveer 756
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
757
          throw new IllegalStateException("Method call not finished!");
758
        }
759
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
760
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 761
        return (new Client(prot)).recv_getInventoryItem();
3430 rajveer 762
      }
763
    }
764
 
5530 mandeep.dh 765
    public void getNonSeralizedInventoryItem(String itemNumber, long itemId, long fulfilmentWarehouseId, org.apache.thrift.async.AsyncMethodCallback<getNonSeralizedInventoryItem_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 766
      checkReady();
5530 mandeep.dh 767
      getNonSeralizedInventoryItem_call method_call = new getNonSeralizedInventoryItem_call(itemNumber, itemId, fulfilmentWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 768
      this.___currentMethod = method_call;
769
      ___manager.call(method_call);
770
    }
771
 
5361 mandeep.dh 772
    public static class getNonSeralizedInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {
5530 mandeep.dh 773
      private String itemNumber;
4496 mandeep.dh 774
      private long itemId;
5530 mandeep.dh 775
      private long fulfilmentWarehouseId;
776
      public getNonSeralizedInventoryItem_call(String itemNumber, long itemId, long fulfilmentWarehouseId, org.apache.thrift.async.AsyncMethodCallback<getNonSeralizedInventoryItem_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
3430 rajveer 777
        super(client, protocolFactory, transport, resultHandler, false);
5530 mandeep.dh 778
        this.itemNumber = itemNumber;
4496 mandeep.dh 779
        this.itemId = itemId;
5530 mandeep.dh 780
        this.fulfilmentWarehouseId = fulfilmentWarehouseId;
3430 rajveer 781
      }
782
 
783
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
5361 mandeep.dh 784
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getNonSeralizedInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
785
        getNonSeralizedInventoryItem_args args = new getNonSeralizedInventoryItem_args();
5530 mandeep.dh 786
        args.setItemNumber(itemNumber);
4496 mandeep.dh 787
        args.setItemId(itemId);
5530 mandeep.dh 788
        args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
3430 rajveer 789
        args.write(prot);
790
        prot.writeMessageEnd();
791
      }
792
 
5361 mandeep.dh 793
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
3430 rajveer 794
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
795
          throw new IllegalStateException("Method call not finished!");
796
        }
797
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
798
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
5361 mandeep.dh 799
        return (new Client(prot)).recv_getNonSeralizedInventoryItem();
3430 rajveer 800
      }
801
    }
802
 
5361 mandeep.dh 803
    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 804
      checkReady();
5361 mandeep.dh 805
      scan_call method_call = new scan_call(inventoryItem, type, quantity, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 806
      this.___currentMethod = method_call;
807
      ___manager.call(method_call);
808
    }
809
 
4496 mandeep.dh 810
    public static class scan_call extends org.apache.thrift.async.TAsyncMethodCall {
5361 mandeep.dh 811
      private InventoryItem inventoryItem;
3430 rajveer 812
      private ScanType type;
4496 mandeep.dh 813
      private long quantity;
5361 mandeep.dh 814
      private long billingWarehouseId;
815
      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 816
        super(client, protocolFactory, transport, resultHandler, false);
5361 mandeep.dh 817
        this.inventoryItem = inventoryItem;
3430 rajveer 818
        this.type = type;
4496 mandeep.dh 819
        this.quantity = quantity;
5361 mandeep.dh 820
        this.billingWarehouseId = billingWarehouseId;
3430 rajveer 821
      }
822
 
823
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 824
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scan", org.apache.thrift.protocol.TMessageType.CALL, 0));
825
        scan_args args = new scan_args();
5361 mandeep.dh 826
        args.setInventoryItem(inventoryItem);
3430 rajveer 827
        args.setType(type);
4496 mandeep.dh 828
        args.setQuantity(quantity);
5361 mandeep.dh 829
        args.setBillingWarehouseId(billingWarehouseId);
3430 rajveer 830
        args.write(prot);
831
        prot.writeMessageEnd();
832
      }
833
 
834
      public void getResult() throws WarehouseServiceException, org.apache.thrift.TException {
835
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
836
          throw new IllegalStateException("Method call not finished!");
837
        }
838
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
839
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 840
        (new Client(prot)).recv_scan();
3430 rajveer 841
      }
842
    }
843
 
5110 mandeep.dh 844
    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 845
      checkReady();
5110 mandeep.dh 846
      scanSerializedItemForOrder_call method_call = new scanSerializedItemForOrder_call(serialNumber, type, orderId, fulfilmentWarehouseId, quantity, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 847
      this.___currentMethod = method_call;
848
      ___manager.call(method_call);
849
    }
850
 
851
    public static class scanSerializedItemForOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
4555 mandeep.dh 852
      private String serialNumber;
4496 mandeep.dh 853
      private ScanType type;
854
      private long orderId;
5110 mandeep.dh 855
      private long fulfilmentWarehouseId;
856
      private double quantity;
857
      private long billingWarehouseId;
858
      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 859
        super(client, protocolFactory, transport, resultHandler, false);
4555 mandeep.dh 860
        this.serialNumber = serialNumber;
4496 mandeep.dh 861
        this.type = type;
862
        this.orderId = orderId;
5110 mandeep.dh 863
        this.fulfilmentWarehouseId = fulfilmentWarehouseId;
864
        this.quantity = quantity;
865
        this.billingWarehouseId = billingWarehouseId;
4496 mandeep.dh 866
      }
867
 
868
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
869
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanSerializedItemForOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
870
        scanSerializedItemForOrder_args args = new scanSerializedItemForOrder_args();
4555 mandeep.dh 871
        args.setSerialNumber(serialNumber);
4496 mandeep.dh 872
        args.setType(type);
873
        args.setOrderId(orderId);
5110 mandeep.dh 874
        args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
875
        args.setQuantity(quantity);
876
        args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 877
        args.write(prot);
878
        prot.writeMessageEnd();
879
      }
880
 
4555 mandeep.dh 881
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
4496 mandeep.dh 882
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
883
          throw new IllegalStateException("Method call not finished!");
884
        }
885
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
886
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
887
        return (new Client(prot)).recv_scanSerializedItemForOrder();
888
      }
889
    }
890
 
5361 mandeep.dh 891
    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 892
      checkReady();
5361 mandeep.dh 893
      scanForOrder_call method_call = new scanForOrder_call(inventoryItem, type, quantity, orderId, fulfilmentWarehouseId, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 894
      this.___currentMethod = method_call;
895
      ___manager.call(method_call);
896
    }
897
 
898
    public static class scanForOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
5361 mandeep.dh 899
      private InventoryItem inventoryItem;
4496 mandeep.dh 900
      private ScanType type;
901
      private long quantity;
902
      private long orderId;
5110 mandeep.dh 903
      private long fulfilmentWarehouseId;
5361 mandeep.dh 904
      private long billingWarehouseId;
905
      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 906
        super(client, protocolFactory, transport, resultHandler, false);
5361 mandeep.dh 907
        this.inventoryItem = inventoryItem;
4496 mandeep.dh 908
        this.type = type;
909
        this.quantity = quantity;
910
        this.orderId = orderId;
5110 mandeep.dh 911
        this.fulfilmentWarehouseId = fulfilmentWarehouseId;
5361 mandeep.dh 912
        this.billingWarehouseId = billingWarehouseId;
4496 mandeep.dh 913
      }
914
 
915
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
916
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanForOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
917
        scanForOrder_args args = new scanForOrder_args();
5361 mandeep.dh 918
        args.setInventoryItem(inventoryItem);
4496 mandeep.dh 919
        args.setType(type);
920
        args.setQuantity(quantity);
921
        args.setOrderId(orderId);
5110 mandeep.dh 922
        args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
5361 mandeep.dh 923
        args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 924
        args.write(prot);
925
        prot.writeMessageEnd();
926
      }
927
 
5361 mandeep.dh 928
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
4496 mandeep.dh 929
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
930
          throw new IllegalStateException("Method call not finished!");
931
        }
932
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
933
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
5361 mandeep.dh 934
        return (new Client(prot)).recv_scanForOrder();
4496 mandeep.dh 935
      }
936
    }
937
 
938
    public void createItemNumberMapping(String itemNumber, long itemId, org.apache.thrift.async.AsyncMethodCallback<createItemNumberMapping_call> resultHandler) throws org.apache.thrift.TException {
939
      checkReady();
940
      createItemNumberMapping_call method_call = new createItemNumberMapping_call(itemNumber, itemId, resultHandler, this, ___protocolFactory, ___transport);
941
      this.___currentMethod = method_call;
942
      ___manager.call(method_call);
943
    }
944
 
945
    public static class createItemNumberMapping_call extends org.apache.thrift.async.TAsyncMethodCall {
946
      private String itemNumber;
947
      private long itemId;
948
      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 {
949
        super(client, protocolFactory, transport, resultHandler, false);
950
        this.itemNumber = itemNumber;
951
        this.itemId = itemId;
952
      }
953
 
954
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
955
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createItemNumberMapping", org.apache.thrift.protocol.TMessageType.CALL, 0));
956
        createItemNumberMapping_args args = new createItemNumberMapping_args();
957
        args.setItemNumber(itemNumber);
958
        args.setItemId(itemId);
959
        args.write(prot);
960
        prot.writeMessageEnd();
961
      }
962
 
963
      public void getResult() throws org.apache.thrift.TException {
964
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
965
          throw new IllegalStateException("Method call not finished!");
966
        }
967
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
968
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
969
        (new Client(prot)).recv_createItemNumberMapping();
970
      }
971
    }
972
 
4622 amit.gupta 973
    public void getItemNumbers(long itemId, org.apache.thrift.async.AsyncMethodCallback<getItemNumbers_call> resultHandler) throws org.apache.thrift.TException {
974
      checkReady();
975
      getItemNumbers_call method_call = new getItemNumbers_call(itemId, resultHandler, this, ___protocolFactory, ___transport);
976
      this.___currentMethod = method_call;
977
      ___manager.call(method_call);
978
    }
979
 
980
    public static class getItemNumbers_call extends org.apache.thrift.async.TAsyncMethodCall {
981
      private long itemId;
982
      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 {
983
        super(client, protocolFactory, transport, resultHandler, false);
984
        this.itemId = itemId;
985
      }
986
 
987
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
988
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemNumbers", org.apache.thrift.protocol.TMessageType.CALL, 0));
989
        getItemNumbers_args args = new getItemNumbers_args();
990
        args.setItemId(itemId);
991
        args.write(prot);
992
        prot.writeMessageEnd();
993
      }
994
 
995
      public List<String> getResult() throws org.apache.thrift.TException {
996
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
997
          throw new IllegalStateException("Method call not finished!");
998
        }
999
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1000
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1001
        return (new Client(prot)).recv_getItemNumbers();
1002
      }
1003
    }
1004
 
5110 mandeep.dh 1005
    public void getItemIds(String itemNumber, org.apache.thrift.async.AsyncMethodCallback<getItemIds_call> resultHandler) throws org.apache.thrift.TException {
1006
      checkReady();
1007
      getItemIds_call method_call = new getItemIds_call(itemNumber, resultHandler, this, ___protocolFactory, ___transport);
1008
      this.___currentMethod = method_call;
1009
      ___manager.call(method_call);
1010
    }
1011
 
1012
    public static class getItemIds_call extends org.apache.thrift.async.TAsyncMethodCall {
1013
      private String itemNumber;
1014
      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 {
1015
        super(client, protocolFactory, transport, resultHandler, false);
1016
        this.itemNumber = itemNumber;
1017
      }
1018
 
1019
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1020
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemIds", org.apache.thrift.protocol.TMessageType.CALL, 0));
1021
        getItemIds_args args = new getItemIds_args();
1022
        args.setItemNumber(itemNumber);
1023
        args.write(prot);
1024
        prot.writeMessageEnd();
1025
      }
1026
 
1027
      public List<Long> getResult() throws org.apache.thrift.TException {
1028
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1029
          throw new IllegalStateException("Method call not finished!");
1030
        }
1031
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1032
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1033
        return (new Client(prot)).recv_getItemIds();
1034
      }
1035
    }
1036
 
5185 mandeep.dh 1037
    public void getInventoryItemsFromLastScanType(ScanType lastScanType, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemsFromLastScanType_call> resultHandler) throws org.apache.thrift.TException {
1038
      checkReady();
1039
      getInventoryItemsFromLastScanType_call method_call = new getInventoryItemsFromLastScanType_call(lastScanType, resultHandler, this, ___protocolFactory, ___transport);
1040
      this.___currentMethod = method_call;
1041
      ___manager.call(method_call);
1042
    }
1043
 
1044
    public static class getInventoryItemsFromLastScanType_call extends org.apache.thrift.async.TAsyncMethodCall {
1045
      private ScanType lastScanType;
1046
      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 {
1047
        super(client, protocolFactory, transport, resultHandler, false);
1048
        this.lastScanType = lastScanType;
1049
      }
1050
 
1051
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1052
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItemsFromLastScanType", org.apache.thrift.protocol.TMessageType.CALL, 0));
1053
        getInventoryItemsFromLastScanType_args args = new getInventoryItemsFromLastScanType_args();
1054
        args.setLastScanType(lastScanType);
1055
        args.write(prot);
1056
        prot.writeMessageEnd();
1057
      }
1058
 
1059
      public List<InventoryItem> getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1060
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1061
          throw new IllegalStateException("Method call not finished!");
1062
        }
1063
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1064
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1065
        return (new Client(prot)).recv_getInventoryItemsFromLastScanType();
1066
      }
1067
    }
1068
 
1069
    public void getInventoryItemFromId(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemFromId_call> resultHandler) throws org.apache.thrift.TException {
1070
      checkReady();
1071
      getInventoryItemFromId_call method_call = new getInventoryItemFromId_call(inventoryItemId, resultHandler, this, ___protocolFactory, ___transport);
1072
      this.___currentMethod = method_call;
1073
      ___manager.call(method_call);
1074
    }
1075
 
1076
    public static class getInventoryItemFromId_call extends org.apache.thrift.async.TAsyncMethodCall {
1077
      private long inventoryItemId;
1078
      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 {
1079
        super(client, protocolFactory, transport, resultHandler, false);
1080
        this.inventoryItemId = inventoryItemId;
1081
      }
1082
 
1083
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1084
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItemFromId", org.apache.thrift.protocol.TMessageType.CALL, 0));
1085
        getInventoryItemFromId_args args = new getInventoryItemFromId_args();
1086
        args.setInventoryItemId(inventoryItemId);
1087
        args.write(prot);
1088
        prot.writeMessageEnd();
1089
      }
1090
 
1091
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1092
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1093
          throw new IllegalStateException("Method call not finished!");
1094
        }
1095
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1096
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1097
        return (new Client(prot)).recv_getInventoryItemFromId();
1098
      }
1099
    }
1100
 
5372 mandeep.dh 1101
    public void getPurchaseScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getPurchaseScans_call> resultHandler) throws org.apache.thrift.TException {
1102
      checkReady();
1103
      getPurchaseScans_call method_call = new getPurchaseScans_call(startDate, endDate, resultHandler, this, ___protocolFactory, ___transport);
1104
      this.___currentMethod = method_call;
1105
      ___manager.call(method_call);
1106
    }
1107
 
1108
    public static class getPurchaseScans_call extends org.apache.thrift.async.TAsyncMethodCall {
1109
      private long startDate;
1110
      private long endDate;
1111
      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 {
1112
        super(client, protocolFactory, transport, resultHandler, false);
1113
        this.startDate = startDate;
1114
        this.endDate = endDate;
1115
      }
1116
 
1117
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1118
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseScans", org.apache.thrift.protocol.TMessageType.CALL, 0));
1119
        getPurchaseScans_args args = new getPurchaseScans_args();
1120
        args.setStartDate(startDate);
1121
        args.setEndDate(endDate);
1122
        args.write(prot);
1123
        prot.writeMessageEnd();
1124
      }
1125
 
1126
      public List<DetailedPurchaseScan> getResult() throws org.apache.thrift.TException {
1127
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1128
          throw new IllegalStateException("Method call not finished!");
1129
        }
1130
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1131
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1132
        return (new Client(prot)).recv_getPurchaseScans();
1133
      }
1134
    }
1135
 
5496 mandeep.dh 1136
    public void fetchScansPerInvoiceNumber(long date, org.apache.thrift.async.AsyncMethodCallback<fetchScansPerInvoiceNumber_call> resultHandler) throws org.apache.thrift.TException {
1137
      checkReady();
1138
      fetchScansPerInvoiceNumber_call method_call = new fetchScansPerInvoiceNumber_call(date, resultHandler, this, ___protocolFactory, ___transport);
1139
      this.___currentMethod = method_call;
1140
      ___manager.call(method_call);
1141
    }
1142
 
1143
    public static class fetchScansPerInvoiceNumber_call extends org.apache.thrift.async.TAsyncMethodCall {
1144
      private long date;
1145
      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 {
1146
        super(client, protocolFactory, transport, resultHandler, false);
1147
        this.date = date;
1148
      }
1149
 
1150
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1151
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fetchScansPerInvoiceNumber", org.apache.thrift.protocol.TMessageType.CALL, 0));
1152
        fetchScansPerInvoiceNumber_args args = new fetchScansPerInvoiceNumber_args();
1153
        args.setDate(date);
1154
        args.write(prot);
1155
        prot.writeMessageEnd();
1156
      }
1157
 
1158
      public List<InvoiceScan> getResult() throws org.apache.thrift.TException {
1159
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1160
          throw new IllegalStateException("Method call not finished!");
1161
        }
1162
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1163
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1164
        return (new Client(prot)).recv_fetchScansPerInvoiceNumber();
1165
      }
1166
    }
1167
 
5620 mandeep.dh 1168
    public void getInventoryItemFromOrder(long orderId, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemFromOrder_call> resultHandler) throws org.apache.thrift.TException {
1169
      checkReady();
1170
      getInventoryItemFromOrder_call method_call = new getInventoryItemFromOrder_call(orderId, resultHandler, this, ___protocolFactory, ___transport);
1171
      this.___currentMethod = method_call;
1172
      ___manager.call(method_call);
1173
    }
1174
 
1175
    public static class getInventoryItemFromOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1176
      private long orderId;
1177
      public getInventoryItemFromOrder_call(long orderId, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemFromOrder_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1178
        super(client, protocolFactory, transport, resultHandler, false);
1179
        this.orderId = orderId;
1180
      }
1181
 
1182
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1183
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItemFromOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1184
        getInventoryItemFromOrder_args args = new getInventoryItemFromOrder_args();
1185
        args.setOrderId(orderId);
1186
        args.write(prot);
1187
        prot.writeMessageEnd();
1188
      }
1189
 
1190
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1191
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1192
          throw new IllegalStateException("Method call not finished!");
1193
        }
1194
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1195
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1196
        return (new Client(prot)).recv_getInventoryItemFromOrder();
1197
      }
1198
    }
1199
 
5711 mandeep.dh 1200
    public void getInventoryAge(org.apache.thrift.async.AsyncMethodCallback<getInventoryAge_call> resultHandler) throws org.apache.thrift.TException {
1201
      checkReady();
1202
      getInventoryAge_call method_call = new getInventoryAge_call(resultHandler, this, ___protocolFactory, ___transport);
1203
      this.___currentMethod = method_call;
1204
      ___manager.call(method_call);
1205
    }
1206
 
1207
    public static class getInventoryAge_call extends org.apache.thrift.async.TAsyncMethodCall {
1208
      public getInventoryAge_call(org.apache.thrift.async.AsyncMethodCallback<getInventoryAge_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1209
        super(client, protocolFactory, transport, resultHandler, false);
1210
      }
1211
 
1212
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1213
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryAge", org.apache.thrift.protocol.TMessageType.CALL, 0));
1214
        getInventoryAge_args args = new getInventoryAge_args();
1215
        args.write(prot);
1216
        prot.writeMessageEnd();
1217
      }
1218
 
1219
      public List<InventoryAge> getResult() throws org.apache.thrift.TException {
1220
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1221
          throw new IllegalStateException("Method call not finished!");
1222
        }
1223
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1224
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1225
        return (new Client(prot)).recv_getInventoryAge();
1226
      }
1227
    }
1228
 
6322 amar.kumar 1229
    public void getInventoryScansForItem(long itemId, long fromDate, long toDate, org.apache.thrift.async.AsyncMethodCallback<getInventoryScansForItem_call> resultHandler) throws org.apache.thrift.TException {
1230
      checkReady();
1231
      getInventoryScansForItem_call method_call = new getInventoryScansForItem_call(itemId, fromDate, toDate, resultHandler, this, ___protocolFactory, ___transport);
1232
      this.___currentMethod = method_call;
1233
      ___manager.call(method_call);
1234
    }
1235
 
1236
    public static class getInventoryScansForItem_call extends org.apache.thrift.async.TAsyncMethodCall {
1237
      private long itemId;
1238
      private long fromDate;
1239
      private long toDate;
1240
      public getInventoryScansForItem_call(long itemId, long fromDate, long toDate, org.apache.thrift.async.AsyncMethodCallback<getInventoryScansForItem_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1241
        super(client, protocolFactory, transport, resultHandler, false);
1242
        this.itemId = itemId;
1243
        this.fromDate = fromDate;
1244
        this.toDate = toDate;
1245
      }
1246
 
1247
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1248
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryScansForItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
1249
        getInventoryScansForItem_args args = new getInventoryScansForItem_args();
1250
        args.setItemId(itemId);
1251
        args.setFromDate(fromDate);
1252
        args.setToDate(toDate);
1253
        args.write(prot);
1254
        prot.writeMessageEnd();
1255
      }
1256
 
1257
      public List<Scan> getResult() throws org.apache.thrift.TException {
1258
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1259
          throw new IllegalStateException("Method call not finished!");
1260
        }
1261
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1262
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1263
        return (new Client(prot)).recv_getInventoryScansForItem();
1264
      }
1265
    }
1266
 
1267
    public void getScanRecordsForSerialNumber(long serialNumber, org.apache.thrift.async.AsyncMethodCallback<getScanRecordsForSerialNumber_call> resultHandler) throws org.apache.thrift.TException {
1268
      checkReady();
1269
      getScanRecordsForSerialNumber_call method_call = new getScanRecordsForSerialNumber_call(serialNumber, resultHandler, this, ___protocolFactory, ___transport);
1270
      this.___currentMethod = method_call;
1271
      ___manager.call(method_call);
1272
    }
1273
 
1274
    public static class getScanRecordsForSerialNumber_call extends org.apache.thrift.async.TAsyncMethodCall {
1275
      private long serialNumber;
1276
      public getScanRecordsForSerialNumber_call(long serialNumber, org.apache.thrift.async.AsyncMethodCallback<getScanRecordsForSerialNumber_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1277
        super(client, protocolFactory, transport, resultHandler, false);
1278
        this.serialNumber = serialNumber;
1279
      }
1280
 
1281
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1282
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getScanRecordsForSerialNumber", org.apache.thrift.protocol.TMessageType.CALL, 0));
1283
        getScanRecordsForSerialNumber_args args = new getScanRecordsForSerialNumber_args();
1284
        args.setSerialNumber(serialNumber);
1285
        args.write(prot);
1286
        prot.writeMessageEnd();
1287
      }
1288
 
1289
      public List<Scan> getResult() throws org.apache.thrift.TException {
1290
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1291
          throw new IllegalStateException("Method call not finished!");
1292
        }
1293
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1294
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1295
        return (new Client(prot)).recv_getScanRecordsForSerialNumber();
1296
      }
1297
    }
1298
 
6467 amar.kumar 1299
    public void scanForPurchaseReturn(List<InventoryItem> saleReturnItems, long vendorId, org.apache.thrift.async.AsyncMethodCallback<scanForPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1300
      checkReady();
1301
      scanForPurchaseReturn_call method_call = new scanForPurchaseReturn_call(saleReturnItems, vendorId, resultHandler, this, ___protocolFactory, ___transport);
1302
      this.___currentMethod = method_call;
1303
      ___manager.call(method_call);
1304
    }
1305
 
1306
    public static class scanForPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1307
      private List<InventoryItem> saleReturnItems;
1308
      private long vendorId;
1309
      public scanForPurchaseReturn_call(List<InventoryItem> saleReturnItems, long vendorId, org.apache.thrift.async.AsyncMethodCallback<scanForPurchaseReturn_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1310
        super(client, protocolFactory, transport, resultHandler, false);
1311
        this.saleReturnItems = saleReturnItems;
1312
        this.vendorId = vendorId;
1313
      }
1314
 
1315
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1316
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanForPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1317
        scanForPurchaseReturn_args args = new scanForPurchaseReturn_args();
1318
        args.setSaleReturnItems(saleReturnItems);
1319
        args.setVendorId(vendorId);
1320
        args.write(prot);
1321
        prot.writeMessageEnd();
1322
      }
1323
 
1324
      public void getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1325
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1326
          throw new IllegalStateException("Method call not finished!");
1327
        }
1328
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1329
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1330
        (new Client(prot)).recv_scanForPurchaseReturn();
1331
      }
1332
    }
1333
 
6548 amar.kumar 1334
    public void scanForLostItem(List<InventoryItem> lostItems, long vendorId, org.apache.thrift.async.AsyncMethodCallback<scanForLostItem_call> resultHandler) throws org.apache.thrift.TException {
1335
      checkReady();
1336
      scanForLostItem_call method_call = new scanForLostItem_call(lostItems, vendorId, resultHandler, this, ___protocolFactory, ___transport);
1337
      this.___currentMethod = method_call;
1338
      ___manager.call(method_call);
1339
    }
1340
 
1341
    public static class scanForLostItem_call extends org.apache.thrift.async.TAsyncMethodCall {
1342
      private List<InventoryItem> lostItems;
1343
      private long vendorId;
1344
      public scanForLostItem_call(List<InventoryItem> lostItems, long vendorId, org.apache.thrift.async.AsyncMethodCallback<scanForLostItem_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 {
1345
        super(client, protocolFactory, transport, resultHandler, false);
1346
        this.lostItems = lostItems;
1347
        this.vendorId = vendorId;
1348
      }
1349
 
1350
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1351
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanForLostItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
1352
        scanForLostItem_args args = new scanForLostItem_args();
1353
        args.setLostItems(lostItems);
1354
        args.setVendorId(vendorId);
1355
        args.write(prot);
1356
        prot.writeMessageEnd();
1357
      }
1358
 
1359
      public void getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1360
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1361
          throw new IllegalStateException("Method call not finished!");
1362
        }
1363
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1364
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1365
        (new Client(prot)).recv_scanForLostItem();
1366
      }
1367
    }
1368
 
1369
    public void getCurrentSerializedInventoryByScans(org.apache.thrift.async.AsyncMethodCallback<getCurrentSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException {
1370
      checkReady();
1371
      getCurrentSerializedInventoryByScans_call method_call = new getCurrentSerializedInventoryByScans_call(resultHandler, this, ___protocolFactory, ___transport);
1372
      this.___currentMethod = method_call;
1373
      ___manager.call(method_call);
1374
    }
1375
 
1376
    public static class getCurrentSerializedInventoryByScans_call extends org.apache.thrift.async.TAsyncMethodCall {
1377
      public getCurrentSerializedInventoryByScans_call(org.apache.thrift.async.AsyncMethodCallback<getCurrentSerializedInventoryByScans_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 {
1378
        super(client, protocolFactory, transport, resultHandler, false);
1379
      }
1380
 
1381
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1382
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCurrentSerializedInventoryByScans", org.apache.thrift.protocol.TMessageType.CALL, 0));
1383
        getCurrentSerializedInventoryByScans_args args = new getCurrentSerializedInventoryByScans_args();
1384
        args.write(prot);
1385
        prot.writeMessageEnd();
1386
      }
1387
 
1388
      public List<InventoryAvailability> getResult() throws org.apache.thrift.TException {
1389
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1390
          throw new IllegalStateException("Method call not finished!");
1391
        }
1392
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1393
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1394
        return (new Client(prot)).recv_getCurrentSerializedInventoryByScans();
1395
      }
1396
    }
1397
 
3430 rajveer 1398
  }
1399
 
1400
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1401
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1402
    public Processor(I iface) {
1403
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
1404
    }
1405
 
1406
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
1407
      super(iface, getProcessMap(processMap));
1408
    }
1409
 
1410
    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 1411
      processMap.put("getInventoryItem", new getInventoryItem());
5361 mandeep.dh 1412
      processMap.put("getNonSeralizedInventoryItem", new getNonSeralizedInventoryItem());
4496 mandeep.dh 1413
      processMap.put("scan", new scan());
1414
      processMap.put("scanSerializedItemForOrder", new scanSerializedItemForOrder());
1415
      processMap.put("scanForOrder", new scanForOrder());
1416
      processMap.put("createItemNumberMapping", new createItemNumberMapping());
4622 amit.gupta 1417
      processMap.put("getItemNumbers", new getItemNumbers());
5110 mandeep.dh 1418
      processMap.put("getItemIds", new getItemIds());
5185 mandeep.dh 1419
      processMap.put("getInventoryItemsFromLastScanType", new getInventoryItemsFromLastScanType());
1420
      processMap.put("getInventoryItemFromId", new getInventoryItemFromId());
5372 mandeep.dh 1421
      processMap.put("getPurchaseScans", new getPurchaseScans());
5496 mandeep.dh 1422
      processMap.put("fetchScansPerInvoiceNumber", new fetchScansPerInvoiceNumber());
5620 mandeep.dh 1423
      processMap.put("getInventoryItemFromOrder", new getInventoryItemFromOrder());
5711 mandeep.dh 1424
      processMap.put("getInventoryAge", new getInventoryAge());
6322 amar.kumar 1425
      processMap.put("getInventoryScansForItem", new getInventoryScansForItem());
1426
      processMap.put("getScanRecordsForSerialNumber", new getScanRecordsForSerialNumber());
6467 amar.kumar 1427
      processMap.put("scanForPurchaseReturn", new scanForPurchaseReturn());
6548 amar.kumar 1428
      processMap.put("scanForLostItem", new scanForLostItem());
1429
      processMap.put("getCurrentSerializedInventoryByScans", new getCurrentSerializedInventoryByScans());
3430 rajveer 1430
      return processMap;
1431
    }
1432
 
4496 mandeep.dh 1433
    private static class getInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItem_args> {
1434
      public getInventoryItem() {
1435
        super("getInventoryItem");
3430 rajveer 1436
      }
1437
 
4496 mandeep.dh 1438
      protected getInventoryItem_args getEmptyArgsInstance() {
1439
        return new getInventoryItem_args();
3430 rajveer 1440
      }
1441
 
4496 mandeep.dh 1442
      protected getInventoryItem_result getResult(I iface, getInventoryItem_args args) throws org.apache.thrift.TException {
1443
        getInventoryItem_result result = new getInventoryItem_result();
4541 mandeep.dh 1444
        try {
1445
          result.success = iface.getInventoryItem(args.serialNumber);
1446
        } catch (WarehouseServiceException wex) {
1447
          result.wex = wex;
1448
        }
3430 rajveer 1449
        return result;
2832 chandransh 1450
      }
1451
    }
1452
 
5361 mandeep.dh 1453
    private static class getNonSeralizedInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getNonSeralizedInventoryItem_args> {
1454
      public getNonSeralizedInventoryItem() {
1455
        super("getNonSeralizedInventoryItem");
3430 rajveer 1456
      }
1457
 
5361 mandeep.dh 1458
      protected getNonSeralizedInventoryItem_args getEmptyArgsInstance() {
1459
        return new getNonSeralizedInventoryItem_args();
3430 rajveer 1460
      }
1461
 
5361 mandeep.dh 1462
      protected getNonSeralizedInventoryItem_result getResult(I iface, getNonSeralizedInventoryItem_args args) throws org.apache.thrift.TException {
1463
        getNonSeralizedInventoryItem_result result = new getNonSeralizedInventoryItem_result();
1464
        try {
5530 mandeep.dh 1465
          result.success = iface.getNonSeralizedInventoryItem(args.itemNumber, args.itemId, args.fulfilmentWarehouseId);
5361 mandeep.dh 1466
        } catch (WarehouseServiceException wex) {
1467
          result.wex = wex;
1468
        }
3430 rajveer 1469
        return result;
2820 chandransh 1470
      }
1471
    }
1472
 
4496 mandeep.dh 1473
    private static class scan<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scan_args> {
1474
      public scan() {
1475
        super("scan");
3430 rajveer 1476
      }
1477
 
4496 mandeep.dh 1478
      protected scan_args getEmptyArgsInstance() {
1479
        return new scan_args();
3430 rajveer 1480
      }
1481
 
4496 mandeep.dh 1482
      protected scan_result getResult(I iface, scan_args args) throws org.apache.thrift.TException {
1483
        scan_result result = new scan_result();
3383 chandransh 1484
        try {
5361 mandeep.dh 1485
          iface.scan(args.inventoryItem, args.type, args.quantity, args.billingWarehouseId);
3383 chandransh 1486
        } catch (WarehouseServiceException wex) {
1487
          result.wex = wex;
1488
        }
3430 rajveer 1489
        return result;
3383 chandransh 1490
      }
1491
    }
1492
 
4496 mandeep.dh 1493
    private static class scanSerializedItemForOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanSerializedItemForOrder_args> {
1494
      public scanSerializedItemForOrder() {
1495
        super("scanSerializedItemForOrder");
3430 rajveer 1496
      }
1497
 
4496 mandeep.dh 1498
      protected scanSerializedItemForOrder_args getEmptyArgsInstance() {
1499
        return new scanSerializedItemForOrder_args();
3430 rajveer 1500
      }
1501
 
4496 mandeep.dh 1502
      protected scanSerializedItemForOrder_result getResult(I iface, scanSerializedItemForOrder_args args) throws org.apache.thrift.TException {
1503
        scanSerializedItemForOrder_result result = new scanSerializedItemForOrder_result();
2820 chandransh 1504
        try {
5110 mandeep.dh 1505
          result.success = iface.scanSerializedItemForOrder(args.serialNumber, args.type, args.orderId, args.fulfilmentWarehouseId, args.quantity, args.billingWarehouseId);
2820 chandransh 1506
        } catch (WarehouseServiceException wex) {
1507
          result.wex = wex;
1508
        }
3430 rajveer 1509
        return result;
2820 chandransh 1510
      }
1511
    }
1512
 
4496 mandeep.dh 1513
    private static class scanForOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanForOrder_args> {
1514
      public scanForOrder() {
1515
        super("scanForOrder");
3430 rajveer 1516
      }
1517
 
4496 mandeep.dh 1518
      protected scanForOrder_args getEmptyArgsInstance() {
1519
        return new scanForOrder_args();
3430 rajveer 1520
      }
1521
 
4496 mandeep.dh 1522
      protected scanForOrder_result getResult(I iface, scanForOrder_args args) throws org.apache.thrift.TException {
1523
        scanForOrder_result result = new scanForOrder_result();
2820 chandransh 1524
        try {
5361 mandeep.dh 1525
          result.success = iface.scanForOrder(args.inventoryItem, args.type, args.quantity, args.orderId, args.fulfilmentWarehouseId, args.billingWarehouseId);
2820 chandransh 1526
        } catch (WarehouseServiceException wex) {
1527
          result.wex = wex;
1528
        }
3430 rajveer 1529
        return result;
2820 chandransh 1530
      }
1531
    }
1532
 
4496 mandeep.dh 1533
    private static class createItemNumberMapping<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createItemNumberMapping_args> {
1534
      public createItemNumberMapping() {
1535
        super("createItemNumberMapping");
1536
      }
1537
 
1538
      protected createItemNumberMapping_args getEmptyArgsInstance() {
1539
        return new createItemNumberMapping_args();
1540
      }
1541
 
1542
      protected createItemNumberMapping_result getResult(I iface, createItemNumberMapping_args args) throws org.apache.thrift.TException {
1543
        createItemNumberMapping_result result = new createItemNumberMapping_result();
1544
        iface.createItemNumberMapping(args.itemNumber, args.itemId);
1545
        return result;
1546
      }
1547
    }
1548
 
4622 amit.gupta 1549
    private static class getItemNumbers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemNumbers_args> {
1550
      public getItemNumbers() {
1551
        super("getItemNumbers");
1552
      }
1553
 
1554
      protected getItemNumbers_args getEmptyArgsInstance() {
1555
        return new getItemNumbers_args();
1556
      }
1557
 
1558
      protected getItemNumbers_result getResult(I iface, getItemNumbers_args args) throws org.apache.thrift.TException {
1559
        getItemNumbers_result result = new getItemNumbers_result();
1560
        result.success = iface.getItemNumbers(args.itemId);
1561
        return result;
1562
      }
1563
    }
1564
 
5110 mandeep.dh 1565
    private static class getItemIds<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemIds_args> {
1566
      public getItemIds() {
1567
        super("getItemIds");
1568
      }
1569
 
1570
      protected getItemIds_args getEmptyArgsInstance() {
1571
        return new getItemIds_args();
1572
      }
1573
 
1574
      protected getItemIds_result getResult(I iface, getItemIds_args args) throws org.apache.thrift.TException {
1575
        getItemIds_result result = new getItemIds_result();
1576
        result.success = iface.getItemIds(args.itemNumber);
1577
        return result;
1578
      }
1579
    }
1580
 
5185 mandeep.dh 1581
    private static class getInventoryItemsFromLastScanType<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItemsFromLastScanType_args> {
1582
      public getInventoryItemsFromLastScanType() {
1583
        super("getInventoryItemsFromLastScanType");
1584
      }
1585
 
1586
      protected getInventoryItemsFromLastScanType_args getEmptyArgsInstance() {
1587
        return new getInventoryItemsFromLastScanType_args();
1588
      }
1589
 
1590
      protected getInventoryItemsFromLastScanType_result getResult(I iface, getInventoryItemsFromLastScanType_args args) throws org.apache.thrift.TException {
1591
        getInventoryItemsFromLastScanType_result result = new getInventoryItemsFromLastScanType_result();
1592
        try {
1593
          result.success = iface.getInventoryItemsFromLastScanType(args.lastScanType);
1594
        } catch (WarehouseServiceException wex) {
1595
          result.wex = wex;
1596
        }
1597
        return result;
1598
      }
1599
    }
1600
 
1601
    private static class getInventoryItemFromId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItemFromId_args> {
1602
      public getInventoryItemFromId() {
1603
        super("getInventoryItemFromId");
1604
      }
1605
 
1606
      protected getInventoryItemFromId_args getEmptyArgsInstance() {
1607
        return new getInventoryItemFromId_args();
1608
      }
1609
 
1610
      protected getInventoryItemFromId_result getResult(I iface, getInventoryItemFromId_args args) throws org.apache.thrift.TException {
1611
        getInventoryItemFromId_result result = new getInventoryItemFromId_result();
1612
        try {
1613
          result.success = iface.getInventoryItemFromId(args.inventoryItemId);
1614
        } catch (WarehouseServiceException wex) {
1615
          result.wex = wex;
1616
        }
1617
        return result;
1618
      }
1619
    }
1620
 
5372 mandeep.dh 1621
    private static class getPurchaseScans<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseScans_args> {
1622
      public getPurchaseScans() {
1623
        super("getPurchaseScans");
1624
      }
1625
 
1626
      protected getPurchaseScans_args getEmptyArgsInstance() {
1627
        return new getPurchaseScans_args();
1628
      }
1629
 
1630
      protected getPurchaseScans_result getResult(I iface, getPurchaseScans_args args) throws org.apache.thrift.TException {
1631
        getPurchaseScans_result result = new getPurchaseScans_result();
1632
        result.success = iface.getPurchaseScans(args.startDate, args.endDate);
1633
        return result;
1634
      }
1635
    }
1636
 
5496 mandeep.dh 1637
    private static class fetchScansPerInvoiceNumber<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fetchScansPerInvoiceNumber_args> {
1638
      public fetchScansPerInvoiceNumber() {
1639
        super("fetchScansPerInvoiceNumber");
1640
      }
1641
 
1642
      protected fetchScansPerInvoiceNumber_args getEmptyArgsInstance() {
1643
        return new fetchScansPerInvoiceNumber_args();
1644
      }
1645
 
1646
      protected fetchScansPerInvoiceNumber_result getResult(I iface, fetchScansPerInvoiceNumber_args args) throws org.apache.thrift.TException {
1647
        fetchScansPerInvoiceNumber_result result = new fetchScansPerInvoiceNumber_result();
1648
        result.success = iface.fetchScansPerInvoiceNumber(args.date);
1649
        return result;
1650
      }
1651
    }
1652
 
5620 mandeep.dh 1653
    private static class getInventoryItemFromOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItemFromOrder_args> {
1654
      public getInventoryItemFromOrder() {
1655
        super("getInventoryItemFromOrder");
1656
      }
1657
 
1658
      protected getInventoryItemFromOrder_args getEmptyArgsInstance() {
1659
        return new getInventoryItemFromOrder_args();
1660
      }
1661
 
1662
      protected getInventoryItemFromOrder_result getResult(I iface, getInventoryItemFromOrder_args args) throws org.apache.thrift.TException {
1663
        getInventoryItemFromOrder_result result = new getInventoryItemFromOrder_result();
1664
        try {
1665
          result.success = iface.getInventoryItemFromOrder(args.orderId);
1666
        } catch (WarehouseServiceException we) {
1667
          result.we = we;
1668
        }
1669
        return result;
1670
      }
1671
    }
1672
 
5711 mandeep.dh 1673
    private static class getInventoryAge<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryAge_args> {
1674
      public getInventoryAge() {
1675
        super("getInventoryAge");
1676
      }
1677
 
1678
      protected getInventoryAge_args getEmptyArgsInstance() {
1679
        return new getInventoryAge_args();
1680
      }
1681
 
1682
      protected getInventoryAge_result getResult(I iface, getInventoryAge_args args) throws org.apache.thrift.TException {
1683
        getInventoryAge_result result = new getInventoryAge_result();
1684
        result.success = iface.getInventoryAge();
1685
        return result;
1686
      }
1687
    }
1688
 
6322 amar.kumar 1689
    private static class getInventoryScansForItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryScansForItem_args> {
1690
      public getInventoryScansForItem() {
1691
        super("getInventoryScansForItem");
1692
      }
1693
 
1694
      protected getInventoryScansForItem_args getEmptyArgsInstance() {
1695
        return new getInventoryScansForItem_args();
1696
      }
1697
 
1698
      protected getInventoryScansForItem_result getResult(I iface, getInventoryScansForItem_args args) throws org.apache.thrift.TException {
1699
        getInventoryScansForItem_result result = new getInventoryScansForItem_result();
1700
        result.success = iface.getInventoryScansForItem(args.itemId, args.fromDate, args.toDate);
1701
        return result;
1702
      }
1703
    }
1704
 
1705
    private static class getScanRecordsForSerialNumber<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getScanRecordsForSerialNumber_args> {
1706
      public getScanRecordsForSerialNumber() {
1707
        super("getScanRecordsForSerialNumber");
1708
      }
1709
 
1710
      protected getScanRecordsForSerialNumber_args getEmptyArgsInstance() {
1711
        return new getScanRecordsForSerialNumber_args();
1712
      }
1713
 
1714
      protected getScanRecordsForSerialNumber_result getResult(I iface, getScanRecordsForSerialNumber_args args) throws org.apache.thrift.TException {
1715
        getScanRecordsForSerialNumber_result result = new getScanRecordsForSerialNumber_result();
1716
        result.success = iface.getScanRecordsForSerialNumber(args.serialNumber);
1717
        return result;
1718
      }
1719
    }
1720
 
6467 amar.kumar 1721
    private static class scanForPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanForPurchaseReturn_args> {
1722
      public scanForPurchaseReturn() {
1723
        super("scanForPurchaseReturn");
1724
      }
1725
 
1726
      protected scanForPurchaseReturn_args getEmptyArgsInstance() {
1727
        return new scanForPurchaseReturn_args();
1728
      }
1729
 
1730
      protected scanForPurchaseReturn_result getResult(I iface, scanForPurchaseReturn_args args) throws org.apache.thrift.TException {
1731
        scanForPurchaseReturn_result result = new scanForPurchaseReturn_result();
1732
        try {
1733
          iface.scanForPurchaseReturn(args.saleReturnItems, args.vendorId);
1734
        } catch (WarehouseServiceException ex) {
1735
          result.ex = ex;
1736
        }
1737
        return result;
1738
      }
1739
    }
1740
 
6548 amar.kumar 1741
    private static class scanForLostItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanForLostItem_args> {
1742
      public scanForLostItem() {
1743
        super("scanForLostItem");
1744
      }
1745
 
1746
      protected scanForLostItem_args getEmptyArgsInstance() {
1747
        return new scanForLostItem_args();
1748
      }
1749
 
1750
      protected scanForLostItem_result getResult(I iface, scanForLostItem_args args) throws org.apache.thrift.TException {
1751
        scanForLostItem_result result = new scanForLostItem_result();
1752
        try {
1753
          iface.scanForLostItem(args.lostItems, args.vendorId);
1754
        } catch (WarehouseServiceException ex) {
1755
          result.ex = ex;
1756
        }
1757
        return result;
1758
      }
1759
    }
1760
 
1761
    private static class getCurrentSerializedInventoryByScans<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCurrentSerializedInventoryByScans_args> {
1762
      public getCurrentSerializedInventoryByScans() {
1763
        super("getCurrentSerializedInventoryByScans");
1764
      }
1765
 
1766
      protected getCurrentSerializedInventoryByScans_args getEmptyArgsInstance() {
1767
        return new getCurrentSerializedInventoryByScans_args();
1768
      }
1769
 
1770
      protected getCurrentSerializedInventoryByScans_result getResult(I iface, getCurrentSerializedInventoryByScans_args args) throws org.apache.thrift.TException {
1771
        getCurrentSerializedInventoryByScans_result result = new getCurrentSerializedInventoryByScans_result();
1772
        result.success = iface.getCurrentSerializedInventoryByScans();
1773
        return result;
1774
      }
1775
    }
1776
 
2820 chandransh 1777
  }
1778
 
4496 mandeep.dh 1779
  public static class getInventoryItem_args implements org.apache.thrift.TBase<getInventoryItem_args, getInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
1780
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_args");
2832 chandransh 1781
 
4496 mandeep.dh 1782
    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 1783
 
4496 mandeep.dh 1784
    private String serialNumber; // required
2832 chandransh 1785
 
1786
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 1787
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 1788
      SERIAL_NUMBER((short)1, "serialNumber");
2832 chandransh 1789
 
1790
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1791
 
1792
      static {
1793
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1794
          byName.put(field.getFieldName(), field);
1795
        }
1796
      }
1797
 
1798
      /**
1799
       * Find the _Fields constant that matches fieldId, or null if its not found.
1800
       */
1801
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 1802
        switch(fieldId) {
4496 mandeep.dh 1803
          case 1: // SERIAL_NUMBER
1804
            return SERIAL_NUMBER;
3430 rajveer 1805
          default:
1806
            return null;
1807
        }
2832 chandransh 1808
      }
1809
 
1810
      /**
1811
       * Find the _Fields constant that matches fieldId, throwing an exception
1812
       * if it is not found.
1813
       */
1814
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1815
        _Fields fields = findByThriftId(fieldId);
1816
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1817
        return fields;
1818
      }
1819
 
1820
      /**
1821
       * Find the _Fields constant that matches name, or null if its not found.
1822
       */
1823
      public static _Fields findByName(String name) {
1824
        return byName.get(name);
1825
      }
1826
 
1827
      private final short _thriftId;
1828
      private final String _fieldName;
1829
 
1830
      _Fields(short thriftId, String fieldName) {
1831
        _thriftId = thriftId;
1832
        _fieldName = fieldName;
1833
      }
1834
 
1835
      public short getThriftFieldId() {
1836
        return _thriftId;
1837
      }
1838
 
1839
      public String getFieldName() {
1840
        return _fieldName;
1841
      }
1842
    }
1843
 
1844
    // isset id assignments
1845
 
3430 rajveer 1846
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2832 chandransh 1847
    static {
3430 rajveer 1848
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 1849
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1850
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
3430 rajveer 1851
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 1852
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItem_args.class, metaDataMap);
2832 chandransh 1853
    }
1854
 
4496 mandeep.dh 1855
    public getInventoryItem_args() {
2832 chandransh 1856
    }
1857
 
4496 mandeep.dh 1858
    public getInventoryItem_args(
1859
      String serialNumber)
2832 chandransh 1860
    {
1861
      this();
4496 mandeep.dh 1862
      this.serialNumber = serialNumber;
2832 chandransh 1863
    }
1864
 
1865
    /**
1866
     * Performs a deep copy on <i>other</i>.
1867
     */
4496 mandeep.dh 1868
    public getInventoryItem_args(getInventoryItem_args other) {
1869
      if (other.isSetSerialNumber()) {
1870
        this.serialNumber = other.serialNumber;
1871
      }
2832 chandransh 1872
    }
1873
 
4496 mandeep.dh 1874
    public getInventoryItem_args deepCopy() {
1875
      return new getInventoryItem_args(this);
2832 chandransh 1876
    }
1877
 
3430 rajveer 1878
    @Override
1879
    public void clear() {
4496 mandeep.dh 1880
      this.serialNumber = null;
2832 chandransh 1881
    }
1882
 
4496 mandeep.dh 1883
    public String getSerialNumber() {
1884
      return this.serialNumber;
2832 chandransh 1885
    }
1886
 
4496 mandeep.dh 1887
    public void setSerialNumber(String serialNumber) {
1888
      this.serialNumber = serialNumber;
2832 chandransh 1889
    }
1890
 
4496 mandeep.dh 1891
    public void unsetSerialNumber() {
1892
      this.serialNumber = null;
2832 chandransh 1893
    }
1894
 
4496 mandeep.dh 1895
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
1896
    public boolean isSetSerialNumber() {
1897
      return this.serialNumber != null;
2832 chandransh 1898
    }
1899
 
4496 mandeep.dh 1900
    public void setSerialNumberIsSet(boolean value) {
1901
      if (!value) {
1902
        this.serialNumber = null;
1903
      }
2832 chandransh 1904
    }
1905
 
1906
    public void setFieldValue(_Fields field, Object value) {
1907
      switch (field) {
4496 mandeep.dh 1908
      case SERIAL_NUMBER:
2832 chandransh 1909
        if (value == null) {
4496 mandeep.dh 1910
          unsetSerialNumber();
2832 chandransh 1911
        } else {
4496 mandeep.dh 1912
          setSerialNumber((String)value);
2832 chandransh 1913
        }
1914
        break;
1915
 
1916
      }
1917
    }
1918
 
1919
    public Object getFieldValue(_Fields field) {
1920
      switch (field) {
4496 mandeep.dh 1921
      case SERIAL_NUMBER:
1922
        return getSerialNumber();
2832 chandransh 1923
 
1924
      }
1925
      throw new IllegalStateException();
1926
    }
1927
 
3430 rajveer 1928
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1929
    public boolean isSet(_Fields field) {
1930
      if (field == null) {
1931
        throw new IllegalArgumentException();
1932
      }
2832 chandransh 1933
 
1934
      switch (field) {
4496 mandeep.dh 1935
      case SERIAL_NUMBER:
1936
        return isSetSerialNumber();
2832 chandransh 1937
      }
1938
      throw new IllegalStateException();
1939
    }
1940
 
1941
    @Override
1942
    public boolean equals(Object that) {
1943
      if (that == null)
1944
        return false;
4496 mandeep.dh 1945
      if (that instanceof getInventoryItem_args)
1946
        return this.equals((getInventoryItem_args)that);
2832 chandransh 1947
      return false;
1948
    }
1949
 
4496 mandeep.dh 1950
    public boolean equals(getInventoryItem_args that) {
2832 chandransh 1951
      if (that == null)
1952
        return false;
1953
 
4496 mandeep.dh 1954
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
1955
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
1956
      if (this_present_serialNumber || that_present_serialNumber) {
1957
        if (!(this_present_serialNumber && that_present_serialNumber))
2832 chandransh 1958
          return false;
4496 mandeep.dh 1959
        if (!this.serialNumber.equals(that.serialNumber))
2832 chandransh 1960
          return false;
1961
      }
1962
 
1963
      return true;
1964
    }
1965
 
1966
    @Override
1967
    public int hashCode() {
1968
      return 0;
1969
    }
1970
 
4496 mandeep.dh 1971
    public int compareTo(getInventoryItem_args other) {
2832 chandransh 1972
      if (!getClass().equals(other.getClass())) {
1973
        return getClass().getName().compareTo(other.getClass().getName());
1974
      }
1975
 
1976
      int lastComparison = 0;
4496 mandeep.dh 1977
      getInventoryItem_args typedOther = (getInventoryItem_args)other;
2832 chandransh 1978
 
4496 mandeep.dh 1979
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
2832 chandransh 1980
      if (lastComparison != 0) {
1981
        return lastComparison;
1982
      }
4496 mandeep.dh 1983
      if (isSetSerialNumber()) {
1984
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
3430 rajveer 1985
        if (lastComparison != 0) {
1986
          return lastComparison;
1987
        }
2832 chandransh 1988
      }
1989
      return 0;
1990
    }
1991
 
3430 rajveer 1992
    public _Fields fieldForId(int fieldId) {
1993
      return _Fields.findByThriftId(fieldId);
1994
    }
1995
 
1996
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1997
      org.apache.thrift.protocol.TField field;
2832 chandransh 1998
      iprot.readStructBegin();
1999
      while (true)
2000
      {
2001
        field = iprot.readFieldBegin();
3430 rajveer 2002
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2832 chandransh 2003
          break;
2004
        }
3430 rajveer 2005
        switch (field.id) {
4496 mandeep.dh 2006
          case 1: // SERIAL_NUMBER
2007
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
2008
              this.serialNumber = iprot.readString();
3430 rajveer 2009
            } else { 
2010
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2011
            }
2012
            break;
2013
          default:
2014
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2832 chandransh 2015
        }
3430 rajveer 2016
        iprot.readFieldEnd();
2832 chandransh 2017
      }
2018
      iprot.readStructEnd();
2019
      validate();
2020
    }
2021
 
3430 rajveer 2022
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2832 chandransh 2023
      validate();
2024
 
2025
      oprot.writeStructBegin(STRUCT_DESC);
4496 mandeep.dh 2026
      if (this.serialNumber != null) {
2027
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
2028
        oprot.writeString(this.serialNumber);
2029
        oprot.writeFieldEnd();
2030
      }
2832 chandransh 2031
      oprot.writeFieldStop();
2032
      oprot.writeStructEnd();
2033
    }
2034
 
2035
    @Override
2036
    public String toString() {
4496 mandeep.dh 2037
      StringBuilder sb = new StringBuilder("getInventoryItem_args(");
2832 chandransh 2038
      boolean first = true;
2039
 
4496 mandeep.dh 2040
      sb.append("serialNumber:");
2041
      if (this.serialNumber == null) {
2042
        sb.append("null");
2043
      } else {
2044
        sb.append(this.serialNumber);
2045
      }
2832 chandransh 2046
      first = false;
2047
      sb.append(")");
2048
      return sb.toString();
2049
    }
2050
 
3430 rajveer 2051
    public void validate() throws org.apache.thrift.TException {
2832 chandransh 2052
      // check for required fields
2053
    }
2054
 
3430 rajveer 2055
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2056
      try {
2057
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2058
      } catch (org.apache.thrift.TException te) {
2059
        throw new java.io.IOException(te);
2060
      }
2061
    }
2062
 
2063
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2064
      try {
2065
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2066
      } catch (org.apache.thrift.TException te) {
2067
        throw new java.io.IOException(te);
2068
      }
2069
    }
2070
 
2832 chandransh 2071
  }
2072
 
4496 mandeep.dh 2073
  public static class getInventoryItem_result implements org.apache.thrift.TBase<getInventoryItem_result, getInventoryItem_result._Fields>, java.io.Serializable, Cloneable   {
2074
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_result");
2832 chandransh 2075
 
3430 rajveer 2076
    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 2077
    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 2078
 
4496 mandeep.dh 2079
    private InventoryItem success; // required
4541 mandeep.dh 2080
    private WarehouseServiceException wex; // required
2832 chandransh 2081
 
2082
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2083
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4541 mandeep.dh 2084
      SUCCESS((short)0, "success"),
2085
      WEX((short)1, "wex");
2832 chandransh 2086
 
2087
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2088
 
2089
      static {
2090
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2091
          byName.put(field.getFieldName(), field);
2092
        }
2093
      }
2094
 
2095
      /**
2096
       * Find the _Fields constant that matches fieldId, or null if its not found.
2097
       */
2098
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2099
        switch(fieldId) {
2100
          case 0: // SUCCESS
2101
            return SUCCESS;
4541 mandeep.dh 2102
          case 1: // WEX
2103
            return WEX;
3430 rajveer 2104
          default:
2105
            return null;
2106
        }
2832 chandransh 2107
      }
2108
 
2109
      /**
2110
       * Find the _Fields constant that matches fieldId, throwing an exception
2111
       * if it is not found.
2112
       */
2113
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2114
        _Fields fields = findByThriftId(fieldId);
2115
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2116
        return fields;
2117
      }
2118
 
2119
      /**
2120
       * Find the _Fields constant that matches name, or null if its not found.
2121
       */
2122
      public static _Fields findByName(String name) {
2123
        return byName.get(name);
2124
      }
2125
 
2126
      private final short _thriftId;
2127
      private final String _fieldName;
2128
 
2129
      _Fields(short thriftId, String fieldName) {
2130
        _thriftId = thriftId;
2131
        _fieldName = fieldName;
2132
      }
2133
 
2134
      public short getThriftFieldId() {
2135
        return _thriftId;
2136
      }
2137
 
2138
      public String getFieldName() {
2139
        return _fieldName;
2140
      }
2141
    }
2142
 
2143
    // isset id assignments
2144
 
3430 rajveer 2145
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2832 chandransh 2146
    static {
3430 rajveer 2147
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2148
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 2149
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
4541 mandeep.dh 2150
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2151
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3430 rajveer 2152
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 2153
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItem_result.class, metaDataMap);
2832 chandransh 2154
    }
2155
 
4496 mandeep.dh 2156
    public getInventoryItem_result() {
2832 chandransh 2157
    }
2158
 
4496 mandeep.dh 2159
    public getInventoryItem_result(
4541 mandeep.dh 2160
      InventoryItem success,
2161
      WarehouseServiceException wex)
2832 chandransh 2162
    {
2163
      this();
2164
      this.success = success;
4541 mandeep.dh 2165
      this.wex = wex;
2832 chandransh 2166
    }
2167
 
2168
    /**
2169
     * Performs a deep copy on <i>other</i>.
2170
     */
4496 mandeep.dh 2171
    public getInventoryItem_result(getInventoryItem_result other) {
2832 chandransh 2172
      if (other.isSetSuccess()) {
4496 mandeep.dh 2173
        this.success = new InventoryItem(other.success);
2832 chandransh 2174
      }
4541 mandeep.dh 2175
      if (other.isSetWex()) {
2176
        this.wex = new WarehouseServiceException(other.wex);
2177
      }
2832 chandransh 2178
    }
2179
 
4496 mandeep.dh 2180
    public getInventoryItem_result deepCopy() {
2181
      return new getInventoryItem_result(this);
2832 chandransh 2182
    }
2183
 
3430 rajveer 2184
    @Override
2185
    public void clear() {
2186
      this.success = null;
4541 mandeep.dh 2187
      this.wex = null;
2832 chandransh 2188
    }
2189
 
4496 mandeep.dh 2190
    public InventoryItem getSuccess() {
2832 chandransh 2191
      return this.success;
2192
    }
2193
 
4496 mandeep.dh 2194
    public void setSuccess(InventoryItem success) {
2832 chandransh 2195
      this.success = success;
2196
    }
2197
 
2198
    public void unsetSuccess() {
2199
      this.success = null;
2200
    }
2201
 
3430 rajveer 2202
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2832 chandransh 2203
    public boolean isSetSuccess() {
2204
      return this.success != null;
2205
    }
2206
 
2207
    public void setSuccessIsSet(boolean value) {
2208
      if (!value) {
2209
        this.success = null;
2210
      }
2211
    }
2212
 
4541 mandeep.dh 2213
    public WarehouseServiceException getWex() {
2214
      return this.wex;
2215
    }
2216
 
2217
    public void setWex(WarehouseServiceException wex) {
2218
      this.wex = wex;
2219
    }
2220
 
2221
    public void unsetWex() {
2222
      this.wex = null;
2223
    }
2224
 
2225
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2226
    public boolean isSetWex() {
2227
      return this.wex != null;
2228
    }
2229
 
2230
    public void setWexIsSet(boolean value) {
2231
      if (!value) {
2232
        this.wex = null;
2233
      }
2234
    }
2235
 
2832 chandransh 2236
    public void setFieldValue(_Fields field, Object value) {
2237
      switch (field) {
2238
      case SUCCESS:
2239
        if (value == null) {
2240
          unsetSuccess();
2241
        } else {
4496 mandeep.dh 2242
          setSuccess((InventoryItem)value);
2832 chandransh 2243
        }
2244
        break;
2245
 
4541 mandeep.dh 2246
      case WEX:
2247
        if (value == null) {
2248
          unsetWex();
2249
        } else {
2250
          setWex((WarehouseServiceException)value);
2251
        }
2252
        break;
2253
 
2832 chandransh 2254
      }
2255
    }
2256
 
2257
    public Object getFieldValue(_Fields field) {
2258
      switch (field) {
2259
      case SUCCESS:
2260
        return getSuccess();
2261
 
4541 mandeep.dh 2262
      case WEX:
2263
        return getWex();
2264
 
2832 chandransh 2265
      }
2266
      throw new IllegalStateException();
2267
    }
2268
 
3430 rajveer 2269
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2270
    public boolean isSet(_Fields field) {
2271
      if (field == null) {
2272
        throw new IllegalArgumentException();
2273
      }
2832 chandransh 2274
 
2275
      switch (field) {
2276
      case SUCCESS:
2277
        return isSetSuccess();
4541 mandeep.dh 2278
      case WEX:
2279
        return isSetWex();
2832 chandransh 2280
      }
2281
      throw new IllegalStateException();
2282
    }
2283
 
2284
    @Override
2285
    public boolean equals(Object that) {
2286
      if (that == null)
2287
        return false;
4496 mandeep.dh 2288
      if (that instanceof getInventoryItem_result)
2289
        return this.equals((getInventoryItem_result)that);
2832 chandransh 2290
      return false;
2291
    }
2292
 
4496 mandeep.dh 2293
    public boolean equals(getInventoryItem_result that) {
2832 chandransh 2294
      if (that == null)
2295
        return false;
2296
 
2297
      boolean this_present_success = true && this.isSetSuccess();
2298
      boolean that_present_success = true && that.isSetSuccess();
2299
      if (this_present_success || that_present_success) {
2300
        if (!(this_present_success && that_present_success))
2301
          return false;
2302
        if (!this.success.equals(that.success))
2303
          return false;
2304
      }
2305
 
4541 mandeep.dh 2306
      boolean this_present_wex = true && this.isSetWex();
2307
      boolean that_present_wex = true && that.isSetWex();
2308
      if (this_present_wex || that_present_wex) {
2309
        if (!(this_present_wex && that_present_wex))
2310
          return false;
2311
        if (!this.wex.equals(that.wex))
2312
          return false;
2313
      }
2314
 
2832 chandransh 2315
      return true;
2316
    }
2317
 
2318
    @Override
2319
    public int hashCode() {
2320
      return 0;
2321
    }
2322
 
4496 mandeep.dh 2323
    public int compareTo(getInventoryItem_result other) {
2832 chandransh 2324
      if (!getClass().equals(other.getClass())) {
2325
        return getClass().getName().compareTo(other.getClass().getName());
2326
      }
2327
 
2328
      int lastComparison = 0;
4496 mandeep.dh 2329
      getInventoryItem_result typedOther = (getInventoryItem_result)other;
2832 chandransh 2330
 
3430 rajveer 2331
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2832 chandransh 2332
      if (lastComparison != 0) {
2333
        return lastComparison;
2334
      }
3430 rajveer 2335
      if (isSetSuccess()) {
2336
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
2337
        if (lastComparison != 0) {
2338
          return lastComparison;
2339
        }
2832 chandransh 2340
      }
4541 mandeep.dh 2341
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2342
      if (lastComparison != 0) {
2343
        return lastComparison;
2344
      }
2345
      if (isSetWex()) {
2346
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
2347
        if (lastComparison != 0) {
2348
          return lastComparison;
2349
        }
2350
      }
2832 chandransh 2351
      return 0;
2352
    }
2353
 
3430 rajveer 2354
    public _Fields fieldForId(int fieldId) {
2355
      return _Fields.findByThriftId(fieldId);
2356
    }
2357
 
2358
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2359
      org.apache.thrift.protocol.TField field;
2832 chandransh 2360
      iprot.readStructBegin();
2361
      while (true)
2362
      {
2363
        field = iprot.readFieldBegin();
3430 rajveer 2364
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2832 chandransh 2365
          break;
2366
        }
3430 rajveer 2367
        switch (field.id) {
2368
          case 0: // SUCCESS
2369
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4496 mandeep.dh 2370
              this.success = new InventoryItem();
3430 rajveer 2371
              this.success.read(iprot);
2372
            } else { 
2373
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2374
            }
2375
            break;
4541 mandeep.dh 2376
          case 1: // WEX
2377
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2378
              this.wex = new WarehouseServiceException();
2379
              this.wex.read(iprot);
2380
            } else { 
2381
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2382
            }
2383
            break;
3430 rajveer 2384
          default:
2385
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2832 chandransh 2386
        }
3430 rajveer 2387
        iprot.readFieldEnd();
2832 chandransh 2388
      }
2389
      iprot.readStructEnd();
2390
      validate();
2391
    }
2392
 
3430 rajveer 2393
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2832 chandransh 2394
      oprot.writeStructBegin(STRUCT_DESC);
2395
 
2396
      if (this.isSetSuccess()) {
2397
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2398
        this.success.write(oprot);
2399
        oprot.writeFieldEnd();
4541 mandeep.dh 2400
      } else if (this.isSetWex()) {
2401
        oprot.writeFieldBegin(WEX_FIELD_DESC);
2402
        this.wex.write(oprot);
2403
        oprot.writeFieldEnd();
2832 chandransh 2404
      }
2405
      oprot.writeFieldStop();
2406
      oprot.writeStructEnd();
2407
    }
2408
 
2409
    @Override
2410
    public String toString() {
4496 mandeep.dh 2411
      StringBuilder sb = new StringBuilder("getInventoryItem_result(");
2832 chandransh 2412
      boolean first = true;
2413
 
2414
      sb.append("success:");
2415
      if (this.success == null) {
2416
        sb.append("null");
2417
      } else {
2418
        sb.append(this.success);
2419
      }
2420
      first = false;
4541 mandeep.dh 2421
      if (!first) sb.append(", ");
2422
      sb.append("wex:");
2423
      if (this.wex == null) {
2424
        sb.append("null");
2425
      } else {
2426
        sb.append(this.wex);
2427
      }
2428
      first = false;
2832 chandransh 2429
      sb.append(")");
2430
      return sb.toString();
2431
    }
2432
 
3430 rajveer 2433
    public void validate() throws org.apache.thrift.TException {
2832 chandransh 2434
      // check for required fields
2435
    }
2436
 
3430 rajveer 2437
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2438
      try {
2439
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2440
      } catch (org.apache.thrift.TException te) {
2441
        throw new java.io.IOException(te);
2442
      }
2443
    }
2444
 
2445
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2446
      try {
2447
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2448
      } catch (org.apache.thrift.TException te) {
2449
        throw new java.io.IOException(te);
2450
      }
2451
    }
2452
 
2832 chandransh 2453
  }
2454
 
5361 mandeep.dh 2455
  public static class getNonSeralizedInventoryItem_args implements org.apache.thrift.TBase<getNonSeralizedInventoryItem_args, getNonSeralizedInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
2456
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNonSeralizedInventoryItem_args");
2820 chandransh 2457
 
5530 mandeep.dh 2458
    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);
2459
    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);
2460
    private static final org.apache.thrift.protocol.TField FULFILMENT_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("fulfilmentWarehouseId", org.apache.thrift.protocol.TType.I64, (short)3);
2820 chandransh 2461
 
5530 mandeep.dh 2462
    private String itemNumber; // required
4496 mandeep.dh 2463
    private long itemId; // required
5530 mandeep.dh 2464
    private long fulfilmentWarehouseId; // required
2820 chandransh 2465
 
2466
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2467
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5530 mandeep.dh 2468
      ITEM_NUMBER((short)1, "itemNumber"),
2469
      ITEM_ID((short)2, "itemId"),
2470
      FULFILMENT_WAREHOUSE_ID((short)3, "fulfilmentWarehouseId");
2820 chandransh 2471
 
2472
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2473
 
2474
      static {
2475
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2476
          byName.put(field.getFieldName(), field);
2477
        }
2478
      }
2479
 
2480
      /**
2481
       * Find the _Fields constant that matches fieldId, or null if its not found.
2482
       */
2483
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2484
        switch(fieldId) {
5530 mandeep.dh 2485
          case 1: // ITEM_NUMBER
2486
            return ITEM_NUMBER;
2487
          case 2: // ITEM_ID
4496 mandeep.dh 2488
            return ITEM_ID;
5530 mandeep.dh 2489
          case 3: // FULFILMENT_WAREHOUSE_ID
2490
            return FULFILMENT_WAREHOUSE_ID;
3430 rajveer 2491
          default:
2492
            return null;
2493
        }
2820 chandransh 2494
      }
2495
 
2496
      /**
2497
       * Find the _Fields constant that matches fieldId, throwing an exception
2498
       * if it is not found.
2499
       */
2500
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2501
        _Fields fields = findByThriftId(fieldId);
2502
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2503
        return fields;
2504
      }
2505
 
2506
      /**
2507
       * Find the _Fields constant that matches name, or null if its not found.
2508
       */
2509
      public static _Fields findByName(String name) {
2510
        return byName.get(name);
2511
      }
2512
 
2513
      private final short _thriftId;
2514
      private final String _fieldName;
2515
 
2516
      _Fields(short thriftId, String fieldName) {
2517
        _thriftId = thriftId;
2518
        _fieldName = fieldName;
2519
      }
2520
 
2521
      public short getThriftFieldId() {
2522
        return _thriftId;
2523
      }
2524
 
2525
      public String getFieldName() {
2526
        return _fieldName;
2527
      }
2528
    }
2529
 
2530
    // isset id assignments
4496 mandeep.dh 2531
    private static final int __ITEMID_ISSET_ID = 0;
5530 mandeep.dh 2532
    private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 1;
5361 mandeep.dh 2533
    private BitSet __isset_bit_vector = new BitSet(2);
2820 chandransh 2534
 
3430 rajveer 2535
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 2536
    static {
3430 rajveer 2537
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5530 mandeep.dh 2538
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2539
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
4496 mandeep.dh 2540
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3430 rajveer 2541
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5530 mandeep.dh 2542
      tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 2543
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 2544
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5361 mandeep.dh 2545
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNonSeralizedInventoryItem_args.class, metaDataMap);
2820 chandransh 2546
    }
2547
 
5361 mandeep.dh 2548
    public getNonSeralizedInventoryItem_args() {
2820 chandransh 2549
    }
2550
 
5361 mandeep.dh 2551
    public getNonSeralizedInventoryItem_args(
5530 mandeep.dh 2552
      String itemNumber,
4496 mandeep.dh 2553
      long itemId,
5530 mandeep.dh 2554
      long fulfilmentWarehouseId)
2820 chandransh 2555
    {
2556
      this();
5530 mandeep.dh 2557
      this.itemNumber = itemNumber;
4496 mandeep.dh 2558
      this.itemId = itemId;
2559
      setItemIdIsSet(true);
5530 mandeep.dh 2560
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
2561
      setFulfilmentWarehouseIdIsSet(true);
2820 chandransh 2562
    }
2563
 
2564
    /**
2565
     * Performs a deep copy on <i>other</i>.
2566
     */
5361 mandeep.dh 2567
    public getNonSeralizedInventoryItem_args(getNonSeralizedInventoryItem_args other) {
2820 chandransh 2568
      __isset_bit_vector.clear();
2569
      __isset_bit_vector.or(other.__isset_bit_vector);
5530 mandeep.dh 2570
      if (other.isSetItemNumber()) {
2571
        this.itemNumber = other.itemNumber;
2572
      }
4496 mandeep.dh 2573
      this.itemId = other.itemId;
5530 mandeep.dh 2574
      this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
2820 chandransh 2575
    }
2576
 
5361 mandeep.dh 2577
    public getNonSeralizedInventoryItem_args deepCopy() {
2578
      return new getNonSeralizedInventoryItem_args(this);
2820 chandransh 2579
    }
2580
 
3430 rajveer 2581
    @Override
2582
    public void clear() {
5530 mandeep.dh 2583
      this.itemNumber = null;
4496 mandeep.dh 2584
      setItemIdIsSet(false);
2585
      this.itemId = 0;
5530 mandeep.dh 2586
      setFulfilmentWarehouseIdIsSet(false);
2587
      this.fulfilmentWarehouseId = 0;
2820 chandransh 2588
    }
2589
 
5530 mandeep.dh 2590
    public String getItemNumber() {
2591
      return this.itemNumber;
2592
    }
2593
 
2594
    public void setItemNumber(String itemNumber) {
2595
      this.itemNumber = itemNumber;
2596
    }
2597
 
2598
    public void unsetItemNumber() {
2599
      this.itemNumber = null;
2600
    }
2601
 
2602
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
2603
    public boolean isSetItemNumber() {
2604
      return this.itemNumber != null;
2605
    }
2606
 
2607
    public void setItemNumberIsSet(boolean value) {
2608
      if (!value) {
2609
        this.itemNumber = null;
2610
      }
2611
    }
2612
 
4496 mandeep.dh 2613
    public long getItemId() {
2614
      return this.itemId;
2820 chandransh 2615
    }
2616
 
4496 mandeep.dh 2617
    public void setItemId(long itemId) {
2618
      this.itemId = itemId;
2619
      setItemIdIsSet(true);
2820 chandransh 2620
    }
2621
 
4496 mandeep.dh 2622
    public void unsetItemId() {
2623
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
2820 chandransh 2624
    }
2625
 
4496 mandeep.dh 2626
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
2627
    public boolean isSetItemId() {
2628
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
2820 chandransh 2629
    }
2630
 
4496 mandeep.dh 2631
    public void setItemIdIsSet(boolean value) {
2632
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
2820 chandransh 2633
    }
2634
 
5530 mandeep.dh 2635
    public long getFulfilmentWarehouseId() {
2636
      return this.fulfilmentWarehouseId;
2820 chandransh 2637
    }
2638
 
5530 mandeep.dh 2639
    public void setFulfilmentWarehouseId(long fulfilmentWarehouseId) {
2640
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
2641
      setFulfilmentWarehouseIdIsSet(true);
2820 chandransh 2642
    }
2643
 
5530 mandeep.dh 2644
    public void unsetFulfilmentWarehouseId() {
2645
      __isset_bit_vector.clear(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 2646
    }
2647
 
5530 mandeep.dh 2648
    /** Returns true if field fulfilmentWarehouseId is set (has been assigned a value) and false otherwise */
2649
    public boolean isSetFulfilmentWarehouseId() {
2650
      return __isset_bit_vector.get(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 2651
    }
2652
 
5530 mandeep.dh 2653
    public void setFulfilmentWarehouseIdIsSet(boolean value) {
2654
      __isset_bit_vector.set(__FULFILMENTWAREHOUSEID_ISSET_ID, value);
2820 chandransh 2655
    }
2656
 
2657
    public void setFieldValue(_Fields field, Object value) {
2658
      switch (field) {
5530 mandeep.dh 2659
      case ITEM_NUMBER:
2660
        if (value == null) {
2661
          unsetItemNumber();
2662
        } else {
2663
          setItemNumber((String)value);
2664
        }
2665
        break;
2666
 
4496 mandeep.dh 2667
      case ITEM_ID:
2820 chandransh 2668
        if (value == null) {
4496 mandeep.dh 2669
          unsetItemId();
2820 chandransh 2670
        } else {
4496 mandeep.dh 2671
          setItemId((Long)value);
2820 chandransh 2672
        }
2673
        break;
2674
 
5530 mandeep.dh 2675
      case FULFILMENT_WAREHOUSE_ID:
2820 chandransh 2676
        if (value == null) {
5530 mandeep.dh 2677
          unsetFulfilmentWarehouseId();
2820 chandransh 2678
        } else {
5530 mandeep.dh 2679
          setFulfilmentWarehouseId((Long)value);
2820 chandransh 2680
        }
2681
        break;
2682
 
2683
      }
2684
    }
2685
 
2686
    public Object getFieldValue(_Fields field) {
2687
      switch (field) {
5530 mandeep.dh 2688
      case ITEM_NUMBER:
2689
        return getItemNumber();
2690
 
4496 mandeep.dh 2691
      case ITEM_ID:
2692
        return Long.valueOf(getItemId());
2820 chandransh 2693
 
5530 mandeep.dh 2694
      case FULFILMENT_WAREHOUSE_ID:
2695
        return Long.valueOf(getFulfilmentWarehouseId());
2820 chandransh 2696
 
2697
      }
2698
      throw new IllegalStateException();
2699
    }
2700
 
3430 rajveer 2701
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2702
    public boolean isSet(_Fields field) {
2703
      if (field == null) {
2704
        throw new IllegalArgumentException();
2705
      }
2820 chandransh 2706
 
2707
      switch (field) {
5530 mandeep.dh 2708
      case ITEM_NUMBER:
2709
        return isSetItemNumber();
4496 mandeep.dh 2710
      case ITEM_ID:
2711
        return isSetItemId();
5530 mandeep.dh 2712
      case FULFILMENT_WAREHOUSE_ID:
2713
        return isSetFulfilmentWarehouseId();
2820 chandransh 2714
      }
2715
      throw new IllegalStateException();
2716
    }
2717
 
2718
    @Override
2719
    public boolean equals(Object that) {
2720
      if (that == null)
2721
        return false;
5361 mandeep.dh 2722
      if (that instanceof getNonSeralizedInventoryItem_args)
2723
        return this.equals((getNonSeralizedInventoryItem_args)that);
2820 chandransh 2724
      return false;
2725
    }
2726
 
5361 mandeep.dh 2727
    public boolean equals(getNonSeralizedInventoryItem_args that) {
2820 chandransh 2728
      if (that == null)
2729
        return false;
2730
 
5530 mandeep.dh 2731
      boolean this_present_itemNumber = true && this.isSetItemNumber();
2732
      boolean that_present_itemNumber = true && that.isSetItemNumber();
2733
      if (this_present_itemNumber || that_present_itemNumber) {
2734
        if (!(this_present_itemNumber && that_present_itemNumber))
2735
          return false;
2736
        if (!this.itemNumber.equals(that.itemNumber))
2737
          return false;
2738
      }
2739
 
4496 mandeep.dh 2740
      boolean this_present_itemId = true;
2741
      boolean that_present_itemId = true;
2742
      if (this_present_itemId || that_present_itemId) {
2743
        if (!(this_present_itemId && that_present_itemId))
2820 chandransh 2744
          return false;
4496 mandeep.dh 2745
        if (this.itemId != that.itemId)
2820 chandransh 2746
          return false;
2747
      }
2748
 
5530 mandeep.dh 2749
      boolean this_present_fulfilmentWarehouseId = true;
2750
      boolean that_present_fulfilmentWarehouseId = true;
2751
      if (this_present_fulfilmentWarehouseId || that_present_fulfilmentWarehouseId) {
2752
        if (!(this_present_fulfilmentWarehouseId && that_present_fulfilmentWarehouseId))
2820 chandransh 2753
          return false;
5530 mandeep.dh 2754
        if (this.fulfilmentWarehouseId != that.fulfilmentWarehouseId)
2820 chandransh 2755
          return false;
2756
      }
2757
 
2758
      return true;
2759
    }
2760
 
2761
    @Override
2762
    public int hashCode() {
2763
      return 0;
2764
    }
2765
 
5361 mandeep.dh 2766
    public int compareTo(getNonSeralizedInventoryItem_args other) {
2820 chandransh 2767
      if (!getClass().equals(other.getClass())) {
2768
        return getClass().getName().compareTo(other.getClass().getName());
2769
      }
2770
 
2771
      int lastComparison = 0;
5361 mandeep.dh 2772
      getNonSeralizedInventoryItem_args typedOther = (getNonSeralizedInventoryItem_args)other;
2820 chandransh 2773
 
5530 mandeep.dh 2774
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
2775
      if (lastComparison != 0) {
2776
        return lastComparison;
2777
      }
2778
      if (isSetItemNumber()) {
2779
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
2780
        if (lastComparison != 0) {
2781
          return lastComparison;
2782
        }
2783
      }
4496 mandeep.dh 2784
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
2820 chandransh 2785
      if (lastComparison != 0) {
2786
        return lastComparison;
2787
      }
4496 mandeep.dh 2788
      if (isSetItemId()) {
2789
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
3430 rajveer 2790
        if (lastComparison != 0) {
2791
          return lastComparison;
2792
        }
2820 chandransh 2793
      }
5530 mandeep.dh 2794
      lastComparison = Boolean.valueOf(isSetFulfilmentWarehouseId()).compareTo(typedOther.isSetFulfilmentWarehouseId());
2820 chandransh 2795
      if (lastComparison != 0) {
2796
        return lastComparison;
2797
      }
5530 mandeep.dh 2798
      if (isSetFulfilmentWarehouseId()) {
2799
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilmentWarehouseId, typedOther.fulfilmentWarehouseId);
3430 rajveer 2800
        if (lastComparison != 0) {
2801
          return lastComparison;
2802
        }
2820 chandransh 2803
      }
2804
      return 0;
2805
    }
2806
 
3430 rajveer 2807
    public _Fields fieldForId(int fieldId) {
2808
      return _Fields.findByThriftId(fieldId);
2809
    }
2810
 
2811
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2812
      org.apache.thrift.protocol.TField field;
2820 chandransh 2813
      iprot.readStructBegin();
2814
      while (true)
2815
      {
2816
        field = iprot.readFieldBegin();
3430 rajveer 2817
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 2818
          break;
2819
        }
3430 rajveer 2820
        switch (field.id) {
5530 mandeep.dh 2821
          case 1: // ITEM_NUMBER
2822
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
2823
              this.itemNumber = iprot.readString();
2824
            } else { 
2825
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2826
            }
2827
            break;
2828
          case 2: // ITEM_ID
3430 rajveer 2829
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4496 mandeep.dh 2830
              this.itemId = iprot.readI64();
2831
              setItemIdIsSet(true);
3430 rajveer 2832
            } else { 
2833
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2834
            }
2835
            break;
5530 mandeep.dh 2836
          case 3: // FULFILMENT_WAREHOUSE_ID
4496 mandeep.dh 2837
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5530 mandeep.dh 2838
              this.fulfilmentWarehouseId = iprot.readI64();
2839
              setFulfilmentWarehouseIdIsSet(true);
3430 rajveer 2840
            } else { 
2841
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2842
            }
2843
            break;
2844
          default:
2845
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 2846
        }
3430 rajveer 2847
        iprot.readFieldEnd();
2820 chandransh 2848
      }
2849
      iprot.readStructEnd();
2850
      validate();
2851
    }
2852
 
3430 rajveer 2853
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 2854
      validate();
2855
 
2856
      oprot.writeStructBegin(STRUCT_DESC);
5530 mandeep.dh 2857
      if (this.itemNumber != null) {
2858
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
2859
        oprot.writeString(this.itemNumber);
2860
        oprot.writeFieldEnd();
2861
      }
4496 mandeep.dh 2862
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
2863
      oprot.writeI64(this.itemId);
2820 chandransh 2864
      oprot.writeFieldEnd();
5530 mandeep.dh 2865
      oprot.writeFieldBegin(FULFILMENT_WAREHOUSE_ID_FIELD_DESC);
2866
      oprot.writeI64(this.fulfilmentWarehouseId);
2820 chandransh 2867
      oprot.writeFieldEnd();
2868
      oprot.writeFieldStop();
2869
      oprot.writeStructEnd();
2870
    }
2871
 
2872
    @Override
2873
    public String toString() {
5361 mandeep.dh 2874
      StringBuilder sb = new StringBuilder("getNonSeralizedInventoryItem_args(");
2820 chandransh 2875
      boolean first = true;
2876
 
5530 mandeep.dh 2877
      sb.append("itemNumber:");
2878
      if (this.itemNumber == null) {
2879
        sb.append("null");
2880
      } else {
2881
        sb.append(this.itemNumber);
2882
      }
2883
      first = false;
2884
      if (!first) sb.append(", ");
4496 mandeep.dh 2885
      sb.append("itemId:");
2886
      sb.append(this.itemId);
2820 chandransh 2887
      first = false;
2888
      if (!first) sb.append(", ");
5530 mandeep.dh 2889
      sb.append("fulfilmentWarehouseId:");
2890
      sb.append(this.fulfilmentWarehouseId);
2820 chandransh 2891
      first = false;
2892
      sb.append(")");
2893
      return sb.toString();
2894
    }
2895
 
3430 rajveer 2896
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 2897
      // check for required fields
2898
    }
2899
 
3430 rajveer 2900
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2901
      try {
2902
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2903
      } catch (org.apache.thrift.TException te) {
2904
        throw new java.io.IOException(te);
2905
      }
2906
    }
2907
 
2908
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2909
      try {
4496 mandeep.dh 2910
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
2911
        __isset_bit_vector = new BitSet(1);
3430 rajveer 2912
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2913
      } catch (org.apache.thrift.TException te) {
2914
        throw new java.io.IOException(te);
2915
      }
2916
    }
2917
 
2820 chandransh 2918
  }
2919
 
5361 mandeep.dh 2920
  public static class getNonSeralizedInventoryItem_result implements org.apache.thrift.TBase<getNonSeralizedInventoryItem_result, getNonSeralizedInventoryItem_result._Fields>, java.io.Serializable, Cloneable   {
2921
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNonSeralizedInventoryItem_result");
2820 chandransh 2922
 
5361 mandeep.dh 2923
    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);
2924
    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 2925
 
5361 mandeep.dh 2926
    private InventoryItem success; // required
2927
    private WarehouseServiceException wex; // required
2820 chandransh 2928
 
2929
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2930
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 2931
      SUCCESS((short)0, "success"),
2932
      WEX((short)1, "wex");
2820 chandransh 2933
 
2934
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2935
 
2936
      static {
2937
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2938
          byName.put(field.getFieldName(), field);
2939
        }
2940
      }
2941
 
2942
      /**
2943
       * Find the _Fields constant that matches fieldId, or null if its not found.
2944
       */
2945
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2946
        switch(fieldId) {
2947
          case 0: // SUCCESS
2948
            return SUCCESS;
5361 mandeep.dh 2949
          case 1: // WEX
2950
            return WEX;
3430 rajveer 2951
          default:
2952
            return null;
2953
        }
2820 chandransh 2954
      }
2955
 
2956
      /**
2957
       * Find the _Fields constant that matches fieldId, throwing an exception
2958
       * if it is not found.
2959
       */
2960
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2961
        _Fields fields = findByThriftId(fieldId);
2962
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2963
        return fields;
2964
      }
2965
 
2966
      /**
2967
       * Find the _Fields constant that matches name, or null if its not found.
2968
       */
2969
      public static _Fields findByName(String name) {
2970
        return byName.get(name);
2971
      }
2972
 
2973
      private final short _thriftId;
2974
      private final String _fieldName;
2975
 
2976
      _Fields(short thriftId, String fieldName) {
2977
        _thriftId = thriftId;
2978
        _fieldName = fieldName;
2979
      }
2980
 
2981
      public short getThriftFieldId() {
2982
        return _thriftId;
2983
      }
2984
 
2985
      public String getFieldName() {
2986
        return _fieldName;
2987
      }
2988
    }
2989
 
2990
    // isset id assignments
2991
 
3430 rajveer 2992
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 2993
    static {
3430 rajveer 2994
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2995
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5361 mandeep.dh 2996
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
2997
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2998
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3430 rajveer 2999
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5361 mandeep.dh 3000
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNonSeralizedInventoryItem_result.class, metaDataMap);
2820 chandransh 3001
    }
3002
 
5361 mandeep.dh 3003
    public getNonSeralizedInventoryItem_result() {
2820 chandransh 3004
    }
3005
 
5361 mandeep.dh 3006
    public getNonSeralizedInventoryItem_result(
3007
      InventoryItem success,
3008
      WarehouseServiceException wex)
2820 chandransh 3009
    {
3010
      this();
3011
      this.success = success;
5361 mandeep.dh 3012
      this.wex = wex;
2820 chandransh 3013
    }
3014
 
3015
    /**
3016
     * Performs a deep copy on <i>other</i>.
3017
     */
5361 mandeep.dh 3018
    public getNonSeralizedInventoryItem_result(getNonSeralizedInventoryItem_result other) {
4496 mandeep.dh 3019
      if (other.isSetSuccess()) {
5361 mandeep.dh 3020
        this.success = new InventoryItem(other.success);
2820 chandransh 3021
      }
5361 mandeep.dh 3022
      if (other.isSetWex()) {
3023
        this.wex = new WarehouseServiceException(other.wex);
3024
      }
2820 chandransh 3025
    }
3026
 
5361 mandeep.dh 3027
    public getNonSeralizedInventoryItem_result deepCopy() {
3028
      return new getNonSeralizedInventoryItem_result(this);
2820 chandransh 3029
    }
3030
 
3430 rajveer 3031
    @Override
3032
    public void clear() {
4496 mandeep.dh 3033
      this.success = null;
5361 mandeep.dh 3034
      this.wex = null;
2820 chandransh 3035
    }
3036
 
5361 mandeep.dh 3037
    public InventoryItem getSuccess() {
2820 chandransh 3038
      return this.success;
3039
    }
3040
 
5361 mandeep.dh 3041
    public void setSuccess(InventoryItem success) {
2820 chandransh 3042
      this.success = success;
3043
    }
3044
 
3045
    public void unsetSuccess() {
4496 mandeep.dh 3046
      this.success = null;
2820 chandransh 3047
    }
3048
 
3430 rajveer 3049
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2820 chandransh 3050
    public boolean isSetSuccess() {
4496 mandeep.dh 3051
      return this.success != null;
2820 chandransh 3052
    }
3053
 
3054
    public void setSuccessIsSet(boolean value) {
4496 mandeep.dh 3055
      if (!value) {
3056
        this.success = null;
3057
      }
2820 chandransh 3058
    }
3059
 
5361 mandeep.dh 3060
    public WarehouseServiceException getWex() {
3061
      return this.wex;
2820 chandransh 3062
    }
3063
 
5361 mandeep.dh 3064
    public void setWex(WarehouseServiceException wex) {
3065
      this.wex = wex;
2820 chandransh 3066
    }
3067
 
5361 mandeep.dh 3068
    public void unsetWex() {
3069
      this.wex = null;
2820 chandransh 3070
    }
3071
 
5361 mandeep.dh 3072
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
3073
    public boolean isSetWex() {
3074
      return this.wex != null;
2820 chandransh 3075
    }
3076
 
5361 mandeep.dh 3077
    public void setWexIsSet(boolean value) {
3078
      if (!value) {
3079
        this.wex = null;
2820 chandransh 3080
      }
3081
    }
3082
 
3083
    public void setFieldValue(_Fields field, Object value) {
3084
      switch (field) {
5361 mandeep.dh 3085
      case SUCCESS:
2820 chandransh 3086
        if (value == null) {
5361 mandeep.dh 3087
          unsetSuccess();
2820 chandransh 3088
        } else {
5361 mandeep.dh 3089
          setSuccess((InventoryItem)value);
2820 chandransh 3090
        }
3091
        break;
3092
 
5361 mandeep.dh 3093
      case WEX:
2820 chandransh 3094
        if (value == null) {
5361 mandeep.dh 3095
          unsetWex();
2820 chandransh 3096
        } else {
5361 mandeep.dh 3097
          setWex((WarehouseServiceException)value);
2820 chandransh 3098
        }
3099
        break;
3100
 
3101
      }
3102
    }
3103
 
3104
    public Object getFieldValue(_Fields field) {
3105
      switch (field) {
3106
      case SUCCESS:
4496 mandeep.dh 3107
        return getSuccess();
2820 chandransh 3108
 
5361 mandeep.dh 3109
      case WEX:
3110
        return getWex();
3111
 
2820 chandransh 3112
      }
3113
      throw new IllegalStateException();
3114
    }
3115
 
3430 rajveer 3116
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3117
    public boolean isSet(_Fields field) {
3118
      if (field == null) {
3119
        throw new IllegalArgumentException();
3120
      }
2820 chandransh 3121
 
3122
      switch (field) {
3123
      case SUCCESS:
3124
        return isSetSuccess();
5361 mandeep.dh 3125
      case WEX:
3126
        return isSetWex();
2820 chandransh 3127
      }
3128
      throw new IllegalStateException();
3129
    }
3130
 
3131
    @Override
3132
    public boolean equals(Object that) {
3133
      if (that == null)
3134
        return false;
5361 mandeep.dh 3135
      if (that instanceof getNonSeralizedInventoryItem_result)
3136
        return this.equals((getNonSeralizedInventoryItem_result)that);
2820 chandransh 3137
      return false;
3138
    }
3139
 
5361 mandeep.dh 3140
    public boolean equals(getNonSeralizedInventoryItem_result that) {
2820 chandransh 3141
      if (that == null)
3142
        return false;
3143
 
4496 mandeep.dh 3144
      boolean this_present_success = true && this.isSetSuccess();
3145
      boolean that_present_success = true && that.isSetSuccess();
2820 chandransh 3146
      if (this_present_success || that_present_success) {
3147
        if (!(this_present_success && that_present_success))
3148
          return false;
4496 mandeep.dh 3149
        if (!this.success.equals(that.success))
2820 chandransh 3150
          return false;
3151
      }
3152
 
5361 mandeep.dh 3153
      boolean this_present_wex = true && this.isSetWex();
3154
      boolean that_present_wex = true && that.isSetWex();
3155
      if (this_present_wex || that_present_wex) {
3156
        if (!(this_present_wex && that_present_wex))
4496 mandeep.dh 3157
          return false;
5361 mandeep.dh 3158
        if (!this.wex.equals(that.wex))
4496 mandeep.dh 3159
          return false;
3160
      }
3161
 
3162
      return true;
3163
    }
3164
 
3165
    @Override
3166
    public int hashCode() {
3167
      return 0;
3168
    }
3169
 
5361 mandeep.dh 3170
    public int compareTo(getNonSeralizedInventoryItem_result other) {
4496 mandeep.dh 3171
      if (!getClass().equals(other.getClass())) {
3172
        return getClass().getName().compareTo(other.getClass().getName());
3173
      }
3174
 
3175
      int lastComparison = 0;
5361 mandeep.dh 3176
      getNonSeralizedInventoryItem_result typedOther = (getNonSeralizedInventoryItem_result)other;
4496 mandeep.dh 3177
 
3178
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3179
      if (lastComparison != 0) {
3180
        return lastComparison;
3181
      }
3182
      if (isSetSuccess()) {
3183
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3184
        if (lastComparison != 0) {
3185
          return lastComparison;
3186
        }
3187
      }
5361 mandeep.dh 3188
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 3189
      if (lastComparison != 0) {
3190
        return lastComparison;
3191
      }
5361 mandeep.dh 3192
      if (isSetWex()) {
3193
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
3430 rajveer 3194
        if (lastComparison != 0) {
3195
          return lastComparison;
3196
        }
2820 chandransh 3197
      }
3198
      return 0;
3199
    }
3200
 
3430 rajveer 3201
    public _Fields fieldForId(int fieldId) {
3202
      return _Fields.findByThriftId(fieldId);
3203
    }
3204
 
3205
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3206
      org.apache.thrift.protocol.TField field;
2820 chandransh 3207
      iprot.readStructBegin();
3208
      while (true)
3209
      {
3210
        field = iprot.readFieldBegin();
3430 rajveer 3211
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 3212
          break;
3213
        }
3430 rajveer 3214
        switch (field.id) {
5361 mandeep.dh 3215
          case 0: // SUCCESS
3216
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3217
              this.success = new InventoryItem();
3218
              this.success.read(iprot);
3430 rajveer 3219
            } else { 
3220
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3221
            }
3222
            break;
5361 mandeep.dh 3223
          case 1: // WEX
3224
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3225
              this.wex = new WarehouseServiceException();
3226
              this.wex.read(iprot);
4496 mandeep.dh 3227
            } else { 
3228
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3229
            }
3230
            break;
3231
          default:
3232
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3233
        }
3234
        iprot.readFieldEnd();
3235
      }
3236
      iprot.readStructEnd();
3237
      validate();
3238
    }
3239
 
3240
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3241
      oprot.writeStructBegin(STRUCT_DESC);
3242
 
3243
      if (this.isSetSuccess()) {
3244
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5361 mandeep.dh 3245
        this.success.write(oprot);
4496 mandeep.dh 3246
        oprot.writeFieldEnd();
5361 mandeep.dh 3247
      } else if (this.isSetWex()) {
3248
        oprot.writeFieldBegin(WEX_FIELD_DESC);
3249
        this.wex.write(oprot);
3250
        oprot.writeFieldEnd();
4496 mandeep.dh 3251
      }
3252
      oprot.writeFieldStop();
3253
      oprot.writeStructEnd();
3254
    }
3255
 
3256
    @Override
3257
    public String toString() {
5361 mandeep.dh 3258
      StringBuilder sb = new StringBuilder("getNonSeralizedInventoryItem_result(");
4496 mandeep.dh 3259
      boolean first = true;
3260
 
3261
      sb.append("success:");
3262
      if (this.success == null) {
3263
        sb.append("null");
3264
      } else {
3265
        sb.append(this.success);
3266
      }
3267
      first = false;
5361 mandeep.dh 3268
      if (!first) sb.append(", ");
3269
      sb.append("wex:");
3270
      if (this.wex == null) {
3271
        sb.append("null");
3272
      } else {
3273
        sb.append(this.wex);
3274
      }
3275
      first = false;
4496 mandeep.dh 3276
      sb.append(")");
3277
      return sb.toString();
3278
    }
3279
 
3280
    public void validate() throws org.apache.thrift.TException {
3281
      // check for required fields
3282
    }
3283
 
3284
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3285
      try {
3286
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3287
      } catch (org.apache.thrift.TException te) {
3288
        throw new java.io.IOException(te);
3289
      }
3290
    }
3291
 
3292
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3293
      try {
3294
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3295
      } catch (org.apache.thrift.TException te) {
3296
        throw new java.io.IOException(te);
3297
      }
3298
    }
3299
 
3300
  }
3301
 
3302
  public static class scan_args implements org.apache.thrift.TBase<scan_args, scan_args._Fields>, java.io.Serializable, Cloneable   {
3303
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scan_args");
3383 chandransh 3304
 
5361 mandeep.dh 3305
    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 3306
    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);
3307
    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 3308
    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 3309
 
5361 mandeep.dh 3310
    private InventoryItem inventoryItem; // required
4496 mandeep.dh 3311
    private ScanType type; // required
3312
    private long quantity; // required
5361 mandeep.dh 3313
    private long billingWarehouseId; // required
3383 chandransh 3314
 
3315
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 3316
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 3317
      INVENTORY_ITEM((short)1, "inventoryItem"),
4496 mandeep.dh 3318
      /**
3319
       * 
3320
       * @see ScanType
3321
       */
3322
      TYPE((short)2, "type"),
3323
      QUANTITY((short)3, "quantity"),
5361 mandeep.dh 3324
      BILLING_WAREHOUSE_ID((short)4, "billingWarehouseId");
3383 chandransh 3325
 
3326
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3327
 
3328
      static {
3329
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3330
          byName.put(field.getFieldName(), field);
3331
        }
3332
      }
3333
 
3334
      /**
3335
       * Find the _Fields constant that matches fieldId, or null if its not found.
3336
       */
3337
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 3338
        switch(fieldId) {
5361 mandeep.dh 3339
          case 1: // INVENTORY_ITEM
3340
            return INVENTORY_ITEM;
4496 mandeep.dh 3341
          case 2: // TYPE
3342
            return TYPE;
3343
          case 3: // QUANTITY
3344
            return QUANTITY;
5361 mandeep.dh 3345
          case 4: // BILLING_WAREHOUSE_ID
3346
            return BILLING_WAREHOUSE_ID;
3430 rajveer 3347
          default:
3348
            return null;
3349
        }
3383 chandransh 3350
      }
3351
 
3352
      /**
3353
       * Find the _Fields constant that matches fieldId, throwing an exception
3354
       * if it is not found.
3355
       */
3356
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3357
        _Fields fields = findByThriftId(fieldId);
3358
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3359
        return fields;
3360
      }
3361
 
3362
      /**
3363
       * Find the _Fields constant that matches name, or null if its not found.
3364
       */
3365
      public static _Fields findByName(String name) {
3366
        return byName.get(name);
3367
      }
3368
 
3369
      private final short _thriftId;
3370
      private final String _fieldName;
3371
 
3372
      _Fields(short thriftId, String fieldName) {
3373
        _thriftId = thriftId;
3374
        _fieldName = fieldName;
3375
      }
3376
 
3377
      public short getThriftFieldId() {
3378
        return _thriftId;
3379
      }
3380
 
3381
      public String getFieldName() {
3382
        return _fieldName;
3383
      }
3384
    }
3385
 
3386
    // isset id assignments
5361 mandeep.dh 3387
    private static final int __QUANTITY_ISSET_ID = 0;
3388
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 1;
3389
    private BitSet __isset_bit_vector = new BitSet(2);
3383 chandransh 3390
 
3430 rajveer 3391
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3383 chandransh 3392
    static {
3430 rajveer 3393
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5361 mandeep.dh 3394
      tmpMap.put(_Fields.INVENTORY_ITEM, new org.apache.thrift.meta_data.FieldMetaData("inventoryItem", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3395
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
4496 mandeep.dh 3396
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3397
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
3398
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3399
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5361 mandeep.dh 3400
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 3401
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 3402
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 3403
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scan_args.class, metaDataMap);
3383 chandransh 3404
    }
3405
 
4496 mandeep.dh 3406
    public scan_args() {
3383 chandransh 3407
    }
3408
 
4496 mandeep.dh 3409
    public scan_args(
5361 mandeep.dh 3410
      InventoryItem inventoryItem,
4496 mandeep.dh 3411
      ScanType type,
3412
      long quantity,
5361 mandeep.dh 3413
      long billingWarehouseId)
3383 chandransh 3414
    {
3415
      this();
5361 mandeep.dh 3416
      this.inventoryItem = inventoryItem;
4496 mandeep.dh 3417
      this.type = type;
3418
      this.quantity = quantity;
3419
      setQuantityIsSet(true);
5361 mandeep.dh 3420
      this.billingWarehouseId = billingWarehouseId;
3421
      setBillingWarehouseIdIsSet(true);
3383 chandransh 3422
    }
3423
 
3424
    /**
3425
     * Performs a deep copy on <i>other</i>.
3426
     */
4496 mandeep.dh 3427
    public scan_args(scan_args other) {
3383 chandransh 3428
      __isset_bit_vector.clear();
3429
      __isset_bit_vector.or(other.__isset_bit_vector);
5361 mandeep.dh 3430
      if (other.isSetInventoryItem()) {
3431
        this.inventoryItem = new InventoryItem(other.inventoryItem);
3432
      }
4496 mandeep.dh 3433
      if (other.isSetType()) {
3434
        this.type = other.type;
3435
      }
3436
      this.quantity = other.quantity;
5361 mandeep.dh 3437
      this.billingWarehouseId = other.billingWarehouseId;
3383 chandransh 3438
    }
3439
 
4496 mandeep.dh 3440
    public scan_args deepCopy() {
3441
      return new scan_args(this);
3383 chandransh 3442
    }
3443
 
3430 rajveer 3444
    @Override
3445
    public void clear() {
5361 mandeep.dh 3446
      this.inventoryItem = null;
4496 mandeep.dh 3447
      this.type = null;
3448
      setQuantityIsSet(false);
3449
      this.quantity = 0;
5361 mandeep.dh 3450
      setBillingWarehouseIdIsSet(false);
3451
      this.billingWarehouseId = 0;
3383 chandransh 3452
    }
3453
 
5361 mandeep.dh 3454
    public InventoryItem getInventoryItem() {
3455
      return this.inventoryItem;
3383 chandransh 3456
    }
3457
 
5361 mandeep.dh 3458
    public void setInventoryItem(InventoryItem inventoryItem) {
3459
      this.inventoryItem = inventoryItem;
3383 chandransh 3460
    }
3461
 
5361 mandeep.dh 3462
    public void unsetInventoryItem() {
3463
      this.inventoryItem = null;
3383 chandransh 3464
    }
3465
 
5361 mandeep.dh 3466
    /** Returns true if field inventoryItem is set (has been assigned a value) and false otherwise */
3467
    public boolean isSetInventoryItem() {
3468
      return this.inventoryItem != null;
3383 chandransh 3469
    }
3470
 
5361 mandeep.dh 3471
    public void setInventoryItemIsSet(boolean value) {
3472
      if (!value) {
3473
        this.inventoryItem = null;
3474
      }
3383 chandransh 3475
    }
3476
 
4496 mandeep.dh 3477
    /**
3478
     * 
3479
     * @see ScanType
3480
     */
3481
    public ScanType getType() {
3482
      return this.type;
3383 chandransh 3483
    }
3484
 
4496 mandeep.dh 3485
    /**
3486
     * 
3487
     * @see ScanType
3488
     */
3489
    public void setType(ScanType type) {
3490
      this.type = type;
3383 chandransh 3491
    }
3492
 
4496 mandeep.dh 3493
    public void unsetType() {
3494
      this.type = null;
3383 chandransh 3495
    }
3496
 
4496 mandeep.dh 3497
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
3498
    public boolean isSetType() {
3499
      return this.type != null;
3383 chandransh 3500
    }
3501
 
4496 mandeep.dh 3502
    public void setTypeIsSet(boolean value) {
3503
      if (!value) {
3504
        this.type = null;
3505
      }
3383 chandransh 3506
    }
3507
 
4496 mandeep.dh 3508
    public long getQuantity() {
3509
      return this.quantity;
3510
    }
3511
 
3512
    public void setQuantity(long quantity) {
3513
      this.quantity = quantity;
3514
      setQuantityIsSet(true);
3515
    }
3516
 
3517
    public void unsetQuantity() {
3518
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
3519
    }
3520
 
3521
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
3522
    public boolean isSetQuantity() {
3523
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
3524
    }
3525
 
3526
    public void setQuantityIsSet(boolean value) {
3527
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
3528
    }
3529
 
5361 mandeep.dh 3530
    public long getBillingWarehouseId() {
3531
      return this.billingWarehouseId;
4496 mandeep.dh 3532
    }
3533
 
5361 mandeep.dh 3534
    public void setBillingWarehouseId(long billingWarehouseId) {
3535
      this.billingWarehouseId = billingWarehouseId;
3536
      setBillingWarehouseIdIsSet(true);
4496 mandeep.dh 3537
    }
3538
 
5361 mandeep.dh 3539
    public void unsetBillingWarehouseId() {
3540
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 3541
    }
3542
 
5361 mandeep.dh 3543
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
3544
    public boolean isSetBillingWarehouseId() {
3545
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 3546
    }
3547
 
5361 mandeep.dh 3548
    public void setBillingWarehouseIdIsSet(boolean value) {
3549
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
4496 mandeep.dh 3550
    }
3551
 
3383 chandransh 3552
    public void setFieldValue(_Fields field, Object value) {
3553
      switch (field) {
5361 mandeep.dh 3554
      case INVENTORY_ITEM:
3383 chandransh 3555
        if (value == null) {
5361 mandeep.dh 3556
          unsetInventoryItem();
3383 chandransh 3557
        } else {
5361 mandeep.dh 3558
          setInventoryItem((InventoryItem)value);
3383 chandransh 3559
        }
3560
        break;
3561
 
4496 mandeep.dh 3562
      case TYPE:
3383 chandransh 3563
        if (value == null) {
4496 mandeep.dh 3564
          unsetType();
3383 chandransh 3565
        } else {
4496 mandeep.dh 3566
          setType((ScanType)value);
3383 chandransh 3567
        }
3568
        break;
3569
 
4496 mandeep.dh 3570
      case QUANTITY:
3571
        if (value == null) {
3572
          unsetQuantity();
3573
        } else {
3574
          setQuantity((Long)value);
3575
        }
3576
        break;
3577
 
5361 mandeep.dh 3578
      case BILLING_WAREHOUSE_ID:
4496 mandeep.dh 3579
        if (value == null) {
5361 mandeep.dh 3580
          unsetBillingWarehouseId();
4496 mandeep.dh 3581
        } else {
5361 mandeep.dh 3582
          setBillingWarehouseId((Long)value);
4496 mandeep.dh 3583
        }
3584
        break;
3585
 
3383 chandransh 3586
      }
3587
    }
3588
 
3589
    public Object getFieldValue(_Fields field) {
3590
      switch (field) {
5361 mandeep.dh 3591
      case INVENTORY_ITEM:
3592
        return getInventoryItem();
3383 chandransh 3593
 
4496 mandeep.dh 3594
      case TYPE:
3595
        return getType();
3383 chandransh 3596
 
4496 mandeep.dh 3597
      case QUANTITY:
3598
        return Long.valueOf(getQuantity());
3599
 
5361 mandeep.dh 3600
      case BILLING_WAREHOUSE_ID:
3601
        return Long.valueOf(getBillingWarehouseId());
4496 mandeep.dh 3602
 
3383 chandransh 3603
      }
3604
      throw new IllegalStateException();
3605
    }
3606
 
3430 rajveer 3607
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3608
    public boolean isSet(_Fields field) {
3609
      if (field == null) {
3610
        throw new IllegalArgumentException();
3611
      }
3383 chandransh 3612
 
3613
      switch (field) {
5361 mandeep.dh 3614
      case INVENTORY_ITEM:
3615
        return isSetInventoryItem();
4496 mandeep.dh 3616
      case TYPE:
3617
        return isSetType();
3618
      case QUANTITY:
3619
        return isSetQuantity();
5361 mandeep.dh 3620
      case BILLING_WAREHOUSE_ID:
3621
        return isSetBillingWarehouseId();
3383 chandransh 3622
      }
3623
      throw new IllegalStateException();
3624
    }
3625
 
3626
    @Override
3627
    public boolean equals(Object that) {
3628
      if (that == null)
3629
        return false;
4496 mandeep.dh 3630
      if (that instanceof scan_args)
3631
        return this.equals((scan_args)that);
3383 chandransh 3632
      return false;
3633
    }
3634
 
4496 mandeep.dh 3635
    public boolean equals(scan_args that) {
3383 chandransh 3636
      if (that == null)
3637
        return false;
3638
 
5361 mandeep.dh 3639
      boolean this_present_inventoryItem = true && this.isSetInventoryItem();
3640
      boolean that_present_inventoryItem = true && that.isSetInventoryItem();
3641
      if (this_present_inventoryItem || that_present_inventoryItem) {
3642
        if (!(this_present_inventoryItem && that_present_inventoryItem))
3383 chandransh 3643
          return false;
5361 mandeep.dh 3644
        if (!this.inventoryItem.equals(that.inventoryItem))
3383 chandransh 3645
          return false;
3646
      }
3647
 
4496 mandeep.dh 3648
      boolean this_present_type = true && this.isSetType();
3649
      boolean that_present_type = true && that.isSetType();
3650
      if (this_present_type || that_present_type) {
3651
        if (!(this_present_type && that_present_type))
3383 chandransh 3652
          return false;
4496 mandeep.dh 3653
        if (!this.type.equals(that.type))
3383 chandransh 3654
          return false;
3655
      }
3656
 
4496 mandeep.dh 3657
      boolean this_present_quantity = true;
3658
      boolean that_present_quantity = true;
3659
      if (this_present_quantity || that_present_quantity) {
3660
        if (!(this_present_quantity && that_present_quantity))
3661
          return false;
3662
        if (this.quantity != that.quantity)
3663
          return false;
3664
      }
3665
 
5361 mandeep.dh 3666
      boolean this_present_billingWarehouseId = true;
3667
      boolean that_present_billingWarehouseId = true;
3668
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
3669
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
4496 mandeep.dh 3670
          return false;
5361 mandeep.dh 3671
        if (this.billingWarehouseId != that.billingWarehouseId)
4496 mandeep.dh 3672
          return false;
3673
      }
3674
 
3383 chandransh 3675
      return true;
3676
    }
3677
 
3678
    @Override
3679
    public int hashCode() {
3680
      return 0;
3681
    }
3682
 
4496 mandeep.dh 3683
    public int compareTo(scan_args other) {
3383 chandransh 3684
      if (!getClass().equals(other.getClass())) {
3685
        return getClass().getName().compareTo(other.getClass().getName());
3686
      }
3687
 
3688
      int lastComparison = 0;
4496 mandeep.dh 3689
      scan_args typedOther = (scan_args)other;
3383 chandransh 3690
 
5361 mandeep.dh 3691
      lastComparison = Boolean.valueOf(isSetInventoryItem()).compareTo(typedOther.isSetInventoryItem());
3383 chandransh 3692
      if (lastComparison != 0) {
3693
        return lastComparison;
3694
      }
5361 mandeep.dh 3695
      if (isSetInventoryItem()) {
3696
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItem, typedOther.inventoryItem);
3430 rajveer 3697
        if (lastComparison != 0) {
3698
          return lastComparison;
3699
        }
3383 chandransh 3700
      }
4496 mandeep.dh 3701
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
3383 chandransh 3702
      if (lastComparison != 0) {
3703
        return lastComparison;
3704
      }
4496 mandeep.dh 3705
      if (isSetType()) {
3706
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 3707
        if (lastComparison != 0) {
3708
          return lastComparison;
3709
        }
3383 chandransh 3710
      }
4496 mandeep.dh 3711
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
3712
      if (lastComparison != 0) {
3713
        return lastComparison;
3714
      }
3715
      if (isSetQuantity()) {
3716
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
3717
        if (lastComparison != 0) {
3718
          return lastComparison;
3719
        }
3720
      }
5361 mandeep.dh 3721
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
4496 mandeep.dh 3722
      if (lastComparison != 0) {
3723
        return lastComparison;
3724
      }
5361 mandeep.dh 3725
      if (isSetBillingWarehouseId()) {
3726
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
4496 mandeep.dh 3727
        if (lastComparison != 0) {
3728
          return lastComparison;
3729
        }
3730
      }
3383 chandransh 3731
      return 0;
3732
    }
3733
 
3430 rajveer 3734
    public _Fields fieldForId(int fieldId) {
3735
      return _Fields.findByThriftId(fieldId);
3736
    }
3737
 
3738
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3739
      org.apache.thrift.protocol.TField field;
3383 chandransh 3740
      iprot.readStructBegin();
3741
      while (true)
3742
      {
3743
        field = iprot.readFieldBegin();
3430 rajveer 3744
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3383 chandransh 3745
          break;
3746
        }
3430 rajveer 3747
        switch (field.id) {
5361 mandeep.dh 3748
          case 1: // INVENTORY_ITEM
3749
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3750
              this.inventoryItem = new InventoryItem();
3751
              this.inventoryItem.read(iprot);
3430 rajveer 3752
            } else { 
3753
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3754
            }
3755
            break;
4496 mandeep.dh 3756
          case 2: // TYPE
3757
            if (field.type == org.apache.thrift.protocol.TType.I32) {
3758
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 3759
            } else { 
3760
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3761
            }
3762
            break;
4496 mandeep.dh 3763
          case 3: // QUANTITY
3764
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3765
              this.quantity = iprot.readI64();
3766
              setQuantityIsSet(true);
3767
            } else { 
3768
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3769
            }
3770
            break;
5361 mandeep.dh 3771
          case 4: // BILLING_WAREHOUSE_ID
4496 mandeep.dh 3772
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5361 mandeep.dh 3773
              this.billingWarehouseId = iprot.readI64();
3774
              setBillingWarehouseIdIsSet(true);
4496 mandeep.dh 3775
            } else { 
3776
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3777
            }
3778
            break;
3430 rajveer 3779
          default:
3780
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3383 chandransh 3781
        }
3430 rajveer 3782
        iprot.readFieldEnd();
3383 chandransh 3783
      }
3784
      iprot.readStructEnd();
3785
      validate();
3786
    }
3787
 
3430 rajveer 3788
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3383 chandransh 3789
      validate();
3790
 
3791
      oprot.writeStructBegin(STRUCT_DESC);
5361 mandeep.dh 3792
      if (this.inventoryItem != null) {
3793
        oprot.writeFieldBegin(INVENTORY_ITEM_FIELD_DESC);
3794
        this.inventoryItem.write(oprot);
3795
        oprot.writeFieldEnd();
3796
      }
4496 mandeep.dh 3797
      if (this.type != null) {
3798
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
3799
        oprot.writeI32(this.type.getValue());
3800
        oprot.writeFieldEnd();
3801
      }
3802
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
3803
      oprot.writeI64(this.quantity);
3383 chandransh 3804
      oprot.writeFieldEnd();
5361 mandeep.dh 3805
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
3806
      oprot.writeI64(this.billingWarehouseId);
4496 mandeep.dh 3807
      oprot.writeFieldEnd();
3383 chandransh 3808
      oprot.writeFieldStop();
3809
      oprot.writeStructEnd();
3810
    }
3811
 
3812
    @Override
3813
    public String toString() {
4496 mandeep.dh 3814
      StringBuilder sb = new StringBuilder("scan_args(");
3383 chandransh 3815
      boolean first = true;
3816
 
5361 mandeep.dh 3817
      sb.append("inventoryItem:");
3818
      if (this.inventoryItem == null) {
3819
        sb.append("null");
3820
      } else {
3821
        sb.append(this.inventoryItem);
3822
      }
3383 chandransh 3823
      first = false;
3824
      if (!first) sb.append(", ");
4496 mandeep.dh 3825
      sb.append("type:");
3826
      if (this.type == null) {
3827
        sb.append("null");
3828
      } else {
3829
        sb.append(this.type);
3830
      }
3383 chandransh 3831
      first = false;
4496 mandeep.dh 3832
      if (!first) sb.append(", ");
3833
      sb.append("quantity:");
3834
      sb.append(this.quantity);
3835
      first = false;
3836
      if (!first) sb.append(", ");
5361 mandeep.dh 3837
      sb.append("billingWarehouseId:");
3838
      sb.append(this.billingWarehouseId);
4496 mandeep.dh 3839
      first = false;
3383 chandransh 3840
      sb.append(")");
3841
      return sb.toString();
3842
    }
3843
 
3430 rajveer 3844
    public void validate() throws org.apache.thrift.TException {
3383 chandransh 3845
      // check for required fields
3846
    }
3847
 
3430 rajveer 3848
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3849
      try {
3850
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3851
      } catch (org.apache.thrift.TException te) {
3852
        throw new java.io.IOException(te);
3853
      }
3854
    }
3855
 
3856
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3857
      try {
4496 mandeep.dh 3858
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
3859
        __isset_bit_vector = new BitSet(1);
3430 rajveer 3860
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3861
      } catch (org.apache.thrift.TException te) {
3862
        throw new java.io.IOException(te);
3863
      }
3864
    }
3865
 
3383 chandransh 3866
  }
3867
 
4496 mandeep.dh 3868
  public static class scan_result implements org.apache.thrift.TBase<scan_result, scan_result._Fields>, java.io.Serializable, Cloneable   {
3869
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scan_result");
3383 chandransh 3870
 
3430 rajveer 3871
    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 3872
 
3430 rajveer 3873
    private WarehouseServiceException wex; // required
3383 chandransh 3874
 
3875
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 3876
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3383 chandransh 3877
      WEX((short)1, "wex");
3878
 
3879
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3880
 
3881
      static {
3882
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3883
          byName.put(field.getFieldName(), field);
3884
        }
3885
      }
3886
 
3887
      /**
3888
       * Find the _Fields constant that matches fieldId, or null if its not found.
3889
       */
3890
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 3891
        switch(fieldId) {
3892
          case 1: // WEX
3893
            return WEX;
3894
          default:
3895
            return null;
3896
        }
3383 chandransh 3897
      }
3898
 
3899
      /**
3900
       * Find the _Fields constant that matches fieldId, throwing an exception
3901
       * if it is not found.
3902
       */
3903
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3904
        _Fields fields = findByThriftId(fieldId);
3905
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3906
        return fields;
3907
      }
3908
 
3909
      /**
3910
       * Find the _Fields constant that matches name, or null if its not found.
3911
       */
3912
      public static _Fields findByName(String name) {
3913
        return byName.get(name);
3914
      }
3915
 
3916
      private final short _thriftId;
3917
      private final String _fieldName;
3918
 
3919
      _Fields(short thriftId, String fieldName) {
3920
        _thriftId = thriftId;
3921
        _fieldName = fieldName;
3922
      }
3923
 
3924
      public short getThriftFieldId() {
3925
        return _thriftId;
3926
      }
3927
 
3928
      public String getFieldName() {
3929
        return _fieldName;
3930
      }
3931
    }
3932
 
3933
    // isset id assignments
3934
 
3430 rajveer 3935
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3383 chandransh 3936
    static {
3430 rajveer 3937
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3938
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3939
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3940
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 3941
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scan_result.class, metaDataMap);
3383 chandransh 3942
    }
3943
 
4496 mandeep.dh 3944
    public scan_result() {
3383 chandransh 3945
    }
3946
 
4496 mandeep.dh 3947
    public scan_result(
3383 chandransh 3948
      WarehouseServiceException wex)
3949
    {
3950
      this();
3951
      this.wex = wex;
3952
    }
3953
 
3954
    /**
3955
     * Performs a deep copy on <i>other</i>.
3956
     */
4496 mandeep.dh 3957
    public scan_result(scan_result other) {
3383 chandransh 3958
      if (other.isSetWex()) {
3959
        this.wex = new WarehouseServiceException(other.wex);
3960
      }
3961
    }
3962
 
4496 mandeep.dh 3963
    public scan_result deepCopy() {
3964
      return new scan_result(this);
3383 chandransh 3965
    }
3966
 
3430 rajveer 3967
    @Override
3968
    public void clear() {
3969
      this.wex = null;
3383 chandransh 3970
    }
3971
 
3972
    public WarehouseServiceException getWex() {
3973
      return this.wex;
3974
    }
3975
 
3430 rajveer 3976
    public void setWex(WarehouseServiceException wex) {
3383 chandransh 3977
      this.wex = wex;
3978
    }
3979
 
3980
    public void unsetWex() {
3981
      this.wex = null;
3982
    }
3983
 
3430 rajveer 3984
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
3383 chandransh 3985
    public boolean isSetWex() {
3986
      return this.wex != null;
3987
    }
3988
 
3989
    public void setWexIsSet(boolean value) {
3990
      if (!value) {
3991
        this.wex = null;
3992
      }
3993
    }
3994
 
3995
    public void setFieldValue(_Fields field, Object value) {
3996
      switch (field) {
3997
      case WEX:
3998
        if (value == null) {
3999
          unsetWex();
4000
        } else {
4001
          setWex((WarehouseServiceException)value);
4002
        }
4003
        break;
4004
 
4005
      }
4006
    }
4007
 
4008
    public Object getFieldValue(_Fields field) {
4009
      switch (field) {
4010
      case WEX:
4011
        return getWex();
4012
 
4013
      }
4014
      throw new IllegalStateException();
4015
    }
4016
 
3430 rajveer 4017
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4018
    public boolean isSet(_Fields field) {
4019
      if (field == null) {
4020
        throw new IllegalArgumentException();
4021
      }
3383 chandransh 4022
 
4023
      switch (field) {
4024
      case WEX:
4025
        return isSetWex();
4026
      }
4027
      throw new IllegalStateException();
4028
    }
4029
 
4030
    @Override
4031
    public boolean equals(Object that) {
4032
      if (that == null)
4033
        return false;
4496 mandeep.dh 4034
      if (that instanceof scan_result)
4035
        return this.equals((scan_result)that);
3383 chandransh 4036
      return false;
4037
    }
4038
 
4496 mandeep.dh 4039
    public boolean equals(scan_result that) {
3383 chandransh 4040
      if (that == null)
4041
        return false;
4042
 
4043
      boolean this_present_wex = true && this.isSetWex();
4044
      boolean that_present_wex = true && that.isSetWex();
4045
      if (this_present_wex || that_present_wex) {
4046
        if (!(this_present_wex && that_present_wex))
4047
          return false;
4048
        if (!this.wex.equals(that.wex))
4049
          return false;
4050
      }
4051
 
4052
      return true;
4053
    }
4054
 
4055
    @Override
4056
    public int hashCode() {
4057
      return 0;
4058
    }
4059
 
4496 mandeep.dh 4060
    public int compareTo(scan_result other) {
3383 chandransh 4061
      if (!getClass().equals(other.getClass())) {
4062
        return getClass().getName().compareTo(other.getClass().getName());
4063
      }
4064
 
4065
      int lastComparison = 0;
4496 mandeep.dh 4066
      scan_result typedOther = (scan_result)other;
3383 chandransh 4067
 
3430 rajveer 4068
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
3383 chandransh 4069
      if (lastComparison != 0) {
4070
        return lastComparison;
4071
      }
3430 rajveer 4072
      if (isSetWex()) {
4073
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
4074
        if (lastComparison != 0) {
4075
          return lastComparison;
4076
        }
3383 chandransh 4077
      }
4078
      return 0;
4079
    }
4080
 
3430 rajveer 4081
    public _Fields fieldForId(int fieldId) {
4082
      return _Fields.findByThriftId(fieldId);
4083
    }
4084
 
4085
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4086
      org.apache.thrift.protocol.TField field;
3383 chandransh 4087
      iprot.readStructBegin();
4088
      while (true)
4089
      {
4090
        field = iprot.readFieldBegin();
3430 rajveer 4091
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3383 chandransh 4092
          break;
4093
        }
3430 rajveer 4094
        switch (field.id) {
4095
          case 1: // WEX
4096
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4097
              this.wex = new WarehouseServiceException();
4098
              this.wex.read(iprot);
4099
            } else { 
4100
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4101
            }
4102
            break;
4103
          default:
4104
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3383 chandransh 4105
        }
3430 rajveer 4106
        iprot.readFieldEnd();
3383 chandransh 4107
      }
4108
      iprot.readStructEnd();
4109
      validate();
4110
    }
4111
 
3430 rajveer 4112
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3383 chandransh 4113
      oprot.writeStructBegin(STRUCT_DESC);
4114
 
4496 mandeep.dh 4115
      if (this.isSetWex()) {
3383 chandransh 4116
        oprot.writeFieldBegin(WEX_FIELD_DESC);
4117
        this.wex.write(oprot);
4118
        oprot.writeFieldEnd();
4119
      }
4120
      oprot.writeFieldStop();
4121
      oprot.writeStructEnd();
4122
    }
4123
 
4124
    @Override
4125
    public String toString() {
4496 mandeep.dh 4126
      StringBuilder sb = new StringBuilder("scan_result(");
3383 chandransh 4127
      boolean first = true;
4128
 
4129
      sb.append("wex:");
4130
      if (this.wex == null) {
4131
        sb.append("null");
4132
      } else {
4133
        sb.append(this.wex);
4134
      }
4135
      first = false;
4136
      sb.append(")");
4137
      return sb.toString();
4138
    }
4139
 
3430 rajveer 4140
    public void validate() throws org.apache.thrift.TException {
3383 chandransh 4141
      // check for required fields
4142
    }
4143
 
3430 rajveer 4144
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4145
      try {
4146
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4147
      } catch (org.apache.thrift.TException te) {
4148
        throw new java.io.IOException(te);
4149
      }
4150
    }
4151
 
4152
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4153
      try {
4154
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4155
      } catch (org.apache.thrift.TException te) {
4156
        throw new java.io.IOException(te);
4157
      }
4158
    }
4159
 
3383 chandransh 4160
  }
4161
 
4496 mandeep.dh 4162
  public static class scanSerializedItemForOrder_args implements org.apache.thrift.TBase<scanSerializedItemForOrder_args, scanSerializedItemForOrder_args._Fields>, java.io.Serializable, Cloneable   {
4163
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItemForOrder_args");
2820 chandransh 4164
 
4555 mandeep.dh 4165
    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 4166
    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);
4167
    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 4168
    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);
4169
    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);
4170
    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 4171
 
4555 mandeep.dh 4172
    private String serialNumber; // required
3430 rajveer 4173
    private ScanType type; // required
4496 mandeep.dh 4174
    private long orderId; // required
5110 mandeep.dh 4175
    private long fulfilmentWarehouseId; // required
4176
    private double quantity; // required
4177
    private long billingWarehouseId; // required
2820 chandransh 4178
 
4179
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4180
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4555 mandeep.dh 4181
      SERIAL_NUMBER((short)1, "serialNumber"),
2820 chandransh 4182
      /**
4183
       * 
4184
       * @see ScanType
4185
       */
4496 mandeep.dh 4186
      TYPE((short)2, "type"),
4187
      ORDER_ID((short)3, "orderId"),
5110 mandeep.dh 4188
      FULFILMENT_WAREHOUSE_ID((short)4, "fulfilmentWarehouseId"),
4189
      QUANTITY((short)5, "quantity"),
4190
      BILLING_WAREHOUSE_ID((short)6, "billingWarehouseId");
2820 chandransh 4191
 
4192
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4193
 
4194
      static {
4195
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4196
          byName.put(field.getFieldName(), field);
4197
        }
4198
      }
4199
 
4200
      /**
4201
       * Find the _Fields constant that matches fieldId, or null if its not found.
4202
       */
4203
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4204
        switch(fieldId) {
4555 mandeep.dh 4205
          case 1: // SERIAL_NUMBER
4206
            return SERIAL_NUMBER;
4496 mandeep.dh 4207
          case 2: // TYPE
3430 rajveer 4208
            return TYPE;
4496 mandeep.dh 4209
          case 3: // ORDER_ID
4210
            return ORDER_ID;
5110 mandeep.dh 4211
          case 4: // FULFILMENT_WAREHOUSE_ID
4212
            return FULFILMENT_WAREHOUSE_ID;
4213
          case 5: // QUANTITY
4214
            return QUANTITY;
4215
          case 6: // BILLING_WAREHOUSE_ID
4216
            return BILLING_WAREHOUSE_ID;
3430 rajveer 4217
          default:
4218
            return null;
4219
        }
2820 chandransh 4220
      }
4221
 
4222
      /**
4223
       * Find the _Fields constant that matches fieldId, throwing an exception
4224
       * if it is not found.
4225
       */
4226
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4227
        _Fields fields = findByThriftId(fieldId);
4228
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4229
        return fields;
4230
      }
4231
 
4232
      /**
4233
       * Find the _Fields constant that matches name, or null if its not found.
4234
       */
4235
      public static _Fields findByName(String name) {
4236
        return byName.get(name);
4237
      }
4238
 
4239
      private final short _thriftId;
4240
      private final String _fieldName;
4241
 
4242
      _Fields(short thriftId, String fieldName) {
4243
        _thriftId = thriftId;
4244
        _fieldName = fieldName;
4245
      }
4246
 
4247
      public short getThriftFieldId() {
4248
        return _thriftId;
4249
      }
4250
 
4251
      public String getFieldName() {
4252
        return _fieldName;
4253
      }
4254
    }
4255
 
4256
    // isset id assignments
4555 mandeep.dh 4257
    private static final int __ORDERID_ISSET_ID = 0;
5110 mandeep.dh 4258
    private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 1;
4259
    private static final int __QUANTITY_ISSET_ID = 2;
4260
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 3;
4261
    private BitSet __isset_bit_vector = new BitSet(4);
2820 chandransh 4262
 
3430 rajveer 4263
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 4264
    static {
3430 rajveer 4265
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4555 mandeep.dh 4266
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4267
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
3430 rajveer 4268
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4269
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
4496 mandeep.dh 4270
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4271
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 4272
      tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 4273
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 4274
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4275
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
4276
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4277
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 4278
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 4279
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanSerializedItemForOrder_args.class, metaDataMap);
2820 chandransh 4280
    }
4281
 
4496 mandeep.dh 4282
    public scanSerializedItemForOrder_args() {
2820 chandransh 4283
    }
4284
 
4496 mandeep.dh 4285
    public scanSerializedItemForOrder_args(
4555 mandeep.dh 4286
      String serialNumber,
4496 mandeep.dh 4287
      ScanType type,
4288
      long orderId,
5110 mandeep.dh 4289
      long fulfilmentWarehouseId,
4290
      double quantity,
4291
      long billingWarehouseId)
2820 chandransh 4292
    {
4293
      this();
4555 mandeep.dh 4294
      this.serialNumber = serialNumber;
2820 chandransh 4295
      this.type = type;
4496 mandeep.dh 4296
      this.orderId = orderId;
4297
      setOrderIdIsSet(true);
5110 mandeep.dh 4298
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
4299
      setFulfilmentWarehouseIdIsSet(true);
4300
      this.quantity = quantity;
4301
      setQuantityIsSet(true);
4302
      this.billingWarehouseId = billingWarehouseId;
4303
      setBillingWarehouseIdIsSet(true);
2820 chandransh 4304
    }
4305
 
4306
    /**
4307
     * Performs a deep copy on <i>other</i>.
4308
     */
4496 mandeep.dh 4309
    public scanSerializedItemForOrder_args(scanSerializedItemForOrder_args other) {
2820 chandransh 4310
      __isset_bit_vector.clear();
4311
      __isset_bit_vector.or(other.__isset_bit_vector);
4555 mandeep.dh 4312
      if (other.isSetSerialNumber()) {
4313
        this.serialNumber = other.serialNumber;
4314
      }
2820 chandransh 4315
      if (other.isSetType()) {
4316
        this.type = other.type;
4317
      }
4496 mandeep.dh 4318
      this.orderId = other.orderId;
5110 mandeep.dh 4319
      this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
4320
      this.quantity = other.quantity;
4321
      this.billingWarehouseId = other.billingWarehouseId;
2820 chandransh 4322
    }
4323
 
4496 mandeep.dh 4324
    public scanSerializedItemForOrder_args deepCopy() {
4325
      return new scanSerializedItemForOrder_args(this);
2820 chandransh 4326
    }
4327
 
3430 rajveer 4328
    @Override
4329
    public void clear() {
4555 mandeep.dh 4330
      this.serialNumber = null;
3430 rajveer 4331
      this.type = null;
4496 mandeep.dh 4332
      setOrderIdIsSet(false);
4333
      this.orderId = 0;
5110 mandeep.dh 4334
      setFulfilmentWarehouseIdIsSet(false);
4335
      this.fulfilmentWarehouseId = 0;
4336
      setQuantityIsSet(false);
4337
      this.quantity = 0.0;
4338
      setBillingWarehouseIdIsSet(false);
4339
      this.billingWarehouseId = 0;
2820 chandransh 4340
    }
4341
 
4555 mandeep.dh 4342
    public String getSerialNumber() {
4343
      return this.serialNumber;
2820 chandransh 4344
    }
4345
 
4555 mandeep.dh 4346
    public void setSerialNumber(String serialNumber) {
4347
      this.serialNumber = serialNumber;
2820 chandransh 4348
    }
4349
 
4555 mandeep.dh 4350
    public void unsetSerialNumber() {
4351
      this.serialNumber = null;
2820 chandransh 4352
    }
4353
 
4555 mandeep.dh 4354
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
4355
    public boolean isSetSerialNumber() {
4356
      return this.serialNumber != null;
2820 chandransh 4357
    }
4358
 
4555 mandeep.dh 4359
    public void setSerialNumberIsSet(boolean value) {
4360
      if (!value) {
4361
        this.serialNumber = null;
4362
      }
2820 chandransh 4363
    }
4364
 
4496 mandeep.dh 4365
    /**
4366
     * 
4367
     * @see ScanType
4368
     */
4369
    public ScanType getType() {
4370
      return this.type;
2820 chandransh 4371
    }
4372
 
4496 mandeep.dh 4373
    /**
4374
     * 
4375
     * @see ScanType
4376
     */
4377
    public void setType(ScanType type) {
4378
      this.type = type;
2820 chandransh 4379
    }
4380
 
4496 mandeep.dh 4381
    public void unsetType() {
4382
      this.type = null;
2820 chandransh 4383
    }
4384
 
4496 mandeep.dh 4385
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
4386
    public boolean isSetType() {
4387
      return this.type != null;
2820 chandransh 4388
    }
4389
 
4496 mandeep.dh 4390
    public void setTypeIsSet(boolean value) {
2820 chandransh 4391
      if (!value) {
4496 mandeep.dh 4392
        this.type = null;
2820 chandransh 4393
      }
4394
    }
4395
 
4496 mandeep.dh 4396
    public long getOrderId() {
4397
      return this.orderId;
2820 chandransh 4398
    }
4399
 
4496 mandeep.dh 4400
    public void setOrderId(long orderId) {
4401
      this.orderId = orderId;
4402
      setOrderIdIsSet(true);
2820 chandransh 4403
    }
4404
 
4496 mandeep.dh 4405
    public void unsetOrderId() {
4406
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
2820 chandransh 4407
    }
4408
 
4496 mandeep.dh 4409
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
4410
    public boolean isSetOrderId() {
4411
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
2820 chandransh 4412
    }
4413
 
4496 mandeep.dh 4414
    public void setOrderIdIsSet(boolean value) {
4415
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
2820 chandransh 4416
    }
4417
 
5110 mandeep.dh 4418
    public long getFulfilmentWarehouseId() {
4419
      return this.fulfilmentWarehouseId;
2820 chandransh 4420
    }
4421
 
5110 mandeep.dh 4422
    public void setFulfilmentWarehouseId(long fulfilmentWarehouseId) {
4423
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
4424
      setFulfilmentWarehouseIdIsSet(true);
2820 chandransh 4425
    }
4426
 
5110 mandeep.dh 4427
    public void unsetFulfilmentWarehouseId() {
4428
      __isset_bit_vector.clear(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 4429
    }
4430
 
5110 mandeep.dh 4431
    /** Returns true if field fulfilmentWarehouseId is set (has been assigned a value) and false otherwise */
4432
    public boolean isSetFulfilmentWarehouseId() {
4433
      return __isset_bit_vector.get(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 4434
    }
4435
 
5110 mandeep.dh 4436
    public void setFulfilmentWarehouseIdIsSet(boolean value) {
4437
      __isset_bit_vector.set(__FULFILMENTWAREHOUSEID_ISSET_ID, value);
2820 chandransh 4438
    }
4439
 
5110 mandeep.dh 4440
    public double getQuantity() {
4441
      return this.quantity;
4442
    }
4443
 
4444
    public void setQuantity(double quantity) {
4445
      this.quantity = quantity;
4446
      setQuantityIsSet(true);
4447
    }
4448
 
4449
    public void unsetQuantity() {
4450
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
4451
    }
4452
 
4453
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
4454
    public boolean isSetQuantity() {
4455
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
4456
    }
4457
 
4458
    public void setQuantityIsSet(boolean value) {
4459
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
4460
    }
4461
 
4462
    public long getBillingWarehouseId() {
4463
      return this.billingWarehouseId;
4464
    }
4465
 
4466
    public void setBillingWarehouseId(long billingWarehouseId) {
4467
      this.billingWarehouseId = billingWarehouseId;
4468
      setBillingWarehouseIdIsSet(true);
4469
    }
4470
 
4471
    public void unsetBillingWarehouseId() {
4472
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
4473
    }
4474
 
4475
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
4476
    public boolean isSetBillingWarehouseId() {
4477
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
4478
    }
4479
 
4480
    public void setBillingWarehouseIdIsSet(boolean value) {
4481
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
4482
    }
4483
 
2820 chandransh 4484
    public void setFieldValue(_Fields field, Object value) {
4485
      switch (field) {
4555 mandeep.dh 4486
      case SERIAL_NUMBER:
2820 chandransh 4487
        if (value == null) {
4555 mandeep.dh 4488
          unsetSerialNumber();
2820 chandransh 4489
        } else {
4555 mandeep.dh 4490
          setSerialNumber((String)value);
2820 chandransh 4491
        }
4492
        break;
4493
 
4496 mandeep.dh 4494
      case TYPE:
2820 chandransh 4495
        if (value == null) {
4496 mandeep.dh 4496
          unsetType();
2820 chandransh 4497
        } else {
4496 mandeep.dh 4498
          setType((ScanType)value);
2820 chandransh 4499
        }
4500
        break;
4501
 
4496 mandeep.dh 4502
      case ORDER_ID:
2820 chandransh 4503
        if (value == null) {
4496 mandeep.dh 4504
          unsetOrderId();
2820 chandransh 4505
        } else {
4496 mandeep.dh 4506
          setOrderId((Long)value);
2820 chandransh 4507
        }
4508
        break;
4509
 
5110 mandeep.dh 4510
      case FULFILMENT_WAREHOUSE_ID:
2820 chandransh 4511
        if (value == null) {
5110 mandeep.dh 4512
          unsetFulfilmentWarehouseId();
2820 chandransh 4513
        } else {
5110 mandeep.dh 4514
          setFulfilmentWarehouseId((Long)value);
2820 chandransh 4515
        }
4516
        break;
4517
 
5110 mandeep.dh 4518
      case QUANTITY:
4519
        if (value == null) {
4520
          unsetQuantity();
4521
        } else {
4522
          setQuantity((Double)value);
4523
        }
4524
        break;
4525
 
4526
      case BILLING_WAREHOUSE_ID:
4527
        if (value == null) {
4528
          unsetBillingWarehouseId();
4529
        } else {
4530
          setBillingWarehouseId((Long)value);
4531
        }
4532
        break;
4533
 
2820 chandransh 4534
      }
4535
    }
4536
 
4537
    public Object getFieldValue(_Fields field) {
4538
      switch (field) {
4555 mandeep.dh 4539
      case SERIAL_NUMBER:
4540
        return getSerialNumber();
2820 chandransh 4541
 
4542
      case TYPE:
4543
        return getType();
4544
 
4496 mandeep.dh 4545
      case ORDER_ID:
4546
        return Long.valueOf(getOrderId());
4547
 
5110 mandeep.dh 4548
      case FULFILMENT_WAREHOUSE_ID:
4549
        return Long.valueOf(getFulfilmentWarehouseId());
4496 mandeep.dh 4550
 
5110 mandeep.dh 4551
      case QUANTITY:
4552
        return Double.valueOf(getQuantity());
4553
 
4554
      case BILLING_WAREHOUSE_ID:
4555
        return Long.valueOf(getBillingWarehouseId());
4556
 
2820 chandransh 4557
      }
4558
      throw new IllegalStateException();
4559
    }
4560
 
3430 rajveer 4561
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4562
    public boolean isSet(_Fields field) {
4563
      if (field == null) {
4564
        throw new IllegalArgumentException();
4565
      }
2820 chandransh 4566
 
4567
      switch (field) {
4555 mandeep.dh 4568
      case SERIAL_NUMBER:
4569
        return isSetSerialNumber();
2820 chandransh 4570
      case TYPE:
4571
        return isSetType();
4496 mandeep.dh 4572
      case ORDER_ID:
4573
        return isSetOrderId();
5110 mandeep.dh 4574
      case FULFILMENT_WAREHOUSE_ID:
4575
        return isSetFulfilmentWarehouseId();
4576
      case QUANTITY:
4577
        return isSetQuantity();
4578
      case BILLING_WAREHOUSE_ID:
4579
        return isSetBillingWarehouseId();
2820 chandransh 4580
      }
4581
      throw new IllegalStateException();
4582
    }
4583
 
4584
    @Override
4585
    public boolean equals(Object that) {
4586
      if (that == null)
4587
        return false;
4496 mandeep.dh 4588
      if (that instanceof scanSerializedItemForOrder_args)
4589
        return this.equals((scanSerializedItemForOrder_args)that);
2820 chandransh 4590
      return false;
4591
    }
4592
 
4496 mandeep.dh 4593
    public boolean equals(scanSerializedItemForOrder_args that) {
2820 chandransh 4594
      if (that == null)
4595
        return false;
4596
 
4555 mandeep.dh 4597
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
4598
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
4599
      if (this_present_serialNumber || that_present_serialNumber) {
4600
        if (!(this_present_serialNumber && that_present_serialNumber))
2820 chandransh 4601
          return false;
4555 mandeep.dh 4602
        if (!this.serialNumber.equals(that.serialNumber))
2820 chandransh 4603
          return false;
4604
      }
4605
 
4496 mandeep.dh 4606
      boolean this_present_type = true && this.isSetType();
4607
      boolean that_present_type = true && that.isSetType();
4608
      if (this_present_type || that_present_type) {
4609
        if (!(this_present_type && that_present_type))
2820 chandransh 4610
          return false;
4496 mandeep.dh 4611
        if (!this.type.equals(that.type))
2820 chandransh 4612
          return false;
4613
      }
4614
 
4496 mandeep.dh 4615
      boolean this_present_orderId = true;
4616
      boolean that_present_orderId = true;
4617
      if (this_present_orderId || that_present_orderId) {
4618
        if (!(this_present_orderId && that_present_orderId))
2820 chandransh 4619
          return false;
4496 mandeep.dh 4620
        if (this.orderId != that.orderId)
2820 chandransh 4621
          return false;
4622
      }
4623
 
5110 mandeep.dh 4624
      boolean this_present_fulfilmentWarehouseId = true;
4625
      boolean that_present_fulfilmentWarehouseId = true;
4626
      if (this_present_fulfilmentWarehouseId || that_present_fulfilmentWarehouseId) {
4627
        if (!(this_present_fulfilmentWarehouseId && that_present_fulfilmentWarehouseId))
2820 chandransh 4628
          return false;
5110 mandeep.dh 4629
        if (this.fulfilmentWarehouseId != that.fulfilmentWarehouseId)
2820 chandransh 4630
          return false;
4631
      }
4632
 
5110 mandeep.dh 4633
      boolean this_present_quantity = true;
4634
      boolean that_present_quantity = true;
4635
      if (this_present_quantity || that_present_quantity) {
4636
        if (!(this_present_quantity && that_present_quantity))
4637
          return false;
4638
        if (this.quantity != that.quantity)
4639
          return false;
4640
      }
4641
 
4642
      boolean this_present_billingWarehouseId = true;
4643
      boolean that_present_billingWarehouseId = true;
4644
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
4645
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
4646
          return false;
4647
        if (this.billingWarehouseId != that.billingWarehouseId)
4648
          return false;
4649
      }
4650
 
2820 chandransh 4651
      return true;
4652
    }
4653
 
4654
    @Override
4655
    public int hashCode() {
4656
      return 0;
4657
    }
4658
 
4496 mandeep.dh 4659
    public int compareTo(scanSerializedItemForOrder_args other) {
2820 chandransh 4660
      if (!getClass().equals(other.getClass())) {
4661
        return getClass().getName().compareTo(other.getClass().getName());
4662
      }
4663
 
4664
      int lastComparison = 0;
4496 mandeep.dh 4665
      scanSerializedItemForOrder_args typedOther = (scanSerializedItemForOrder_args)other;
2820 chandransh 4666
 
4555 mandeep.dh 4667
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
2820 chandransh 4668
      if (lastComparison != 0) {
4669
        return lastComparison;
4670
      }
4555 mandeep.dh 4671
      if (isSetSerialNumber()) {
4672
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
3430 rajveer 4673
        if (lastComparison != 0) {
4674
          return lastComparison;
4675
        }
2820 chandransh 4676
      }
4496 mandeep.dh 4677
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
2820 chandransh 4678
      if (lastComparison != 0) {
4679
        return lastComparison;
4680
      }
4496 mandeep.dh 4681
      if (isSetType()) {
4682
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 4683
        if (lastComparison != 0) {
4684
          return lastComparison;
4685
        }
2820 chandransh 4686
      }
4496 mandeep.dh 4687
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
2820 chandransh 4688
      if (lastComparison != 0) {
4689
        return lastComparison;
4690
      }
4496 mandeep.dh 4691
      if (isSetOrderId()) {
4692
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
3430 rajveer 4693
        if (lastComparison != 0) {
4694
          return lastComparison;
4695
        }
2820 chandransh 4696
      }
5110 mandeep.dh 4697
      lastComparison = Boolean.valueOf(isSetFulfilmentWarehouseId()).compareTo(typedOther.isSetFulfilmentWarehouseId());
2820 chandransh 4698
      if (lastComparison != 0) {
4699
        return lastComparison;
4700
      }
5110 mandeep.dh 4701
      if (isSetFulfilmentWarehouseId()) {
4702
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilmentWarehouseId, typedOther.fulfilmentWarehouseId);
3430 rajveer 4703
        if (lastComparison != 0) {
4704
          return lastComparison;
4705
        }
2820 chandransh 4706
      }
5110 mandeep.dh 4707
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
4708
      if (lastComparison != 0) {
4709
        return lastComparison;
4710
      }
4711
      if (isSetQuantity()) {
4712
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
4713
        if (lastComparison != 0) {
4714
          return lastComparison;
4715
        }
4716
      }
4717
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
4718
      if (lastComparison != 0) {
4719
        return lastComparison;
4720
      }
4721
      if (isSetBillingWarehouseId()) {
4722
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
4723
        if (lastComparison != 0) {
4724
          return lastComparison;
4725
        }
4726
      }
2820 chandransh 4727
      return 0;
4728
    }
4729
 
3430 rajveer 4730
    public _Fields fieldForId(int fieldId) {
4731
      return _Fields.findByThriftId(fieldId);
4732
    }
4733
 
4734
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4735
      org.apache.thrift.protocol.TField field;
2820 chandransh 4736
      iprot.readStructBegin();
4737
      while (true)
4738
      {
4739
        field = iprot.readFieldBegin();
3430 rajveer 4740
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 4741
          break;
4742
        }
3430 rajveer 4743
        switch (field.id) {
4555 mandeep.dh 4744
          case 1: // SERIAL_NUMBER
4745
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
4746
              this.serialNumber = iprot.readString();
3430 rajveer 4747
            } else { 
4748
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4749
            }
4750
            break;
4496 mandeep.dh 4751
          case 2: // TYPE
4752
            if (field.type == org.apache.thrift.protocol.TType.I32) {
4753
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 4754
            } else { 
4755
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4756
            }
4757
            break;
4496 mandeep.dh 4758
          case 3: // ORDER_ID
4759
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4760
              this.orderId = iprot.readI64();
4761
              setOrderIdIsSet(true);
3430 rajveer 4762
            } else { 
4763
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4764
            }
4765
            break;
5110 mandeep.dh 4766
          case 4: // FULFILMENT_WAREHOUSE_ID
4496 mandeep.dh 4767
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5110 mandeep.dh 4768
              this.fulfilmentWarehouseId = iprot.readI64();
4769
              setFulfilmentWarehouseIdIsSet(true);
3430 rajveer 4770
            } else { 
4771
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4772
            }
4773
            break;
5110 mandeep.dh 4774
          case 5: // QUANTITY
4775
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
4776
              this.quantity = iprot.readDouble();
4777
              setQuantityIsSet(true);
4778
            } else { 
4779
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4780
            }
4781
            break;
4782
          case 6: // BILLING_WAREHOUSE_ID
4783
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4784
              this.billingWarehouseId = iprot.readI64();
4785
              setBillingWarehouseIdIsSet(true);
4786
            } else { 
4787
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4788
            }
4789
            break;
3430 rajveer 4790
          default:
4791
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 4792
        }
3430 rajveer 4793
        iprot.readFieldEnd();
2820 chandransh 4794
      }
4795
      iprot.readStructEnd();
4796
      validate();
4797
    }
4798
 
3430 rajveer 4799
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 4800
      validate();
4801
 
4802
      oprot.writeStructBegin(STRUCT_DESC);
4555 mandeep.dh 4803
      if (this.serialNumber != null) {
4804
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
4805
        oprot.writeString(this.serialNumber);
4806
        oprot.writeFieldEnd();
4807
      }
2820 chandransh 4808
      if (this.type != null) {
4809
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
4810
        oprot.writeI32(this.type.getValue());
4811
        oprot.writeFieldEnd();
4812
      }
4496 mandeep.dh 4813
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
4814
      oprot.writeI64(this.orderId);
4815
      oprot.writeFieldEnd();
5110 mandeep.dh 4816
      oprot.writeFieldBegin(FULFILMENT_WAREHOUSE_ID_FIELD_DESC);
4817
      oprot.writeI64(this.fulfilmentWarehouseId);
4496 mandeep.dh 4818
      oprot.writeFieldEnd();
5110 mandeep.dh 4819
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
4820
      oprot.writeDouble(this.quantity);
4821
      oprot.writeFieldEnd();
4822
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
4823
      oprot.writeI64(this.billingWarehouseId);
4824
      oprot.writeFieldEnd();
2820 chandransh 4825
      oprot.writeFieldStop();
4826
      oprot.writeStructEnd();
4827
    }
4828
 
4829
    @Override
4830
    public String toString() {
4496 mandeep.dh 4831
      StringBuilder sb = new StringBuilder("scanSerializedItemForOrder_args(");
2820 chandransh 4832
      boolean first = true;
4833
 
4555 mandeep.dh 4834
      sb.append("serialNumber:");
4835
      if (this.serialNumber == null) {
4836
        sb.append("null");
4837
      } else {
4838
        sb.append(this.serialNumber);
4839
      }
2820 chandransh 4840
      first = false;
4841
      if (!first) sb.append(", ");
4496 mandeep.dh 4842
      sb.append("type:");
4843
      if (this.type == null) {
2820 chandransh 4844
        sb.append("null");
4845
      } else {
4496 mandeep.dh 4846
        sb.append(this.type);
2820 chandransh 4847
      }
4848
      first = false;
4849
      if (!first) sb.append(", ");
4496 mandeep.dh 4850
      sb.append("orderId:");
4851
      sb.append(this.orderId);
2820 chandransh 4852
      first = false;
4853
      if (!first) sb.append(", ");
5110 mandeep.dh 4854
      sb.append("fulfilmentWarehouseId:");
4855
      sb.append(this.fulfilmentWarehouseId);
2820 chandransh 4856
      first = false;
5110 mandeep.dh 4857
      if (!first) sb.append(", ");
4858
      sb.append("quantity:");
4859
      sb.append(this.quantity);
4860
      first = false;
4861
      if (!first) sb.append(", ");
4862
      sb.append("billingWarehouseId:");
4863
      sb.append(this.billingWarehouseId);
4864
      first = false;
2820 chandransh 4865
      sb.append(")");
4866
      return sb.toString();
4867
    }
4868
 
3430 rajveer 4869
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 4870
      // check for required fields
4871
    }
4872
 
3430 rajveer 4873
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4874
      try {
4875
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4876
      } catch (org.apache.thrift.TException te) {
4877
        throw new java.io.IOException(te);
4878
      }
4879
    }
4880
 
4881
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4882
      try {
4883
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4884
      } catch (org.apache.thrift.TException te) {
4885
        throw new java.io.IOException(te);
4886
      }
4887
    }
4888
 
2820 chandransh 4889
  }
4890
 
4496 mandeep.dh 4891
  public static class scanSerializedItemForOrder_result implements org.apache.thrift.TBase<scanSerializedItemForOrder_result, scanSerializedItemForOrder_result._Fields>, java.io.Serializable, Cloneable   {
4892
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItemForOrder_result");
2820 chandransh 4893
 
4555 mandeep.dh 4894
    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 4895
    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 4896
 
4555 mandeep.dh 4897
    private InventoryItem success; // required
3430 rajveer 4898
    private WarehouseServiceException wex; // required
2820 chandransh 4899
 
4900
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4901
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 4902
      SUCCESS((short)0, "success"),
2820 chandransh 4903
      WEX((short)1, "wex");
4904
 
4905
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4906
 
4907
      static {
4908
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4909
          byName.put(field.getFieldName(), field);
4910
        }
4911
      }
4912
 
4913
      /**
4914
       * Find the _Fields constant that matches fieldId, or null if its not found.
4915
       */
4916
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4917
        switch(fieldId) {
4496 mandeep.dh 4918
          case 0: // SUCCESS
4919
            return SUCCESS;
3430 rajveer 4920
          case 1: // WEX
4921
            return WEX;
4922
          default:
4923
            return null;
4924
        }
2820 chandransh 4925
      }
4926
 
4927
      /**
4928
       * Find the _Fields constant that matches fieldId, throwing an exception
4929
       * if it is not found.
4930
       */
4931
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4932
        _Fields fields = findByThriftId(fieldId);
4933
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4934
        return fields;
4935
      }
4936
 
4937
      /**
4938
       * Find the _Fields constant that matches name, or null if its not found.
4939
       */
4940
      public static _Fields findByName(String name) {
4941
        return byName.get(name);
4942
      }
4943
 
4944
      private final short _thriftId;
4945
      private final String _fieldName;
4946
 
4947
      _Fields(short thriftId, String fieldName) {
4948
        _thriftId = thriftId;
4949
        _fieldName = fieldName;
4950
      }
4951
 
4952
      public short getThriftFieldId() {
4953
        return _thriftId;
4954
      }
4955
 
4956
      public String getFieldName() {
4957
        return _fieldName;
4958
      }
4959
    }
4960
 
4961
    // isset id assignments
4962
 
3430 rajveer 4963
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 4964
    static {
3430 rajveer 4965
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 4966
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 4967
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 4968
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4969
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4970
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 4971
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanSerializedItemForOrder_result.class, metaDataMap);
2820 chandransh 4972
    }
4973
 
4496 mandeep.dh 4974
    public scanSerializedItemForOrder_result() {
2820 chandransh 4975
    }
4976
 
4496 mandeep.dh 4977
    public scanSerializedItemForOrder_result(
4555 mandeep.dh 4978
      InventoryItem success,
2820 chandransh 4979
      WarehouseServiceException wex)
4980
    {
4981
      this();
4496 mandeep.dh 4982
      this.success = success;
2820 chandransh 4983
      this.wex = wex;
4984
    }
4985
 
4986
    /**
4987
     * Performs a deep copy on <i>other</i>.
4988
     */
4496 mandeep.dh 4989
    public scanSerializedItemForOrder_result(scanSerializedItemForOrder_result other) {
4555 mandeep.dh 4990
      if (other.isSetSuccess()) {
4991
        this.success = new InventoryItem(other.success);
4992
      }
2820 chandransh 4993
      if (other.isSetWex()) {
4994
        this.wex = new WarehouseServiceException(other.wex);
4995
      }
4996
    }
4997
 
4496 mandeep.dh 4998
    public scanSerializedItemForOrder_result deepCopy() {
4999
      return new scanSerializedItemForOrder_result(this);
2820 chandransh 5000
    }
5001
 
3430 rajveer 5002
    @Override
5003
    public void clear() {
4555 mandeep.dh 5004
      this.success = null;
3430 rajveer 5005
      this.wex = null;
2820 chandransh 5006
    }
5007
 
4555 mandeep.dh 5008
    public InventoryItem getSuccess() {
4496 mandeep.dh 5009
      return this.success;
5010
    }
5011
 
4555 mandeep.dh 5012
    public void setSuccess(InventoryItem success) {
4496 mandeep.dh 5013
      this.success = success;
5014
    }
5015
 
5016
    public void unsetSuccess() {
4555 mandeep.dh 5017
      this.success = null;
4496 mandeep.dh 5018
    }
5019
 
5020
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5021
    public boolean isSetSuccess() {
4555 mandeep.dh 5022
      return this.success != null;
4496 mandeep.dh 5023
    }
5024
 
5025
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 5026
      if (!value) {
5027
        this.success = null;
5028
      }
4496 mandeep.dh 5029
    }
5030
 
2820 chandransh 5031
    public WarehouseServiceException getWex() {
5032
      return this.wex;
5033
    }
5034
 
3430 rajveer 5035
    public void setWex(WarehouseServiceException wex) {
2820 chandransh 5036
      this.wex = wex;
5037
    }
5038
 
5039
    public void unsetWex() {
5040
      this.wex = null;
5041
    }
5042
 
3430 rajveer 5043
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2820 chandransh 5044
    public boolean isSetWex() {
5045
      return this.wex != null;
5046
    }
5047
 
5048
    public void setWexIsSet(boolean value) {
5049
      if (!value) {
5050
        this.wex = null;
5051
      }
5052
    }
5053
 
5054
    public void setFieldValue(_Fields field, Object value) {
5055
      switch (field) {
4496 mandeep.dh 5056
      case SUCCESS:
5057
        if (value == null) {
5058
          unsetSuccess();
5059
        } else {
4555 mandeep.dh 5060
          setSuccess((InventoryItem)value);
4496 mandeep.dh 5061
        }
5062
        break;
5063
 
2820 chandransh 5064
      case WEX:
5065
        if (value == null) {
5066
          unsetWex();
5067
        } else {
5068
          setWex((WarehouseServiceException)value);
5069
        }
5070
        break;
5071
 
5072
      }
5073
    }
5074
 
5075
    public Object getFieldValue(_Fields field) {
5076
      switch (field) {
4496 mandeep.dh 5077
      case SUCCESS:
4555 mandeep.dh 5078
        return getSuccess();
4496 mandeep.dh 5079
 
2820 chandransh 5080
      case WEX:
5081
        return getWex();
5082
 
5083
      }
5084
      throw new IllegalStateException();
5085
    }
5086
 
3430 rajveer 5087
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5088
    public boolean isSet(_Fields field) {
5089
      if (field == null) {
5090
        throw new IllegalArgumentException();
5091
      }
2820 chandransh 5092
 
5093
      switch (field) {
4496 mandeep.dh 5094
      case SUCCESS:
5095
        return isSetSuccess();
2820 chandransh 5096
      case WEX:
5097
        return isSetWex();
5098
      }
5099
      throw new IllegalStateException();
5100
    }
5101
 
5102
    @Override
5103
    public boolean equals(Object that) {
5104
      if (that == null)
5105
        return false;
4496 mandeep.dh 5106
      if (that instanceof scanSerializedItemForOrder_result)
5107
        return this.equals((scanSerializedItemForOrder_result)that);
2820 chandransh 5108
      return false;
5109
    }
5110
 
4496 mandeep.dh 5111
    public boolean equals(scanSerializedItemForOrder_result that) {
2820 chandransh 5112
      if (that == null)
5113
        return false;
5114
 
4555 mandeep.dh 5115
      boolean this_present_success = true && this.isSetSuccess();
5116
      boolean that_present_success = true && that.isSetSuccess();
4496 mandeep.dh 5117
      if (this_present_success || that_present_success) {
5118
        if (!(this_present_success && that_present_success))
5119
          return false;
4555 mandeep.dh 5120
        if (!this.success.equals(that.success))
4496 mandeep.dh 5121
          return false;
5122
      }
5123
 
2820 chandransh 5124
      boolean this_present_wex = true && this.isSetWex();
5125
      boolean that_present_wex = true && that.isSetWex();
5126
      if (this_present_wex || that_present_wex) {
5127
        if (!(this_present_wex && that_present_wex))
5128
          return false;
5129
        if (!this.wex.equals(that.wex))
5130
          return false;
5131
      }
5132
 
5133
      return true;
5134
    }
5135
 
5136
    @Override
5137
    public int hashCode() {
5138
      return 0;
5139
    }
5140
 
4496 mandeep.dh 5141
    public int compareTo(scanSerializedItemForOrder_result other) {
2820 chandransh 5142
      if (!getClass().equals(other.getClass())) {
5143
        return getClass().getName().compareTo(other.getClass().getName());
5144
      }
5145
 
5146
      int lastComparison = 0;
4496 mandeep.dh 5147
      scanSerializedItemForOrder_result typedOther = (scanSerializedItemForOrder_result)other;
2820 chandransh 5148
 
4496 mandeep.dh 5149
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5150
      if (lastComparison != 0) {
5151
        return lastComparison;
5152
      }
5153
      if (isSetSuccess()) {
5154
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5155
        if (lastComparison != 0) {
5156
          return lastComparison;
5157
        }
5158
      }
3430 rajveer 5159
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 5160
      if (lastComparison != 0) {
5161
        return lastComparison;
5162
      }
3430 rajveer 5163
      if (isSetWex()) {
5164
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
5165
        if (lastComparison != 0) {
5166
          return lastComparison;
5167
        }
2820 chandransh 5168
      }
5169
      return 0;
5170
    }
5171
 
3430 rajveer 5172
    public _Fields fieldForId(int fieldId) {
5173
      return _Fields.findByThriftId(fieldId);
5174
    }
5175
 
5176
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5177
      org.apache.thrift.protocol.TField field;
2820 chandransh 5178
      iprot.readStructBegin();
5179
      while (true)
5180
      {
5181
        field = iprot.readFieldBegin();
3430 rajveer 5182
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 5183
          break;
5184
        }
3430 rajveer 5185
        switch (field.id) {
4496 mandeep.dh 5186
          case 0: // SUCCESS
4555 mandeep.dh 5187
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5188
              this.success = new InventoryItem();
5189
              this.success.read(iprot);
4496 mandeep.dh 5190
            } else { 
5191
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5192
            }
5193
            break;
3430 rajveer 5194
          case 1: // WEX
5195
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5196
              this.wex = new WarehouseServiceException();
5197
              this.wex.read(iprot);
5198
            } else { 
5199
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5200
            }
5201
            break;
5202
          default:
5203
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 5204
        }
3430 rajveer 5205
        iprot.readFieldEnd();
2820 chandransh 5206
      }
5207
      iprot.readStructEnd();
5208
      validate();
5209
    }
5210
 
3430 rajveer 5211
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 5212
      oprot.writeStructBegin(STRUCT_DESC);
5213
 
4496 mandeep.dh 5214
      if (this.isSetSuccess()) {
5215
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 5216
        this.success.write(oprot);
4496 mandeep.dh 5217
        oprot.writeFieldEnd();
5218
      } else if (this.isSetWex()) {
2820 chandransh 5219
        oprot.writeFieldBegin(WEX_FIELD_DESC);
5220
        this.wex.write(oprot);
5221
        oprot.writeFieldEnd();
5222
      }
5223
      oprot.writeFieldStop();
5224
      oprot.writeStructEnd();
5225
    }
5226
 
5227
    @Override
5228
    public String toString() {
4496 mandeep.dh 5229
      StringBuilder sb = new StringBuilder("scanSerializedItemForOrder_result(");
2820 chandransh 5230
      boolean first = true;
5231
 
4496 mandeep.dh 5232
      sb.append("success:");
4555 mandeep.dh 5233
      if (this.success == null) {
5234
        sb.append("null");
5235
      } else {
5236
        sb.append(this.success);
5237
      }
4496 mandeep.dh 5238
      first = false;
5239
      if (!first) sb.append(", ");
2820 chandransh 5240
      sb.append("wex:");
5241
      if (this.wex == null) {
5242
        sb.append("null");
5243
      } else {
5244
        sb.append(this.wex);
5245
      }
5246
      first = false;
5247
      sb.append(")");
5248
      return sb.toString();
5249
    }
5250
 
3430 rajveer 5251
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 5252
      // check for required fields
5253
    }
5254
 
3430 rajveer 5255
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5256
      try {
5257
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5258
      } catch (org.apache.thrift.TException te) {
5259
        throw new java.io.IOException(te);
5260
      }
5261
    }
5262
 
5263
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5264
      try {
5265
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5266
      } catch (org.apache.thrift.TException te) {
5267
        throw new java.io.IOException(te);
5268
      }
5269
    }
5270
 
2820 chandransh 5271
  }
5272
 
4496 mandeep.dh 5273
  public static class scanForOrder_args implements org.apache.thrift.TBase<scanForOrder_args, scanForOrder_args._Fields>, java.io.Serializable, Cloneable   {
5274
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOrder_args");
2820 chandransh 5275
 
5361 mandeep.dh 5276
    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 5277
    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);
5278
    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);
5279
    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 5280
    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 5281
    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 5282
 
5361 mandeep.dh 5283
    private InventoryItem inventoryItem; // required
3430 rajveer 5284
    private ScanType type; // required
4496 mandeep.dh 5285
    private long quantity; // required
5286
    private long orderId; // required
5110 mandeep.dh 5287
    private long fulfilmentWarehouseId; // required
5361 mandeep.dh 5288
    private long billingWarehouseId; // required
2820 chandransh 5289
 
5290
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 5291
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 5292
      INVENTORY_ITEM((short)1, "inventoryItem"),
2820 chandransh 5293
      /**
5294
       * 
5295
       * @see ScanType
5296
       */
4496 mandeep.dh 5297
      TYPE((short)2, "type"),
5298
      QUANTITY((short)3, "quantity"),
5299
      ORDER_ID((short)4, "orderId"),
5361 mandeep.dh 5300
      FULFILMENT_WAREHOUSE_ID((short)5, "fulfilmentWarehouseId"),
5301
      BILLING_WAREHOUSE_ID((short)6, "billingWarehouseId");
2820 chandransh 5302
 
5303
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5304
 
5305
      static {
5306
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5307
          byName.put(field.getFieldName(), field);
5308
        }
5309
      }
5310
 
5311
      /**
5312
       * Find the _Fields constant that matches fieldId, or null if its not found.
5313
       */
5314
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 5315
        switch(fieldId) {
5361 mandeep.dh 5316
          case 1: // INVENTORY_ITEM
5317
            return INVENTORY_ITEM;
4496 mandeep.dh 5318
          case 2: // TYPE
3430 rajveer 5319
            return TYPE;
4496 mandeep.dh 5320
          case 3: // QUANTITY
5321
            return QUANTITY;
5322
          case 4: // ORDER_ID
5323
            return ORDER_ID;
5110 mandeep.dh 5324
          case 5: // FULFILMENT_WAREHOUSE_ID
5325
            return FULFILMENT_WAREHOUSE_ID;
5361 mandeep.dh 5326
          case 6: // BILLING_WAREHOUSE_ID
5327
            return BILLING_WAREHOUSE_ID;
3430 rajveer 5328
          default:
5329
            return null;
5330
        }
2820 chandransh 5331
      }
5332
 
5333
      /**
5334
       * Find the _Fields constant that matches fieldId, throwing an exception
5335
       * if it is not found.
5336
       */
5337
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5338
        _Fields fields = findByThriftId(fieldId);
5339
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5340
        return fields;
5341
      }
5342
 
5343
      /**
5344
       * Find the _Fields constant that matches name, or null if its not found.
5345
       */
5346
      public static _Fields findByName(String name) {
5347
        return byName.get(name);
5348
      }
5349
 
5350
      private final short _thriftId;
5351
      private final String _fieldName;
5352
 
5353
      _Fields(short thriftId, String fieldName) {
5354
        _thriftId = thriftId;
5355
        _fieldName = fieldName;
5356
      }
5357
 
5358
      public short getThriftFieldId() {
5359
        return _thriftId;
5360
      }
5361
 
5362
      public String getFieldName() {
5363
        return _fieldName;
5364
      }
5365
    }
5366
 
5367
    // isset id assignments
5361 mandeep.dh 5368
    private static final int __QUANTITY_ISSET_ID = 0;
5369
    private static final int __ORDERID_ISSET_ID = 1;
5370
    private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 2;
5371
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 3;
4496 mandeep.dh 5372
    private BitSet __isset_bit_vector = new BitSet(4);
2820 chandransh 5373
 
3430 rajveer 5374
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 5375
    static {
3430 rajveer 5376
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5361 mandeep.dh 5377
      tmpMap.put(_Fields.INVENTORY_ITEM, new org.apache.thrift.meta_data.FieldMetaData("inventoryItem", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5378
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 5379
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5380
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
4496 mandeep.dh 5381
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5382
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5383
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5384
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 5385
      tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 5386
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5361 mandeep.dh 5387
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5388
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 5389
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 5390
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOrder_args.class, metaDataMap);
2820 chandransh 5391
    }
5392
 
4496 mandeep.dh 5393
    public scanForOrder_args() {
2820 chandransh 5394
    }
5395
 
4496 mandeep.dh 5396
    public scanForOrder_args(
5361 mandeep.dh 5397
      InventoryItem inventoryItem,
4496 mandeep.dh 5398
      ScanType type,
5399
      long quantity,
5400
      long orderId,
5361 mandeep.dh 5401
      long fulfilmentWarehouseId,
5402
      long billingWarehouseId)
2820 chandransh 5403
    {
5404
      this();
5361 mandeep.dh 5405
      this.inventoryItem = inventoryItem;
2820 chandransh 5406
      this.type = type;
4496 mandeep.dh 5407
      this.quantity = quantity;
5408
      setQuantityIsSet(true);
5409
      this.orderId = orderId;
5410
      setOrderIdIsSet(true);
5110 mandeep.dh 5411
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
5412
      setFulfilmentWarehouseIdIsSet(true);
5361 mandeep.dh 5413
      this.billingWarehouseId = billingWarehouseId;
5414
      setBillingWarehouseIdIsSet(true);
2820 chandransh 5415
    }
5416
 
5417
    /**
5418
     * Performs a deep copy on <i>other</i>.
5419
     */
4496 mandeep.dh 5420
    public scanForOrder_args(scanForOrder_args other) {
5421
      __isset_bit_vector.clear();
5422
      __isset_bit_vector.or(other.__isset_bit_vector);
5361 mandeep.dh 5423
      if (other.isSetInventoryItem()) {
5424
        this.inventoryItem = new InventoryItem(other.inventoryItem);
5425
      }
2820 chandransh 5426
      if (other.isSetType()) {
5427
        this.type = other.type;
5428
      }
4496 mandeep.dh 5429
      this.quantity = other.quantity;
5430
      this.orderId = other.orderId;
5110 mandeep.dh 5431
      this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
5361 mandeep.dh 5432
      this.billingWarehouseId = other.billingWarehouseId;
2820 chandransh 5433
    }
5434
 
4496 mandeep.dh 5435
    public scanForOrder_args deepCopy() {
5436
      return new scanForOrder_args(this);
2820 chandransh 5437
    }
5438
 
3430 rajveer 5439
    @Override
5440
    public void clear() {
5361 mandeep.dh 5441
      this.inventoryItem = null;
3430 rajveer 5442
      this.type = null;
4496 mandeep.dh 5443
      setQuantityIsSet(false);
5444
      this.quantity = 0;
5445
      setOrderIdIsSet(false);
5446
      this.orderId = 0;
5110 mandeep.dh 5447
      setFulfilmentWarehouseIdIsSet(false);
5448
      this.fulfilmentWarehouseId = 0;
5361 mandeep.dh 5449
      setBillingWarehouseIdIsSet(false);
5450
      this.billingWarehouseId = 0;
2820 chandransh 5451
    }
5452
 
5361 mandeep.dh 5453
    public InventoryItem getInventoryItem() {
5454
      return this.inventoryItem;
2820 chandransh 5455
    }
5456
 
5361 mandeep.dh 5457
    public void setInventoryItem(InventoryItem inventoryItem) {
5458
      this.inventoryItem = inventoryItem;
2820 chandransh 5459
    }
5460
 
5361 mandeep.dh 5461
    public void unsetInventoryItem() {
5462
      this.inventoryItem = null;
2820 chandransh 5463
    }
5464
 
5361 mandeep.dh 5465
    /** Returns true if field inventoryItem is set (has been assigned a value) and false otherwise */
5466
    public boolean isSetInventoryItem() {
5467
      return this.inventoryItem != null;
2820 chandransh 5468
    }
5469
 
5361 mandeep.dh 5470
    public void setInventoryItemIsSet(boolean value) {
5471
      if (!value) {
5472
        this.inventoryItem = null;
5473
      }
2820 chandransh 5474
    }
5475
 
5476
    /**
5477
     * 
5478
     * @see ScanType
5479
     */
5480
    public ScanType getType() {
5481
      return this.type;
5482
    }
5483
 
5484
    /**
5485
     * 
5486
     * @see ScanType
5487
     */
3430 rajveer 5488
    public void setType(ScanType type) {
2820 chandransh 5489
      this.type = type;
5490
    }
5491
 
5492
    public void unsetType() {
5493
      this.type = null;
5494
    }
5495
 
3430 rajveer 5496
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
2820 chandransh 5497
    public boolean isSetType() {
5498
      return this.type != null;
5499
    }
5500
 
5501
    public void setTypeIsSet(boolean value) {
5502
      if (!value) {
5503
        this.type = null;
5504
      }
5505
    }
5506
 
4496 mandeep.dh 5507
    public long getQuantity() {
5508
      return this.quantity;
5509
    }
5510
 
5511
    public void setQuantity(long quantity) {
5512
      this.quantity = quantity;
5513
      setQuantityIsSet(true);
5514
    }
5515
 
5516
    public void unsetQuantity() {
5517
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
5518
    }
5519
 
5520
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
5521
    public boolean isSetQuantity() {
5522
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
5523
    }
5524
 
5525
    public void setQuantityIsSet(boolean value) {
5526
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
5527
    }
5528
 
5529
    public long getOrderId() {
5530
      return this.orderId;
5531
    }
5532
 
5533
    public void setOrderId(long orderId) {
5534
      this.orderId = orderId;
5535
      setOrderIdIsSet(true);
5536
    }
5537
 
5538
    public void unsetOrderId() {
5539
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
5540
    }
5541
 
5542
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
5543
    public boolean isSetOrderId() {
5544
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
5545
    }
5546
 
5547
    public void setOrderIdIsSet(boolean value) {
5548
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
5549
    }
5550
 
5110 mandeep.dh 5551
    public long getFulfilmentWarehouseId() {
5552
      return this.fulfilmentWarehouseId;
4496 mandeep.dh 5553
    }
5554
 
5110 mandeep.dh 5555
    public void setFulfilmentWarehouseId(long fulfilmentWarehouseId) {
5556
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
5557
      setFulfilmentWarehouseIdIsSet(true);
4496 mandeep.dh 5558
    }
5559
 
5110 mandeep.dh 5560
    public void unsetFulfilmentWarehouseId() {
5561
      __isset_bit_vector.clear(__FULFILMENTWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 5562
    }
5563
 
5110 mandeep.dh 5564
    /** Returns true if field fulfilmentWarehouseId is set (has been assigned a value) and false otherwise */
5565
    public boolean isSetFulfilmentWarehouseId() {
5566
      return __isset_bit_vector.get(__FULFILMENTWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 5567
    }
5568
 
5110 mandeep.dh 5569
    public void setFulfilmentWarehouseIdIsSet(boolean value) {
5570
      __isset_bit_vector.set(__FULFILMENTWAREHOUSEID_ISSET_ID, value);
4496 mandeep.dh 5571
    }
5572
 
5361 mandeep.dh 5573
    public long getBillingWarehouseId() {
5574
      return this.billingWarehouseId;
5575
    }
5576
 
5577
    public void setBillingWarehouseId(long billingWarehouseId) {
5578
      this.billingWarehouseId = billingWarehouseId;
5579
      setBillingWarehouseIdIsSet(true);
5580
    }
5581
 
5582
    public void unsetBillingWarehouseId() {
5583
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
5584
    }
5585
 
5586
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
5587
    public boolean isSetBillingWarehouseId() {
5588
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
5589
    }
5590
 
5591
    public void setBillingWarehouseIdIsSet(boolean value) {
5592
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
5593
    }
5594
 
2820 chandransh 5595
    public void setFieldValue(_Fields field, Object value) {
5596
      switch (field) {
5361 mandeep.dh 5597
      case INVENTORY_ITEM:
2820 chandransh 5598
        if (value == null) {
5361 mandeep.dh 5599
          unsetInventoryItem();
2820 chandransh 5600
        } else {
5361 mandeep.dh 5601
          setInventoryItem((InventoryItem)value);
2820 chandransh 5602
        }
5603
        break;
5604
 
4496 mandeep.dh 5605
      case TYPE:
2820 chandransh 5606
        if (value == null) {
4496 mandeep.dh 5607
          unsetType();
2820 chandransh 5608
        } else {
4496 mandeep.dh 5609
          setType((ScanType)value);
2820 chandransh 5610
        }
5611
        break;
5612
 
4496 mandeep.dh 5613
      case QUANTITY:
2820 chandransh 5614
        if (value == null) {
4496 mandeep.dh 5615
          unsetQuantity();
2820 chandransh 5616
        } else {
4496 mandeep.dh 5617
          setQuantity((Long)value);
2820 chandransh 5618
        }
5619
        break;
5620
 
4496 mandeep.dh 5621
      case ORDER_ID:
5622
        if (value == null) {
5623
          unsetOrderId();
5624
        } else {
5625
          setOrderId((Long)value);
5626
        }
5627
        break;
5628
 
5110 mandeep.dh 5629
      case FULFILMENT_WAREHOUSE_ID:
4496 mandeep.dh 5630
        if (value == null) {
5110 mandeep.dh 5631
          unsetFulfilmentWarehouseId();
4496 mandeep.dh 5632
        } else {
5110 mandeep.dh 5633
          setFulfilmentWarehouseId((Long)value);
4496 mandeep.dh 5634
        }
5635
        break;
5636
 
5361 mandeep.dh 5637
      case BILLING_WAREHOUSE_ID:
5638
        if (value == null) {
5639
          unsetBillingWarehouseId();
5640
        } else {
5641
          setBillingWarehouseId((Long)value);
5642
        }
5643
        break;
5644
 
2820 chandransh 5645
      }
5646
    }
5647
 
5648
    public Object getFieldValue(_Fields field) {
5649
      switch (field) {
5361 mandeep.dh 5650
      case INVENTORY_ITEM:
5651
        return getInventoryItem();
2820 chandransh 5652
 
5653
      case TYPE:
5654
        return getType();
5655
 
4496 mandeep.dh 5656
      case QUANTITY:
5657
        return Long.valueOf(getQuantity());
5658
 
5659
      case ORDER_ID:
5660
        return Long.valueOf(getOrderId());
5661
 
5110 mandeep.dh 5662
      case FULFILMENT_WAREHOUSE_ID:
5663
        return Long.valueOf(getFulfilmentWarehouseId());
4496 mandeep.dh 5664
 
5361 mandeep.dh 5665
      case BILLING_WAREHOUSE_ID:
5666
        return Long.valueOf(getBillingWarehouseId());
5667
 
2820 chandransh 5668
      }
5669
      throw new IllegalStateException();
5670
    }
5671
 
3430 rajveer 5672
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5673
    public boolean isSet(_Fields field) {
5674
      if (field == null) {
5675
        throw new IllegalArgumentException();
5676
      }
2820 chandransh 5677
 
5678
      switch (field) {
5361 mandeep.dh 5679
      case INVENTORY_ITEM:
5680
        return isSetInventoryItem();
2820 chandransh 5681
      case TYPE:
5682
        return isSetType();
4496 mandeep.dh 5683
      case QUANTITY:
5684
        return isSetQuantity();
5685
      case ORDER_ID:
5686
        return isSetOrderId();
5110 mandeep.dh 5687
      case FULFILMENT_WAREHOUSE_ID:
5688
        return isSetFulfilmentWarehouseId();
5361 mandeep.dh 5689
      case BILLING_WAREHOUSE_ID:
5690
        return isSetBillingWarehouseId();
2820 chandransh 5691
      }
5692
      throw new IllegalStateException();
5693
    }
5694
 
5695
    @Override
5696
    public boolean equals(Object that) {
5697
      if (that == null)
5698
        return false;
4496 mandeep.dh 5699
      if (that instanceof scanForOrder_args)
5700
        return this.equals((scanForOrder_args)that);
2820 chandransh 5701
      return false;
5702
    }
5703
 
4496 mandeep.dh 5704
    public boolean equals(scanForOrder_args that) {
2820 chandransh 5705
      if (that == null)
5706
        return false;
5707
 
5361 mandeep.dh 5708
      boolean this_present_inventoryItem = true && this.isSetInventoryItem();
5709
      boolean that_present_inventoryItem = true && that.isSetInventoryItem();
5710
      if (this_present_inventoryItem || that_present_inventoryItem) {
5711
        if (!(this_present_inventoryItem && that_present_inventoryItem))
2820 chandransh 5712
          return false;
5361 mandeep.dh 5713
        if (!this.inventoryItem.equals(that.inventoryItem))
2820 chandransh 5714
          return false;
5715
      }
5716
 
5717
      boolean this_present_type = true && this.isSetType();
5718
      boolean that_present_type = true && that.isSetType();
5719
      if (this_present_type || that_present_type) {
5720
        if (!(this_present_type && that_present_type))
5721
          return false;
5722
        if (!this.type.equals(that.type))
5723
          return false;
5724
      }
5725
 
4496 mandeep.dh 5726
      boolean this_present_quantity = true;
5727
      boolean that_present_quantity = true;
5728
      if (this_present_quantity || that_present_quantity) {
5729
        if (!(this_present_quantity && that_present_quantity))
5730
          return false;
5731
        if (this.quantity != that.quantity)
5732
          return false;
5733
      }
5734
 
5735
      boolean this_present_orderId = true;
5736
      boolean that_present_orderId = true;
5737
      if (this_present_orderId || that_present_orderId) {
5738
        if (!(this_present_orderId && that_present_orderId))
5739
          return false;
5740
        if (this.orderId != that.orderId)
5741
          return false;
5742
      }
5743
 
5110 mandeep.dh 5744
      boolean this_present_fulfilmentWarehouseId = true;
5745
      boolean that_present_fulfilmentWarehouseId = true;
5746
      if (this_present_fulfilmentWarehouseId || that_present_fulfilmentWarehouseId) {
5747
        if (!(this_present_fulfilmentWarehouseId && that_present_fulfilmentWarehouseId))
4496 mandeep.dh 5748
          return false;
5110 mandeep.dh 5749
        if (this.fulfilmentWarehouseId != that.fulfilmentWarehouseId)
4496 mandeep.dh 5750
          return false;
5751
      }
5752
 
5361 mandeep.dh 5753
      boolean this_present_billingWarehouseId = true;
5754
      boolean that_present_billingWarehouseId = true;
5755
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
5756
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
5757
          return false;
5758
        if (this.billingWarehouseId != that.billingWarehouseId)
5759
          return false;
5760
      }
5761
 
2820 chandransh 5762
      return true;
5763
    }
5764
 
5765
    @Override
5766
    public int hashCode() {
5767
      return 0;
5768
    }
5769
 
4496 mandeep.dh 5770
    public int compareTo(scanForOrder_args other) {
2820 chandransh 5771
      if (!getClass().equals(other.getClass())) {
5772
        return getClass().getName().compareTo(other.getClass().getName());
5773
      }
5774
 
5775
      int lastComparison = 0;
4496 mandeep.dh 5776
      scanForOrder_args typedOther = (scanForOrder_args)other;
2820 chandransh 5777
 
5361 mandeep.dh 5778
      lastComparison = Boolean.valueOf(isSetInventoryItem()).compareTo(typedOther.isSetInventoryItem());
2820 chandransh 5779
      if (lastComparison != 0) {
5780
        return lastComparison;
5781
      }
5361 mandeep.dh 5782
      if (isSetInventoryItem()) {
5783
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItem, typedOther.inventoryItem);
3430 rajveer 5784
        if (lastComparison != 0) {
5785
          return lastComparison;
5786
        }
2820 chandransh 5787
      }
4496 mandeep.dh 5788
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
2820 chandransh 5789
      if (lastComparison != 0) {
5790
        return lastComparison;
5791
      }
4496 mandeep.dh 5792
      if (isSetType()) {
5793
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 5794
        if (lastComparison != 0) {
5795
          return lastComparison;
5796
        }
2820 chandransh 5797
      }
4496 mandeep.dh 5798
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
2820 chandransh 5799
      if (lastComparison != 0) {
5800
        return lastComparison;
5801
      }
4496 mandeep.dh 5802
      if (isSetQuantity()) {
5803
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
3430 rajveer 5804
        if (lastComparison != 0) {
5805
          return lastComparison;
5806
        }
2820 chandransh 5807
      }
4496 mandeep.dh 5808
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
5809
      if (lastComparison != 0) {
5810
        return lastComparison;
5811
      }
5812
      if (isSetOrderId()) {
5813
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
5814
        if (lastComparison != 0) {
5815
          return lastComparison;
5816
        }
5817
      }
5110 mandeep.dh 5818
      lastComparison = Boolean.valueOf(isSetFulfilmentWarehouseId()).compareTo(typedOther.isSetFulfilmentWarehouseId());
4496 mandeep.dh 5819
      if (lastComparison != 0) {
5820
        return lastComparison;
5821
      }
5110 mandeep.dh 5822
      if (isSetFulfilmentWarehouseId()) {
5823
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilmentWarehouseId, typedOther.fulfilmentWarehouseId);
4496 mandeep.dh 5824
        if (lastComparison != 0) {
5825
          return lastComparison;
5826
        }
5827
      }
5361 mandeep.dh 5828
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
5829
      if (lastComparison != 0) {
5830
        return lastComparison;
5831
      }
5832
      if (isSetBillingWarehouseId()) {
5833
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
5834
        if (lastComparison != 0) {
5835
          return lastComparison;
5836
        }
5837
      }
2820 chandransh 5838
      return 0;
5839
    }
5840
 
3430 rajveer 5841
    public _Fields fieldForId(int fieldId) {
5842
      return _Fields.findByThriftId(fieldId);
5843
    }
5844
 
5845
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5846
      org.apache.thrift.protocol.TField field;
2820 chandransh 5847
      iprot.readStructBegin();
5848
      while (true)
5849
      {
5850
        field = iprot.readFieldBegin();
3430 rajveer 5851
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 5852
          break;
5853
        }
3430 rajveer 5854
        switch (field.id) {
5361 mandeep.dh 5855
          case 1: // INVENTORY_ITEM
5856
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5857
              this.inventoryItem = new InventoryItem();
5858
              this.inventoryItem.read(iprot);
3430 rajveer 5859
            } else { 
5860
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5861
            }
5862
            break;
4496 mandeep.dh 5863
          case 2: // TYPE
5864
            if (field.type == org.apache.thrift.protocol.TType.I32) {
5865
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 5866
            } else { 
5867
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5868
            }
5869
            break;
4496 mandeep.dh 5870
          case 3: // QUANTITY
5871
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5872
              this.quantity = iprot.readI64();
5873
              setQuantityIsSet(true);
3430 rajveer 5874
            } else { 
5875
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5876
            }
5877
            break;
4496 mandeep.dh 5878
          case 4: // ORDER_ID
5879
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5880
              this.orderId = iprot.readI64();
5881
              setOrderIdIsSet(true);
5882
            } else { 
5883
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5884
            }
5885
            break;
5110 mandeep.dh 5886
          case 5: // FULFILMENT_WAREHOUSE_ID
4496 mandeep.dh 5887
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5110 mandeep.dh 5888
              this.fulfilmentWarehouseId = iprot.readI64();
5889
              setFulfilmentWarehouseIdIsSet(true);
4496 mandeep.dh 5890
            } else { 
5891
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5892
            }
5893
            break;
5361 mandeep.dh 5894
          case 6: // BILLING_WAREHOUSE_ID
5895
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5896
              this.billingWarehouseId = iprot.readI64();
5897
              setBillingWarehouseIdIsSet(true);
5898
            } else { 
5899
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5900
            }
5901
            break;
3430 rajveer 5902
          default:
5903
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 5904
        }
3430 rajveer 5905
        iprot.readFieldEnd();
2820 chandransh 5906
      }
5907
      iprot.readStructEnd();
5908
      validate();
5909
    }
5910
 
3430 rajveer 5911
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 5912
      validate();
5913
 
5914
      oprot.writeStructBegin(STRUCT_DESC);
5361 mandeep.dh 5915
      if (this.inventoryItem != null) {
5916
        oprot.writeFieldBegin(INVENTORY_ITEM_FIELD_DESC);
5917
        this.inventoryItem.write(oprot);
5918
        oprot.writeFieldEnd();
5919
      }
2820 chandransh 5920
      if (this.type != null) {
5921
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
5922
        oprot.writeI32(this.type.getValue());
5923
        oprot.writeFieldEnd();
5924
      }
4496 mandeep.dh 5925
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
5926
      oprot.writeI64(this.quantity);
5927
      oprot.writeFieldEnd();
5928
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
5929
      oprot.writeI64(this.orderId);
5930
      oprot.writeFieldEnd();
5110 mandeep.dh 5931
      oprot.writeFieldBegin(FULFILMENT_WAREHOUSE_ID_FIELD_DESC);
5932
      oprot.writeI64(this.fulfilmentWarehouseId);
4496 mandeep.dh 5933
      oprot.writeFieldEnd();
5361 mandeep.dh 5934
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
5935
      oprot.writeI64(this.billingWarehouseId);
5936
      oprot.writeFieldEnd();
2820 chandransh 5937
      oprot.writeFieldStop();
5938
      oprot.writeStructEnd();
5939
    }
5940
 
5941
    @Override
5942
    public String toString() {
4496 mandeep.dh 5943
      StringBuilder sb = new StringBuilder("scanForOrder_args(");
2820 chandransh 5944
      boolean first = true;
5945
 
5361 mandeep.dh 5946
      sb.append("inventoryItem:");
5947
      if (this.inventoryItem == null) {
5948
        sb.append("null");
5949
      } else {
5950
        sb.append(this.inventoryItem);
5951
      }
2820 chandransh 5952
      first = false;
5953
      if (!first) sb.append(", ");
5954
      sb.append("type:");
5955
      if (this.type == null) {
5956
        sb.append("null");
5957
      } else {
5958
        sb.append(this.type);
5959
      }
5960
      first = false;
4496 mandeep.dh 5961
      if (!first) sb.append(", ");
5962
      sb.append("quantity:");
5963
      sb.append(this.quantity);
5964
      first = false;
5965
      if (!first) sb.append(", ");
5966
      sb.append("orderId:");
5967
      sb.append(this.orderId);
5968
      first = false;
5969
      if (!first) sb.append(", ");
5110 mandeep.dh 5970
      sb.append("fulfilmentWarehouseId:");
5971
      sb.append(this.fulfilmentWarehouseId);
4496 mandeep.dh 5972
      first = false;
5361 mandeep.dh 5973
      if (!first) sb.append(", ");
5974
      sb.append("billingWarehouseId:");
5975
      sb.append(this.billingWarehouseId);
5976
      first = false;
2820 chandransh 5977
      sb.append(")");
5978
      return sb.toString();
5979
    }
5980
 
3430 rajveer 5981
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 5982
      // check for required fields
5983
    }
5984
 
3430 rajveer 5985
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5986
      try {
5987
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5988
      } catch (org.apache.thrift.TException te) {
5989
        throw new java.io.IOException(te);
5990
      }
5991
    }
5992
 
5993
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5994
      try {
4496 mandeep.dh 5995
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
5996
        __isset_bit_vector = new BitSet(1);
3430 rajveer 5997
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5998
      } catch (org.apache.thrift.TException te) {
5999
        throw new java.io.IOException(te);
6000
      }
6001
    }
6002
 
2820 chandransh 6003
  }
6004
 
4496 mandeep.dh 6005
  public static class scanForOrder_result implements org.apache.thrift.TBase<scanForOrder_result, scanForOrder_result._Fields>, java.io.Serializable, Cloneable   {
6006
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOrder_result");
2820 chandransh 6007
 
5361 mandeep.dh 6008
    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 6009
    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 6010
 
5361 mandeep.dh 6011
    private InventoryItem success; // required
3430 rajveer 6012
    private WarehouseServiceException wex; // required
2820 chandransh 6013
 
6014
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 6015
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 6016
      SUCCESS((short)0, "success"),
2820 chandransh 6017
      WEX((short)1, "wex");
6018
 
6019
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6020
 
6021
      static {
6022
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6023
          byName.put(field.getFieldName(), field);
6024
        }
6025
      }
6026
 
6027
      /**
6028
       * Find the _Fields constant that matches fieldId, or null if its not found.
6029
       */
6030
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 6031
        switch(fieldId) {
5361 mandeep.dh 6032
          case 0: // SUCCESS
6033
            return SUCCESS;
3430 rajveer 6034
          case 1: // WEX
6035
            return WEX;
6036
          default:
6037
            return null;
6038
        }
2820 chandransh 6039
      }
6040
 
6041
      /**
6042
       * Find the _Fields constant that matches fieldId, throwing an exception
6043
       * if it is not found.
6044
       */
6045
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6046
        _Fields fields = findByThriftId(fieldId);
6047
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6048
        return fields;
6049
      }
6050
 
6051
      /**
6052
       * Find the _Fields constant that matches name, or null if its not found.
6053
       */
6054
      public static _Fields findByName(String name) {
6055
        return byName.get(name);
6056
      }
6057
 
6058
      private final short _thriftId;
6059
      private final String _fieldName;
6060
 
6061
      _Fields(short thriftId, String fieldName) {
6062
        _thriftId = thriftId;
6063
        _fieldName = fieldName;
6064
      }
6065
 
6066
      public short getThriftFieldId() {
6067
        return _thriftId;
6068
      }
6069
 
6070
      public String getFieldName() {
6071
        return _fieldName;
6072
      }
6073
    }
6074
 
6075
    // isset id assignments
6076
 
3430 rajveer 6077
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 6078
    static {
3430 rajveer 6079
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5361 mandeep.dh 6080
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6081
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 6082
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6083
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
6084
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 6085
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOrder_result.class, metaDataMap);
2820 chandransh 6086
    }
6087
 
4496 mandeep.dh 6088
    public scanForOrder_result() {
2820 chandransh 6089
    }
6090
 
4496 mandeep.dh 6091
    public scanForOrder_result(
5361 mandeep.dh 6092
      InventoryItem success,
2820 chandransh 6093
      WarehouseServiceException wex)
6094
    {
6095
      this();
5361 mandeep.dh 6096
      this.success = success;
2820 chandransh 6097
      this.wex = wex;
6098
    }
6099
 
6100
    /**
6101
     * Performs a deep copy on <i>other</i>.
6102
     */
4496 mandeep.dh 6103
    public scanForOrder_result(scanForOrder_result other) {
5361 mandeep.dh 6104
      if (other.isSetSuccess()) {
6105
        this.success = new InventoryItem(other.success);
6106
      }
2820 chandransh 6107
      if (other.isSetWex()) {
6108
        this.wex = new WarehouseServiceException(other.wex);
6109
      }
6110
    }
6111
 
4496 mandeep.dh 6112
    public scanForOrder_result deepCopy() {
6113
      return new scanForOrder_result(this);
2820 chandransh 6114
    }
6115
 
3430 rajveer 6116
    @Override
6117
    public void clear() {
5361 mandeep.dh 6118
      this.success = null;
3430 rajveer 6119
      this.wex = null;
2820 chandransh 6120
    }
6121
 
5361 mandeep.dh 6122
    public InventoryItem getSuccess() {
6123
      return this.success;
6124
    }
6125
 
6126
    public void setSuccess(InventoryItem success) {
6127
      this.success = success;
6128
    }
6129
 
6130
    public void unsetSuccess() {
6131
      this.success = null;
6132
    }
6133
 
6134
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
6135
    public boolean isSetSuccess() {
6136
      return this.success != null;
6137
    }
6138
 
6139
    public void setSuccessIsSet(boolean value) {
6140
      if (!value) {
6141
        this.success = null;
6142
      }
6143
    }
6144
 
2820 chandransh 6145
    public WarehouseServiceException getWex() {
6146
      return this.wex;
6147
    }
6148
 
3430 rajveer 6149
    public void setWex(WarehouseServiceException wex) {
2820 chandransh 6150
      this.wex = wex;
6151
    }
6152
 
6153
    public void unsetWex() {
6154
      this.wex = null;
6155
    }
6156
 
3430 rajveer 6157
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2820 chandransh 6158
    public boolean isSetWex() {
6159
      return this.wex != null;
6160
    }
6161
 
6162
    public void setWexIsSet(boolean value) {
6163
      if (!value) {
6164
        this.wex = null;
6165
      }
6166
    }
6167
 
6168
    public void setFieldValue(_Fields field, Object value) {
6169
      switch (field) {
5361 mandeep.dh 6170
      case SUCCESS:
6171
        if (value == null) {
6172
          unsetSuccess();
6173
        } else {
6174
          setSuccess((InventoryItem)value);
6175
        }
6176
        break;
6177
 
2820 chandransh 6178
      case WEX:
6179
        if (value == null) {
6180
          unsetWex();
6181
        } else {
6182
          setWex((WarehouseServiceException)value);
6183
        }
6184
        break;
6185
 
6186
      }
6187
    }
6188
 
6189
    public Object getFieldValue(_Fields field) {
6190
      switch (field) {
5361 mandeep.dh 6191
      case SUCCESS:
6192
        return getSuccess();
6193
 
2820 chandransh 6194
      case WEX:
6195
        return getWex();
6196
 
6197
      }
6198
      throw new IllegalStateException();
6199
    }
6200
 
3430 rajveer 6201
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6202
    public boolean isSet(_Fields field) {
6203
      if (field == null) {
6204
        throw new IllegalArgumentException();
6205
      }
2820 chandransh 6206
 
6207
      switch (field) {
5361 mandeep.dh 6208
      case SUCCESS:
6209
        return isSetSuccess();
2820 chandransh 6210
      case WEX:
6211
        return isSetWex();
6212
      }
6213
      throw new IllegalStateException();
6214
    }
6215
 
6216
    @Override
6217
    public boolean equals(Object that) {
6218
      if (that == null)
6219
        return false;
4496 mandeep.dh 6220
      if (that instanceof scanForOrder_result)
6221
        return this.equals((scanForOrder_result)that);
2820 chandransh 6222
      return false;
6223
    }
6224
 
4496 mandeep.dh 6225
    public boolean equals(scanForOrder_result that) {
2820 chandransh 6226
      if (that == null)
6227
        return false;
6228
 
5361 mandeep.dh 6229
      boolean this_present_success = true && this.isSetSuccess();
6230
      boolean that_present_success = true && that.isSetSuccess();
6231
      if (this_present_success || that_present_success) {
6232
        if (!(this_present_success && that_present_success))
6233
          return false;
6234
        if (!this.success.equals(that.success))
6235
          return false;
6236
      }
6237
 
2820 chandransh 6238
      boolean this_present_wex = true && this.isSetWex();
6239
      boolean that_present_wex = true && that.isSetWex();
6240
      if (this_present_wex || that_present_wex) {
6241
        if (!(this_present_wex && that_present_wex))
6242
          return false;
6243
        if (!this.wex.equals(that.wex))
6244
          return false;
6245
      }
6246
 
6247
      return true;
6248
    }
6249
 
6250
    @Override
6251
    public int hashCode() {
6252
      return 0;
6253
    }
6254
 
4496 mandeep.dh 6255
    public int compareTo(scanForOrder_result other) {
2820 chandransh 6256
      if (!getClass().equals(other.getClass())) {
6257
        return getClass().getName().compareTo(other.getClass().getName());
6258
      }
6259
 
6260
      int lastComparison = 0;
4496 mandeep.dh 6261
      scanForOrder_result typedOther = (scanForOrder_result)other;
2820 chandransh 6262
 
5361 mandeep.dh 6263
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
6264
      if (lastComparison != 0) {
6265
        return lastComparison;
6266
      }
6267
      if (isSetSuccess()) {
6268
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6269
        if (lastComparison != 0) {
6270
          return lastComparison;
6271
        }
6272
      }
3430 rajveer 6273
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 6274
      if (lastComparison != 0) {
6275
        return lastComparison;
6276
      }
3430 rajveer 6277
      if (isSetWex()) {
6278
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
6279
        if (lastComparison != 0) {
6280
          return lastComparison;
6281
        }
2820 chandransh 6282
      }
6283
      return 0;
6284
    }
6285
 
3430 rajveer 6286
    public _Fields fieldForId(int fieldId) {
6287
      return _Fields.findByThriftId(fieldId);
6288
    }
6289
 
6290
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6291
      org.apache.thrift.protocol.TField field;
2820 chandransh 6292
      iprot.readStructBegin();
6293
      while (true)
6294
      {
6295
        field = iprot.readFieldBegin();
3430 rajveer 6296
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 6297
          break;
6298
        }
3430 rajveer 6299
        switch (field.id) {
5361 mandeep.dh 6300
          case 0: // SUCCESS
6301
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6302
              this.success = new InventoryItem();
6303
              this.success.read(iprot);
6304
            } else { 
6305
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6306
            }
6307
            break;
3430 rajveer 6308
          case 1: // WEX
6309
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6310
              this.wex = new WarehouseServiceException();
6311
              this.wex.read(iprot);
6312
            } else { 
6313
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6314
            }
6315
            break;
6316
          default:
6317
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 6318
        }
3430 rajveer 6319
        iprot.readFieldEnd();
2820 chandransh 6320
      }
6321
      iprot.readStructEnd();
6322
      validate();
6323
    }
6324
 
3430 rajveer 6325
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 6326
      oprot.writeStructBegin(STRUCT_DESC);
6327
 
5361 mandeep.dh 6328
      if (this.isSetSuccess()) {
6329
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6330
        this.success.write(oprot);
6331
        oprot.writeFieldEnd();
6332
      } else if (this.isSetWex()) {
2820 chandransh 6333
        oprot.writeFieldBegin(WEX_FIELD_DESC);
6334
        this.wex.write(oprot);
6335
        oprot.writeFieldEnd();
6336
      }
6337
      oprot.writeFieldStop();
6338
      oprot.writeStructEnd();
6339
    }
6340
 
6341
    @Override
6342
    public String toString() {
4496 mandeep.dh 6343
      StringBuilder sb = new StringBuilder("scanForOrder_result(");
2820 chandransh 6344
      boolean first = true;
6345
 
5361 mandeep.dh 6346
      sb.append("success:");
6347
      if (this.success == null) {
6348
        sb.append("null");
6349
      } else {
6350
        sb.append(this.success);
6351
      }
6352
      first = false;
6353
      if (!first) sb.append(", ");
2820 chandransh 6354
      sb.append("wex:");
6355
      if (this.wex == null) {
6356
        sb.append("null");
6357
      } else {
6358
        sb.append(this.wex);
6359
      }
6360
      first = false;
6361
      sb.append(")");
6362
      return sb.toString();
6363
    }
6364
 
3430 rajveer 6365
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 6366
      // check for required fields
6367
    }
6368
 
3430 rajveer 6369
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6370
      try {
6371
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6372
      } catch (org.apache.thrift.TException te) {
6373
        throw new java.io.IOException(te);
6374
      }
6375
    }
6376
 
6377
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6378
      try {
6379
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6380
      } catch (org.apache.thrift.TException te) {
6381
        throw new java.io.IOException(te);
6382
      }
6383
    }
6384
 
2820 chandransh 6385
  }
6386
 
4496 mandeep.dh 6387
  public static class createItemNumberMapping_args implements org.apache.thrift.TBase<createItemNumberMapping_args, createItemNumberMapping_args._Fields>, java.io.Serializable, Cloneable   {
6388
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createItemNumberMapping_args");
6389
 
6390
    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);
6391
    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);
6392
 
6393
    private String itemNumber; // required
6394
    private long itemId; // required
6395
 
6396
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6397
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6398
      ITEM_NUMBER((short)1, "itemNumber"),
6399
      ITEM_ID((short)2, "itemId");
6400
 
6401
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6402
 
6403
      static {
6404
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6405
          byName.put(field.getFieldName(), field);
6406
        }
6407
      }
6408
 
6409
      /**
6410
       * Find the _Fields constant that matches fieldId, or null if its not found.
6411
       */
6412
      public static _Fields findByThriftId(int fieldId) {
6413
        switch(fieldId) {
6414
          case 1: // ITEM_NUMBER
6415
            return ITEM_NUMBER;
6416
          case 2: // ITEM_ID
6417
            return ITEM_ID;
6418
          default:
6419
            return null;
6420
        }
6421
      }
6422
 
6423
      /**
6424
       * Find the _Fields constant that matches fieldId, throwing an exception
6425
       * if it is not found.
6426
       */
6427
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6428
        _Fields fields = findByThriftId(fieldId);
6429
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6430
        return fields;
6431
      }
6432
 
6433
      /**
6434
       * Find the _Fields constant that matches name, or null if its not found.
6435
       */
6436
      public static _Fields findByName(String name) {
6437
        return byName.get(name);
6438
      }
6439
 
6440
      private final short _thriftId;
6441
      private final String _fieldName;
6442
 
6443
      _Fields(short thriftId, String fieldName) {
6444
        _thriftId = thriftId;
6445
        _fieldName = fieldName;
6446
      }
6447
 
6448
      public short getThriftFieldId() {
6449
        return _thriftId;
6450
      }
6451
 
6452
      public String getFieldName() {
6453
        return _fieldName;
6454
      }
6455
    }
6456
 
6457
    // isset id assignments
6458
    private static final int __ITEMID_ISSET_ID = 0;
6459
    private BitSet __isset_bit_vector = new BitSet(1);
6460
 
6461
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6462
    static {
6463
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6464
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6465
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
6466
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6467
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6468
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6469
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createItemNumberMapping_args.class, metaDataMap);
6470
    }
6471
 
6472
    public createItemNumberMapping_args() {
6473
    }
6474
 
6475
    public createItemNumberMapping_args(
6476
      String itemNumber,
6477
      long itemId)
6478
    {
6479
      this();
6480
      this.itemNumber = itemNumber;
6481
      this.itemId = itemId;
6482
      setItemIdIsSet(true);
6483
    }
6484
 
6485
    /**
6486
     * Performs a deep copy on <i>other</i>.
6487
     */
6488
    public createItemNumberMapping_args(createItemNumberMapping_args other) {
6489
      __isset_bit_vector.clear();
6490
      __isset_bit_vector.or(other.__isset_bit_vector);
6491
      if (other.isSetItemNumber()) {
6492
        this.itemNumber = other.itemNumber;
6493
      }
6494
      this.itemId = other.itemId;
6495
    }
6496
 
6497
    public createItemNumberMapping_args deepCopy() {
6498
      return new createItemNumberMapping_args(this);
6499
    }
6500
 
6501
    @Override
6502
    public void clear() {
6503
      this.itemNumber = null;
6504
      setItemIdIsSet(false);
6505
      this.itemId = 0;
6506
    }
6507
 
6508
    public String getItemNumber() {
6509
      return this.itemNumber;
6510
    }
6511
 
6512
    public void setItemNumber(String itemNumber) {
6513
      this.itemNumber = itemNumber;
6514
    }
6515
 
6516
    public void unsetItemNumber() {
6517
      this.itemNumber = null;
6518
    }
6519
 
6520
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
6521
    public boolean isSetItemNumber() {
6522
      return this.itemNumber != null;
6523
    }
6524
 
6525
    public void setItemNumberIsSet(boolean value) {
6526
      if (!value) {
6527
        this.itemNumber = null;
6528
      }
6529
    }
6530
 
6531
    public long getItemId() {
6532
      return this.itemId;
6533
    }
6534
 
6535
    public void setItemId(long itemId) {
6536
      this.itemId = itemId;
6537
      setItemIdIsSet(true);
6538
    }
6539
 
6540
    public void unsetItemId() {
6541
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
6542
    }
6543
 
6544
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
6545
    public boolean isSetItemId() {
6546
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
6547
    }
6548
 
6549
    public void setItemIdIsSet(boolean value) {
6550
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
6551
    }
6552
 
6553
    public void setFieldValue(_Fields field, Object value) {
6554
      switch (field) {
6555
      case ITEM_NUMBER:
6556
        if (value == null) {
6557
          unsetItemNumber();
6558
        } else {
6559
          setItemNumber((String)value);
6560
        }
6561
        break;
6562
 
6563
      case ITEM_ID:
6564
        if (value == null) {
6565
          unsetItemId();
6566
        } else {
6567
          setItemId((Long)value);
6568
        }
6569
        break;
6570
 
6571
      }
6572
    }
6573
 
6574
    public Object getFieldValue(_Fields field) {
6575
      switch (field) {
6576
      case ITEM_NUMBER:
6577
        return getItemNumber();
6578
 
6579
      case ITEM_ID:
6580
        return Long.valueOf(getItemId());
6581
 
6582
      }
6583
      throw new IllegalStateException();
6584
    }
6585
 
6586
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6587
    public boolean isSet(_Fields field) {
6588
      if (field == null) {
6589
        throw new IllegalArgumentException();
6590
      }
6591
 
6592
      switch (field) {
6593
      case ITEM_NUMBER:
6594
        return isSetItemNumber();
6595
      case ITEM_ID:
6596
        return isSetItemId();
6597
      }
6598
      throw new IllegalStateException();
6599
    }
6600
 
6601
    @Override
6602
    public boolean equals(Object that) {
6603
      if (that == null)
6604
        return false;
6605
      if (that instanceof createItemNumberMapping_args)
6606
        return this.equals((createItemNumberMapping_args)that);
6607
      return false;
6608
    }
6609
 
6610
    public boolean equals(createItemNumberMapping_args that) {
6611
      if (that == null)
6612
        return false;
6613
 
6614
      boolean this_present_itemNumber = true && this.isSetItemNumber();
6615
      boolean that_present_itemNumber = true && that.isSetItemNumber();
6616
      if (this_present_itemNumber || that_present_itemNumber) {
6617
        if (!(this_present_itemNumber && that_present_itemNumber))
6618
          return false;
6619
        if (!this.itemNumber.equals(that.itemNumber))
6620
          return false;
6621
      }
6622
 
6623
      boolean this_present_itemId = true;
6624
      boolean that_present_itemId = true;
6625
      if (this_present_itemId || that_present_itemId) {
6626
        if (!(this_present_itemId && that_present_itemId))
6627
          return false;
6628
        if (this.itemId != that.itemId)
6629
          return false;
6630
      }
6631
 
6632
      return true;
6633
    }
6634
 
6635
    @Override
6636
    public int hashCode() {
6637
      return 0;
6638
    }
6639
 
6640
    public int compareTo(createItemNumberMapping_args other) {
6641
      if (!getClass().equals(other.getClass())) {
6642
        return getClass().getName().compareTo(other.getClass().getName());
6643
      }
6644
 
6645
      int lastComparison = 0;
6646
      createItemNumberMapping_args typedOther = (createItemNumberMapping_args)other;
6647
 
6648
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
6649
      if (lastComparison != 0) {
6650
        return lastComparison;
6651
      }
6652
      if (isSetItemNumber()) {
6653
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
6654
        if (lastComparison != 0) {
6655
          return lastComparison;
6656
        }
6657
      }
6658
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
6659
      if (lastComparison != 0) {
6660
        return lastComparison;
6661
      }
6662
      if (isSetItemId()) {
6663
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
6664
        if (lastComparison != 0) {
6665
          return lastComparison;
6666
        }
6667
      }
6668
      return 0;
6669
    }
6670
 
6671
    public _Fields fieldForId(int fieldId) {
6672
      return _Fields.findByThriftId(fieldId);
6673
    }
6674
 
6675
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6676
      org.apache.thrift.protocol.TField field;
6677
      iprot.readStructBegin();
6678
      while (true)
6679
      {
6680
        field = iprot.readFieldBegin();
6681
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6682
          break;
6683
        }
6684
        switch (field.id) {
6685
          case 1: // ITEM_NUMBER
6686
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
6687
              this.itemNumber = iprot.readString();
6688
            } else { 
6689
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6690
            }
6691
            break;
6692
          case 2: // ITEM_ID
6693
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6694
              this.itemId = iprot.readI64();
6695
              setItemIdIsSet(true);
6696
            } else { 
6697
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6698
            }
6699
            break;
6700
          default:
6701
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6702
        }
6703
        iprot.readFieldEnd();
6704
      }
6705
      iprot.readStructEnd();
6706
      validate();
6707
    }
6708
 
6709
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6710
      validate();
6711
 
6712
      oprot.writeStructBegin(STRUCT_DESC);
6713
      if (this.itemNumber != null) {
6714
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
6715
        oprot.writeString(this.itemNumber);
6716
        oprot.writeFieldEnd();
6717
      }
6718
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
6719
      oprot.writeI64(this.itemId);
6720
      oprot.writeFieldEnd();
6721
      oprot.writeFieldStop();
6722
      oprot.writeStructEnd();
6723
    }
6724
 
6725
    @Override
6726
    public String toString() {
6727
      StringBuilder sb = new StringBuilder("createItemNumberMapping_args(");
6728
      boolean first = true;
6729
 
6730
      sb.append("itemNumber:");
6731
      if (this.itemNumber == null) {
6732
        sb.append("null");
6733
      } else {
6734
        sb.append(this.itemNumber);
6735
      }
6736
      first = false;
6737
      if (!first) sb.append(", ");
6738
      sb.append("itemId:");
6739
      sb.append(this.itemId);
6740
      first = false;
6741
      sb.append(")");
6742
      return sb.toString();
6743
    }
6744
 
6745
    public void validate() throws org.apache.thrift.TException {
6746
      // check for required fields
6747
    }
6748
 
6749
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6750
      try {
6751
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6752
      } catch (org.apache.thrift.TException te) {
6753
        throw new java.io.IOException(te);
6754
      }
6755
    }
6756
 
6757
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6758
      try {
6759
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
6760
        __isset_bit_vector = new BitSet(1);
6761
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6762
      } catch (org.apache.thrift.TException te) {
6763
        throw new java.io.IOException(te);
6764
      }
6765
    }
6766
 
6767
  }
6768
 
6769
  public static class createItemNumberMapping_result implements org.apache.thrift.TBase<createItemNumberMapping_result, createItemNumberMapping_result._Fields>, java.io.Serializable, Cloneable   {
6770
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createItemNumberMapping_result");
6771
 
6772
 
6773
 
6774
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6775
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6776
;
6777
 
6778
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6779
 
6780
      static {
6781
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6782
          byName.put(field.getFieldName(), field);
6783
        }
6784
      }
6785
 
6786
      /**
6787
       * Find the _Fields constant that matches fieldId, or null if its not found.
6788
       */
6789
      public static _Fields findByThriftId(int fieldId) {
6790
        switch(fieldId) {
6791
          default:
6792
            return null;
6793
        }
6794
      }
6795
 
6796
      /**
6797
       * Find the _Fields constant that matches fieldId, throwing an exception
6798
       * if it is not found.
6799
       */
6800
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6801
        _Fields fields = findByThriftId(fieldId);
6802
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6803
        return fields;
6804
      }
6805
 
6806
      /**
6807
       * Find the _Fields constant that matches name, or null if its not found.
6808
       */
6809
      public static _Fields findByName(String name) {
6810
        return byName.get(name);
6811
      }
6812
 
6813
      private final short _thriftId;
6814
      private final String _fieldName;
6815
 
6816
      _Fields(short thriftId, String fieldName) {
6817
        _thriftId = thriftId;
6818
        _fieldName = fieldName;
6819
      }
6820
 
6821
      public short getThriftFieldId() {
6822
        return _thriftId;
6823
      }
6824
 
6825
      public String getFieldName() {
6826
        return _fieldName;
6827
      }
6828
    }
6829
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6830
    static {
6831
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6832
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6833
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createItemNumberMapping_result.class, metaDataMap);
6834
    }
6835
 
6836
    public createItemNumberMapping_result() {
6837
    }
6838
 
6839
    /**
6840
     * Performs a deep copy on <i>other</i>.
6841
     */
6842
    public createItemNumberMapping_result(createItemNumberMapping_result other) {
6843
    }
6844
 
6845
    public createItemNumberMapping_result deepCopy() {
6846
      return new createItemNumberMapping_result(this);
6847
    }
6848
 
6849
    @Override
6850
    public void clear() {
6851
    }
6852
 
6853
    public void setFieldValue(_Fields field, Object value) {
6854
      switch (field) {
6855
      }
6856
    }
6857
 
6858
    public Object getFieldValue(_Fields field) {
6859
      switch (field) {
6860
      }
6861
      throw new IllegalStateException();
6862
    }
6863
 
6864
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6865
    public boolean isSet(_Fields field) {
6866
      if (field == null) {
6867
        throw new IllegalArgumentException();
6868
      }
6869
 
6870
      switch (field) {
6871
      }
6872
      throw new IllegalStateException();
6873
    }
6874
 
6875
    @Override
6876
    public boolean equals(Object that) {
6877
      if (that == null)
6878
        return false;
6879
      if (that instanceof createItemNumberMapping_result)
6880
        return this.equals((createItemNumberMapping_result)that);
6881
      return false;
6882
    }
6883
 
6884
    public boolean equals(createItemNumberMapping_result that) {
6885
      if (that == null)
6886
        return false;
6887
 
6888
      return true;
6889
    }
6890
 
6891
    @Override
6892
    public int hashCode() {
6893
      return 0;
6894
    }
6895
 
6896
    public int compareTo(createItemNumberMapping_result other) {
6897
      if (!getClass().equals(other.getClass())) {
6898
        return getClass().getName().compareTo(other.getClass().getName());
6899
      }
6900
 
6901
      int lastComparison = 0;
6902
      createItemNumberMapping_result typedOther = (createItemNumberMapping_result)other;
6903
 
6904
      return 0;
6905
    }
6906
 
6907
    public _Fields fieldForId(int fieldId) {
6908
      return _Fields.findByThriftId(fieldId);
6909
    }
6910
 
6911
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6912
      org.apache.thrift.protocol.TField field;
6913
      iprot.readStructBegin();
6914
      while (true)
6915
      {
6916
        field = iprot.readFieldBegin();
6917
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6918
          break;
6919
        }
6920
        switch (field.id) {
6921
          default:
6922
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6923
        }
6924
        iprot.readFieldEnd();
6925
      }
6926
      iprot.readStructEnd();
6927
      validate();
6928
    }
6929
 
6930
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6931
      oprot.writeStructBegin(STRUCT_DESC);
6932
 
6933
      oprot.writeFieldStop();
6934
      oprot.writeStructEnd();
6935
    }
6936
 
6937
    @Override
6938
    public String toString() {
6939
      StringBuilder sb = new StringBuilder("createItemNumberMapping_result(");
6940
      boolean first = true;
6941
 
6942
      sb.append(")");
6943
      return sb.toString();
6944
    }
6945
 
6946
    public void validate() throws org.apache.thrift.TException {
6947
      // check for required fields
6948
    }
6949
 
6950
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6951
      try {
6952
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6953
      } catch (org.apache.thrift.TException te) {
6954
        throw new java.io.IOException(te);
6955
      }
6956
    }
6957
 
6958
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6959
      try {
6960
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6961
      } catch (org.apache.thrift.TException te) {
6962
        throw new java.io.IOException(te);
6963
      }
6964
    }
6965
 
6966
  }
6967
 
4622 amit.gupta 6968
  public static class getItemNumbers_args implements org.apache.thrift.TBase<getItemNumbers_args, getItemNumbers_args._Fields>, java.io.Serializable, Cloneable   {
6969
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemNumbers_args");
6970
 
6971
    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);
6972
 
6973
    private long itemId; // required
6974
 
6975
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6976
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6977
      ITEM_ID((short)1, "itemId");
6978
 
6979
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6980
 
6981
      static {
6982
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6983
          byName.put(field.getFieldName(), field);
6984
        }
6985
      }
6986
 
6987
      /**
6988
       * Find the _Fields constant that matches fieldId, or null if its not found.
6989
       */
6990
      public static _Fields findByThriftId(int fieldId) {
6991
        switch(fieldId) {
6992
          case 1: // ITEM_ID
6993
            return ITEM_ID;
6994
          default:
6995
            return null;
6996
        }
6997
      }
6998
 
6999
      /**
7000
       * Find the _Fields constant that matches fieldId, throwing an exception
7001
       * if it is not found.
7002
       */
7003
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7004
        _Fields fields = findByThriftId(fieldId);
7005
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7006
        return fields;
7007
      }
7008
 
7009
      /**
7010
       * Find the _Fields constant that matches name, or null if its not found.
7011
       */
7012
      public static _Fields findByName(String name) {
7013
        return byName.get(name);
7014
      }
7015
 
7016
      private final short _thriftId;
7017
      private final String _fieldName;
7018
 
7019
      _Fields(short thriftId, String fieldName) {
7020
        _thriftId = thriftId;
7021
        _fieldName = fieldName;
7022
      }
7023
 
7024
      public short getThriftFieldId() {
7025
        return _thriftId;
7026
      }
7027
 
7028
      public String getFieldName() {
7029
        return _fieldName;
7030
      }
7031
    }
7032
 
7033
    // isset id assignments
7034
    private static final int __ITEMID_ISSET_ID = 0;
7035
    private BitSet __isset_bit_vector = new BitSet(1);
7036
 
7037
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7038
    static {
7039
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7040
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7041
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7042
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7043
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemNumbers_args.class, metaDataMap);
7044
    }
7045
 
7046
    public getItemNumbers_args() {
7047
    }
7048
 
7049
    public getItemNumbers_args(
7050
      long itemId)
7051
    {
7052
      this();
7053
      this.itemId = itemId;
7054
      setItemIdIsSet(true);
7055
    }
7056
 
7057
    /**
7058
     * Performs a deep copy on <i>other</i>.
7059
     */
7060
    public getItemNumbers_args(getItemNumbers_args other) {
7061
      __isset_bit_vector.clear();
7062
      __isset_bit_vector.or(other.__isset_bit_vector);
7063
      this.itemId = other.itemId;
7064
    }
7065
 
7066
    public getItemNumbers_args deepCopy() {
7067
      return new getItemNumbers_args(this);
7068
    }
7069
 
7070
    @Override
7071
    public void clear() {
7072
      setItemIdIsSet(false);
7073
      this.itemId = 0;
7074
    }
7075
 
7076
    public long getItemId() {
7077
      return this.itemId;
7078
    }
7079
 
7080
    public void setItemId(long itemId) {
7081
      this.itemId = itemId;
7082
      setItemIdIsSet(true);
7083
    }
7084
 
7085
    public void unsetItemId() {
7086
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
7087
    }
7088
 
7089
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
7090
    public boolean isSetItemId() {
7091
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
7092
    }
7093
 
7094
    public void setItemIdIsSet(boolean value) {
7095
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
7096
    }
7097
 
7098
    public void setFieldValue(_Fields field, Object value) {
7099
      switch (field) {
7100
      case ITEM_ID:
7101
        if (value == null) {
7102
          unsetItemId();
7103
        } else {
7104
          setItemId((Long)value);
7105
        }
7106
        break;
7107
 
7108
      }
7109
    }
7110
 
7111
    public Object getFieldValue(_Fields field) {
7112
      switch (field) {
7113
      case ITEM_ID:
7114
        return Long.valueOf(getItemId());
7115
 
7116
      }
7117
      throw new IllegalStateException();
7118
    }
7119
 
7120
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7121
    public boolean isSet(_Fields field) {
7122
      if (field == null) {
7123
        throw new IllegalArgumentException();
7124
      }
7125
 
7126
      switch (field) {
7127
      case ITEM_ID:
7128
        return isSetItemId();
7129
      }
7130
      throw new IllegalStateException();
7131
    }
7132
 
7133
    @Override
7134
    public boolean equals(Object that) {
7135
      if (that == null)
7136
        return false;
7137
      if (that instanceof getItemNumbers_args)
7138
        return this.equals((getItemNumbers_args)that);
7139
      return false;
7140
    }
7141
 
7142
    public boolean equals(getItemNumbers_args that) {
7143
      if (that == null)
7144
        return false;
7145
 
7146
      boolean this_present_itemId = true;
7147
      boolean that_present_itemId = true;
7148
      if (this_present_itemId || that_present_itemId) {
7149
        if (!(this_present_itemId && that_present_itemId))
7150
          return false;
7151
        if (this.itemId != that.itemId)
7152
          return false;
7153
      }
7154
 
7155
      return true;
7156
    }
7157
 
7158
    @Override
7159
    public int hashCode() {
7160
      return 0;
7161
    }
7162
 
7163
    public int compareTo(getItemNumbers_args other) {
7164
      if (!getClass().equals(other.getClass())) {
7165
        return getClass().getName().compareTo(other.getClass().getName());
7166
      }
7167
 
7168
      int lastComparison = 0;
7169
      getItemNumbers_args typedOther = (getItemNumbers_args)other;
7170
 
7171
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
7172
      if (lastComparison != 0) {
7173
        return lastComparison;
7174
      }
7175
      if (isSetItemId()) {
7176
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
7177
        if (lastComparison != 0) {
7178
          return lastComparison;
7179
        }
7180
      }
7181
      return 0;
7182
    }
7183
 
7184
    public _Fields fieldForId(int fieldId) {
7185
      return _Fields.findByThriftId(fieldId);
7186
    }
7187
 
7188
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7189
      org.apache.thrift.protocol.TField field;
7190
      iprot.readStructBegin();
7191
      while (true)
7192
      {
7193
        field = iprot.readFieldBegin();
7194
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7195
          break;
7196
        }
7197
        switch (field.id) {
7198
          case 1: // ITEM_ID
7199
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7200
              this.itemId = iprot.readI64();
7201
              setItemIdIsSet(true);
7202
            } else { 
7203
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7204
            }
7205
            break;
7206
          default:
7207
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7208
        }
7209
        iprot.readFieldEnd();
7210
      }
7211
      iprot.readStructEnd();
7212
      validate();
7213
    }
7214
 
7215
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7216
      validate();
7217
 
7218
      oprot.writeStructBegin(STRUCT_DESC);
7219
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
7220
      oprot.writeI64(this.itemId);
7221
      oprot.writeFieldEnd();
7222
      oprot.writeFieldStop();
7223
      oprot.writeStructEnd();
7224
    }
7225
 
7226
    @Override
7227
    public String toString() {
7228
      StringBuilder sb = new StringBuilder("getItemNumbers_args(");
7229
      boolean first = true;
7230
 
7231
      sb.append("itemId:");
7232
      sb.append(this.itemId);
7233
      first = false;
7234
      sb.append(")");
7235
      return sb.toString();
7236
    }
7237
 
7238
    public void validate() throws org.apache.thrift.TException {
7239
      // check for required fields
7240
    }
7241
 
7242
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7243
      try {
7244
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7245
      } catch (org.apache.thrift.TException te) {
7246
        throw new java.io.IOException(te);
7247
      }
7248
    }
7249
 
7250
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7251
      try {
7252
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
7253
        __isset_bit_vector = new BitSet(1);
7254
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7255
      } catch (org.apache.thrift.TException te) {
7256
        throw new java.io.IOException(te);
7257
      }
7258
    }
7259
 
7260
  }
7261
 
7262
  public static class getItemNumbers_result implements org.apache.thrift.TBase<getItemNumbers_result, getItemNumbers_result._Fields>, java.io.Serializable, Cloneable   {
7263
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemNumbers_result");
7264
 
7265
    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);
7266
 
7267
    private List<String> success; // required
7268
 
7269
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7270
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7271
      SUCCESS((short)0, "success");
7272
 
7273
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7274
 
7275
      static {
7276
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7277
          byName.put(field.getFieldName(), field);
7278
        }
7279
      }
7280
 
7281
      /**
7282
       * Find the _Fields constant that matches fieldId, or null if its not found.
7283
       */
7284
      public static _Fields findByThriftId(int fieldId) {
7285
        switch(fieldId) {
7286
          case 0: // SUCCESS
7287
            return SUCCESS;
7288
          default:
7289
            return null;
7290
        }
7291
      }
7292
 
7293
      /**
7294
       * Find the _Fields constant that matches fieldId, throwing an exception
7295
       * if it is not found.
7296
       */
7297
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7298
        _Fields fields = findByThriftId(fieldId);
7299
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7300
        return fields;
7301
      }
7302
 
7303
      /**
7304
       * Find the _Fields constant that matches name, or null if its not found.
7305
       */
7306
      public static _Fields findByName(String name) {
7307
        return byName.get(name);
7308
      }
7309
 
7310
      private final short _thriftId;
7311
      private final String _fieldName;
7312
 
7313
      _Fields(short thriftId, String fieldName) {
7314
        _thriftId = thriftId;
7315
        _fieldName = fieldName;
7316
      }
7317
 
7318
      public short getThriftFieldId() {
7319
        return _thriftId;
7320
      }
7321
 
7322
      public String getFieldName() {
7323
        return _fieldName;
7324
      }
7325
    }
7326
 
7327
    // isset id assignments
7328
 
7329
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7330
    static {
7331
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7332
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7333
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7334
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
7335
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7336
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemNumbers_result.class, metaDataMap);
7337
    }
7338
 
7339
    public getItemNumbers_result() {
7340
    }
7341
 
7342
    public getItemNumbers_result(
7343
      List<String> success)
7344
    {
7345
      this();
7346
      this.success = success;
7347
    }
7348
 
7349
    /**
7350
     * Performs a deep copy on <i>other</i>.
7351
     */
7352
    public getItemNumbers_result(getItemNumbers_result other) {
7353
      if (other.isSetSuccess()) {
7354
        List<String> __this__success = new ArrayList<String>();
7355
        for (String other_element : other.success) {
7356
          __this__success.add(other_element);
7357
        }
7358
        this.success = __this__success;
7359
      }
7360
    }
7361
 
7362
    public getItemNumbers_result deepCopy() {
7363
      return new getItemNumbers_result(this);
7364
    }
7365
 
7366
    @Override
7367
    public void clear() {
7368
      this.success = null;
7369
    }
7370
 
7371
    public int getSuccessSize() {
7372
      return (this.success == null) ? 0 : this.success.size();
7373
    }
7374
 
7375
    public java.util.Iterator<String> getSuccessIterator() {
7376
      return (this.success == null) ? null : this.success.iterator();
7377
    }
7378
 
7379
    public void addToSuccess(String elem) {
7380
      if (this.success == null) {
7381
        this.success = new ArrayList<String>();
7382
      }
7383
      this.success.add(elem);
7384
    }
7385
 
7386
    public List<String> getSuccess() {
7387
      return this.success;
7388
    }
7389
 
7390
    public void setSuccess(List<String> success) {
7391
      this.success = success;
7392
    }
7393
 
7394
    public void unsetSuccess() {
7395
      this.success = null;
7396
    }
7397
 
7398
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7399
    public boolean isSetSuccess() {
7400
      return this.success != null;
7401
    }
7402
 
7403
    public void setSuccessIsSet(boolean value) {
7404
      if (!value) {
7405
        this.success = null;
7406
      }
7407
    }
7408
 
7409
    public void setFieldValue(_Fields field, Object value) {
7410
      switch (field) {
7411
      case SUCCESS:
7412
        if (value == null) {
7413
          unsetSuccess();
7414
        } else {
7415
          setSuccess((List<String>)value);
7416
        }
7417
        break;
7418
 
7419
      }
7420
    }
7421
 
7422
    public Object getFieldValue(_Fields field) {
7423
      switch (field) {
7424
      case SUCCESS:
7425
        return getSuccess();
7426
 
7427
      }
7428
      throw new IllegalStateException();
7429
    }
7430
 
7431
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7432
    public boolean isSet(_Fields field) {
7433
      if (field == null) {
7434
        throw new IllegalArgumentException();
7435
      }
7436
 
7437
      switch (field) {
7438
      case SUCCESS:
7439
        return isSetSuccess();
7440
      }
7441
      throw new IllegalStateException();
7442
    }
7443
 
7444
    @Override
7445
    public boolean equals(Object that) {
7446
      if (that == null)
7447
        return false;
7448
      if (that instanceof getItemNumbers_result)
7449
        return this.equals((getItemNumbers_result)that);
7450
      return false;
7451
    }
7452
 
7453
    public boolean equals(getItemNumbers_result that) {
7454
      if (that == null)
7455
        return false;
7456
 
7457
      boolean this_present_success = true && this.isSetSuccess();
7458
      boolean that_present_success = true && that.isSetSuccess();
7459
      if (this_present_success || that_present_success) {
7460
        if (!(this_present_success && that_present_success))
7461
          return false;
7462
        if (!this.success.equals(that.success))
7463
          return false;
7464
      }
7465
 
7466
      return true;
7467
    }
7468
 
7469
    @Override
7470
    public int hashCode() {
7471
      return 0;
7472
    }
7473
 
7474
    public int compareTo(getItemNumbers_result other) {
7475
      if (!getClass().equals(other.getClass())) {
7476
        return getClass().getName().compareTo(other.getClass().getName());
7477
      }
7478
 
7479
      int lastComparison = 0;
7480
      getItemNumbers_result typedOther = (getItemNumbers_result)other;
7481
 
7482
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7483
      if (lastComparison != 0) {
7484
        return lastComparison;
7485
      }
7486
      if (isSetSuccess()) {
7487
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7488
        if (lastComparison != 0) {
7489
          return lastComparison;
7490
        }
7491
      }
7492
      return 0;
7493
    }
7494
 
7495
    public _Fields fieldForId(int fieldId) {
7496
      return _Fields.findByThriftId(fieldId);
7497
    }
7498
 
7499
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7500
      org.apache.thrift.protocol.TField field;
7501
      iprot.readStructBegin();
7502
      while (true)
7503
      {
7504
        field = iprot.readFieldBegin();
7505
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7506
          break;
7507
        }
7508
        switch (field.id) {
7509
          case 0: // SUCCESS
7510
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
7511
              {
5361 mandeep.dh 7512
                org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
7513
                this.success = new ArrayList<String>(_list0.size);
7514
                for (int _i1 = 0; _i1 < _list0.size; ++_i1)
4622 amit.gupta 7515
                {
5361 mandeep.dh 7516
                  String _elem2; // required
7517
                  _elem2 = iprot.readString();
7518
                  this.success.add(_elem2);
4622 amit.gupta 7519
                }
7520
                iprot.readListEnd();
7521
              }
7522
            } else { 
7523
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7524
            }
7525
            break;
7526
          default:
7527
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7528
        }
7529
        iprot.readFieldEnd();
7530
      }
7531
      iprot.readStructEnd();
7532
      validate();
7533
    }
7534
 
7535
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7536
      oprot.writeStructBegin(STRUCT_DESC);
7537
 
7538
      if (this.isSetSuccess()) {
7539
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7540
        {
7541
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size()));
5361 mandeep.dh 7542
          for (String _iter3 : this.success)
4622 amit.gupta 7543
          {
5361 mandeep.dh 7544
            oprot.writeString(_iter3);
4622 amit.gupta 7545
          }
7546
          oprot.writeListEnd();
7547
        }
7548
        oprot.writeFieldEnd();
7549
      }
7550
      oprot.writeFieldStop();
7551
      oprot.writeStructEnd();
7552
    }
7553
 
7554
    @Override
7555
    public String toString() {
7556
      StringBuilder sb = new StringBuilder("getItemNumbers_result(");
7557
      boolean first = true;
7558
 
7559
      sb.append("success:");
7560
      if (this.success == null) {
7561
        sb.append("null");
7562
      } else {
7563
        sb.append(this.success);
7564
      }
7565
      first = false;
7566
      sb.append(")");
7567
      return sb.toString();
7568
    }
7569
 
7570
    public void validate() throws org.apache.thrift.TException {
7571
      // check for required fields
7572
    }
7573
 
7574
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7575
      try {
7576
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7577
      } catch (org.apache.thrift.TException te) {
7578
        throw new java.io.IOException(te);
7579
      }
7580
    }
7581
 
7582
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7583
      try {
7584
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7585
      } catch (org.apache.thrift.TException te) {
7586
        throw new java.io.IOException(te);
7587
      }
7588
    }
7589
 
7590
  }
7591
 
5110 mandeep.dh 7592
  public static class getItemIds_args implements org.apache.thrift.TBase<getItemIds_args, getItemIds_args._Fields>, java.io.Serializable, Cloneable   {
7593
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemIds_args");
7594
 
7595
    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);
7596
 
7597
    private String itemNumber; // required
7598
 
7599
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7600
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7601
      ITEM_NUMBER((short)1, "itemNumber");
7602
 
7603
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7604
 
7605
      static {
7606
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7607
          byName.put(field.getFieldName(), field);
7608
        }
7609
      }
7610
 
7611
      /**
7612
       * Find the _Fields constant that matches fieldId, or null if its not found.
7613
       */
7614
      public static _Fields findByThriftId(int fieldId) {
7615
        switch(fieldId) {
7616
          case 1: // ITEM_NUMBER
7617
            return ITEM_NUMBER;
7618
          default:
7619
            return null;
7620
        }
7621
      }
7622
 
7623
      /**
7624
       * Find the _Fields constant that matches fieldId, throwing an exception
7625
       * if it is not found.
7626
       */
7627
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7628
        _Fields fields = findByThriftId(fieldId);
7629
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7630
        return fields;
7631
      }
7632
 
7633
      /**
7634
       * Find the _Fields constant that matches name, or null if its not found.
7635
       */
7636
      public static _Fields findByName(String name) {
7637
        return byName.get(name);
7638
      }
7639
 
7640
      private final short _thriftId;
7641
      private final String _fieldName;
7642
 
7643
      _Fields(short thriftId, String fieldName) {
7644
        _thriftId = thriftId;
7645
        _fieldName = fieldName;
7646
      }
7647
 
7648
      public short getThriftFieldId() {
7649
        return _thriftId;
7650
      }
7651
 
7652
      public String getFieldName() {
7653
        return _fieldName;
7654
      }
7655
    }
7656
 
7657
    // isset id assignments
7658
 
7659
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7660
    static {
7661
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7662
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7663
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
7664
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7665
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemIds_args.class, metaDataMap);
7666
    }
7667
 
7668
    public getItemIds_args() {
7669
    }
7670
 
7671
    public getItemIds_args(
7672
      String itemNumber)
7673
    {
7674
      this();
7675
      this.itemNumber = itemNumber;
7676
    }
7677
 
7678
    /**
7679
     * Performs a deep copy on <i>other</i>.
7680
     */
7681
    public getItemIds_args(getItemIds_args other) {
7682
      if (other.isSetItemNumber()) {
7683
        this.itemNumber = other.itemNumber;
7684
      }
7685
    }
7686
 
7687
    public getItemIds_args deepCopy() {
7688
      return new getItemIds_args(this);
7689
    }
7690
 
7691
    @Override
7692
    public void clear() {
7693
      this.itemNumber = null;
7694
    }
7695
 
7696
    public String getItemNumber() {
7697
      return this.itemNumber;
7698
    }
7699
 
7700
    public void setItemNumber(String itemNumber) {
7701
      this.itemNumber = itemNumber;
7702
    }
7703
 
7704
    public void unsetItemNumber() {
7705
      this.itemNumber = null;
7706
    }
7707
 
7708
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
7709
    public boolean isSetItemNumber() {
7710
      return this.itemNumber != null;
7711
    }
7712
 
7713
    public void setItemNumberIsSet(boolean value) {
7714
      if (!value) {
7715
        this.itemNumber = null;
7716
      }
7717
    }
7718
 
7719
    public void setFieldValue(_Fields field, Object value) {
7720
      switch (field) {
7721
      case ITEM_NUMBER:
7722
        if (value == null) {
7723
          unsetItemNumber();
7724
        } else {
7725
          setItemNumber((String)value);
7726
        }
7727
        break;
7728
 
7729
      }
7730
    }
7731
 
7732
    public Object getFieldValue(_Fields field) {
7733
      switch (field) {
7734
      case ITEM_NUMBER:
7735
        return getItemNumber();
7736
 
7737
      }
7738
      throw new IllegalStateException();
7739
    }
7740
 
7741
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7742
    public boolean isSet(_Fields field) {
7743
      if (field == null) {
7744
        throw new IllegalArgumentException();
7745
      }
7746
 
7747
      switch (field) {
7748
      case ITEM_NUMBER:
7749
        return isSetItemNumber();
7750
      }
7751
      throw new IllegalStateException();
7752
    }
7753
 
7754
    @Override
7755
    public boolean equals(Object that) {
7756
      if (that == null)
7757
        return false;
7758
      if (that instanceof getItemIds_args)
7759
        return this.equals((getItemIds_args)that);
7760
      return false;
7761
    }
7762
 
7763
    public boolean equals(getItemIds_args that) {
7764
      if (that == null)
7765
        return false;
7766
 
7767
      boolean this_present_itemNumber = true && this.isSetItemNumber();
7768
      boolean that_present_itemNumber = true && that.isSetItemNumber();
7769
      if (this_present_itemNumber || that_present_itemNumber) {
7770
        if (!(this_present_itemNumber && that_present_itemNumber))
7771
          return false;
7772
        if (!this.itemNumber.equals(that.itemNumber))
7773
          return false;
7774
      }
7775
 
7776
      return true;
7777
    }
7778
 
7779
    @Override
7780
    public int hashCode() {
7781
      return 0;
7782
    }
7783
 
7784
    public int compareTo(getItemIds_args other) {
7785
      if (!getClass().equals(other.getClass())) {
7786
        return getClass().getName().compareTo(other.getClass().getName());
7787
      }
7788
 
7789
      int lastComparison = 0;
7790
      getItemIds_args typedOther = (getItemIds_args)other;
7791
 
7792
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
7793
      if (lastComparison != 0) {
7794
        return lastComparison;
7795
      }
7796
      if (isSetItemNumber()) {
7797
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
7798
        if (lastComparison != 0) {
7799
          return lastComparison;
7800
        }
7801
      }
7802
      return 0;
7803
    }
7804
 
7805
    public _Fields fieldForId(int fieldId) {
7806
      return _Fields.findByThriftId(fieldId);
7807
    }
7808
 
7809
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7810
      org.apache.thrift.protocol.TField field;
7811
      iprot.readStructBegin();
7812
      while (true)
7813
      {
7814
        field = iprot.readFieldBegin();
7815
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7816
          break;
7817
        }
7818
        switch (field.id) {
7819
          case 1: // ITEM_NUMBER
7820
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
7821
              this.itemNumber = iprot.readString();
7822
            } else { 
7823
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7824
            }
7825
            break;
7826
          default:
7827
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7828
        }
7829
        iprot.readFieldEnd();
7830
      }
7831
      iprot.readStructEnd();
7832
      validate();
7833
    }
7834
 
7835
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7836
      validate();
7837
 
7838
      oprot.writeStructBegin(STRUCT_DESC);
7839
      if (this.itemNumber != null) {
7840
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
7841
        oprot.writeString(this.itemNumber);
7842
        oprot.writeFieldEnd();
7843
      }
7844
      oprot.writeFieldStop();
7845
      oprot.writeStructEnd();
7846
    }
7847
 
7848
    @Override
7849
    public String toString() {
7850
      StringBuilder sb = new StringBuilder("getItemIds_args(");
7851
      boolean first = true;
7852
 
7853
      sb.append("itemNumber:");
7854
      if (this.itemNumber == null) {
7855
        sb.append("null");
7856
      } else {
7857
        sb.append(this.itemNumber);
7858
      }
7859
      first = false;
7860
      sb.append(")");
7861
      return sb.toString();
7862
    }
7863
 
7864
    public void validate() throws org.apache.thrift.TException {
7865
      // check for required fields
7866
    }
7867
 
7868
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7869
      try {
7870
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7871
      } catch (org.apache.thrift.TException te) {
7872
        throw new java.io.IOException(te);
7873
      }
7874
    }
7875
 
7876
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7877
      try {
7878
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7879
      } catch (org.apache.thrift.TException te) {
7880
        throw new java.io.IOException(te);
7881
      }
7882
    }
7883
 
7884
  }
7885
 
7886
  public static class getItemIds_result implements org.apache.thrift.TBase<getItemIds_result, getItemIds_result._Fields>, java.io.Serializable, Cloneable   {
7887
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemIds_result");
7888
 
7889
    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);
7890
 
7891
    private List<Long> success; // required
7892
 
7893
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7894
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7895
      SUCCESS((short)0, "success");
7896
 
7897
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7898
 
7899
      static {
7900
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7901
          byName.put(field.getFieldName(), field);
7902
        }
7903
      }
7904
 
7905
      /**
7906
       * Find the _Fields constant that matches fieldId, or null if its not found.
7907
       */
7908
      public static _Fields findByThriftId(int fieldId) {
7909
        switch(fieldId) {
7910
          case 0: // SUCCESS
7911
            return SUCCESS;
7912
          default:
7913
            return null;
7914
        }
7915
      }
7916
 
7917
      /**
7918
       * Find the _Fields constant that matches fieldId, throwing an exception
7919
       * if it is not found.
7920
       */
7921
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7922
        _Fields fields = findByThriftId(fieldId);
7923
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7924
        return fields;
7925
      }
7926
 
7927
      /**
7928
       * Find the _Fields constant that matches name, or null if its not found.
7929
       */
7930
      public static _Fields findByName(String name) {
7931
        return byName.get(name);
7932
      }
7933
 
7934
      private final short _thriftId;
7935
      private final String _fieldName;
7936
 
7937
      _Fields(short thriftId, String fieldName) {
7938
        _thriftId = thriftId;
7939
        _fieldName = fieldName;
7940
      }
7941
 
7942
      public short getThriftFieldId() {
7943
        return _thriftId;
7944
      }
7945
 
7946
      public String getFieldName() {
7947
        return _fieldName;
7948
      }
7949
    }
7950
 
7951
    // isset id assignments
7952
 
7953
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7954
    static {
7955
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7956
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7957
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7958
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
7959
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7960
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemIds_result.class, metaDataMap);
7961
    }
7962
 
7963
    public getItemIds_result() {
7964
    }
7965
 
7966
    public getItemIds_result(
7967
      List<Long> success)
7968
    {
7969
      this();
7970
      this.success = success;
7971
    }
7972
 
7973
    /**
7974
     * Performs a deep copy on <i>other</i>.
7975
     */
7976
    public getItemIds_result(getItemIds_result other) {
7977
      if (other.isSetSuccess()) {
7978
        List<Long> __this__success = new ArrayList<Long>();
7979
        for (Long other_element : other.success) {
7980
          __this__success.add(other_element);
7981
        }
7982
        this.success = __this__success;
7983
      }
7984
    }
7985
 
7986
    public getItemIds_result deepCopy() {
7987
      return new getItemIds_result(this);
7988
    }
7989
 
7990
    @Override
7991
    public void clear() {
7992
      this.success = null;
7993
    }
7994
 
7995
    public int getSuccessSize() {
7996
      return (this.success == null) ? 0 : this.success.size();
7997
    }
7998
 
7999
    public java.util.Iterator<Long> getSuccessIterator() {
8000
      return (this.success == null) ? null : this.success.iterator();
8001
    }
8002
 
8003
    public void addToSuccess(long elem) {
8004
      if (this.success == null) {
8005
        this.success = new ArrayList<Long>();
8006
      }
8007
      this.success.add(elem);
8008
    }
8009
 
8010
    public List<Long> getSuccess() {
8011
      return this.success;
8012
    }
8013
 
8014
    public void setSuccess(List<Long> success) {
8015
      this.success = success;
8016
    }
8017
 
8018
    public void unsetSuccess() {
8019
      this.success = null;
8020
    }
8021
 
8022
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8023
    public boolean isSetSuccess() {
8024
      return this.success != null;
8025
    }
8026
 
8027
    public void setSuccessIsSet(boolean value) {
8028
      if (!value) {
8029
        this.success = null;
8030
      }
8031
    }
8032
 
8033
    public void setFieldValue(_Fields field, Object value) {
8034
      switch (field) {
8035
      case SUCCESS:
8036
        if (value == null) {
8037
          unsetSuccess();
8038
        } else {
8039
          setSuccess((List<Long>)value);
8040
        }
8041
        break;
8042
 
8043
      }
8044
    }
8045
 
8046
    public Object getFieldValue(_Fields field) {
8047
      switch (field) {
8048
      case SUCCESS:
8049
        return getSuccess();
8050
 
8051
      }
8052
      throw new IllegalStateException();
8053
    }
8054
 
8055
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8056
    public boolean isSet(_Fields field) {
8057
      if (field == null) {
8058
        throw new IllegalArgumentException();
8059
      }
8060
 
8061
      switch (field) {
8062
      case SUCCESS:
8063
        return isSetSuccess();
8064
      }
8065
      throw new IllegalStateException();
8066
    }
8067
 
8068
    @Override
8069
    public boolean equals(Object that) {
8070
      if (that == null)
8071
        return false;
8072
      if (that instanceof getItemIds_result)
8073
        return this.equals((getItemIds_result)that);
8074
      return false;
8075
    }
8076
 
8077
    public boolean equals(getItemIds_result that) {
8078
      if (that == null)
8079
        return false;
8080
 
8081
      boolean this_present_success = true && this.isSetSuccess();
8082
      boolean that_present_success = true && that.isSetSuccess();
8083
      if (this_present_success || that_present_success) {
8084
        if (!(this_present_success && that_present_success))
8085
          return false;
8086
        if (!this.success.equals(that.success))
8087
          return false;
8088
      }
8089
 
8090
      return true;
8091
    }
8092
 
8093
    @Override
8094
    public int hashCode() {
8095
      return 0;
8096
    }
8097
 
8098
    public int compareTo(getItemIds_result other) {
8099
      if (!getClass().equals(other.getClass())) {
8100
        return getClass().getName().compareTo(other.getClass().getName());
8101
      }
8102
 
8103
      int lastComparison = 0;
8104
      getItemIds_result typedOther = (getItemIds_result)other;
8105
 
8106
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8107
      if (lastComparison != 0) {
8108
        return lastComparison;
8109
      }
8110
      if (isSetSuccess()) {
8111
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8112
        if (lastComparison != 0) {
8113
          return lastComparison;
8114
        }
8115
      }
8116
      return 0;
8117
    }
8118
 
8119
    public _Fields fieldForId(int fieldId) {
8120
      return _Fields.findByThriftId(fieldId);
8121
    }
8122
 
8123
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8124
      org.apache.thrift.protocol.TField field;
8125
      iprot.readStructBegin();
8126
      while (true)
8127
      {
8128
        field = iprot.readFieldBegin();
8129
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8130
          break;
8131
        }
8132
        switch (field.id) {
8133
          case 0: // SUCCESS
8134
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8135
              {
5361 mandeep.dh 8136
                org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
8137
                this.success = new ArrayList<Long>(_list4.size);
8138
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
5110 mandeep.dh 8139
                {
5361 mandeep.dh 8140
                  long _elem6; // required
8141
                  _elem6 = iprot.readI64();
8142
                  this.success.add(_elem6);
5110 mandeep.dh 8143
                }
8144
                iprot.readListEnd();
8145
              }
8146
            } else { 
8147
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8148
            }
8149
            break;
8150
          default:
8151
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8152
        }
8153
        iprot.readFieldEnd();
8154
      }
8155
      iprot.readStructEnd();
8156
      validate();
8157
    }
8158
 
8159
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8160
      oprot.writeStructBegin(STRUCT_DESC);
8161
 
8162
      if (this.isSetSuccess()) {
8163
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8164
        {
8165
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.success.size()));
5361 mandeep.dh 8166
          for (long _iter7 : this.success)
5110 mandeep.dh 8167
          {
5361 mandeep.dh 8168
            oprot.writeI64(_iter7);
5110 mandeep.dh 8169
          }
8170
          oprot.writeListEnd();
8171
        }
8172
        oprot.writeFieldEnd();
8173
      }
8174
      oprot.writeFieldStop();
8175
      oprot.writeStructEnd();
8176
    }
8177
 
8178
    @Override
8179
    public String toString() {
8180
      StringBuilder sb = new StringBuilder("getItemIds_result(");
8181
      boolean first = true;
8182
 
8183
      sb.append("success:");
8184
      if (this.success == null) {
8185
        sb.append("null");
8186
      } else {
8187
        sb.append(this.success);
8188
      }
8189
      first = false;
8190
      sb.append(")");
8191
      return sb.toString();
8192
    }
8193
 
8194
    public void validate() throws org.apache.thrift.TException {
8195
      // check for required fields
8196
    }
8197
 
8198
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8199
      try {
8200
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8201
      } catch (org.apache.thrift.TException te) {
8202
        throw new java.io.IOException(te);
8203
      }
8204
    }
8205
 
8206
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8207
      try {
8208
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8209
      } catch (org.apache.thrift.TException te) {
8210
        throw new java.io.IOException(te);
8211
      }
8212
    }
8213
 
8214
  }
8215
 
5185 mandeep.dh 8216
  public static class getInventoryItemsFromLastScanType_args implements org.apache.thrift.TBase<getInventoryItemsFromLastScanType_args, getInventoryItemsFromLastScanType_args._Fields>, java.io.Serializable, Cloneable   {
8217
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemsFromLastScanType_args");
8218
 
8219
    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);
8220
 
8221
    private ScanType lastScanType; // required
8222
 
8223
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8224
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8225
      /**
8226
       * 
8227
       * @see ScanType
8228
       */
8229
      LAST_SCAN_TYPE((short)1, "lastScanType");
8230
 
8231
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8232
 
8233
      static {
8234
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8235
          byName.put(field.getFieldName(), field);
8236
        }
8237
      }
8238
 
8239
      /**
8240
       * Find the _Fields constant that matches fieldId, or null if its not found.
8241
       */
8242
      public static _Fields findByThriftId(int fieldId) {
8243
        switch(fieldId) {
8244
          case 1: // LAST_SCAN_TYPE
8245
            return LAST_SCAN_TYPE;
8246
          default:
8247
            return null;
8248
        }
8249
      }
8250
 
8251
      /**
8252
       * Find the _Fields constant that matches fieldId, throwing an exception
8253
       * if it is not found.
8254
       */
8255
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8256
        _Fields fields = findByThriftId(fieldId);
8257
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8258
        return fields;
8259
      }
8260
 
8261
      /**
8262
       * Find the _Fields constant that matches name, or null if its not found.
8263
       */
8264
      public static _Fields findByName(String name) {
8265
        return byName.get(name);
8266
      }
8267
 
8268
      private final short _thriftId;
8269
      private final String _fieldName;
8270
 
8271
      _Fields(short thriftId, String fieldName) {
8272
        _thriftId = thriftId;
8273
        _fieldName = fieldName;
8274
      }
8275
 
8276
      public short getThriftFieldId() {
8277
        return _thriftId;
8278
      }
8279
 
8280
      public String getFieldName() {
8281
        return _fieldName;
8282
      }
8283
    }
8284
 
8285
    // isset id assignments
8286
 
8287
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8288
    static {
8289
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8290
      tmpMap.put(_Fields.LAST_SCAN_TYPE, new org.apache.thrift.meta_data.FieldMetaData("lastScanType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8291
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
8292
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8293
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemsFromLastScanType_args.class, metaDataMap);
8294
    }
8295
 
8296
    public getInventoryItemsFromLastScanType_args() {
8297
    }
8298
 
8299
    public getInventoryItemsFromLastScanType_args(
8300
      ScanType lastScanType)
8301
    {
8302
      this();
8303
      this.lastScanType = lastScanType;
8304
    }
8305
 
8306
    /**
8307
     * Performs a deep copy on <i>other</i>.
8308
     */
8309
    public getInventoryItemsFromLastScanType_args(getInventoryItemsFromLastScanType_args other) {
8310
      if (other.isSetLastScanType()) {
8311
        this.lastScanType = other.lastScanType;
8312
      }
8313
    }
8314
 
8315
    public getInventoryItemsFromLastScanType_args deepCopy() {
8316
      return new getInventoryItemsFromLastScanType_args(this);
8317
    }
8318
 
8319
    @Override
8320
    public void clear() {
8321
      this.lastScanType = null;
8322
    }
8323
 
8324
    /**
8325
     * 
8326
     * @see ScanType
8327
     */
8328
    public ScanType getLastScanType() {
8329
      return this.lastScanType;
8330
    }
8331
 
8332
    /**
8333
     * 
8334
     * @see ScanType
8335
     */
8336
    public void setLastScanType(ScanType lastScanType) {
8337
      this.lastScanType = lastScanType;
8338
    }
8339
 
8340
    public void unsetLastScanType() {
8341
      this.lastScanType = null;
8342
    }
8343
 
8344
    /** Returns true if field lastScanType is set (has been assigned a value) and false otherwise */
8345
    public boolean isSetLastScanType() {
8346
      return this.lastScanType != null;
8347
    }
8348
 
8349
    public void setLastScanTypeIsSet(boolean value) {
8350
      if (!value) {
8351
        this.lastScanType = null;
8352
      }
8353
    }
8354
 
8355
    public void setFieldValue(_Fields field, Object value) {
8356
      switch (field) {
8357
      case LAST_SCAN_TYPE:
8358
        if (value == null) {
8359
          unsetLastScanType();
8360
        } else {
8361
          setLastScanType((ScanType)value);
8362
        }
8363
        break;
8364
 
8365
      }
8366
    }
8367
 
8368
    public Object getFieldValue(_Fields field) {
8369
      switch (field) {
8370
      case LAST_SCAN_TYPE:
8371
        return getLastScanType();
8372
 
8373
      }
8374
      throw new IllegalStateException();
8375
    }
8376
 
8377
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8378
    public boolean isSet(_Fields field) {
8379
      if (field == null) {
8380
        throw new IllegalArgumentException();
8381
      }
8382
 
8383
      switch (field) {
8384
      case LAST_SCAN_TYPE:
8385
        return isSetLastScanType();
8386
      }
8387
      throw new IllegalStateException();
8388
    }
8389
 
8390
    @Override
8391
    public boolean equals(Object that) {
8392
      if (that == null)
8393
        return false;
8394
      if (that instanceof getInventoryItemsFromLastScanType_args)
8395
        return this.equals((getInventoryItemsFromLastScanType_args)that);
8396
      return false;
8397
    }
8398
 
8399
    public boolean equals(getInventoryItemsFromLastScanType_args that) {
8400
      if (that == null)
8401
        return false;
8402
 
8403
      boolean this_present_lastScanType = true && this.isSetLastScanType();
8404
      boolean that_present_lastScanType = true && that.isSetLastScanType();
8405
      if (this_present_lastScanType || that_present_lastScanType) {
8406
        if (!(this_present_lastScanType && that_present_lastScanType))
8407
          return false;
8408
        if (!this.lastScanType.equals(that.lastScanType))
8409
          return false;
8410
      }
8411
 
8412
      return true;
8413
    }
8414
 
8415
    @Override
8416
    public int hashCode() {
8417
      return 0;
8418
    }
8419
 
8420
    public int compareTo(getInventoryItemsFromLastScanType_args other) {
8421
      if (!getClass().equals(other.getClass())) {
8422
        return getClass().getName().compareTo(other.getClass().getName());
8423
      }
8424
 
8425
      int lastComparison = 0;
8426
      getInventoryItemsFromLastScanType_args typedOther = (getInventoryItemsFromLastScanType_args)other;
8427
 
8428
      lastComparison = Boolean.valueOf(isSetLastScanType()).compareTo(typedOther.isSetLastScanType());
8429
      if (lastComparison != 0) {
8430
        return lastComparison;
8431
      }
8432
      if (isSetLastScanType()) {
8433
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastScanType, typedOther.lastScanType);
8434
        if (lastComparison != 0) {
8435
          return lastComparison;
8436
        }
8437
      }
8438
      return 0;
8439
    }
8440
 
8441
    public _Fields fieldForId(int fieldId) {
8442
      return _Fields.findByThriftId(fieldId);
8443
    }
8444
 
8445
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8446
      org.apache.thrift.protocol.TField field;
8447
      iprot.readStructBegin();
8448
      while (true)
8449
      {
8450
        field = iprot.readFieldBegin();
8451
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8452
          break;
8453
        }
8454
        switch (field.id) {
8455
          case 1: // LAST_SCAN_TYPE
8456
            if (field.type == org.apache.thrift.protocol.TType.I32) {
8457
              this.lastScanType = ScanType.findByValue(iprot.readI32());
8458
            } else { 
8459
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8460
            }
8461
            break;
8462
          default:
8463
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8464
        }
8465
        iprot.readFieldEnd();
8466
      }
8467
      iprot.readStructEnd();
8468
      validate();
8469
    }
8470
 
8471
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8472
      validate();
8473
 
8474
      oprot.writeStructBegin(STRUCT_DESC);
8475
      if (this.lastScanType != null) {
8476
        oprot.writeFieldBegin(LAST_SCAN_TYPE_FIELD_DESC);
8477
        oprot.writeI32(this.lastScanType.getValue());
8478
        oprot.writeFieldEnd();
8479
      }
8480
      oprot.writeFieldStop();
8481
      oprot.writeStructEnd();
8482
    }
8483
 
8484
    @Override
8485
    public String toString() {
8486
      StringBuilder sb = new StringBuilder("getInventoryItemsFromLastScanType_args(");
8487
      boolean first = true;
8488
 
8489
      sb.append("lastScanType:");
8490
      if (this.lastScanType == null) {
8491
        sb.append("null");
8492
      } else {
8493
        sb.append(this.lastScanType);
8494
      }
8495
      first = false;
8496
      sb.append(")");
8497
      return sb.toString();
8498
    }
8499
 
8500
    public void validate() throws org.apache.thrift.TException {
8501
      // check for required fields
8502
    }
8503
 
8504
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8505
      try {
8506
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8507
      } catch (org.apache.thrift.TException te) {
8508
        throw new java.io.IOException(te);
8509
      }
8510
    }
8511
 
8512
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8513
      try {
8514
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8515
      } catch (org.apache.thrift.TException te) {
8516
        throw new java.io.IOException(te);
8517
      }
8518
    }
8519
 
8520
  }
8521
 
8522
  public static class getInventoryItemsFromLastScanType_result implements org.apache.thrift.TBase<getInventoryItemsFromLastScanType_result, getInventoryItemsFromLastScanType_result._Fields>, java.io.Serializable, Cloneable   {
8523
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemsFromLastScanType_result");
8524
 
8525
    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);
8526
    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);
8527
 
8528
    private List<InventoryItem> success; // required
8529
    private WarehouseServiceException wex; // required
8530
 
8531
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8532
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8533
      SUCCESS((short)0, "success"),
8534
      WEX((short)1, "wex");
8535
 
8536
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8537
 
8538
      static {
8539
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8540
          byName.put(field.getFieldName(), field);
8541
        }
8542
      }
8543
 
8544
      /**
8545
       * Find the _Fields constant that matches fieldId, or null if its not found.
8546
       */
8547
      public static _Fields findByThriftId(int fieldId) {
8548
        switch(fieldId) {
8549
          case 0: // SUCCESS
8550
            return SUCCESS;
8551
          case 1: // WEX
8552
            return WEX;
8553
          default:
8554
            return null;
8555
        }
8556
      }
8557
 
8558
      /**
8559
       * Find the _Fields constant that matches fieldId, throwing an exception
8560
       * if it is not found.
8561
       */
8562
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8563
        _Fields fields = findByThriftId(fieldId);
8564
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8565
        return fields;
8566
      }
8567
 
8568
      /**
8569
       * Find the _Fields constant that matches name, or null if its not found.
8570
       */
8571
      public static _Fields findByName(String name) {
8572
        return byName.get(name);
8573
      }
8574
 
8575
      private final short _thriftId;
8576
      private final String _fieldName;
8577
 
8578
      _Fields(short thriftId, String fieldName) {
8579
        _thriftId = thriftId;
8580
        _fieldName = fieldName;
8581
      }
8582
 
8583
      public short getThriftFieldId() {
8584
        return _thriftId;
8585
      }
8586
 
8587
      public String getFieldName() {
8588
        return _fieldName;
8589
      }
8590
    }
8591
 
8592
    // isset id assignments
8593
 
8594
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8595
    static {
8596
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8597
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8598
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
8599
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class))));
8600
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8601
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
8602
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8603
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemsFromLastScanType_result.class, metaDataMap);
8604
    }
8605
 
8606
    public getInventoryItemsFromLastScanType_result() {
8607
    }
8608
 
8609
    public getInventoryItemsFromLastScanType_result(
8610
      List<InventoryItem> success,
8611
      WarehouseServiceException wex)
8612
    {
8613
      this();
8614
      this.success = success;
8615
      this.wex = wex;
8616
    }
8617
 
8618
    /**
8619
     * Performs a deep copy on <i>other</i>.
8620
     */
8621
    public getInventoryItemsFromLastScanType_result(getInventoryItemsFromLastScanType_result other) {
8622
      if (other.isSetSuccess()) {
8623
        List<InventoryItem> __this__success = new ArrayList<InventoryItem>();
8624
        for (InventoryItem other_element : other.success) {
8625
          __this__success.add(new InventoryItem(other_element));
8626
        }
8627
        this.success = __this__success;
8628
      }
8629
      if (other.isSetWex()) {
8630
        this.wex = new WarehouseServiceException(other.wex);
8631
      }
8632
    }
8633
 
8634
    public getInventoryItemsFromLastScanType_result deepCopy() {
8635
      return new getInventoryItemsFromLastScanType_result(this);
8636
    }
8637
 
8638
    @Override
8639
    public void clear() {
8640
      this.success = null;
8641
      this.wex = null;
8642
    }
8643
 
8644
    public int getSuccessSize() {
8645
      return (this.success == null) ? 0 : this.success.size();
8646
    }
8647
 
8648
    public java.util.Iterator<InventoryItem> getSuccessIterator() {
8649
      return (this.success == null) ? null : this.success.iterator();
8650
    }
8651
 
8652
    public void addToSuccess(InventoryItem elem) {
8653
      if (this.success == null) {
8654
        this.success = new ArrayList<InventoryItem>();
8655
      }
8656
      this.success.add(elem);
8657
    }
8658
 
8659
    public List<InventoryItem> getSuccess() {
8660
      return this.success;
8661
    }
8662
 
8663
    public void setSuccess(List<InventoryItem> success) {
8664
      this.success = success;
8665
    }
8666
 
8667
    public void unsetSuccess() {
8668
      this.success = null;
8669
    }
8670
 
8671
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8672
    public boolean isSetSuccess() {
8673
      return this.success != null;
8674
    }
8675
 
8676
    public void setSuccessIsSet(boolean value) {
8677
      if (!value) {
8678
        this.success = null;
8679
      }
8680
    }
8681
 
8682
    public WarehouseServiceException getWex() {
8683
      return this.wex;
8684
    }
8685
 
8686
    public void setWex(WarehouseServiceException wex) {
8687
      this.wex = wex;
8688
    }
8689
 
8690
    public void unsetWex() {
8691
      this.wex = null;
8692
    }
8693
 
8694
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
8695
    public boolean isSetWex() {
8696
      return this.wex != null;
8697
    }
8698
 
8699
    public void setWexIsSet(boolean value) {
8700
      if (!value) {
8701
        this.wex = null;
8702
      }
8703
    }
8704
 
8705
    public void setFieldValue(_Fields field, Object value) {
8706
      switch (field) {
8707
      case SUCCESS:
8708
        if (value == null) {
8709
          unsetSuccess();
8710
        } else {
8711
          setSuccess((List<InventoryItem>)value);
8712
        }
8713
        break;
8714
 
8715
      case WEX:
8716
        if (value == null) {
8717
          unsetWex();
8718
        } else {
8719
          setWex((WarehouseServiceException)value);
8720
        }
8721
        break;
8722
 
8723
      }
8724
    }
8725
 
8726
    public Object getFieldValue(_Fields field) {
8727
      switch (field) {
8728
      case SUCCESS:
8729
        return getSuccess();
8730
 
8731
      case WEX:
8732
        return getWex();
8733
 
8734
      }
8735
      throw new IllegalStateException();
8736
    }
8737
 
8738
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8739
    public boolean isSet(_Fields field) {
8740
      if (field == null) {
8741
        throw new IllegalArgumentException();
8742
      }
8743
 
8744
      switch (field) {
8745
      case SUCCESS:
8746
        return isSetSuccess();
8747
      case WEX:
8748
        return isSetWex();
8749
      }
8750
      throw new IllegalStateException();
8751
    }
8752
 
8753
    @Override
8754
    public boolean equals(Object that) {
8755
      if (that == null)
8756
        return false;
8757
      if (that instanceof getInventoryItemsFromLastScanType_result)
8758
        return this.equals((getInventoryItemsFromLastScanType_result)that);
8759
      return false;
8760
    }
8761
 
8762
    public boolean equals(getInventoryItemsFromLastScanType_result that) {
8763
      if (that == null)
8764
        return false;
8765
 
8766
      boolean this_present_success = true && this.isSetSuccess();
8767
      boolean that_present_success = true && that.isSetSuccess();
8768
      if (this_present_success || that_present_success) {
8769
        if (!(this_present_success && that_present_success))
8770
          return false;
8771
        if (!this.success.equals(that.success))
8772
          return false;
8773
      }
8774
 
8775
      boolean this_present_wex = true && this.isSetWex();
8776
      boolean that_present_wex = true && that.isSetWex();
8777
      if (this_present_wex || that_present_wex) {
8778
        if (!(this_present_wex && that_present_wex))
8779
          return false;
8780
        if (!this.wex.equals(that.wex))
8781
          return false;
8782
      }
8783
 
8784
      return true;
8785
    }
8786
 
8787
    @Override
8788
    public int hashCode() {
8789
      return 0;
8790
    }
8791
 
8792
    public int compareTo(getInventoryItemsFromLastScanType_result other) {
8793
      if (!getClass().equals(other.getClass())) {
8794
        return getClass().getName().compareTo(other.getClass().getName());
8795
      }
8796
 
8797
      int lastComparison = 0;
8798
      getInventoryItemsFromLastScanType_result typedOther = (getInventoryItemsFromLastScanType_result)other;
8799
 
8800
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8801
      if (lastComparison != 0) {
8802
        return lastComparison;
8803
      }
8804
      if (isSetSuccess()) {
8805
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8806
        if (lastComparison != 0) {
8807
          return lastComparison;
8808
        }
8809
      }
8810
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
8811
      if (lastComparison != 0) {
8812
        return lastComparison;
8813
      }
8814
      if (isSetWex()) {
8815
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
8816
        if (lastComparison != 0) {
8817
          return lastComparison;
8818
        }
8819
      }
8820
      return 0;
8821
    }
8822
 
8823
    public _Fields fieldForId(int fieldId) {
8824
      return _Fields.findByThriftId(fieldId);
8825
    }
8826
 
8827
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8828
      org.apache.thrift.protocol.TField field;
8829
      iprot.readStructBegin();
8830
      while (true)
8831
      {
8832
        field = iprot.readFieldBegin();
8833
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8834
          break;
8835
        }
8836
        switch (field.id) {
8837
          case 0: // SUCCESS
8838
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8839
              {
5361 mandeep.dh 8840
                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
8841
                this.success = new ArrayList<InventoryItem>(_list8.size);
8842
                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
5185 mandeep.dh 8843
                {
5361 mandeep.dh 8844
                  InventoryItem _elem10; // required
8845
                  _elem10 = new InventoryItem();
8846
                  _elem10.read(iprot);
8847
                  this.success.add(_elem10);
5185 mandeep.dh 8848
                }
8849
                iprot.readListEnd();
8850
              }
8851
            } else { 
8852
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8853
            }
8854
            break;
8855
          case 1: // WEX
8856
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8857
              this.wex = new WarehouseServiceException();
8858
              this.wex.read(iprot);
8859
            } else { 
8860
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8861
            }
8862
            break;
8863
          default:
8864
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8865
        }
8866
        iprot.readFieldEnd();
8867
      }
8868
      iprot.readStructEnd();
8869
      validate();
8870
    }
8871
 
8872
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8873
      oprot.writeStructBegin(STRUCT_DESC);
8874
 
8875
      if (this.isSetSuccess()) {
8876
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8877
        {
8878
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
5361 mandeep.dh 8879
          for (InventoryItem _iter11 : this.success)
5185 mandeep.dh 8880
          {
5361 mandeep.dh 8881
            _iter11.write(oprot);
5185 mandeep.dh 8882
          }
8883
          oprot.writeListEnd();
8884
        }
8885
        oprot.writeFieldEnd();
8886
      } else if (this.isSetWex()) {
8887
        oprot.writeFieldBegin(WEX_FIELD_DESC);
8888
        this.wex.write(oprot);
8889
        oprot.writeFieldEnd();
8890
      }
8891
      oprot.writeFieldStop();
8892
      oprot.writeStructEnd();
8893
    }
8894
 
8895
    @Override
8896
    public String toString() {
8897
      StringBuilder sb = new StringBuilder("getInventoryItemsFromLastScanType_result(");
8898
      boolean first = true;
8899
 
8900
      sb.append("success:");
8901
      if (this.success == null) {
8902
        sb.append("null");
8903
      } else {
8904
        sb.append(this.success);
8905
      }
8906
      first = false;
8907
      if (!first) sb.append(", ");
8908
      sb.append("wex:");
8909
      if (this.wex == null) {
8910
        sb.append("null");
8911
      } else {
8912
        sb.append(this.wex);
8913
      }
8914
      first = false;
8915
      sb.append(")");
8916
      return sb.toString();
8917
    }
8918
 
8919
    public void validate() throws org.apache.thrift.TException {
8920
      // check for required fields
8921
    }
8922
 
8923
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8924
      try {
8925
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8926
      } catch (org.apache.thrift.TException te) {
8927
        throw new java.io.IOException(te);
8928
      }
8929
    }
8930
 
8931
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8932
      try {
8933
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8934
      } catch (org.apache.thrift.TException te) {
8935
        throw new java.io.IOException(te);
8936
      }
8937
    }
8938
 
8939
  }
8940
 
8941
  public static class getInventoryItemFromId_args implements org.apache.thrift.TBase<getInventoryItemFromId_args, getInventoryItemFromId_args._Fields>, java.io.Serializable, Cloneable   {
8942
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromId_args");
8943
 
8944
    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);
8945
 
8946
    private long inventoryItemId; // required
8947
 
8948
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8949
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8950
      INVENTORY_ITEM_ID((short)1, "inventoryItemId");
8951
 
8952
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8953
 
8954
      static {
8955
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8956
          byName.put(field.getFieldName(), field);
8957
        }
8958
      }
8959
 
8960
      /**
8961
       * Find the _Fields constant that matches fieldId, or null if its not found.
8962
       */
8963
      public static _Fields findByThriftId(int fieldId) {
8964
        switch(fieldId) {
8965
          case 1: // INVENTORY_ITEM_ID
8966
            return INVENTORY_ITEM_ID;
8967
          default:
8968
            return null;
8969
        }
8970
      }
8971
 
8972
      /**
8973
       * Find the _Fields constant that matches fieldId, throwing an exception
8974
       * if it is not found.
8975
       */
8976
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8977
        _Fields fields = findByThriftId(fieldId);
8978
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8979
        return fields;
8980
      }
8981
 
8982
      /**
8983
       * Find the _Fields constant that matches name, or null if its not found.
8984
       */
8985
      public static _Fields findByName(String name) {
8986
        return byName.get(name);
8987
      }
8988
 
8989
      private final short _thriftId;
8990
      private final String _fieldName;
8991
 
8992
      _Fields(short thriftId, String fieldName) {
8993
        _thriftId = thriftId;
8994
        _fieldName = fieldName;
8995
      }
8996
 
8997
      public short getThriftFieldId() {
8998
        return _thriftId;
8999
      }
9000
 
9001
      public String getFieldName() {
9002
        return _fieldName;
9003
      }
9004
    }
9005
 
9006
    // isset id assignments
9007
    private static final int __INVENTORYITEMID_ISSET_ID = 0;
9008
    private BitSet __isset_bit_vector = new BitSet(1);
9009
 
9010
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9011
    static {
9012
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9013
      tmpMap.put(_Fields.INVENTORY_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("inventoryItemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9014
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9015
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9016
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromId_args.class, metaDataMap);
9017
    }
9018
 
9019
    public getInventoryItemFromId_args() {
9020
    }
9021
 
9022
    public getInventoryItemFromId_args(
9023
      long inventoryItemId)
9024
    {
9025
      this();
9026
      this.inventoryItemId = inventoryItemId;
9027
      setInventoryItemIdIsSet(true);
9028
    }
9029
 
9030
    /**
9031
     * Performs a deep copy on <i>other</i>.
9032
     */
9033
    public getInventoryItemFromId_args(getInventoryItemFromId_args other) {
9034
      __isset_bit_vector.clear();
9035
      __isset_bit_vector.or(other.__isset_bit_vector);
9036
      this.inventoryItemId = other.inventoryItemId;
9037
    }
9038
 
9039
    public getInventoryItemFromId_args deepCopy() {
9040
      return new getInventoryItemFromId_args(this);
9041
    }
9042
 
9043
    @Override
9044
    public void clear() {
9045
      setInventoryItemIdIsSet(false);
9046
      this.inventoryItemId = 0;
9047
    }
9048
 
9049
    public long getInventoryItemId() {
9050
      return this.inventoryItemId;
9051
    }
9052
 
9053
    public void setInventoryItemId(long inventoryItemId) {
9054
      this.inventoryItemId = inventoryItemId;
9055
      setInventoryItemIdIsSet(true);
9056
    }
9057
 
9058
    public void unsetInventoryItemId() {
9059
      __isset_bit_vector.clear(__INVENTORYITEMID_ISSET_ID);
9060
    }
9061
 
9062
    /** Returns true if field inventoryItemId is set (has been assigned a value) and false otherwise */
9063
    public boolean isSetInventoryItemId() {
9064
      return __isset_bit_vector.get(__INVENTORYITEMID_ISSET_ID);
9065
    }
9066
 
9067
    public void setInventoryItemIdIsSet(boolean value) {
9068
      __isset_bit_vector.set(__INVENTORYITEMID_ISSET_ID, value);
9069
    }
9070
 
9071
    public void setFieldValue(_Fields field, Object value) {
9072
      switch (field) {
9073
      case INVENTORY_ITEM_ID:
9074
        if (value == null) {
9075
          unsetInventoryItemId();
9076
        } else {
9077
          setInventoryItemId((Long)value);
9078
        }
9079
        break;
9080
 
9081
      }
9082
    }
9083
 
9084
    public Object getFieldValue(_Fields field) {
9085
      switch (field) {
9086
      case INVENTORY_ITEM_ID:
9087
        return Long.valueOf(getInventoryItemId());
9088
 
9089
      }
9090
      throw new IllegalStateException();
9091
    }
9092
 
9093
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9094
    public boolean isSet(_Fields field) {
9095
      if (field == null) {
9096
        throw new IllegalArgumentException();
9097
      }
9098
 
9099
      switch (field) {
9100
      case INVENTORY_ITEM_ID:
9101
        return isSetInventoryItemId();
9102
      }
9103
      throw new IllegalStateException();
9104
    }
9105
 
9106
    @Override
9107
    public boolean equals(Object that) {
9108
      if (that == null)
9109
        return false;
9110
      if (that instanceof getInventoryItemFromId_args)
9111
        return this.equals((getInventoryItemFromId_args)that);
9112
      return false;
9113
    }
9114
 
9115
    public boolean equals(getInventoryItemFromId_args that) {
9116
      if (that == null)
9117
        return false;
9118
 
9119
      boolean this_present_inventoryItemId = true;
9120
      boolean that_present_inventoryItemId = true;
9121
      if (this_present_inventoryItemId || that_present_inventoryItemId) {
9122
        if (!(this_present_inventoryItemId && that_present_inventoryItemId))
9123
          return false;
9124
        if (this.inventoryItemId != that.inventoryItemId)
9125
          return false;
9126
      }
9127
 
9128
      return true;
9129
    }
9130
 
9131
    @Override
9132
    public int hashCode() {
9133
      return 0;
9134
    }
9135
 
9136
    public int compareTo(getInventoryItemFromId_args other) {
9137
      if (!getClass().equals(other.getClass())) {
9138
        return getClass().getName().compareTo(other.getClass().getName());
9139
      }
9140
 
9141
      int lastComparison = 0;
9142
      getInventoryItemFromId_args typedOther = (getInventoryItemFromId_args)other;
9143
 
9144
      lastComparison = Boolean.valueOf(isSetInventoryItemId()).compareTo(typedOther.isSetInventoryItemId());
9145
      if (lastComparison != 0) {
9146
        return lastComparison;
9147
      }
9148
      if (isSetInventoryItemId()) {
9149
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItemId, typedOther.inventoryItemId);
9150
        if (lastComparison != 0) {
9151
          return lastComparison;
9152
        }
9153
      }
9154
      return 0;
9155
    }
9156
 
9157
    public _Fields fieldForId(int fieldId) {
9158
      return _Fields.findByThriftId(fieldId);
9159
    }
9160
 
9161
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9162
      org.apache.thrift.protocol.TField field;
9163
      iprot.readStructBegin();
9164
      while (true)
9165
      {
9166
        field = iprot.readFieldBegin();
9167
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9168
          break;
9169
        }
9170
        switch (field.id) {
9171
          case 1: // INVENTORY_ITEM_ID
9172
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9173
              this.inventoryItemId = iprot.readI64();
9174
              setInventoryItemIdIsSet(true);
9175
            } else { 
9176
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9177
            }
9178
            break;
9179
          default:
9180
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9181
        }
9182
        iprot.readFieldEnd();
9183
      }
9184
      iprot.readStructEnd();
9185
      validate();
9186
    }
9187
 
9188
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9189
      validate();
9190
 
9191
      oprot.writeStructBegin(STRUCT_DESC);
9192
      oprot.writeFieldBegin(INVENTORY_ITEM_ID_FIELD_DESC);
9193
      oprot.writeI64(this.inventoryItemId);
9194
      oprot.writeFieldEnd();
9195
      oprot.writeFieldStop();
9196
      oprot.writeStructEnd();
9197
    }
9198
 
9199
    @Override
9200
    public String toString() {
9201
      StringBuilder sb = new StringBuilder("getInventoryItemFromId_args(");
9202
      boolean first = true;
9203
 
9204
      sb.append("inventoryItemId:");
9205
      sb.append(this.inventoryItemId);
9206
      first = false;
9207
      sb.append(")");
9208
      return sb.toString();
9209
    }
9210
 
9211
    public void validate() throws org.apache.thrift.TException {
9212
      // check for required fields
9213
    }
9214
 
9215
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9216
      try {
9217
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9218
      } catch (org.apache.thrift.TException te) {
9219
        throw new java.io.IOException(te);
9220
      }
9221
    }
9222
 
9223
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9224
      try {
5372 mandeep.dh 9225
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
9226
        __isset_bit_vector = new BitSet(1);
5185 mandeep.dh 9227
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9228
      } catch (org.apache.thrift.TException te) {
9229
        throw new java.io.IOException(te);
9230
      }
9231
    }
9232
 
9233
  }
9234
 
9235
  public static class getInventoryItemFromId_result implements org.apache.thrift.TBase<getInventoryItemFromId_result, getInventoryItemFromId_result._Fields>, java.io.Serializable, Cloneable   {
9236
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromId_result");
9237
 
9238
    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);
9239
    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);
9240
 
9241
    private InventoryItem success; // required
9242
    private WarehouseServiceException wex; // required
9243
 
9244
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9245
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9246
      SUCCESS((short)0, "success"),
9247
      WEX((short)1, "wex");
9248
 
9249
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9250
 
9251
      static {
9252
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9253
          byName.put(field.getFieldName(), field);
9254
        }
9255
      }
9256
 
9257
      /**
9258
       * Find the _Fields constant that matches fieldId, or null if its not found.
9259
       */
9260
      public static _Fields findByThriftId(int fieldId) {
9261
        switch(fieldId) {
9262
          case 0: // SUCCESS
9263
            return SUCCESS;
9264
          case 1: // WEX
9265
            return WEX;
9266
          default:
9267
            return null;
9268
        }
9269
      }
9270
 
9271
      /**
9272
       * Find the _Fields constant that matches fieldId, throwing an exception
9273
       * if it is not found.
9274
       */
9275
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9276
        _Fields fields = findByThriftId(fieldId);
9277
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9278
        return fields;
9279
      }
9280
 
9281
      /**
9282
       * Find the _Fields constant that matches name, or null if its not found.
9283
       */
9284
      public static _Fields findByName(String name) {
9285
        return byName.get(name);
9286
      }
9287
 
9288
      private final short _thriftId;
9289
      private final String _fieldName;
9290
 
9291
      _Fields(short thriftId, String fieldName) {
9292
        _thriftId = thriftId;
9293
        _fieldName = fieldName;
9294
      }
9295
 
9296
      public short getThriftFieldId() {
9297
        return _thriftId;
9298
      }
9299
 
9300
      public String getFieldName() {
9301
        return _fieldName;
9302
      }
9303
    }
9304
 
9305
    // isset id assignments
9306
 
9307
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9308
    static {
9309
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9310
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9311
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
9312
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9313
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9314
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9315
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromId_result.class, metaDataMap);
9316
    }
9317
 
9318
    public getInventoryItemFromId_result() {
9319
    }
9320
 
9321
    public getInventoryItemFromId_result(
9322
      InventoryItem success,
9323
      WarehouseServiceException wex)
9324
    {
9325
      this();
9326
      this.success = success;
9327
      this.wex = wex;
9328
    }
9329
 
9330
    /**
9331
     * Performs a deep copy on <i>other</i>.
9332
     */
9333
    public getInventoryItemFromId_result(getInventoryItemFromId_result other) {
9334
      if (other.isSetSuccess()) {
9335
        this.success = new InventoryItem(other.success);
9336
      }
9337
      if (other.isSetWex()) {
9338
        this.wex = new WarehouseServiceException(other.wex);
9339
      }
9340
    }
9341
 
9342
    public getInventoryItemFromId_result deepCopy() {
9343
      return new getInventoryItemFromId_result(this);
9344
    }
9345
 
9346
    @Override
9347
    public void clear() {
9348
      this.success = null;
9349
      this.wex = null;
9350
    }
9351
 
9352
    public InventoryItem getSuccess() {
9353
      return this.success;
9354
    }
9355
 
9356
    public void setSuccess(InventoryItem success) {
9357
      this.success = success;
9358
    }
9359
 
9360
    public void unsetSuccess() {
9361
      this.success = null;
9362
    }
9363
 
9364
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9365
    public boolean isSetSuccess() {
9366
      return this.success != null;
9367
    }
9368
 
9369
    public void setSuccessIsSet(boolean value) {
9370
      if (!value) {
9371
        this.success = null;
9372
      }
9373
    }
9374
 
9375
    public WarehouseServiceException getWex() {
9376
      return this.wex;
9377
    }
9378
 
9379
    public void setWex(WarehouseServiceException wex) {
9380
      this.wex = wex;
9381
    }
9382
 
9383
    public void unsetWex() {
9384
      this.wex = null;
9385
    }
9386
 
9387
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
9388
    public boolean isSetWex() {
9389
      return this.wex != null;
9390
    }
9391
 
9392
    public void setWexIsSet(boolean value) {
9393
      if (!value) {
9394
        this.wex = null;
9395
      }
9396
    }
9397
 
9398
    public void setFieldValue(_Fields field, Object value) {
9399
      switch (field) {
9400
      case SUCCESS:
9401
        if (value == null) {
9402
          unsetSuccess();
9403
        } else {
9404
          setSuccess((InventoryItem)value);
9405
        }
9406
        break;
9407
 
9408
      case WEX:
9409
        if (value == null) {
9410
          unsetWex();
9411
        } else {
9412
          setWex((WarehouseServiceException)value);
9413
        }
9414
        break;
9415
 
9416
      }
9417
    }
9418
 
9419
    public Object getFieldValue(_Fields field) {
9420
      switch (field) {
9421
      case SUCCESS:
9422
        return getSuccess();
9423
 
9424
      case WEX:
9425
        return getWex();
9426
 
9427
      }
9428
      throw new IllegalStateException();
9429
    }
9430
 
9431
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9432
    public boolean isSet(_Fields field) {
9433
      if (field == null) {
9434
        throw new IllegalArgumentException();
9435
      }
9436
 
9437
      switch (field) {
9438
      case SUCCESS:
9439
        return isSetSuccess();
9440
      case WEX:
9441
        return isSetWex();
9442
      }
9443
      throw new IllegalStateException();
9444
    }
9445
 
9446
    @Override
9447
    public boolean equals(Object that) {
9448
      if (that == null)
9449
        return false;
9450
      if (that instanceof getInventoryItemFromId_result)
9451
        return this.equals((getInventoryItemFromId_result)that);
9452
      return false;
9453
    }
9454
 
9455
    public boolean equals(getInventoryItemFromId_result that) {
9456
      if (that == null)
9457
        return false;
9458
 
9459
      boolean this_present_success = true && this.isSetSuccess();
9460
      boolean that_present_success = true && that.isSetSuccess();
9461
      if (this_present_success || that_present_success) {
9462
        if (!(this_present_success && that_present_success))
9463
          return false;
9464
        if (!this.success.equals(that.success))
9465
          return false;
9466
      }
9467
 
9468
      boolean this_present_wex = true && this.isSetWex();
9469
      boolean that_present_wex = true && that.isSetWex();
9470
      if (this_present_wex || that_present_wex) {
9471
        if (!(this_present_wex && that_present_wex))
9472
          return false;
9473
        if (!this.wex.equals(that.wex))
9474
          return false;
9475
      }
9476
 
9477
      return true;
9478
    }
9479
 
9480
    @Override
9481
    public int hashCode() {
9482
      return 0;
9483
    }
9484
 
9485
    public int compareTo(getInventoryItemFromId_result other) {
9486
      if (!getClass().equals(other.getClass())) {
9487
        return getClass().getName().compareTo(other.getClass().getName());
9488
      }
9489
 
9490
      int lastComparison = 0;
9491
      getInventoryItemFromId_result typedOther = (getInventoryItemFromId_result)other;
9492
 
9493
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9494
      if (lastComparison != 0) {
9495
        return lastComparison;
9496
      }
9497
      if (isSetSuccess()) {
9498
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9499
        if (lastComparison != 0) {
9500
          return lastComparison;
9501
        }
9502
      }
9503
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
9504
      if (lastComparison != 0) {
9505
        return lastComparison;
9506
      }
9507
      if (isSetWex()) {
9508
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
9509
        if (lastComparison != 0) {
9510
          return lastComparison;
9511
        }
9512
      }
9513
      return 0;
9514
    }
9515
 
9516
    public _Fields fieldForId(int fieldId) {
9517
      return _Fields.findByThriftId(fieldId);
9518
    }
9519
 
9520
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9521
      org.apache.thrift.protocol.TField field;
9522
      iprot.readStructBegin();
9523
      while (true)
9524
      {
9525
        field = iprot.readFieldBegin();
9526
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9527
          break;
9528
        }
9529
        switch (field.id) {
9530
          case 0: // SUCCESS
9531
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9532
              this.success = new InventoryItem();
9533
              this.success.read(iprot);
9534
            } else { 
9535
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9536
            }
9537
            break;
9538
          case 1: // WEX
9539
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9540
              this.wex = new WarehouseServiceException();
9541
              this.wex.read(iprot);
9542
            } else { 
9543
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9544
            }
9545
            break;
9546
          default:
9547
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9548
        }
9549
        iprot.readFieldEnd();
9550
      }
9551
      iprot.readStructEnd();
9552
      validate();
9553
    }
9554
 
9555
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9556
      oprot.writeStructBegin(STRUCT_DESC);
9557
 
9558
      if (this.isSetSuccess()) {
9559
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9560
        this.success.write(oprot);
9561
        oprot.writeFieldEnd();
9562
      } else if (this.isSetWex()) {
9563
        oprot.writeFieldBegin(WEX_FIELD_DESC);
9564
        this.wex.write(oprot);
9565
        oprot.writeFieldEnd();
9566
      }
9567
      oprot.writeFieldStop();
9568
      oprot.writeStructEnd();
9569
    }
9570
 
9571
    @Override
9572
    public String toString() {
9573
      StringBuilder sb = new StringBuilder("getInventoryItemFromId_result(");
9574
      boolean first = true;
9575
 
9576
      sb.append("success:");
9577
      if (this.success == null) {
9578
        sb.append("null");
9579
      } else {
9580
        sb.append(this.success);
9581
      }
9582
      first = false;
9583
      if (!first) sb.append(", ");
9584
      sb.append("wex:");
9585
      if (this.wex == null) {
9586
        sb.append("null");
9587
      } else {
9588
        sb.append(this.wex);
9589
      }
9590
      first = false;
9591
      sb.append(")");
9592
      return sb.toString();
9593
    }
9594
 
9595
    public void validate() throws org.apache.thrift.TException {
9596
      // check for required fields
9597
    }
9598
 
9599
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9600
      try {
9601
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9602
      } catch (org.apache.thrift.TException te) {
9603
        throw new java.io.IOException(te);
9604
      }
9605
    }
9606
 
9607
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9608
      try {
9609
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9610
      } catch (org.apache.thrift.TException te) {
9611
        throw new java.io.IOException(te);
9612
      }
9613
    }
9614
 
9615
  }
9616
 
5372 mandeep.dh 9617
  public static class getPurchaseScans_args implements org.apache.thrift.TBase<getPurchaseScans_args, getPurchaseScans_args._Fields>, java.io.Serializable, Cloneable   {
9618
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseScans_args");
9619
 
9620
    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);
9621
    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);
9622
 
9623
    private long startDate; // required
9624
    private long endDate; // required
9625
 
9626
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9627
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9628
      START_DATE((short)1, "startDate"),
9629
      END_DATE((short)2, "endDate");
9630
 
9631
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9632
 
9633
      static {
9634
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9635
          byName.put(field.getFieldName(), field);
9636
        }
9637
      }
9638
 
9639
      /**
9640
       * Find the _Fields constant that matches fieldId, or null if its not found.
9641
       */
9642
      public static _Fields findByThriftId(int fieldId) {
9643
        switch(fieldId) {
9644
          case 1: // START_DATE
9645
            return START_DATE;
9646
          case 2: // END_DATE
9647
            return END_DATE;
9648
          default:
9649
            return null;
9650
        }
9651
      }
9652
 
9653
      /**
9654
       * Find the _Fields constant that matches fieldId, throwing an exception
9655
       * if it is not found.
9656
       */
9657
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9658
        _Fields fields = findByThriftId(fieldId);
9659
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9660
        return fields;
9661
      }
9662
 
9663
      /**
9664
       * Find the _Fields constant that matches name, or null if its not found.
9665
       */
9666
      public static _Fields findByName(String name) {
9667
        return byName.get(name);
9668
      }
9669
 
9670
      private final short _thriftId;
9671
      private final String _fieldName;
9672
 
9673
      _Fields(short thriftId, String fieldName) {
9674
        _thriftId = thriftId;
9675
        _fieldName = fieldName;
9676
      }
9677
 
9678
      public short getThriftFieldId() {
9679
        return _thriftId;
9680
      }
9681
 
9682
      public String getFieldName() {
9683
        return _fieldName;
9684
      }
9685
    }
9686
 
9687
    // isset id assignments
9688
    private static final int __STARTDATE_ISSET_ID = 0;
9689
    private static final int __ENDDATE_ISSET_ID = 1;
9690
    private BitSet __isset_bit_vector = new BitSet(2);
9691
 
9692
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9693
    static {
9694
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9695
      tmpMap.put(_Fields.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9696
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9697
      tmpMap.put(_Fields.END_DATE, new org.apache.thrift.meta_data.FieldMetaData("endDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9698
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9699
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9700
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseScans_args.class, metaDataMap);
9701
    }
9702
 
9703
    public getPurchaseScans_args() {
9704
    }
9705
 
9706
    public getPurchaseScans_args(
9707
      long startDate,
9708
      long endDate)
9709
    {
9710
      this();
9711
      this.startDate = startDate;
9712
      setStartDateIsSet(true);
9713
      this.endDate = endDate;
9714
      setEndDateIsSet(true);
9715
    }
9716
 
9717
    /**
9718
     * Performs a deep copy on <i>other</i>.
9719
     */
9720
    public getPurchaseScans_args(getPurchaseScans_args other) {
9721
      __isset_bit_vector.clear();
9722
      __isset_bit_vector.or(other.__isset_bit_vector);
9723
      this.startDate = other.startDate;
9724
      this.endDate = other.endDate;
9725
    }
9726
 
9727
    public getPurchaseScans_args deepCopy() {
9728
      return new getPurchaseScans_args(this);
9729
    }
9730
 
9731
    @Override
9732
    public void clear() {
9733
      setStartDateIsSet(false);
9734
      this.startDate = 0;
9735
      setEndDateIsSet(false);
9736
      this.endDate = 0;
9737
    }
9738
 
9739
    public long getStartDate() {
9740
      return this.startDate;
9741
    }
9742
 
9743
    public void setStartDate(long startDate) {
9744
      this.startDate = startDate;
9745
      setStartDateIsSet(true);
9746
    }
9747
 
9748
    public void unsetStartDate() {
9749
      __isset_bit_vector.clear(__STARTDATE_ISSET_ID);
9750
    }
9751
 
9752
    /** Returns true if field startDate is set (has been assigned a value) and false otherwise */
9753
    public boolean isSetStartDate() {
9754
      return __isset_bit_vector.get(__STARTDATE_ISSET_ID);
9755
    }
9756
 
9757
    public void setStartDateIsSet(boolean value) {
9758
      __isset_bit_vector.set(__STARTDATE_ISSET_ID, value);
9759
    }
9760
 
9761
    public long getEndDate() {
9762
      return this.endDate;
9763
    }
9764
 
9765
    public void setEndDate(long endDate) {
9766
      this.endDate = endDate;
9767
      setEndDateIsSet(true);
9768
    }
9769
 
9770
    public void unsetEndDate() {
9771
      __isset_bit_vector.clear(__ENDDATE_ISSET_ID);
9772
    }
9773
 
9774
    /** Returns true if field endDate is set (has been assigned a value) and false otherwise */
9775
    public boolean isSetEndDate() {
9776
      return __isset_bit_vector.get(__ENDDATE_ISSET_ID);
9777
    }
9778
 
9779
    public void setEndDateIsSet(boolean value) {
9780
      __isset_bit_vector.set(__ENDDATE_ISSET_ID, value);
9781
    }
9782
 
9783
    public void setFieldValue(_Fields field, Object value) {
9784
      switch (field) {
9785
      case START_DATE:
9786
        if (value == null) {
9787
          unsetStartDate();
9788
        } else {
9789
          setStartDate((Long)value);
9790
        }
9791
        break;
9792
 
9793
      case END_DATE:
9794
        if (value == null) {
9795
          unsetEndDate();
9796
        } else {
9797
          setEndDate((Long)value);
9798
        }
9799
        break;
9800
 
9801
      }
9802
    }
9803
 
9804
    public Object getFieldValue(_Fields field) {
9805
      switch (field) {
9806
      case START_DATE:
9807
        return Long.valueOf(getStartDate());
9808
 
9809
      case END_DATE:
9810
        return Long.valueOf(getEndDate());
9811
 
9812
      }
9813
      throw new IllegalStateException();
9814
    }
9815
 
9816
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9817
    public boolean isSet(_Fields field) {
9818
      if (field == null) {
9819
        throw new IllegalArgumentException();
9820
      }
9821
 
9822
      switch (field) {
9823
      case START_DATE:
9824
        return isSetStartDate();
9825
      case END_DATE:
9826
        return isSetEndDate();
9827
      }
9828
      throw new IllegalStateException();
9829
    }
9830
 
9831
    @Override
9832
    public boolean equals(Object that) {
9833
      if (that == null)
9834
        return false;
9835
      if (that instanceof getPurchaseScans_args)
9836
        return this.equals((getPurchaseScans_args)that);
9837
      return false;
9838
    }
9839
 
9840
    public boolean equals(getPurchaseScans_args that) {
9841
      if (that == null)
9842
        return false;
9843
 
9844
      boolean this_present_startDate = true;
9845
      boolean that_present_startDate = true;
9846
      if (this_present_startDate || that_present_startDate) {
9847
        if (!(this_present_startDate && that_present_startDate))
9848
          return false;
9849
        if (this.startDate != that.startDate)
9850
          return false;
9851
      }
9852
 
9853
      boolean this_present_endDate = true;
9854
      boolean that_present_endDate = true;
9855
      if (this_present_endDate || that_present_endDate) {
9856
        if (!(this_present_endDate && that_present_endDate))
9857
          return false;
9858
        if (this.endDate != that.endDate)
9859
          return false;
9860
      }
9861
 
9862
      return true;
9863
    }
9864
 
9865
    @Override
9866
    public int hashCode() {
9867
      return 0;
9868
    }
9869
 
9870
    public int compareTo(getPurchaseScans_args other) {
9871
      if (!getClass().equals(other.getClass())) {
9872
        return getClass().getName().compareTo(other.getClass().getName());
9873
      }
9874
 
9875
      int lastComparison = 0;
9876
      getPurchaseScans_args typedOther = (getPurchaseScans_args)other;
9877
 
9878
      lastComparison = Boolean.valueOf(isSetStartDate()).compareTo(typedOther.isSetStartDate());
9879
      if (lastComparison != 0) {
9880
        return lastComparison;
9881
      }
9882
      if (isSetStartDate()) {
9883
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startDate, typedOther.startDate);
9884
        if (lastComparison != 0) {
9885
          return lastComparison;
9886
        }
9887
      }
9888
      lastComparison = Boolean.valueOf(isSetEndDate()).compareTo(typedOther.isSetEndDate());
9889
      if (lastComparison != 0) {
9890
        return lastComparison;
9891
      }
9892
      if (isSetEndDate()) {
9893
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endDate, typedOther.endDate);
9894
        if (lastComparison != 0) {
9895
          return lastComparison;
9896
        }
9897
      }
9898
      return 0;
9899
    }
9900
 
9901
    public _Fields fieldForId(int fieldId) {
9902
      return _Fields.findByThriftId(fieldId);
9903
    }
9904
 
9905
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9906
      org.apache.thrift.protocol.TField field;
9907
      iprot.readStructBegin();
9908
      while (true)
9909
      {
9910
        field = iprot.readFieldBegin();
9911
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9912
          break;
9913
        }
9914
        switch (field.id) {
9915
          case 1: // START_DATE
9916
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9917
              this.startDate = iprot.readI64();
9918
              setStartDateIsSet(true);
9919
            } else { 
9920
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9921
            }
9922
            break;
9923
          case 2: // END_DATE
9924
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9925
              this.endDate = iprot.readI64();
9926
              setEndDateIsSet(true);
9927
            } else { 
9928
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9929
            }
9930
            break;
9931
          default:
9932
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9933
        }
9934
        iprot.readFieldEnd();
9935
      }
9936
      iprot.readStructEnd();
9937
      validate();
9938
    }
9939
 
9940
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9941
      validate();
9942
 
9943
      oprot.writeStructBegin(STRUCT_DESC);
9944
      oprot.writeFieldBegin(START_DATE_FIELD_DESC);
9945
      oprot.writeI64(this.startDate);
9946
      oprot.writeFieldEnd();
9947
      oprot.writeFieldBegin(END_DATE_FIELD_DESC);
9948
      oprot.writeI64(this.endDate);
9949
      oprot.writeFieldEnd();
9950
      oprot.writeFieldStop();
9951
      oprot.writeStructEnd();
9952
    }
9953
 
9954
    @Override
9955
    public String toString() {
9956
      StringBuilder sb = new StringBuilder("getPurchaseScans_args(");
9957
      boolean first = true;
9958
 
9959
      sb.append("startDate:");
9960
      sb.append(this.startDate);
9961
      first = false;
9962
      if (!first) sb.append(", ");
9963
      sb.append("endDate:");
9964
      sb.append(this.endDate);
9965
      first = false;
9966
      sb.append(")");
9967
      return sb.toString();
9968
    }
9969
 
9970
    public void validate() throws org.apache.thrift.TException {
9971
      // check for required fields
9972
    }
9973
 
9974
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9975
      try {
9976
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9977
      } catch (org.apache.thrift.TException te) {
9978
        throw new java.io.IOException(te);
9979
      }
9980
    }
9981
 
9982
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9983
      try {
9984
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
9985
        __isset_bit_vector = new BitSet(1);
9986
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9987
      } catch (org.apache.thrift.TException te) {
9988
        throw new java.io.IOException(te);
9989
      }
9990
    }
9991
 
9992
  }
9993
 
9994
  public static class getPurchaseScans_result implements org.apache.thrift.TBase<getPurchaseScans_result, getPurchaseScans_result._Fields>, java.io.Serializable, Cloneable   {
9995
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseScans_result");
9996
 
9997
    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);
9998
 
9999
    private List<DetailedPurchaseScan> success; // required
10000
 
10001
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10002
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10003
      SUCCESS((short)0, "success");
10004
 
10005
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10006
 
10007
      static {
10008
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10009
          byName.put(field.getFieldName(), field);
10010
        }
10011
      }
10012
 
10013
      /**
10014
       * Find the _Fields constant that matches fieldId, or null if its not found.
10015
       */
10016
      public static _Fields findByThriftId(int fieldId) {
10017
        switch(fieldId) {
10018
          case 0: // SUCCESS
10019
            return SUCCESS;
10020
          default:
10021
            return null;
10022
        }
10023
      }
10024
 
10025
      /**
10026
       * Find the _Fields constant that matches fieldId, throwing an exception
10027
       * if it is not found.
10028
       */
10029
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10030
        _Fields fields = findByThriftId(fieldId);
10031
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10032
        return fields;
10033
      }
10034
 
10035
      /**
10036
       * Find the _Fields constant that matches name, or null if its not found.
10037
       */
10038
      public static _Fields findByName(String name) {
10039
        return byName.get(name);
10040
      }
10041
 
10042
      private final short _thriftId;
10043
      private final String _fieldName;
10044
 
10045
      _Fields(short thriftId, String fieldName) {
10046
        _thriftId = thriftId;
10047
        _fieldName = fieldName;
10048
      }
10049
 
10050
      public short getThriftFieldId() {
10051
        return _thriftId;
10052
      }
10053
 
10054
      public String getFieldName() {
10055
        return _fieldName;
10056
      }
10057
    }
10058
 
10059
    // isset id assignments
10060
 
10061
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10062
    static {
10063
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10064
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10065
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
10066
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DetailedPurchaseScan.class))));
10067
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10068
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseScans_result.class, metaDataMap);
10069
    }
10070
 
10071
    public getPurchaseScans_result() {
10072
    }
10073
 
10074
    public getPurchaseScans_result(
10075
      List<DetailedPurchaseScan> success)
10076
    {
10077
      this();
10078
      this.success = success;
10079
    }
10080
 
10081
    /**
10082
     * Performs a deep copy on <i>other</i>.
10083
     */
10084
    public getPurchaseScans_result(getPurchaseScans_result other) {
10085
      if (other.isSetSuccess()) {
10086
        List<DetailedPurchaseScan> __this__success = new ArrayList<DetailedPurchaseScan>();
10087
        for (DetailedPurchaseScan other_element : other.success) {
10088
          __this__success.add(new DetailedPurchaseScan(other_element));
10089
        }
10090
        this.success = __this__success;
10091
      }
10092
    }
10093
 
10094
    public getPurchaseScans_result deepCopy() {
10095
      return new getPurchaseScans_result(this);
10096
    }
10097
 
10098
    @Override
10099
    public void clear() {
10100
      this.success = null;
10101
    }
10102
 
10103
    public int getSuccessSize() {
10104
      return (this.success == null) ? 0 : this.success.size();
10105
    }
10106
 
10107
    public java.util.Iterator<DetailedPurchaseScan> getSuccessIterator() {
10108
      return (this.success == null) ? null : this.success.iterator();
10109
    }
10110
 
10111
    public void addToSuccess(DetailedPurchaseScan elem) {
10112
      if (this.success == null) {
10113
        this.success = new ArrayList<DetailedPurchaseScan>();
10114
      }
10115
      this.success.add(elem);
10116
    }
10117
 
10118
    public List<DetailedPurchaseScan> getSuccess() {
10119
      return this.success;
10120
    }
10121
 
10122
    public void setSuccess(List<DetailedPurchaseScan> success) {
10123
      this.success = success;
10124
    }
10125
 
10126
    public void unsetSuccess() {
10127
      this.success = null;
10128
    }
10129
 
10130
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
10131
    public boolean isSetSuccess() {
10132
      return this.success != null;
10133
    }
10134
 
10135
    public void setSuccessIsSet(boolean value) {
10136
      if (!value) {
10137
        this.success = null;
10138
      }
10139
    }
10140
 
10141
    public void setFieldValue(_Fields field, Object value) {
10142
      switch (field) {
10143
      case SUCCESS:
10144
        if (value == null) {
10145
          unsetSuccess();
10146
        } else {
10147
          setSuccess((List<DetailedPurchaseScan>)value);
10148
        }
10149
        break;
10150
 
10151
      }
10152
    }
10153
 
10154
    public Object getFieldValue(_Fields field) {
10155
      switch (field) {
10156
      case SUCCESS:
10157
        return getSuccess();
10158
 
10159
      }
10160
      throw new IllegalStateException();
10161
    }
10162
 
10163
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10164
    public boolean isSet(_Fields field) {
10165
      if (field == null) {
10166
        throw new IllegalArgumentException();
10167
      }
10168
 
10169
      switch (field) {
10170
      case SUCCESS:
10171
        return isSetSuccess();
10172
      }
10173
      throw new IllegalStateException();
10174
    }
10175
 
10176
    @Override
10177
    public boolean equals(Object that) {
10178
      if (that == null)
10179
        return false;
10180
      if (that instanceof getPurchaseScans_result)
10181
        return this.equals((getPurchaseScans_result)that);
10182
      return false;
10183
    }
10184
 
10185
    public boolean equals(getPurchaseScans_result that) {
10186
      if (that == null)
10187
        return false;
10188
 
10189
      boolean this_present_success = true && this.isSetSuccess();
10190
      boolean that_present_success = true && that.isSetSuccess();
10191
      if (this_present_success || that_present_success) {
10192
        if (!(this_present_success && that_present_success))
10193
          return false;
10194
        if (!this.success.equals(that.success))
10195
          return false;
10196
      }
10197
 
10198
      return true;
10199
    }
10200
 
10201
    @Override
10202
    public int hashCode() {
10203
      return 0;
10204
    }
10205
 
10206
    public int compareTo(getPurchaseScans_result other) {
10207
      if (!getClass().equals(other.getClass())) {
10208
        return getClass().getName().compareTo(other.getClass().getName());
10209
      }
10210
 
10211
      int lastComparison = 0;
10212
      getPurchaseScans_result typedOther = (getPurchaseScans_result)other;
10213
 
10214
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
10215
      if (lastComparison != 0) {
10216
        return lastComparison;
10217
      }
10218
      if (isSetSuccess()) {
10219
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
10220
        if (lastComparison != 0) {
10221
          return lastComparison;
10222
        }
10223
      }
10224
      return 0;
10225
    }
10226
 
10227
    public _Fields fieldForId(int fieldId) {
10228
      return _Fields.findByThriftId(fieldId);
10229
    }
10230
 
10231
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10232
      org.apache.thrift.protocol.TField field;
10233
      iprot.readStructBegin();
10234
      while (true)
10235
      {
10236
        field = iprot.readFieldBegin();
10237
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10238
          break;
10239
        }
10240
        switch (field.id) {
10241
          case 0: // SUCCESS
10242
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
10243
              {
10244
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
10245
                this.success = new ArrayList<DetailedPurchaseScan>(_list12.size);
10246
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
10247
                {
10248
                  DetailedPurchaseScan _elem14; // required
10249
                  _elem14 = new DetailedPurchaseScan();
10250
                  _elem14.read(iprot);
10251
                  this.success.add(_elem14);
10252
                }
10253
                iprot.readListEnd();
10254
              }
10255
            } else { 
10256
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10257
            }
10258
            break;
10259
          default:
10260
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10261
        }
10262
        iprot.readFieldEnd();
10263
      }
10264
      iprot.readStructEnd();
10265
      validate();
10266
    }
10267
 
10268
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10269
      oprot.writeStructBegin(STRUCT_DESC);
10270
 
10271
      if (this.isSetSuccess()) {
10272
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10273
        {
10274
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
10275
          for (DetailedPurchaseScan _iter15 : this.success)
10276
          {
10277
            _iter15.write(oprot);
10278
          }
10279
          oprot.writeListEnd();
10280
        }
10281
        oprot.writeFieldEnd();
10282
      }
10283
      oprot.writeFieldStop();
10284
      oprot.writeStructEnd();
10285
    }
10286
 
10287
    @Override
10288
    public String toString() {
10289
      StringBuilder sb = new StringBuilder("getPurchaseScans_result(");
10290
      boolean first = true;
10291
 
10292
      sb.append("success:");
10293
      if (this.success == null) {
10294
        sb.append("null");
10295
      } else {
10296
        sb.append(this.success);
10297
      }
10298
      first = false;
10299
      sb.append(")");
10300
      return sb.toString();
10301
    }
10302
 
10303
    public void validate() throws org.apache.thrift.TException {
10304
      // check for required fields
10305
    }
10306
 
10307
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10308
      try {
10309
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10310
      } catch (org.apache.thrift.TException te) {
10311
        throw new java.io.IOException(te);
10312
      }
10313
    }
10314
 
10315
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10316
      try {
10317
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10318
      } catch (org.apache.thrift.TException te) {
10319
        throw new java.io.IOException(te);
10320
      }
10321
    }
10322
 
10323
  }
10324
 
5496 mandeep.dh 10325
  public static class fetchScansPerInvoiceNumber_args implements org.apache.thrift.TBase<fetchScansPerInvoiceNumber_args, fetchScansPerInvoiceNumber_args._Fields>, java.io.Serializable, Cloneable   {
10326
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchScansPerInvoiceNumber_args");
10327
 
10328
    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);
10329
 
10330
    private long date; // required
10331
 
10332
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10333
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10334
      DATE((short)1, "date");
10335
 
10336
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10337
 
10338
      static {
10339
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10340
          byName.put(field.getFieldName(), field);
10341
        }
10342
      }
10343
 
10344
      /**
10345
       * Find the _Fields constant that matches fieldId, or null if its not found.
10346
       */
10347
      public static _Fields findByThriftId(int fieldId) {
10348
        switch(fieldId) {
10349
          case 1: // DATE
10350
            return DATE;
10351
          default:
10352
            return null;
10353
        }
10354
      }
10355
 
10356
      /**
10357
       * Find the _Fields constant that matches fieldId, throwing an exception
10358
       * if it is not found.
10359
       */
10360
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10361
        _Fields fields = findByThriftId(fieldId);
10362
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10363
        return fields;
10364
      }
10365
 
10366
      /**
10367
       * Find the _Fields constant that matches name, or null if its not found.
10368
       */
10369
      public static _Fields findByName(String name) {
10370
        return byName.get(name);
10371
      }
10372
 
10373
      private final short _thriftId;
10374
      private final String _fieldName;
10375
 
10376
      _Fields(short thriftId, String fieldName) {
10377
        _thriftId = thriftId;
10378
        _fieldName = fieldName;
10379
      }
10380
 
10381
      public short getThriftFieldId() {
10382
        return _thriftId;
10383
      }
10384
 
10385
      public String getFieldName() {
10386
        return _fieldName;
10387
      }
10388
    }
10389
 
10390
    // isset id assignments
10391
    private static final int __DATE_ISSET_ID = 0;
10392
    private BitSet __isset_bit_vector = new BitSet(1);
10393
 
10394
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10395
    static {
10396
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10397
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10398
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10399
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10400
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchScansPerInvoiceNumber_args.class, metaDataMap);
10401
    }
10402
 
10403
    public fetchScansPerInvoiceNumber_args() {
10404
    }
10405
 
10406
    public fetchScansPerInvoiceNumber_args(
10407
      long date)
10408
    {
10409
      this();
10410
      this.date = date;
10411
      setDateIsSet(true);
10412
    }
10413
 
10414
    /**
10415
     * Performs a deep copy on <i>other</i>.
10416
     */
10417
    public fetchScansPerInvoiceNumber_args(fetchScansPerInvoiceNumber_args other) {
10418
      __isset_bit_vector.clear();
10419
      __isset_bit_vector.or(other.__isset_bit_vector);
10420
      this.date = other.date;
10421
    }
10422
 
10423
    public fetchScansPerInvoiceNumber_args deepCopy() {
10424
      return new fetchScansPerInvoiceNumber_args(this);
10425
    }
10426
 
10427
    @Override
10428
    public void clear() {
10429
      setDateIsSet(false);
10430
      this.date = 0;
10431
    }
10432
 
10433
    public long getDate() {
10434
      return this.date;
10435
    }
10436
 
10437
    public void setDate(long date) {
10438
      this.date = date;
10439
      setDateIsSet(true);
10440
    }
10441
 
10442
    public void unsetDate() {
10443
      __isset_bit_vector.clear(__DATE_ISSET_ID);
10444
    }
10445
 
10446
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
10447
    public boolean isSetDate() {
10448
      return __isset_bit_vector.get(__DATE_ISSET_ID);
10449
    }
10450
 
10451
    public void setDateIsSet(boolean value) {
10452
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
10453
    }
10454
 
10455
    public void setFieldValue(_Fields field, Object value) {
10456
      switch (field) {
10457
      case DATE:
10458
        if (value == null) {
10459
          unsetDate();
10460
        } else {
10461
          setDate((Long)value);
10462
        }
10463
        break;
10464
 
10465
      }
10466
    }
10467
 
10468
    public Object getFieldValue(_Fields field) {
10469
      switch (field) {
10470
      case DATE:
10471
        return Long.valueOf(getDate());
10472
 
10473
      }
10474
      throw new IllegalStateException();
10475
    }
10476
 
10477
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10478
    public boolean isSet(_Fields field) {
10479
      if (field == null) {
10480
        throw new IllegalArgumentException();
10481
      }
10482
 
10483
      switch (field) {
10484
      case DATE:
10485
        return isSetDate();
10486
      }
10487
      throw new IllegalStateException();
10488
    }
10489
 
10490
    @Override
10491
    public boolean equals(Object that) {
10492
      if (that == null)
10493
        return false;
10494
      if (that instanceof fetchScansPerInvoiceNumber_args)
10495
        return this.equals((fetchScansPerInvoiceNumber_args)that);
10496
      return false;
10497
    }
10498
 
10499
    public boolean equals(fetchScansPerInvoiceNumber_args that) {
10500
      if (that == null)
10501
        return false;
10502
 
10503
      boolean this_present_date = true;
10504
      boolean that_present_date = true;
10505
      if (this_present_date || that_present_date) {
10506
        if (!(this_present_date && that_present_date))
10507
          return false;
10508
        if (this.date != that.date)
10509
          return false;
10510
      }
10511
 
10512
      return true;
10513
    }
10514
 
10515
    @Override
10516
    public int hashCode() {
10517
      return 0;
10518
    }
10519
 
10520
    public int compareTo(fetchScansPerInvoiceNumber_args other) {
10521
      if (!getClass().equals(other.getClass())) {
10522
        return getClass().getName().compareTo(other.getClass().getName());
10523
      }
10524
 
10525
      int lastComparison = 0;
10526
      fetchScansPerInvoiceNumber_args typedOther = (fetchScansPerInvoiceNumber_args)other;
10527
 
10528
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
10529
      if (lastComparison != 0) {
10530
        return lastComparison;
10531
      }
10532
      if (isSetDate()) {
10533
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
10534
        if (lastComparison != 0) {
10535
          return lastComparison;
10536
        }
10537
      }
10538
      return 0;
10539
    }
10540
 
10541
    public _Fields fieldForId(int fieldId) {
10542
      return _Fields.findByThriftId(fieldId);
10543
    }
10544
 
10545
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10546
      org.apache.thrift.protocol.TField field;
10547
      iprot.readStructBegin();
10548
      while (true)
10549
      {
10550
        field = iprot.readFieldBegin();
10551
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10552
          break;
10553
        }
10554
        switch (field.id) {
10555
          case 1: // DATE
10556
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10557
              this.date = iprot.readI64();
10558
              setDateIsSet(true);
10559
            } else { 
10560
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10561
            }
10562
            break;
10563
          default:
10564
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10565
        }
10566
        iprot.readFieldEnd();
10567
      }
10568
      iprot.readStructEnd();
10569
      validate();
10570
    }
10571
 
10572
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10573
      validate();
10574
 
10575
      oprot.writeStructBegin(STRUCT_DESC);
10576
      oprot.writeFieldBegin(DATE_FIELD_DESC);
10577
      oprot.writeI64(this.date);
10578
      oprot.writeFieldEnd();
10579
      oprot.writeFieldStop();
10580
      oprot.writeStructEnd();
10581
    }
10582
 
10583
    @Override
10584
    public String toString() {
10585
      StringBuilder sb = new StringBuilder("fetchScansPerInvoiceNumber_args(");
10586
      boolean first = true;
10587
 
10588
      sb.append("date:");
10589
      sb.append(this.date);
10590
      first = false;
10591
      sb.append(")");
10592
      return sb.toString();
10593
    }
10594
 
10595
    public void validate() throws org.apache.thrift.TException {
10596
      // check for required fields
10597
    }
10598
 
10599
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10600
      try {
10601
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10602
      } catch (org.apache.thrift.TException te) {
10603
        throw new java.io.IOException(te);
10604
      }
10605
    }
10606
 
10607
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10608
      try {
5711 mandeep.dh 10609
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
10610
        __isset_bit_vector = new BitSet(1);
5496 mandeep.dh 10611
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10612
      } catch (org.apache.thrift.TException te) {
10613
        throw new java.io.IOException(te);
10614
      }
10615
    }
10616
 
10617
  }
10618
 
10619
  public static class fetchScansPerInvoiceNumber_result implements org.apache.thrift.TBase<fetchScansPerInvoiceNumber_result, fetchScansPerInvoiceNumber_result._Fields>, java.io.Serializable, Cloneable   {
10620
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchScansPerInvoiceNumber_result");
10621
 
10622
    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);
10623
 
10624
    private List<InvoiceScan> success; // required
10625
 
10626
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10627
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10628
      SUCCESS((short)0, "success");
10629
 
10630
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10631
 
10632
      static {
10633
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10634
          byName.put(field.getFieldName(), field);
10635
        }
10636
      }
10637
 
10638
      /**
10639
       * Find the _Fields constant that matches fieldId, or null if its not found.
10640
       */
10641
      public static _Fields findByThriftId(int fieldId) {
10642
        switch(fieldId) {
10643
          case 0: // SUCCESS
10644
            return SUCCESS;
10645
          default:
10646
            return null;
10647
        }
10648
      }
10649
 
10650
      /**
10651
       * Find the _Fields constant that matches fieldId, throwing an exception
10652
       * if it is not found.
10653
       */
10654
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10655
        _Fields fields = findByThriftId(fieldId);
10656
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10657
        return fields;
10658
      }
10659
 
10660
      /**
10661
       * Find the _Fields constant that matches name, or null if its not found.
10662
       */
10663
      public static _Fields findByName(String name) {
10664
        return byName.get(name);
10665
      }
10666
 
10667
      private final short _thriftId;
10668
      private final String _fieldName;
10669
 
10670
      _Fields(short thriftId, String fieldName) {
10671
        _thriftId = thriftId;
10672
        _fieldName = fieldName;
10673
      }
10674
 
10675
      public short getThriftFieldId() {
10676
        return _thriftId;
10677
      }
10678
 
10679
      public String getFieldName() {
10680
        return _fieldName;
10681
      }
10682
    }
10683
 
10684
    // isset id assignments
10685
 
10686
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10687
    static {
10688
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10689
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10690
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
10691
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InvoiceScan.class))));
10692
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10693
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchScansPerInvoiceNumber_result.class, metaDataMap);
10694
    }
10695
 
10696
    public fetchScansPerInvoiceNumber_result() {
10697
    }
10698
 
10699
    public fetchScansPerInvoiceNumber_result(
10700
      List<InvoiceScan> success)
10701
    {
10702
      this();
10703
      this.success = success;
10704
    }
10705
 
10706
    /**
10707
     * Performs a deep copy on <i>other</i>.
10708
     */
10709
    public fetchScansPerInvoiceNumber_result(fetchScansPerInvoiceNumber_result other) {
10710
      if (other.isSetSuccess()) {
10711
        List<InvoiceScan> __this__success = new ArrayList<InvoiceScan>();
10712
        for (InvoiceScan other_element : other.success) {
10713
          __this__success.add(new InvoiceScan(other_element));
10714
        }
10715
        this.success = __this__success;
10716
      }
10717
    }
10718
 
10719
    public fetchScansPerInvoiceNumber_result deepCopy() {
10720
      return new fetchScansPerInvoiceNumber_result(this);
10721
    }
10722
 
10723
    @Override
10724
    public void clear() {
10725
      this.success = null;
10726
    }
10727
 
10728
    public int getSuccessSize() {
10729
      return (this.success == null) ? 0 : this.success.size();
10730
    }
10731
 
10732
    public java.util.Iterator<InvoiceScan> getSuccessIterator() {
10733
      return (this.success == null) ? null : this.success.iterator();
10734
    }
10735
 
10736
    public void addToSuccess(InvoiceScan elem) {
10737
      if (this.success == null) {
10738
        this.success = new ArrayList<InvoiceScan>();
10739
      }
10740
      this.success.add(elem);
10741
    }
10742
 
10743
    public List<InvoiceScan> getSuccess() {
10744
      return this.success;
10745
    }
10746
 
10747
    public void setSuccess(List<InvoiceScan> success) {
10748
      this.success = success;
10749
    }
10750
 
10751
    public void unsetSuccess() {
10752
      this.success = null;
10753
    }
10754
 
10755
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
10756
    public boolean isSetSuccess() {
10757
      return this.success != null;
10758
    }
10759
 
10760
    public void setSuccessIsSet(boolean value) {
10761
      if (!value) {
10762
        this.success = null;
10763
      }
10764
    }
10765
 
10766
    public void setFieldValue(_Fields field, Object value) {
10767
      switch (field) {
10768
      case SUCCESS:
10769
        if (value == null) {
10770
          unsetSuccess();
10771
        } else {
10772
          setSuccess((List<InvoiceScan>)value);
10773
        }
10774
        break;
10775
 
10776
      }
10777
    }
10778
 
10779
    public Object getFieldValue(_Fields field) {
10780
      switch (field) {
10781
      case SUCCESS:
10782
        return getSuccess();
10783
 
10784
      }
10785
      throw new IllegalStateException();
10786
    }
10787
 
10788
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10789
    public boolean isSet(_Fields field) {
10790
      if (field == null) {
10791
        throw new IllegalArgumentException();
10792
      }
10793
 
10794
      switch (field) {
10795
      case SUCCESS:
10796
        return isSetSuccess();
10797
      }
10798
      throw new IllegalStateException();
10799
    }
10800
 
10801
    @Override
10802
    public boolean equals(Object that) {
10803
      if (that == null)
10804
        return false;
10805
      if (that instanceof fetchScansPerInvoiceNumber_result)
10806
        return this.equals((fetchScansPerInvoiceNumber_result)that);
10807
      return false;
10808
    }
10809
 
10810
    public boolean equals(fetchScansPerInvoiceNumber_result that) {
10811
      if (that == null)
10812
        return false;
10813
 
10814
      boolean this_present_success = true && this.isSetSuccess();
10815
      boolean that_present_success = true && that.isSetSuccess();
10816
      if (this_present_success || that_present_success) {
10817
        if (!(this_present_success && that_present_success))
10818
          return false;
10819
        if (!this.success.equals(that.success))
10820
          return false;
10821
      }
10822
 
10823
      return true;
10824
    }
10825
 
10826
    @Override
10827
    public int hashCode() {
10828
      return 0;
10829
    }
10830
 
10831
    public int compareTo(fetchScansPerInvoiceNumber_result other) {
10832
      if (!getClass().equals(other.getClass())) {
10833
        return getClass().getName().compareTo(other.getClass().getName());
10834
      }
10835
 
10836
      int lastComparison = 0;
10837
      fetchScansPerInvoiceNumber_result typedOther = (fetchScansPerInvoiceNumber_result)other;
10838
 
10839
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
10840
      if (lastComparison != 0) {
10841
        return lastComparison;
10842
      }
10843
      if (isSetSuccess()) {
10844
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
10845
        if (lastComparison != 0) {
10846
          return lastComparison;
10847
        }
10848
      }
10849
      return 0;
10850
    }
10851
 
10852
    public _Fields fieldForId(int fieldId) {
10853
      return _Fields.findByThriftId(fieldId);
10854
    }
10855
 
10856
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10857
      org.apache.thrift.protocol.TField field;
10858
      iprot.readStructBegin();
10859
      while (true)
10860
      {
10861
        field = iprot.readFieldBegin();
10862
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10863
          break;
10864
        }
10865
        switch (field.id) {
10866
          case 0: // SUCCESS
10867
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
10868
              {
10869
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
10870
                this.success = new ArrayList<InvoiceScan>(_list16.size);
10871
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
10872
                {
10873
                  InvoiceScan _elem18; // required
10874
                  _elem18 = new InvoiceScan();
10875
                  _elem18.read(iprot);
10876
                  this.success.add(_elem18);
10877
                }
10878
                iprot.readListEnd();
10879
              }
10880
            } else { 
10881
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10882
            }
10883
            break;
10884
          default:
10885
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10886
        }
10887
        iprot.readFieldEnd();
10888
      }
10889
      iprot.readStructEnd();
10890
      validate();
10891
    }
10892
 
10893
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10894
      oprot.writeStructBegin(STRUCT_DESC);
10895
 
10896
      if (this.isSetSuccess()) {
10897
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10898
        {
10899
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
10900
          for (InvoiceScan _iter19 : this.success)
10901
          {
10902
            _iter19.write(oprot);
10903
          }
10904
          oprot.writeListEnd();
10905
        }
10906
        oprot.writeFieldEnd();
10907
      }
10908
      oprot.writeFieldStop();
10909
      oprot.writeStructEnd();
10910
    }
10911
 
10912
    @Override
10913
    public String toString() {
10914
      StringBuilder sb = new StringBuilder("fetchScansPerInvoiceNumber_result(");
10915
      boolean first = true;
10916
 
10917
      sb.append("success:");
10918
      if (this.success == null) {
10919
        sb.append("null");
10920
      } else {
10921
        sb.append(this.success);
10922
      }
10923
      first = false;
10924
      sb.append(")");
10925
      return sb.toString();
10926
    }
10927
 
10928
    public void validate() throws org.apache.thrift.TException {
10929
      // check for required fields
10930
    }
10931
 
10932
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10933
      try {
10934
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10935
      } catch (org.apache.thrift.TException te) {
10936
        throw new java.io.IOException(te);
10937
      }
10938
    }
10939
 
10940
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10941
      try {
10942
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10943
      } catch (org.apache.thrift.TException te) {
10944
        throw new java.io.IOException(te);
10945
      }
10946
    }
10947
 
10948
  }
10949
 
5620 mandeep.dh 10950
  public static class getInventoryItemFromOrder_args implements org.apache.thrift.TBase<getInventoryItemFromOrder_args, getInventoryItemFromOrder_args._Fields>, java.io.Serializable, Cloneable   {
10951
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromOrder_args");
10952
 
10953
    private static final org.apache.thrift.protocol.TField ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("orderId", org.apache.thrift.protocol.TType.I64, (short)1);
10954
 
10955
    private long orderId; // required
10956
 
10957
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10958
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10959
      ORDER_ID((short)1, "orderId");
10960
 
10961
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10962
 
10963
      static {
10964
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10965
          byName.put(field.getFieldName(), field);
10966
        }
10967
      }
10968
 
10969
      /**
10970
       * Find the _Fields constant that matches fieldId, or null if its not found.
10971
       */
10972
      public static _Fields findByThriftId(int fieldId) {
10973
        switch(fieldId) {
10974
          case 1: // ORDER_ID
10975
            return ORDER_ID;
10976
          default:
10977
            return null;
10978
        }
10979
      }
10980
 
10981
      /**
10982
       * Find the _Fields constant that matches fieldId, throwing an exception
10983
       * if it is not found.
10984
       */
10985
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10986
        _Fields fields = findByThriftId(fieldId);
10987
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10988
        return fields;
10989
      }
10990
 
10991
      /**
10992
       * Find the _Fields constant that matches name, or null if its not found.
10993
       */
10994
      public static _Fields findByName(String name) {
10995
        return byName.get(name);
10996
      }
10997
 
10998
      private final short _thriftId;
10999
      private final String _fieldName;
11000
 
11001
      _Fields(short thriftId, String fieldName) {
11002
        _thriftId = thriftId;
11003
        _fieldName = fieldName;
11004
      }
11005
 
11006
      public short getThriftFieldId() {
11007
        return _thriftId;
11008
      }
11009
 
11010
      public String getFieldName() {
11011
        return _fieldName;
11012
      }
11013
    }
11014
 
11015
    // isset id assignments
11016
    private static final int __ORDERID_ISSET_ID = 0;
11017
    private BitSet __isset_bit_vector = new BitSet(1);
11018
 
11019
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11020
    static {
11021
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11022
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11023
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11024
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11025
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromOrder_args.class, metaDataMap);
11026
    }
11027
 
11028
    public getInventoryItemFromOrder_args() {
11029
    }
11030
 
11031
    public getInventoryItemFromOrder_args(
11032
      long orderId)
11033
    {
11034
      this();
11035
      this.orderId = orderId;
11036
      setOrderIdIsSet(true);
11037
    }
11038
 
11039
    /**
11040
     * Performs a deep copy on <i>other</i>.
11041
     */
11042
    public getInventoryItemFromOrder_args(getInventoryItemFromOrder_args other) {
11043
      __isset_bit_vector.clear();
11044
      __isset_bit_vector.or(other.__isset_bit_vector);
11045
      this.orderId = other.orderId;
11046
    }
11047
 
11048
    public getInventoryItemFromOrder_args deepCopy() {
11049
      return new getInventoryItemFromOrder_args(this);
11050
    }
11051
 
11052
    @Override
11053
    public void clear() {
11054
      setOrderIdIsSet(false);
11055
      this.orderId = 0;
11056
    }
11057
 
11058
    public long getOrderId() {
11059
      return this.orderId;
11060
    }
11061
 
11062
    public void setOrderId(long orderId) {
11063
      this.orderId = orderId;
11064
      setOrderIdIsSet(true);
11065
    }
11066
 
11067
    public void unsetOrderId() {
11068
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
11069
    }
11070
 
11071
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
11072
    public boolean isSetOrderId() {
11073
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
11074
    }
11075
 
11076
    public void setOrderIdIsSet(boolean value) {
11077
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
11078
    }
11079
 
11080
    public void setFieldValue(_Fields field, Object value) {
11081
      switch (field) {
11082
      case ORDER_ID:
11083
        if (value == null) {
11084
          unsetOrderId();
11085
        } else {
11086
          setOrderId((Long)value);
11087
        }
11088
        break;
11089
 
11090
      }
11091
    }
11092
 
11093
    public Object getFieldValue(_Fields field) {
11094
      switch (field) {
11095
      case ORDER_ID:
11096
        return Long.valueOf(getOrderId());
11097
 
11098
      }
11099
      throw new IllegalStateException();
11100
    }
11101
 
11102
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11103
    public boolean isSet(_Fields field) {
11104
      if (field == null) {
11105
        throw new IllegalArgumentException();
11106
      }
11107
 
11108
      switch (field) {
11109
      case ORDER_ID:
11110
        return isSetOrderId();
11111
      }
11112
      throw new IllegalStateException();
11113
    }
11114
 
11115
    @Override
11116
    public boolean equals(Object that) {
11117
      if (that == null)
11118
        return false;
11119
      if (that instanceof getInventoryItemFromOrder_args)
11120
        return this.equals((getInventoryItemFromOrder_args)that);
11121
      return false;
11122
    }
11123
 
11124
    public boolean equals(getInventoryItemFromOrder_args that) {
11125
      if (that == null)
11126
        return false;
11127
 
11128
      boolean this_present_orderId = true;
11129
      boolean that_present_orderId = true;
11130
      if (this_present_orderId || that_present_orderId) {
11131
        if (!(this_present_orderId && that_present_orderId))
11132
          return false;
11133
        if (this.orderId != that.orderId)
11134
          return false;
11135
      }
11136
 
11137
      return true;
11138
    }
11139
 
11140
    @Override
11141
    public int hashCode() {
11142
      return 0;
11143
    }
11144
 
11145
    public int compareTo(getInventoryItemFromOrder_args other) {
11146
      if (!getClass().equals(other.getClass())) {
11147
        return getClass().getName().compareTo(other.getClass().getName());
11148
      }
11149
 
11150
      int lastComparison = 0;
11151
      getInventoryItemFromOrder_args typedOther = (getInventoryItemFromOrder_args)other;
11152
 
11153
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
11154
      if (lastComparison != 0) {
11155
        return lastComparison;
11156
      }
11157
      if (isSetOrderId()) {
11158
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
11159
        if (lastComparison != 0) {
11160
          return lastComparison;
11161
        }
11162
      }
11163
      return 0;
11164
    }
11165
 
11166
    public _Fields fieldForId(int fieldId) {
11167
      return _Fields.findByThriftId(fieldId);
11168
    }
11169
 
11170
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11171
      org.apache.thrift.protocol.TField field;
11172
      iprot.readStructBegin();
11173
      while (true)
11174
      {
11175
        field = iprot.readFieldBegin();
11176
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11177
          break;
11178
        }
11179
        switch (field.id) {
11180
          case 1: // ORDER_ID
11181
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11182
              this.orderId = iprot.readI64();
11183
              setOrderIdIsSet(true);
11184
            } else { 
11185
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11186
            }
11187
            break;
11188
          default:
11189
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11190
        }
11191
        iprot.readFieldEnd();
11192
      }
11193
      iprot.readStructEnd();
11194
      validate();
11195
    }
11196
 
11197
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11198
      validate();
11199
 
11200
      oprot.writeStructBegin(STRUCT_DESC);
11201
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
11202
      oprot.writeI64(this.orderId);
11203
      oprot.writeFieldEnd();
11204
      oprot.writeFieldStop();
11205
      oprot.writeStructEnd();
11206
    }
11207
 
11208
    @Override
11209
    public String toString() {
11210
      StringBuilder sb = new StringBuilder("getInventoryItemFromOrder_args(");
11211
      boolean first = true;
11212
 
11213
      sb.append("orderId:");
11214
      sb.append(this.orderId);
11215
      first = false;
11216
      sb.append(")");
11217
      return sb.toString();
11218
    }
11219
 
11220
    public void validate() throws org.apache.thrift.TException {
11221
      // check for required fields
11222
    }
11223
 
11224
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11225
      try {
11226
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11227
      } catch (org.apache.thrift.TException te) {
11228
        throw new java.io.IOException(te);
11229
      }
11230
    }
11231
 
11232
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11233
      try {
11234
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
11235
        __isset_bit_vector = new BitSet(1);
11236
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11237
      } catch (org.apache.thrift.TException te) {
11238
        throw new java.io.IOException(te);
11239
      }
11240
    }
11241
 
11242
  }
11243
 
11244
  public static class getInventoryItemFromOrder_result implements org.apache.thrift.TBase<getInventoryItemFromOrder_result, getInventoryItemFromOrder_result._Fields>, java.io.Serializable, Cloneable   {
11245
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromOrder_result");
11246
 
11247
    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);
11248
    private static final org.apache.thrift.protocol.TField WE_FIELD_DESC = new org.apache.thrift.protocol.TField("we", org.apache.thrift.protocol.TType.STRUCT, (short)1);
11249
 
11250
    private InventoryItem success; // required
11251
    private WarehouseServiceException we; // required
11252
 
11253
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11254
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11255
      SUCCESS((short)0, "success"),
11256
      WE((short)1, "we");
11257
 
11258
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11259
 
11260
      static {
11261
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11262
          byName.put(field.getFieldName(), field);
11263
        }
11264
      }
11265
 
11266
      /**
11267
       * Find the _Fields constant that matches fieldId, or null if its not found.
11268
       */
11269
      public static _Fields findByThriftId(int fieldId) {
11270
        switch(fieldId) {
11271
          case 0: // SUCCESS
11272
            return SUCCESS;
11273
          case 1: // WE
11274
            return WE;
11275
          default:
11276
            return null;
11277
        }
11278
      }
11279
 
11280
      /**
11281
       * Find the _Fields constant that matches fieldId, throwing an exception
11282
       * if it is not found.
11283
       */
11284
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11285
        _Fields fields = findByThriftId(fieldId);
11286
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11287
        return fields;
11288
      }
11289
 
11290
      /**
11291
       * Find the _Fields constant that matches name, or null if its not found.
11292
       */
11293
      public static _Fields findByName(String name) {
11294
        return byName.get(name);
11295
      }
11296
 
11297
      private final short _thriftId;
11298
      private final String _fieldName;
11299
 
11300
      _Fields(short thriftId, String fieldName) {
11301
        _thriftId = thriftId;
11302
        _fieldName = fieldName;
11303
      }
11304
 
11305
      public short getThriftFieldId() {
11306
        return _thriftId;
11307
      }
11308
 
11309
      public String getFieldName() {
11310
        return _fieldName;
11311
      }
11312
    }
11313
 
11314
    // isset id assignments
11315
 
11316
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11317
    static {
11318
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11319
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11320
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
11321
      tmpMap.put(_Fields.WE, new org.apache.thrift.meta_data.FieldMetaData("we", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11322
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11323
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11324
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromOrder_result.class, metaDataMap);
11325
    }
11326
 
11327
    public getInventoryItemFromOrder_result() {
11328
    }
11329
 
11330
    public getInventoryItemFromOrder_result(
11331
      InventoryItem success,
11332
      WarehouseServiceException we)
11333
    {
11334
      this();
11335
      this.success = success;
11336
      this.we = we;
11337
    }
11338
 
11339
    /**
11340
     * Performs a deep copy on <i>other</i>.
11341
     */
11342
    public getInventoryItemFromOrder_result(getInventoryItemFromOrder_result other) {
11343
      if (other.isSetSuccess()) {
11344
        this.success = new InventoryItem(other.success);
11345
      }
11346
      if (other.isSetWe()) {
11347
        this.we = new WarehouseServiceException(other.we);
11348
      }
11349
    }
11350
 
11351
    public getInventoryItemFromOrder_result deepCopy() {
11352
      return new getInventoryItemFromOrder_result(this);
11353
    }
11354
 
11355
    @Override
11356
    public void clear() {
11357
      this.success = null;
11358
      this.we = null;
11359
    }
11360
 
11361
    public InventoryItem getSuccess() {
11362
      return this.success;
11363
    }
11364
 
11365
    public void setSuccess(InventoryItem success) {
11366
      this.success = success;
11367
    }
11368
 
11369
    public void unsetSuccess() {
11370
      this.success = null;
11371
    }
11372
 
11373
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
11374
    public boolean isSetSuccess() {
11375
      return this.success != null;
11376
    }
11377
 
11378
    public void setSuccessIsSet(boolean value) {
11379
      if (!value) {
11380
        this.success = null;
11381
      }
11382
    }
11383
 
11384
    public WarehouseServiceException getWe() {
11385
      return this.we;
11386
    }
11387
 
11388
    public void setWe(WarehouseServiceException we) {
11389
      this.we = we;
11390
    }
11391
 
11392
    public void unsetWe() {
11393
      this.we = null;
11394
    }
11395
 
11396
    /** Returns true if field we is set (has been assigned a value) and false otherwise */
11397
    public boolean isSetWe() {
11398
      return this.we != null;
11399
    }
11400
 
11401
    public void setWeIsSet(boolean value) {
11402
      if (!value) {
11403
        this.we = null;
11404
      }
11405
    }
11406
 
11407
    public void setFieldValue(_Fields field, Object value) {
11408
      switch (field) {
11409
      case SUCCESS:
11410
        if (value == null) {
11411
          unsetSuccess();
11412
        } else {
11413
          setSuccess((InventoryItem)value);
11414
        }
11415
        break;
11416
 
11417
      case WE:
11418
        if (value == null) {
11419
          unsetWe();
11420
        } else {
11421
          setWe((WarehouseServiceException)value);
11422
        }
11423
        break;
11424
 
11425
      }
11426
    }
11427
 
11428
    public Object getFieldValue(_Fields field) {
11429
      switch (field) {
11430
      case SUCCESS:
11431
        return getSuccess();
11432
 
11433
      case WE:
11434
        return getWe();
11435
 
11436
      }
11437
      throw new IllegalStateException();
11438
    }
11439
 
11440
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11441
    public boolean isSet(_Fields field) {
11442
      if (field == null) {
11443
        throw new IllegalArgumentException();
11444
      }
11445
 
11446
      switch (field) {
11447
      case SUCCESS:
11448
        return isSetSuccess();
11449
      case WE:
11450
        return isSetWe();
11451
      }
11452
      throw new IllegalStateException();
11453
    }
11454
 
11455
    @Override
11456
    public boolean equals(Object that) {
11457
      if (that == null)
11458
        return false;
11459
      if (that instanceof getInventoryItemFromOrder_result)
11460
        return this.equals((getInventoryItemFromOrder_result)that);
11461
      return false;
11462
    }
11463
 
11464
    public boolean equals(getInventoryItemFromOrder_result that) {
11465
      if (that == null)
11466
        return false;
11467
 
11468
      boolean this_present_success = true && this.isSetSuccess();
11469
      boolean that_present_success = true && that.isSetSuccess();
11470
      if (this_present_success || that_present_success) {
11471
        if (!(this_present_success && that_present_success))
11472
          return false;
11473
        if (!this.success.equals(that.success))
11474
          return false;
11475
      }
11476
 
11477
      boolean this_present_we = true && this.isSetWe();
11478
      boolean that_present_we = true && that.isSetWe();
11479
      if (this_present_we || that_present_we) {
11480
        if (!(this_present_we && that_present_we))
11481
          return false;
11482
        if (!this.we.equals(that.we))
11483
          return false;
11484
      }
11485
 
11486
      return true;
11487
    }
11488
 
11489
    @Override
11490
    public int hashCode() {
11491
      return 0;
11492
    }
11493
 
11494
    public int compareTo(getInventoryItemFromOrder_result other) {
11495
      if (!getClass().equals(other.getClass())) {
11496
        return getClass().getName().compareTo(other.getClass().getName());
11497
      }
11498
 
11499
      int lastComparison = 0;
11500
      getInventoryItemFromOrder_result typedOther = (getInventoryItemFromOrder_result)other;
11501
 
11502
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
11503
      if (lastComparison != 0) {
11504
        return lastComparison;
11505
      }
11506
      if (isSetSuccess()) {
11507
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
11508
        if (lastComparison != 0) {
11509
          return lastComparison;
11510
        }
11511
      }
11512
      lastComparison = Boolean.valueOf(isSetWe()).compareTo(typedOther.isSetWe());
11513
      if (lastComparison != 0) {
11514
        return lastComparison;
11515
      }
11516
      if (isSetWe()) {
11517
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.we, typedOther.we);
11518
        if (lastComparison != 0) {
11519
          return lastComparison;
11520
        }
11521
      }
11522
      return 0;
11523
    }
11524
 
11525
    public _Fields fieldForId(int fieldId) {
11526
      return _Fields.findByThriftId(fieldId);
11527
    }
11528
 
11529
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11530
      org.apache.thrift.protocol.TField field;
11531
      iprot.readStructBegin();
11532
      while (true)
11533
      {
11534
        field = iprot.readFieldBegin();
11535
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11536
          break;
11537
        }
11538
        switch (field.id) {
11539
          case 0: // SUCCESS
11540
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11541
              this.success = new InventoryItem();
11542
              this.success.read(iprot);
11543
            } else { 
11544
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11545
            }
11546
            break;
11547
          case 1: // WE
11548
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11549
              this.we = new WarehouseServiceException();
11550
              this.we.read(iprot);
11551
            } else { 
11552
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11553
            }
11554
            break;
11555
          default:
11556
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11557
        }
11558
        iprot.readFieldEnd();
11559
      }
11560
      iprot.readStructEnd();
11561
      validate();
11562
    }
11563
 
11564
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11565
      oprot.writeStructBegin(STRUCT_DESC);
11566
 
11567
      if (this.isSetSuccess()) {
11568
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11569
        this.success.write(oprot);
11570
        oprot.writeFieldEnd();
11571
      } else if (this.isSetWe()) {
11572
        oprot.writeFieldBegin(WE_FIELD_DESC);
11573
        this.we.write(oprot);
11574
        oprot.writeFieldEnd();
11575
      }
11576
      oprot.writeFieldStop();
11577
      oprot.writeStructEnd();
11578
    }
11579
 
11580
    @Override
11581
    public String toString() {
11582
      StringBuilder sb = new StringBuilder("getInventoryItemFromOrder_result(");
11583
      boolean first = true;
11584
 
11585
      sb.append("success:");
11586
      if (this.success == null) {
11587
        sb.append("null");
11588
      } else {
11589
        sb.append(this.success);
11590
      }
11591
      first = false;
11592
      if (!first) sb.append(", ");
11593
      sb.append("we:");
11594
      if (this.we == null) {
11595
        sb.append("null");
11596
      } else {
11597
        sb.append(this.we);
11598
      }
11599
      first = false;
11600
      sb.append(")");
11601
      return sb.toString();
11602
    }
11603
 
11604
    public void validate() throws org.apache.thrift.TException {
11605
      // check for required fields
11606
    }
11607
 
11608
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11609
      try {
11610
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11611
      } catch (org.apache.thrift.TException te) {
11612
        throw new java.io.IOException(te);
11613
      }
11614
    }
11615
 
11616
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11617
      try {
11618
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11619
      } catch (org.apache.thrift.TException te) {
11620
        throw new java.io.IOException(te);
11621
      }
11622
    }
11623
 
11624
  }
11625
 
5711 mandeep.dh 11626
  public static class getInventoryAge_args implements org.apache.thrift.TBase<getInventoryAge_args, getInventoryAge_args._Fields>, java.io.Serializable, Cloneable   {
11627
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryAge_args");
11628
 
11629
 
11630
 
11631
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11632
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11633
;
11634
 
11635
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11636
 
11637
      static {
11638
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11639
          byName.put(field.getFieldName(), field);
11640
        }
11641
      }
11642
 
11643
      /**
11644
       * Find the _Fields constant that matches fieldId, or null if its not found.
11645
       */
11646
      public static _Fields findByThriftId(int fieldId) {
11647
        switch(fieldId) {
11648
          default:
11649
            return null;
11650
        }
11651
      }
11652
 
11653
      /**
11654
       * Find the _Fields constant that matches fieldId, throwing an exception
11655
       * if it is not found.
11656
       */
11657
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11658
        _Fields fields = findByThriftId(fieldId);
11659
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11660
        return fields;
11661
      }
11662
 
11663
      /**
11664
       * Find the _Fields constant that matches name, or null if its not found.
11665
       */
11666
      public static _Fields findByName(String name) {
11667
        return byName.get(name);
11668
      }
11669
 
11670
      private final short _thriftId;
11671
      private final String _fieldName;
11672
 
11673
      _Fields(short thriftId, String fieldName) {
11674
        _thriftId = thriftId;
11675
        _fieldName = fieldName;
11676
      }
11677
 
11678
      public short getThriftFieldId() {
11679
        return _thriftId;
11680
      }
11681
 
11682
      public String getFieldName() {
11683
        return _fieldName;
11684
      }
11685
    }
11686
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11687
    static {
11688
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11689
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11690
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryAge_args.class, metaDataMap);
11691
    }
11692
 
11693
    public getInventoryAge_args() {
11694
    }
11695
 
11696
    /**
11697
     * Performs a deep copy on <i>other</i>.
11698
     */
11699
    public getInventoryAge_args(getInventoryAge_args other) {
11700
    }
11701
 
11702
    public getInventoryAge_args deepCopy() {
11703
      return new getInventoryAge_args(this);
11704
    }
11705
 
11706
    @Override
11707
    public void clear() {
11708
    }
11709
 
11710
    public void setFieldValue(_Fields field, Object value) {
11711
      switch (field) {
11712
      }
11713
    }
11714
 
11715
    public Object getFieldValue(_Fields field) {
11716
      switch (field) {
11717
      }
11718
      throw new IllegalStateException();
11719
    }
11720
 
11721
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11722
    public boolean isSet(_Fields field) {
11723
      if (field == null) {
11724
        throw new IllegalArgumentException();
11725
      }
11726
 
11727
      switch (field) {
11728
      }
11729
      throw new IllegalStateException();
11730
    }
11731
 
11732
    @Override
11733
    public boolean equals(Object that) {
11734
      if (that == null)
11735
        return false;
11736
      if (that instanceof getInventoryAge_args)
11737
        return this.equals((getInventoryAge_args)that);
11738
      return false;
11739
    }
11740
 
11741
    public boolean equals(getInventoryAge_args that) {
11742
      if (that == null)
11743
        return false;
11744
 
11745
      return true;
11746
    }
11747
 
11748
    @Override
11749
    public int hashCode() {
11750
      return 0;
11751
    }
11752
 
11753
    public int compareTo(getInventoryAge_args other) {
11754
      if (!getClass().equals(other.getClass())) {
11755
        return getClass().getName().compareTo(other.getClass().getName());
11756
      }
11757
 
11758
      int lastComparison = 0;
11759
      getInventoryAge_args typedOther = (getInventoryAge_args)other;
11760
 
11761
      return 0;
11762
    }
11763
 
11764
    public _Fields fieldForId(int fieldId) {
11765
      return _Fields.findByThriftId(fieldId);
11766
    }
11767
 
11768
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11769
      org.apache.thrift.protocol.TField field;
11770
      iprot.readStructBegin();
11771
      while (true)
11772
      {
11773
        field = iprot.readFieldBegin();
11774
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11775
          break;
11776
        }
11777
        switch (field.id) {
11778
          default:
11779
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11780
        }
11781
        iprot.readFieldEnd();
11782
      }
11783
      iprot.readStructEnd();
11784
      validate();
11785
    }
11786
 
11787
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11788
      validate();
11789
 
11790
      oprot.writeStructBegin(STRUCT_DESC);
11791
      oprot.writeFieldStop();
11792
      oprot.writeStructEnd();
11793
    }
11794
 
11795
    @Override
11796
    public String toString() {
11797
      StringBuilder sb = new StringBuilder("getInventoryAge_args(");
11798
      boolean first = true;
11799
 
11800
      sb.append(")");
11801
      return sb.toString();
11802
    }
11803
 
11804
    public void validate() throws org.apache.thrift.TException {
11805
      // check for required fields
11806
    }
11807
 
11808
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11809
      try {
11810
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11811
      } catch (org.apache.thrift.TException te) {
11812
        throw new java.io.IOException(te);
11813
      }
11814
    }
11815
 
11816
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11817
      try {
11818
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11819
      } catch (org.apache.thrift.TException te) {
11820
        throw new java.io.IOException(te);
11821
      }
11822
    }
11823
 
11824
  }
11825
 
11826
  public static class getInventoryAge_result implements org.apache.thrift.TBase<getInventoryAge_result, getInventoryAge_result._Fields>, java.io.Serializable, Cloneable   {
11827
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryAge_result");
11828
 
11829
    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);
11830
 
11831
    private List<InventoryAge> success; // required
11832
 
11833
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11834
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11835
      SUCCESS((short)0, "success");
11836
 
11837
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11838
 
11839
      static {
11840
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11841
          byName.put(field.getFieldName(), field);
11842
        }
11843
      }
11844
 
11845
      /**
11846
       * Find the _Fields constant that matches fieldId, or null if its not found.
11847
       */
11848
      public static _Fields findByThriftId(int fieldId) {
11849
        switch(fieldId) {
11850
          case 0: // SUCCESS
11851
            return SUCCESS;
11852
          default:
11853
            return null;
11854
        }
11855
      }
11856
 
11857
      /**
11858
       * Find the _Fields constant that matches fieldId, throwing an exception
11859
       * if it is not found.
11860
       */
11861
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11862
        _Fields fields = findByThriftId(fieldId);
11863
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11864
        return fields;
11865
      }
11866
 
11867
      /**
11868
       * Find the _Fields constant that matches name, or null if its not found.
11869
       */
11870
      public static _Fields findByName(String name) {
11871
        return byName.get(name);
11872
      }
11873
 
11874
      private final short _thriftId;
11875
      private final String _fieldName;
11876
 
11877
      _Fields(short thriftId, String fieldName) {
11878
        _thriftId = thriftId;
11879
        _fieldName = fieldName;
11880
      }
11881
 
11882
      public short getThriftFieldId() {
11883
        return _thriftId;
11884
      }
11885
 
11886
      public String getFieldName() {
11887
        return _fieldName;
11888
      }
11889
    }
11890
 
11891
    // isset id assignments
11892
 
11893
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11894
    static {
11895
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11896
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11897
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
11898
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryAge.class))));
11899
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11900
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryAge_result.class, metaDataMap);
11901
    }
11902
 
11903
    public getInventoryAge_result() {
11904
    }
11905
 
11906
    public getInventoryAge_result(
11907
      List<InventoryAge> success)
11908
    {
11909
      this();
11910
      this.success = success;
11911
    }
11912
 
11913
    /**
11914
     * Performs a deep copy on <i>other</i>.
11915
     */
11916
    public getInventoryAge_result(getInventoryAge_result other) {
11917
      if (other.isSetSuccess()) {
11918
        List<InventoryAge> __this__success = new ArrayList<InventoryAge>();
11919
        for (InventoryAge other_element : other.success) {
11920
          __this__success.add(new InventoryAge(other_element));
11921
        }
11922
        this.success = __this__success;
11923
      }
11924
    }
11925
 
11926
    public getInventoryAge_result deepCopy() {
11927
      return new getInventoryAge_result(this);
11928
    }
11929
 
11930
    @Override
11931
    public void clear() {
11932
      this.success = null;
11933
    }
11934
 
11935
    public int getSuccessSize() {
11936
      return (this.success == null) ? 0 : this.success.size();
11937
    }
11938
 
11939
    public java.util.Iterator<InventoryAge> getSuccessIterator() {
11940
      return (this.success == null) ? null : this.success.iterator();
11941
    }
11942
 
11943
    public void addToSuccess(InventoryAge elem) {
11944
      if (this.success == null) {
11945
        this.success = new ArrayList<InventoryAge>();
11946
      }
11947
      this.success.add(elem);
11948
    }
11949
 
11950
    public List<InventoryAge> getSuccess() {
11951
      return this.success;
11952
    }
11953
 
11954
    public void setSuccess(List<InventoryAge> success) {
11955
      this.success = success;
11956
    }
11957
 
11958
    public void unsetSuccess() {
11959
      this.success = null;
11960
    }
11961
 
11962
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
11963
    public boolean isSetSuccess() {
11964
      return this.success != null;
11965
    }
11966
 
11967
    public void setSuccessIsSet(boolean value) {
11968
      if (!value) {
11969
        this.success = null;
11970
      }
11971
    }
11972
 
11973
    public void setFieldValue(_Fields field, Object value) {
11974
      switch (field) {
11975
      case SUCCESS:
11976
        if (value == null) {
11977
          unsetSuccess();
11978
        } else {
11979
          setSuccess((List<InventoryAge>)value);
11980
        }
11981
        break;
11982
 
11983
      }
11984
    }
11985
 
11986
    public Object getFieldValue(_Fields field) {
11987
      switch (field) {
11988
      case SUCCESS:
11989
        return getSuccess();
11990
 
11991
      }
11992
      throw new IllegalStateException();
11993
    }
11994
 
11995
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11996
    public boolean isSet(_Fields field) {
11997
      if (field == null) {
11998
        throw new IllegalArgumentException();
11999
      }
12000
 
12001
      switch (field) {
12002
      case SUCCESS:
12003
        return isSetSuccess();
12004
      }
12005
      throw new IllegalStateException();
12006
    }
12007
 
12008
    @Override
12009
    public boolean equals(Object that) {
12010
      if (that == null)
12011
        return false;
12012
      if (that instanceof getInventoryAge_result)
12013
        return this.equals((getInventoryAge_result)that);
12014
      return false;
12015
    }
12016
 
12017
    public boolean equals(getInventoryAge_result that) {
12018
      if (that == null)
12019
        return false;
12020
 
12021
      boolean this_present_success = true && this.isSetSuccess();
12022
      boolean that_present_success = true && that.isSetSuccess();
12023
      if (this_present_success || that_present_success) {
12024
        if (!(this_present_success && that_present_success))
12025
          return false;
12026
        if (!this.success.equals(that.success))
12027
          return false;
12028
      }
12029
 
12030
      return true;
12031
    }
12032
 
12033
    @Override
12034
    public int hashCode() {
12035
      return 0;
12036
    }
12037
 
12038
    public int compareTo(getInventoryAge_result other) {
12039
      if (!getClass().equals(other.getClass())) {
12040
        return getClass().getName().compareTo(other.getClass().getName());
12041
      }
12042
 
12043
      int lastComparison = 0;
12044
      getInventoryAge_result typedOther = (getInventoryAge_result)other;
12045
 
12046
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
12047
      if (lastComparison != 0) {
12048
        return lastComparison;
12049
      }
12050
      if (isSetSuccess()) {
12051
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
12052
        if (lastComparison != 0) {
12053
          return lastComparison;
12054
        }
12055
      }
12056
      return 0;
12057
    }
12058
 
12059
    public _Fields fieldForId(int fieldId) {
12060
      return _Fields.findByThriftId(fieldId);
12061
    }
12062
 
12063
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12064
      org.apache.thrift.protocol.TField field;
12065
      iprot.readStructBegin();
12066
      while (true)
12067
      {
12068
        field = iprot.readFieldBegin();
12069
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12070
          break;
12071
        }
12072
        switch (field.id) {
12073
          case 0: // SUCCESS
12074
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
12075
              {
12076
                org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
12077
                this.success = new ArrayList<InventoryAge>(_list20.size);
12078
                for (int _i21 = 0; _i21 < _list20.size; ++_i21)
12079
                {
12080
                  InventoryAge _elem22; // required
12081
                  _elem22 = new InventoryAge();
12082
                  _elem22.read(iprot);
12083
                  this.success.add(_elem22);
12084
                }
12085
                iprot.readListEnd();
12086
              }
12087
            } else { 
12088
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12089
            }
12090
            break;
12091
          default:
12092
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12093
        }
12094
        iprot.readFieldEnd();
12095
      }
12096
      iprot.readStructEnd();
12097
      validate();
12098
    }
12099
 
12100
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12101
      oprot.writeStructBegin(STRUCT_DESC);
12102
 
12103
      if (this.isSetSuccess()) {
12104
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12105
        {
12106
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
12107
          for (InventoryAge _iter23 : this.success)
12108
          {
12109
            _iter23.write(oprot);
12110
          }
12111
          oprot.writeListEnd();
12112
        }
12113
        oprot.writeFieldEnd();
12114
      }
12115
      oprot.writeFieldStop();
12116
      oprot.writeStructEnd();
12117
    }
12118
 
12119
    @Override
12120
    public String toString() {
12121
      StringBuilder sb = new StringBuilder("getInventoryAge_result(");
12122
      boolean first = true;
12123
 
12124
      sb.append("success:");
12125
      if (this.success == null) {
12126
        sb.append("null");
12127
      } else {
12128
        sb.append(this.success);
12129
      }
12130
      first = false;
12131
      sb.append(")");
12132
      return sb.toString();
12133
    }
12134
 
12135
    public void validate() throws org.apache.thrift.TException {
12136
      // check for required fields
12137
    }
12138
 
12139
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12140
      try {
12141
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12142
      } catch (org.apache.thrift.TException te) {
12143
        throw new java.io.IOException(te);
12144
      }
12145
    }
12146
 
12147
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12148
      try {
12149
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12150
      } catch (org.apache.thrift.TException te) {
12151
        throw new java.io.IOException(te);
12152
      }
12153
    }
12154
 
12155
  }
12156
 
6322 amar.kumar 12157
  public static class getInventoryScansForItem_args implements org.apache.thrift.TBase<getInventoryScansForItem_args, getInventoryScansForItem_args._Fields>, java.io.Serializable, Cloneable   {
12158
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryScansForItem_args");
12159
 
12160
    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);
12161
    private static final org.apache.thrift.protocol.TField FROM_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("fromDate", org.apache.thrift.protocol.TType.I64, (short)2);
12162
    private static final org.apache.thrift.protocol.TField TO_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("toDate", org.apache.thrift.protocol.TType.I64, (short)3);
12163
 
12164
    private long itemId; // required
12165
    private long fromDate; // required
12166
    private long toDate; // required
12167
 
12168
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12169
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12170
      ITEM_ID((short)1, "itemId"),
12171
      FROM_DATE((short)2, "fromDate"),
12172
      TO_DATE((short)3, "toDate");
12173
 
12174
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12175
 
12176
      static {
12177
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12178
          byName.put(field.getFieldName(), field);
12179
        }
12180
      }
12181
 
12182
      /**
12183
       * Find the _Fields constant that matches fieldId, or null if its not found.
12184
       */
12185
      public static _Fields findByThriftId(int fieldId) {
12186
        switch(fieldId) {
12187
          case 1: // ITEM_ID
12188
            return ITEM_ID;
12189
          case 2: // FROM_DATE
12190
            return FROM_DATE;
12191
          case 3: // TO_DATE
12192
            return TO_DATE;
12193
          default:
12194
            return null;
12195
        }
12196
      }
12197
 
12198
      /**
12199
       * Find the _Fields constant that matches fieldId, throwing an exception
12200
       * if it is not found.
12201
       */
12202
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12203
        _Fields fields = findByThriftId(fieldId);
12204
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12205
        return fields;
12206
      }
12207
 
12208
      /**
12209
       * Find the _Fields constant that matches name, or null if its not found.
12210
       */
12211
      public static _Fields findByName(String name) {
12212
        return byName.get(name);
12213
      }
12214
 
12215
      private final short _thriftId;
12216
      private final String _fieldName;
12217
 
12218
      _Fields(short thriftId, String fieldName) {
12219
        _thriftId = thriftId;
12220
        _fieldName = fieldName;
12221
      }
12222
 
12223
      public short getThriftFieldId() {
12224
        return _thriftId;
12225
      }
12226
 
12227
      public String getFieldName() {
12228
        return _fieldName;
12229
      }
12230
    }
12231
 
12232
    // isset id assignments
12233
    private static final int __ITEMID_ISSET_ID = 0;
12234
    private static final int __FROMDATE_ISSET_ID = 1;
12235
    private static final int __TODATE_ISSET_ID = 2;
12236
    private BitSet __isset_bit_vector = new BitSet(3);
12237
 
12238
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12239
    static {
12240
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12241
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12242
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12243
      tmpMap.put(_Fields.FROM_DATE, new org.apache.thrift.meta_data.FieldMetaData("fromDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12244
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12245
      tmpMap.put(_Fields.TO_DATE, new org.apache.thrift.meta_data.FieldMetaData("toDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12246
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12247
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12248
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryScansForItem_args.class, metaDataMap);
12249
    }
12250
 
12251
    public getInventoryScansForItem_args() {
12252
    }
12253
 
12254
    public getInventoryScansForItem_args(
12255
      long itemId,
12256
      long fromDate,
12257
      long toDate)
12258
    {
12259
      this();
12260
      this.itemId = itemId;
12261
      setItemIdIsSet(true);
12262
      this.fromDate = fromDate;
12263
      setFromDateIsSet(true);
12264
      this.toDate = toDate;
12265
      setToDateIsSet(true);
12266
    }
12267
 
12268
    /**
12269
     * Performs a deep copy on <i>other</i>.
12270
     */
12271
    public getInventoryScansForItem_args(getInventoryScansForItem_args other) {
12272
      __isset_bit_vector.clear();
12273
      __isset_bit_vector.or(other.__isset_bit_vector);
12274
      this.itemId = other.itemId;
12275
      this.fromDate = other.fromDate;
12276
      this.toDate = other.toDate;
12277
    }
12278
 
12279
    public getInventoryScansForItem_args deepCopy() {
12280
      return new getInventoryScansForItem_args(this);
12281
    }
12282
 
12283
    @Override
12284
    public void clear() {
12285
      setItemIdIsSet(false);
12286
      this.itemId = 0;
12287
      setFromDateIsSet(false);
12288
      this.fromDate = 0;
12289
      setToDateIsSet(false);
12290
      this.toDate = 0;
12291
    }
12292
 
12293
    public long getItemId() {
12294
      return this.itemId;
12295
    }
12296
 
12297
    public void setItemId(long itemId) {
12298
      this.itemId = itemId;
12299
      setItemIdIsSet(true);
12300
    }
12301
 
12302
    public void unsetItemId() {
12303
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
12304
    }
12305
 
12306
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
12307
    public boolean isSetItemId() {
12308
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
12309
    }
12310
 
12311
    public void setItemIdIsSet(boolean value) {
12312
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
12313
    }
12314
 
12315
    public long getFromDate() {
12316
      return this.fromDate;
12317
    }
12318
 
12319
    public void setFromDate(long fromDate) {
12320
      this.fromDate = fromDate;
12321
      setFromDateIsSet(true);
12322
    }
12323
 
12324
    public void unsetFromDate() {
12325
      __isset_bit_vector.clear(__FROMDATE_ISSET_ID);
12326
    }
12327
 
12328
    /** Returns true if field fromDate is set (has been assigned a value) and false otherwise */
12329
    public boolean isSetFromDate() {
12330
      return __isset_bit_vector.get(__FROMDATE_ISSET_ID);
12331
    }
12332
 
12333
    public void setFromDateIsSet(boolean value) {
12334
      __isset_bit_vector.set(__FROMDATE_ISSET_ID, value);
12335
    }
12336
 
12337
    public long getToDate() {
12338
      return this.toDate;
12339
    }
12340
 
12341
    public void setToDate(long toDate) {
12342
      this.toDate = toDate;
12343
      setToDateIsSet(true);
12344
    }
12345
 
12346
    public void unsetToDate() {
12347
      __isset_bit_vector.clear(__TODATE_ISSET_ID);
12348
    }
12349
 
12350
    /** Returns true if field toDate is set (has been assigned a value) and false otherwise */
12351
    public boolean isSetToDate() {
12352
      return __isset_bit_vector.get(__TODATE_ISSET_ID);
12353
    }
12354
 
12355
    public void setToDateIsSet(boolean value) {
12356
      __isset_bit_vector.set(__TODATE_ISSET_ID, value);
12357
    }
12358
 
12359
    public void setFieldValue(_Fields field, Object value) {
12360
      switch (field) {
12361
      case ITEM_ID:
12362
        if (value == null) {
12363
          unsetItemId();
12364
        } else {
12365
          setItemId((Long)value);
12366
        }
12367
        break;
12368
 
12369
      case FROM_DATE:
12370
        if (value == null) {
12371
          unsetFromDate();
12372
        } else {
12373
          setFromDate((Long)value);
12374
        }
12375
        break;
12376
 
12377
      case TO_DATE:
12378
        if (value == null) {
12379
          unsetToDate();
12380
        } else {
12381
          setToDate((Long)value);
12382
        }
12383
        break;
12384
 
12385
      }
12386
    }
12387
 
12388
    public Object getFieldValue(_Fields field) {
12389
      switch (field) {
12390
      case ITEM_ID:
12391
        return Long.valueOf(getItemId());
12392
 
12393
      case FROM_DATE:
12394
        return Long.valueOf(getFromDate());
12395
 
12396
      case TO_DATE:
12397
        return Long.valueOf(getToDate());
12398
 
12399
      }
12400
      throw new IllegalStateException();
12401
    }
12402
 
12403
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12404
    public boolean isSet(_Fields field) {
12405
      if (field == null) {
12406
        throw new IllegalArgumentException();
12407
      }
12408
 
12409
      switch (field) {
12410
      case ITEM_ID:
12411
        return isSetItemId();
12412
      case FROM_DATE:
12413
        return isSetFromDate();
12414
      case TO_DATE:
12415
        return isSetToDate();
12416
      }
12417
      throw new IllegalStateException();
12418
    }
12419
 
12420
    @Override
12421
    public boolean equals(Object that) {
12422
      if (that == null)
12423
        return false;
12424
      if (that instanceof getInventoryScansForItem_args)
12425
        return this.equals((getInventoryScansForItem_args)that);
12426
      return false;
12427
    }
12428
 
12429
    public boolean equals(getInventoryScansForItem_args that) {
12430
      if (that == null)
12431
        return false;
12432
 
12433
      boolean this_present_itemId = true;
12434
      boolean that_present_itemId = true;
12435
      if (this_present_itemId || that_present_itemId) {
12436
        if (!(this_present_itemId && that_present_itemId))
12437
          return false;
12438
        if (this.itemId != that.itemId)
12439
          return false;
12440
      }
12441
 
12442
      boolean this_present_fromDate = true;
12443
      boolean that_present_fromDate = true;
12444
      if (this_present_fromDate || that_present_fromDate) {
12445
        if (!(this_present_fromDate && that_present_fromDate))
12446
          return false;
12447
        if (this.fromDate != that.fromDate)
12448
          return false;
12449
      }
12450
 
12451
      boolean this_present_toDate = true;
12452
      boolean that_present_toDate = true;
12453
      if (this_present_toDate || that_present_toDate) {
12454
        if (!(this_present_toDate && that_present_toDate))
12455
          return false;
12456
        if (this.toDate != that.toDate)
12457
          return false;
12458
      }
12459
 
12460
      return true;
12461
    }
12462
 
12463
    @Override
12464
    public int hashCode() {
12465
      return 0;
12466
    }
12467
 
12468
    public int compareTo(getInventoryScansForItem_args other) {
12469
      if (!getClass().equals(other.getClass())) {
12470
        return getClass().getName().compareTo(other.getClass().getName());
12471
      }
12472
 
12473
      int lastComparison = 0;
12474
      getInventoryScansForItem_args typedOther = (getInventoryScansForItem_args)other;
12475
 
12476
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
12477
      if (lastComparison != 0) {
12478
        return lastComparison;
12479
      }
12480
      if (isSetItemId()) {
12481
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
12482
        if (lastComparison != 0) {
12483
          return lastComparison;
12484
        }
12485
      }
12486
      lastComparison = Boolean.valueOf(isSetFromDate()).compareTo(typedOther.isSetFromDate());
12487
      if (lastComparison != 0) {
12488
        return lastComparison;
12489
      }
12490
      if (isSetFromDate()) {
12491
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fromDate, typedOther.fromDate);
12492
        if (lastComparison != 0) {
12493
          return lastComparison;
12494
        }
12495
      }
12496
      lastComparison = Boolean.valueOf(isSetToDate()).compareTo(typedOther.isSetToDate());
12497
      if (lastComparison != 0) {
12498
        return lastComparison;
12499
      }
12500
      if (isSetToDate()) {
12501
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.toDate, typedOther.toDate);
12502
        if (lastComparison != 0) {
12503
          return lastComparison;
12504
        }
12505
      }
12506
      return 0;
12507
    }
12508
 
12509
    public _Fields fieldForId(int fieldId) {
12510
      return _Fields.findByThriftId(fieldId);
12511
    }
12512
 
12513
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12514
      org.apache.thrift.protocol.TField field;
12515
      iprot.readStructBegin();
12516
      while (true)
12517
      {
12518
        field = iprot.readFieldBegin();
12519
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12520
          break;
12521
        }
12522
        switch (field.id) {
12523
          case 1: // ITEM_ID
12524
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12525
              this.itemId = iprot.readI64();
12526
              setItemIdIsSet(true);
12527
            } else { 
12528
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12529
            }
12530
            break;
12531
          case 2: // FROM_DATE
12532
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12533
              this.fromDate = iprot.readI64();
12534
              setFromDateIsSet(true);
12535
            } else { 
12536
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12537
            }
12538
            break;
12539
          case 3: // TO_DATE
12540
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12541
              this.toDate = iprot.readI64();
12542
              setToDateIsSet(true);
12543
            } else { 
12544
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12545
            }
12546
            break;
12547
          default:
12548
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12549
        }
12550
        iprot.readFieldEnd();
12551
      }
12552
      iprot.readStructEnd();
12553
      validate();
12554
    }
12555
 
12556
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12557
      validate();
12558
 
12559
      oprot.writeStructBegin(STRUCT_DESC);
12560
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
12561
      oprot.writeI64(this.itemId);
12562
      oprot.writeFieldEnd();
12563
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
12564
      oprot.writeI64(this.fromDate);
12565
      oprot.writeFieldEnd();
12566
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
12567
      oprot.writeI64(this.toDate);
12568
      oprot.writeFieldEnd();
12569
      oprot.writeFieldStop();
12570
      oprot.writeStructEnd();
12571
    }
12572
 
12573
    @Override
12574
    public String toString() {
12575
      StringBuilder sb = new StringBuilder("getInventoryScansForItem_args(");
12576
      boolean first = true;
12577
 
12578
      sb.append("itemId:");
12579
      sb.append(this.itemId);
12580
      first = false;
12581
      if (!first) sb.append(", ");
12582
      sb.append("fromDate:");
12583
      sb.append(this.fromDate);
12584
      first = false;
12585
      if (!first) sb.append(", ");
12586
      sb.append("toDate:");
12587
      sb.append(this.toDate);
12588
      first = false;
12589
      sb.append(")");
12590
      return sb.toString();
12591
    }
12592
 
12593
    public void validate() throws org.apache.thrift.TException {
12594
      // check for required fields
12595
    }
12596
 
12597
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12598
      try {
12599
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12600
      } catch (org.apache.thrift.TException te) {
12601
        throw new java.io.IOException(te);
12602
      }
12603
    }
12604
 
12605
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12606
      try {
12607
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12608
      } catch (org.apache.thrift.TException te) {
12609
        throw new java.io.IOException(te);
12610
      }
12611
    }
12612
 
12613
  }
12614
 
12615
  public static class getInventoryScansForItem_result implements org.apache.thrift.TBase<getInventoryScansForItem_result, getInventoryScansForItem_result._Fields>, java.io.Serializable, Cloneable   {
12616
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryScansForItem_result");
12617
 
12618
    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);
12619
 
12620
    private List<Scan> success; // required
12621
 
12622
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12623
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12624
      SUCCESS((short)0, "success");
12625
 
12626
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12627
 
12628
      static {
12629
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12630
          byName.put(field.getFieldName(), field);
12631
        }
12632
      }
12633
 
12634
      /**
12635
       * Find the _Fields constant that matches fieldId, or null if its not found.
12636
       */
12637
      public static _Fields findByThriftId(int fieldId) {
12638
        switch(fieldId) {
12639
          case 0: // SUCCESS
12640
            return SUCCESS;
12641
          default:
12642
            return null;
12643
        }
12644
      }
12645
 
12646
      /**
12647
       * Find the _Fields constant that matches fieldId, throwing an exception
12648
       * if it is not found.
12649
       */
12650
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12651
        _Fields fields = findByThriftId(fieldId);
12652
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12653
        return fields;
12654
      }
12655
 
12656
      /**
12657
       * Find the _Fields constant that matches name, or null if its not found.
12658
       */
12659
      public static _Fields findByName(String name) {
12660
        return byName.get(name);
12661
      }
12662
 
12663
      private final short _thriftId;
12664
      private final String _fieldName;
12665
 
12666
      _Fields(short thriftId, String fieldName) {
12667
        _thriftId = thriftId;
12668
        _fieldName = fieldName;
12669
      }
12670
 
12671
      public short getThriftFieldId() {
12672
        return _thriftId;
12673
      }
12674
 
12675
      public String getFieldName() {
12676
        return _fieldName;
12677
      }
12678
    }
12679
 
12680
    // isset id assignments
12681
 
12682
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12683
    static {
12684
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12685
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12686
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
12687
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Scan.class))));
12688
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12689
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryScansForItem_result.class, metaDataMap);
12690
    }
12691
 
12692
    public getInventoryScansForItem_result() {
12693
    }
12694
 
12695
    public getInventoryScansForItem_result(
12696
      List<Scan> success)
12697
    {
12698
      this();
12699
      this.success = success;
12700
    }
12701
 
12702
    /**
12703
     * Performs a deep copy on <i>other</i>.
12704
     */
12705
    public getInventoryScansForItem_result(getInventoryScansForItem_result other) {
12706
      if (other.isSetSuccess()) {
12707
        List<Scan> __this__success = new ArrayList<Scan>();
12708
        for (Scan other_element : other.success) {
12709
          __this__success.add(new Scan(other_element));
12710
        }
12711
        this.success = __this__success;
12712
      }
12713
    }
12714
 
12715
    public getInventoryScansForItem_result deepCopy() {
12716
      return new getInventoryScansForItem_result(this);
12717
    }
12718
 
12719
    @Override
12720
    public void clear() {
12721
      this.success = null;
12722
    }
12723
 
12724
    public int getSuccessSize() {
12725
      return (this.success == null) ? 0 : this.success.size();
12726
    }
12727
 
12728
    public java.util.Iterator<Scan> getSuccessIterator() {
12729
      return (this.success == null) ? null : this.success.iterator();
12730
    }
12731
 
12732
    public void addToSuccess(Scan elem) {
12733
      if (this.success == null) {
12734
        this.success = new ArrayList<Scan>();
12735
      }
12736
      this.success.add(elem);
12737
    }
12738
 
12739
    public List<Scan> getSuccess() {
12740
      return this.success;
12741
    }
12742
 
12743
    public void setSuccess(List<Scan> success) {
12744
      this.success = success;
12745
    }
12746
 
12747
    public void unsetSuccess() {
12748
      this.success = null;
12749
    }
12750
 
12751
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
12752
    public boolean isSetSuccess() {
12753
      return this.success != null;
12754
    }
12755
 
12756
    public void setSuccessIsSet(boolean value) {
12757
      if (!value) {
12758
        this.success = null;
12759
      }
12760
    }
12761
 
12762
    public void setFieldValue(_Fields field, Object value) {
12763
      switch (field) {
12764
      case SUCCESS:
12765
        if (value == null) {
12766
          unsetSuccess();
12767
        } else {
12768
          setSuccess((List<Scan>)value);
12769
        }
12770
        break;
12771
 
12772
      }
12773
    }
12774
 
12775
    public Object getFieldValue(_Fields field) {
12776
      switch (field) {
12777
      case SUCCESS:
12778
        return getSuccess();
12779
 
12780
      }
12781
      throw new IllegalStateException();
12782
    }
12783
 
12784
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12785
    public boolean isSet(_Fields field) {
12786
      if (field == null) {
12787
        throw new IllegalArgumentException();
12788
      }
12789
 
12790
      switch (field) {
12791
      case SUCCESS:
12792
        return isSetSuccess();
12793
      }
12794
      throw new IllegalStateException();
12795
    }
12796
 
12797
    @Override
12798
    public boolean equals(Object that) {
12799
      if (that == null)
12800
        return false;
12801
      if (that instanceof getInventoryScansForItem_result)
12802
        return this.equals((getInventoryScansForItem_result)that);
12803
      return false;
12804
    }
12805
 
12806
    public boolean equals(getInventoryScansForItem_result that) {
12807
      if (that == null)
12808
        return false;
12809
 
12810
      boolean this_present_success = true && this.isSetSuccess();
12811
      boolean that_present_success = true && that.isSetSuccess();
12812
      if (this_present_success || that_present_success) {
12813
        if (!(this_present_success && that_present_success))
12814
          return false;
12815
        if (!this.success.equals(that.success))
12816
          return false;
12817
      }
12818
 
12819
      return true;
12820
    }
12821
 
12822
    @Override
12823
    public int hashCode() {
12824
      return 0;
12825
    }
12826
 
12827
    public int compareTo(getInventoryScansForItem_result other) {
12828
      if (!getClass().equals(other.getClass())) {
12829
        return getClass().getName().compareTo(other.getClass().getName());
12830
      }
12831
 
12832
      int lastComparison = 0;
12833
      getInventoryScansForItem_result typedOther = (getInventoryScansForItem_result)other;
12834
 
12835
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
12836
      if (lastComparison != 0) {
12837
        return lastComparison;
12838
      }
12839
      if (isSetSuccess()) {
12840
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
12841
        if (lastComparison != 0) {
12842
          return lastComparison;
12843
        }
12844
      }
12845
      return 0;
12846
    }
12847
 
12848
    public _Fields fieldForId(int fieldId) {
12849
      return _Fields.findByThriftId(fieldId);
12850
    }
12851
 
12852
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12853
      org.apache.thrift.protocol.TField field;
12854
      iprot.readStructBegin();
12855
      while (true)
12856
      {
12857
        field = iprot.readFieldBegin();
12858
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12859
          break;
12860
        }
12861
        switch (field.id) {
12862
          case 0: // SUCCESS
12863
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
12864
              {
12865
                org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
12866
                this.success = new ArrayList<Scan>(_list24.size);
12867
                for (int _i25 = 0; _i25 < _list24.size; ++_i25)
12868
                {
12869
                  Scan _elem26; // required
12870
                  _elem26 = new Scan();
12871
                  _elem26.read(iprot);
12872
                  this.success.add(_elem26);
12873
                }
12874
                iprot.readListEnd();
12875
              }
12876
            } else { 
12877
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12878
            }
12879
            break;
12880
          default:
12881
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12882
        }
12883
        iprot.readFieldEnd();
12884
      }
12885
      iprot.readStructEnd();
12886
      validate();
12887
    }
12888
 
12889
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12890
      oprot.writeStructBegin(STRUCT_DESC);
12891
 
12892
      if (this.isSetSuccess()) {
12893
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12894
        {
12895
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
12896
          for (Scan _iter27 : this.success)
12897
          {
12898
            _iter27.write(oprot);
12899
          }
12900
          oprot.writeListEnd();
12901
        }
12902
        oprot.writeFieldEnd();
12903
      }
12904
      oprot.writeFieldStop();
12905
      oprot.writeStructEnd();
12906
    }
12907
 
12908
    @Override
12909
    public String toString() {
12910
      StringBuilder sb = new StringBuilder("getInventoryScansForItem_result(");
12911
      boolean first = true;
12912
 
12913
      sb.append("success:");
12914
      if (this.success == null) {
12915
        sb.append("null");
12916
      } else {
12917
        sb.append(this.success);
12918
      }
12919
      first = false;
12920
      sb.append(")");
12921
      return sb.toString();
12922
    }
12923
 
12924
    public void validate() throws org.apache.thrift.TException {
12925
      // check for required fields
12926
    }
12927
 
12928
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12929
      try {
12930
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12931
      } catch (org.apache.thrift.TException te) {
12932
        throw new java.io.IOException(te);
12933
      }
12934
    }
12935
 
12936
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12937
      try {
12938
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12939
      } catch (org.apache.thrift.TException te) {
12940
        throw new java.io.IOException(te);
12941
      }
12942
    }
12943
 
12944
  }
12945
 
12946
  public static class getScanRecordsForSerialNumber_args implements org.apache.thrift.TBase<getScanRecordsForSerialNumber_args, getScanRecordsForSerialNumber_args._Fields>, java.io.Serializable, Cloneable   {
12947
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScanRecordsForSerialNumber_args");
12948
 
12949
    private static final org.apache.thrift.protocol.TField SERIAL_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("serialNumber", org.apache.thrift.protocol.TType.I64, (short)1);
12950
 
12951
    private long serialNumber; // required
12952
 
12953
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12954
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12955
      SERIAL_NUMBER((short)1, "serialNumber");
12956
 
12957
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12958
 
12959
      static {
12960
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12961
          byName.put(field.getFieldName(), field);
12962
        }
12963
      }
12964
 
12965
      /**
12966
       * Find the _Fields constant that matches fieldId, or null if its not found.
12967
       */
12968
      public static _Fields findByThriftId(int fieldId) {
12969
        switch(fieldId) {
12970
          case 1: // SERIAL_NUMBER
12971
            return SERIAL_NUMBER;
12972
          default:
12973
            return null;
12974
        }
12975
      }
12976
 
12977
      /**
12978
       * Find the _Fields constant that matches fieldId, throwing an exception
12979
       * if it is not found.
12980
       */
12981
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12982
        _Fields fields = findByThriftId(fieldId);
12983
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12984
        return fields;
12985
      }
12986
 
12987
      /**
12988
       * Find the _Fields constant that matches name, or null if its not found.
12989
       */
12990
      public static _Fields findByName(String name) {
12991
        return byName.get(name);
12992
      }
12993
 
12994
      private final short _thriftId;
12995
      private final String _fieldName;
12996
 
12997
      _Fields(short thriftId, String fieldName) {
12998
        _thriftId = thriftId;
12999
        _fieldName = fieldName;
13000
      }
13001
 
13002
      public short getThriftFieldId() {
13003
        return _thriftId;
13004
      }
13005
 
13006
      public String getFieldName() {
13007
        return _fieldName;
13008
      }
13009
    }
13010
 
13011
    // isset id assignments
13012
    private static final int __SERIALNUMBER_ISSET_ID = 0;
13013
    private BitSet __isset_bit_vector = new BitSet(1);
13014
 
13015
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13016
    static {
13017
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13018
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13019
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13020
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13021
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScanRecordsForSerialNumber_args.class, metaDataMap);
13022
    }
13023
 
13024
    public getScanRecordsForSerialNumber_args() {
13025
    }
13026
 
13027
    public getScanRecordsForSerialNumber_args(
13028
      long serialNumber)
13029
    {
13030
      this();
13031
      this.serialNumber = serialNumber;
13032
      setSerialNumberIsSet(true);
13033
    }
13034
 
13035
    /**
13036
     * Performs a deep copy on <i>other</i>.
13037
     */
13038
    public getScanRecordsForSerialNumber_args(getScanRecordsForSerialNumber_args other) {
13039
      __isset_bit_vector.clear();
13040
      __isset_bit_vector.or(other.__isset_bit_vector);
13041
      this.serialNumber = other.serialNumber;
13042
    }
13043
 
13044
    public getScanRecordsForSerialNumber_args deepCopy() {
13045
      return new getScanRecordsForSerialNumber_args(this);
13046
    }
13047
 
13048
    @Override
13049
    public void clear() {
13050
      setSerialNumberIsSet(false);
13051
      this.serialNumber = 0;
13052
    }
13053
 
13054
    public long getSerialNumber() {
13055
      return this.serialNumber;
13056
    }
13057
 
13058
    public void setSerialNumber(long serialNumber) {
13059
      this.serialNumber = serialNumber;
13060
      setSerialNumberIsSet(true);
13061
    }
13062
 
13063
    public void unsetSerialNumber() {
13064
      __isset_bit_vector.clear(__SERIALNUMBER_ISSET_ID);
13065
    }
13066
 
13067
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
13068
    public boolean isSetSerialNumber() {
13069
      return __isset_bit_vector.get(__SERIALNUMBER_ISSET_ID);
13070
    }
13071
 
13072
    public void setSerialNumberIsSet(boolean value) {
13073
      __isset_bit_vector.set(__SERIALNUMBER_ISSET_ID, value);
13074
    }
13075
 
13076
    public void setFieldValue(_Fields field, Object value) {
13077
      switch (field) {
13078
      case SERIAL_NUMBER:
13079
        if (value == null) {
13080
          unsetSerialNumber();
13081
        } else {
13082
          setSerialNumber((Long)value);
13083
        }
13084
        break;
13085
 
13086
      }
13087
    }
13088
 
13089
    public Object getFieldValue(_Fields field) {
13090
      switch (field) {
13091
      case SERIAL_NUMBER:
13092
        return Long.valueOf(getSerialNumber());
13093
 
13094
      }
13095
      throw new IllegalStateException();
13096
    }
13097
 
13098
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13099
    public boolean isSet(_Fields field) {
13100
      if (field == null) {
13101
        throw new IllegalArgumentException();
13102
      }
13103
 
13104
      switch (field) {
13105
      case SERIAL_NUMBER:
13106
        return isSetSerialNumber();
13107
      }
13108
      throw new IllegalStateException();
13109
    }
13110
 
13111
    @Override
13112
    public boolean equals(Object that) {
13113
      if (that == null)
13114
        return false;
13115
      if (that instanceof getScanRecordsForSerialNumber_args)
13116
        return this.equals((getScanRecordsForSerialNumber_args)that);
13117
      return false;
13118
    }
13119
 
13120
    public boolean equals(getScanRecordsForSerialNumber_args that) {
13121
      if (that == null)
13122
        return false;
13123
 
13124
      boolean this_present_serialNumber = true;
13125
      boolean that_present_serialNumber = true;
13126
      if (this_present_serialNumber || that_present_serialNumber) {
13127
        if (!(this_present_serialNumber && that_present_serialNumber))
13128
          return false;
13129
        if (this.serialNumber != that.serialNumber)
13130
          return false;
13131
      }
13132
 
13133
      return true;
13134
    }
13135
 
13136
    @Override
13137
    public int hashCode() {
13138
      return 0;
13139
    }
13140
 
13141
    public int compareTo(getScanRecordsForSerialNumber_args other) {
13142
      if (!getClass().equals(other.getClass())) {
13143
        return getClass().getName().compareTo(other.getClass().getName());
13144
      }
13145
 
13146
      int lastComparison = 0;
13147
      getScanRecordsForSerialNumber_args typedOther = (getScanRecordsForSerialNumber_args)other;
13148
 
13149
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
13150
      if (lastComparison != 0) {
13151
        return lastComparison;
13152
      }
13153
      if (isSetSerialNumber()) {
13154
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
13155
        if (lastComparison != 0) {
13156
          return lastComparison;
13157
        }
13158
      }
13159
      return 0;
13160
    }
13161
 
13162
    public _Fields fieldForId(int fieldId) {
13163
      return _Fields.findByThriftId(fieldId);
13164
    }
13165
 
13166
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13167
      org.apache.thrift.protocol.TField field;
13168
      iprot.readStructBegin();
13169
      while (true)
13170
      {
13171
        field = iprot.readFieldBegin();
13172
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13173
          break;
13174
        }
13175
        switch (field.id) {
13176
          case 1: // SERIAL_NUMBER
13177
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13178
              this.serialNumber = iprot.readI64();
13179
              setSerialNumberIsSet(true);
13180
            } else { 
13181
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13182
            }
13183
            break;
13184
          default:
13185
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13186
        }
13187
        iprot.readFieldEnd();
13188
      }
13189
      iprot.readStructEnd();
13190
      validate();
13191
    }
13192
 
13193
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13194
      validate();
13195
 
13196
      oprot.writeStructBegin(STRUCT_DESC);
13197
      oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
13198
      oprot.writeI64(this.serialNumber);
13199
      oprot.writeFieldEnd();
13200
      oprot.writeFieldStop();
13201
      oprot.writeStructEnd();
13202
    }
13203
 
13204
    @Override
13205
    public String toString() {
13206
      StringBuilder sb = new StringBuilder("getScanRecordsForSerialNumber_args(");
13207
      boolean first = true;
13208
 
13209
      sb.append("serialNumber:");
13210
      sb.append(this.serialNumber);
13211
      first = false;
13212
      sb.append(")");
13213
      return sb.toString();
13214
    }
13215
 
13216
    public void validate() throws org.apache.thrift.TException {
13217
      // check for required fields
13218
    }
13219
 
13220
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13221
      try {
13222
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13223
      } catch (org.apache.thrift.TException te) {
13224
        throw new java.io.IOException(te);
13225
      }
13226
    }
13227
 
13228
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13229
      try {
13230
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
13231
        __isset_bit_vector = new BitSet(1);
13232
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13233
      } catch (org.apache.thrift.TException te) {
13234
        throw new java.io.IOException(te);
13235
      }
13236
    }
13237
 
13238
  }
13239
 
13240
  public static class getScanRecordsForSerialNumber_result implements org.apache.thrift.TBase<getScanRecordsForSerialNumber_result, getScanRecordsForSerialNumber_result._Fields>, java.io.Serializable, Cloneable   {
13241
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScanRecordsForSerialNumber_result");
13242
 
13243
    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);
13244
 
13245
    private List<Scan> success; // required
13246
 
13247
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13248
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13249
      SUCCESS((short)0, "success");
13250
 
13251
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13252
 
13253
      static {
13254
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13255
          byName.put(field.getFieldName(), field);
13256
        }
13257
      }
13258
 
13259
      /**
13260
       * Find the _Fields constant that matches fieldId, or null if its not found.
13261
       */
13262
      public static _Fields findByThriftId(int fieldId) {
13263
        switch(fieldId) {
13264
          case 0: // SUCCESS
13265
            return SUCCESS;
13266
          default:
13267
            return null;
13268
        }
13269
      }
13270
 
13271
      /**
13272
       * Find the _Fields constant that matches fieldId, throwing an exception
13273
       * if it is not found.
13274
       */
13275
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13276
        _Fields fields = findByThriftId(fieldId);
13277
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13278
        return fields;
13279
      }
13280
 
13281
      /**
13282
       * Find the _Fields constant that matches name, or null if its not found.
13283
       */
13284
      public static _Fields findByName(String name) {
13285
        return byName.get(name);
13286
      }
13287
 
13288
      private final short _thriftId;
13289
      private final String _fieldName;
13290
 
13291
      _Fields(short thriftId, String fieldName) {
13292
        _thriftId = thriftId;
13293
        _fieldName = fieldName;
13294
      }
13295
 
13296
      public short getThriftFieldId() {
13297
        return _thriftId;
13298
      }
13299
 
13300
      public String getFieldName() {
13301
        return _fieldName;
13302
      }
13303
    }
13304
 
13305
    // isset id assignments
13306
 
13307
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13308
    static {
13309
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13310
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13311
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
13312
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Scan.class))));
13313
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13314
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScanRecordsForSerialNumber_result.class, metaDataMap);
13315
    }
13316
 
13317
    public getScanRecordsForSerialNumber_result() {
13318
    }
13319
 
13320
    public getScanRecordsForSerialNumber_result(
13321
      List<Scan> success)
13322
    {
13323
      this();
13324
      this.success = success;
13325
    }
13326
 
13327
    /**
13328
     * Performs a deep copy on <i>other</i>.
13329
     */
13330
    public getScanRecordsForSerialNumber_result(getScanRecordsForSerialNumber_result other) {
13331
      if (other.isSetSuccess()) {
13332
        List<Scan> __this__success = new ArrayList<Scan>();
13333
        for (Scan other_element : other.success) {
13334
          __this__success.add(new Scan(other_element));
13335
        }
13336
        this.success = __this__success;
13337
      }
13338
    }
13339
 
13340
    public getScanRecordsForSerialNumber_result deepCopy() {
13341
      return new getScanRecordsForSerialNumber_result(this);
13342
    }
13343
 
13344
    @Override
13345
    public void clear() {
13346
      this.success = null;
13347
    }
13348
 
13349
    public int getSuccessSize() {
13350
      return (this.success == null) ? 0 : this.success.size();
13351
    }
13352
 
13353
    public java.util.Iterator<Scan> getSuccessIterator() {
13354
      return (this.success == null) ? null : this.success.iterator();
13355
    }
13356
 
13357
    public void addToSuccess(Scan elem) {
13358
      if (this.success == null) {
13359
        this.success = new ArrayList<Scan>();
13360
      }
13361
      this.success.add(elem);
13362
    }
13363
 
13364
    public List<Scan> getSuccess() {
13365
      return this.success;
13366
    }
13367
 
13368
    public void setSuccess(List<Scan> success) {
13369
      this.success = success;
13370
    }
13371
 
13372
    public void unsetSuccess() {
13373
      this.success = null;
13374
    }
13375
 
13376
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
13377
    public boolean isSetSuccess() {
13378
      return this.success != null;
13379
    }
13380
 
13381
    public void setSuccessIsSet(boolean value) {
13382
      if (!value) {
13383
        this.success = null;
13384
      }
13385
    }
13386
 
13387
    public void setFieldValue(_Fields field, Object value) {
13388
      switch (field) {
13389
      case SUCCESS:
13390
        if (value == null) {
13391
          unsetSuccess();
13392
        } else {
13393
          setSuccess((List<Scan>)value);
13394
        }
13395
        break;
13396
 
13397
      }
13398
    }
13399
 
13400
    public Object getFieldValue(_Fields field) {
13401
      switch (field) {
13402
      case SUCCESS:
13403
        return getSuccess();
13404
 
13405
      }
13406
      throw new IllegalStateException();
13407
    }
13408
 
13409
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13410
    public boolean isSet(_Fields field) {
13411
      if (field == null) {
13412
        throw new IllegalArgumentException();
13413
      }
13414
 
13415
      switch (field) {
13416
      case SUCCESS:
13417
        return isSetSuccess();
13418
      }
13419
      throw new IllegalStateException();
13420
    }
13421
 
13422
    @Override
13423
    public boolean equals(Object that) {
13424
      if (that == null)
13425
        return false;
13426
      if (that instanceof getScanRecordsForSerialNumber_result)
13427
        return this.equals((getScanRecordsForSerialNumber_result)that);
13428
      return false;
13429
    }
13430
 
13431
    public boolean equals(getScanRecordsForSerialNumber_result that) {
13432
      if (that == null)
13433
        return false;
13434
 
13435
      boolean this_present_success = true && this.isSetSuccess();
13436
      boolean that_present_success = true && that.isSetSuccess();
13437
      if (this_present_success || that_present_success) {
13438
        if (!(this_present_success && that_present_success))
13439
          return false;
13440
        if (!this.success.equals(that.success))
13441
          return false;
13442
      }
13443
 
13444
      return true;
13445
    }
13446
 
13447
    @Override
13448
    public int hashCode() {
13449
      return 0;
13450
    }
13451
 
13452
    public int compareTo(getScanRecordsForSerialNumber_result other) {
13453
      if (!getClass().equals(other.getClass())) {
13454
        return getClass().getName().compareTo(other.getClass().getName());
13455
      }
13456
 
13457
      int lastComparison = 0;
13458
      getScanRecordsForSerialNumber_result typedOther = (getScanRecordsForSerialNumber_result)other;
13459
 
13460
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
13461
      if (lastComparison != 0) {
13462
        return lastComparison;
13463
      }
13464
      if (isSetSuccess()) {
13465
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
13466
        if (lastComparison != 0) {
13467
          return lastComparison;
13468
        }
13469
      }
13470
      return 0;
13471
    }
13472
 
13473
    public _Fields fieldForId(int fieldId) {
13474
      return _Fields.findByThriftId(fieldId);
13475
    }
13476
 
13477
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13478
      org.apache.thrift.protocol.TField field;
13479
      iprot.readStructBegin();
13480
      while (true)
13481
      {
13482
        field = iprot.readFieldBegin();
13483
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13484
          break;
13485
        }
13486
        switch (field.id) {
13487
          case 0: // SUCCESS
13488
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
13489
              {
13490
                org.apache.thrift.protocol.TList _list28 = iprot.readListBegin();
13491
                this.success = new ArrayList<Scan>(_list28.size);
13492
                for (int _i29 = 0; _i29 < _list28.size; ++_i29)
13493
                {
13494
                  Scan _elem30; // required
13495
                  _elem30 = new Scan();
13496
                  _elem30.read(iprot);
13497
                  this.success.add(_elem30);
13498
                }
13499
                iprot.readListEnd();
13500
              }
13501
            } else { 
13502
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13503
            }
13504
            break;
13505
          default:
13506
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13507
        }
13508
        iprot.readFieldEnd();
13509
      }
13510
      iprot.readStructEnd();
13511
      validate();
13512
    }
13513
 
13514
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13515
      oprot.writeStructBegin(STRUCT_DESC);
13516
 
13517
      if (this.isSetSuccess()) {
13518
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13519
        {
13520
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
13521
          for (Scan _iter31 : this.success)
13522
          {
13523
            _iter31.write(oprot);
13524
          }
13525
          oprot.writeListEnd();
13526
        }
13527
        oprot.writeFieldEnd();
13528
      }
13529
      oprot.writeFieldStop();
13530
      oprot.writeStructEnd();
13531
    }
13532
 
13533
    @Override
13534
    public String toString() {
13535
      StringBuilder sb = new StringBuilder("getScanRecordsForSerialNumber_result(");
13536
      boolean first = true;
13537
 
13538
      sb.append("success:");
13539
      if (this.success == null) {
13540
        sb.append("null");
13541
      } else {
13542
        sb.append(this.success);
13543
      }
13544
      first = false;
13545
      sb.append(")");
13546
      return sb.toString();
13547
    }
13548
 
13549
    public void validate() throws org.apache.thrift.TException {
13550
      // check for required fields
13551
    }
13552
 
13553
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13554
      try {
13555
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13556
      } catch (org.apache.thrift.TException te) {
13557
        throw new java.io.IOException(te);
13558
      }
13559
    }
13560
 
13561
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13562
      try {
13563
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13564
      } catch (org.apache.thrift.TException te) {
13565
        throw new java.io.IOException(te);
13566
      }
13567
    }
13568
 
13569
  }
13570
 
6467 amar.kumar 13571
  public static class scanForPurchaseReturn_args implements org.apache.thrift.TBase<scanForPurchaseReturn_args, scanForPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
13572
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForPurchaseReturn_args");
13573
 
13574
    private static final org.apache.thrift.protocol.TField SALE_RETURN_ITEMS_FIELD_DESC = new org.apache.thrift.protocol.TField("saleReturnItems", org.apache.thrift.protocol.TType.LIST, (short)1);
13575
    private static final org.apache.thrift.protocol.TField VENDOR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("vendorId", org.apache.thrift.protocol.TType.I64, (short)2);
13576
 
13577
    private List<InventoryItem> saleReturnItems; // required
13578
    private long vendorId; // required
13579
 
13580
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13581
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13582
      SALE_RETURN_ITEMS((short)1, "saleReturnItems"),
13583
      VENDOR_ID((short)2, "vendorId");
13584
 
13585
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13586
 
13587
      static {
13588
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13589
          byName.put(field.getFieldName(), field);
13590
        }
13591
      }
13592
 
13593
      /**
13594
       * Find the _Fields constant that matches fieldId, or null if its not found.
13595
       */
13596
      public static _Fields findByThriftId(int fieldId) {
13597
        switch(fieldId) {
13598
          case 1: // SALE_RETURN_ITEMS
13599
            return SALE_RETURN_ITEMS;
13600
          case 2: // VENDOR_ID
13601
            return VENDOR_ID;
13602
          default:
13603
            return null;
13604
        }
13605
      }
13606
 
13607
      /**
13608
       * Find the _Fields constant that matches fieldId, throwing an exception
13609
       * if it is not found.
13610
       */
13611
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13612
        _Fields fields = findByThriftId(fieldId);
13613
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13614
        return fields;
13615
      }
13616
 
13617
      /**
13618
       * Find the _Fields constant that matches name, or null if its not found.
13619
       */
13620
      public static _Fields findByName(String name) {
13621
        return byName.get(name);
13622
      }
13623
 
13624
      private final short _thriftId;
13625
      private final String _fieldName;
13626
 
13627
      _Fields(short thriftId, String fieldName) {
13628
        _thriftId = thriftId;
13629
        _fieldName = fieldName;
13630
      }
13631
 
13632
      public short getThriftFieldId() {
13633
        return _thriftId;
13634
      }
13635
 
13636
      public String getFieldName() {
13637
        return _fieldName;
13638
      }
13639
    }
13640
 
13641
    // isset id assignments
13642
    private static final int __VENDORID_ISSET_ID = 0;
13643
    private BitSet __isset_bit_vector = new BitSet(1);
13644
 
13645
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13646
    static {
13647
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13648
      tmpMap.put(_Fields.SALE_RETURN_ITEMS, new org.apache.thrift.meta_data.FieldMetaData("saleReturnItems", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13649
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
13650
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class))));
13651
      tmpMap.put(_Fields.VENDOR_ID, new org.apache.thrift.meta_data.FieldMetaData("vendorId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13652
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13653
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13654
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForPurchaseReturn_args.class, metaDataMap);
13655
    }
13656
 
13657
    public scanForPurchaseReturn_args() {
13658
    }
13659
 
13660
    public scanForPurchaseReturn_args(
13661
      List<InventoryItem> saleReturnItems,
13662
      long vendorId)
13663
    {
13664
      this();
13665
      this.saleReturnItems = saleReturnItems;
13666
      this.vendorId = vendorId;
13667
      setVendorIdIsSet(true);
13668
    }
13669
 
13670
    /**
13671
     * Performs a deep copy on <i>other</i>.
13672
     */
13673
    public scanForPurchaseReturn_args(scanForPurchaseReturn_args other) {
13674
      __isset_bit_vector.clear();
13675
      __isset_bit_vector.or(other.__isset_bit_vector);
13676
      if (other.isSetSaleReturnItems()) {
13677
        List<InventoryItem> __this__saleReturnItems = new ArrayList<InventoryItem>();
13678
        for (InventoryItem other_element : other.saleReturnItems) {
13679
          __this__saleReturnItems.add(new InventoryItem(other_element));
13680
        }
13681
        this.saleReturnItems = __this__saleReturnItems;
13682
      }
13683
      this.vendorId = other.vendorId;
13684
    }
13685
 
13686
    public scanForPurchaseReturn_args deepCopy() {
13687
      return new scanForPurchaseReturn_args(this);
13688
    }
13689
 
13690
    @Override
13691
    public void clear() {
13692
      this.saleReturnItems = null;
13693
      setVendorIdIsSet(false);
13694
      this.vendorId = 0;
13695
    }
13696
 
13697
    public int getSaleReturnItemsSize() {
13698
      return (this.saleReturnItems == null) ? 0 : this.saleReturnItems.size();
13699
    }
13700
 
13701
    public java.util.Iterator<InventoryItem> getSaleReturnItemsIterator() {
13702
      return (this.saleReturnItems == null) ? null : this.saleReturnItems.iterator();
13703
    }
13704
 
13705
    public void addToSaleReturnItems(InventoryItem elem) {
13706
      if (this.saleReturnItems == null) {
13707
        this.saleReturnItems = new ArrayList<InventoryItem>();
13708
      }
13709
      this.saleReturnItems.add(elem);
13710
    }
13711
 
13712
    public List<InventoryItem> getSaleReturnItems() {
13713
      return this.saleReturnItems;
13714
    }
13715
 
13716
    public void setSaleReturnItems(List<InventoryItem> saleReturnItems) {
13717
      this.saleReturnItems = saleReturnItems;
13718
    }
13719
 
13720
    public void unsetSaleReturnItems() {
13721
      this.saleReturnItems = null;
13722
    }
13723
 
13724
    /** Returns true if field saleReturnItems is set (has been assigned a value) and false otherwise */
13725
    public boolean isSetSaleReturnItems() {
13726
      return this.saleReturnItems != null;
13727
    }
13728
 
13729
    public void setSaleReturnItemsIsSet(boolean value) {
13730
      if (!value) {
13731
        this.saleReturnItems = null;
13732
      }
13733
    }
13734
 
13735
    public long getVendorId() {
13736
      return this.vendorId;
13737
    }
13738
 
13739
    public void setVendorId(long vendorId) {
13740
      this.vendorId = vendorId;
13741
      setVendorIdIsSet(true);
13742
    }
13743
 
13744
    public void unsetVendorId() {
13745
      __isset_bit_vector.clear(__VENDORID_ISSET_ID);
13746
    }
13747
 
13748
    /** Returns true if field vendorId is set (has been assigned a value) and false otherwise */
13749
    public boolean isSetVendorId() {
13750
      return __isset_bit_vector.get(__VENDORID_ISSET_ID);
13751
    }
13752
 
13753
    public void setVendorIdIsSet(boolean value) {
13754
      __isset_bit_vector.set(__VENDORID_ISSET_ID, value);
13755
    }
13756
 
13757
    public void setFieldValue(_Fields field, Object value) {
13758
      switch (field) {
13759
      case SALE_RETURN_ITEMS:
13760
        if (value == null) {
13761
          unsetSaleReturnItems();
13762
        } else {
13763
          setSaleReturnItems((List<InventoryItem>)value);
13764
        }
13765
        break;
13766
 
13767
      case VENDOR_ID:
13768
        if (value == null) {
13769
          unsetVendorId();
13770
        } else {
13771
          setVendorId((Long)value);
13772
        }
13773
        break;
13774
 
13775
      }
13776
    }
13777
 
13778
    public Object getFieldValue(_Fields field) {
13779
      switch (field) {
13780
      case SALE_RETURN_ITEMS:
13781
        return getSaleReturnItems();
13782
 
13783
      case VENDOR_ID:
13784
        return Long.valueOf(getVendorId());
13785
 
13786
      }
13787
      throw new IllegalStateException();
13788
    }
13789
 
13790
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13791
    public boolean isSet(_Fields field) {
13792
      if (field == null) {
13793
        throw new IllegalArgumentException();
13794
      }
13795
 
13796
      switch (field) {
13797
      case SALE_RETURN_ITEMS:
13798
        return isSetSaleReturnItems();
13799
      case VENDOR_ID:
13800
        return isSetVendorId();
13801
      }
13802
      throw new IllegalStateException();
13803
    }
13804
 
13805
    @Override
13806
    public boolean equals(Object that) {
13807
      if (that == null)
13808
        return false;
13809
      if (that instanceof scanForPurchaseReturn_args)
13810
        return this.equals((scanForPurchaseReturn_args)that);
13811
      return false;
13812
    }
13813
 
13814
    public boolean equals(scanForPurchaseReturn_args that) {
13815
      if (that == null)
13816
        return false;
13817
 
13818
      boolean this_present_saleReturnItems = true && this.isSetSaleReturnItems();
13819
      boolean that_present_saleReturnItems = true && that.isSetSaleReturnItems();
13820
      if (this_present_saleReturnItems || that_present_saleReturnItems) {
13821
        if (!(this_present_saleReturnItems && that_present_saleReturnItems))
13822
          return false;
13823
        if (!this.saleReturnItems.equals(that.saleReturnItems))
13824
          return false;
13825
      }
13826
 
13827
      boolean this_present_vendorId = true;
13828
      boolean that_present_vendorId = true;
13829
      if (this_present_vendorId || that_present_vendorId) {
13830
        if (!(this_present_vendorId && that_present_vendorId))
13831
          return false;
13832
        if (this.vendorId != that.vendorId)
13833
          return false;
13834
      }
13835
 
13836
      return true;
13837
    }
13838
 
13839
    @Override
13840
    public int hashCode() {
13841
      return 0;
13842
    }
13843
 
13844
    public int compareTo(scanForPurchaseReturn_args other) {
13845
      if (!getClass().equals(other.getClass())) {
13846
        return getClass().getName().compareTo(other.getClass().getName());
13847
      }
13848
 
13849
      int lastComparison = 0;
13850
      scanForPurchaseReturn_args typedOther = (scanForPurchaseReturn_args)other;
13851
 
13852
      lastComparison = Boolean.valueOf(isSetSaleReturnItems()).compareTo(typedOther.isSetSaleReturnItems());
13853
      if (lastComparison != 0) {
13854
        return lastComparison;
13855
      }
13856
      if (isSetSaleReturnItems()) {
13857
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.saleReturnItems, typedOther.saleReturnItems);
13858
        if (lastComparison != 0) {
13859
          return lastComparison;
13860
        }
13861
      }
13862
      lastComparison = Boolean.valueOf(isSetVendorId()).compareTo(typedOther.isSetVendorId());
13863
      if (lastComparison != 0) {
13864
        return lastComparison;
13865
      }
13866
      if (isSetVendorId()) {
13867
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vendorId, typedOther.vendorId);
13868
        if (lastComparison != 0) {
13869
          return lastComparison;
13870
        }
13871
      }
13872
      return 0;
13873
    }
13874
 
13875
    public _Fields fieldForId(int fieldId) {
13876
      return _Fields.findByThriftId(fieldId);
13877
    }
13878
 
13879
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13880
      org.apache.thrift.protocol.TField field;
13881
      iprot.readStructBegin();
13882
      while (true)
13883
      {
13884
        field = iprot.readFieldBegin();
13885
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13886
          break;
13887
        }
13888
        switch (field.id) {
13889
          case 1: // SALE_RETURN_ITEMS
13890
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
13891
              {
13892
                org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
13893
                this.saleReturnItems = new ArrayList<InventoryItem>(_list32.size);
13894
                for (int _i33 = 0; _i33 < _list32.size; ++_i33)
13895
                {
13896
                  InventoryItem _elem34; // required
13897
                  _elem34 = new InventoryItem();
13898
                  _elem34.read(iprot);
13899
                  this.saleReturnItems.add(_elem34);
13900
                }
13901
                iprot.readListEnd();
13902
              }
13903
            } else { 
13904
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13905
            }
13906
            break;
13907
          case 2: // VENDOR_ID
13908
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13909
              this.vendorId = iprot.readI64();
13910
              setVendorIdIsSet(true);
13911
            } else { 
13912
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13913
            }
13914
            break;
13915
          default:
13916
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13917
        }
13918
        iprot.readFieldEnd();
13919
      }
13920
      iprot.readStructEnd();
13921
      validate();
13922
    }
13923
 
13924
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13925
      validate();
13926
 
13927
      oprot.writeStructBegin(STRUCT_DESC);
13928
      if (this.saleReturnItems != null) {
13929
        oprot.writeFieldBegin(SALE_RETURN_ITEMS_FIELD_DESC);
13930
        {
13931
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.saleReturnItems.size()));
13932
          for (InventoryItem _iter35 : this.saleReturnItems)
13933
          {
13934
            _iter35.write(oprot);
13935
          }
13936
          oprot.writeListEnd();
13937
        }
13938
        oprot.writeFieldEnd();
13939
      }
13940
      oprot.writeFieldBegin(VENDOR_ID_FIELD_DESC);
13941
      oprot.writeI64(this.vendorId);
13942
      oprot.writeFieldEnd();
13943
      oprot.writeFieldStop();
13944
      oprot.writeStructEnd();
13945
    }
13946
 
13947
    @Override
13948
    public String toString() {
13949
      StringBuilder sb = new StringBuilder("scanForPurchaseReturn_args(");
13950
      boolean first = true;
13951
 
13952
      sb.append("saleReturnItems:");
13953
      if (this.saleReturnItems == null) {
13954
        sb.append("null");
13955
      } else {
13956
        sb.append(this.saleReturnItems);
13957
      }
13958
      first = false;
13959
      if (!first) sb.append(", ");
13960
      sb.append("vendorId:");
13961
      sb.append(this.vendorId);
13962
      first = false;
13963
      sb.append(")");
13964
      return sb.toString();
13965
    }
13966
 
13967
    public void validate() throws org.apache.thrift.TException {
13968
      // check for required fields
13969
    }
13970
 
13971
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13972
      try {
13973
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13974
      } catch (org.apache.thrift.TException te) {
13975
        throw new java.io.IOException(te);
13976
      }
13977
    }
13978
 
13979
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13980
      try {
13981
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13982
      } catch (org.apache.thrift.TException te) {
13983
        throw new java.io.IOException(te);
13984
      }
13985
    }
13986
 
13987
  }
13988
 
13989
  public static class scanForPurchaseReturn_result implements org.apache.thrift.TBase<scanForPurchaseReturn_result, scanForPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
13990
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForPurchaseReturn_result");
13991
 
13992
    private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
13993
 
13994
    private WarehouseServiceException ex; // required
13995
 
13996
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13997
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13998
      EX((short)1, "ex");
13999
 
14000
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14001
 
14002
      static {
14003
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14004
          byName.put(field.getFieldName(), field);
14005
        }
14006
      }
14007
 
14008
      /**
14009
       * Find the _Fields constant that matches fieldId, or null if its not found.
14010
       */
14011
      public static _Fields findByThriftId(int fieldId) {
14012
        switch(fieldId) {
14013
          case 1: // EX
14014
            return EX;
14015
          default:
14016
            return null;
14017
        }
14018
      }
14019
 
14020
      /**
14021
       * Find the _Fields constant that matches fieldId, throwing an exception
14022
       * if it is not found.
14023
       */
14024
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14025
        _Fields fields = findByThriftId(fieldId);
14026
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14027
        return fields;
14028
      }
14029
 
14030
      /**
14031
       * Find the _Fields constant that matches name, or null if its not found.
14032
       */
14033
      public static _Fields findByName(String name) {
14034
        return byName.get(name);
14035
      }
14036
 
14037
      private final short _thriftId;
14038
      private final String _fieldName;
14039
 
14040
      _Fields(short thriftId, String fieldName) {
14041
        _thriftId = thriftId;
14042
        _fieldName = fieldName;
14043
      }
14044
 
14045
      public short getThriftFieldId() {
14046
        return _thriftId;
14047
      }
14048
 
14049
      public String getFieldName() {
14050
        return _fieldName;
14051
      }
14052
    }
14053
 
14054
    // isset id assignments
14055
 
14056
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14057
    static {
14058
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14059
      tmpMap.put(_Fields.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14060
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
14061
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14062
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForPurchaseReturn_result.class, metaDataMap);
14063
    }
14064
 
14065
    public scanForPurchaseReturn_result() {
14066
    }
14067
 
14068
    public scanForPurchaseReturn_result(
14069
      WarehouseServiceException ex)
14070
    {
14071
      this();
14072
      this.ex = ex;
14073
    }
14074
 
14075
    /**
14076
     * Performs a deep copy on <i>other</i>.
14077
     */
14078
    public scanForPurchaseReturn_result(scanForPurchaseReturn_result other) {
14079
      if (other.isSetEx()) {
14080
        this.ex = new WarehouseServiceException(other.ex);
14081
      }
14082
    }
14083
 
14084
    public scanForPurchaseReturn_result deepCopy() {
14085
      return new scanForPurchaseReturn_result(this);
14086
    }
14087
 
14088
    @Override
14089
    public void clear() {
14090
      this.ex = null;
14091
    }
14092
 
14093
    public WarehouseServiceException getEx() {
14094
      return this.ex;
14095
    }
14096
 
14097
    public void setEx(WarehouseServiceException ex) {
14098
      this.ex = ex;
14099
    }
14100
 
14101
    public void unsetEx() {
14102
      this.ex = null;
14103
    }
14104
 
14105
    /** Returns true if field ex is set (has been assigned a value) and false otherwise */
14106
    public boolean isSetEx() {
14107
      return this.ex != null;
14108
    }
14109
 
14110
    public void setExIsSet(boolean value) {
14111
      if (!value) {
14112
        this.ex = null;
14113
      }
14114
    }
14115
 
14116
    public void setFieldValue(_Fields field, Object value) {
14117
      switch (field) {
14118
      case EX:
14119
        if (value == null) {
14120
          unsetEx();
14121
        } else {
14122
          setEx((WarehouseServiceException)value);
14123
        }
14124
        break;
14125
 
14126
      }
14127
    }
14128
 
14129
    public Object getFieldValue(_Fields field) {
14130
      switch (field) {
14131
      case EX:
14132
        return getEx();
14133
 
14134
      }
14135
      throw new IllegalStateException();
14136
    }
14137
 
14138
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14139
    public boolean isSet(_Fields field) {
14140
      if (field == null) {
14141
        throw new IllegalArgumentException();
14142
      }
14143
 
14144
      switch (field) {
14145
      case EX:
14146
        return isSetEx();
14147
      }
14148
      throw new IllegalStateException();
14149
    }
14150
 
14151
    @Override
14152
    public boolean equals(Object that) {
14153
      if (that == null)
14154
        return false;
14155
      if (that instanceof scanForPurchaseReturn_result)
14156
        return this.equals((scanForPurchaseReturn_result)that);
14157
      return false;
14158
    }
14159
 
14160
    public boolean equals(scanForPurchaseReturn_result that) {
14161
      if (that == null)
14162
        return false;
14163
 
14164
      boolean this_present_ex = true && this.isSetEx();
14165
      boolean that_present_ex = true && that.isSetEx();
14166
      if (this_present_ex || that_present_ex) {
14167
        if (!(this_present_ex && that_present_ex))
14168
          return false;
14169
        if (!this.ex.equals(that.ex))
14170
          return false;
14171
      }
14172
 
14173
      return true;
14174
    }
14175
 
14176
    @Override
14177
    public int hashCode() {
14178
      return 0;
14179
    }
14180
 
14181
    public int compareTo(scanForPurchaseReturn_result other) {
14182
      if (!getClass().equals(other.getClass())) {
14183
        return getClass().getName().compareTo(other.getClass().getName());
14184
      }
14185
 
14186
      int lastComparison = 0;
14187
      scanForPurchaseReturn_result typedOther = (scanForPurchaseReturn_result)other;
14188
 
14189
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx());
14190
      if (lastComparison != 0) {
14191
        return lastComparison;
14192
      }
14193
      if (isSetEx()) {
14194
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, typedOther.ex);
14195
        if (lastComparison != 0) {
14196
          return lastComparison;
14197
        }
14198
      }
14199
      return 0;
14200
    }
14201
 
14202
    public _Fields fieldForId(int fieldId) {
14203
      return _Fields.findByThriftId(fieldId);
14204
    }
14205
 
14206
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14207
      org.apache.thrift.protocol.TField field;
14208
      iprot.readStructBegin();
14209
      while (true)
14210
      {
14211
        field = iprot.readFieldBegin();
14212
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14213
          break;
14214
        }
14215
        switch (field.id) {
14216
          case 1: // EX
14217
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14218
              this.ex = new WarehouseServiceException();
14219
              this.ex.read(iprot);
14220
            } else { 
14221
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14222
            }
14223
            break;
14224
          default:
14225
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14226
        }
14227
        iprot.readFieldEnd();
14228
      }
14229
      iprot.readStructEnd();
14230
      validate();
14231
    }
14232
 
14233
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14234
      oprot.writeStructBegin(STRUCT_DESC);
14235
 
14236
      if (this.isSetEx()) {
14237
        oprot.writeFieldBegin(EX_FIELD_DESC);
14238
        this.ex.write(oprot);
14239
        oprot.writeFieldEnd();
14240
      }
14241
      oprot.writeFieldStop();
14242
      oprot.writeStructEnd();
14243
    }
14244
 
14245
    @Override
14246
    public String toString() {
14247
      StringBuilder sb = new StringBuilder("scanForPurchaseReturn_result(");
14248
      boolean first = true;
14249
 
14250
      sb.append("ex:");
14251
      if (this.ex == null) {
14252
        sb.append("null");
14253
      } else {
14254
        sb.append(this.ex);
14255
      }
14256
      first = false;
14257
      sb.append(")");
14258
      return sb.toString();
14259
    }
14260
 
14261
    public void validate() throws org.apache.thrift.TException {
14262
      // check for required fields
14263
    }
14264
 
14265
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14266
      try {
14267
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14268
      } catch (org.apache.thrift.TException te) {
14269
        throw new java.io.IOException(te);
14270
      }
14271
    }
14272
 
14273
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14274
      try {
14275
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14276
      } catch (org.apache.thrift.TException te) {
14277
        throw new java.io.IOException(te);
14278
      }
14279
    }
14280
 
14281
  }
14282
 
6548 amar.kumar 14283
  public static class scanForLostItem_args implements org.apache.thrift.TBase<scanForLostItem_args, scanForLostItem_args._Fields>, java.io.Serializable, Cloneable   {
14284
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForLostItem_args");
14285
 
14286
    private static final org.apache.thrift.protocol.TField LOST_ITEMS_FIELD_DESC = new org.apache.thrift.protocol.TField("lostItems", org.apache.thrift.protocol.TType.LIST, (short)1);
14287
    private static final org.apache.thrift.protocol.TField VENDOR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("vendorId", org.apache.thrift.protocol.TType.I64, (short)2);
14288
 
14289
    private List<InventoryItem> lostItems; // required
14290
    private long vendorId; // required
14291
 
14292
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14293
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14294
      LOST_ITEMS((short)1, "lostItems"),
14295
      VENDOR_ID((short)2, "vendorId");
14296
 
14297
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14298
 
14299
      static {
14300
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14301
          byName.put(field.getFieldName(), field);
14302
        }
14303
      }
14304
 
14305
      /**
14306
       * Find the _Fields constant that matches fieldId, or null if its not found.
14307
       */
14308
      public static _Fields findByThriftId(int fieldId) {
14309
        switch(fieldId) {
14310
          case 1: // LOST_ITEMS
14311
            return LOST_ITEMS;
14312
          case 2: // VENDOR_ID
14313
            return VENDOR_ID;
14314
          default:
14315
            return null;
14316
        }
14317
      }
14318
 
14319
      /**
14320
       * Find the _Fields constant that matches fieldId, throwing an exception
14321
       * if it is not found.
14322
       */
14323
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14324
        _Fields fields = findByThriftId(fieldId);
14325
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14326
        return fields;
14327
      }
14328
 
14329
      /**
14330
       * Find the _Fields constant that matches name, or null if its not found.
14331
       */
14332
      public static _Fields findByName(String name) {
14333
        return byName.get(name);
14334
      }
14335
 
14336
      private final short _thriftId;
14337
      private final String _fieldName;
14338
 
14339
      _Fields(short thriftId, String fieldName) {
14340
        _thriftId = thriftId;
14341
        _fieldName = fieldName;
14342
      }
14343
 
14344
      public short getThriftFieldId() {
14345
        return _thriftId;
14346
      }
14347
 
14348
      public String getFieldName() {
14349
        return _fieldName;
14350
      }
14351
    }
14352
 
14353
    // isset id assignments
14354
    private static final int __VENDORID_ISSET_ID = 0;
14355
    private BitSet __isset_bit_vector = new BitSet(1);
14356
 
14357
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14358
    static {
14359
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14360
      tmpMap.put(_Fields.LOST_ITEMS, new org.apache.thrift.meta_data.FieldMetaData("lostItems", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14361
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
14362
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class))));
14363
      tmpMap.put(_Fields.VENDOR_ID, new org.apache.thrift.meta_data.FieldMetaData("vendorId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14364
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
14365
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14366
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForLostItem_args.class, metaDataMap);
14367
    }
14368
 
14369
    public scanForLostItem_args() {
14370
    }
14371
 
14372
    public scanForLostItem_args(
14373
      List<InventoryItem> lostItems,
14374
      long vendorId)
14375
    {
14376
      this();
14377
      this.lostItems = lostItems;
14378
      this.vendorId = vendorId;
14379
      setVendorIdIsSet(true);
14380
    }
14381
 
14382
    /**
14383
     * Performs a deep copy on <i>other</i>.
14384
     */
14385
    public scanForLostItem_args(scanForLostItem_args other) {
14386
      __isset_bit_vector.clear();
14387
      __isset_bit_vector.or(other.__isset_bit_vector);
14388
      if (other.isSetLostItems()) {
14389
        List<InventoryItem> __this__lostItems = new ArrayList<InventoryItem>();
14390
        for (InventoryItem other_element : other.lostItems) {
14391
          __this__lostItems.add(new InventoryItem(other_element));
14392
        }
14393
        this.lostItems = __this__lostItems;
14394
      }
14395
      this.vendorId = other.vendorId;
14396
    }
14397
 
14398
    public scanForLostItem_args deepCopy() {
14399
      return new scanForLostItem_args(this);
14400
    }
14401
 
14402
    @Override
14403
    public void clear() {
14404
      this.lostItems = null;
14405
      setVendorIdIsSet(false);
14406
      this.vendorId = 0;
14407
    }
14408
 
14409
    public int getLostItemsSize() {
14410
      return (this.lostItems == null) ? 0 : this.lostItems.size();
14411
    }
14412
 
14413
    public java.util.Iterator<InventoryItem> getLostItemsIterator() {
14414
      return (this.lostItems == null) ? null : this.lostItems.iterator();
14415
    }
14416
 
14417
    public void addToLostItems(InventoryItem elem) {
14418
      if (this.lostItems == null) {
14419
        this.lostItems = new ArrayList<InventoryItem>();
14420
      }
14421
      this.lostItems.add(elem);
14422
    }
14423
 
14424
    public List<InventoryItem> getLostItems() {
14425
      return this.lostItems;
14426
    }
14427
 
14428
    public void setLostItems(List<InventoryItem> lostItems) {
14429
      this.lostItems = lostItems;
14430
    }
14431
 
14432
    public void unsetLostItems() {
14433
      this.lostItems = null;
14434
    }
14435
 
14436
    /** Returns true if field lostItems is set (has been assigned a value) and false otherwise */
14437
    public boolean isSetLostItems() {
14438
      return this.lostItems != null;
14439
    }
14440
 
14441
    public void setLostItemsIsSet(boolean value) {
14442
      if (!value) {
14443
        this.lostItems = null;
14444
      }
14445
    }
14446
 
14447
    public long getVendorId() {
14448
      return this.vendorId;
14449
    }
14450
 
14451
    public void setVendorId(long vendorId) {
14452
      this.vendorId = vendorId;
14453
      setVendorIdIsSet(true);
14454
    }
14455
 
14456
    public void unsetVendorId() {
14457
      __isset_bit_vector.clear(__VENDORID_ISSET_ID);
14458
    }
14459
 
14460
    /** Returns true if field vendorId is set (has been assigned a value) and false otherwise */
14461
    public boolean isSetVendorId() {
14462
      return __isset_bit_vector.get(__VENDORID_ISSET_ID);
14463
    }
14464
 
14465
    public void setVendorIdIsSet(boolean value) {
14466
      __isset_bit_vector.set(__VENDORID_ISSET_ID, value);
14467
    }
14468
 
14469
    public void setFieldValue(_Fields field, Object value) {
14470
      switch (field) {
14471
      case LOST_ITEMS:
14472
        if (value == null) {
14473
          unsetLostItems();
14474
        } else {
14475
          setLostItems((List<InventoryItem>)value);
14476
        }
14477
        break;
14478
 
14479
      case VENDOR_ID:
14480
        if (value == null) {
14481
          unsetVendorId();
14482
        } else {
14483
          setVendorId((Long)value);
14484
        }
14485
        break;
14486
 
14487
      }
14488
    }
14489
 
14490
    public Object getFieldValue(_Fields field) {
14491
      switch (field) {
14492
      case LOST_ITEMS:
14493
        return getLostItems();
14494
 
14495
      case VENDOR_ID:
14496
        return Long.valueOf(getVendorId());
14497
 
14498
      }
14499
      throw new IllegalStateException();
14500
    }
14501
 
14502
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14503
    public boolean isSet(_Fields field) {
14504
      if (field == null) {
14505
        throw new IllegalArgumentException();
14506
      }
14507
 
14508
      switch (field) {
14509
      case LOST_ITEMS:
14510
        return isSetLostItems();
14511
      case VENDOR_ID:
14512
        return isSetVendorId();
14513
      }
14514
      throw new IllegalStateException();
14515
    }
14516
 
14517
    @Override
14518
    public boolean equals(Object that) {
14519
      if (that == null)
14520
        return false;
14521
      if (that instanceof scanForLostItem_args)
14522
        return this.equals((scanForLostItem_args)that);
14523
      return false;
14524
    }
14525
 
14526
    public boolean equals(scanForLostItem_args that) {
14527
      if (that == null)
14528
        return false;
14529
 
14530
      boolean this_present_lostItems = true && this.isSetLostItems();
14531
      boolean that_present_lostItems = true && that.isSetLostItems();
14532
      if (this_present_lostItems || that_present_lostItems) {
14533
        if (!(this_present_lostItems && that_present_lostItems))
14534
          return false;
14535
        if (!this.lostItems.equals(that.lostItems))
14536
          return false;
14537
      }
14538
 
14539
      boolean this_present_vendorId = true;
14540
      boolean that_present_vendorId = true;
14541
      if (this_present_vendorId || that_present_vendorId) {
14542
        if (!(this_present_vendorId && that_present_vendorId))
14543
          return false;
14544
        if (this.vendorId != that.vendorId)
14545
          return false;
14546
      }
14547
 
14548
      return true;
14549
    }
14550
 
14551
    @Override
14552
    public int hashCode() {
14553
      return 0;
14554
    }
14555
 
14556
    public int compareTo(scanForLostItem_args other) {
14557
      if (!getClass().equals(other.getClass())) {
14558
        return getClass().getName().compareTo(other.getClass().getName());
14559
      }
14560
 
14561
      int lastComparison = 0;
14562
      scanForLostItem_args typedOther = (scanForLostItem_args)other;
14563
 
14564
      lastComparison = Boolean.valueOf(isSetLostItems()).compareTo(typedOther.isSetLostItems());
14565
      if (lastComparison != 0) {
14566
        return lastComparison;
14567
      }
14568
      if (isSetLostItems()) {
14569
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lostItems, typedOther.lostItems);
14570
        if (lastComparison != 0) {
14571
          return lastComparison;
14572
        }
14573
      }
14574
      lastComparison = Boolean.valueOf(isSetVendorId()).compareTo(typedOther.isSetVendorId());
14575
      if (lastComparison != 0) {
14576
        return lastComparison;
14577
      }
14578
      if (isSetVendorId()) {
14579
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vendorId, typedOther.vendorId);
14580
        if (lastComparison != 0) {
14581
          return lastComparison;
14582
        }
14583
      }
14584
      return 0;
14585
    }
14586
 
14587
    public _Fields fieldForId(int fieldId) {
14588
      return _Fields.findByThriftId(fieldId);
14589
    }
14590
 
14591
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14592
      org.apache.thrift.protocol.TField field;
14593
      iprot.readStructBegin();
14594
      while (true)
14595
      {
14596
        field = iprot.readFieldBegin();
14597
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14598
          break;
14599
        }
14600
        switch (field.id) {
14601
          case 1: // LOST_ITEMS
14602
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
14603
              {
14604
                org.apache.thrift.protocol.TList _list36 = iprot.readListBegin();
14605
                this.lostItems = new ArrayList<InventoryItem>(_list36.size);
14606
                for (int _i37 = 0; _i37 < _list36.size; ++_i37)
14607
                {
14608
                  InventoryItem _elem38; // required
14609
                  _elem38 = new InventoryItem();
14610
                  _elem38.read(iprot);
14611
                  this.lostItems.add(_elem38);
14612
                }
14613
                iprot.readListEnd();
14614
              }
14615
            } else { 
14616
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14617
            }
14618
            break;
14619
          case 2: // VENDOR_ID
14620
            if (field.type == org.apache.thrift.protocol.TType.I64) {
14621
              this.vendorId = iprot.readI64();
14622
              setVendorIdIsSet(true);
14623
            } else { 
14624
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14625
            }
14626
            break;
14627
          default:
14628
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14629
        }
14630
        iprot.readFieldEnd();
14631
      }
14632
      iprot.readStructEnd();
14633
      validate();
14634
    }
14635
 
14636
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14637
      validate();
14638
 
14639
      oprot.writeStructBegin(STRUCT_DESC);
14640
      if (this.lostItems != null) {
14641
        oprot.writeFieldBegin(LOST_ITEMS_FIELD_DESC);
14642
        {
14643
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.lostItems.size()));
14644
          for (InventoryItem _iter39 : this.lostItems)
14645
          {
14646
            _iter39.write(oprot);
14647
          }
14648
          oprot.writeListEnd();
14649
        }
14650
        oprot.writeFieldEnd();
14651
      }
14652
      oprot.writeFieldBegin(VENDOR_ID_FIELD_DESC);
14653
      oprot.writeI64(this.vendorId);
14654
      oprot.writeFieldEnd();
14655
      oprot.writeFieldStop();
14656
      oprot.writeStructEnd();
14657
    }
14658
 
14659
    @Override
14660
    public String toString() {
14661
      StringBuilder sb = new StringBuilder("scanForLostItem_args(");
14662
      boolean first = true;
14663
 
14664
      sb.append("lostItems:");
14665
      if (this.lostItems == null) {
14666
        sb.append("null");
14667
      } else {
14668
        sb.append(this.lostItems);
14669
      }
14670
      first = false;
14671
      if (!first) sb.append(", ");
14672
      sb.append("vendorId:");
14673
      sb.append(this.vendorId);
14674
      first = false;
14675
      sb.append(")");
14676
      return sb.toString();
14677
    }
14678
 
14679
    public void validate() throws org.apache.thrift.TException {
14680
      // check for required fields
14681
    }
14682
 
14683
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14684
      try {
14685
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14686
      } catch (org.apache.thrift.TException te) {
14687
        throw new java.io.IOException(te);
14688
      }
14689
    }
14690
 
14691
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14692
      try {
14693
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14694
      } catch (org.apache.thrift.TException te) {
14695
        throw new java.io.IOException(te);
14696
      }
14697
    }
14698
 
14699
  }
14700
 
14701
  public static class scanForLostItem_result implements org.apache.thrift.TBase<scanForLostItem_result, scanForLostItem_result._Fields>, java.io.Serializable, Cloneable   {
14702
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForLostItem_result");
14703
 
14704
    private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
14705
 
14706
    private WarehouseServiceException ex; // required
14707
 
14708
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14709
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14710
      EX((short)1, "ex");
14711
 
14712
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14713
 
14714
      static {
14715
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14716
          byName.put(field.getFieldName(), field);
14717
        }
14718
      }
14719
 
14720
      /**
14721
       * Find the _Fields constant that matches fieldId, or null if its not found.
14722
       */
14723
      public static _Fields findByThriftId(int fieldId) {
14724
        switch(fieldId) {
14725
          case 1: // EX
14726
            return EX;
14727
          default:
14728
            return null;
14729
        }
14730
      }
14731
 
14732
      /**
14733
       * Find the _Fields constant that matches fieldId, throwing an exception
14734
       * if it is not found.
14735
       */
14736
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14737
        _Fields fields = findByThriftId(fieldId);
14738
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14739
        return fields;
14740
      }
14741
 
14742
      /**
14743
       * Find the _Fields constant that matches name, or null if its not found.
14744
       */
14745
      public static _Fields findByName(String name) {
14746
        return byName.get(name);
14747
      }
14748
 
14749
      private final short _thriftId;
14750
      private final String _fieldName;
14751
 
14752
      _Fields(short thriftId, String fieldName) {
14753
        _thriftId = thriftId;
14754
        _fieldName = fieldName;
14755
      }
14756
 
14757
      public short getThriftFieldId() {
14758
        return _thriftId;
14759
      }
14760
 
14761
      public String getFieldName() {
14762
        return _fieldName;
14763
      }
14764
    }
14765
 
14766
    // isset id assignments
14767
 
14768
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14769
    static {
14770
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14771
      tmpMap.put(_Fields.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14772
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
14773
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14774
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForLostItem_result.class, metaDataMap);
14775
    }
14776
 
14777
    public scanForLostItem_result() {
14778
    }
14779
 
14780
    public scanForLostItem_result(
14781
      WarehouseServiceException ex)
14782
    {
14783
      this();
14784
      this.ex = ex;
14785
    }
14786
 
14787
    /**
14788
     * Performs a deep copy on <i>other</i>.
14789
     */
14790
    public scanForLostItem_result(scanForLostItem_result other) {
14791
      if (other.isSetEx()) {
14792
        this.ex = new WarehouseServiceException(other.ex);
14793
      }
14794
    }
14795
 
14796
    public scanForLostItem_result deepCopy() {
14797
      return new scanForLostItem_result(this);
14798
    }
14799
 
14800
    @Override
14801
    public void clear() {
14802
      this.ex = null;
14803
    }
14804
 
14805
    public WarehouseServiceException getEx() {
14806
      return this.ex;
14807
    }
14808
 
14809
    public void setEx(WarehouseServiceException ex) {
14810
      this.ex = ex;
14811
    }
14812
 
14813
    public void unsetEx() {
14814
      this.ex = null;
14815
    }
14816
 
14817
    /** Returns true if field ex is set (has been assigned a value) and false otherwise */
14818
    public boolean isSetEx() {
14819
      return this.ex != null;
14820
    }
14821
 
14822
    public void setExIsSet(boolean value) {
14823
      if (!value) {
14824
        this.ex = null;
14825
      }
14826
    }
14827
 
14828
    public void setFieldValue(_Fields field, Object value) {
14829
      switch (field) {
14830
      case EX:
14831
        if (value == null) {
14832
          unsetEx();
14833
        } else {
14834
          setEx((WarehouseServiceException)value);
14835
        }
14836
        break;
14837
 
14838
      }
14839
    }
14840
 
14841
    public Object getFieldValue(_Fields field) {
14842
      switch (field) {
14843
      case EX:
14844
        return getEx();
14845
 
14846
      }
14847
      throw new IllegalStateException();
14848
    }
14849
 
14850
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14851
    public boolean isSet(_Fields field) {
14852
      if (field == null) {
14853
        throw new IllegalArgumentException();
14854
      }
14855
 
14856
      switch (field) {
14857
      case EX:
14858
        return isSetEx();
14859
      }
14860
      throw new IllegalStateException();
14861
    }
14862
 
14863
    @Override
14864
    public boolean equals(Object that) {
14865
      if (that == null)
14866
        return false;
14867
      if (that instanceof scanForLostItem_result)
14868
        return this.equals((scanForLostItem_result)that);
14869
      return false;
14870
    }
14871
 
14872
    public boolean equals(scanForLostItem_result that) {
14873
      if (that == null)
14874
        return false;
14875
 
14876
      boolean this_present_ex = true && this.isSetEx();
14877
      boolean that_present_ex = true && that.isSetEx();
14878
      if (this_present_ex || that_present_ex) {
14879
        if (!(this_present_ex && that_present_ex))
14880
          return false;
14881
        if (!this.ex.equals(that.ex))
14882
          return false;
14883
      }
14884
 
14885
      return true;
14886
    }
14887
 
14888
    @Override
14889
    public int hashCode() {
14890
      return 0;
14891
    }
14892
 
14893
    public int compareTo(scanForLostItem_result other) {
14894
      if (!getClass().equals(other.getClass())) {
14895
        return getClass().getName().compareTo(other.getClass().getName());
14896
      }
14897
 
14898
      int lastComparison = 0;
14899
      scanForLostItem_result typedOther = (scanForLostItem_result)other;
14900
 
14901
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx());
14902
      if (lastComparison != 0) {
14903
        return lastComparison;
14904
      }
14905
      if (isSetEx()) {
14906
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, typedOther.ex);
14907
        if (lastComparison != 0) {
14908
          return lastComparison;
14909
        }
14910
      }
14911
      return 0;
14912
    }
14913
 
14914
    public _Fields fieldForId(int fieldId) {
14915
      return _Fields.findByThriftId(fieldId);
14916
    }
14917
 
14918
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14919
      org.apache.thrift.protocol.TField field;
14920
      iprot.readStructBegin();
14921
      while (true)
14922
      {
14923
        field = iprot.readFieldBegin();
14924
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14925
          break;
14926
        }
14927
        switch (field.id) {
14928
          case 1: // EX
14929
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14930
              this.ex = new WarehouseServiceException();
14931
              this.ex.read(iprot);
14932
            } else { 
14933
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14934
            }
14935
            break;
14936
          default:
14937
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14938
        }
14939
        iprot.readFieldEnd();
14940
      }
14941
      iprot.readStructEnd();
14942
      validate();
14943
    }
14944
 
14945
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14946
      oprot.writeStructBegin(STRUCT_DESC);
14947
 
14948
      if (this.isSetEx()) {
14949
        oprot.writeFieldBegin(EX_FIELD_DESC);
14950
        this.ex.write(oprot);
14951
        oprot.writeFieldEnd();
14952
      }
14953
      oprot.writeFieldStop();
14954
      oprot.writeStructEnd();
14955
    }
14956
 
14957
    @Override
14958
    public String toString() {
14959
      StringBuilder sb = new StringBuilder("scanForLostItem_result(");
14960
      boolean first = true;
14961
 
14962
      sb.append("ex:");
14963
      if (this.ex == null) {
14964
        sb.append("null");
14965
      } else {
14966
        sb.append(this.ex);
14967
      }
14968
      first = false;
14969
      sb.append(")");
14970
      return sb.toString();
14971
    }
14972
 
14973
    public void validate() throws org.apache.thrift.TException {
14974
      // check for required fields
14975
    }
14976
 
14977
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14978
      try {
14979
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14980
      } catch (org.apache.thrift.TException te) {
14981
        throw new java.io.IOException(te);
14982
      }
14983
    }
14984
 
14985
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14986
      try {
14987
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14988
      } catch (org.apache.thrift.TException te) {
14989
        throw new java.io.IOException(te);
14990
      }
14991
    }
14992
 
14993
  }
14994
 
14995
  public static class getCurrentSerializedInventoryByScans_args implements org.apache.thrift.TBase<getCurrentSerializedInventoryByScans_args, getCurrentSerializedInventoryByScans_args._Fields>, java.io.Serializable, Cloneable   {
14996
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCurrentSerializedInventoryByScans_args");
14997
 
14998
 
14999
 
15000
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15001
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15002
;
15003
 
15004
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15005
 
15006
      static {
15007
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15008
          byName.put(field.getFieldName(), field);
15009
        }
15010
      }
15011
 
15012
      /**
15013
       * Find the _Fields constant that matches fieldId, or null if its not found.
15014
       */
15015
      public static _Fields findByThriftId(int fieldId) {
15016
        switch(fieldId) {
15017
          default:
15018
            return null;
15019
        }
15020
      }
15021
 
15022
      /**
15023
       * Find the _Fields constant that matches fieldId, throwing an exception
15024
       * if it is not found.
15025
       */
15026
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15027
        _Fields fields = findByThriftId(fieldId);
15028
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15029
        return fields;
15030
      }
15031
 
15032
      /**
15033
       * Find the _Fields constant that matches name, or null if its not found.
15034
       */
15035
      public static _Fields findByName(String name) {
15036
        return byName.get(name);
15037
      }
15038
 
15039
      private final short _thriftId;
15040
      private final String _fieldName;
15041
 
15042
      _Fields(short thriftId, String fieldName) {
15043
        _thriftId = thriftId;
15044
        _fieldName = fieldName;
15045
      }
15046
 
15047
      public short getThriftFieldId() {
15048
        return _thriftId;
15049
      }
15050
 
15051
      public String getFieldName() {
15052
        return _fieldName;
15053
      }
15054
    }
15055
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15056
    static {
15057
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15058
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15059
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCurrentSerializedInventoryByScans_args.class, metaDataMap);
15060
    }
15061
 
15062
    public getCurrentSerializedInventoryByScans_args() {
15063
    }
15064
 
15065
    /**
15066
     * Performs a deep copy on <i>other</i>.
15067
     */
15068
    public getCurrentSerializedInventoryByScans_args(getCurrentSerializedInventoryByScans_args other) {
15069
    }
15070
 
15071
    public getCurrentSerializedInventoryByScans_args deepCopy() {
15072
      return new getCurrentSerializedInventoryByScans_args(this);
15073
    }
15074
 
15075
    @Override
15076
    public void clear() {
15077
    }
15078
 
15079
    public void setFieldValue(_Fields field, Object value) {
15080
      switch (field) {
15081
      }
15082
    }
15083
 
15084
    public Object getFieldValue(_Fields field) {
15085
      switch (field) {
15086
      }
15087
      throw new IllegalStateException();
15088
    }
15089
 
15090
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15091
    public boolean isSet(_Fields field) {
15092
      if (field == null) {
15093
        throw new IllegalArgumentException();
15094
      }
15095
 
15096
      switch (field) {
15097
      }
15098
      throw new IllegalStateException();
15099
    }
15100
 
15101
    @Override
15102
    public boolean equals(Object that) {
15103
      if (that == null)
15104
        return false;
15105
      if (that instanceof getCurrentSerializedInventoryByScans_args)
15106
        return this.equals((getCurrentSerializedInventoryByScans_args)that);
15107
      return false;
15108
    }
15109
 
15110
    public boolean equals(getCurrentSerializedInventoryByScans_args that) {
15111
      if (that == null)
15112
        return false;
15113
 
15114
      return true;
15115
    }
15116
 
15117
    @Override
15118
    public int hashCode() {
15119
      return 0;
15120
    }
15121
 
15122
    public int compareTo(getCurrentSerializedInventoryByScans_args other) {
15123
      if (!getClass().equals(other.getClass())) {
15124
        return getClass().getName().compareTo(other.getClass().getName());
15125
      }
15126
 
15127
      int lastComparison = 0;
15128
      getCurrentSerializedInventoryByScans_args typedOther = (getCurrentSerializedInventoryByScans_args)other;
15129
 
15130
      return 0;
15131
    }
15132
 
15133
    public _Fields fieldForId(int fieldId) {
15134
      return _Fields.findByThriftId(fieldId);
15135
    }
15136
 
15137
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15138
      org.apache.thrift.protocol.TField field;
15139
      iprot.readStructBegin();
15140
      while (true)
15141
      {
15142
        field = iprot.readFieldBegin();
15143
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15144
          break;
15145
        }
15146
        switch (field.id) {
15147
          default:
15148
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15149
        }
15150
        iprot.readFieldEnd();
15151
      }
15152
      iprot.readStructEnd();
15153
      validate();
15154
    }
15155
 
15156
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15157
      validate();
15158
 
15159
      oprot.writeStructBegin(STRUCT_DESC);
15160
      oprot.writeFieldStop();
15161
      oprot.writeStructEnd();
15162
    }
15163
 
15164
    @Override
15165
    public String toString() {
15166
      StringBuilder sb = new StringBuilder("getCurrentSerializedInventoryByScans_args(");
15167
      boolean first = true;
15168
 
15169
      sb.append(")");
15170
      return sb.toString();
15171
    }
15172
 
15173
    public void validate() throws org.apache.thrift.TException {
15174
      // check for required fields
15175
    }
15176
 
15177
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15178
      try {
15179
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15180
      } catch (org.apache.thrift.TException te) {
15181
        throw new java.io.IOException(te);
15182
      }
15183
    }
15184
 
15185
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15186
      try {
15187
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15188
      } catch (org.apache.thrift.TException te) {
15189
        throw new java.io.IOException(te);
15190
      }
15191
    }
15192
 
15193
  }
15194
 
15195
  public static class getCurrentSerializedInventoryByScans_result implements org.apache.thrift.TBase<getCurrentSerializedInventoryByScans_result, getCurrentSerializedInventoryByScans_result._Fields>, java.io.Serializable, Cloneable   {
15196
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCurrentSerializedInventoryByScans_result");
15197
 
15198
    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);
15199
 
15200
    private List<InventoryAvailability> success; // required
15201
 
15202
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15203
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15204
      SUCCESS((short)0, "success");
15205
 
15206
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15207
 
15208
      static {
15209
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15210
          byName.put(field.getFieldName(), field);
15211
        }
15212
      }
15213
 
15214
      /**
15215
       * Find the _Fields constant that matches fieldId, or null if its not found.
15216
       */
15217
      public static _Fields findByThriftId(int fieldId) {
15218
        switch(fieldId) {
15219
          case 0: // SUCCESS
15220
            return SUCCESS;
15221
          default:
15222
            return null;
15223
        }
15224
      }
15225
 
15226
      /**
15227
       * Find the _Fields constant that matches fieldId, throwing an exception
15228
       * if it is not found.
15229
       */
15230
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15231
        _Fields fields = findByThriftId(fieldId);
15232
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15233
        return fields;
15234
      }
15235
 
15236
      /**
15237
       * Find the _Fields constant that matches name, or null if its not found.
15238
       */
15239
      public static _Fields findByName(String name) {
15240
        return byName.get(name);
15241
      }
15242
 
15243
      private final short _thriftId;
15244
      private final String _fieldName;
15245
 
15246
      _Fields(short thriftId, String fieldName) {
15247
        _thriftId = thriftId;
15248
        _fieldName = fieldName;
15249
      }
15250
 
15251
      public short getThriftFieldId() {
15252
        return _thriftId;
15253
      }
15254
 
15255
      public String getFieldName() {
15256
        return _fieldName;
15257
      }
15258
    }
15259
 
15260
    // isset id assignments
15261
 
15262
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15263
    static {
15264
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15265
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15266
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
15267
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryAvailability.class))));
15268
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15269
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCurrentSerializedInventoryByScans_result.class, metaDataMap);
15270
    }
15271
 
15272
    public getCurrentSerializedInventoryByScans_result() {
15273
    }
15274
 
15275
    public getCurrentSerializedInventoryByScans_result(
15276
      List<InventoryAvailability> success)
15277
    {
15278
      this();
15279
      this.success = success;
15280
    }
15281
 
15282
    /**
15283
     * Performs a deep copy on <i>other</i>.
15284
     */
15285
    public getCurrentSerializedInventoryByScans_result(getCurrentSerializedInventoryByScans_result other) {
15286
      if (other.isSetSuccess()) {
15287
        List<InventoryAvailability> __this__success = new ArrayList<InventoryAvailability>();
15288
        for (InventoryAvailability other_element : other.success) {
15289
          __this__success.add(new InventoryAvailability(other_element));
15290
        }
15291
        this.success = __this__success;
15292
      }
15293
    }
15294
 
15295
    public getCurrentSerializedInventoryByScans_result deepCopy() {
15296
      return new getCurrentSerializedInventoryByScans_result(this);
15297
    }
15298
 
15299
    @Override
15300
    public void clear() {
15301
      this.success = null;
15302
    }
15303
 
15304
    public int getSuccessSize() {
15305
      return (this.success == null) ? 0 : this.success.size();
15306
    }
15307
 
15308
    public java.util.Iterator<InventoryAvailability> getSuccessIterator() {
15309
      return (this.success == null) ? null : this.success.iterator();
15310
    }
15311
 
15312
    public void addToSuccess(InventoryAvailability elem) {
15313
      if (this.success == null) {
15314
        this.success = new ArrayList<InventoryAvailability>();
15315
      }
15316
      this.success.add(elem);
15317
    }
15318
 
15319
    public List<InventoryAvailability> getSuccess() {
15320
      return this.success;
15321
    }
15322
 
15323
    public void setSuccess(List<InventoryAvailability> success) {
15324
      this.success = success;
15325
    }
15326
 
15327
    public void unsetSuccess() {
15328
      this.success = null;
15329
    }
15330
 
15331
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
15332
    public boolean isSetSuccess() {
15333
      return this.success != null;
15334
    }
15335
 
15336
    public void setSuccessIsSet(boolean value) {
15337
      if (!value) {
15338
        this.success = null;
15339
      }
15340
    }
15341
 
15342
    public void setFieldValue(_Fields field, Object value) {
15343
      switch (field) {
15344
      case SUCCESS:
15345
        if (value == null) {
15346
          unsetSuccess();
15347
        } else {
15348
          setSuccess((List<InventoryAvailability>)value);
15349
        }
15350
        break;
15351
 
15352
      }
15353
    }
15354
 
15355
    public Object getFieldValue(_Fields field) {
15356
      switch (field) {
15357
      case SUCCESS:
15358
        return getSuccess();
15359
 
15360
      }
15361
      throw new IllegalStateException();
15362
    }
15363
 
15364
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15365
    public boolean isSet(_Fields field) {
15366
      if (field == null) {
15367
        throw new IllegalArgumentException();
15368
      }
15369
 
15370
      switch (field) {
15371
      case SUCCESS:
15372
        return isSetSuccess();
15373
      }
15374
      throw new IllegalStateException();
15375
    }
15376
 
15377
    @Override
15378
    public boolean equals(Object that) {
15379
      if (that == null)
15380
        return false;
15381
      if (that instanceof getCurrentSerializedInventoryByScans_result)
15382
        return this.equals((getCurrentSerializedInventoryByScans_result)that);
15383
      return false;
15384
    }
15385
 
15386
    public boolean equals(getCurrentSerializedInventoryByScans_result that) {
15387
      if (that == null)
15388
        return false;
15389
 
15390
      boolean this_present_success = true && this.isSetSuccess();
15391
      boolean that_present_success = true && that.isSetSuccess();
15392
      if (this_present_success || that_present_success) {
15393
        if (!(this_present_success && that_present_success))
15394
          return false;
15395
        if (!this.success.equals(that.success))
15396
          return false;
15397
      }
15398
 
15399
      return true;
15400
    }
15401
 
15402
    @Override
15403
    public int hashCode() {
15404
      return 0;
15405
    }
15406
 
15407
    public int compareTo(getCurrentSerializedInventoryByScans_result other) {
15408
      if (!getClass().equals(other.getClass())) {
15409
        return getClass().getName().compareTo(other.getClass().getName());
15410
      }
15411
 
15412
      int lastComparison = 0;
15413
      getCurrentSerializedInventoryByScans_result typedOther = (getCurrentSerializedInventoryByScans_result)other;
15414
 
15415
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
15416
      if (lastComparison != 0) {
15417
        return lastComparison;
15418
      }
15419
      if (isSetSuccess()) {
15420
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
15421
        if (lastComparison != 0) {
15422
          return lastComparison;
15423
        }
15424
      }
15425
      return 0;
15426
    }
15427
 
15428
    public _Fields fieldForId(int fieldId) {
15429
      return _Fields.findByThriftId(fieldId);
15430
    }
15431
 
15432
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15433
      org.apache.thrift.protocol.TField field;
15434
      iprot.readStructBegin();
15435
      while (true)
15436
      {
15437
        field = iprot.readFieldBegin();
15438
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15439
          break;
15440
        }
15441
        switch (field.id) {
15442
          case 0: // SUCCESS
15443
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
15444
              {
15445
                org.apache.thrift.protocol.TList _list40 = iprot.readListBegin();
15446
                this.success = new ArrayList<InventoryAvailability>(_list40.size);
15447
                for (int _i41 = 0; _i41 < _list40.size; ++_i41)
15448
                {
15449
                  InventoryAvailability _elem42; // required
15450
                  _elem42 = new InventoryAvailability();
15451
                  _elem42.read(iprot);
15452
                  this.success.add(_elem42);
15453
                }
15454
                iprot.readListEnd();
15455
              }
15456
            } else { 
15457
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15458
            }
15459
            break;
15460
          default:
15461
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15462
        }
15463
        iprot.readFieldEnd();
15464
      }
15465
      iprot.readStructEnd();
15466
      validate();
15467
    }
15468
 
15469
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15470
      oprot.writeStructBegin(STRUCT_DESC);
15471
 
15472
      if (this.isSetSuccess()) {
15473
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15474
        {
15475
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
15476
          for (InventoryAvailability _iter43 : this.success)
15477
          {
15478
            _iter43.write(oprot);
15479
          }
15480
          oprot.writeListEnd();
15481
        }
15482
        oprot.writeFieldEnd();
15483
      }
15484
      oprot.writeFieldStop();
15485
      oprot.writeStructEnd();
15486
    }
15487
 
15488
    @Override
15489
    public String toString() {
15490
      StringBuilder sb = new StringBuilder("getCurrentSerializedInventoryByScans_result(");
15491
      boolean first = true;
15492
 
15493
      sb.append("success:");
15494
      if (this.success == null) {
15495
        sb.append("null");
15496
      } else {
15497
        sb.append(this.success);
15498
      }
15499
      first = false;
15500
      sb.append(")");
15501
      return sb.toString();
15502
    }
15503
 
15504
    public void validate() throws org.apache.thrift.TException {
15505
      // check for required fields
15506
    }
15507
 
15508
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15509
      try {
15510
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15511
      } catch (org.apache.thrift.TException te) {
15512
        throw new java.io.IOException(te);
15513
      }
15514
    }
15515
 
15516
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15517
      try {
15518
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15519
      } catch (org.apache.thrift.TException te) {
15520
        throw new java.io.IOException(te);
15521
      }
15522
    }
15523
 
15524
  }
15525
 
2820 chandransh 15526
}