Subversion Repositories SmartDukaan

Rev

Rev 7190 | Rev 7210 | 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
 
6630 amar.kumar 177
    /**
178
     * Get inventory count for available Serialized items in our warehouses using entries in ScanNew table
179
     */
180
    public List<InventoryAvailability> getCurrentNonSerializedInventoryByScans() throws org.apache.thrift.TException;
181
 
6762 amar.kumar 182
    /**
183
     * Get inventory for Serialized items in our warehouses at a given date using entries in ScanNew table
184
     * 
185
     * @param date
186
     */
187
    public List<InventoryAvailability> getHistoricSerializedInventoryByScans(long date) throws org.apache.thrift.TException;
188
 
189
    /**
190
     * Get inventory for Non Serialized items in our warehouses at a given date using entries in ScanNew table
191
     * 
192
     * @param date
193
     */
194
    public List<InventoryAvailability> getHistoricNonSerializedInventoryByScans(long date) throws org.apache.thrift.TException;
195
 
196
    /**
6880 amar.kumar 197
     * Insert Purchase/Sale Entries for product billed by Hotspot using OURS_EXTERNAL Billing
6762 amar.kumar 198
     * 
199
     * @param itemId
200
     * @param serialNumber
201
     * @param itemNumber
202
     * @param invoiceNumber
203
     * @param warehouseId
204
     * @param unitPrice
205
     * @param orderId
206
     */
207
    public InventoryItem scanForOursExternalSale(long itemId, String serialNumber, String itemNumber, String invoiceNumber, long warehouseId, double unitPrice, long orderId) throws WarehouseServiceException, org.apache.thrift.TException;
208
 
209
    /**
6880 amar.kumar 210
     * Insert Purchase_Ret/Sale_Ret Entries for product billed by Hotspot using OURS_EXTERNAL Billing
6762 amar.kumar 211
     * 
212
     * @param orderId
213
     * @param unitPrice
214
     */
215
    public void scanForOursExternalSaleReturn(long orderId, double unitPrice) throws org.apache.thrift.TException;
216
 
6880 amar.kumar 217
    public List<InventoryMovement> getMovementNonSerializedInventoryByScans(long startDate, long endDate) throws org.apache.thrift.TException;
218
 
219
    public List<InventoryMovement> getMovementSerializedInventoryByScans(long startDate, long endDate) throws org.apache.thrift.TException;
220
 
7190 amar.kumar 221
    public InventoryItem scanfreebie(long orderId, long freebieItemId, long freebieWarehouseId, ScanType scanType) throws WarehouseServiceException, org.apache.thrift.TException;
222
 
7199 amar.kumar 223
    public void reshipfreebie(long oldOrderId, long newOrderId, long freebieItemId, ScanType scanType) throws WarehouseServiceException, org.apache.thrift.TException;
224
 
2820 chandransh 225
  }
226
 
3430 rajveer 227
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
228
 
4496 mandeep.dh 229
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 230
 
5530 mandeep.dh 231
    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 232
 
5361 mandeep.dh 233
    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 234
 
5110 mandeep.dh 235
    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 236
 
5361 mandeep.dh 237
    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 238
 
239
    public void createItemNumberMapping(String itemNumber, long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createItemNumberMapping_call> resultHandler) throws org.apache.thrift.TException;
240
 
4622 amit.gupta 241
    public void getItemNumbers(long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemNumbers_call> resultHandler) throws org.apache.thrift.TException;
242
 
5110 mandeep.dh 243
    public void getItemIds(String itemNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemIds_call> resultHandler) throws org.apache.thrift.TException;
244
 
5185 mandeep.dh 245
    public void getInventoryItemsFromLastScanType(ScanType lastScanType, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemsFromLastScanType_call> resultHandler) throws org.apache.thrift.TException;
246
 
247
    public void getInventoryItemFromId(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemFromId_call> resultHandler) throws org.apache.thrift.TException;
248
 
5372 mandeep.dh 249
    public void getPurchaseScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseScans_call> resultHandler) throws org.apache.thrift.TException;
250
 
5496 mandeep.dh 251
    public void fetchScansPerInvoiceNumber(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fetchScansPerInvoiceNumber_call> resultHandler) throws org.apache.thrift.TException;
252
 
5620 mandeep.dh 253
    public void getInventoryItemFromOrder(long orderId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemFromOrder_call> resultHandler) throws org.apache.thrift.TException;
254
 
5711 mandeep.dh 255
    public void getInventoryAge(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryAge_call> resultHandler) throws org.apache.thrift.TException;
256
 
6322 amar.kumar 257
    public void getInventoryScansForItem(long itemId, long fromDate, long toDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryScansForItem_call> resultHandler) throws org.apache.thrift.TException;
258
 
259
    public void getScanRecordsForSerialNumber(long serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getScanRecordsForSerialNumber_call> resultHandler) throws org.apache.thrift.TException;
260
 
6467 amar.kumar 261
    public void scanForPurchaseReturn(List<InventoryItem> saleReturnItems, long vendorId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanForPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
262
 
6548 amar.kumar 263
    public void scanForLostItem(List<InventoryItem> lostItems, long vendorId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanForLostItem_call> resultHandler) throws org.apache.thrift.TException;
264
 
265
    public void getCurrentSerializedInventoryByScans(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCurrentSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException;
266
 
6630 amar.kumar 267
    public void getCurrentNonSerializedInventoryByScans(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCurrentNonSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException;
268
 
6762 amar.kumar 269
    public void getHistoricSerializedInventoryByScans(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getHistoricSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException;
270
 
271
    public void getHistoricNonSerializedInventoryByScans(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getHistoricNonSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException;
272
 
273
    public void scanForOursExternalSale(long itemId, String serialNumber, String itemNumber, String invoiceNumber, long warehouseId, double unitPrice, long orderId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanForOursExternalSale_call> resultHandler) throws org.apache.thrift.TException;
274
 
275
    public void scanForOursExternalSaleReturn(long orderId, double unitPrice, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanForOursExternalSaleReturn_call> resultHandler) throws org.apache.thrift.TException;
276
 
6880 amar.kumar 277
    public void getMovementNonSerializedInventoryByScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getMovementNonSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException;
278
 
279
    public void getMovementSerializedInventoryByScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getMovementSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException;
280
 
7190 amar.kumar 281
    public void scanfreebie(long orderId, long freebieItemId, long freebieWarehouseId, ScanType scanType, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanfreebie_call> resultHandler) throws org.apache.thrift.TException;
282
 
7199 amar.kumar 283
    public void reshipfreebie(long oldOrderId, long newOrderId, long freebieItemId, ScanType scanType, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.reshipfreebie_call> resultHandler) throws org.apache.thrift.TException;
284
 
3430 rajveer 285
  }
286
 
3374 rajveer 287
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
3430 rajveer 288
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
289
      public Factory() {}
290
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
291
        return new Client(prot);
292
      }
293
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
294
        return new Client(iprot, oprot);
295
      }
296
    }
297
 
298
    public Client(org.apache.thrift.protocol.TProtocol prot)
2820 chandransh 299
    {
3430 rajveer 300
      super(prot, prot);
2820 chandransh 301
    }
302
 
3430 rajveer 303
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
3374 rajveer 304
      super(iprot, oprot);
2820 chandransh 305
    }
306
 
4541 mandeep.dh 307
    public InventoryItem getInventoryItem(String serialNumber) throws WarehouseServiceException, org.apache.thrift.TException
2832 chandransh 308
    {
4496 mandeep.dh 309
      send_getInventoryItem(serialNumber);
310
      return recv_getInventoryItem();
2832 chandransh 311
    }
312
 
4496 mandeep.dh 313
    public void send_getInventoryItem(String serialNumber) throws org.apache.thrift.TException
2832 chandransh 314
    {
4496 mandeep.dh 315
      getInventoryItem_args args = new getInventoryItem_args();
316
      args.setSerialNumber(serialNumber);
317
      sendBase("getInventoryItem", args);
2832 chandransh 318
    }
319
 
4541 mandeep.dh 320
    public InventoryItem recv_getInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException
2832 chandransh 321
    {
4496 mandeep.dh 322
      getInventoryItem_result result = new getInventoryItem_result();
323
      receiveBase(result, "getInventoryItem");
2832 chandransh 324
      if (result.isSetSuccess()) {
325
        return result.success;
326
      }
4541 mandeep.dh 327
      if (result.wex != null) {
328
        throw result.wex;
329
      }
4496 mandeep.dh 330
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItem failed: unknown result");
331
    }
332
 
5530 mandeep.dh 333
    public InventoryItem getNonSeralizedInventoryItem(String itemNumber, long itemId, long fulfilmentWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 334
    {
5530 mandeep.dh 335
      send_getNonSeralizedInventoryItem(itemNumber, itemId, fulfilmentWarehouseId);
5361 mandeep.dh 336
      return recv_getNonSeralizedInventoryItem();
4496 mandeep.dh 337
    }
338
 
5530 mandeep.dh 339
    public void send_getNonSeralizedInventoryItem(String itemNumber, long itemId, long fulfilmentWarehouseId) throws org.apache.thrift.TException
4496 mandeep.dh 340
    {
5361 mandeep.dh 341
      getNonSeralizedInventoryItem_args args = new getNonSeralizedInventoryItem_args();
5530 mandeep.dh 342
      args.setItemNumber(itemNumber);
4496 mandeep.dh 343
      args.setItemId(itemId);
5530 mandeep.dh 344
      args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
5361 mandeep.dh 345
      sendBase("getNonSeralizedInventoryItem", args);
4496 mandeep.dh 346
    }
347
 
5361 mandeep.dh 348
    public InventoryItem recv_getNonSeralizedInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 349
    {
5361 mandeep.dh 350
      getNonSeralizedInventoryItem_result result = new getNonSeralizedInventoryItem_result();
351
      receiveBase(result, "getNonSeralizedInventoryItem");
4496 mandeep.dh 352
      if (result.isSetSuccess()) {
353
        return result.success;
2832 chandransh 354
      }
5361 mandeep.dh 355
      if (result.wex != null) {
356
        throw result.wex;
2820 chandransh 357
      }
5361 mandeep.dh 358
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getNonSeralizedInventoryItem failed: unknown result");
4496 mandeep.dh 359
    }
360
 
5361 mandeep.dh 361
    public void scan(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 362
    {
5361 mandeep.dh 363
      send_scan(inventoryItem, type, quantity, billingWarehouseId);
4496 mandeep.dh 364
      recv_scan();
3383 chandransh 365
    }
366
 
5361 mandeep.dh 367
    public void send_scan(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId) throws org.apache.thrift.TException
3383 chandransh 368
    {
4496 mandeep.dh 369
      scan_args args = new scan_args();
5361 mandeep.dh 370
      args.setInventoryItem(inventoryItem);
4496 mandeep.dh 371
      args.setType(type);
372
      args.setQuantity(quantity);
5361 mandeep.dh 373
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 374
      sendBase("scan", args);
3383 chandransh 375
    }
376
 
4496 mandeep.dh 377
    public void recv_scan() throws WarehouseServiceException, org.apache.thrift.TException
3383 chandransh 378
    {
4496 mandeep.dh 379
      scan_result result = new scan_result();
380
      receiveBase(result, "scan");
381
      if (result.wex != null) {
382
        throw result.wex;
383
      }
384
      return;
385
    }
386
 
5110 mandeep.dh 387
    public InventoryItem scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 388
    {
5110 mandeep.dh 389
      send_scanSerializedItemForOrder(serialNumber, type, orderId, fulfilmentWarehouseId, quantity, billingWarehouseId);
4496 mandeep.dh 390
      return recv_scanSerializedItemForOrder();
391
    }
392
 
5110 mandeep.dh 393
    public void send_scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId) throws org.apache.thrift.TException
4496 mandeep.dh 394
    {
395
      scanSerializedItemForOrder_args args = new scanSerializedItemForOrder_args();
4555 mandeep.dh 396
      args.setSerialNumber(serialNumber);
4496 mandeep.dh 397
      args.setType(type);
398
      args.setOrderId(orderId);
5110 mandeep.dh 399
      args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
400
      args.setQuantity(quantity);
401
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 402
      sendBase("scanSerializedItemForOrder", args);
403
    }
404
 
4555 mandeep.dh 405
    public InventoryItem recv_scanSerializedItemForOrder() throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 406
    {
407
      scanSerializedItemForOrder_result result = new scanSerializedItemForOrder_result();
408
      receiveBase(result, "scanSerializedItemForOrder");
3383 chandransh 409
      if (result.isSetSuccess()) {
410
        return result.success;
411
      }
412
      if (result.wex != null) {
413
        throw result.wex;
414
      }
4496 mandeep.dh 415
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scanSerializedItemForOrder failed: unknown result");
3383 chandransh 416
    }
417
 
5361 mandeep.dh 418
    public InventoryItem scanForOrder(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
3383 chandransh 419
    {
5361 mandeep.dh 420
      send_scanForOrder(inventoryItem, type, quantity, orderId, fulfilmentWarehouseId, billingWarehouseId);
421
      return recv_scanForOrder();
2820 chandransh 422
    }
423
 
5361 mandeep.dh 424
    public void send_scanForOrder(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId) throws org.apache.thrift.TException
2820 chandransh 425
    {
4496 mandeep.dh 426
      scanForOrder_args args = new scanForOrder_args();
5361 mandeep.dh 427
      args.setInventoryItem(inventoryItem);
3430 rajveer 428
      args.setType(type);
4496 mandeep.dh 429
      args.setQuantity(quantity);
430
      args.setOrderId(orderId);
5110 mandeep.dh 431
      args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
5361 mandeep.dh 432
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 433
      sendBase("scanForOrder", args);
2820 chandransh 434
    }
435
 
5361 mandeep.dh 436
    public InventoryItem recv_scanForOrder() throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 437
    {
4496 mandeep.dh 438
      scanForOrder_result result = new scanForOrder_result();
439
      receiveBase(result, "scanForOrder");
5361 mandeep.dh 440
      if (result.isSetSuccess()) {
441
        return result.success;
442
      }
2820 chandransh 443
      if (result.wex != null) {
444
        throw result.wex;
445
      }
5361 mandeep.dh 446
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scanForOrder failed: unknown result");
2820 chandransh 447
    }
448
 
4496 mandeep.dh 449
    public void createItemNumberMapping(String itemNumber, long itemId) throws org.apache.thrift.TException
2820 chandransh 450
    {
4496 mandeep.dh 451
      send_createItemNumberMapping(itemNumber, itemId);
452
      recv_createItemNumberMapping();
2820 chandransh 453
    }
454
 
4496 mandeep.dh 455
    public void send_createItemNumberMapping(String itemNumber, long itemId) throws org.apache.thrift.TException
2820 chandransh 456
    {
4496 mandeep.dh 457
      createItemNumberMapping_args args = new createItemNumberMapping_args();
3430 rajveer 458
      args.setItemNumber(itemNumber);
4496 mandeep.dh 459
      args.setItemId(itemId);
460
      sendBase("createItemNumberMapping", args);
2820 chandransh 461
    }
462
 
4496 mandeep.dh 463
    public void recv_createItemNumberMapping() throws org.apache.thrift.TException
2820 chandransh 464
    {
4496 mandeep.dh 465
      createItemNumberMapping_result result = new createItemNumberMapping_result();
466
      receiveBase(result, "createItemNumberMapping");
2820 chandransh 467
      return;
468
    }
469
 
4622 amit.gupta 470
    public List<String> getItemNumbers(long itemId) throws org.apache.thrift.TException
471
    {
472
      send_getItemNumbers(itemId);
473
      return recv_getItemNumbers();
474
    }
475
 
476
    public void send_getItemNumbers(long itemId) throws org.apache.thrift.TException
477
    {
478
      getItemNumbers_args args = new getItemNumbers_args();
479
      args.setItemId(itemId);
480
      sendBase("getItemNumbers", args);
481
    }
482
 
483
    public List<String> recv_getItemNumbers() throws org.apache.thrift.TException
484
    {
485
      getItemNumbers_result result = new getItemNumbers_result();
486
      receiveBase(result, "getItemNumbers");
487
      if (result.isSetSuccess()) {
488
        return result.success;
489
      }
490
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemNumbers failed: unknown result");
491
    }
492
 
5110 mandeep.dh 493
    public List<Long> getItemIds(String itemNumber) throws org.apache.thrift.TException
494
    {
495
      send_getItemIds(itemNumber);
496
      return recv_getItemIds();
497
    }
498
 
499
    public void send_getItemIds(String itemNumber) throws org.apache.thrift.TException
500
    {
501
      getItemIds_args args = new getItemIds_args();
502
      args.setItemNumber(itemNumber);
503
      sendBase("getItemIds", args);
504
    }
505
 
506
    public List<Long> recv_getItemIds() throws org.apache.thrift.TException
507
    {
508
      getItemIds_result result = new getItemIds_result();
509
      receiveBase(result, "getItemIds");
510
      if (result.isSetSuccess()) {
511
        return result.success;
512
      }
513
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemIds failed: unknown result");
514
    }
515
 
5185 mandeep.dh 516
    public List<InventoryItem> getInventoryItemsFromLastScanType(ScanType lastScanType) throws WarehouseServiceException, org.apache.thrift.TException
517
    {
518
      send_getInventoryItemsFromLastScanType(lastScanType);
519
      return recv_getInventoryItemsFromLastScanType();
520
    }
521
 
522
    public void send_getInventoryItemsFromLastScanType(ScanType lastScanType) throws org.apache.thrift.TException
523
    {
524
      getInventoryItemsFromLastScanType_args args = new getInventoryItemsFromLastScanType_args();
525
      args.setLastScanType(lastScanType);
526
      sendBase("getInventoryItemsFromLastScanType", args);
527
    }
528
 
529
    public List<InventoryItem> recv_getInventoryItemsFromLastScanType() throws WarehouseServiceException, org.apache.thrift.TException
530
    {
531
      getInventoryItemsFromLastScanType_result result = new getInventoryItemsFromLastScanType_result();
532
      receiveBase(result, "getInventoryItemsFromLastScanType");
533
      if (result.isSetSuccess()) {
534
        return result.success;
535
      }
536
      if (result.wex != null) {
537
        throw result.wex;
538
      }
539
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItemsFromLastScanType failed: unknown result");
540
    }
541
 
542
    public InventoryItem getInventoryItemFromId(long inventoryItemId) throws WarehouseServiceException, org.apache.thrift.TException
543
    {
544
      send_getInventoryItemFromId(inventoryItemId);
545
      return recv_getInventoryItemFromId();
546
    }
547
 
548
    public void send_getInventoryItemFromId(long inventoryItemId) throws org.apache.thrift.TException
549
    {
550
      getInventoryItemFromId_args args = new getInventoryItemFromId_args();
551
      args.setInventoryItemId(inventoryItemId);
552
      sendBase("getInventoryItemFromId", args);
553
    }
554
 
555
    public InventoryItem recv_getInventoryItemFromId() throws WarehouseServiceException, org.apache.thrift.TException
556
    {
557
      getInventoryItemFromId_result result = new getInventoryItemFromId_result();
558
      receiveBase(result, "getInventoryItemFromId");
559
      if (result.isSetSuccess()) {
560
        return result.success;
561
      }
562
      if (result.wex != null) {
563
        throw result.wex;
564
      }
565
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItemFromId failed: unknown result");
566
    }
567
 
5372 mandeep.dh 568
    public List<DetailedPurchaseScan> getPurchaseScans(long startDate, long endDate) throws org.apache.thrift.TException
569
    {
570
      send_getPurchaseScans(startDate, endDate);
571
      return recv_getPurchaseScans();
572
    }
573
 
574
    public void send_getPurchaseScans(long startDate, long endDate) throws org.apache.thrift.TException
575
    {
576
      getPurchaseScans_args args = new getPurchaseScans_args();
577
      args.setStartDate(startDate);
578
      args.setEndDate(endDate);
579
      sendBase("getPurchaseScans", args);
580
    }
581
 
582
    public List<DetailedPurchaseScan> recv_getPurchaseScans() throws org.apache.thrift.TException
583
    {
584
      getPurchaseScans_result result = new getPurchaseScans_result();
585
      receiveBase(result, "getPurchaseScans");
586
      if (result.isSetSuccess()) {
587
        return result.success;
588
      }
589
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseScans failed: unknown result");
590
    }
591
 
5496 mandeep.dh 592
    public List<InvoiceScan> fetchScansPerInvoiceNumber(long date) throws org.apache.thrift.TException
593
    {
594
      send_fetchScansPerInvoiceNumber(date);
595
      return recv_fetchScansPerInvoiceNumber();
596
    }
597
 
598
    public void send_fetchScansPerInvoiceNumber(long date) throws org.apache.thrift.TException
599
    {
600
      fetchScansPerInvoiceNumber_args args = new fetchScansPerInvoiceNumber_args();
601
      args.setDate(date);
602
      sendBase("fetchScansPerInvoiceNumber", args);
603
    }
604
 
605
    public List<InvoiceScan> recv_fetchScansPerInvoiceNumber() throws org.apache.thrift.TException
606
    {
607
      fetchScansPerInvoiceNumber_result result = new fetchScansPerInvoiceNumber_result();
608
      receiveBase(result, "fetchScansPerInvoiceNumber");
609
      if (result.isSetSuccess()) {
610
        return result.success;
611
      }
612
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "fetchScansPerInvoiceNumber failed: unknown result");
613
    }
614
 
5620 mandeep.dh 615
    public InventoryItem getInventoryItemFromOrder(long orderId) throws WarehouseServiceException, org.apache.thrift.TException
616
    {
617
      send_getInventoryItemFromOrder(orderId);
618
      return recv_getInventoryItemFromOrder();
619
    }
620
 
621
    public void send_getInventoryItemFromOrder(long orderId) throws org.apache.thrift.TException
622
    {
623
      getInventoryItemFromOrder_args args = new getInventoryItemFromOrder_args();
624
      args.setOrderId(orderId);
625
      sendBase("getInventoryItemFromOrder", args);
626
    }
627
 
628
    public InventoryItem recv_getInventoryItemFromOrder() throws WarehouseServiceException, org.apache.thrift.TException
629
    {
630
      getInventoryItemFromOrder_result result = new getInventoryItemFromOrder_result();
631
      receiveBase(result, "getInventoryItemFromOrder");
632
      if (result.isSetSuccess()) {
633
        return result.success;
634
      }
635
      if (result.we != null) {
636
        throw result.we;
637
      }
638
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItemFromOrder failed: unknown result");
639
    }
640
 
5711 mandeep.dh 641
    public List<InventoryAge> getInventoryAge() throws org.apache.thrift.TException
642
    {
643
      send_getInventoryAge();
644
      return recv_getInventoryAge();
645
    }
646
 
647
    public void send_getInventoryAge() throws org.apache.thrift.TException
648
    {
649
      getInventoryAge_args args = new getInventoryAge_args();
650
      sendBase("getInventoryAge", args);
651
    }
652
 
653
    public List<InventoryAge> recv_getInventoryAge() throws org.apache.thrift.TException
654
    {
655
      getInventoryAge_result result = new getInventoryAge_result();
656
      receiveBase(result, "getInventoryAge");
657
      if (result.isSetSuccess()) {
658
        return result.success;
659
      }
660
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryAge failed: unknown result");
661
    }
662
 
6322 amar.kumar 663
    public List<Scan> getInventoryScansForItem(long itemId, long fromDate, long toDate) throws org.apache.thrift.TException
664
    {
665
      send_getInventoryScansForItem(itemId, fromDate, toDate);
666
      return recv_getInventoryScansForItem();
667
    }
668
 
669
    public void send_getInventoryScansForItem(long itemId, long fromDate, long toDate) throws org.apache.thrift.TException
670
    {
671
      getInventoryScansForItem_args args = new getInventoryScansForItem_args();
672
      args.setItemId(itemId);
673
      args.setFromDate(fromDate);
674
      args.setToDate(toDate);
675
      sendBase("getInventoryScansForItem", args);
676
    }
677
 
678
    public List<Scan> recv_getInventoryScansForItem() throws org.apache.thrift.TException
679
    {
680
      getInventoryScansForItem_result result = new getInventoryScansForItem_result();
681
      receiveBase(result, "getInventoryScansForItem");
682
      if (result.isSetSuccess()) {
683
        return result.success;
684
      }
685
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryScansForItem failed: unknown result");
686
    }
687
 
688
    public List<Scan> getScanRecordsForSerialNumber(long serialNumber) throws org.apache.thrift.TException
689
    {
690
      send_getScanRecordsForSerialNumber(serialNumber);
691
      return recv_getScanRecordsForSerialNumber();
692
    }
693
 
694
    public void send_getScanRecordsForSerialNumber(long serialNumber) throws org.apache.thrift.TException
695
    {
696
      getScanRecordsForSerialNumber_args args = new getScanRecordsForSerialNumber_args();
697
      args.setSerialNumber(serialNumber);
698
      sendBase("getScanRecordsForSerialNumber", args);
699
    }
700
 
701
    public List<Scan> recv_getScanRecordsForSerialNumber() throws org.apache.thrift.TException
702
    {
703
      getScanRecordsForSerialNumber_result result = new getScanRecordsForSerialNumber_result();
704
      receiveBase(result, "getScanRecordsForSerialNumber");
705
      if (result.isSetSuccess()) {
706
        return result.success;
707
      }
708
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getScanRecordsForSerialNumber failed: unknown result");
709
    }
710
 
6467 amar.kumar 711
    public void scanForPurchaseReturn(List<InventoryItem> saleReturnItems, long vendorId) throws WarehouseServiceException, org.apache.thrift.TException
712
    {
713
      send_scanForPurchaseReturn(saleReturnItems, vendorId);
714
      recv_scanForPurchaseReturn();
715
    }
716
 
717
    public void send_scanForPurchaseReturn(List<InventoryItem> saleReturnItems, long vendorId) throws org.apache.thrift.TException
718
    {
719
      scanForPurchaseReturn_args args = new scanForPurchaseReturn_args();
720
      args.setSaleReturnItems(saleReturnItems);
721
      args.setVendorId(vendorId);
722
      sendBase("scanForPurchaseReturn", args);
723
    }
724
 
725
    public void recv_scanForPurchaseReturn() throws WarehouseServiceException, org.apache.thrift.TException
726
    {
727
      scanForPurchaseReturn_result result = new scanForPurchaseReturn_result();
728
      receiveBase(result, "scanForPurchaseReturn");
729
      if (result.ex != null) {
730
        throw result.ex;
731
      }
732
      return;
733
    }
734
 
6548 amar.kumar 735
    public void scanForLostItem(List<InventoryItem> lostItems, long vendorId) throws WarehouseServiceException, org.apache.thrift.TException
736
    {
737
      send_scanForLostItem(lostItems, vendorId);
738
      recv_scanForLostItem();
739
    }
740
 
741
    public void send_scanForLostItem(List<InventoryItem> lostItems, long vendorId) throws org.apache.thrift.TException
742
    {
743
      scanForLostItem_args args = new scanForLostItem_args();
744
      args.setLostItems(lostItems);
745
      args.setVendorId(vendorId);
746
      sendBase("scanForLostItem", args);
747
    }
748
 
749
    public void recv_scanForLostItem() throws WarehouseServiceException, org.apache.thrift.TException
750
    {
751
      scanForLostItem_result result = new scanForLostItem_result();
752
      receiveBase(result, "scanForLostItem");
753
      if (result.ex != null) {
754
        throw result.ex;
755
      }
756
      return;
757
    }
758
 
759
    public List<InventoryAvailability> getCurrentSerializedInventoryByScans() throws org.apache.thrift.TException
760
    {
761
      send_getCurrentSerializedInventoryByScans();
762
      return recv_getCurrentSerializedInventoryByScans();
763
    }
764
 
765
    public void send_getCurrentSerializedInventoryByScans() throws org.apache.thrift.TException
766
    {
767
      getCurrentSerializedInventoryByScans_args args = new getCurrentSerializedInventoryByScans_args();
768
      sendBase("getCurrentSerializedInventoryByScans", args);
769
    }
770
 
771
    public List<InventoryAvailability> recv_getCurrentSerializedInventoryByScans() throws org.apache.thrift.TException
772
    {
773
      getCurrentSerializedInventoryByScans_result result = new getCurrentSerializedInventoryByScans_result();
774
      receiveBase(result, "getCurrentSerializedInventoryByScans");
775
      if (result.isSetSuccess()) {
776
        return result.success;
777
      }
778
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCurrentSerializedInventoryByScans failed: unknown result");
779
    }
780
 
6630 amar.kumar 781
    public List<InventoryAvailability> getCurrentNonSerializedInventoryByScans() throws org.apache.thrift.TException
782
    {
783
      send_getCurrentNonSerializedInventoryByScans();
784
      return recv_getCurrentNonSerializedInventoryByScans();
785
    }
786
 
787
    public void send_getCurrentNonSerializedInventoryByScans() throws org.apache.thrift.TException
788
    {
789
      getCurrentNonSerializedInventoryByScans_args args = new getCurrentNonSerializedInventoryByScans_args();
790
      sendBase("getCurrentNonSerializedInventoryByScans", args);
791
    }
792
 
793
    public List<InventoryAvailability> recv_getCurrentNonSerializedInventoryByScans() throws org.apache.thrift.TException
794
    {
795
      getCurrentNonSerializedInventoryByScans_result result = new getCurrentNonSerializedInventoryByScans_result();
796
      receiveBase(result, "getCurrentNonSerializedInventoryByScans");
797
      if (result.isSetSuccess()) {
798
        return result.success;
799
      }
800
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCurrentNonSerializedInventoryByScans failed: unknown result");
801
    }
802
 
6762 amar.kumar 803
    public List<InventoryAvailability> getHistoricSerializedInventoryByScans(long date) throws org.apache.thrift.TException
804
    {
805
      send_getHistoricSerializedInventoryByScans(date);
806
      return recv_getHistoricSerializedInventoryByScans();
807
    }
808
 
809
    public void send_getHistoricSerializedInventoryByScans(long date) throws org.apache.thrift.TException
810
    {
811
      getHistoricSerializedInventoryByScans_args args = new getHistoricSerializedInventoryByScans_args();
812
      args.setDate(date);
813
      sendBase("getHistoricSerializedInventoryByScans", args);
814
    }
815
 
816
    public List<InventoryAvailability> recv_getHistoricSerializedInventoryByScans() throws org.apache.thrift.TException
817
    {
818
      getHistoricSerializedInventoryByScans_result result = new getHistoricSerializedInventoryByScans_result();
819
      receiveBase(result, "getHistoricSerializedInventoryByScans");
820
      if (result.isSetSuccess()) {
821
        return result.success;
822
      }
823
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getHistoricSerializedInventoryByScans failed: unknown result");
824
    }
825
 
826
    public List<InventoryAvailability> getHistoricNonSerializedInventoryByScans(long date) throws org.apache.thrift.TException
827
    {
828
      send_getHistoricNonSerializedInventoryByScans(date);
829
      return recv_getHistoricNonSerializedInventoryByScans();
830
    }
831
 
832
    public void send_getHistoricNonSerializedInventoryByScans(long date) throws org.apache.thrift.TException
833
    {
834
      getHistoricNonSerializedInventoryByScans_args args = new getHistoricNonSerializedInventoryByScans_args();
835
      args.setDate(date);
836
      sendBase("getHistoricNonSerializedInventoryByScans", args);
837
    }
838
 
839
    public List<InventoryAvailability> recv_getHistoricNonSerializedInventoryByScans() throws org.apache.thrift.TException
840
    {
841
      getHistoricNonSerializedInventoryByScans_result result = new getHistoricNonSerializedInventoryByScans_result();
842
      receiveBase(result, "getHistoricNonSerializedInventoryByScans");
843
      if (result.isSetSuccess()) {
844
        return result.success;
845
      }
846
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getHistoricNonSerializedInventoryByScans failed: unknown result");
847
    }
848
 
849
    public InventoryItem scanForOursExternalSale(long itemId, String serialNumber, String itemNumber, String invoiceNumber, long warehouseId, double unitPrice, long orderId) throws WarehouseServiceException, org.apache.thrift.TException
850
    {
851
      send_scanForOursExternalSale(itemId, serialNumber, itemNumber, invoiceNumber, warehouseId, unitPrice, orderId);
852
      return recv_scanForOursExternalSale();
853
    }
854
 
855
    public void send_scanForOursExternalSale(long itemId, String serialNumber, String itemNumber, String invoiceNumber, long warehouseId, double unitPrice, long orderId) throws org.apache.thrift.TException
856
    {
857
      scanForOursExternalSale_args args = new scanForOursExternalSale_args();
858
      args.setItemId(itemId);
859
      args.setSerialNumber(serialNumber);
860
      args.setItemNumber(itemNumber);
861
      args.setInvoiceNumber(invoiceNumber);
862
      args.setWarehouseId(warehouseId);
863
      args.setUnitPrice(unitPrice);
864
      args.setOrderId(orderId);
865
      sendBase("scanForOursExternalSale", args);
866
    }
867
 
868
    public InventoryItem recv_scanForOursExternalSale() throws WarehouseServiceException, org.apache.thrift.TException
869
    {
870
      scanForOursExternalSale_result result = new scanForOursExternalSale_result();
871
      receiveBase(result, "scanForOursExternalSale");
872
      if (result.isSetSuccess()) {
873
        return result.success;
874
      }
875
      if (result.ex != null) {
876
        throw result.ex;
877
      }
878
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scanForOursExternalSale failed: unknown result");
879
    }
880
 
881
    public void scanForOursExternalSaleReturn(long orderId, double unitPrice) throws org.apache.thrift.TException
882
    {
883
      send_scanForOursExternalSaleReturn(orderId, unitPrice);
884
      recv_scanForOursExternalSaleReturn();
885
    }
886
 
887
    public void send_scanForOursExternalSaleReturn(long orderId, double unitPrice) throws org.apache.thrift.TException
888
    {
889
      scanForOursExternalSaleReturn_args args = new scanForOursExternalSaleReturn_args();
890
      args.setOrderId(orderId);
891
      args.setUnitPrice(unitPrice);
892
      sendBase("scanForOursExternalSaleReturn", args);
893
    }
894
 
895
    public void recv_scanForOursExternalSaleReturn() throws org.apache.thrift.TException
896
    {
897
      scanForOursExternalSaleReturn_result result = new scanForOursExternalSaleReturn_result();
898
      receiveBase(result, "scanForOursExternalSaleReturn");
899
      return;
900
    }
901
 
6880 amar.kumar 902
    public List<InventoryMovement> getMovementNonSerializedInventoryByScans(long startDate, long endDate) throws org.apache.thrift.TException
903
    {
904
      send_getMovementNonSerializedInventoryByScans(startDate, endDate);
905
      return recv_getMovementNonSerializedInventoryByScans();
906
    }
907
 
908
    public void send_getMovementNonSerializedInventoryByScans(long startDate, long endDate) throws org.apache.thrift.TException
909
    {
910
      getMovementNonSerializedInventoryByScans_args args = new getMovementNonSerializedInventoryByScans_args();
911
      args.setStartDate(startDate);
912
      args.setEndDate(endDate);
913
      sendBase("getMovementNonSerializedInventoryByScans", args);
914
    }
915
 
916
    public List<InventoryMovement> recv_getMovementNonSerializedInventoryByScans() throws org.apache.thrift.TException
917
    {
918
      getMovementNonSerializedInventoryByScans_result result = new getMovementNonSerializedInventoryByScans_result();
919
      receiveBase(result, "getMovementNonSerializedInventoryByScans");
920
      if (result.isSetSuccess()) {
921
        return result.success;
922
      }
923
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getMovementNonSerializedInventoryByScans failed: unknown result");
924
    }
925
 
926
    public List<InventoryMovement> getMovementSerializedInventoryByScans(long startDate, long endDate) throws org.apache.thrift.TException
927
    {
928
      send_getMovementSerializedInventoryByScans(startDate, endDate);
929
      return recv_getMovementSerializedInventoryByScans();
930
    }
931
 
932
    public void send_getMovementSerializedInventoryByScans(long startDate, long endDate) throws org.apache.thrift.TException
933
    {
934
      getMovementSerializedInventoryByScans_args args = new getMovementSerializedInventoryByScans_args();
935
      args.setStartDate(startDate);
936
      args.setEndDate(endDate);
937
      sendBase("getMovementSerializedInventoryByScans", args);
938
    }
939
 
940
    public List<InventoryMovement> recv_getMovementSerializedInventoryByScans() throws org.apache.thrift.TException
941
    {
942
      getMovementSerializedInventoryByScans_result result = new getMovementSerializedInventoryByScans_result();
943
      receiveBase(result, "getMovementSerializedInventoryByScans");
944
      if (result.isSetSuccess()) {
945
        return result.success;
946
      }
947
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getMovementSerializedInventoryByScans failed: unknown result");
948
    }
949
 
7190 amar.kumar 950
    public InventoryItem scanfreebie(long orderId, long freebieItemId, long freebieWarehouseId, ScanType scanType) throws WarehouseServiceException, org.apache.thrift.TException
951
    {
952
      send_scanfreebie(orderId, freebieItemId, freebieWarehouseId, scanType);
953
      return recv_scanfreebie();
954
    }
955
 
956
    public void send_scanfreebie(long orderId, long freebieItemId, long freebieWarehouseId, ScanType scanType) throws org.apache.thrift.TException
957
    {
958
      scanfreebie_args args = new scanfreebie_args();
959
      args.setOrderId(orderId);
960
      args.setFreebieItemId(freebieItemId);
961
      args.setFreebieWarehouseId(freebieWarehouseId);
962
      args.setScanType(scanType);
963
      sendBase("scanfreebie", args);
964
    }
965
 
966
    public InventoryItem recv_scanfreebie() throws WarehouseServiceException, org.apache.thrift.TException
967
    {
968
      scanfreebie_result result = new scanfreebie_result();
969
      receiveBase(result, "scanfreebie");
970
      if (result.isSetSuccess()) {
971
        return result.success;
972
      }
973
      if (result.wex != null) {
974
        throw result.wex;
975
      }
976
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scanfreebie failed: unknown result");
977
    }
978
 
7199 amar.kumar 979
    public void reshipfreebie(long oldOrderId, long newOrderId, long freebieItemId, ScanType scanType) throws WarehouseServiceException, org.apache.thrift.TException
980
    {
981
      send_reshipfreebie(oldOrderId, newOrderId, freebieItemId, scanType);
982
      recv_reshipfreebie();
983
    }
984
 
985
    public void send_reshipfreebie(long oldOrderId, long newOrderId, long freebieItemId, ScanType scanType) throws org.apache.thrift.TException
986
    {
987
      reshipfreebie_args args = new reshipfreebie_args();
988
      args.setOldOrderId(oldOrderId);
989
      args.setNewOrderId(newOrderId);
990
      args.setFreebieItemId(freebieItemId);
991
      args.setScanType(scanType);
992
      sendBase("reshipfreebie", args);
993
    }
994
 
995
    public void recv_reshipfreebie() throws WarehouseServiceException, org.apache.thrift.TException
996
    {
997
      reshipfreebie_result result = new reshipfreebie_result();
998
      receiveBase(result, "reshipfreebie");
999
      if (result.wex != null) {
1000
        throw result.wex;
1001
      }
1002
      return;
1003
    }
1004
 
2820 chandransh 1005
  }
3430 rajveer 1006
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
1007
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
1008
      private org.apache.thrift.async.TAsyncClientManager clientManager;
1009
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
1010
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
1011
        this.clientManager = clientManager;
1012
        this.protocolFactory = protocolFactory;
1013
      }
1014
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
1015
        return new AsyncClient(protocolFactory, clientManager, transport);
1016
      }
2820 chandransh 1017
    }
1018
 
3430 rajveer 1019
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
1020
      super(protocolFactory, clientManager, transport);
1021
    }
2820 chandransh 1022
 
4496 mandeep.dh 1023
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<getInventoryItem_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 1024
      checkReady();
4496 mandeep.dh 1025
      getInventoryItem_call method_call = new getInventoryItem_call(serialNumber, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 1026
      this.___currentMethod = method_call;
1027
      ___manager.call(method_call);
1028
    }
1029
 
4496 mandeep.dh 1030
    public static class getInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {
1031
      private String serialNumber;
1032
      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 1033
        super(client, protocolFactory, transport, resultHandler, false);
4496 mandeep.dh 1034
        this.serialNumber = serialNumber;
3430 rajveer 1035
      }
1036
 
1037
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 1038
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
1039
        getInventoryItem_args args = new getInventoryItem_args();
1040
        args.setSerialNumber(serialNumber);
3430 rajveer 1041
        args.write(prot);
1042
        prot.writeMessageEnd();
1043
      }
1044
 
4541 mandeep.dh 1045
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
3430 rajveer 1046
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1047
          throw new IllegalStateException("Method call not finished!");
1048
        }
1049
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1050
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 1051
        return (new Client(prot)).recv_getInventoryItem();
3430 rajveer 1052
      }
1053
    }
1054
 
5530 mandeep.dh 1055
    public void getNonSeralizedInventoryItem(String itemNumber, long itemId, long fulfilmentWarehouseId, org.apache.thrift.async.AsyncMethodCallback<getNonSeralizedInventoryItem_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 1056
      checkReady();
5530 mandeep.dh 1057
      getNonSeralizedInventoryItem_call method_call = new getNonSeralizedInventoryItem_call(itemNumber, itemId, fulfilmentWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 1058
      this.___currentMethod = method_call;
1059
      ___manager.call(method_call);
1060
    }
1061
 
5361 mandeep.dh 1062
    public static class getNonSeralizedInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {
5530 mandeep.dh 1063
      private String itemNumber;
4496 mandeep.dh 1064
      private long itemId;
5530 mandeep.dh 1065
      private long fulfilmentWarehouseId;
1066
      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 1067
        super(client, protocolFactory, transport, resultHandler, false);
5530 mandeep.dh 1068
        this.itemNumber = itemNumber;
4496 mandeep.dh 1069
        this.itemId = itemId;
5530 mandeep.dh 1070
        this.fulfilmentWarehouseId = fulfilmentWarehouseId;
3430 rajveer 1071
      }
1072
 
1073
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
5361 mandeep.dh 1074
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getNonSeralizedInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
1075
        getNonSeralizedInventoryItem_args args = new getNonSeralizedInventoryItem_args();
5530 mandeep.dh 1076
        args.setItemNumber(itemNumber);
4496 mandeep.dh 1077
        args.setItemId(itemId);
5530 mandeep.dh 1078
        args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
3430 rajveer 1079
        args.write(prot);
1080
        prot.writeMessageEnd();
1081
      }
1082
 
5361 mandeep.dh 1083
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
3430 rajveer 1084
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1085
          throw new IllegalStateException("Method call not finished!");
1086
        }
1087
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1088
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
5361 mandeep.dh 1089
        return (new Client(prot)).recv_getNonSeralizedInventoryItem();
3430 rajveer 1090
      }
1091
    }
1092
 
5361 mandeep.dh 1093
    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 1094
      checkReady();
5361 mandeep.dh 1095
      scan_call method_call = new scan_call(inventoryItem, type, quantity, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 1096
      this.___currentMethod = method_call;
1097
      ___manager.call(method_call);
1098
    }
1099
 
4496 mandeep.dh 1100
    public static class scan_call extends org.apache.thrift.async.TAsyncMethodCall {
5361 mandeep.dh 1101
      private InventoryItem inventoryItem;
3430 rajveer 1102
      private ScanType type;
4496 mandeep.dh 1103
      private long quantity;
5361 mandeep.dh 1104
      private long billingWarehouseId;
1105
      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 1106
        super(client, protocolFactory, transport, resultHandler, false);
5361 mandeep.dh 1107
        this.inventoryItem = inventoryItem;
3430 rajveer 1108
        this.type = type;
4496 mandeep.dh 1109
        this.quantity = quantity;
5361 mandeep.dh 1110
        this.billingWarehouseId = billingWarehouseId;
3430 rajveer 1111
      }
1112
 
1113
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 1114
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scan", org.apache.thrift.protocol.TMessageType.CALL, 0));
1115
        scan_args args = new scan_args();
5361 mandeep.dh 1116
        args.setInventoryItem(inventoryItem);
3430 rajveer 1117
        args.setType(type);
4496 mandeep.dh 1118
        args.setQuantity(quantity);
5361 mandeep.dh 1119
        args.setBillingWarehouseId(billingWarehouseId);
3430 rajveer 1120
        args.write(prot);
1121
        prot.writeMessageEnd();
1122
      }
1123
 
1124
      public void getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1125
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1126
          throw new IllegalStateException("Method call not finished!");
1127
        }
1128
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1129
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 1130
        (new Client(prot)).recv_scan();
3430 rajveer 1131
      }
1132
    }
1133
 
5110 mandeep.dh 1134
    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 1135
      checkReady();
5110 mandeep.dh 1136
      scanSerializedItemForOrder_call method_call = new scanSerializedItemForOrder_call(serialNumber, type, orderId, fulfilmentWarehouseId, quantity, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 1137
      this.___currentMethod = method_call;
1138
      ___manager.call(method_call);
1139
    }
1140
 
1141
    public static class scanSerializedItemForOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
4555 mandeep.dh 1142
      private String serialNumber;
4496 mandeep.dh 1143
      private ScanType type;
1144
      private long orderId;
5110 mandeep.dh 1145
      private long fulfilmentWarehouseId;
1146
      private double quantity;
1147
      private long billingWarehouseId;
1148
      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 1149
        super(client, protocolFactory, transport, resultHandler, false);
4555 mandeep.dh 1150
        this.serialNumber = serialNumber;
4496 mandeep.dh 1151
        this.type = type;
1152
        this.orderId = orderId;
5110 mandeep.dh 1153
        this.fulfilmentWarehouseId = fulfilmentWarehouseId;
1154
        this.quantity = quantity;
1155
        this.billingWarehouseId = billingWarehouseId;
4496 mandeep.dh 1156
      }
1157
 
1158
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1159
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanSerializedItemForOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1160
        scanSerializedItemForOrder_args args = new scanSerializedItemForOrder_args();
4555 mandeep.dh 1161
        args.setSerialNumber(serialNumber);
4496 mandeep.dh 1162
        args.setType(type);
1163
        args.setOrderId(orderId);
5110 mandeep.dh 1164
        args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
1165
        args.setQuantity(quantity);
1166
        args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 1167
        args.write(prot);
1168
        prot.writeMessageEnd();
1169
      }
1170
 
4555 mandeep.dh 1171
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
4496 mandeep.dh 1172
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1173
          throw new IllegalStateException("Method call not finished!");
1174
        }
1175
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1176
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1177
        return (new Client(prot)).recv_scanSerializedItemForOrder();
1178
      }
1179
    }
1180
 
5361 mandeep.dh 1181
    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 1182
      checkReady();
5361 mandeep.dh 1183
      scanForOrder_call method_call = new scanForOrder_call(inventoryItem, type, quantity, orderId, fulfilmentWarehouseId, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 1184
      this.___currentMethod = method_call;
1185
      ___manager.call(method_call);
1186
    }
1187
 
1188
    public static class scanForOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
5361 mandeep.dh 1189
      private InventoryItem inventoryItem;
4496 mandeep.dh 1190
      private ScanType type;
1191
      private long quantity;
1192
      private long orderId;
5110 mandeep.dh 1193
      private long fulfilmentWarehouseId;
5361 mandeep.dh 1194
      private long billingWarehouseId;
1195
      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 1196
        super(client, protocolFactory, transport, resultHandler, false);
5361 mandeep.dh 1197
        this.inventoryItem = inventoryItem;
4496 mandeep.dh 1198
        this.type = type;
1199
        this.quantity = quantity;
1200
        this.orderId = orderId;
5110 mandeep.dh 1201
        this.fulfilmentWarehouseId = fulfilmentWarehouseId;
5361 mandeep.dh 1202
        this.billingWarehouseId = billingWarehouseId;
4496 mandeep.dh 1203
      }
1204
 
1205
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1206
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanForOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1207
        scanForOrder_args args = new scanForOrder_args();
5361 mandeep.dh 1208
        args.setInventoryItem(inventoryItem);
4496 mandeep.dh 1209
        args.setType(type);
1210
        args.setQuantity(quantity);
1211
        args.setOrderId(orderId);
5110 mandeep.dh 1212
        args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
5361 mandeep.dh 1213
        args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 1214
        args.write(prot);
1215
        prot.writeMessageEnd();
1216
      }
1217
 
5361 mandeep.dh 1218
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
4496 mandeep.dh 1219
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1220
          throw new IllegalStateException("Method call not finished!");
1221
        }
1222
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1223
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
5361 mandeep.dh 1224
        return (new Client(prot)).recv_scanForOrder();
4496 mandeep.dh 1225
      }
1226
    }
1227
 
1228
    public void createItemNumberMapping(String itemNumber, long itemId, org.apache.thrift.async.AsyncMethodCallback<createItemNumberMapping_call> resultHandler) throws org.apache.thrift.TException {
1229
      checkReady();
1230
      createItemNumberMapping_call method_call = new createItemNumberMapping_call(itemNumber, itemId, resultHandler, this, ___protocolFactory, ___transport);
1231
      this.___currentMethod = method_call;
1232
      ___manager.call(method_call);
1233
    }
1234
 
1235
    public static class createItemNumberMapping_call extends org.apache.thrift.async.TAsyncMethodCall {
1236
      private String itemNumber;
1237
      private long itemId;
1238
      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 {
1239
        super(client, protocolFactory, transport, resultHandler, false);
1240
        this.itemNumber = itemNumber;
1241
        this.itemId = itemId;
1242
      }
1243
 
1244
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1245
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createItemNumberMapping", org.apache.thrift.protocol.TMessageType.CALL, 0));
1246
        createItemNumberMapping_args args = new createItemNumberMapping_args();
1247
        args.setItemNumber(itemNumber);
1248
        args.setItemId(itemId);
1249
        args.write(prot);
1250
        prot.writeMessageEnd();
1251
      }
1252
 
1253
      public void getResult() throws org.apache.thrift.TException {
1254
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1255
          throw new IllegalStateException("Method call not finished!");
1256
        }
1257
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1258
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1259
        (new Client(prot)).recv_createItemNumberMapping();
1260
      }
1261
    }
1262
 
4622 amit.gupta 1263
    public void getItemNumbers(long itemId, org.apache.thrift.async.AsyncMethodCallback<getItemNumbers_call> resultHandler) throws org.apache.thrift.TException {
1264
      checkReady();
1265
      getItemNumbers_call method_call = new getItemNumbers_call(itemId, resultHandler, this, ___protocolFactory, ___transport);
1266
      this.___currentMethod = method_call;
1267
      ___manager.call(method_call);
1268
    }
1269
 
1270
    public static class getItemNumbers_call extends org.apache.thrift.async.TAsyncMethodCall {
1271
      private long itemId;
1272
      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 {
1273
        super(client, protocolFactory, transport, resultHandler, false);
1274
        this.itemId = itemId;
1275
      }
1276
 
1277
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1278
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemNumbers", org.apache.thrift.protocol.TMessageType.CALL, 0));
1279
        getItemNumbers_args args = new getItemNumbers_args();
1280
        args.setItemId(itemId);
1281
        args.write(prot);
1282
        prot.writeMessageEnd();
1283
      }
1284
 
1285
      public List<String> getResult() throws org.apache.thrift.TException {
1286
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1287
          throw new IllegalStateException("Method call not finished!");
1288
        }
1289
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1290
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1291
        return (new Client(prot)).recv_getItemNumbers();
1292
      }
1293
    }
1294
 
5110 mandeep.dh 1295
    public void getItemIds(String itemNumber, org.apache.thrift.async.AsyncMethodCallback<getItemIds_call> resultHandler) throws org.apache.thrift.TException {
1296
      checkReady();
1297
      getItemIds_call method_call = new getItemIds_call(itemNumber, resultHandler, this, ___protocolFactory, ___transport);
1298
      this.___currentMethod = method_call;
1299
      ___manager.call(method_call);
1300
    }
1301
 
1302
    public static class getItemIds_call extends org.apache.thrift.async.TAsyncMethodCall {
1303
      private String itemNumber;
1304
      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 {
1305
        super(client, protocolFactory, transport, resultHandler, false);
1306
        this.itemNumber = itemNumber;
1307
      }
1308
 
1309
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1310
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemIds", org.apache.thrift.protocol.TMessageType.CALL, 0));
1311
        getItemIds_args args = new getItemIds_args();
1312
        args.setItemNumber(itemNumber);
1313
        args.write(prot);
1314
        prot.writeMessageEnd();
1315
      }
1316
 
1317
      public List<Long> getResult() throws org.apache.thrift.TException {
1318
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1319
          throw new IllegalStateException("Method call not finished!");
1320
        }
1321
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1322
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1323
        return (new Client(prot)).recv_getItemIds();
1324
      }
1325
    }
1326
 
5185 mandeep.dh 1327
    public void getInventoryItemsFromLastScanType(ScanType lastScanType, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemsFromLastScanType_call> resultHandler) throws org.apache.thrift.TException {
1328
      checkReady();
1329
      getInventoryItemsFromLastScanType_call method_call = new getInventoryItemsFromLastScanType_call(lastScanType, resultHandler, this, ___protocolFactory, ___transport);
1330
      this.___currentMethod = method_call;
1331
      ___manager.call(method_call);
1332
    }
1333
 
1334
    public static class getInventoryItemsFromLastScanType_call extends org.apache.thrift.async.TAsyncMethodCall {
1335
      private ScanType lastScanType;
1336
      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 {
1337
        super(client, protocolFactory, transport, resultHandler, false);
1338
        this.lastScanType = lastScanType;
1339
      }
1340
 
1341
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1342
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItemsFromLastScanType", org.apache.thrift.protocol.TMessageType.CALL, 0));
1343
        getInventoryItemsFromLastScanType_args args = new getInventoryItemsFromLastScanType_args();
1344
        args.setLastScanType(lastScanType);
1345
        args.write(prot);
1346
        prot.writeMessageEnd();
1347
      }
1348
 
1349
      public List<InventoryItem> getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1350
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1351
          throw new IllegalStateException("Method call not finished!");
1352
        }
1353
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1354
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1355
        return (new Client(prot)).recv_getInventoryItemsFromLastScanType();
1356
      }
1357
    }
1358
 
1359
    public void getInventoryItemFromId(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemFromId_call> resultHandler) throws org.apache.thrift.TException {
1360
      checkReady();
1361
      getInventoryItemFromId_call method_call = new getInventoryItemFromId_call(inventoryItemId, resultHandler, this, ___protocolFactory, ___transport);
1362
      this.___currentMethod = method_call;
1363
      ___manager.call(method_call);
1364
    }
1365
 
1366
    public static class getInventoryItemFromId_call extends org.apache.thrift.async.TAsyncMethodCall {
1367
      private long inventoryItemId;
1368
      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 {
1369
        super(client, protocolFactory, transport, resultHandler, false);
1370
        this.inventoryItemId = inventoryItemId;
1371
      }
1372
 
1373
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1374
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItemFromId", org.apache.thrift.protocol.TMessageType.CALL, 0));
1375
        getInventoryItemFromId_args args = new getInventoryItemFromId_args();
1376
        args.setInventoryItemId(inventoryItemId);
1377
        args.write(prot);
1378
        prot.writeMessageEnd();
1379
      }
1380
 
1381
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1382
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1383
          throw new IllegalStateException("Method call not finished!");
1384
        }
1385
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1386
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1387
        return (new Client(prot)).recv_getInventoryItemFromId();
1388
      }
1389
    }
1390
 
5372 mandeep.dh 1391
    public void getPurchaseScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getPurchaseScans_call> resultHandler) throws org.apache.thrift.TException {
1392
      checkReady();
1393
      getPurchaseScans_call method_call = new getPurchaseScans_call(startDate, endDate, resultHandler, this, ___protocolFactory, ___transport);
1394
      this.___currentMethod = method_call;
1395
      ___manager.call(method_call);
1396
    }
1397
 
1398
    public static class getPurchaseScans_call extends org.apache.thrift.async.TAsyncMethodCall {
1399
      private long startDate;
1400
      private long endDate;
1401
      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 {
1402
        super(client, protocolFactory, transport, resultHandler, false);
1403
        this.startDate = startDate;
1404
        this.endDate = endDate;
1405
      }
1406
 
1407
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1408
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseScans", org.apache.thrift.protocol.TMessageType.CALL, 0));
1409
        getPurchaseScans_args args = new getPurchaseScans_args();
1410
        args.setStartDate(startDate);
1411
        args.setEndDate(endDate);
1412
        args.write(prot);
1413
        prot.writeMessageEnd();
1414
      }
1415
 
1416
      public List<DetailedPurchaseScan> getResult() throws org.apache.thrift.TException {
1417
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1418
          throw new IllegalStateException("Method call not finished!");
1419
        }
1420
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1421
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1422
        return (new Client(prot)).recv_getPurchaseScans();
1423
      }
1424
    }
1425
 
5496 mandeep.dh 1426
    public void fetchScansPerInvoiceNumber(long date, org.apache.thrift.async.AsyncMethodCallback<fetchScansPerInvoiceNumber_call> resultHandler) throws org.apache.thrift.TException {
1427
      checkReady();
1428
      fetchScansPerInvoiceNumber_call method_call = new fetchScansPerInvoiceNumber_call(date, resultHandler, this, ___protocolFactory, ___transport);
1429
      this.___currentMethod = method_call;
1430
      ___manager.call(method_call);
1431
    }
1432
 
1433
    public static class fetchScansPerInvoiceNumber_call extends org.apache.thrift.async.TAsyncMethodCall {
1434
      private long date;
1435
      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 {
1436
        super(client, protocolFactory, transport, resultHandler, false);
1437
        this.date = date;
1438
      }
1439
 
1440
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1441
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fetchScansPerInvoiceNumber", org.apache.thrift.protocol.TMessageType.CALL, 0));
1442
        fetchScansPerInvoiceNumber_args args = new fetchScansPerInvoiceNumber_args();
1443
        args.setDate(date);
1444
        args.write(prot);
1445
        prot.writeMessageEnd();
1446
      }
1447
 
1448
      public List<InvoiceScan> getResult() throws org.apache.thrift.TException {
1449
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1450
          throw new IllegalStateException("Method call not finished!");
1451
        }
1452
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1453
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1454
        return (new Client(prot)).recv_fetchScansPerInvoiceNumber();
1455
      }
1456
    }
1457
 
5620 mandeep.dh 1458
    public void getInventoryItemFromOrder(long orderId, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemFromOrder_call> resultHandler) throws org.apache.thrift.TException {
1459
      checkReady();
1460
      getInventoryItemFromOrder_call method_call = new getInventoryItemFromOrder_call(orderId, resultHandler, this, ___protocolFactory, ___transport);
1461
      this.___currentMethod = method_call;
1462
      ___manager.call(method_call);
1463
    }
1464
 
1465
    public static class getInventoryItemFromOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1466
      private long orderId;
1467
      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 {
1468
        super(client, protocolFactory, transport, resultHandler, false);
1469
        this.orderId = orderId;
1470
      }
1471
 
1472
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1473
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItemFromOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1474
        getInventoryItemFromOrder_args args = new getInventoryItemFromOrder_args();
1475
        args.setOrderId(orderId);
1476
        args.write(prot);
1477
        prot.writeMessageEnd();
1478
      }
1479
 
1480
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1481
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1482
          throw new IllegalStateException("Method call not finished!");
1483
        }
1484
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1485
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1486
        return (new Client(prot)).recv_getInventoryItemFromOrder();
1487
      }
1488
    }
1489
 
5711 mandeep.dh 1490
    public void getInventoryAge(org.apache.thrift.async.AsyncMethodCallback<getInventoryAge_call> resultHandler) throws org.apache.thrift.TException {
1491
      checkReady();
1492
      getInventoryAge_call method_call = new getInventoryAge_call(resultHandler, this, ___protocolFactory, ___transport);
1493
      this.___currentMethod = method_call;
1494
      ___manager.call(method_call);
1495
    }
1496
 
1497
    public static class getInventoryAge_call extends org.apache.thrift.async.TAsyncMethodCall {
1498
      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 {
1499
        super(client, protocolFactory, transport, resultHandler, false);
1500
      }
1501
 
1502
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1503
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryAge", org.apache.thrift.protocol.TMessageType.CALL, 0));
1504
        getInventoryAge_args args = new getInventoryAge_args();
1505
        args.write(prot);
1506
        prot.writeMessageEnd();
1507
      }
1508
 
1509
      public List<InventoryAge> getResult() throws org.apache.thrift.TException {
1510
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1511
          throw new IllegalStateException("Method call not finished!");
1512
        }
1513
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1514
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1515
        return (new Client(prot)).recv_getInventoryAge();
1516
      }
1517
    }
1518
 
6322 amar.kumar 1519
    public void getInventoryScansForItem(long itemId, long fromDate, long toDate, org.apache.thrift.async.AsyncMethodCallback<getInventoryScansForItem_call> resultHandler) throws org.apache.thrift.TException {
1520
      checkReady();
1521
      getInventoryScansForItem_call method_call = new getInventoryScansForItem_call(itemId, fromDate, toDate, resultHandler, this, ___protocolFactory, ___transport);
1522
      this.___currentMethod = method_call;
1523
      ___manager.call(method_call);
1524
    }
1525
 
1526
    public static class getInventoryScansForItem_call extends org.apache.thrift.async.TAsyncMethodCall {
1527
      private long itemId;
1528
      private long fromDate;
1529
      private long toDate;
1530
      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 {
1531
        super(client, protocolFactory, transport, resultHandler, false);
1532
        this.itemId = itemId;
1533
        this.fromDate = fromDate;
1534
        this.toDate = toDate;
1535
      }
1536
 
1537
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1538
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryScansForItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
1539
        getInventoryScansForItem_args args = new getInventoryScansForItem_args();
1540
        args.setItemId(itemId);
1541
        args.setFromDate(fromDate);
1542
        args.setToDate(toDate);
1543
        args.write(prot);
1544
        prot.writeMessageEnd();
1545
      }
1546
 
1547
      public List<Scan> getResult() throws org.apache.thrift.TException {
1548
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1549
          throw new IllegalStateException("Method call not finished!");
1550
        }
1551
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1552
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1553
        return (new Client(prot)).recv_getInventoryScansForItem();
1554
      }
1555
    }
1556
 
1557
    public void getScanRecordsForSerialNumber(long serialNumber, org.apache.thrift.async.AsyncMethodCallback<getScanRecordsForSerialNumber_call> resultHandler) throws org.apache.thrift.TException {
1558
      checkReady();
1559
      getScanRecordsForSerialNumber_call method_call = new getScanRecordsForSerialNumber_call(serialNumber, resultHandler, this, ___protocolFactory, ___transport);
1560
      this.___currentMethod = method_call;
1561
      ___manager.call(method_call);
1562
    }
1563
 
1564
    public static class getScanRecordsForSerialNumber_call extends org.apache.thrift.async.TAsyncMethodCall {
1565
      private long serialNumber;
1566
      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 {
1567
        super(client, protocolFactory, transport, resultHandler, false);
1568
        this.serialNumber = serialNumber;
1569
      }
1570
 
1571
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1572
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getScanRecordsForSerialNumber", org.apache.thrift.protocol.TMessageType.CALL, 0));
1573
        getScanRecordsForSerialNumber_args args = new getScanRecordsForSerialNumber_args();
1574
        args.setSerialNumber(serialNumber);
1575
        args.write(prot);
1576
        prot.writeMessageEnd();
1577
      }
1578
 
1579
      public List<Scan> getResult() throws org.apache.thrift.TException {
1580
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1581
          throw new IllegalStateException("Method call not finished!");
1582
        }
1583
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1584
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1585
        return (new Client(prot)).recv_getScanRecordsForSerialNumber();
1586
      }
1587
    }
1588
 
6467 amar.kumar 1589
    public void scanForPurchaseReturn(List<InventoryItem> saleReturnItems, long vendorId, org.apache.thrift.async.AsyncMethodCallback<scanForPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1590
      checkReady();
1591
      scanForPurchaseReturn_call method_call = new scanForPurchaseReturn_call(saleReturnItems, vendorId, resultHandler, this, ___protocolFactory, ___transport);
1592
      this.___currentMethod = method_call;
1593
      ___manager.call(method_call);
1594
    }
1595
 
1596
    public static class scanForPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1597
      private List<InventoryItem> saleReturnItems;
1598
      private long vendorId;
1599
      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 {
1600
        super(client, protocolFactory, transport, resultHandler, false);
1601
        this.saleReturnItems = saleReturnItems;
1602
        this.vendorId = vendorId;
1603
      }
1604
 
1605
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1606
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanForPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1607
        scanForPurchaseReturn_args args = new scanForPurchaseReturn_args();
1608
        args.setSaleReturnItems(saleReturnItems);
1609
        args.setVendorId(vendorId);
1610
        args.write(prot);
1611
        prot.writeMessageEnd();
1612
      }
1613
 
1614
      public void getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1615
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1616
          throw new IllegalStateException("Method call not finished!");
1617
        }
1618
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1619
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1620
        (new Client(prot)).recv_scanForPurchaseReturn();
1621
      }
1622
    }
1623
 
6548 amar.kumar 1624
    public void scanForLostItem(List<InventoryItem> lostItems, long vendorId, org.apache.thrift.async.AsyncMethodCallback<scanForLostItem_call> resultHandler) throws org.apache.thrift.TException {
1625
      checkReady();
1626
      scanForLostItem_call method_call = new scanForLostItem_call(lostItems, vendorId, resultHandler, this, ___protocolFactory, ___transport);
1627
      this.___currentMethod = method_call;
1628
      ___manager.call(method_call);
1629
    }
1630
 
1631
    public static class scanForLostItem_call extends org.apache.thrift.async.TAsyncMethodCall {
1632
      private List<InventoryItem> lostItems;
1633
      private long vendorId;
1634
      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 {
1635
        super(client, protocolFactory, transport, resultHandler, false);
1636
        this.lostItems = lostItems;
1637
        this.vendorId = vendorId;
1638
      }
1639
 
1640
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1641
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanForLostItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
1642
        scanForLostItem_args args = new scanForLostItem_args();
1643
        args.setLostItems(lostItems);
1644
        args.setVendorId(vendorId);
1645
        args.write(prot);
1646
        prot.writeMessageEnd();
1647
      }
1648
 
1649
      public void getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1650
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1651
          throw new IllegalStateException("Method call not finished!");
1652
        }
1653
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1654
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1655
        (new Client(prot)).recv_scanForLostItem();
1656
      }
1657
    }
1658
 
1659
    public void getCurrentSerializedInventoryByScans(org.apache.thrift.async.AsyncMethodCallback<getCurrentSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException {
1660
      checkReady();
1661
      getCurrentSerializedInventoryByScans_call method_call = new getCurrentSerializedInventoryByScans_call(resultHandler, this, ___protocolFactory, ___transport);
1662
      this.___currentMethod = method_call;
1663
      ___manager.call(method_call);
1664
    }
1665
 
1666
    public static class getCurrentSerializedInventoryByScans_call extends org.apache.thrift.async.TAsyncMethodCall {
1667
      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 {
1668
        super(client, protocolFactory, transport, resultHandler, false);
1669
      }
1670
 
1671
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1672
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCurrentSerializedInventoryByScans", org.apache.thrift.protocol.TMessageType.CALL, 0));
1673
        getCurrentSerializedInventoryByScans_args args = new getCurrentSerializedInventoryByScans_args();
1674
        args.write(prot);
1675
        prot.writeMessageEnd();
1676
      }
1677
 
1678
      public List<InventoryAvailability> getResult() throws org.apache.thrift.TException {
1679
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1680
          throw new IllegalStateException("Method call not finished!");
1681
        }
1682
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1683
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1684
        return (new Client(prot)).recv_getCurrentSerializedInventoryByScans();
1685
      }
1686
    }
1687
 
6630 amar.kumar 1688
    public void getCurrentNonSerializedInventoryByScans(org.apache.thrift.async.AsyncMethodCallback<getCurrentNonSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException {
1689
      checkReady();
1690
      getCurrentNonSerializedInventoryByScans_call method_call = new getCurrentNonSerializedInventoryByScans_call(resultHandler, this, ___protocolFactory, ___transport);
1691
      this.___currentMethod = method_call;
1692
      ___manager.call(method_call);
1693
    }
1694
 
1695
    public static class getCurrentNonSerializedInventoryByScans_call extends org.apache.thrift.async.TAsyncMethodCall {
1696
      public getCurrentNonSerializedInventoryByScans_call(org.apache.thrift.async.AsyncMethodCallback<getCurrentNonSerializedInventoryByScans_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 {
1697
        super(client, protocolFactory, transport, resultHandler, false);
1698
      }
1699
 
1700
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1701
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCurrentNonSerializedInventoryByScans", org.apache.thrift.protocol.TMessageType.CALL, 0));
1702
        getCurrentNonSerializedInventoryByScans_args args = new getCurrentNonSerializedInventoryByScans_args();
1703
        args.write(prot);
1704
        prot.writeMessageEnd();
1705
      }
1706
 
1707
      public List<InventoryAvailability> getResult() throws org.apache.thrift.TException {
1708
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1709
          throw new IllegalStateException("Method call not finished!");
1710
        }
1711
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1712
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1713
        return (new Client(prot)).recv_getCurrentNonSerializedInventoryByScans();
1714
      }
1715
    }
1716
 
6762 amar.kumar 1717
    public void getHistoricSerializedInventoryByScans(long date, org.apache.thrift.async.AsyncMethodCallback<getHistoricSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException {
1718
      checkReady();
1719
      getHistoricSerializedInventoryByScans_call method_call = new getHistoricSerializedInventoryByScans_call(date, resultHandler, this, ___protocolFactory, ___transport);
1720
      this.___currentMethod = method_call;
1721
      ___manager.call(method_call);
1722
    }
1723
 
1724
    public static class getHistoricSerializedInventoryByScans_call extends org.apache.thrift.async.TAsyncMethodCall {
1725
      private long date;
1726
      public getHistoricSerializedInventoryByScans_call(long date, org.apache.thrift.async.AsyncMethodCallback<getHistoricSerializedInventoryByScans_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 {
1727
        super(client, protocolFactory, transport, resultHandler, false);
1728
        this.date = date;
1729
      }
1730
 
1731
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1732
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getHistoricSerializedInventoryByScans", org.apache.thrift.protocol.TMessageType.CALL, 0));
1733
        getHistoricSerializedInventoryByScans_args args = new getHistoricSerializedInventoryByScans_args();
1734
        args.setDate(date);
1735
        args.write(prot);
1736
        prot.writeMessageEnd();
1737
      }
1738
 
1739
      public List<InventoryAvailability> getResult() throws org.apache.thrift.TException {
1740
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1741
          throw new IllegalStateException("Method call not finished!");
1742
        }
1743
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1744
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1745
        return (new Client(prot)).recv_getHistoricSerializedInventoryByScans();
1746
      }
1747
    }
1748
 
1749
    public void getHistoricNonSerializedInventoryByScans(long date, org.apache.thrift.async.AsyncMethodCallback<getHistoricNonSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException {
1750
      checkReady();
1751
      getHistoricNonSerializedInventoryByScans_call method_call = new getHistoricNonSerializedInventoryByScans_call(date, resultHandler, this, ___protocolFactory, ___transport);
1752
      this.___currentMethod = method_call;
1753
      ___manager.call(method_call);
1754
    }
1755
 
1756
    public static class getHistoricNonSerializedInventoryByScans_call extends org.apache.thrift.async.TAsyncMethodCall {
1757
      private long date;
1758
      public getHistoricNonSerializedInventoryByScans_call(long date, org.apache.thrift.async.AsyncMethodCallback<getHistoricNonSerializedInventoryByScans_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 {
1759
        super(client, protocolFactory, transport, resultHandler, false);
1760
        this.date = date;
1761
      }
1762
 
1763
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1764
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getHistoricNonSerializedInventoryByScans", org.apache.thrift.protocol.TMessageType.CALL, 0));
1765
        getHistoricNonSerializedInventoryByScans_args args = new getHistoricNonSerializedInventoryByScans_args();
1766
        args.setDate(date);
1767
        args.write(prot);
1768
        prot.writeMessageEnd();
1769
      }
1770
 
1771
      public List<InventoryAvailability> getResult() throws org.apache.thrift.TException {
1772
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1773
          throw new IllegalStateException("Method call not finished!");
1774
        }
1775
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1776
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1777
        return (new Client(prot)).recv_getHistoricNonSerializedInventoryByScans();
1778
      }
1779
    }
1780
 
1781
    public void scanForOursExternalSale(long itemId, String serialNumber, String itemNumber, String invoiceNumber, long warehouseId, double unitPrice, long orderId, org.apache.thrift.async.AsyncMethodCallback<scanForOursExternalSale_call> resultHandler) throws org.apache.thrift.TException {
1782
      checkReady();
1783
      scanForOursExternalSale_call method_call = new scanForOursExternalSale_call(itemId, serialNumber, itemNumber, invoiceNumber, warehouseId, unitPrice, orderId, resultHandler, this, ___protocolFactory, ___transport);
1784
      this.___currentMethod = method_call;
1785
      ___manager.call(method_call);
1786
    }
1787
 
1788
    public static class scanForOursExternalSale_call extends org.apache.thrift.async.TAsyncMethodCall {
1789
      private long itemId;
1790
      private String serialNumber;
1791
      private String itemNumber;
1792
      private String invoiceNumber;
1793
      private long warehouseId;
1794
      private double unitPrice;
1795
      private long orderId;
1796
      public scanForOursExternalSale_call(long itemId, String serialNumber, String itemNumber, String invoiceNumber, long warehouseId, double unitPrice, long orderId, org.apache.thrift.async.AsyncMethodCallback<scanForOursExternalSale_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 {
1797
        super(client, protocolFactory, transport, resultHandler, false);
1798
        this.itemId = itemId;
1799
        this.serialNumber = serialNumber;
1800
        this.itemNumber = itemNumber;
1801
        this.invoiceNumber = invoiceNumber;
1802
        this.warehouseId = warehouseId;
1803
        this.unitPrice = unitPrice;
1804
        this.orderId = orderId;
1805
      }
1806
 
1807
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1808
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanForOursExternalSale", org.apache.thrift.protocol.TMessageType.CALL, 0));
1809
        scanForOursExternalSale_args args = new scanForOursExternalSale_args();
1810
        args.setItemId(itemId);
1811
        args.setSerialNumber(serialNumber);
1812
        args.setItemNumber(itemNumber);
1813
        args.setInvoiceNumber(invoiceNumber);
1814
        args.setWarehouseId(warehouseId);
1815
        args.setUnitPrice(unitPrice);
1816
        args.setOrderId(orderId);
1817
        args.write(prot);
1818
        prot.writeMessageEnd();
1819
      }
1820
 
1821
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1822
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1823
          throw new IllegalStateException("Method call not finished!");
1824
        }
1825
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1826
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1827
        return (new Client(prot)).recv_scanForOursExternalSale();
1828
      }
1829
    }
1830
 
1831
    public void scanForOursExternalSaleReturn(long orderId, double unitPrice, org.apache.thrift.async.AsyncMethodCallback<scanForOursExternalSaleReturn_call> resultHandler) throws org.apache.thrift.TException {
1832
      checkReady();
1833
      scanForOursExternalSaleReturn_call method_call = new scanForOursExternalSaleReturn_call(orderId, unitPrice, resultHandler, this, ___protocolFactory, ___transport);
1834
      this.___currentMethod = method_call;
1835
      ___manager.call(method_call);
1836
    }
1837
 
1838
    public static class scanForOursExternalSaleReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1839
      private long orderId;
1840
      private double unitPrice;
1841
      public scanForOursExternalSaleReturn_call(long orderId, double unitPrice, org.apache.thrift.async.AsyncMethodCallback<scanForOursExternalSaleReturn_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 {
1842
        super(client, protocolFactory, transport, resultHandler, false);
1843
        this.orderId = orderId;
1844
        this.unitPrice = unitPrice;
1845
      }
1846
 
1847
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1848
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanForOursExternalSaleReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1849
        scanForOursExternalSaleReturn_args args = new scanForOursExternalSaleReturn_args();
1850
        args.setOrderId(orderId);
1851
        args.setUnitPrice(unitPrice);
1852
        args.write(prot);
1853
        prot.writeMessageEnd();
1854
      }
1855
 
1856
      public void getResult() throws org.apache.thrift.TException {
1857
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1858
          throw new IllegalStateException("Method call not finished!");
1859
        }
1860
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1861
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1862
        (new Client(prot)).recv_scanForOursExternalSaleReturn();
1863
      }
1864
    }
1865
 
6880 amar.kumar 1866
    public void getMovementNonSerializedInventoryByScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getMovementNonSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException {
1867
      checkReady();
1868
      getMovementNonSerializedInventoryByScans_call method_call = new getMovementNonSerializedInventoryByScans_call(startDate, endDate, resultHandler, this, ___protocolFactory, ___transport);
1869
      this.___currentMethod = method_call;
1870
      ___manager.call(method_call);
1871
    }
1872
 
1873
    public static class getMovementNonSerializedInventoryByScans_call extends org.apache.thrift.async.TAsyncMethodCall {
1874
      private long startDate;
1875
      private long endDate;
1876
      public getMovementNonSerializedInventoryByScans_call(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getMovementNonSerializedInventoryByScans_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 {
1877
        super(client, protocolFactory, transport, resultHandler, false);
1878
        this.startDate = startDate;
1879
        this.endDate = endDate;
1880
      }
1881
 
1882
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1883
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getMovementNonSerializedInventoryByScans", org.apache.thrift.protocol.TMessageType.CALL, 0));
1884
        getMovementNonSerializedInventoryByScans_args args = new getMovementNonSerializedInventoryByScans_args();
1885
        args.setStartDate(startDate);
1886
        args.setEndDate(endDate);
1887
        args.write(prot);
1888
        prot.writeMessageEnd();
1889
      }
1890
 
1891
      public List<InventoryMovement> getResult() throws org.apache.thrift.TException {
1892
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1893
          throw new IllegalStateException("Method call not finished!");
1894
        }
1895
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1896
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1897
        return (new Client(prot)).recv_getMovementNonSerializedInventoryByScans();
1898
      }
1899
    }
1900
 
1901
    public void getMovementSerializedInventoryByScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getMovementSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException {
1902
      checkReady();
1903
      getMovementSerializedInventoryByScans_call method_call = new getMovementSerializedInventoryByScans_call(startDate, endDate, resultHandler, this, ___protocolFactory, ___transport);
1904
      this.___currentMethod = method_call;
1905
      ___manager.call(method_call);
1906
    }
1907
 
1908
    public static class getMovementSerializedInventoryByScans_call extends org.apache.thrift.async.TAsyncMethodCall {
1909
      private long startDate;
1910
      private long endDate;
1911
      public getMovementSerializedInventoryByScans_call(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getMovementSerializedInventoryByScans_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 {
1912
        super(client, protocolFactory, transport, resultHandler, false);
1913
        this.startDate = startDate;
1914
        this.endDate = endDate;
1915
      }
1916
 
1917
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1918
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getMovementSerializedInventoryByScans", org.apache.thrift.protocol.TMessageType.CALL, 0));
1919
        getMovementSerializedInventoryByScans_args args = new getMovementSerializedInventoryByScans_args();
1920
        args.setStartDate(startDate);
1921
        args.setEndDate(endDate);
1922
        args.write(prot);
1923
        prot.writeMessageEnd();
1924
      }
1925
 
1926
      public List<InventoryMovement> getResult() throws org.apache.thrift.TException {
1927
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1928
          throw new IllegalStateException("Method call not finished!");
1929
        }
1930
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1931
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1932
        return (new Client(prot)).recv_getMovementSerializedInventoryByScans();
1933
      }
1934
    }
1935
 
7190 amar.kumar 1936
    public void scanfreebie(long orderId, long freebieItemId, long freebieWarehouseId, ScanType scanType, org.apache.thrift.async.AsyncMethodCallback<scanfreebie_call> resultHandler) throws org.apache.thrift.TException {
1937
      checkReady();
1938
      scanfreebie_call method_call = new scanfreebie_call(orderId, freebieItemId, freebieWarehouseId, scanType, resultHandler, this, ___protocolFactory, ___transport);
1939
      this.___currentMethod = method_call;
1940
      ___manager.call(method_call);
1941
    }
1942
 
1943
    public static class scanfreebie_call extends org.apache.thrift.async.TAsyncMethodCall {
1944
      private long orderId;
1945
      private long freebieItemId;
1946
      private long freebieWarehouseId;
1947
      private ScanType scanType;
1948
      public scanfreebie_call(long orderId, long freebieItemId, long freebieWarehouseId, ScanType scanType, org.apache.thrift.async.AsyncMethodCallback<scanfreebie_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 {
1949
        super(client, protocolFactory, transport, resultHandler, false);
1950
        this.orderId = orderId;
1951
        this.freebieItemId = freebieItemId;
1952
        this.freebieWarehouseId = freebieWarehouseId;
1953
        this.scanType = scanType;
1954
      }
1955
 
1956
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1957
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanfreebie", org.apache.thrift.protocol.TMessageType.CALL, 0));
1958
        scanfreebie_args args = new scanfreebie_args();
1959
        args.setOrderId(orderId);
1960
        args.setFreebieItemId(freebieItemId);
1961
        args.setFreebieWarehouseId(freebieWarehouseId);
1962
        args.setScanType(scanType);
1963
        args.write(prot);
1964
        prot.writeMessageEnd();
1965
      }
1966
 
1967
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1968
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1969
          throw new IllegalStateException("Method call not finished!");
1970
        }
1971
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1972
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1973
        return (new Client(prot)).recv_scanfreebie();
1974
      }
1975
    }
1976
 
7199 amar.kumar 1977
    public void reshipfreebie(long oldOrderId, long newOrderId, long freebieItemId, ScanType scanType, org.apache.thrift.async.AsyncMethodCallback<reshipfreebie_call> resultHandler) throws org.apache.thrift.TException {
1978
      checkReady();
1979
      reshipfreebie_call method_call = new reshipfreebie_call(oldOrderId, newOrderId, freebieItemId, scanType, resultHandler, this, ___protocolFactory, ___transport);
1980
      this.___currentMethod = method_call;
1981
      ___manager.call(method_call);
1982
    }
1983
 
1984
    public static class reshipfreebie_call extends org.apache.thrift.async.TAsyncMethodCall {
1985
      private long oldOrderId;
1986
      private long newOrderId;
1987
      private long freebieItemId;
1988
      private ScanType scanType;
1989
      public reshipfreebie_call(long oldOrderId, long newOrderId, long freebieItemId, ScanType scanType, org.apache.thrift.async.AsyncMethodCallback<reshipfreebie_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 {
1990
        super(client, protocolFactory, transport, resultHandler, false);
1991
        this.oldOrderId = oldOrderId;
1992
        this.newOrderId = newOrderId;
1993
        this.freebieItemId = freebieItemId;
1994
        this.scanType = scanType;
1995
      }
1996
 
1997
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1998
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("reshipfreebie", org.apache.thrift.protocol.TMessageType.CALL, 0));
1999
        reshipfreebie_args args = new reshipfreebie_args();
2000
        args.setOldOrderId(oldOrderId);
2001
        args.setNewOrderId(newOrderId);
2002
        args.setFreebieItemId(freebieItemId);
2003
        args.setScanType(scanType);
2004
        args.write(prot);
2005
        prot.writeMessageEnd();
2006
      }
2007
 
2008
      public void getResult() throws WarehouseServiceException, org.apache.thrift.TException {
2009
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2010
          throw new IllegalStateException("Method call not finished!");
2011
        }
2012
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2013
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2014
        (new Client(prot)).recv_reshipfreebie();
2015
      }
2016
    }
2017
 
3430 rajveer 2018
  }
2019
 
2020
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
2021
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
2022
    public Processor(I iface) {
2023
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
2024
    }
2025
 
2026
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
2027
      super(iface, getProcessMap(processMap));
2028
    }
2029
 
2030
    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 2031
      processMap.put("getInventoryItem", new getInventoryItem());
5361 mandeep.dh 2032
      processMap.put("getNonSeralizedInventoryItem", new getNonSeralizedInventoryItem());
4496 mandeep.dh 2033
      processMap.put("scan", new scan());
2034
      processMap.put("scanSerializedItemForOrder", new scanSerializedItemForOrder());
2035
      processMap.put("scanForOrder", new scanForOrder());
2036
      processMap.put("createItemNumberMapping", new createItemNumberMapping());
4622 amit.gupta 2037
      processMap.put("getItemNumbers", new getItemNumbers());
5110 mandeep.dh 2038
      processMap.put("getItemIds", new getItemIds());
5185 mandeep.dh 2039
      processMap.put("getInventoryItemsFromLastScanType", new getInventoryItemsFromLastScanType());
2040
      processMap.put("getInventoryItemFromId", new getInventoryItemFromId());
5372 mandeep.dh 2041
      processMap.put("getPurchaseScans", new getPurchaseScans());
5496 mandeep.dh 2042
      processMap.put("fetchScansPerInvoiceNumber", new fetchScansPerInvoiceNumber());
5620 mandeep.dh 2043
      processMap.put("getInventoryItemFromOrder", new getInventoryItemFromOrder());
5711 mandeep.dh 2044
      processMap.put("getInventoryAge", new getInventoryAge());
6322 amar.kumar 2045
      processMap.put("getInventoryScansForItem", new getInventoryScansForItem());
2046
      processMap.put("getScanRecordsForSerialNumber", new getScanRecordsForSerialNumber());
6467 amar.kumar 2047
      processMap.put("scanForPurchaseReturn", new scanForPurchaseReturn());
6548 amar.kumar 2048
      processMap.put("scanForLostItem", new scanForLostItem());
2049
      processMap.put("getCurrentSerializedInventoryByScans", new getCurrentSerializedInventoryByScans());
6630 amar.kumar 2050
      processMap.put("getCurrentNonSerializedInventoryByScans", new getCurrentNonSerializedInventoryByScans());
6762 amar.kumar 2051
      processMap.put("getHistoricSerializedInventoryByScans", new getHistoricSerializedInventoryByScans());
2052
      processMap.put("getHistoricNonSerializedInventoryByScans", new getHistoricNonSerializedInventoryByScans());
2053
      processMap.put("scanForOursExternalSale", new scanForOursExternalSale());
2054
      processMap.put("scanForOursExternalSaleReturn", new scanForOursExternalSaleReturn());
6880 amar.kumar 2055
      processMap.put("getMovementNonSerializedInventoryByScans", new getMovementNonSerializedInventoryByScans());
2056
      processMap.put("getMovementSerializedInventoryByScans", new getMovementSerializedInventoryByScans());
7190 amar.kumar 2057
      processMap.put("scanfreebie", new scanfreebie());
7199 amar.kumar 2058
      processMap.put("reshipfreebie", new reshipfreebie());
3430 rajveer 2059
      return processMap;
2060
    }
2061
 
4496 mandeep.dh 2062
    private static class getInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItem_args> {
2063
      public getInventoryItem() {
2064
        super("getInventoryItem");
3430 rajveer 2065
      }
2066
 
4496 mandeep.dh 2067
      protected getInventoryItem_args getEmptyArgsInstance() {
2068
        return new getInventoryItem_args();
3430 rajveer 2069
      }
2070
 
4496 mandeep.dh 2071
      protected getInventoryItem_result getResult(I iface, getInventoryItem_args args) throws org.apache.thrift.TException {
2072
        getInventoryItem_result result = new getInventoryItem_result();
4541 mandeep.dh 2073
        try {
2074
          result.success = iface.getInventoryItem(args.serialNumber);
2075
        } catch (WarehouseServiceException wex) {
2076
          result.wex = wex;
2077
        }
3430 rajveer 2078
        return result;
2832 chandransh 2079
      }
2080
    }
2081
 
5361 mandeep.dh 2082
    private static class getNonSeralizedInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getNonSeralizedInventoryItem_args> {
2083
      public getNonSeralizedInventoryItem() {
2084
        super("getNonSeralizedInventoryItem");
3430 rajveer 2085
      }
2086
 
5361 mandeep.dh 2087
      protected getNonSeralizedInventoryItem_args getEmptyArgsInstance() {
2088
        return new getNonSeralizedInventoryItem_args();
3430 rajveer 2089
      }
2090
 
5361 mandeep.dh 2091
      protected getNonSeralizedInventoryItem_result getResult(I iface, getNonSeralizedInventoryItem_args args) throws org.apache.thrift.TException {
2092
        getNonSeralizedInventoryItem_result result = new getNonSeralizedInventoryItem_result();
2093
        try {
5530 mandeep.dh 2094
          result.success = iface.getNonSeralizedInventoryItem(args.itemNumber, args.itemId, args.fulfilmentWarehouseId);
5361 mandeep.dh 2095
        } catch (WarehouseServiceException wex) {
2096
          result.wex = wex;
2097
        }
3430 rajveer 2098
        return result;
2820 chandransh 2099
      }
2100
    }
2101
 
4496 mandeep.dh 2102
    private static class scan<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scan_args> {
2103
      public scan() {
2104
        super("scan");
3430 rajveer 2105
      }
2106
 
4496 mandeep.dh 2107
      protected scan_args getEmptyArgsInstance() {
2108
        return new scan_args();
3430 rajveer 2109
      }
2110
 
4496 mandeep.dh 2111
      protected scan_result getResult(I iface, scan_args args) throws org.apache.thrift.TException {
2112
        scan_result result = new scan_result();
3383 chandransh 2113
        try {
5361 mandeep.dh 2114
          iface.scan(args.inventoryItem, args.type, args.quantity, args.billingWarehouseId);
3383 chandransh 2115
        } catch (WarehouseServiceException wex) {
2116
          result.wex = wex;
2117
        }
3430 rajveer 2118
        return result;
3383 chandransh 2119
      }
2120
    }
2121
 
4496 mandeep.dh 2122
    private static class scanSerializedItemForOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanSerializedItemForOrder_args> {
2123
      public scanSerializedItemForOrder() {
2124
        super("scanSerializedItemForOrder");
3430 rajveer 2125
      }
2126
 
4496 mandeep.dh 2127
      protected scanSerializedItemForOrder_args getEmptyArgsInstance() {
2128
        return new scanSerializedItemForOrder_args();
3430 rajveer 2129
      }
2130
 
4496 mandeep.dh 2131
      protected scanSerializedItemForOrder_result getResult(I iface, scanSerializedItemForOrder_args args) throws org.apache.thrift.TException {
2132
        scanSerializedItemForOrder_result result = new scanSerializedItemForOrder_result();
2820 chandransh 2133
        try {
5110 mandeep.dh 2134
          result.success = iface.scanSerializedItemForOrder(args.serialNumber, args.type, args.orderId, args.fulfilmentWarehouseId, args.quantity, args.billingWarehouseId);
2820 chandransh 2135
        } catch (WarehouseServiceException wex) {
2136
          result.wex = wex;
2137
        }
3430 rajveer 2138
        return result;
2820 chandransh 2139
      }
2140
    }
2141
 
4496 mandeep.dh 2142
    private static class scanForOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanForOrder_args> {
2143
      public scanForOrder() {
2144
        super("scanForOrder");
3430 rajveer 2145
      }
2146
 
4496 mandeep.dh 2147
      protected scanForOrder_args getEmptyArgsInstance() {
2148
        return new scanForOrder_args();
3430 rajveer 2149
      }
2150
 
4496 mandeep.dh 2151
      protected scanForOrder_result getResult(I iface, scanForOrder_args args) throws org.apache.thrift.TException {
2152
        scanForOrder_result result = new scanForOrder_result();
2820 chandransh 2153
        try {
5361 mandeep.dh 2154
          result.success = iface.scanForOrder(args.inventoryItem, args.type, args.quantity, args.orderId, args.fulfilmentWarehouseId, args.billingWarehouseId);
2820 chandransh 2155
        } catch (WarehouseServiceException wex) {
2156
          result.wex = wex;
2157
        }
3430 rajveer 2158
        return result;
2820 chandransh 2159
      }
2160
    }
2161
 
4496 mandeep.dh 2162
    private static class createItemNumberMapping<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createItemNumberMapping_args> {
2163
      public createItemNumberMapping() {
2164
        super("createItemNumberMapping");
2165
      }
2166
 
2167
      protected createItemNumberMapping_args getEmptyArgsInstance() {
2168
        return new createItemNumberMapping_args();
2169
      }
2170
 
2171
      protected createItemNumberMapping_result getResult(I iface, createItemNumberMapping_args args) throws org.apache.thrift.TException {
2172
        createItemNumberMapping_result result = new createItemNumberMapping_result();
2173
        iface.createItemNumberMapping(args.itemNumber, args.itemId);
2174
        return result;
2175
      }
2176
    }
2177
 
4622 amit.gupta 2178
    private static class getItemNumbers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemNumbers_args> {
2179
      public getItemNumbers() {
2180
        super("getItemNumbers");
2181
      }
2182
 
2183
      protected getItemNumbers_args getEmptyArgsInstance() {
2184
        return new getItemNumbers_args();
2185
      }
2186
 
2187
      protected getItemNumbers_result getResult(I iface, getItemNumbers_args args) throws org.apache.thrift.TException {
2188
        getItemNumbers_result result = new getItemNumbers_result();
2189
        result.success = iface.getItemNumbers(args.itemId);
2190
        return result;
2191
      }
2192
    }
2193
 
5110 mandeep.dh 2194
    private static class getItemIds<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemIds_args> {
2195
      public getItemIds() {
2196
        super("getItemIds");
2197
      }
2198
 
2199
      protected getItemIds_args getEmptyArgsInstance() {
2200
        return new getItemIds_args();
2201
      }
2202
 
2203
      protected getItemIds_result getResult(I iface, getItemIds_args args) throws org.apache.thrift.TException {
2204
        getItemIds_result result = new getItemIds_result();
2205
        result.success = iface.getItemIds(args.itemNumber);
2206
        return result;
2207
      }
2208
    }
2209
 
5185 mandeep.dh 2210
    private static class getInventoryItemsFromLastScanType<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItemsFromLastScanType_args> {
2211
      public getInventoryItemsFromLastScanType() {
2212
        super("getInventoryItemsFromLastScanType");
2213
      }
2214
 
2215
      protected getInventoryItemsFromLastScanType_args getEmptyArgsInstance() {
2216
        return new getInventoryItemsFromLastScanType_args();
2217
      }
2218
 
2219
      protected getInventoryItemsFromLastScanType_result getResult(I iface, getInventoryItemsFromLastScanType_args args) throws org.apache.thrift.TException {
2220
        getInventoryItemsFromLastScanType_result result = new getInventoryItemsFromLastScanType_result();
2221
        try {
2222
          result.success = iface.getInventoryItemsFromLastScanType(args.lastScanType);
2223
        } catch (WarehouseServiceException wex) {
2224
          result.wex = wex;
2225
        }
2226
        return result;
2227
      }
2228
    }
2229
 
2230
    private static class getInventoryItemFromId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItemFromId_args> {
2231
      public getInventoryItemFromId() {
2232
        super("getInventoryItemFromId");
2233
      }
2234
 
2235
      protected getInventoryItemFromId_args getEmptyArgsInstance() {
2236
        return new getInventoryItemFromId_args();
2237
      }
2238
 
2239
      protected getInventoryItemFromId_result getResult(I iface, getInventoryItemFromId_args args) throws org.apache.thrift.TException {
2240
        getInventoryItemFromId_result result = new getInventoryItemFromId_result();
2241
        try {
2242
          result.success = iface.getInventoryItemFromId(args.inventoryItemId);
2243
        } catch (WarehouseServiceException wex) {
2244
          result.wex = wex;
2245
        }
2246
        return result;
2247
      }
2248
    }
2249
 
5372 mandeep.dh 2250
    private static class getPurchaseScans<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseScans_args> {
2251
      public getPurchaseScans() {
2252
        super("getPurchaseScans");
2253
      }
2254
 
2255
      protected getPurchaseScans_args getEmptyArgsInstance() {
2256
        return new getPurchaseScans_args();
2257
      }
2258
 
2259
      protected getPurchaseScans_result getResult(I iface, getPurchaseScans_args args) throws org.apache.thrift.TException {
2260
        getPurchaseScans_result result = new getPurchaseScans_result();
2261
        result.success = iface.getPurchaseScans(args.startDate, args.endDate);
2262
        return result;
2263
      }
2264
    }
2265
 
5496 mandeep.dh 2266
    private static class fetchScansPerInvoiceNumber<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fetchScansPerInvoiceNumber_args> {
2267
      public fetchScansPerInvoiceNumber() {
2268
        super("fetchScansPerInvoiceNumber");
2269
      }
2270
 
2271
      protected fetchScansPerInvoiceNumber_args getEmptyArgsInstance() {
2272
        return new fetchScansPerInvoiceNumber_args();
2273
      }
2274
 
2275
      protected fetchScansPerInvoiceNumber_result getResult(I iface, fetchScansPerInvoiceNumber_args args) throws org.apache.thrift.TException {
2276
        fetchScansPerInvoiceNumber_result result = new fetchScansPerInvoiceNumber_result();
2277
        result.success = iface.fetchScansPerInvoiceNumber(args.date);
2278
        return result;
2279
      }
2280
    }
2281
 
5620 mandeep.dh 2282
    private static class getInventoryItemFromOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItemFromOrder_args> {
2283
      public getInventoryItemFromOrder() {
2284
        super("getInventoryItemFromOrder");
2285
      }
2286
 
2287
      protected getInventoryItemFromOrder_args getEmptyArgsInstance() {
2288
        return new getInventoryItemFromOrder_args();
2289
      }
2290
 
2291
      protected getInventoryItemFromOrder_result getResult(I iface, getInventoryItemFromOrder_args args) throws org.apache.thrift.TException {
2292
        getInventoryItemFromOrder_result result = new getInventoryItemFromOrder_result();
2293
        try {
2294
          result.success = iface.getInventoryItemFromOrder(args.orderId);
2295
        } catch (WarehouseServiceException we) {
2296
          result.we = we;
2297
        }
2298
        return result;
2299
      }
2300
    }
2301
 
5711 mandeep.dh 2302
    private static class getInventoryAge<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryAge_args> {
2303
      public getInventoryAge() {
2304
        super("getInventoryAge");
2305
      }
2306
 
2307
      protected getInventoryAge_args getEmptyArgsInstance() {
2308
        return new getInventoryAge_args();
2309
      }
2310
 
2311
      protected getInventoryAge_result getResult(I iface, getInventoryAge_args args) throws org.apache.thrift.TException {
2312
        getInventoryAge_result result = new getInventoryAge_result();
2313
        result.success = iface.getInventoryAge();
2314
        return result;
2315
      }
2316
    }
2317
 
6322 amar.kumar 2318
    private static class getInventoryScansForItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryScansForItem_args> {
2319
      public getInventoryScansForItem() {
2320
        super("getInventoryScansForItem");
2321
      }
2322
 
2323
      protected getInventoryScansForItem_args getEmptyArgsInstance() {
2324
        return new getInventoryScansForItem_args();
2325
      }
2326
 
2327
      protected getInventoryScansForItem_result getResult(I iface, getInventoryScansForItem_args args) throws org.apache.thrift.TException {
2328
        getInventoryScansForItem_result result = new getInventoryScansForItem_result();
2329
        result.success = iface.getInventoryScansForItem(args.itemId, args.fromDate, args.toDate);
2330
        return result;
2331
      }
2332
    }
2333
 
2334
    private static class getScanRecordsForSerialNumber<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getScanRecordsForSerialNumber_args> {
2335
      public getScanRecordsForSerialNumber() {
2336
        super("getScanRecordsForSerialNumber");
2337
      }
2338
 
2339
      protected getScanRecordsForSerialNumber_args getEmptyArgsInstance() {
2340
        return new getScanRecordsForSerialNumber_args();
2341
      }
2342
 
2343
      protected getScanRecordsForSerialNumber_result getResult(I iface, getScanRecordsForSerialNumber_args args) throws org.apache.thrift.TException {
2344
        getScanRecordsForSerialNumber_result result = new getScanRecordsForSerialNumber_result();
2345
        result.success = iface.getScanRecordsForSerialNumber(args.serialNumber);
2346
        return result;
2347
      }
2348
    }
2349
 
6467 amar.kumar 2350
    private static class scanForPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanForPurchaseReturn_args> {
2351
      public scanForPurchaseReturn() {
2352
        super("scanForPurchaseReturn");
2353
      }
2354
 
2355
      protected scanForPurchaseReturn_args getEmptyArgsInstance() {
2356
        return new scanForPurchaseReturn_args();
2357
      }
2358
 
2359
      protected scanForPurchaseReturn_result getResult(I iface, scanForPurchaseReturn_args args) throws org.apache.thrift.TException {
2360
        scanForPurchaseReturn_result result = new scanForPurchaseReturn_result();
2361
        try {
2362
          iface.scanForPurchaseReturn(args.saleReturnItems, args.vendorId);
2363
        } catch (WarehouseServiceException ex) {
2364
          result.ex = ex;
2365
        }
2366
        return result;
2367
      }
2368
    }
2369
 
6548 amar.kumar 2370
    private static class scanForLostItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanForLostItem_args> {
2371
      public scanForLostItem() {
2372
        super("scanForLostItem");
2373
      }
2374
 
2375
      protected scanForLostItem_args getEmptyArgsInstance() {
2376
        return new scanForLostItem_args();
2377
      }
2378
 
2379
      protected scanForLostItem_result getResult(I iface, scanForLostItem_args args) throws org.apache.thrift.TException {
2380
        scanForLostItem_result result = new scanForLostItem_result();
2381
        try {
2382
          iface.scanForLostItem(args.lostItems, args.vendorId);
2383
        } catch (WarehouseServiceException ex) {
2384
          result.ex = ex;
2385
        }
2386
        return result;
2387
      }
2388
    }
2389
 
2390
    private static class getCurrentSerializedInventoryByScans<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCurrentSerializedInventoryByScans_args> {
2391
      public getCurrentSerializedInventoryByScans() {
2392
        super("getCurrentSerializedInventoryByScans");
2393
      }
2394
 
2395
      protected getCurrentSerializedInventoryByScans_args getEmptyArgsInstance() {
2396
        return new getCurrentSerializedInventoryByScans_args();
2397
      }
2398
 
2399
      protected getCurrentSerializedInventoryByScans_result getResult(I iface, getCurrentSerializedInventoryByScans_args args) throws org.apache.thrift.TException {
2400
        getCurrentSerializedInventoryByScans_result result = new getCurrentSerializedInventoryByScans_result();
2401
        result.success = iface.getCurrentSerializedInventoryByScans();
2402
        return result;
2403
      }
2404
    }
2405
 
6630 amar.kumar 2406
    private static class getCurrentNonSerializedInventoryByScans<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCurrentNonSerializedInventoryByScans_args> {
2407
      public getCurrentNonSerializedInventoryByScans() {
2408
        super("getCurrentNonSerializedInventoryByScans");
2409
      }
2410
 
2411
      protected getCurrentNonSerializedInventoryByScans_args getEmptyArgsInstance() {
2412
        return new getCurrentNonSerializedInventoryByScans_args();
2413
      }
2414
 
2415
      protected getCurrentNonSerializedInventoryByScans_result getResult(I iface, getCurrentNonSerializedInventoryByScans_args args) throws org.apache.thrift.TException {
2416
        getCurrentNonSerializedInventoryByScans_result result = new getCurrentNonSerializedInventoryByScans_result();
2417
        result.success = iface.getCurrentNonSerializedInventoryByScans();
2418
        return result;
2419
      }
2420
    }
2421
 
6762 amar.kumar 2422
    private static class getHistoricSerializedInventoryByScans<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getHistoricSerializedInventoryByScans_args> {
2423
      public getHistoricSerializedInventoryByScans() {
2424
        super("getHistoricSerializedInventoryByScans");
2425
      }
2426
 
2427
      protected getHistoricSerializedInventoryByScans_args getEmptyArgsInstance() {
2428
        return new getHistoricSerializedInventoryByScans_args();
2429
      }
2430
 
2431
      protected getHistoricSerializedInventoryByScans_result getResult(I iface, getHistoricSerializedInventoryByScans_args args) throws org.apache.thrift.TException {
2432
        getHistoricSerializedInventoryByScans_result result = new getHistoricSerializedInventoryByScans_result();
2433
        result.success = iface.getHistoricSerializedInventoryByScans(args.date);
2434
        return result;
2435
      }
2436
    }
2437
 
2438
    private static class getHistoricNonSerializedInventoryByScans<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getHistoricNonSerializedInventoryByScans_args> {
2439
      public getHistoricNonSerializedInventoryByScans() {
2440
        super("getHistoricNonSerializedInventoryByScans");
2441
      }
2442
 
2443
      protected getHistoricNonSerializedInventoryByScans_args getEmptyArgsInstance() {
2444
        return new getHistoricNonSerializedInventoryByScans_args();
2445
      }
2446
 
2447
      protected getHistoricNonSerializedInventoryByScans_result getResult(I iface, getHistoricNonSerializedInventoryByScans_args args) throws org.apache.thrift.TException {
2448
        getHistoricNonSerializedInventoryByScans_result result = new getHistoricNonSerializedInventoryByScans_result();
2449
        result.success = iface.getHistoricNonSerializedInventoryByScans(args.date);
2450
        return result;
2451
      }
2452
    }
2453
 
2454
    private static class scanForOursExternalSale<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanForOursExternalSale_args> {
2455
      public scanForOursExternalSale() {
2456
        super("scanForOursExternalSale");
2457
      }
2458
 
2459
      protected scanForOursExternalSale_args getEmptyArgsInstance() {
2460
        return new scanForOursExternalSale_args();
2461
      }
2462
 
2463
      protected scanForOursExternalSale_result getResult(I iface, scanForOursExternalSale_args args) throws org.apache.thrift.TException {
2464
        scanForOursExternalSale_result result = new scanForOursExternalSale_result();
2465
        try {
2466
          result.success = iface.scanForOursExternalSale(args.itemId, args.serialNumber, args.itemNumber, args.invoiceNumber, args.warehouseId, args.unitPrice, args.orderId);
2467
        } catch (WarehouseServiceException ex) {
2468
          result.ex = ex;
2469
        }
2470
        return result;
2471
      }
2472
    }
2473
 
2474
    private static class scanForOursExternalSaleReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanForOursExternalSaleReturn_args> {
2475
      public scanForOursExternalSaleReturn() {
2476
        super("scanForOursExternalSaleReturn");
2477
      }
2478
 
2479
      protected scanForOursExternalSaleReturn_args getEmptyArgsInstance() {
2480
        return new scanForOursExternalSaleReturn_args();
2481
      }
2482
 
2483
      protected scanForOursExternalSaleReturn_result getResult(I iface, scanForOursExternalSaleReturn_args args) throws org.apache.thrift.TException {
2484
        scanForOursExternalSaleReturn_result result = new scanForOursExternalSaleReturn_result();
2485
        iface.scanForOursExternalSaleReturn(args.orderId, args.unitPrice);
2486
        return result;
2487
      }
2488
    }
2489
 
6880 amar.kumar 2490
    private static class getMovementNonSerializedInventoryByScans<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getMovementNonSerializedInventoryByScans_args> {
2491
      public getMovementNonSerializedInventoryByScans() {
2492
        super("getMovementNonSerializedInventoryByScans");
2493
      }
2494
 
2495
      protected getMovementNonSerializedInventoryByScans_args getEmptyArgsInstance() {
2496
        return new getMovementNonSerializedInventoryByScans_args();
2497
      }
2498
 
2499
      protected getMovementNonSerializedInventoryByScans_result getResult(I iface, getMovementNonSerializedInventoryByScans_args args) throws org.apache.thrift.TException {
2500
        getMovementNonSerializedInventoryByScans_result result = new getMovementNonSerializedInventoryByScans_result();
2501
        result.success = iface.getMovementNonSerializedInventoryByScans(args.startDate, args.endDate);
2502
        return result;
2503
      }
2504
    }
2505
 
2506
    private static class getMovementSerializedInventoryByScans<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getMovementSerializedInventoryByScans_args> {
2507
      public getMovementSerializedInventoryByScans() {
2508
        super("getMovementSerializedInventoryByScans");
2509
      }
2510
 
2511
      protected getMovementSerializedInventoryByScans_args getEmptyArgsInstance() {
2512
        return new getMovementSerializedInventoryByScans_args();
2513
      }
2514
 
2515
      protected getMovementSerializedInventoryByScans_result getResult(I iface, getMovementSerializedInventoryByScans_args args) throws org.apache.thrift.TException {
2516
        getMovementSerializedInventoryByScans_result result = new getMovementSerializedInventoryByScans_result();
2517
        result.success = iface.getMovementSerializedInventoryByScans(args.startDate, args.endDate);
2518
        return result;
2519
      }
2520
    }
2521
 
7190 amar.kumar 2522
    private static class scanfreebie<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanfreebie_args> {
2523
      public scanfreebie() {
2524
        super("scanfreebie");
2525
      }
2526
 
2527
      protected scanfreebie_args getEmptyArgsInstance() {
2528
        return new scanfreebie_args();
2529
      }
2530
 
2531
      protected scanfreebie_result getResult(I iface, scanfreebie_args args) throws org.apache.thrift.TException {
2532
        scanfreebie_result result = new scanfreebie_result();
2533
        try {
2534
          result.success = iface.scanfreebie(args.orderId, args.freebieItemId, args.freebieWarehouseId, args.scanType);
2535
        } catch (WarehouseServiceException wex) {
2536
          result.wex = wex;
2537
        }
2538
        return result;
2539
      }
2540
    }
2541
 
7199 amar.kumar 2542
    private static class reshipfreebie<I extends Iface> extends org.apache.thrift.ProcessFunction<I, reshipfreebie_args> {
2543
      public reshipfreebie() {
2544
        super("reshipfreebie");
2545
      }
2546
 
2547
      protected reshipfreebie_args getEmptyArgsInstance() {
2548
        return new reshipfreebie_args();
2549
      }
2550
 
2551
      protected reshipfreebie_result getResult(I iface, reshipfreebie_args args) throws org.apache.thrift.TException {
2552
        reshipfreebie_result result = new reshipfreebie_result();
2553
        try {
2554
          iface.reshipfreebie(args.oldOrderId, args.newOrderId, args.freebieItemId, args.scanType);
2555
        } catch (WarehouseServiceException wex) {
2556
          result.wex = wex;
2557
        }
2558
        return result;
2559
      }
2560
    }
2561
 
2820 chandransh 2562
  }
2563
 
4496 mandeep.dh 2564
  public static class getInventoryItem_args implements org.apache.thrift.TBase<getInventoryItem_args, getInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
2565
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_args");
2832 chandransh 2566
 
4496 mandeep.dh 2567
    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 2568
 
4496 mandeep.dh 2569
    private String serialNumber; // required
2832 chandransh 2570
 
2571
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2572
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 2573
      SERIAL_NUMBER((short)1, "serialNumber");
2832 chandransh 2574
 
2575
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2576
 
2577
      static {
2578
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2579
          byName.put(field.getFieldName(), field);
2580
        }
2581
      }
2582
 
2583
      /**
2584
       * Find the _Fields constant that matches fieldId, or null if its not found.
2585
       */
2586
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2587
        switch(fieldId) {
4496 mandeep.dh 2588
          case 1: // SERIAL_NUMBER
2589
            return SERIAL_NUMBER;
3430 rajveer 2590
          default:
2591
            return null;
2592
        }
2832 chandransh 2593
      }
2594
 
2595
      /**
2596
       * Find the _Fields constant that matches fieldId, throwing an exception
2597
       * if it is not found.
2598
       */
2599
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2600
        _Fields fields = findByThriftId(fieldId);
2601
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2602
        return fields;
2603
      }
2604
 
2605
      /**
2606
       * Find the _Fields constant that matches name, or null if its not found.
2607
       */
2608
      public static _Fields findByName(String name) {
2609
        return byName.get(name);
2610
      }
2611
 
2612
      private final short _thriftId;
2613
      private final String _fieldName;
2614
 
2615
      _Fields(short thriftId, String fieldName) {
2616
        _thriftId = thriftId;
2617
        _fieldName = fieldName;
2618
      }
2619
 
2620
      public short getThriftFieldId() {
2621
        return _thriftId;
2622
      }
2623
 
2624
      public String getFieldName() {
2625
        return _fieldName;
2626
      }
2627
    }
2628
 
2629
    // isset id assignments
2630
 
3430 rajveer 2631
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2832 chandransh 2632
    static {
3430 rajveer 2633
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 2634
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2635
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
3430 rajveer 2636
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 2637
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItem_args.class, metaDataMap);
2832 chandransh 2638
    }
2639
 
4496 mandeep.dh 2640
    public getInventoryItem_args() {
2832 chandransh 2641
    }
2642
 
4496 mandeep.dh 2643
    public getInventoryItem_args(
2644
      String serialNumber)
2832 chandransh 2645
    {
2646
      this();
4496 mandeep.dh 2647
      this.serialNumber = serialNumber;
2832 chandransh 2648
    }
2649
 
2650
    /**
2651
     * Performs a deep copy on <i>other</i>.
2652
     */
4496 mandeep.dh 2653
    public getInventoryItem_args(getInventoryItem_args other) {
2654
      if (other.isSetSerialNumber()) {
2655
        this.serialNumber = other.serialNumber;
2656
      }
2832 chandransh 2657
    }
2658
 
4496 mandeep.dh 2659
    public getInventoryItem_args deepCopy() {
2660
      return new getInventoryItem_args(this);
2832 chandransh 2661
    }
2662
 
3430 rajveer 2663
    @Override
2664
    public void clear() {
4496 mandeep.dh 2665
      this.serialNumber = null;
2832 chandransh 2666
    }
2667
 
4496 mandeep.dh 2668
    public String getSerialNumber() {
2669
      return this.serialNumber;
2832 chandransh 2670
    }
2671
 
4496 mandeep.dh 2672
    public void setSerialNumber(String serialNumber) {
2673
      this.serialNumber = serialNumber;
2832 chandransh 2674
    }
2675
 
4496 mandeep.dh 2676
    public void unsetSerialNumber() {
2677
      this.serialNumber = null;
2832 chandransh 2678
    }
2679
 
4496 mandeep.dh 2680
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
2681
    public boolean isSetSerialNumber() {
2682
      return this.serialNumber != null;
2832 chandransh 2683
    }
2684
 
4496 mandeep.dh 2685
    public void setSerialNumberIsSet(boolean value) {
2686
      if (!value) {
2687
        this.serialNumber = null;
2688
      }
2832 chandransh 2689
    }
2690
 
2691
    public void setFieldValue(_Fields field, Object value) {
2692
      switch (field) {
4496 mandeep.dh 2693
      case SERIAL_NUMBER:
2832 chandransh 2694
        if (value == null) {
4496 mandeep.dh 2695
          unsetSerialNumber();
2832 chandransh 2696
        } else {
4496 mandeep.dh 2697
          setSerialNumber((String)value);
2832 chandransh 2698
        }
2699
        break;
2700
 
2701
      }
2702
    }
2703
 
2704
    public Object getFieldValue(_Fields field) {
2705
      switch (field) {
4496 mandeep.dh 2706
      case SERIAL_NUMBER:
2707
        return getSerialNumber();
2832 chandransh 2708
 
2709
      }
2710
      throw new IllegalStateException();
2711
    }
2712
 
3430 rajveer 2713
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2714
    public boolean isSet(_Fields field) {
2715
      if (field == null) {
2716
        throw new IllegalArgumentException();
2717
      }
2832 chandransh 2718
 
2719
      switch (field) {
4496 mandeep.dh 2720
      case SERIAL_NUMBER:
2721
        return isSetSerialNumber();
2832 chandransh 2722
      }
2723
      throw new IllegalStateException();
2724
    }
2725
 
2726
    @Override
2727
    public boolean equals(Object that) {
2728
      if (that == null)
2729
        return false;
4496 mandeep.dh 2730
      if (that instanceof getInventoryItem_args)
2731
        return this.equals((getInventoryItem_args)that);
2832 chandransh 2732
      return false;
2733
    }
2734
 
4496 mandeep.dh 2735
    public boolean equals(getInventoryItem_args that) {
2832 chandransh 2736
      if (that == null)
2737
        return false;
2738
 
4496 mandeep.dh 2739
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
2740
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
2741
      if (this_present_serialNumber || that_present_serialNumber) {
2742
        if (!(this_present_serialNumber && that_present_serialNumber))
2832 chandransh 2743
          return false;
4496 mandeep.dh 2744
        if (!this.serialNumber.equals(that.serialNumber))
2832 chandransh 2745
          return false;
2746
      }
2747
 
2748
      return true;
2749
    }
2750
 
2751
    @Override
2752
    public int hashCode() {
2753
      return 0;
2754
    }
2755
 
4496 mandeep.dh 2756
    public int compareTo(getInventoryItem_args other) {
2832 chandransh 2757
      if (!getClass().equals(other.getClass())) {
2758
        return getClass().getName().compareTo(other.getClass().getName());
2759
      }
2760
 
2761
      int lastComparison = 0;
4496 mandeep.dh 2762
      getInventoryItem_args typedOther = (getInventoryItem_args)other;
2832 chandransh 2763
 
4496 mandeep.dh 2764
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
2832 chandransh 2765
      if (lastComparison != 0) {
2766
        return lastComparison;
2767
      }
4496 mandeep.dh 2768
      if (isSetSerialNumber()) {
2769
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
3430 rajveer 2770
        if (lastComparison != 0) {
2771
          return lastComparison;
2772
        }
2832 chandransh 2773
      }
2774
      return 0;
2775
    }
2776
 
3430 rajveer 2777
    public _Fields fieldForId(int fieldId) {
2778
      return _Fields.findByThriftId(fieldId);
2779
    }
2780
 
2781
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2782
      org.apache.thrift.protocol.TField field;
2832 chandransh 2783
      iprot.readStructBegin();
2784
      while (true)
2785
      {
2786
        field = iprot.readFieldBegin();
3430 rajveer 2787
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2832 chandransh 2788
          break;
2789
        }
3430 rajveer 2790
        switch (field.id) {
4496 mandeep.dh 2791
          case 1: // SERIAL_NUMBER
2792
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
2793
              this.serialNumber = iprot.readString();
3430 rajveer 2794
            } else { 
2795
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2796
            }
2797
            break;
2798
          default:
2799
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2832 chandransh 2800
        }
3430 rajveer 2801
        iprot.readFieldEnd();
2832 chandransh 2802
      }
2803
      iprot.readStructEnd();
2804
      validate();
2805
    }
2806
 
3430 rajveer 2807
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2832 chandransh 2808
      validate();
2809
 
2810
      oprot.writeStructBegin(STRUCT_DESC);
4496 mandeep.dh 2811
      if (this.serialNumber != null) {
2812
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
2813
        oprot.writeString(this.serialNumber);
2814
        oprot.writeFieldEnd();
2815
      }
2832 chandransh 2816
      oprot.writeFieldStop();
2817
      oprot.writeStructEnd();
2818
    }
2819
 
2820
    @Override
2821
    public String toString() {
4496 mandeep.dh 2822
      StringBuilder sb = new StringBuilder("getInventoryItem_args(");
2832 chandransh 2823
      boolean first = true;
2824
 
4496 mandeep.dh 2825
      sb.append("serialNumber:");
2826
      if (this.serialNumber == null) {
2827
        sb.append("null");
2828
      } else {
2829
        sb.append(this.serialNumber);
2830
      }
2832 chandransh 2831
      first = false;
2832
      sb.append(")");
2833
      return sb.toString();
2834
    }
2835
 
3430 rajveer 2836
    public void validate() throws org.apache.thrift.TException {
2832 chandransh 2837
      // check for required fields
2838
    }
2839
 
3430 rajveer 2840
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2841
      try {
2842
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2843
      } catch (org.apache.thrift.TException te) {
2844
        throw new java.io.IOException(te);
2845
      }
2846
    }
2847
 
2848
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2849
      try {
2850
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2851
      } catch (org.apache.thrift.TException te) {
2852
        throw new java.io.IOException(te);
2853
      }
2854
    }
2855
 
2832 chandransh 2856
  }
2857
 
4496 mandeep.dh 2858
  public static class getInventoryItem_result implements org.apache.thrift.TBase<getInventoryItem_result, getInventoryItem_result._Fields>, java.io.Serializable, Cloneable   {
2859
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_result");
2832 chandransh 2860
 
3430 rajveer 2861
    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 2862
    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 2863
 
4496 mandeep.dh 2864
    private InventoryItem success; // required
4541 mandeep.dh 2865
    private WarehouseServiceException wex; // required
2832 chandransh 2866
 
2867
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2868
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4541 mandeep.dh 2869
      SUCCESS((short)0, "success"),
2870
      WEX((short)1, "wex");
2832 chandransh 2871
 
2872
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2873
 
2874
      static {
2875
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2876
          byName.put(field.getFieldName(), field);
2877
        }
2878
      }
2879
 
2880
      /**
2881
       * Find the _Fields constant that matches fieldId, or null if its not found.
2882
       */
2883
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2884
        switch(fieldId) {
2885
          case 0: // SUCCESS
2886
            return SUCCESS;
4541 mandeep.dh 2887
          case 1: // WEX
2888
            return WEX;
3430 rajveer 2889
          default:
2890
            return null;
2891
        }
2832 chandransh 2892
      }
2893
 
2894
      /**
2895
       * Find the _Fields constant that matches fieldId, throwing an exception
2896
       * if it is not found.
2897
       */
2898
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2899
        _Fields fields = findByThriftId(fieldId);
2900
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2901
        return fields;
2902
      }
2903
 
2904
      /**
2905
       * Find the _Fields constant that matches name, or null if its not found.
2906
       */
2907
      public static _Fields findByName(String name) {
2908
        return byName.get(name);
2909
      }
2910
 
2911
      private final short _thriftId;
2912
      private final String _fieldName;
2913
 
2914
      _Fields(short thriftId, String fieldName) {
2915
        _thriftId = thriftId;
2916
        _fieldName = fieldName;
2917
      }
2918
 
2919
      public short getThriftFieldId() {
2920
        return _thriftId;
2921
      }
2922
 
2923
      public String getFieldName() {
2924
        return _fieldName;
2925
      }
2926
    }
2927
 
2928
    // isset id assignments
2929
 
3430 rajveer 2930
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2832 chandransh 2931
    static {
3430 rajveer 2932
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2933
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 2934
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
4541 mandeep.dh 2935
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2936
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3430 rajveer 2937
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 2938
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItem_result.class, metaDataMap);
2832 chandransh 2939
    }
2940
 
4496 mandeep.dh 2941
    public getInventoryItem_result() {
2832 chandransh 2942
    }
2943
 
4496 mandeep.dh 2944
    public getInventoryItem_result(
4541 mandeep.dh 2945
      InventoryItem success,
2946
      WarehouseServiceException wex)
2832 chandransh 2947
    {
2948
      this();
2949
      this.success = success;
4541 mandeep.dh 2950
      this.wex = wex;
2832 chandransh 2951
    }
2952
 
2953
    /**
2954
     * Performs a deep copy on <i>other</i>.
2955
     */
4496 mandeep.dh 2956
    public getInventoryItem_result(getInventoryItem_result other) {
2832 chandransh 2957
      if (other.isSetSuccess()) {
4496 mandeep.dh 2958
        this.success = new InventoryItem(other.success);
2832 chandransh 2959
      }
4541 mandeep.dh 2960
      if (other.isSetWex()) {
2961
        this.wex = new WarehouseServiceException(other.wex);
2962
      }
2832 chandransh 2963
    }
2964
 
4496 mandeep.dh 2965
    public getInventoryItem_result deepCopy() {
2966
      return new getInventoryItem_result(this);
2832 chandransh 2967
    }
2968
 
3430 rajveer 2969
    @Override
2970
    public void clear() {
2971
      this.success = null;
4541 mandeep.dh 2972
      this.wex = null;
2832 chandransh 2973
    }
2974
 
4496 mandeep.dh 2975
    public InventoryItem getSuccess() {
2832 chandransh 2976
      return this.success;
2977
    }
2978
 
4496 mandeep.dh 2979
    public void setSuccess(InventoryItem success) {
2832 chandransh 2980
      this.success = success;
2981
    }
2982
 
2983
    public void unsetSuccess() {
2984
      this.success = null;
2985
    }
2986
 
3430 rajveer 2987
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2832 chandransh 2988
    public boolean isSetSuccess() {
2989
      return this.success != null;
2990
    }
2991
 
2992
    public void setSuccessIsSet(boolean value) {
2993
      if (!value) {
2994
        this.success = null;
2995
      }
2996
    }
2997
 
4541 mandeep.dh 2998
    public WarehouseServiceException getWex() {
2999
      return this.wex;
3000
    }
3001
 
3002
    public void setWex(WarehouseServiceException wex) {
3003
      this.wex = wex;
3004
    }
3005
 
3006
    public void unsetWex() {
3007
      this.wex = null;
3008
    }
3009
 
3010
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
3011
    public boolean isSetWex() {
3012
      return this.wex != null;
3013
    }
3014
 
3015
    public void setWexIsSet(boolean value) {
3016
      if (!value) {
3017
        this.wex = null;
3018
      }
3019
    }
3020
 
2832 chandransh 3021
    public void setFieldValue(_Fields field, Object value) {
3022
      switch (field) {
3023
      case SUCCESS:
3024
        if (value == null) {
3025
          unsetSuccess();
3026
        } else {
4496 mandeep.dh 3027
          setSuccess((InventoryItem)value);
2832 chandransh 3028
        }
3029
        break;
3030
 
4541 mandeep.dh 3031
      case WEX:
3032
        if (value == null) {
3033
          unsetWex();
3034
        } else {
3035
          setWex((WarehouseServiceException)value);
3036
        }
3037
        break;
3038
 
2832 chandransh 3039
      }
3040
    }
3041
 
3042
    public Object getFieldValue(_Fields field) {
3043
      switch (field) {
3044
      case SUCCESS:
3045
        return getSuccess();
3046
 
4541 mandeep.dh 3047
      case WEX:
3048
        return getWex();
3049
 
2832 chandransh 3050
      }
3051
      throw new IllegalStateException();
3052
    }
3053
 
3430 rajveer 3054
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3055
    public boolean isSet(_Fields field) {
3056
      if (field == null) {
3057
        throw new IllegalArgumentException();
3058
      }
2832 chandransh 3059
 
3060
      switch (field) {
3061
      case SUCCESS:
3062
        return isSetSuccess();
4541 mandeep.dh 3063
      case WEX:
3064
        return isSetWex();
2832 chandransh 3065
      }
3066
      throw new IllegalStateException();
3067
    }
3068
 
3069
    @Override
3070
    public boolean equals(Object that) {
3071
      if (that == null)
3072
        return false;
4496 mandeep.dh 3073
      if (that instanceof getInventoryItem_result)
3074
        return this.equals((getInventoryItem_result)that);
2832 chandransh 3075
      return false;
3076
    }
3077
 
4496 mandeep.dh 3078
    public boolean equals(getInventoryItem_result that) {
2832 chandransh 3079
      if (that == null)
3080
        return false;
3081
 
3082
      boolean this_present_success = true && this.isSetSuccess();
3083
      boolean that_present_success = true && that.isSetSuccess();
3084
      if (this_present_success || that_present_success) {
3085
        if (!(this_present_success && that_present_success))
3086
          return false;
3087
        if (!this.success.equals(that.success))
3088
          return false;
3089
      }
3090
 
4541 mandeep.dh 3091
      boolean this_present_wex = true && this.isSetWex();
3092
      boolean that_present_wex = true && that.isSetWex();
3093
      if (this_present_wex || that_present_wex) {
3094
        if (!(this_present_wex && that_present_wex))
3095
          return false;
3096
        if (!this.wex.equals(that.wex))
3097
          return false;
3098
      }
3099
 
2832 chandransh 3100
      return true;
3101
    }
3102
 
3103
    @Override
3104
    public int hashCode() {
3105
      return 0;
3106
    }
3107
 
4496 mandeep.dh 3108
    public int compareTo(getInventoryItem_result other) {
2832 chandransh 3109
      if (!getClass().equals(other.getClass())) {
3110
        return getClass().getName().compareTo(other.getClass().getName());
3111
      }
3112
 
3113
      int lastComparison = 0;
4496 mandeep.dh 3114
      getInventoryItem_result typedOther = (getInventoryItem_result)other;
2832 chandransh 3115
 
3430 rajveer 3116
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2832 chandransh 3117
      if (lastComparison != 0) {
3118
        return lastComparison;
3119
      }
3430 rajveer 3120
      if (isSetSuccess()) {
3121
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3122
        if (lastComparison != 0) {
3123
          return lastComparison;
3124
        }
2832 chandransh 3125
      }
4541 mandeep.dh 3126
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
3127
      if (lastComparison != 0) {
3128
        return lastComparison;
3129
      }
3130
      if (isSetWex()) {
3131
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
3132
        if (lastComparison != 0) {
3133
          return lastComparison;
3134
        }
3135
      }
2832 chandransh 3136
      return 0;
3137
    }
3138
 
3430 rajveer 3139
    public _Fields fieldForId(int fieldId) {
3140
      return _Fields.findByThriftId(fieldId);
3141
    }
3142
 
3143
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3144
      org.apache.thrift.protocol.TField field;
2832 chandransh 3145
      iprot.readStructBegin();
3146
      while (true)
3147
      {
3148
        field = iprot.readFieldBegin();
3430 rajveer 3149
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2832 chandransh 3150
          break;
3151
        }
3430 rajveer 3152
        switch (field.id) {
3153
          case 0: // SUCCESS
3154
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4496 mandeep.dh 3155
              this.success = new InventoryItem();
3430 rajveer 3156
              this.success.read(iprot);
3157
            } else { 
3158
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3159
            }
3160
            break;
4541 mandeep.dh 3161
          case 1: // WEX
3162
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3163
              this.wex = new WarehouseServiceException();
3164
              this.wex.read(iprot);
3165
            } else { 
3166
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3167
            }
3168
            break;
3430 rajveer 3169
          default:
3170
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2832 chandransh 3171
        }
3430 rajveer 3172
        iprot.readFieldEnd();
2832 chandransh 3173
      }
3174
      iprot.readStructEnd();
3175
      validate();
3176
    }
3177
 
3430 rajveer 3178
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2832 chandransh 3179
      oprot.writeStructBegin(STRUCT_DESC);
3180
 
3181
      if (this.isSetSuccess()) {
3182
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3183
        this.success.write(oprot);
3184
        oprot.writeFieldEnd();
4541 mandeep.dh 3185
      } else if (this.isSetWex()) {
3186
        oprot.writeFieldBegin(WEX_FIELD_DESC);
3187
        this.wex.write(oprot);
3188
        oprot.writeFieldEnd();
2832 chandransh 3189
      }
3190
      oprot.writeFieldStop();
3191
      oprot.writeStructEnd();
3192
    }
3193
 
3194
    @Override
3195
    public String toString() {
4496 mandeep.dh 3196
      StringBuilder sb = new StringBuilder("getInventoryItem_result(");
2832 chandransh 3197
      boolean first = true;
3198
 
3199
      sb.append("success:");
3200
      if (this.success == null) {
3201
        sb.append("null");
3202
      } else {
3203
        sb.append(this.success);
3204
      }
3205
      first = false;
4541 mandeep.dh 3206
      if (!first) sb.append(", ");
3207
      sb.append("wex:");
3208
      if (this.wex == null) {
3209
        sb.append("null");
3210
      } else {
3211
        sb.append(this.wex);
3212
      }
3213
      first = false;
2832 chandransh 3214
      sb.append(")");
3215
      return sb.toString();
3216
    }
3217
 
3430 rajveer 3218
    public void validate() throws org.apache.thrift.TException {
2832 chandransh 3219
      // check for required fields
3220
    }
3221
 
3430 rajveer 3222
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3223
      try {
3224
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3225
      } catch (org.apache.thrift.TException te) {
3226
        throw new java.io.IOException(te);
3227
      }
3228
    }
3229
 
3230
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3231
      try {
3232
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3233
      } catch (org.apache.thrift.TException te) {
3234
        throw new java.io.IOException(te);
3235
      }
3236
    }
3237
 
2832 chandransh 3238
  }
3239
 
5361 mandeep.dh 3240
  public static class getNonSeralizedInventoryItem_args implements org.apache.thrift.TBase<getNonSeralizedInventoryItem_args, getNonSeralizedInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
3241
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNonSeralizedInventoryItem_args");
2820 chandransh 3242
 
5530 mandeep.dh 3243
    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);
3244
    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);
3245
    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 3246
 
5530 mandeep.dh 3247
    private String itemNumber; // required
4496 mandeep.dh 3248
    private long itemId; // required
5530 mandeep.dh 3249
    private long fulfilmentWarehouseId; // required
2820 chandransh 3250
 
3251
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 3252
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5530 mandeep.dh 3253
      ITEM_NUMBER((short)1, "itemNumber"),
3254
      ITEM_ID((short)2, "itemId"),
3255
      FULFILMENT_WAREHOUSE_ID((short)3, "fulfilmentWarehouseId");
2820 chandransh 3256
 
3257
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3258
 
3259
      static {
3260
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3261
          byName.put(field.getFieldName(), field);
3262
        }
3263
      }
3264
 
3265
      /**
3266
       * Find the _Fields constant that matches fieldId, or null if its not found.
3267
       */
3268
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 3269
        switch(fieldId) {
5530 mandeep.dh 3270
          case 1: // ITEM_NUMBER
3271
            return ITEM_NUMBER;
3272
          case 2: // ITEM_ID
4496 mandeep.dh 3273
            return ITEM_ID;
5530 mandeep.dh 3274
          case 3: // FULFILMENT_WAREHOUSE_ID
3275
            return FULFILMENT_WAREHOUSE_ID;
3430 rajveer 3276
          default:
3277
            return null;
3278
        }
2820 chandransh 3279
      }
3280
 
3281
      /**
3282
       * Find the _Fields constant that matches fieldId, throwing an exception
3283
       * if it is not found.
3284
       */
3285
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3286
        _Fields fields = findByThriftId(fieldId);
3287
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3288
        return fields;
3289
      }
3290
 
3291
      /**
3292
       * Find the _Fields constant that matches name, or null if its not found.
3293
       */
3294
      public static _Fields findByName(String name) {
3295
        return byName.get(name);
3296
      }
3297
 
3298
      private final short _thriftId;
3299
      private final String _fieldName;
3300
 
3301
      _Fields(short thriftId, String fieldName) {
3302
        _thriftId = thriftId;
3303
        _fieldName = fieldName;
3304
      }
3305
 
3306
      public short getThriftFieldId() {
3307
        return _thriftId;
3308
      }
3309
 
3310
      public String getFieldName() {
3311
        return _fieldName;
3312
      }
3313
    }
3314
 
3315
    // isset id assignments
4496 mandeep.dh 3316
    private static final int __ITEMID_ISSET_ID = 0;
5530 mandeep.dh 3317
    private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 1;
5361 mandeep.dh 3318
    private BitSet __isset_bit_vector = new BitSet(2);
2820 chandransh 3319
 
3430 rajveer 3320
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 3321
    static {
3430 rajveer 3322
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5530 mandeep.dh 3323
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3324
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
4496 mandeep.dh 3325
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3430 rajveer 3326
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5530 mandeep.dh 3327
      tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 3328
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 3329
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5361 mandeep.dh 3330
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNonSeralizedInventoryItem_args.class, metaDataMap);
2820 chandransh 3331
    }
3332
 
5361 mandeep.dh 3333
    public getNonSeralizedInventoryItem_args() {
2820 chandransh 3334
    }
3335
 
5361 mandeep.dh 3336
    public getNonSeralizedInventoryItem_args(
5530 mandeep.dh 3337
      String itemNumber,
4496 mandeep.dh 3338
      long itemId,
5530 mandeep.dh 3339
      long fulfilmentWarehouseId)
2820 chandransh 3340
    {
3341
      this();
5530 mandeep.dh 3342
      this.itemNumber = itemNumber;
4496 mandeep.dh 3343
      this.itemId = itemId;
3344
      setItemIdIsSet(true);
5530 mandeep.dh 3345
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
3346
      setFulfilmentWarehouseIdIsSet(true);
2820 chandransh 3347
    }
3348
 
3349
    /**
3350
     * Performs a deep copy on <i>other</i>.
3351
     */
5361 mandeep.dh 3352
    public getNonSeralizedInventoryItem_args(getNonSeralizedInventoryItem_args other) {
2820 chandransh 3353
      __isset_bit_vector.clear();
3354
      __isset_bit_vector.or(other.__isset_bit_vector);
5530 mandeep.dh 3355
      if (other.isSetItemNumber()) {
3356
        this.itemNumber = other.itemNumber;
3357
      }
4496 mandeep.dh 3358
      this.itemId = other.itemId;
5530 mandeep.dh 3359
      this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
2820 chandransh 3360
    }
3361
 
5361 mandeep.dh 3362
    public getNonSeralizedInventoryItem_args deepCopy() {
3363
      return new getNonSeralizedInventoryItem_args(this);
2820 chandransh 3364
    }
3365
 
3430 rajveer 3366
    @Override
3367
    public void clear() {
5530 mandeep.dh 3368
      this.itemNumber = null;
4496 mandeep.dh 3369
      setItemIdIsSet(false);
3370
      this.itemId = 0;
5530 mandeep.dh 3371
      setFulfilmentWarehouseIdIsSet(false);
3372
      this.fulfilmentWarehouseId = 0;
2820 chandransh 3373
    }
3374
 
5530 mandeep.dh 3375
    public String getItemNumber() {
3376
      return this.itemNumber;
3377
    }
3378
 
3379
    public void setItemNumber(String itemNumber) {
3380
      this.itemNumber = itemNumber;
3381
    }
3382
 
3383
    public void unsetItemNumber() {
3384
      this.itemNumber = null;
3385
    }
3386
 
3387
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
3388
    public boolean isSetItemNumber() {
3389
      return this.itemNumber != null;
3390
    }
3391
 
3392
    public void setItemNumberIsSet(boolean value) {
3393
      if (!value) {
3394
        this.itemNumber = null;
3395
      }
3396
    }
3397
 
4496 mandeep.dh 3398
    public long getItemId() {
3399
      return this.itemId;
2820 chandransh 3400
    }
3401
 
4496 mandeep.dh 3402
    public void setItemId(long itemId) {
3403
      this.itemId = itemId;
3404
      setItemIdIsSet(true);
2820 chandransh 3405
    }
3406
 
4496 mandeep.dh 3407
    public void unsetItemId() {
3408
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
2820 chandransh 3409
    }
3410
 
4496 mandeep.dh 3411
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
3412
    public boolean isSetItemId() {
3413
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
2820 chandransh 3414
    }
3415
 
4496 mandeep.dh 3416
    public void setItemIdIsSet(boolean value) {
3417
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
2820 chandransh 3418
    }
3419
 
5530 mandeep.dh 3420
    public long getFulfilmentWarehouseId() {
3421
      return this.fulfilmentWarehouseId;
2820 chandransh 3422
    }
3423
 
5530 mandeep.dh 3424
    public void setFulfilmentWarehouseId(long fulfilmentWarehouseId) {
3425
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
3426
      setFulfilmentWarehouseIdIsSet(true);
2820 chandransh 3427
    }
3428
 
5530 mandeep.dh 3429
    public void unsetFulfilmentWarehouseId() {
3430
      __isset_bit_vector.clear(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 3431
    }
3432
 
5530 mandeep.dh 3433
    /** Returns true if field fulfilmentWarehouseId is set (has been assigned a value) and false otherwise */
3434
    public boolean isSetFulfilmentWarehouseId() {
3435
      return __isset_bit_vector.get(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 3436
    }
3437
 
5530 mandeep.dh 3438
    public void setFulfilmentWarehouseIdIsSet(boolean value) {
3439
      __isset_bit_vector.set(__FULFILMENTWAREHOUSEID_ISSET_ID, value);
2820 chandransh 3440
    }
3441
 
3442
    public void setFieldValue(_Fields field, Object value) {
3443
      switch (field) {
5530 mandeep.dh 3444
      case ITEM_NUMBER:
3445
        if (value == null) {
3446
          unsetItemNumber();
3447
        } else {
3448
          setItemNumber((String)value);
3449
        }
3450
        break;
3451
 
4496 mandeep.dh 3452
      case ITEM_ID:
2820 chandransh 3453
        if (value == null) {
4496 mandeep.dh 3454
          unsetItemId();
2820 chandransh 3455
        } else {
4496 mandeep.dh 3456
          setItemId((Long)value);
2820 chandransh 3457
        }
3458
        break;
3459
 
5530 mandeep.dh 3460
      case FULFILMENT_WAREHOUSE_ID:
2820 chandransh 3461
        if (value == null) {
5530 mandeep.dh 3462
          unsetFulfilmentWarehouseId();
2820 chandransh 3463
        } else {
5530 mandeep.dh 3464
          setFulfilmentWarehouseId((Long)value);
2820 chandransh 3465
        }
3466
        break;
3467
 
3468
      }
3469
    }
3470
 
3471
    public Object getFieldValue(_Fields field) {
3472
      switch (field) {
5530 mandeep.dh 3473
      case ITEM_NUMBER:
3474
        return getItemNumber();
3475
 
4496 mandeep.dh 3476
      case ITEM_ID:
3477
        return Long.valueOf(getItemId());
2820 chandransh 3478
 
5530 mandeep.dh 3479
      case FULFILMENT_WAREHOUSE_ID:
3480
        return Long.valueOf(getFulfilmentWarehouseId());
2820 chandransh 3481
 
3482
      }
3483
      throw new IllegalStateException();
3484
    }
3485
 
3430 rajveer 3486
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3487
    public boolean isSet(_Fields field) {
3488
      if (field == null) {
3489
        throw new IllegalArgumentException();
3490
      }
2820 chandransh 3491
 
3492
      switch (field) {
5530 mandeep.dh 3493
      case ITEM_NUMBER:
3494
        return isSetItemNumber();
4496 mandeep.dh 3495
      case ITEM_ID:
3496
        return isSetItemId();
5530 mandeep.dh 3497
      case FULFILMENT_WAREHOUSE_ID:
3498
        return isSetFulfilmentWarehouseId();
2820 chandransh 3499
      }
3500
      throw new IllegalStateException();
3501
    }
3502
 
3503
    @Override
3504
    public boolean equals(Object that) {
3505
      if (that == null)
3506
        return false;
5361 mandeep.dh 3507
      if (that instanceof getNonSeralizedInventoryItem_args)
3508
        return this.equals((getNonSeralizedInventoryItem_args)that);
2820 chandransh 3509
      return false;
3510
    }
3511
 
5361 mandeep.dh 3512
    public boolean equals(getNonSeralizedInventoryItem_args that) {
2820 chandransh 3513
      if (that == null)
3514
        return false;
3515
 
5530 mandeep.dh 3516
      boolean this_present_itemNumber = true && this.isSetItemNumber();
3517
      boolean that_present_itemNumber = true && that.isSetItemNumber();
3518
      if (this_present_itemNumber || that_present_itemNumber) {
3519
        if (!(this_present_itemNumber && that_present_itemNumber))
3520
          return false;
3521
        if (!this.itemNumber.equals(that.itemNumber))
3522
          return false;
3523
      }
3524
 
4496 mandeep.dh 3525
      boolean this_present_itemId = true;
3526
      boolean that_present_itemId = true;
3527
      if (this_present_itemId || that_present_itemId) {
3528
        if (!(this_present_itemId && that_present_itemId))
2820 chandransh 3529
          return false;
4496 mandeep.dh 3530
        if (this.itemId != that.itemId)
2820 chandransh 3531
          return false;
3532
      }
3533
 
5530 mandeep.dh 3534
      boolean this_present_fulfilmentWarehouseId = true;
3535
      boolean that_present_fulfilmentWarehouseId = true;
3536
      if (this_present_fulfilmentWarehouseId || that_present_fulfilmentWarehouseId) {
3537
        if (!(this_present_fulfilmentWarehouseId && that_present_fulfilmentWarehouseId))
2820 chandransh 3538
          return false;
5530 mandeep.dh 3539
        if (this.fulfilmentWarehouseId != that.fulfilmentWarehouseId)
2820 chandransh 3540
          return false;
3541
      }
3542
 
3543
      return true;
3544
    }
3545
 
3546
    @Override
3547
    public int hashCode() {
3548
      return 0;
3549
    }
3550
 
5361 mandeep.dh 3551
    public int compareTo(getNonSeralizedInventoryItem_args other) {
2820 chandransh 3552
      if (!getClass().equals(other.getClass())) {
3553
        return getClass().getName().compareTo(other.getClass().getName());
3554
      }
3555
 
3556
      int lastComparison = 0;
5361 mandeep.dh 3557
      getNonSeralizedInventoryItem_args typedOther = (getNonSeralizedInventoryItem_args)other;
2820 chandransh 3558
 
5530 mandeep.dh 3559
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
3560
      if (lastComparison != 0) {
3561
        return lastComparison;
3562
      }
3563
      if (isSetItemNumber()) {
3564
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
3565
        if (lastComparison != 0) {
3566
          return lastComparison;
3567
        }
3568
      }
4496 mandeep.dh 3569
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
2820 chandransh 3570
      if (lastComparison != 0) {
3571
        return lastComparison;
3572
      }
4496 mandeep.dh 3573
      if (isSetItemId()) {
3574
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
3430 rajveer 3575
        if (lastComparison != 0) {
3576
          return lastComparison;
3577
        }
2820 chandransh 3578
      }
5530 mandeep.dh 3579
      lastComparison = Boolean.valueOf(isSetFulfilmentWarehouseId()).compareTo(typedOther.isSetFulfilmentWarehouseId());
2820 chandransh 3580
      if (lastComparison != 0) {
3581
        return lastComparison;
3582
      }
5530 mandeep.dh 3583
      if (isSetFulfilmentWarehouseId()) {
3584
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilmentWarehouseId, typedOther.fulfilmentWarehouseId);
3430 rajveer 3585
        if (lastComparison != 0) {
3586
          return lastComparison;
3587
        }
2820 chandransh 3588
      }
3589
      return 0;
3590
    }
3591
 
3430 rajveer 3592
    public _Fields fieldForId(int fieldId) {
3593
      return _Fields.findByThriftId(fieldId);
3594
    }
3595
 
3596
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3597
      org.apache.thrift.protocol.TField field;
2820 chandransh 3598
      iprot.readStructBegin();
3599
      while (true)
3600
      {
3601
        field = iprot.readFieldBegin();
3430 rajveer 3602
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 3603
          break;
3604
        }
3430 rajveer 3605
        switch (field.id) {
5530 mandeep.dh 3606
          case 1: // ITEM_NUMBER
3607
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
3608
              this.itemNumber = iprot.readString();
3609
            } else { 
3610
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3611
            }
3612
            break;
3613
          case 2: // ITEM_ID
3430 rajveer 3614
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4496 mandeep.dh 3615
              this.itemId = iprot.readI64();
3616
              setItemIdIsSet(true);
3430 rajveer 3617
            } else { 
3618
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3619
            }
3620
            break;
5530 mandeep.dh 3621
          case 3: // FULFILMENT_WAREHOUSE_ID
4496 mandeep.dh 3622
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5530 mandeep.dh 3623
              this.fulfilmentWarehouseId = iprot.readI64();
3624
              setFulfilmentWarehouseIdIsSet(true);
3430 rajveer 3625
            } else { 
3626
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3627
            }
3628
            break;
3629
          default:
3630
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 3631
        }
3430 rajveer 3632
        iprot.readFieldEnd();
2820 chandransh 3633
      }
3634
      iprot.readStructEnd();
3635
      validate();
3636
    }
3637
 
3430 rajveer 3638
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 3639
      validate();
3640
 
3641
      oprot.writeStructBegin(STRUCT_DESC);
5530 mandeep.dh 3642
      if (this.itemNumber != null) {
3643
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
3644
        oprot.writeString(this.itemNumber);
3645
        oprot.writeFieldEnd();
3646
      }
4496 mandeep.dh 3647
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
3648
      oprot.writeI64(this.itemId);
2820 chandransh 3649
      oprot.writeFieldEnd();
5530 mandeep.dh 3650
      oprot.writeFieldBegin(FULFILMENT_WAREHOUSE_ID_FIELD_DESC);
3651
      oprot.writeI64(this.fulfilmentWarehouseId);
2820 chandransh 3652
      oprot.writeFieldEnd();
3653
      oprot.writeFieldStop();
3654
      oprot.writeStructEnd();
3655
    }
3656
 
3657
    @Override
3658
    public String toString() {
5361 mandeep.dh 3659
      StringBuilder sb = new StringBuilder("getNonSeralizedInventoryItem_args(");
2820 chandransh 3660
      boolean first = true;
3661
 
5530 mandeep.dh 3662
      sb.append("itemNumber:");
3663
      if (this.itemNumber == null) {
3664
        sb.append("null");
3665
      } else {
3666
        sb.append(this.itemNumber);
3667
      }
3668
      first = false;
3669
      if (!first) sb.append(", ");
4496 mandeep.dh 3670
      sb.append("itemId:");
3671
      sb.append(this.itemId);
2820 chandransh 3672
      first = false;
3673
      if (!first) sb.append(", ");
5530 mandeep.dh 3674
      sb.append("fulfilmentWarehouseId:");
3675
      sb.append(this.fulfilmentWarehouseId);
2820 chandransh 3676
      first = false;
3677
      sb.append(")");
3678
      return sb.toString();
3679
    }
3680
 
3430 rajveer 3681
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 3682
      // check for required fields
3683
    }
3684
 
3430 rajveer 3685
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3686
      try {
3687
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3688
      } catch (org.apache.thrift.TException te) {
3689
        throw new java.io.IOException(te);
3690
      }
3691
    }
3692
 
3693
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3694
      try {
4496 mandeep.dh 3695
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
3696
        __isset_bit_vector = new BitSet(1);
3430 rajveer 3697
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3698
      } catch (org.apache.thrift.TException te) {
3699
        throw new java.io.IOException(te);
3700
      }
3701
    }
3702
 
2820 chandransh 3703
  }
3704
 
5361 mandeep.dh 3705
  public static class getNonSeralizedInventoryItem_result implements org.apache.thrift.TBase<getNonSeralizedInventoryItem_result, getNonSeralizedInventoryItem_result._Fields>, java.io.Serializable, Cloneable   {
3706
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNonSeralizedInventoryItem_result");
2820 chandransh 3707
 
5361 mandeep.dh 3708
    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);
3709
    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 3710
 
5361 mandeep.dh 3711
    private InventoryItem success; // required
3712
    private WarehouseServiceException wex; // required
2820 chandransh 3713
 
3714
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 3715
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 3716
      SUCCESS((short)0, "success"),
3717
      WEX((short)1, "wex");
2820 chandransh 3718
 
3719
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3720
 
3721
      static {
3722
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3723
          byName.put(field.getFieldName(), field);
3724
        }
3725
      }
3726
 
3727
      /**
3728
       * Find the _Fields constant that matches fieldId, or null if its not found.
3729
       */
3730
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 3731
        switch(fieldId) {
3732
          case 0: // SUCCESS
3733
            return SUCCESS;
5361 mandeep.dh 3734
          case 1: // WEX
3735
            return WEX;
3430 rajveer 3736
          default:
3737
            return null;
3738
        }
2820 chandransh 3739
      }
3740
 
3741
      /**
3742
       * Find the _Fields constant that matches fieldId, throwing an exception
3743
       * if it is not found.
3744
       */
3745
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3746
        _Fields fields = findByThriftId(fieldId);
3747
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3748
        return fields;
3749
      }
3750
 
3751
      /**
3752
       * Find the _Fields constant that matches name, or null if its not found.
3753
       */
3754
      public static _Fields findByName(String name) {
3755
        return byName.get(name);
3756
      }
3757
 
3758
      private final short _thriftId;
3759
      private final String _fieldName;
3760
 
3761
      _Fields(short thriftId, String fieldName) {
3762
        _thriftId = thriftId;
3763
        _fieldName = fieldName;
3764
      }
3765
 
3766
      public short getThriftFieldId() {
3767
        return _thriftId;
3768
      }
3769
 
3770
      public String getFieldName() {
3771
        return _fieldName;
3772
      }
3773
    }
3774
 
3775
    // isset id assignments
3776
 
3430 rajveer 3777
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 3778
    static {
3430 rajveer 3779
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3780
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5361 mandeep.dh 3781
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3782
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3783
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3430 rajveer 3784
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5361 mandeep.dh 3785
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNonSeralizedInventoryItem_result.class, metaDataMap);
2820 chandransh 3786
    }
3787
 
5361 mandeep.dh 3788
    public getNonSeralizedInventoryItem_result() {
2820 chandransh 3789
    }
3790
 
5361 mandeep.dh 3791
    public getNonSeralizedInventoryItem_result(
3792
      InventoryItem success,
3793
      WarehouseServiceException wex)
2820 chandransh 3794
    {
3795
      this();
3796
      this.success = success;
5361 mandeep.dh 3797
      this.wex = wex;
2820 chandransh 3798
    }
3799
 
3800
    /**
3801
     * Performs a deep copy on <i>other</i>.
3802
     */
5361 mandeep.dh 3803
    public getNonSeralizedInventoryItem_result(getNonSeralizedInventoryItem_result other) {
4496 mandeep.dh 3804
      if (other.isSetSuccess()) {
5361 mandeep.dh 3805
        this.success = new InventoryItem(other.success);
2820 chandransh 3806
      }
5361 mandeep.dh 3807
      if (other.isSetWex()) {
3808
        this.wex = new WarehouseServiceException(other.wex);
3809
      }
2820 chandransh 3810
    }
3811
 
5361 mandeep.dh 3812
    public getNonSeralizedInventoryItem_result deepCopy() {
3813
      return new getNonSeralizedInventoryItem_result(this);
2820 chandransh 3814
    }
3815
 
3430 rajveer 3816
    @Override
3817
    public void clear() {
4496 mandeep.dh 3818
      this.success = null;
5361 mandeep.dh 3819
      this.wex = null;
2820 chandransh 3820
    }
3821
 
5361 mandeep.dh 3822
    public InventoryItem getSuccess() {
2820 chandransh 3823
      return this.success;
3824
    }
3825
 
5361 mandeep.dh 3826
    public void setSuccess(InventoryItem success) {
2820 chandransh 3827
      this.success = success;
3828
    }
3829
 
3830
    public void unsetSuccess() {
4496 mandeep.dh 3831
      this.success = null;
2820 chandransh 3832
    }
3833
 
3430 rajveer 3834
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2820 chandransh 3835
    public boolean isSetSuccess() {
4496 mandeep.dh 3836
      return this.success != null;
2820 chandransh 3837
    }
3838
 
3839
    public void setSuccessIsSet(boolean value) {
4496 mandeep.dh 3840
      if (!value) {
3841
        this.success = null;
3842
      }
2820 chandransh 3843
    }
3844
 
5361 mandeep.dh 3845
    public WarehouseServiceException getWex() {
3846
      return this.wex;
2820 chandransh 3847
    }
3848
 
5361 mandeep.dh 3849
    public void setWex(WarehouseServiceException wex) {
3850
      this.wex = wex;
2820 chandransh 3851
    }
3852
 
5361 mandeep.dh 3853
    public void unsetWex() {
3854
      this.wex = null;
2820 chandransh 3855
    }
3856
 
5361 mandeep.dh 3857
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
3858
    public boolean isSetWex() {
3859
      return this.wex != null;
2820 chandransh 3860
    }
3861
 
5361 mandeep.dh 3862
    public void setWexIsSet(boolean value) {
3863
      if (!value) {
3864
        this.wex = null;
2820 chandransh 3865
      }
3866
    }
3867
 
3868
    public void setFieldValue(_Fields field, Object value) {
3869
      switch (field) {
5361 mandeep.dh 3870
      case SUCCESS:
2820 chandransh 3871
        if (value == null) {
5361 mandeep.dh 3872
          unsetSuccess();
2820 chandransh 3873
        } else {
5361 mandeep.dh 3874
          setSuccess((InventoryItem)value);
2820 chandransh 3875
        }
3876
        break;
3877
 
5361 mandeep.dh 3878
      case WEX:
2820 chandransh 3879
        if (value == null) {
5361 mandeep.dh 3880
          unsetWex();
2820 chandransh 3881
        } else {
5361 mandeep.dh 3882
          setWex((WarehouseServiceException)value);
2820 chandransh 3883
        }
3884
        break;
3885
 
3886
      }
3887
    }
3888
 
3889
    public Object getFieldValue(_Fields field) {
3890
      switch (field) {
3891
      case SUCCESS:
4496 mandeep.dh 3892
        return getSuccess();
2820 chandransh 3893
 
5361 mandeep.dh 3894
      case WEX:
3895
        return getWex();
3896
 
2820 chandransh 3897
      }
3898
      throw new IllegalStateException();
3899
    }
3900
 
3430 rajveer 3901
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3902
    public boolean isSet(_Fields field) {
3903
      if (field == null) {
3904
        throw new IllegalArgumentException();
3905
      }
2820 chandransh 3906
 
3907
      switch (field) {
3908
      case SUCCESS:
3909
        return isSetSuccess();
5361 mandeep.dh 3910
      case WEX:
3911
        return isSetWex();
2820 chandransh 3912
      }
3913
      throw new IllegalStateException();
3914
    }
3915
 
3916
    @Override
3917
    public boolean equals(Object that) {
3918
      if (that == null)
3919
        return false;
5361 mandeep.dh 3920
      if (that instanceof getNonSeralizedInventoryItem_result)
3921
        return this.equals((getNonSeralizedInventoryItem_result)that);
2820 chandransh 3922
      return false;
3923
    }
3924
 
5361 mandeep.dh 3925
    public boolean equals(getNonSeralizedInventoryItem_result that) {
2820 chandransh 3926
      if (that == null)
3927
        return false;
3928
 
4496 mandeep.dh 3929
      boolean this_present_success = true && this.isSetSuccess();
3930
      boolean that_present_success = true && that.isSetSuccess();
2820 chandransh 3931
      if (this_present_success || that_present_success) {
3932
        if (!(this_present_success && that_present_success))
3933
          return false;
4496 mandeep.dh 3934
        if (!this.success.equals(that.success))
2820 chandransh 3935
          return false;
3936
      }
3937
 
5361 mandeep.dh 3938
      boolean this_present_wex = true && this.isSetWex();
3939
      boolean that_present_wex = true && that.isSetWex();
3940
      if (this_present_wex || that_present_wex) {
3941
        if (!(this_present_wex && that_present_wex))
4496 mandeep.dh 3942
          return false;
5361 mandeep.dh 3943
        if (!this.wex.equals(that.wex))
4496 mandeep.dh 3944
          return false;
3945
      }
3946
 
3947
      return true;
3948
    }
3949
 
3950
    @Override
3951
    public int hashCode() {
3952
      return 0;
3953
    }
3954
 
5361 mandeep.dh 3955
    public int compareTo(getNonSeralizedInventoryItem_result other) {
4496 mandeep.dh 3956
      if (!getClass().equals(other.getClass())) {
3957
        return getClass().getName().compareTo(other.getClass().getName());
3958
      }
3959
 
3960
      int lastComparison = 0;
5361 mandeep.dh 3961
      getNonSeralizedInventoryItem_result typedOther = (getNonSeralizedInventoryItem_result)other;
4496 mandeep.dh 3962
 
3963
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3964
      if (lastComparison != 0) {
3965
        return lastComparison;
3966
      }
3967
      if (isSetSuccess()) {
3968
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3969
        if (lastComparison != 0) {
3970
          return lastComparison;
3971
        }
3972
      }
5361 mandeep.dh 3973
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 3974
      if (lastComparison != 0) {
3975
        return lastComparison;
3976
      }
5361 mandeep.dh 3977
      if (isSetWex()) {
3978
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
3430 rajveer 3979
        if (lastComparison != 0) {
3980
          return lastComparison;
3981
        }
2820 chandransh 3982
      }
3983
      return 0;
3984
    }
3985
 
3430 rajveer 3986
    public _Fields fieldForId(int fieldId) {
3987
      return _Fields.findByThriftId(fieldId);
3988
    }
3989
 
3990
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3991
      org.apache.thrift.protocol.TField field;
2820 chandransh 3992
      iprot.readStructBegin();
3993
      while (true)
3994
      {
3995
        field = iprot.readFieldBegin();
3430 rajveer 3996
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 3997
          break;
3998
        }
3430 rajveer 3999
        switch (field.id) {
5361 mandeep.dh 4000
          case 0: // SUCCESS
4001
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4002
              this.success = new InventoryItem();
4003
              this.success.read(iprot);
3430 rajveer 4004
            } else { 
4005
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4006
            }
4007
            break;
5361 mandeep.dh 4008
          case 1: // WEX
4009
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4010
              this.wex = new WarehouseServiceException();
4011
              this.wex.read(iprot);
4496 mandeep.dh 4012
            } else { 
4013
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4014
            }
4015
            break;
4016
          default:
4017
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4018
        }
4019
        iprot.readFieldEnd();
4020
      }
4021
      iprot.readStructEnd();
4022
      validate();
4023
    }
4024
 
4025
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4026
      oprot.writeStructBegin(STRUCT_DESC);
4027
 
4028
      if (this.isSetSuccess()) {
4029
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5361 mandeep.dh 4030
        this.success.write(oprot);
4496 mandeep.dh 4031
        oprot.writeFieldEnd();
5361 mandeep.dh 4032
      } else if (this.isSetWex()) {
4033
        oprot.writeFieldBegin(WEX_FIELD_DESC);
4034
        this.wex.write(oprot);
4035
        oprot.writeFieldEnd();
4496 mandeep.dh 4036
      }
4037
      oprot.writeFieldStop();
4038
      oprot.writeStructEnd();
4039
    }
4040
 
4041
    @Override
4042
    public String toString() {
5361 mandeep.dh 4043
      StringBuilder sb = new StringBuilder("getNonSeralizedInventoryItem_result(");
4496 mandeep.dh 4044
      boolean first = true;
4045
 
4046
      sb.append("success:");
4047
      if (this.success == null) {
4048
        sb.append("null");
4049
      } else {
4050
        sb.append(this.success);
4051
      }
4052
      first = false;
5361 mandeep.dh 4053
      if (!first) sb.append(", ");
4054
      sb.append("wex:");
4055
      if (this.wex == null) {
4056
        sb.append("null");
4057
      } else {
4058
        sb.append(this.wex);
4059
      }
4060
      first = false;
4496 mandeep.dh 4061
      sb.append(")");
4062
      return sb.toString();
4063
    }
4064
 
4065
    public void validate() throws org.apache.thrift.TException {
4066
      // check for required fields
4067
    }
4068
 
4069
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4070
      try {
4071
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4072
      } catch (org.apache.thrift.TException te) {
4073
        throw new java.io.IOException(te);
4074
      }
4075
    }
4076
 
4077
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4078
      try {
4079
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4080
      } catch (org.apache.thrift.TException te) {
4081
        throw new java.io.IOException(te);
4082
      }
4083
    }
4084
 
4085
  }
4086
 
4087
  public static class scan_args implements org.apache.thrift.TBase<scan_args, scan_args._Fields>, java.io.Serializable, Cloneable   {
4088
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scan_args");
3383 chandransh 4089
 
5361 mandeep.dh 4090
    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 4091
    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);
4092
    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 4093
    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 4094
 
5361 mandeep.dh 4095
    private InventoryItem inventoryItem; // required
4496 mandeep.dh 4096
    private ScanType type; // required
4097
    private long quantity; // required
5361 mandeep.dh 4098
    private long billingWarehouseId; // required
3383 chandransh 4099
 
4100
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4101
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 4102
      INVENTORY_ITEM((short)1, "inventoryItem"),
4496 mandeep.dh 4103
      /**
4104
       * 
4105
       * @see ScanType
4106
       */
4107
      TYPE((short)2, "type"),
4108
      QUANTITY((short)3, "quantity"),
5361 mandeep.dh 4109
      BILLING_WAREHOUSE_ID((short)4, "billingWarehouseId");
3383 chandransh 4110
 
4111
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4112
 
4113
      static {
4114
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4115
          byName.put(field.getFieldName(), field);
4116
        }
4117
      }
4118
 
4119
      /**
4120
       * Find the _Fields constant that matches fieldId, or null if its not found.
4121
       */
4122
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4123
        switch(fieldId) {
5361 mandeep.dh 4124
          case 1: // INVENTORY_ITEM
4125
            return INVENTORY_ITEM;
4496 mandeep.dh 4126
          case 2: // TYPE
4127
            return TYPE;
4128
          case 3: // QUANTITY
4129
            return QUANTITY;
5361 mandeep.dh 4130
          case 4: // BILLING_WAREHOUSE_ID
4131
            return BILLING_WAREHOUSE_ID;
3430 rajveer 4132
          default:
4133
            return null;
4134
        }
3383 chandransh 4135
      }
4136
 
4137
      /**
4138
       * Find the _Fields constant that matches fieldId, throwing an exception
4139
       * if it is not found.
4140
       */
4141
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4142
        _Fields fields = findByThriftId(fieldId);
4143
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4144
        return fields;
4145
      }
4146
 
4147
      /**
4148
       * Find the _Fields constant that matches name, or null if its not found.
4149
       */
4150
      public static _Fields findByName(String name) {
4151
        return byName.get(name);
4152
      }
4153
 
4154
      private final short _thriftId;
4155
      private final String _fieldName;
4156
 
4157
      _Fields(short thriftId, String fieldName) {
4158
        _thriftId = thriftId;
4159
        _fieldName = fieldName;
4160
      }
4161
 
4162
      public short getThriftFieldId() {
4163
        return _thriftId;
4164
      }
4165
 
4166
      public String getFieldName() {
4167
        return _fieldName;
4168
      }
4169
    }
4170
 
4171
    // isset id assignments
5361 mandeep.dh 4172
    private static final int __QUANTITY_ISSET_ID = 0;
4173
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 1;
4174
    private BitSet __isset_bit_vector = new BitSet(2);
3383 chandransh 4175
 
3430 rajveer 4176
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3383 chandransh 4177
    static {
3430 rajveer 4178
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5361 mandeep.dh 4179
      tmpMap.put(_Fields.INVENTORY_ITEM, new org.apache.thrift.meta_data.FieldMetaData("inventoryItem", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4180
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
4496 mandeep.dh 4181
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4182
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
4183
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4184
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5361 mandeep.dh 4185
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 4186
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 4187
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 4188
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scan_args.class, metaDataMap);
3383 chandransh 4189
    }
4190
 
4496 mandeep.dh 4191
    public scan_args() {
3383 chandransh 4192
    }
4193
 
4496 mandeep.dh 4194
    public scan_args(
5361 mandeep.dh 4195
      InventoryItem inventoryItem,
4496 mandeep.dh 4196
      ScanType type,
4197
      long quantity,
5361 mandeep.dh 4198
      long billingWarehouseId)
3383 chandransh 4199
    {
4200
      this();
5361 mandeep.dh 4201
      this.inventoryItem = inventoryItem;
4496 mandeep.dh 4202
      this.type = type;
4203
      this.quantity = quantity;
4204
      setQuantityIsSet(true);
5361 mandeep.dh 4205
      this.billingWarehouseId = billingWarehouseId;
4206
      setBillingWarehouseIdIsSet(true);
3383 chandransh 4207
    }
4208
 
4209
    /**
4210
     * Performs a deep copy on <i>other</i>.
4211
     */
4496 mandeep.dh 4212
    public scan_args(scan_args other) {
3383 chandransh 4213
      __isset_bit_vector.clear();
4214
      __isset_bit_vector.or(other.__isset_bit_vector);
5361 mandeep.dh 4215
      if (other.isSetInventoryItem()) {
4216
        this.inventoryItem = new InventoryItem(other.inventoryItem);
4217
      }
4496 mandeep.dh 4218
      if (other.isSetType()) {
4219
        this.type = other.type;
4220
      }
4221
      this.quantity = other.quantity;
5361 mandeep.dh 4222
      this.billingWarehouseId = other.billingWarehouseId;
3383 chandransh 4223
    }
4224
 
4496 mandeep.dh 4225
    public scan_args deepCopy() {
4226
      return new scan_args(this);
3383 chandransh 4227
    }
4228
 
3430 rajveer 4229
    @Override
4230
    public void clear() {
5361 mandeep.dh 4231
      this.inventoryItem = null;
4496 mandeep.dh 4232
      this.type = null;
4233
      setQuantityIsSet(false);
4234
      this.quantity = 0;
5361 mandeep.dh 4235
      setBillingWarehouseIdIsSet(false);
4236
      this.billingWarehouseId = 0;
3383 chandransh 4237
    }
4238
 
5361 mandeep.dh 4239
    public InventoryItem getInventoryItem() {
4240
      return this.inventoryItem;
3383 chandransh 4241
    }
4242
 
5361 mandeep.dh 4243
    public void setInventoryItem(InventoryItem inventoryItem) {
4244
      this.inventoryItem = inventoryItem;
3383 chandransh 4245
    }
4246
 
5361 mandeep.dh 4247
    public void unsetInventoryItem() {
4248
      this.inventoryItem = null;
3383 chandransh 4249
    }
4250
 
5361 mandeep.dh 4251
    /** Returns true if field inventoryItem is set (has been assigned a value) and false otherwise */
4252
    public boolean isSetInventoryItem() {
4253
      return this.inventoryItem != null;
3383 chandransh 4254
    }
4255
 
5361 mandeep.dh 4256
    public void setInventoryItemIsSet(boolean value) {
4257
      if (!value) {
4258
        this.inventoryItem = null;
4259
      }
3383 chandransh 4260
    }
4261
 
4496 mandeep.dh 4262
    /**
4263
     * 
4264
     * @see ScanType
4265
     */
4266
    public ScanType getType() {
4267
      return this.type;
3383 chandransh 4268
    }
4269
 
4496 mandeep.dh 4270
    /**
4271
     * 
4272
     * @see ScanType
4273
     */
4274
    public void setType(ScanType type) {
4275
      this.type = type;
3383 chandransh 4276
    }
4277
 
4496 mandeep.dh 4278
    public void unsetType() {
4279
      this.type = null;
3383 chandransh 4280
    }
4281
 
4496 mandeep.dh 4282
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
4283
    public boolean isSetType() {
4284
      return this.type != null;
3383 chandransh 4285
    }
4286
 
4496 mandeep.dh 4287
    public void setTypeIsSet(boolean value) {
4288
      if (!value) {
4289
        this.type = null;
4290
      }
3383 chandransh 4291
    }
4292
 
4496 mandeep.dh 4293
    public long getQuantity() {
4294
      return this.quantity;
4295
    }
4296
 
4297
    public void setQuantity(long quantity) {
4298
      this.quantity = quantity;
4299
      setQuantityIsSet(true);
4300
    }
4301
 
4302
    public void unsetQuantity() {
4303
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
4304
    }
4305
 
4306
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
4307
    public boolean isSetQuantity() {
4308
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
4309
    }
4310
 
4311
    public void setQuantityIsSet(boolean value) {
4312
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
4313
    }
4314
 
5361 mandeep.dh 4315
    public long getBillingWarehouseId() {
4316
      return this.billingWarehouseId;
4496 mandeep.dh 4317
    }
4318
 
5361 mandeep.dh 4319
    public void setBillingWarehouseId(long billingWarehouseId) {
4320
      this.billingWarehouseId = billingWarehouseId;
4321
      setBillingWarehouseIdIsSet(true);
4496 mandeep.dh 4322
    }
4323
 
5361 mandeep.dh 4324
    public void unsetBillingWarehouseId() {
4325
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 4326
    }
4327
 
5361 mandeep.dh 4328
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
4329
    public boolean isSetBillingWarehouseId() {
4330
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 4331
    }
4332
 
5361 mandeep.dh 4333
    public void setBillingWarehouseIdIsSet(boolean value) {
4334
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
4496 mandeep.dh 4335
    }
4336
 
3383 chandransh 4337
    public void setFieldValue(_Fields field, Object value) {
4338
      switch (field) {
5361 mandeep.dh 4339
      case INVENTORY_ITEM:
3383 chandransh 4340
        if (value == null) {
5361 mandeep.dh 4341
          unsetInventoryItem();
3383 chandransh 4342
        } else {
5361 mandeep.dh 4343
          setInventoryItem((InventoryItem)value);
3383 chandransh 4344
        }
4345
        break;
4346
 
4496 mandeep.dh 4347
      case TYPE:
3383 chandransh 4348
        if (value == null) {
4496 mandeep.dh 4349
          unsetType();
3383 chandransh 4350
        } else {
4496 mandeep.dh 4351
          setType((ScanType)value);
3383 chandransh 4352
        }
4353
        break;
4354
 
4496 mandeep.dh 4355
      case QUANTITY:
4356
        if (value == null) {
4357
          unsetQuantity();
4358
        } else {
4359
          setQuantity((Long)value);
4360
        }
4361
        break;
4362
 
5361 mandeep.dh 4363
      case BILLING_WAREHOUSE_ID:
4496 mandeep.dh 4364
        if (value == null) {
5361 mandeep.dh 4365
          unsetBillingWarehouseId();
4496 mandeep.dh 4366
        } else {
5361 mandeep.dh 4367
          setBillingWarehouseId((Long)value);
4496 mandeep.dh 4368
        }
4369
        break;
4370
 
3383 chandransh 4371
      }
4372
    }
4373
 
4374
    public Object getFieldValue(_Fields field) {
4375
      switch (field) {
5361 mandeep.dh 4376
      case INVENTORY_ITEM:
4377
        return getInventoryItem();
3383 chandransh 4378
 
4496 mandeep.dh 4379
      case TYPE:
4380
        return getType();
3383 chandransh 4381
 
4496 mandeep.dh 4382
      case QUANTITY:
4383
        return Long.valueOf(getQuantity());
4384
 
5361 mandeep.dh 4385
      case BILLING_WAREHOUSE_ID:
4386
        return Long.valueOf(getBillingWarehouseId());
4496 mandeep.dh 4387
 
3383 chandransh 4388
      }
4389
      throw new IllegalStateException();
4390
    }
4391
 
3430 rajveer 4392
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4393
    public boolean isSet(_Fields field) {
4394
      if (field == null) {
4395
        throw new IllegalArgumentException();
4396
      }
3383 chandransh 4397
 
4398
      switch (field) {
5361 mandeep.dh 4399
      case INVENTORY_ITEM:
4400
        return isSetInventoryItem();
4496 mandeep.dh 4401
      case TYPE:
4402
        return isSetType();
4403
      case QUANTITY:
4404
        return isSetQuantity();
5361 mandeep.dh 4405
      case BILLING_WAREHOUSE_ID:
4406
        return isSetBillingWarehouseId();
3383 chandransh 4407
      }
4408
      throw new IllegalStateException();
4409
    }
4410
 
4411
    @Override
4412
    public boolean equals(Object that) {
4413
      if (that == null)
4414
        return false;
4496 mandeep.dh 4415
      if (that instanceof scan_args)
4416
        return this.equals((scan_args)that);
3383 chandransh 4417
      return false;
4418
    }
4419
 
4496 mandeep.dh 4420
    public boolean equals(scan_args that) {
3383 chandransh 4421
      if (that == null)
4422
        return false;
4423
 
5361 mandeep.dh 4424
      boolean this_present_inventoryItem = true && this.isSetInventoryItem();
4425
      boolean that_present_inventoryItem = true && that.isSetInventoryItem();
4426
      if (this_present_inventoryItem || that_present_inventoryItem) {
4427
        if (!(this_present_inventoryItem && that_present_inventoryItem))
3383 chandransh 4428
          return false;
5361 mandeep.dh 4429
        if (!this.inventoryItem.equals(that.inventoryItem))
3383 chandransh 4430
          return false;
4431
      }
4432
 
4496 mandeep.dh 4433
      boolean this_present_type = true && this.isSetType();
4434
      boolean that_present_type = true && that.isSetType();
4435
      if (this_present_type || that_present_type) {
4436
        if (!(this_present_type && that_present_type))
3383 chandransh 4437
          return false;
4496 mandeep.dh 4438
        if (!this.type.equals(that.type))
3383 chandransh 4439
          return false;
4440
      }
4441
 
4496 mandeep.dh 4442
      boolean this_present_quantity = true;
4443
      boolean that_present_quantity = true;
4444
      if (this_present_quantity || that_present_quantity) {
4445
        if (!(this_present_quantity && that_present_quantity))
4446
          return false;
4447
        if (this.quantity != that.quantity)
4448
          return false;
4449
      }
4450
 
5361 mandeep.dh 4451
      boolean this_present_billingWarehouseId = true;
4452
      boolean that_present_billingWarehouseId = true;
4453
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
4454
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
4496 mandeep.dh 4455
          return false;
5361 mandeep.dh 4456
        if (this.billingWarehouseId != that.billingWarehouseId)
4496 mandeep.dh 4457
          return false;
4458
      }
4459
 
3383 chandransh 4460
      return true;
4461
    }
4462
 
4463
    @Override
4464
    public int hashCode() {
4465
      return 0;
4466
    }
4467
 
4496 mandeep.dh 4468
    public int compareTo(scan_args other) {
3383 chandransh 4469
      if (!getClass().equals(other.getClass())) {
4470
        return getClass().getName().compareTo(other.getClass().getName());
4471
      }
4472
 
4473
      int lastComparison = 0;
4496 mandeep.dh 4474
      scan_args typedOther = (scan_args)other;
3383 chandransh 4475
 
5361 mandeep.dh 4476
      lastComparison = Boolean.valueOf(isSetInventoryItem()).compareTo(typedOther.isSetInventoryItem());
3383 chandransh 4477
      if (lastComparison != 0) {
4478
        return lastComparison;
4479
      }
5361 mandeep.dh 4480
      if (isSetInventoryItem()) {
4481
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItem, typedOther.inventoryItem);
3430 rajveer 4482
        if (lastComparison != 0) {
4483
          return lastComparison;
4484
        }
3383 chandransh 4485
      }
4496 mandeep.dh 4486
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
3383 chandransh 4487
      if (lastComparison != 0) {
4488
        return lastComparison;
4489
      }
4496 mandeep.dh 4490
      if (isSetType()) {
4491
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 4492
        if (lastComparison != 0) {
4493
          return lastComparison;
4494
        }
3383 chandransh 4495
      }
4496 mandeep.dh 4496
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
4497
      if (lastComparison != 0) {
4498
        return lastComparison;
4499
      }
4500
      if (isSetQuantity()) {
4501
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
4502
        if (lastComparison != 0) {
4503
          return lastComparison;
4504
        }
4505
      }
5361 mandeep.dh 4506
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
4496 mandeep.dh 4507
      if (lastComparison != 0) {
4508
        return lastComparison;
4509
      }
5361 mandeep.dh 4510
      if (isSetBillingWarehouseId()) {
4511
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
4496 mandeep.dh 4512
        if (lastComparison != 0) {
4513
          return lastComparison;
4514
        }
4515
      }
3383 chandransh 4516
      return 0;
4517
    }
4518
 
3430 rajveer 4519
    public _Fields fieldForId(int fieldId) {
4520
      return _Fields.findByThriftId(fieldId);
4521
    }
4522
 
4523
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4524
      org.apache.thrift.protocol.TField field;
3383 chandransh 4525
      iprot.readStructBegin();
4526
      while (true)
4527
      {
4528
        field = iprot.readFieldBegin();
3430 rajveer 4529
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3383 chandransh 4530
          break;
4531
        }
3430 rajveer 4532
        switch (field.id) {
5361 mandeep.dh 4533
          case 1: // INVENTORY_ITEM
4534
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4535
              this.inventoryItem = new InventoryItem();
4536
              this.inventoryItem.read(iprot);
3430 rajveer 4537
            } else { 
4538
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4539
            }
4540
            break;
4496 mandeep.dh 4541
          case 2: // TYPE
4542
            if (field.type == org.apache.thrift.protocol.TType.I32) {
4543
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 4544
            } else { 
4545
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4546
            }
4547
            break;
4496 mandeep.dh 4548
          case 3: // QUANTITY
4549
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4550
              this.quantity = iprot.readI64();
4551
              setQuantityIsSet(true);
4552
            } else { 
4553
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4554
            }
4555
            break;
5361 mandeep.dh 4556
          case 4: // BILLING_WAREHOUSE_ID
4496 mandeep.dh 4557
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5361 mandeep.dh 4558
              this.billingWarehouseId = iprot.readI64();
4559
              setBillingWarehouseIdIsSet(true);
4496 mandeep.dh 4560
            } else { 
4561
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4562
            }
4563
            break;
3430 rajveer 4564
          default:
4565
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3383 chandransh 4566
        }
3430 rajveer 4567
        iprot.readFieldEnd();
3383 chandransh 4568
      }
4569
      iprot.readStructEnd();
4570
      validate();
4571
    }
4572
 
3430 rajveer 4573
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3383 chandransh 4574
      validate();
4575
 
4576
      oprot.writeStructBegin(STRUCT_DESC);
5361 mandeep.dh 4577
      if (this.inventoryItem != null) {
4578
        oprot.writeFieldBegin(INVENTORY_ITEM_FIELD_DESC);
4579
        this.inventoryItem.write(oprot);
4580
        oprot.writeFieldEnd();
4581
      }
4496 mandeep.dh 4582
      if (this.type != null) {
4583
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
4584
        oprot.writeI32(this.type.getValue());
4585
        oprot.writeFieldEnd();
4586
      }
4587
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
4588
      oprot.writeI64(this.quantity);
3383 chandransh 4589
      oprot.writeFieldEnd();
5361 mandeep.dh 4590
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
4591
      oprot.writeI64(this.billingWarehouseId);
4496 mandeep.dh 4592
      oprot.writeFieldEnd();
3383 chandransh 4593
      oprot.writeFieldStop();
4594
      oprot.writeStructEnd();
4595
    }
4596
 
4597
    @Override
4598
    public String toString() {
4496 mandeep.dh 4599
      StringBuilder sb = new StringBuilder("scan_args(");
3383 chandransh 4600
      boolean first = true;
4601
 
5361 mandeep.dh 4602
      sb.append("inventoryItem:");
4603
      if (this.inventoryItem == null) {
4604
        sb.append("null");
4605
      } else {
4606
        sb.append(this.inventoryItem);
4607
      }
3383 chandransh 4608
      first = false;
4609
      if (!first) sb.append(", ");
4496 mandeep.dh 4610
      sb.append("type:");
4611
      if (this.type == null) {
4612
        sb.append("null");
4613
      } else {
4614
        sb.append(this.type);
4615
      }
3383 chandransh 4616
      first = false;
4496 mandeep.dh 4617
      if (!first) sb.append(", ");
4618
      sb.append("quantity:");
4619
      sb.append(this.quantity);
4620
      first = false;
4621
      if (!first) sb.append(", ");
5361 mandeep.dh 4622
      sb.append("billingWarehouseId:");
4623
      sb.append(this.billingWarehouseId);
4496 mandeep.dh 4624
      first = false;
3383 chandransh 4625
      sb.append(")");
4626
      return sb.toString();
4627
    }
4628
 
3430 rajveer 4629
    public void validate() throws org.apache.thrift.TException {
3383 chandransh 4630
      // check for required fields
4631
    }
4632
 
3430 rajveer 4633
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4634
      try {
4635
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4636
      } catch (org.apache.thrift.TException te) {
4637
        throw new java.io.IOException(te);
4638
      }
4639
    }
4640
 
4641
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4642
      try {
4496 mandeep.dh 4643
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
4644
        __isset_bit_vector = new BitSet(1);
3430 rajveer 4645
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4646
      } catch (org.apache.thrift.TException te) {
4647
        throw new java.io.IOException(te);
4648
      }
4649
    }
4650
 
3383 chandransh 4651
  }
4652
 
4496 mandeep.dh 4653
  public static class scan_result implements org.apache.thrift.TBase<scan_result, scan_result._Fields>, java.io.Serializable, Cloneable   {
4654
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scan_result");
3383 chandransh 4655
 
3430 rajveer 4656
    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 4657
 
3430 rajveer 4658
    private WarehouseServiceException wex; // required
3383 chandransh 4659
 
4660
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4661
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3383 chandransh 4662
      WEX((short)1, "wex");
4663
 
4664
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4665
 
4666
      static {
4667
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4668
          byName.put(field.getFieldName(), field);
4669
        }
4670
      }
4671
 
4672
      /**
4673
       * Find the _Fields constant that matches fieldId, or null if its not found.
4674
       */
4675
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4676
        switch(fieldId) {
4677
          case 1: // WEX
4678
            return WEX;
4679
          default:
4680
            return null;
4681
        }
3383 chandransh 4682
      }
4683
 
4684
      /**
4685
       * Find the _Fields constant that matches fieldId, throwing an exception
4686
       * if it is not found.
4687
       */
4688
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4689
        _Fields fields = findByThriftId(fieldId);
4690
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4691
        return fields;
4692
      }
4693
 
4694
      /**
4695
       * Find the _Fields constant that matches name, or null if its not found.
4696
       */
4697
      public static _Fields findByName(String name) {
4698
        return byName.get(name);
4699
      }
4700
 
4701
      private final short _thriftId;
4702
      private final String _fieldName;
4703
 
4704
      _Fields(short thriftId, String fieldName) {
4705
        _thriftId = thriftId;
4706
        _fieldName = fieldName;
4707
      }
4708
 
4709
      public short getThriftFieldId() {
4710
        return _thriftId;
4711
      }
4712
 
4713
      public String getFieldName() {
4714
        return _fieldName;
4715
      }
4716
    }
4717
 
4718
    // isset id assignments
4719
 
3430 rajveer 4720
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3383 chandransh 4721
    static {
3430 rajveer 4722
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4723
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4724
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4725
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 4726
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scan_result.class, metaDataMap);
3383 chandransh 4727
    }
4728
 
4496 mandeep.dh 4729
    public scan_result() {
3383 chandransh 4730
    }
4731
 
4496 mandeep.dh 4732
    public scan_result(
3383 chandransh 4733
      WarehouseServiceException wex)
4734
    {
4735
      this();
4736
      this.wex = wex;
4737
    }
4738
 
4739
    /**
4740
     * Performs a deep copy on <i>other</i>.
4741
     */
4496 mandeep.dh 4742
    public scan_result(scan_result other) {
3383 chandransh 4743
      if (other.isSetWex()) {
4744
        this.wex = new WarehouseServiceException(other.wex);
4745
      }
4746
    }
4747
 
4496 mandeep.dh 4748
    public scan_result deepCopy() {
4749
      return new scan_result(this);
3383 chandransh 4750
    }
4751
 
3430 rajveer 4752
    @Override
4753
    public void clear() {
4754
      this.wex = null;
3383 chandransh 4755
    }
4756
 
4757
    public WarehouseServiceException getWex() {
4758
      return this.wex;
4759
    }
4760
 
3430 rajveer 4761
    public void setWex(WarehouseServiceException wex) {
3383 chandransh 4762
      this.wex = wex;
4763
    }
4764
 
4765
    public void unsetWex() {
4766
      this.wex = null;
4767
    }
4768
 
3430 rajveer 4769
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
3383 chandransh 4770
    public boolean isSetWex() {
4771
      return this.wex != null;
4772
    }
4773
 
4774
    public void setWexIsSet(boolean value) {
4775
      if (!value) {
4776
        this.wex = null;
4777
      }
4778
    }
4779
 
4780
    public void setFieldValue(_Fields field, Object value) {
4781
      switch (field) {
4782
      case WEX:
4783
        if (value == null) {
4784
          unsetWex();
4785
        } else {
4786
          setWex((WarehouseServiceException)value);
4787
        }
4788
        break;
4789
 
4790
      }
4791
    }
4792
 
4793
    public Object getFieldValue(_Fields field) {
4794
      switch (field) {
4795
      case WEX:
4796
        return getWex();
4797
 
4798
      }
4799
      throw new IllegalStateException();
4800
    }
4801
 
3430 rajveer 4802
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4803
    public boolean isSet(_Fields field) {
4804
      if (field == null) {
4805
        throw new IllegalArgumentException();
4806
      }
3383 chandransh 4807
 
4808
      switch (field) {
4809
      case WEX:
4810
        return isSetWex();
4811
      }
4812
      throw new IllegalStateException();
4813
    }
4814
 
4815
    @Override
4816
    public boolean equals(Object that) {
4817
      if (that == null)
4818
        return false;
4496 mandeep.dh 4819
      if (that instanceof scan_result)
4820
        return this.equals((scan_result)that);
3383 chandransh 4821
      return false;
4822
    }
4823
 
4496 mandeep.dh 4824
    public boolean equals(scan_result that) {
3383 chandransh 4825
      if (that == null)
4826
        return false;
4827
 
4828
      boolean this_present_wex = true && this.isSetWex();
4829
      boolean that_present_wex = true && that.isSetWex();
4830
      if (this_present_wex || that_present_wex) {
4831
        if (!(this_present_wex && that_present_wex))
4832
          return false;
4833
        if (!this.wex.equals(that.wex))
4834
          return false;
4835
      }
4836
 
4837
      return true;
4838
    }
4839
 
4840
    @Override
4841
    public int hashCode() {
4842
      return 0;
4843
    }
4844
 
4496 mandeep.dh 4845
    public int compareTo(scan_result other) {
3383 chandransh 4846
      if (!getClass().equals(other.getClass())) {
4847
        return getClass().getName().compareTo(other.getClass().getName());
4848
      }
4849
 
4850
      int lastComparison = 0;
4496 mandeep.dh 4851
      scan_result typedOther = (scan_result)other;
3383 chandransh 4852
 
3430 rajveer 4853
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
3383 chandransh 4854
      if (lastComparison != 0) {
4855
        return lastComparison;
4856
      }
3430 rajveer 4857
      if (isSetWex()) {
4858
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
4859
        if (lastComparison != 0) {
4860
          return lastComparison;
4861
        }
3383 chandransh 4862
      }
4863
      return 0;
4864
    }
4865
 
3430 rajveer 4866
    public _Fields fieldForId(int fieldId) {
4867
      return _Fields.findByThriftId(fieldId);
4868
    }
4869
 
4870
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4871
      org.apache.thrift.protocol.TField field;
3383 chandransh 4872
      iprot.readStructBegin();
4873
      while (true)
4874
      {
4875
        field = iprot.readFieldBegin();
3430 rajveer 4876
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3383 chandransh 4877
          break;
4878
        }
3430 rajveer 4879
        switch (field.id) {
4880
          case 1: // WEX
4881
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4882
              this.wex = new WarehouseServiceException();
4883
              this.wex.read(iprot);
4884
            } else { 
4885
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4886
            }
4887
            break;
4888
          default:
4889
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3383 chandransh 4890
        }
3430 rajveer 4891
        iprot.readFieldEnd();
3383 chandransh 4892
      }
4893
      iprot.readStructEnd();
4894
      validate();
4895
    }
4896
 
3430 rajveer 4897
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3383 chandransh 4898
      oprot.writeStructBegin(STRUCT_DESC);
4899
 
4496 mandeep.dh 4900
      if (this.isSetWex()) {
3383 chandransh 4901
        oprot.writeFieldBegin(WEX_FIELD_DESC);
4902
        this.wex.write(oprot);
4903
        oprot.writeFieldEnd();
4904
      }
4905
      oprot.writeFieldStop();
4906
      oprot.writeStructEnd();
4907
    }
4908
 
4909
    @Override
4910
    public String toString() {
4496 mandeep.dh 4911
      StringBuilder sb = new StringBuilder("scan_result(");
3383 chandransh 4912
      boolean first = true;
4913
 
4914
      sb.append("wex:");
4915
      if (this.wex == null) {
4916
        sb.append("null");
4917
      } else {
4918
        sb.append(this.wex);
4919
      }
4920
      first = false;
4921
      sb.append(")");
4922
      return sb.toString();
4923
    }
4924
 
3430 rajveer 4925
    public void validate() throws org.apache.thrift.TException {
3383 chandransh 4926
      // check for required fields
4927
    }
4928
 
3430 rajveer 4929
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4930
      try {
4931
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4932
      } catch (org.apache.thrift.TException te) {
4933
        throw new java.io.IOException(te);
4934
      }
4935
    }
4936
 
4937
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4938
      try {
4939
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4940
      } catch (org.apache.thrift.TException te) {
4941
        throw new java.io.IOException(te);
4942
      }
4943
    }
4944
 
3383 chandransh 4945
  }
4946
 
4496 mandeep.dh 4947
  public static class scanSerializedItemForOrder_args implements org.apache.thrift.TBase<scanSerializedItemForOrder_args, scanSerializedItemForOrder_args._Fields>, java.io.Serializable, Cloneable   {
4948
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItemForOrder_args");
2820 chandransh 4949
 
4555 mandeep.dh 4950
    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 4951
    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);
4952
    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 4953
    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);
4954
    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);
4955
    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 4956
 
4555 mandeep.dh 4957
    private String serialNumber; // required
3430 rajveer 4958
    private ScanType type; // required
4496 mandeep.dh 4959
    private long orderId; // required
5110 mandeep.dh 4960
    private long fulfilmentWarehouseId; // required
4961
    private double quantity; // required
4962
    private long billingWarehouseId; // required
2820 chandransh 4963
 
4964
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4965
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4555 mandeep.dh 4966
      SERIAL_NUMBER((short)1, "serialNumber"),
2820 chandransh 4967
      /**
4968
       * 
4969
       * @see ScanType
4970
       */
4496 mandeep.dh 4971
      TYPE((short)2, "type"),
4972
      ORDER_ID((short)3, "orderId"),
5110 mandeep.dh 4973
      FULFILMENT_WAREHOUSE_ID((short)4, "fulfilmentWarehouseId"),
4974
      QUANTITY((short)5, "quantity"),
4975
      BILLING_WAREHOUSE_ID((short)6, "billingWarehouseId");
2820 chandransh 4976
 
4977
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4978
 
4979
      static {
4980
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4981
          byName.put(field.getFieldName(), field);
4982
        }
4983
      }
4984
 
4985
      /**
4986
       * Find the _Fields constant that matches fieldId, or null if its not found.
4987
       */
4988
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4989
        switch(fieldId) {
4555 mandeep.dh 4990
          case 1: // SERIAL_NUMBER
4991
            return SERIAL_NUMBER;
4496 mandeep.dh 4992
          case 2: // TYPE
3430 rajveer 4993
            return TYPE;
4496 mandeep.dh 4994
          case 3: // ORDER_ID
4995
            return ORDER_ID;
5110 mandeep.dh 4996
          case 4: // FULFILMENT_WAREHOUSE_ID
4997
            return FULFILMENT_WAREHOUSE_ID;
4998
          case 5: // QUANTITY
4999
            return QUANTITY;
5000
          case 6: // BILLING_WAREHOUSE_ID
5001
            return BILLING_WAREHOUSE_ID;
3430 rajveer 5002
          default:
5003
            return null;
5004
        }
2820 chandransh 5005
      }
5006
 
5007
      /**
5008
       * Find the _Fields constant that matches fieldId, throwing an exception
5009
       * if it is not found.
5010
       */
5011
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5012
        _Fields fields = findByThriftId(fieldId);
5013
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5014
        return fields;
5015
      }
5016
 
5017
      /**
5018
       * Find the _Fields constant that matches name, or null if its not found.
5019
       */
5020
      public static _Fields findByName(String name) {
5021
        return byName.get(name);
5022
      }
5023
 
5024
      private final short _thriftId;
5025
      private final String _fieldName;
5026
 
5027
      _Fields(short thriftId, String fieldName) {
5028
        _thriftId = thriftId;
5029
        _fieldName = fieldName;
5030
      }
5031
 
5032
      public short getThriftFieldId() {
5033
        return _thriftId;
5034
      }
5035
 
5036
      public String getFieldName() {
5037
        return _fieldName;
5038
      }
5039
    }
5040
 
5041
    // isset id assignments
4555 mandeep.dh 5042
    private static final int __ORDERID_ISSET_ID = 0;
5110 mandeep.dh 5043
    private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 1;
5044
    private static final int __QUANTITY_ISSET_ID = 2;
5045
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 3;
5046
    private BitSet __isset_bit_vector = new BitSet(4);
2820 chandransh 5047
 
3430 rajveer 5048
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 5049
    static {
3430 rajveer 5050
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4555 mandeep.dh 5051
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5052
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
3430 rajveer 5053
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5054
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
4496 mandeep.dh 5055
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5056
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 5057
      tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 5058
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 5059
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5060
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
5061
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5062
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 5063
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 5064
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanSerializedItemForOrder_args.class, metaDataMap);
2820 chandransh 5065
    }
5066
 
4496 mandeep.dh 5067
    public scanSerializedItemForOrder_args() {
2820 chandransh 5068
    }
5069
 
4496 mandeep.dh 5070
    public scanSerializedItemForOrder_args(
4555 mandeep.dh 5071
      String serialNumber,
4496 mandeep.dh 5072
      ScanType type,
5073
      long orderId,
5110 mandeep.dh 5074
      long fulfilmentWarehouseId,
5075
      double quantity,
5076
      long billingWarehouseId)
2820 chandransh 5077
    {
5078
      this();
4555 mandeep.dh 5079
      this.serialNumber = serialNumber;
2820 chandransh 5080
      this.type = type;
4496 mandeep.dh 5081
      this.orderId = orderId;
5082
      setOrderIdIsSet(true);
5110 mandeep.dh 5083
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
5084
      setFulfilmentWarehouseIdIsSet(true);
5085
      this.quantity = quantity;
5086
      setQuantityIsSet(true);
5087
      this.billingWarehouseId = billingWarehouseId;
5088
      setBillingWarehouseIdIsSet(true);
2820 chandransh 5089
    }
5090
 
5091
    /**
5092
     * Performs a deep copy on <i>other</i>.
5093
     */
4496 mandeep.dh 5094
    public scanSerializedItemForOrder_args(scanSerializedItemForOrder_args other) {
2820 chandransh 5095
      __isset_bit_vector.clear();
5096
      __isset_bit_vector.or(other.__isset_bit_vector);
4555 mandeep.dh 5097
      if (other.isSetSerialNumber()) {
5098
        this.serialNumber = other.serialNumber;
5099
      }
2820 chandransh 5100
      if (other.isSetType()) {
5101
        this.type = other.type;
5102
      }
4496 mandeep.dh 5103
      this.orderId = other.orderId;
5110 mandeep.dh 5104
      this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
5105
      this.quantity = other.quantity;
5106
      this.billingWarehouseId = other.billingWarehouseId;
2820 chandransh 5107
    }
5108
 
4496 mandeep.dh 5109
    public scanSerializedItemForOrder_args deepCopy() {
5110
      return new scanSerializedItemForOrder_args(this);
2820 chandransh 5111
    }
5112
 
3430 rajveer 5113
    @Override
5114
    public void clear() {
4555 mandeep.dh 5115
      this.serialNumber = null;
3430 rajveer 5116
      this.type = null;
4496 mandeep.dh 5117
      setOrderIdIsSet(false);
5118
      this.orderId = 0;
5110 mandeep.dh 5119
      setFulfilmentWarehouseIdIsSet(false);
5120
      this.fulfilmentWarehouseId = 0;
5121
      setQuantityIsSet(false);
5122
      this.quantity = 0.0;
5123
      setBillingWarehouseIdIsSet(false);
5124
      this.billingWarehouseId = 0;
2820 chandransh 5125
    }
5126
 
4555 mandeep.dh 5127
    public String getSerialNumber() {
5128
      return this.serialNumber;
2820 chandransh 5129
    }
5130
 
4555 mandeep.dh 5131
    public void setSerialNumber(String serialNumber) {
5132
      this.serialNumber = serialNumber;
2820 chandransh 5133
    }
5134
 
4555 mandeep.dh 5135
    public void unsetSerialNumber() {
5136
      this.serialNumber = null;
2820 chandransh 5137
    }
5138
 
4555 mandeep.dh 5139
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
5140
    public boolean isSetSerialNumber() {
5141
      return this.serialNumber != null;
2820 chandransh 5142
    }
5143
 
4555 mandeep.dh 5144
    public void setSerialNumberIsSet(boolean value) {
5145
      if (!value) {
5146
        this.serialNumber = null;
5147
      }
2820 chandransh 5148
    }
5149
 
4496 mandeep.dh 5150
    /**
5151
     * 
5152
     * @see ScanType
5153
     */
5154
    public ScanType getType() {
5155
      return this.type;
2820 chandransh 5156
    }
5157
 
4496 mandeep.dh 5158
    /**
5159
     * 
5160
     * @see ScanType
5161
     */
5162
    public void setType(ScanType type) {
5163
      this.type = type;
2820 chandransh 5164
    }
5165
 
4496 mandeep.dh 5166
    public void unsetType() {
5167
      this.type = null;
2820 chandransh 5168
    }
5169
 
4496 mandeep.dh 5170
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
5171
    public boolean isSetType() {
5172
      return this.type != null;
2820 chandransh 5173
    }
5174
 
4496 mandeep.dh 5175
    public void setTypeIsSet(boolean value) {
2820 chandransh 5176
      if (!value) {
4496 mandeep.dh 5177
        this.type = null;
2820 chandransh 5178
      }
5179
    }
5180
 
4496 mandeep.dh 5181
    public long getOrderId() {
5182
      return this.orderId;
2820 chandransh 5183
    }
5184
 
4496 mandeep.dh 5185
    public void setOrderId(long orderId) {
5186
      this.orderId = orderId;
5187
      setOrderIdIsSet(true);
2820 chandransh 5188
    }
5189
 
4496 mandeep.dh 5190
    public void unsetOrderId() {
5191
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
2820 chandransh 5192
    }
5193
 
4496 mandeep.dh 5194
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
5195
    public boolean isSetOrderId() {
5196
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
2820 chandransh 5197
    }
5198
 
4496 mandeep.dh 5199
    public void setOrderIdIsSet(boolean value) {
5200
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
2820 chandransh 5201
    }
5202
 
5110 mandeep.dh 5203
    public long getFulfilmentWarehouseId() {
5204
      return this.fulfilmentWarehouseId;
2820 chandransh 5205
    }
5206
 
5110 mandeep.dh 5207
    public void setFulfilmentWarehouseId(long fulfilmentWarehouseId) {
5208
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
5209
      setFulfilmentWarehouseIdIsSet(true);
2820 chandransh 5210
    }
5211
 
5110 mandeep.dh 5212
    public void unsetFulfilmentWarehouseId() {
5213
      __isset_bit_vector.clear(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 5214
    }
5215
 
5110 mandeep.dh 5216
    /** Returns true if field fulfilmentWarehouseId is set (has been assigned a value) and false otherwise */
5217
    public boolean isSetFulfilmentWarehouseId() {
5218
      return __isset_bit_vector.get(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 5219
    }
5220
 
5110 mandeep.dh 5221
    public void setFulfilmentWarehouseIdIsSet(boolean value) {
5222
      __isset_bit_vector.set(__FULFILMENTWAREHOUSEID_ISSET_ID, value);
2820 chandransh 5223
    }
5224
 
5110 mandeep.dh 5225
    public double getQuantity() {
5226
      return this.quantity;
5227
    }
5228
 
5229
    public void setQuantity(double quantity) {
5230
      this.quantity = quantity;
5231
      setQuantityIsSet(true);
5232
    }
5233
 
5234
    public void unsetQuantity() {
5235
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
5236
    }
5237
 
5238
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
5239
    public boolean isSetQuantity() {
5240
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
5241
    }
5242
 
5243
    public void setQuantityIsSet(boolean value) {
5244
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
5245
    }
5246
 
5247
    public long getBillingWarehouseId() {
5248
      return this.billingWarehouseId;
5249
    }
5250
 
5251
    public void setBillingWarehouseId(long billingWarehouseId) {
5252
      this.billingWarehouseId = billingWarehouseId;
5253
      setBillingWarehouseIdIsSet(true);
5254
    }
5255
 
5256
    public void unsetBillingWarehouseId() {
5257
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
5258
    }
5259
 
5260
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
5261
    public boolean isSetBillingWarehouseId() {
5262
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
5263
    }
5264
 
5265
    public void setBillingWarehouseIdIsSet(boolean value) {
5266
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
5267
    }
5268
 
2820 chandransh 5269
    public void setFieldValue(_Fields field, Object value) {
5270
      switch (field) {
4555 mandeep.dh 5271
      case SERIAL_NUMBER:
2820 chandransh 5272
        if (value == null) {
4555 mandeep.dh 5273
          unsetSerialNumber();
2820 chandransh 5274
        } else {
4555 mandeep.dh 5275
          setSerialNumber((String)value);
2820 chandransh 5276
        }
5277
        break;
5278
 
4496 mandeep.dh 5279
      case TYPE:
2820 chandransh 5280
        if (value == null) {
4496 mandeep.dh 5281
          unsetType();
2820 chandransh 5282
        } else {
4496 mandeep.dh 5283
          setType((ScanType)value);
2820 chandransh 5284
        }
5285
        break;
5286
 
4496 mandeep.dh 5287
      case ORDER_ID:
2820 chandransh 5288
        if (value == null) {
4496 mandeep.dh 5289
          unsetOrderId();
2820 chandransh 5290
        } else {
4496 mandeep.dh 5291
          setOrderId((Long)value);
2820 chandransh 5292
        }
5293
        break;
5294
 
5110 mandeep.dh 5295
      case FULFILMENT_WAREHOUSE_ID:
2820 chandransh 5296
        if (value == null) {
5110 mandeep.dh 5297
          unsetFulfilmentWarehouseId();
2820 chandransh 5298
        } else {
5110 mandeep.dh 5299
          setFulfilmentWarehouseId((Long)value);
2820 chandransh 5300
        }
5301
        break;
5302
 
5110 mandeep.dh 5303
      case QUANTITY:
5304
        if (value == null) {
5305
          unsetQuantity();
5306
        } else {
5307
          setQuantity((Double)value);
5308
        }
5309
        break;
5310
 
5311
      case BILLING_WAREHOUSE_ID:
5312
        if (value == null) {
5313
          unsetBillingWarehouseId();
5314
        } else {
5315
          setBillingWarehouseId((Long)value);
5316
        }
5317
        break;
5318
 
2820 chandransh 5319
      }
5320
    }
5321
 
5322
    public Object getFieldValue(_Fields field) {
5323
      switch (field) {
4555 mandeep.dh 5324
      case SERIAL_NUMBER:
5325
        return getSerialNumber();
2820 chandransh 5326
 
5327
      case TYPE:
5328
        return getType();
5329
 
4496 mandeep.dh 5330
      case ORDER_ID:
5331
        return Long.valueOf(getOrderId());
5332
 
5110 mandeep.dh 5333
      case FULFILMENT_WAREHOUSE_ID:
5334
        return Long.valueOf(getFulfilmentWarehouseId());
4496 mandeep.dh 5335
 
5110 mandeep.dh 5336
      case QUANTITY:
5337
        return Double.valueOf(getQuantity());
5338
 
5339
      case BILLING_WAREHOUSE_ID:
5340
        return Long.valueOf(getBillingWarehouseId());
5341
 
2820 chandransh 5342
      }
5343
      throw new IllegalStateException();
5344
    }
5345
 
3430 rajveer 5346
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5347
    public boolean isSet(_Fields field) {
5348
      if (field == null) {
5349
        throw new IllegalArgumentException();
5350
      }
2820 chandransh 5351
 
5352
      switch (field) {
4555 mandeep.dh 5353
      case SERIAL_NUMBER:
5354
        return isSetSerialNumber();
2820 chandransh 5355
      case TYPE:
5356
        return isSetType();
4496 mandeep.dh 5357
      case ORDER_ID:
5358
        return isSetOrderId();
5110 mandeep.dh 5359
      case FULFILMENT_WAREHOUSE_ID:
5360
        return isSetFulfilmentWarehouseId();
5361
      case QUANTITY:
5362
        return isSetQuantity();
5363
      case BILLING_WAREHOUSE_ID:
5364
        return isSetBillingWarehouseId();
2820 chandransh 5365
      }
5366
      throw new IllegalStateException();
5367
    }
5368
 
5369
    @Override
5370
    public boolean equals(Object that) {
5371
      if (that == null)
5372
        return false;
4496 mandeep.dh 5373
      if (that instanceof scanSerializedItemForOrder_args)
5374
        return this.equals((scanSerializedItemForOrder_args)that);
2820 chandransh 5375
      return false;
5376
    }
5377
 
4496 mandeep.dh 5378
    public boolean equals(scanSerializedItemForOrder_args that) {
2820 chandransh 5379
      if (that == null)
5380
        return false;
5381
 
4555 mandeep.dh 5382
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
5383
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
5384
      if (this_present_serialNumber || that_present_serialNumber) {
5385
        if (!(this_present_serialNumber && that_present_serialNumber))
2820 chandransh 5386
          return false;
4555 mandeep.dh 5387
        if (!this.serialNumber.equals(that.serialNumber))
2820 chandransh 5388
          return false;
5389
      }
5390
 
4496 mandeep.dh 5391
      boolean this_present_type = true && this.isSetType();
5392
      boolean that_present_type = true && that.isSetType();
5393
      if (this_present_type || that_present_type) {
5394
        if (!(this_present_type && that_present_type))
2820 chandransh 5395
          return false;
4496 mandeep.dh 5396
        if (!this.type.equals(that.type))
2820 chandransh 5397
          return false;
5398
      }
5399
 
4496 mandeep.dh 5400
      boolean this_present_orderId = true;
5401
      boolean that_present_orderId = true;
5402
      if (this_present_orderId || that_present_orderId) {
5403
        if (!(this_present_orderId && that_present_orderId))
2820 chandransh 5404
          return false;
4496 mandeep.dh 5405
        if (this.orderId != that.orderId)
2820 chandransh 5406
          return false;
5407
      }
5408
 
5110 mandeep.dh 5409
      boolean this_present_fulfilmentWarehouseId = true;
5410
      boolean that_present_fulfilmentWarehouseId = true;
5411
      if (this_present_fulfilmentWarehouseId || that_present_fulfilmentWarehouseId) {
5412
        if (!(this_present_fulfilmentWarehouseId && that_present_fulfilmentWarehouseId))
2820 chandransh 5413
          return false;
5110 mandeep.dh 5414
        if (this.fulfilmentWarehouseId != that.fulfilmentWarehouseId)
2820 chandransh 5415
          return false;
5416
      }
5417
 
5110 mandeep.dh 5418
      boolean this_present_quantity = true;
5419
      boolean that_present_quantity = true;
5420
      if (this_present_quantity || that_present_quantity) {
5421
        if (!(this_present_quantity && that_present_quantity))
5422
          return false;
5423
        if (this.quantity != that.quantity)
5424
          return false;
5425
      }
5426
 
5427
      boolean this_present_billingWarehouseId = true;
5428
      boolean that_present_billingWarehouseId = true;
5429
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
5430
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
5431
          return false;
5432
        if (this.billingWarehouseId != that.billingWarehouseId)
5433
          return false;
5434
      }
5435
 
2820 chandransh 5436
      return true;
5437
    }
5438
 
5439
    @Override
5440
    public int hashCode() {
5441
      return 0;
5442
    }
5443
 
4496 mandeep.dh 5444
    public int compareTo(scanSerializedItemForOrder_args other) {
2820 chandransh 5445
      if (!getClass().equals(other.getClass())) {
5446
        return getClass().getName().compareTo(other.getClass().getName());
5447
      }
5448
 
5449
      int lastComparison = 0;
4496 mandeep.dh 5450
      scanSerializedItemForOrder_args typedOther = (scanSerializedItemForOrder_args)other;
2820 chandransh 5451
 
4555 mandeep.dh 5452
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
2820 chandransh 5453
      if (lastComparison != 0) {
5454
        return lastComparison;
5455
      }
4555 mandeep.dh 5456
      if (isSetSerialNumber()) {
5457
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
3430 rajveer 5458
        if (lastComparison != 0) {
5459
          return lastComparison;
5460
        }
2820 chandransh 5461
      }
4496 mandeep.dh 5462
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
2820 chandransh 5463
      if (lastComparison != 0) {
5464
        return lastComparison;
5465
      }
4496 mandeep.dh 5466
      if (isSetType()) {
5467
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 5468
        if (lastComparison != 0) {
5469
          return lastComparison;
5470
        }
2820 chandransh 5471
      }
4496 mandeep.dh 5472
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
2820 chandransh 5473
      if (lastComparison != 0) {
5474
        return lastComparison;
5475
      }
4496 mandeep.dh 5476
      if (isSetOrderId()) {
5477
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
3430 rajveer 5478
        if (lastComparison != 0) {
5479
          return lastComparison;
5480
        }
2820 chandransh 5481
      }
5110 mandeep.dh 5482
      lastComparison = Boolean.valueOf(isSetFulfilmentWarehouseId()).compareTo(typedOther.isSetFulfilmentWarehouseId());
2820 chandransh 5483
      if (lastComparison != 0) {
5484
        return lastComparison;
5485
      }
5110 mandeep.dh 5486
      if (isSetFulfilmentWarehouseId()) {
5487
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilmentWarehouseId, typedOther.fulfilmentWarehouseId);
3430 rajveer 5488
        if (lastComparison != 0) {
5489
          return lastComparison;
5490
        }
2820 chandransh 5491
      }
5110 mandeep.dh 5492
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
5493
      if (lastComparison != 0) {
5494
        return lastComparison;
5495
      }
5496
      if (isSetQuantity()) {
5497
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
5498
        if (lastComparison != 0) {
5499
          return lastComparison;
5500
        }
5501
      }
5502
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
5503
      if (lastComparison != 0) {
5504
        return lastComparison;
5505
      }
5506
      if (isSetBillingWarehouseId()) {
5507
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
5508
        if (lastComparison != 0) {
5509
          return lastComparison;
5510
        }
5511
      }
2820 chandransh 5512
      return 0;
5513
    }
5514
 
3430 rajveer 5515
    public _Fields fieldForId(int fieldId) {
5516
      return _Fields.findByThriftId(fieldId);
5517
    }
5518
 
5519
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5520
      org.apache.thrift.protocol.TField field;
2820 chandransh 5521
      iprot.readStructBegin();
5522
      while (true)
5523
      {
5524
        field = iprot.readFieldBegin();
3430 rajveer 5525
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 5526
          break;
5527
        }
3430 rajveer 5528
        switch (field.id) {
4555 mandeep.dh 5529
          case 1: // SERIAL_NUMBER
5530
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
5531
              this.serialNumber = iprot.readString();
3430 rajveer 5532
            } else { 
5533
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5534
            }
5535
            break;
4496 mandeep.dh 5536
          case 2: // TYPE
5537
            if (field.type == org.apache.thrift.protocol.TType.I32) {
5538
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 5539
            } else { 
5540
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5541
            }
5542
            break;
4496 mandeep.dh 5543
          case 3: // ORDER_ID
5544
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5545
              this.orderId = iprot.readI64();
5546
              setOrderIdIsSet(true);
3430 rajveer 5547
            } else { 
5548
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5549
            }
5550
            break;
5110 mandeep.dh 5551
          case 4: // FULFILMENT_WAREHOUSE_ID
4496 mandeep.dh 5552
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5110 mandeep.dh 5553
              this.fulfilmentWarehouseId = iprot.readI64();
5554
              setFulfilmentWarehouseIdIsSet(true);
3430 rajveer 5555
            } else { 
5556
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5557
            }
5558
            break;
5110 mandeep.dh 5559
          case 5: // QUANTITY
5560
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
5561
              this.quantity = iprot.readDouble();
5562
              setQuantityIsSet(true);
5563
            } else { 
5564
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5565
            }
5566
            break;
5567
          case 6: // BILLING_WAREHOUSE_ID
5568
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5569
              this.billingWarehouseId = iprot.readI64();
5570
              setBillingWarehouseIdIsSet(true);
5571
            } else { 
5572
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5573
            }
5574
            break;
3430 rajveer 5575
          default:
5576
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 5577
        }
3430 rajveer 5578
        iprot.readFieldEnd();
2820 chandransh 5579
      }
5580
      iprot.readStructEnd();
5581
      validate();
5582
    }
5583
 
3430 rajveer 5584
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 5585
      validate();
5586
 
5587
      oprot.writeStructBegin(STRUCT_DESC);
4555 mandeep.dh 5588
      if (this.serialNumber != null) {
5589
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
5590
        oprot.writeString(this.serialNumber);
5591
        oprot.writeFieldEnd();
5592
      }
2820 chandransh 5593
      if (this.type != null) {
5594
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
5595
        oprot.writeI32(this.type.getValue());
5596
        oprot.writeFieldEnd();
5597
      }
4496 mandeep.dh 5598
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
5599
      oprot.writeI64(this.orderId);
5600
      oprot.writeFieldEnd();
5110 mandeep.dh 5601
      oprot.writeFieldBegin(FULFILMENT_WAREHOUSE_ID_FIELD_DESC);
5602
      oprot.writeI64(this.fulfilmentWarehouseId);
4496 mandeep.dh 5603
      oprot.writeFieldEnd();
5110 mandeep.dh 5604
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
5605
      oprot.writeDouble(this.quantity);
5606
      oprot.writeFieldEnd();
5607
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
5608
      oprot.writeI64(this.billingWarehouseId);
5609
      oprot.writeFieldEnd();
2820 chandransh 5610
      oprot.writeFieldStop();
5611
      oprot.writeStructEnd();
5612
    }
5613
 
5614
    @Override
5615
    public String toString() {
4496 mandeep.dh 5616
      StringBuilder sb = new StringBuilder("scanSerializedItemForOrder_args(");
2820 chandransh 5617
      boolean first = true;
5618
 
4555 mandeep.dh 5619
      sb.append("serialNumber:");
5620
      if (this.serialNumber == null) {
5621
        sb.append("null");
5622
      } else {
5623
        sb.append(this.serialNumber);
5624
      }
2820 chandransh 5625
      first = false;
5626
      if (!first) sb.append(", ");
4496 mandeep.dh 5627
      sb.append("type:");
5628
      if (this.type == null) {
2820 chandransh 5629
        sb.append("null");
5630
      } else {
4496 mandeep.dh 5631
        sb.append(this.type);
2820 chandransh 5632
      }
5633
      first = false;
5634
      if (!first) sb.append(", ");
4496 mandeep.dh 5635
      sb.append("orderId:");
5636
      sb.append(this.orderId);
2820 chandransh 5637
      first = false;
5638
      if (!first) sb.append(", ");
5110 mandeep.dh 5639
      sb.append("fulfilmentWarehouseId:");
5640
      sb.append(this.fulfilmentWarehouseId);
2820 chandransh 5641
      first = false;
5110 mandeep.dh 5642
      if (!first) sb.append(", ");
5643
      sb.append("quantity:");
5644
      sb.append(this.quantity);
5645
      first = false;
5646
      if (!first) sb.append(", ");
5647
      sb.append("billingWarehouseId:");
5648
      sb.append(this.billingWarehouseId);
5649
      first = false;
2820 chandransh 5650
      sb.append(")");
5651
      return sb.toString();
5652
    }
5653
 
3430 rajveer 5654
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 5655
      // check for required fields
5656
    }
5657
 
3430 rajveer 5658
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5659
      try {
5660
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5661
      } catch (org.apache.thrift.TException te) {
5662
        throw new java.io.IOException(te);
5663
      }
5664
    }
5665
 
5666
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5667
      try {
5668
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5669
      } catch (org.apache.thrift.TException te) {
5670
        throw new java.io.IOException(te);
5671
      }
5672
    }
5673
 
2820 chandransh 5674
  }
5675
 
4496 mandeep.dh 5676
  public static class scanSerializedItemForOrder_result implements org.apache.thrift.TBase<scanSerializedItemForOrder_result, scanSerializedItemForOrder_result._Fields>, java.io.Serializable, Cloneable   {
5677
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItemForOrder_result");
2820 chandransh 5678
 
4555 mandeep.dh 5679
    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 5680
    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 5681
 
4555 mandeep.dh 5682
    private InventoryItem success; // required
3430 rajveer 5683
    private WarehouseServiceException wex; // required
2820 chandransh 5684
 
5685
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 5686
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 5687
      SUCCESS((short)0, "success"),
2820 chandransh 5688
      WEX((short)1, "wex");
5689
 
5690
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5691
 
5692
      static {
5693
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5694
          byName.put(field.getFieldName(), field);
5695
        }
5696
      }
5697
 
5698
      /**
5699
       * Find the _Fields constant that matches fieldId, or null if its not found.
5700
       */
5701
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 5702
        switch(fieldId) {
4496 mandeep.dh 5703
          case 0: // SUCCESS
5704
            return SUCCESS;
3430 rajveer 5705
          case 1: // WEX
5706
            return WEX;
5707
          default:
5708
            return null;
5709
        }
2820 chandransh 5710
      }
5711
 
5712
      /**
5713
       * Find the _Fields constant that matches fieldId, throwing an exception
5714
       * if it is not found.
5715
       */
5716
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5717
        _Fields fields = findByThriftId(fieldId);
5718
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5719
        return fields;
5720
      }
5721
 
5722
      /**
5723
       * Find the _Fields constant that matches name, or null if its not found.
5724
       */
5725
      public static _Fields findByName(String name) {
5726
        return byName.get(name);
5727
      }
5728
 
5729
      private final short _thriftId;
5730
      private final String _fieldName;
5731
 
5732
      _Fields(short thriftId, String fieldName) {
5733
        _thriftId = thriftId;
5734
        _fieldName = fieldName;
5735
      }
5736
 
5737
      public short getThriftFieldId() {
5738
        return _thriftId;
5739
      }
5740
 
5741
      public String getFieldName() {
5742
        return _fieldName;
5743
      }
5744
    }
5745
 
5746
    // isset id assignments
5747
 
3430 rajveer 5748
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 5749
    static {
3430 rajveer 5750
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 5751
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 5752
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 5753
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5754
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5755
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 5756
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanSerializedItemForOrder_result.class, metaDataMap);
2820 chandransh 5757
    }
5758
 
4496 mandeep.dh 5759
    public scanSerializedItemForOrder_result() {
2820 chandransh 5760
    }
5761
 
4496 mandeep.dh 5762
    public scanSerializedItemForOrder_result(
4555 mandeep.dh 5763
      InventoryItem success,
2820 chandransh 5764
      WarehouseServiceException wex)
5765
    {
5766
      this();
4496 mandeep.dh 5767
      this.success = success;
2820 chandransh 5768
      this.wex = wex;
5769
    }
5770
 
5771
    /**
5772
     * Performs a deep copy on <i>other</i>.
5773
     */
4496 mandeep.dh 5774
    public scanSerializedItemForOrder_result(scanSerializedItemForOrder_result other) {
4555 mandeep.dh 5775
      if (other.isSetSuccess()) {
5776
        this.success = new InventoryItem(other.success);
5777
      }
2820 chandransh 5778
      if (other.isSetWex()) {
5779
        this.wex = new WarehouseServiceException(other.wex);
5780
      }
5781
    }
5782
 
4496 mandeep.dh 5783
    public scanSerializedItemForOrder_result deepCopy() {
5784
      return new scanSerializedItemForOrder_result(this);
2820 chandransh 5785
    }
5786
 
3430 rajveer 5787
    @Override
5788
    public void clear() {
4555 mandeep.dh 5789
      this.success = null;
3430 rajveer 5790
      this.wex = null;
2820 chandransh 5791
    }
5792
 
4555 mandeep.dh 5793
    public InventoryItem getSuccess() {
4496 mandeep.dh 5794
      return this.success;
5795
    }
5796
 
4555 mandeep.dh 5797
    public void setSuccess(InventoryItem success) {
4496 mandeep.dh 5798
      this.success = success;
5799
    }
5800
 
5801
    public void unsetSuccess() {
4555 mandeep.dh 5802
      this.success = null;
4496 mandeep.dh 5803
    }
5804
 
5805
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5806
    public boolean isSetSuccess() {
4555 mandeep.dh 5807
      return this.success != null;
4496 mandeep.dh 5808
    }
5809
 
5810
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 5811
      if (!value) {
5812
        this.success = null;
5813
      }
4496 mandeep.dh 5814
    }
5815
 
2820 chandransh 5816
    public WarehouseServiceException getWex() {
5817
      return this.wex;
5818
    }
5819
 
3430 rajveer 5820
    public void setWex(WarehouseServiceException wex) {
2820 chandransh 5821
      this.wex = wex;
5822
    }
5823
 
5824
    public void unsetWex() {
5825
      this.wex = null;
5826
    }
5827
 
3430 rajveer 5828
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2820 chandransh 5829
    public boolean isSetWex() {
5830
      return this.wex != null;
5831
    }
5832
 
5833
    public void setWexIsSet(boolean value) {
5834
      if (!value) {
5835
        this.wex = null;
5836
      }
5837
    }
5838
 
5839
    public void setFieldValue(_Fields field, Object value) {
5840
      switch (field) {
4496 mandeep.dh 5841
      case SUCCESS:
5842
        if (value == null) {
5843
          unsetSuccess();
5844
        } else {
4555 mandeep.dh 5845
          setSuccess((InventoryItem)value);
4496 mandeep.dh 5846
        }
5847
        break;
5848
 
2820 chandransh 5849
      case WEX:
5850
        if (value == null) {
5851
          unsetWex();
5852
        } else {
5853
          setWex((WarehouseServiceException)value);
5854
        }
5855
        break;
5856
 
5857
      }
5858
    }
5859
 
5860
    public Object getFieldValue(_Fields field) {
5861
      switch (field) {
4496 mandeep.dh 5862
      case SUCCESS:
4555 mandeep.dh 5863
        return getSuccess();
4496 mandeep.dh 5864
 
2820 chandransh 5865
      case WEX:
5866
        return getWex();
5867
 
5868
      }
5869
      throw new IllegalStateException();
5870
    }
5871
 
3430 rajveer 5872
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5873
    public boolean isSet(_Fields field) {
5874
      if (field == null) {
5875
        throw new IllegalArgumentException();
5876
      }
2820 chandransh 5877
 
5878
      switch (field) {
4496 mandeep.dh 5879
      case SUCCESS:
5880
        return isSetSuccess();
2820 chandransh 5881
      case WEX:
5882
        return isSetWex();
5883
      }
5884
      throw new IllegalStateException();
5885
    }
5886
 
5887
    @Override
5888
    public boolean equals(Object that) {
5889
      if (that == null)
5890
        return false;
4496 mandeep.dh 5891
      if (that instanceof scanSerializedItemForOrder_result)
5892
        return this.equals((scanSerializedItemForOrder_result)that);
2820 chandransh 5893
      return false;
5894
    }
5895
 
4496 mandeep.dh 5896
    public boolean equals(scanSerializedItemForOrder_result that) {
2820 chandransh 5897
      if (that == null)
5898
        return false;
5899
 
4555 mandeep.dh 5900
      boolean this_present_success = true && this.isSetSuccess();
5901
      boolean that_present_success = true && that.isSetSuccess();
4496 mandeep.dh 5902
      if (this_present_success || that_present_success) {
5903
        if (!(this_present_success && that_present_success))
5904
          return false;
4555 mandeep.dh 5905
        if (!this.success.equals(that.success))
4496 mandeep.dh 5906
          return false;
5907
      }
5908
 
2820 chandransh 5909
      boolean this_present_wex = true && this.isSetWex();
5910
      boolean that_present_wex = true && that.isSetWex();
5911
      if (this_present_wex || that_present_wex) {
5912
        if (!(this_present_wex && that_present_wex))
5913
          return false;
5914
        if (!this.wex.equals(that.wex))
5915
          return false;
5916
      }
5917
 
5918
      return true;
5919
    }
5920
 
5921
    @Override
5922
    public int hashCode() {
5923
      return 0;
5924
    }
5925
 
4496 mandeep.dh 5926
    public int compareTo(scanSerializedItemForOrder_result other) {
2820 chandransh 5927
      if (!getClass().equals(other.getClass())) {
5928
        return getClass().getName().compareTo(other.getClass().getName());
5929
      }
5930
 
5931
      int lastComparison = 0;
4496 mandeep.dh 5932
      scanSerializedItemForOrder_result typedOther = (scanSerializedItemForOrder_result)other;
2820 chandransh 5933
 
4496 mandeep.dh 5934
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5935
      if (lastComparison != 0) {
5936
        return lastComparison;
5937
      }
5938
      if (isSetSuccess()) {
5939
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5940
        if (lastComparison != 0) {
5941
          return lastComparison;
5942
        }
5943
      }
3430 rajveer 5944
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 5945
      if (lastComparison != 0) {
5946
        return lastComparison;
5947
      }
3430 rajveer 5948
      if (isSetWex()) {
5949
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
5950
        if (lastComparison != 0) {
5951
          return lastComparison;
5952
        }
2820 chandransh 5953
      }
5954
      return 0;
5955
    }
5956
 
3430 rajveer 5957
    public _Fields fieldForId(int fieldId) {
5958
      return _Fields.findByThriftId(fieldId);
5959
    }
5960
 
5961
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5962
      org.apache.thrift.protocol.TField field;
2820 chandransh 5963
      iprot.readStructBegin();
5964
      while (true)
5965
      {
5966
        field = iprot.readFieldBegin();
3430 rajveer 5967
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 5968
          break;
5969
        }
3430 rajveer 5970
        switch (field.id) {
4496 mandeep.dh 5971
          case 0: // SUCCESS
4555 mandeep.dh 5972
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5973
              this.success = new InventoryItem();
5974
              this.success.read(iprot);
4496 mandeep.dh 5975
            } else { 
5976
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5977
            }
5978
            break;
3430 rajveer 5979
          case 1: // WEX
5980
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5981
              this.wex = new WarehouseServiceException();
5982
              this.wex.read(iprot);
5983
            } else { 
5984
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5985
            }
5986
            break;
5987
          default:
5988
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 5989
        }
3430 rajveer 5990
        iprot.readFieldEnd();
2820 chandransh 5991
      }
5992
      iprot.readStructEnd();
5993
      validate();
5994
    }
5995
 
3430 rajveer 5996
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 5997
      oprot.writeStructBegin(STRUCT_DESC);
5998
 
4496 mandeep.dh 5999
      if (this.isSetSuccess()) {
6000
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 6001
        this.success.write(oprot);
4496 mandeep.dh 6002
        oprot.writeFieldEnd();
6003
      } else if (this.isSetWex()) {
2820 chandransh 6004
        oprot.writeFieldBegin(WEX_FIELD_DESC);
6005
        this.wex.write(oprot);
6006
        oprot.writeFieldEnd();
6007
      }
6008
      oprot.writeFieldStop();
6009
      oprot.writeStructEnd();
6010
    }
6011
 
6012
    @Override
6013
    public String toString() {
4496 mandeep.dh 6014
      StringBuilder sb = new StringBuilder("scanSerializedItemForOrder_result(");
2820 chandransh 6015
      boolean first = true;
6016
 
4496 mandeep.dh 6017
      sb.append("success:");
4555 mandeep.dh 6018
      if (this.success == null) {
6019
        sb.append("null");
6020
      } else {
6021
        sb.append(this.success);
6022
      }
4496 mandeep.dh 6023
      first = false;
6024
      if (!first) sb.append(", ");
2820 chandransh 6025
      sb.append("wex:");
6026
      if (this.wex == null) {
6027
        sb.append("null");
6028
      } else {
6029
        sb.append(this.wex);
6030
      }
6031
      first = false;
6032
      sb.append(")");
6033
      return sb.toString();
6034
    }
6035
 
3430 rajveer 6036
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 6037
      // check for required fields
6038
    }
6039
 
3430 rajveer 6040
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6041
      try {
6042
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6043
      } catch (org.apache.thrift.TException te) {
6044
        throw new java.io.IOException(te);
6045
      }
6046
    }
6047
 
6048
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6049
      try {
6050
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6051
      } catch (org.apache.thrift.TException te) {
6052
        throw new java.io.IOException(te);
6053
      }
6054
    }
6055
 
2820 chandransh 6056
  }
6057
 
4496 mandeep.dh 6058
  public static class scanForOrder_args implements org.apache.thrift.TBase<scanForOrder_args, scanForOrder_args._Fields>, java.io.Serializable, Cloneable   {
6059
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOrder_args");
2820 chandransh 6060
 
5361 mandeep.dh 6061
    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 6062
    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);
6063
    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);
6064
    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 6065
    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 6066
    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 6067
 
5361 mandeep.dh 6068
    private InventoryItem inventoryItem; // required
3430 rajveer 6069
    private ScanType type; // required
4496 mandeep.dh 6070
    private long quantity; // required
6071
    private long orderId; // required
5110 mandeep.dh 6072
    private long fulfilmentWarehouseId; // required
5361 mandeep.dh 6073
    private long billingWarehouseId; // required
2820 chandransh 6074
 
6075
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 6076
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 6077
      INVENTORY_ITEM((short)1, "inventoryItem"),
2820 chandransh 6078
      /**
6079
       * 
6080
       * @see ScanType
6081
       */
4496 mandeep.dh 6082
      TYPE((short)2, "type"),
6083
      QUANTITY((short)3, "quantity"),
6084
      ORDER_ID((short)4, "orderId"),
5361 mandeep.dh 6085
      FULFILMENT_WAREHOUSE_ID((short)5, "fulfilmentWarehouseId"),
6086
      BILLING_WAREHOUSE_ID((short)6, "billingWarehouseId");
2820 chandransh 6087
 
6088
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6089
 
6090
      static {
6091
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6092
          byName.put(field.getFieldName(), field);
6093
        }
6094
      }
6095
 
6096
      /**
6097
       * Find the _Fields constant that matches fieldId, or null if its not found.
6098
       */
6099
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 6100
        switch(fieldId) {
5361 mandeep.dh 6101
          case 1: // INVENTORY_ITEM
6102
            return INVENTORY_ITEM;
4496 mandeep.dh 6103
          case 2: // TYPE
3430 rajveer 6104
            return TYPE;
4496 mandeep.dh 6105
          case 3: // QUANTITY
6106
            return QUANTITY;
6107
          case 4: // ORDER_ID
6108
            return ORDER_ID;
5110 mandeep.dh 6109
          case 5: // FULFILMENT_WAREHOUSE_ID
6110
            return FULFILMENT_WAREHOUSE_ID;
5361 mandeep.dh 6111
          case 6: // BILLING_WAREHOUSE_ID
6112
            return BILLING_WAREHOUSE_ID;
3430 rajveer 6113
          default:
6114
            return null;
6115
        }
2820 chandransh 6116
      }
6117
 
6118
      /**
6119
       * Find the _Fields constant that matches fieldId, throwing an exception
6120
       * if it is not found.
6121
       */
6122
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6123
        _Fields fields = findByThriftId(fieldId);
6124
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6125
        return fields;
6126
      }
6127
 
6128
      /**
6129
       * Find the _Fields constant that matches name, or null if its not found.
6130
       */
6131
      public static _Fields findByName(String name) {
6132
        return byName.get(name);
6133
      }
6134
 
6135
      private final short _thriftId;
6136
      private final String _fieldName;
6137
 
6138
      _Fields(short thriftId, String fieldName) {
6139
        _thriftId = thriftId;
6140
        _fieldName = fieldName;
6141
      }
6142
 
6143
      public short getThriftFieldId() {
6144
        return _thriftId;
6145
      }
6146
 
6147
      public String getFieldName() {
6148
        return _fieldName;
6149
      }
6150
    }
6151
 
6152
    // isset id assignments
5361 mandeep.dh 6153
    private static final int __QUANTITY_ISSET_ID = 0;
6154
    private static final int __ORDERID_ISSET_ID = 1;
6155
    private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 2;
6156
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 3;
4496 mandeep.dh 6157
    private BitSet __isset_bit_vector = new BitSet(4);
2820 chandransh 6158
 
3430 rajveer 6159
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 6160
    static {
3430 rajveer 6161
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5361 mandeep.dh 6162
      tmpMap.put(_Fields.INVENTORY_ITEM, new org.apache.thrift.meta_data.FieldMetaData("inventoryItem", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6163
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 6164
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6165
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
4496 mandeep.dh 6166
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6167
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6168
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6169
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 6170
      tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 6171
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5361 mandeep.dh 6172
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6173
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 6174
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 6175
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOrder_args.class, metaDataMap);
2820 chandransh 6176
    }
6177
 
4496 mandeep.dh 6178
    public scanForOrder_args() {
2820 chandransh 6179
    }
6180
 
4496 mandeep.dh 6181
    public scanForOrder_args(
5361 mandeep.dh 6182
      InventoryItem inventoryItem,
4496 mandeep.dh 6183
      ScanType type,
6184
      long quantity,
6185
      long orderId,
5361 mandeep.dh 6186
      long fulfilmentWarehouseId,
6187
      long billingWarehouseId)
2820 chandransh 6188
    {
6189
      this();
5361 mandeep.dh 6190
      this.inventoryItem = inventoryItem;
2820 chandransh 6191
      this.type = type;
4496 mandeep.dh 6192
      this.quantity = quantity;
6193
      setQuantityIsSet(true);
6194
      this.orderId = orderId;
6195
      setOrderIdIsSet(true);
5110 mandeep.dh 6196
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
6197
      setFulfilmentWarehouseIdIsSet(true);
5361 mandeep.dh 6198
      this.billingWarehouseId = billingWarehouseId;
6199
      setBillingWarehouseIdIsSet(true);
2820 chandransh 6200
    }
6201
 
6202
    /**
6203
     * Performs a deep copy on <i>other</i>.
6204
     */
4496 mandeep.dh 6205
    public scanForOrder_args(scanForOrder_args other) {
6206
      __isset_bit_vector.clear();
6207
      __isset_bit_vector.or(other.__isset_bit_vector);
5361 mandeep.dh 6208
      if (other.isSetInventoryItem()) {
6209
        this.inventoryItem = new InventoryItem(other.inventoryItem);
6210
      }
2820 chandransh 6211
      if (other.isSetType()) {
6212
        this.type = other.type;
6213
      }
4496 mandeep.dh 6214
      this.quantity = other.quantity;
6215
      this.orderId = other.orderId;
5110 mandeep.dh 6216
      this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
5361 mandeep.dh 6217
      this.billingWarehouseId = other.billingWarehouseId;
2820 chandransh 6218
    }
6219
 
4496 mandeep.dh 6220
    public scanForOrder_args deepCopy() {
6221
      return new scanForOrder_args(this);
2820 chandransh 6222
    }
6223
 
3430 rajveer 6224
    @Override
6225
    public void clear() {
5361 mandeep.dh 6226
      this.inventoryItem = null;
3430 rajveer 6227
      this.type = null;
4496 mandeep.dh 6228
      setQuantityIsSet(false);
6229
      this.quantity = 0;
6230
      setOrderIdIsSet(false);
6231
      this.orderId = 0;
5110 mandeep.dh 6232
      setFulfilmentWarehouseIdIsSet(false);
6233
      this.fulfilmentWarehouseId = 0;
5361 mandeep.dh 6234
      setBillingWarehouseIdIsSet(false);
6235
      this.billingWarehouseId = 0;
2820 chandransh 6236
    }
6237
 
5361 mandeep.dh 6238
    public InventoryItem getInventoryItem() {
6239
      return this.inventoryItem;
2820 chandransh 6240
    }
6241
 
5361 mandeep.dh 6242
    public void setInventoryItem(InventoryItem inventoryItem) {
6243
      this.inventoryItem = inventoryItem;
2820 chandransh 6244
    }
6245
 
5361 mandeep.dh 6246
    public void unsetInventoryItem() {
6247
      this.inventoryItem = null;
2820 chandransh 6248
    }
6249
 
5361 mandeep.dh 6250
    /** Returns true if field inventoryItem is set (has been assigned a value) and false otherwise */
6251
    public boolean isSetInventoryItem() {
6252
      return this.inventoryItem != null;
2820 chandransh 6253
    }
6254
 
5361 mandeep.dh 6255
    public void setInventoryItemIsSet(boolean value) {
6256
      if (!value) {
6257
        this.inventoryItem = null;
6258
      }
2820 chandransh 6259
    }
6260
 
6261
    /**
6262
     * 
6263
     * @see ScanType
6264
     */
6265
    public ScanType getType() {
6266
      return this.type;
6267
    }
6268
 
6269
    /**
6270
     * 
6271
     * @see ScanType
6272
     */
3430 rajveer 6273
    public void setType(ScanType type) {
2820 chandransh 6274
      this.type = type;
6275
    }
6276
 
6277
    public void unsetType() {
6278
      this.type = null;
6279
    }
6280
 
3430 rajveer 6281
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
2820 chandransh 6282
    public boolean isSetType() {
6283
      return this.type != null;
6284
    }
6285
 
6286
    public void setTypeIsSet(boolean value) {
6287
      if (!value) {
6288
        this.type = null;
6289
      }
6290
    }
6291
 
4496 mandeep.dh 6292
    public long getQuantity() {
6293
      return this.quantity;
6294
    }
6295
 
6296
    public void setQuantity(long quantity) {
6297
      this.quantity = quantity;
6298
      setQuantityIsSet(true);
6299
    }
6300
 
6301
    public void unsetQuantity() {
6302
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
6303
    }
6304
 
6305
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
6306
    public boolean isSetQuantity() {
6307
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
6308
    }
6309
 
6310
    public void setQuantityIsSet(boolean value) {
6311
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
6312
    }
6313
 
6314
    public long getOrderId() {
6315
      return this.orderId;
6316
    }
6317
 
6318
    public void setOrderId(long orderId) {
6319
      this.orderId = orderId;
6320
      setOrderIdIsSet(true);
6321
    }
6322
 
6323
    public void unsetOrderId() {
6324
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
6325
    }
6326
 
6327
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
6328
    public boolean isSetOrderId() {
6329
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
6330
    }
6331
 
6332
    public void setOrderIdIsSet(boolean value) {
6333
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
6334
    }
6335
 
5110 mandeep.dh 6336
    public long getFulfilmentWarehouseId() {
6337
      return this.fulfilmentWarehouseId;
4496 mandeep.dh 6338
    }
6339
 
5110 mandeep.dh 6340
    public void setFulfilmentWarehouseId(long fulfilmentWarehouseId) {
6341
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
6342
      setFulfilmentWarehouseIdIsSet(true);
4496 mandeep.dh 6343
    }
6344
 
5110 mandeep.dh 6345
    public void unsetFulfilmentWarehouseId() {
6346
      __isset_bit_vector.clear(__FULFILMENTWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 6347
    }
6348
 
5110 mandeep.dh 6349
    /** Returns true if field fulfilmentWarehouseId is set (has been assigned a value) and false otherwise */
6350
    public boolean isSetFulfilmentWarehouseId() {
6351
      return __isset_bit_vector.get(__FULFILMENTWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 6352
    }
6353
 
5110 mandeep.dh 6354
    public void setFulfilmentWarehouseIdIsSet(boolean value) {
6355
      __isset_bit_vector.set(__FULFILMENTWAREHOUSEID_ISSET_ID, value);
4496 mandeep.dh 6356
    }
6357
 
5361 mandeep.dh 6358
    public long getBillingWarehouseId() {
6359
      return this.billingWarehouseId;
6360
    }
6361
 
6362
    public void setBillingWarehouseId(long billingWarehouseId) {
6363
      this.billingWarehouseId = billingWarehouseId;
6364
      setBillingWarehouseIdIsSet(true);
6365
    }
6366
 
6367
    public void unsetBillingWarehouseId() {
6368
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
6369
    }
6370
 
6371
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
6372
    public boolean isSetBillingWarehouseId() {
6373
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
6374
    }
6375
 
6376
    public void setBillingWarehouseIdIsSet(boolean value) {
6377
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
6378
    }
6379
 
2820 chandransh 6380
    public void setFieldValue(_Fields field, Object value) {
6381
      switch (field) {
5361 mandeep.dh 6382
      case INVENTORY_ITEM:
2820 chandransh 6383
        if (value == null) {
5361 mandeep.dh 6384
          unsetInventoryItem();
2820 chandransh 6385
        } else {
5361 mandeep.dh 6386
          setInventoryItem((InventoryItem)value);
2820 chandransh 6387
        }
6388
        break;
6389
 
4496 mandeep.dh 6390
      case TYPE:
2820 chandransh 6391
        if (value == null) {
4496 mandeep.dh 6392
          unsetType();
2820 chandransh 6393
        } else {
4496 mandeep.dh 6394
          setType((ScanType)value);
2820 chandransh 6395
        }
6396
        break;
6397
 
4496 mandeep.dh 6398
      case QUANTITY:
2820 chandransh 6399
        if (value == null) {
4496 mandeep.dh 6400
          unsetQuantity();
2820 chandransh 6401
        } else {
4496 mandeep.dh 6402
          setQuantity((Long)value);
2820 chandransh 6403
        }
6404
        break;
6405
 
4496 mandeep.dh 6406
      case ORDER_ID:
6407
        if (value == null) {
6408
          unsetOrderId();
6409
        } else {
6410
          setOrderId((Long)value);
6411
        }
6412
        break;
6413
 
5110 mandeep.dh 6414
      case FULFILMENT_WAREHOUSE_ID:
4496 mandeep.dh 6415
        if (value == null) {
5110 mandeep.dh 6416
          unsetFulfilmentWarehouseId();
4496 mandeep.dh 6417
        } else {
5110 mandeep.dh 6418
          setFulfilmentWarehouseId((Long)value);
4496 mandeep.dh 6419
        }
6420
        break;
6421
 
5361 mandeep.dh 6422
      case BILLING_WAREHOUSE_ID:
6423
        if (value == null) {
6424
          unsetBillingWarehouseId();
6425
        } else {
6426
          setBillingWarehouseId((Long)value);
6427
        }
6428
        break;
6429
 
2820 chandransh 6430
      }
6431
    }
6432
 
6433
    public Object getFieldValue(_Fields field) {
6434
      switch (field) {
5361 mandeep.dh 6435
      case INVENTORY_ITEM:
6436
        return getInventoryItem();
2820 chandransh 6437
 
6438
      case TYPE:
6439
        return getType();
6440
 
4496 mandeep.dh 6441
      case QUANTITY:
6442
        return Long.valueOf(getQuantity());
6443
 
6444
      case ORDER_ID:
6445
        return Long.valueOf(getOrderId());
6446
 
5110 mandeep.dh 6447
      case FULFILMENT_WAREHOUSE_ID:
6448
        return Long.valueOf(getFulfilmentWarehouseId());
4496 mandeep.dh 6449
 
5361 mandeep.dh 6450
      case BILLING_WAREHOUSE_ID:
6451
        return Long.valueOf(getBillingWarehouseId());
6452
 
2820 chandransh 6453
      }
6454
      throw new IllegalStateException();
6455
    }
6456
 
3430 rajveer 6457
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6458
    public boolean isSet(_Fields field) {
6459
      if (field == null) {
6460
        throw new IllegalArgumentException();
6461
      }
2820 chandransh 6462
 
6463
      switch (field) {
5361 mandeep.dh 6464
      case INVENTORY_ITEM:
6465
        return isSetInventoryItem();
2820 chandransh 6466
      case TYPE:
6467
        return isSetType();
4496 mandeep.dh 6468
      case QUANTITY:
6469
        return isSetQuantity();
6470
      case ORDER_ID:
6471
        return isSetOrderId();
5110 mandeep.dh 6472
      case FULFILMENT_WAREHOUSE_ID:
6473
        return isSetFulfilmentWarehouseId();
5361 mandeep.dh 6474
      case BILLING_WAREHOUSE_ID:
6475
        return isSetBillingWarehouseId();
2820 chandransh 6476
      }
6477
      throw new IllegalStateException();
6478
    }
6479
 
6480
    @Override
6481
    public boolean equals(Object that) {
6482
      if (that == null)
6483
        return false;
4496 mandeep.dh 6484
      if (that instanceof scanForOrder_args)
6485
        return this.equals((scanForOrder_args)that);
2820 chandransh 6486
      return false;
6487
    }
6488
 
4496 mandeep.dh 6489
    public boolean equals(scanForOrder_args that) {
2820 chandransh 6490
      if (that == null)
6491
        return false;
6492
 
5361 mandeep.dh 6493
      boolean this_present_inventoryItem = true && this.isSetInventoryItem();
6494
      boolean that_present_inventoryItem = true && that.isSetInventoryItem();
6495
      if (this_present_inventoryItem || that_present_inventoryItem) {
6496
        if (!(this_present_inventoryItem && that_present_inventoryItem))
2820 chandransh 6497
          return false;
5361 mandeep.dh 6498
        if (!this.inventoryItem.equals(that.inventoryItem))
2820 chandransh 6499
          return false;
6500
      }
6501
 
6502
      boolean this_present_type = true && this.isSetType();
6503
      boolean that_present_type = true && that.isSetType();
6504
      if (this_present_type || that_present_type) {
6505
        if (!(this_present_type && that_present_type))
6506
          return false;
6507
        if (!this.type.equals(that.type))
6508
          return false;
6509
      }
6510
 
4496 mandeep.dh 6511
      boolean this_present_quantity = true;
6512
      boolean that_present_quantity = true;
6513
      if (this_present_quantity || that_present_quantity) {
6514
        if (!(this_present_quantity && that_present_quantity))
6515
          return false;
6516
        if (this.quantity != that.quantity)
6517
          return false;
6518
      }
6519
 
6520
      boolean this_present_orderId = true;
6521
      boolean that_present_orderId = true;
6522
      if (this_present_orderId || that_present_orderId) {
6523
        if (!(this_present_orderId && that_present_orderId))
6524
          return false;
6525
        if (this.orderId != that.orderId)
6526
          return false;
6527
      }
6528
 
5110 mandeep.dh 6529
      boolean this_present_fulfilmentWarehouseId = true;
6530
      boolean that_present_fulfilmentWarehouseId = true;
6531
      if (this_present_fulfilmentWarehouseId || that_present_fulfilmentWarehouseId) {
6532
        if (!(this_present_fulfilmentWarehouseId && that_present_fulfilmentWarehouseId))
4496 mandeep.dh 6533
          return false;
5110 mandeep.dh 6534
        if (this.fulfilmentWarehouseId != that.fulfilmentWarehouseId)
4496 mandeep.dh 6535
          return false;
6536
      }
6537
 
5361 mandeep.dh 6538
      boolean this_present_billingWarehouseId = true;
6539
      boolean that_present_billingWarehouseId = true;
6540
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
6541
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
6542
          return false;
6543
        if (this.billingWarehouseId != that.billingWarehouseId)
6544
          return false;
6545
      }
6546
 
2820 chandransh 6547
      return true;
6548
    }
6549
 
6550
    @Override
6551
    public int hashCode() {
6552
      return 0;
6553
    }
6554
 
4496 mandeep.dh 6555
    public int compareTo(scanForOrder_args other) {
2820 chandransh 6556
      if (!getClass().equals(other.getClass())) {
6557
        return getClass().getName().compareTo(other.getClass().getName());
6558
      }
6559
 
6560
      int lastComparison = 0;
4496 mandeep.dh 6561
      scanForOrder_args typedOther = (scanForOrder_args)other;
2820 chandransh 6562
 
5361 mandeep.dh 6563
      lastComparison = Boolean.valueOf(isSetInventoryItem()).compareTo(typedOther.isSetInventoryItem());
2820 chandransh 6564
      if (lastComparison != 0) {
6565
        return lastComparison;
6566
      }
5361 mandeep.dh 6567
      if (isSetInventoryItem()) {
6568
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItem, typedOther.inventoryItem);
3430 rajveer 6569
        if (lastComparison != 0) {
6570
          return lastComparison;
6571
        }
2820 chandransh 6572
      }
4496 mandeep.dh 6573
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
2820 chandransh 6574
      if (lastComparison != 0) {
6575
        return lastComparison;
6576
      }
4496 mandeep.dh 6577
      if (isSetType()) {
6578
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 6579
        if (lastComparison != 0) {
6580
          return lastComparison;
6581
        }
2820 chandransh 6582
      }
4496 mandeep.dh 6583
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
2820 chandransh 6584
      if (lastComparison != 0) {
6585
        return lastComparison;
6586
      }
4496 mandeep.dh 6587
      if (isSetQuantity()) {
6588
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
3430 rajveer 6589
        if (lastComparison != 0) {
6590
          return lastComparison;
6591
        }
2820 chandransh 6592
      }
4496 mandeep.dh 6593
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
6594
      if (lastComparison != 0) {
6595
        return lastComparison;
6596
      }
6597
      if (isSetOrderId()) {
6598
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
6599
        if (lastComparison != 0) {
6600
          return lastComparison;
6601
        }
6602
      }
5110 mandeep.dh 6603
      lastComparison = Boolean.valueOf(isSetFulfilmentWarehouseId()).compareTo(typedOther.isSetFulfilmentWarehouseId());
4496 mandeep.dh 6604
      if (lastComparison != 0) {
6605
        return lastComparison;
6606
      }
5110 mandeep.dh 6607
      if (isSetFulfilmentWarehouseId()) {
6608
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilmentWarehouseId, typedOther.fulfilmentWarehouseId);
4496 mandeep.dh 6609
        if (lastComparison != 0) {
6610
          return lastComparison;
6611
        }
6612
      }
5361 mandeep.dh 6613
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
6614
      if (lastComparison != 0) {
6615
        return lastComparison;
6616
      }
6617
      if (isSetBillingWarehouseId()) {
6618
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
6619
        if (lastComparison != 0) {
6620
          return lastComparison;
6621
        }
6622
      }
2820 chandransh 6623
      return 0;
6624
    }
6625
 
3430 rajveer 6626
    public _Fields fieldForId(int fieldId) {
6627
      return _Fields.findByThriftId(fieldId);
6628
    }
6629
 
6630
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6631
      org.apache.thrift.protocol.TField field;
2820 chandransh 6632
      iprot.readStructBegin();
6633
      while (true)
6634
      {
6635
        field = iprot.readFieldBegin();
3430 rajveer 6636
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 6637
          break;
6638
        }
3430 rajveer 6639
        switch (field.id) {
5361 mandeep.dh 6640
          case 1: // INVENTORY_ITEM
6641
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6642
              this.inventoryItem = new InventoryItem();
6643
              this.inventoryItem.read(iprot);
3430 rajveer 6644
            } else { 
6645
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6646
            }
6647
            break;
4496 mandeep.dh 6648
          case 2: // TYPE
6649
            if (field.type == org.apache.thrift.protocol.TType.I32) {
6650
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 6651
            } else { 
6652
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6653
            }
6654
            break;
4496 mandeep.dh 6655
          case 3: // QUANTITY
6656
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6657
              this.quantity = iprot.readI64();
6658
              setQuantityIsSet(true);
3430 rajveer 6659
            } else { 
6660
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6661
            }
6662
            break;
4496 mandeep.dh 6663
          case 4: // ORDER_ID
6664
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6665
              this.orderId = iprot.readI64();
6666
              setOrderIdIsSet(true);
6667
            } else { 
6668
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6669
            }
6670
            break;
5110 mandeep.dh 6671
          case 5: // FULFILMENT_WAREHOUSE_ID
4496 mandeep.dh 6672
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5110 mandeep.dh 6673
              this.fulfilmentWarehouseId = iprot.readI64();
6674
              setFulfilmentWarehouseIdIsSet(true);
4496 mandeep.dh 6675
            } else { 
6676
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6677
            }
6678
            break;
5361 mandeep.dh 6679
          case 6: // BILLING_WAREHOUSE_ID
6680
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6681
              this.billingWarehouseId = iprot.readI64();
6682
              setBillingWarehouseIdIsSet(true);
6683
            } else { 
6684
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6685
            }
6686
            break;
3430 rajveer 6687
          default:
6688
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 6689
        }
3430 rajveer 6690
        iprot.readFieldEnd();
2820 chandransh 6691
      }
6692
      iprot.readStructEnd();
6693
      validate();
6694
    }
6695
 
3430 rajveer 6696
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 6697
      validate();
6698
 
6699
      oprot.writeStructBegin(STRUCT_DESC);
5361 mandeep.dh 6700
      if (this.inventoryItem != null) {
6701
        oprot.writeFieldBegin(INVENTORY_ITEM_FIELD_DESC);
6702
        this.inventoryItem.write(oprot);
6703
        oprot.writeFieldEnd();
6704
      }
2820 chandransh 6705
      if (this.type != null) {
6706
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
6707
        oprot.writeI32(this.type.getValue());
6708
        oprot.writeFieldEnd();
6709
      }
4496 mandeep.dh 6710
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
6711
      oprot.writeI64(this.quantity);
6712
      oprot.writeFieldEnd();
6713
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
6714
      oprot.writeI64(this.orderId);
6715
      oprot.writeFieldEnd();
5110 mandeep.dh 6716
      oprot.writeFieldBegin(FULFILMENT_WAREHOUSE_ID_FIELD_DESC);
6717
      oprot.writeI64(this.fulfilmentWarehouseId);
4496 mandeep.dh 6718
      oprot.writeFieldEnd();
5361 mandeep.dh 6719
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
6720
      oprot.writeI64(this.billingWarehouseId);
6721
      oprot.writeFieldEnd();
2820 chandransh 6722
      oprot.writeFieldStop();
6723
      oprot.writeStructEnd();
6724
    }
6725
 
6726
    @Override
6727
    public String toString() {
4496 mandeep.dh 6728
      StringBuilder sb = new StringBuilder("scanForOrder_args(");
2820 chandransh 6729
      boolean first = true;
6730
 
5361 mandeep.dh 6731
      sb.append("inventoryItem:");
6732
      if (this.inventoryItem == null) {
6733
        sb.append("null");
6734
      } else {
6735
        sb.append(this.inventoryItem);
6736
      }
2820 chandransh 6737
      first = false;
6738
      if (!first) sb.append(", ");
6739
      sb.append("type:");
6740
      if (this.type == null) {
6741
        sb.append("null");
6742
      } else {
6743
        sb.append(this.type);
6744
      }
6745
      first = false;
4496 mandeep.dh 6746
      if (!first) sb.append(", ");
6747
      sb.append("quantity:");
6748
      sb.append(this.quantity);
6749
      first = false;
6750
      if (!first) sb.append(", ");
6751
      sb.append("orderId:");
6752
      sb.append(this.orderId);
6753
      first = false;
6754
      if (!first) sb.append(", ");
5110 mandeep.dh 6755
      sb.append("fulfilmentWarehouseId:");
6756
      sb.append(this.fulfilmentWarehouseId);
4496 mandeep.dh 6757
      first = false;
5361 mandeep.dh 6758
      if (!first) sb.append(", ");
6759
      sb.append("billingWarehouseId:");
6760
      sb.append(this.billingWarehouseId);
6761
      first = false;
2820 chandransh 6762
      sb.append(")");
6763
      return sb.toString();
6764
    }
6765
 
3430 rajveer 6766
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 6767
      // check for required fields
6768
    }
6769
 
3430 rajveer 6770
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6771
      try {
6772
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6773
      } catch (org.apache.thrift.TException te) {
6774
        throw new java.io.IOException(te);
6775
      }
6776
    }
6777
 
6778
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6779
      try {
4496 mandeep.dh 6780
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
6781
        __isset_bit_vector = new BitSet(1);
3430 rajveer 6782
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6783
      } catch (org.apache.thrift.TException te) {
6784
        throw new java.io.IOException(te);
6785
      }
6786
    }
6787
 
2820 chandransh 6788
  }
6789
 
4496 mandeep.dh 6790
  public static class scanForOrder_result implements org.apache.thrift.TBase<scanForOrder_result, scanForOrder_result._Fields>, java.io.Serializable, Cloneable   {
6791
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOrder_result");
2820 chandransh 6792
 
5361 mandeep.dh 6793
    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 6794
    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 6795
 
5361 mandeep.dh 6796
    private InventoryItem success; // required
3430 rajveer 6797
    private WarehouseServiceException wex; // required
2820 chandransh 6798
 
6799
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 6800
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 6801
      SUCCESS((short)0, "success"),
2820 chandransh 6802
      WEX((short)1, "wex");
6803
 
6804
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6805
 
6806
      static {
6807
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6808
          byName.put(field.getFieldName(), field);
6809
        }
6810
      }
6811
 
6812
      /**
6813
       * Find the _Fields constant that matches fieldId, or null if its not found.
6814
       */
6815
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 6816
        switch(fieldId) {
5361 mandeep.dh 6817
          case 0: // SUCCESS
6818
            return SUCCESS;
3430 rajveer 6819
          case 1: // WEX
6820
            return WEX;
6821
          default:
6822
            return null;
6823
        }
2820 chandransh 6824
      }
6825
 
6826
      /**
6827
       * Find the _Fields constant that matches fieldId, throwing an exception
6828
       * if it is not found.
6829
       */
6830
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6831
        _Fields fields = findByThriftId(fieldId);
6832
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6833
        return fields;
6834
      }
6835
 
6836
      /**
6837
       * Find the _Fields constant that matches name, or null if its not found.
6838
       */
6839
      public static _Fields findByName(String name) {
6840
        return byName.get(name);
6841
      }
6842
 
6843
      private final short _thriftId;
6844
      private final String _fieldName;
6845
 
6846
      _Fields(short thriftId, String fieldName) {
6847
        _thriftId = thriftId;
6848
        _fieldName = fieldName;
6849
      }
6850
 
6851
      public short getThriftFieldId() {
6852
        return _thriftId;
6853
      }
6854
 
6855
      public String getFieldName() {
6856
        return _fieldName;
6857
      }
6858
    }
6859
 
6860
    // isset id assignments
6861
 
3430 rajveer 6862
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 6863
    static {
3430 rajveer 6864
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5361 mandeep.dh 6865
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6866
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 6867
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6868
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
6869
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 6870
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOrder_result.class, metaDataMap);
2820 chandransh 6871
    }
6872
 
4496 mandeep.dh 6873
    public scanForOrder_result() {
2820 chandransh 6874
    }
6875
 
4496 mandeep.dh 6876
    public scanForOrder_result(
5361 mandeep.dh 6877
      InventoryItem success,
2820 chandransh 6878
      WarehouseServiceException wex)
6879
    {
6880
      this();
5361 mandeep.dh 6881
      this.success = success;
2820 chandransh 6882
      this.wex = wex;
6883
    }
6884
 
6885
    /**
6886
     * Performs a deep copy on <i>other</i>.
6887
     */
4496 mandeep.dh 6888
    public scanForOrder_result(scanForOrder_result other) {
5361 mandeep.dh 6889
      if (other.isSetSuccess()) {
6890
        this.success = new InventoryItem(other.success);
6891
      }
2820 chandransh 6892
      if (other.isSetWex()) {
6893
        this.wex = new WarehouseServiceException(other.wex);
6894
      }
6895
    }
6896
 
4496 mandeep.dh 6897
    public scanForOrder_result deepCopy() {
6898
      return new scanForOrder_result(this);
2820 chandransh 6899
    }
6900
 
3430 rajveer 6901
    @Override
6902
    public void clear() {
5361 mandeep.dh 6903
      this.success = null;
3430 rajveer 6904
      this.wex = null;
2820 chandransh 6905
    }
6906
 
5361 mandeep.dh 6907
    public InventoryItem getSuccess() {
6908
      return this.success;
6909
    }
6910
 
6911
    public void setSuccess(InventoryItem success) {
6912
      this.success = success;
6913
    }
6914
 
6915
    public void unsetSuccess() {
6916
      this.success = null;
6917
    }
6918
 
6919
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
6920
    public boolean isSetSuccess() {
6921
      return this.success != null;
6922
    }
6923
 
6924
    public void setSuccessIsSet(boolean value) {
6925
      if (!value) {
6926
        this.success = null;
6927
      }
6928
    }
6929
 
2820 chandransh 6930
    public WarehouseServiceException getWex() {
6931
      return this.wex;
6932
    }
6933
 
3430 rajveer 6934
    public void setWex(WarehouseServiceException wex) {
2820 chandransh 6935
      this.wex = wex;
6936
    }
6937
 
6938
    public void unsetWex() {
6939
      this.wex = null;
6940
    }
6941
 
3430 rajveer 6942
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2820 chandransh 6943
    public boolean isSetWex() {
6944
      return this.wex != null;
6945
    }
6946
 
6947
    public void setWexIsSet(boolean value) {
6948
      if (!value) {
6949
        this.wex = null;
6950
      }
6951
    }
6952
 
6953
    public void setFieldValue(_Fields field, Object value) {
6954
      switch (field) {
5361 mandeep.dh 6955
      case SUCCESS:
6956
        if (value == null) {
6957
          unsetSuccess();
6958
        } else {
6959
          setSuccess((InventoryItem)value);
6960
        }
6961
        break;
6962
 
2820 chandransh 6963
      case WEX:
6964
        if (value == null) {
6965
          unsetWex();
6966
        } else {
6967
          setWex((WarehouseServiceException)value);
6968
        }
6969
        break;
6970
 
6971
      }
6972
    }
6973
 
6974
    public Object getFieldValue(_Fields field) {
6975
      switch (field) {
5361 mandeep.dh 6976
      case SUCCESS:
6977
        return getSuccess();
6978
 
2820 chandransh 6979
      case WEX:
6980
        return getWex();
6981
 
6982
      }
6983
      throw new IllegalStateException();
6984
    }
6985
 
3430 rajveer 6986
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6987
    public boolean isSet(_Fields field) {
6988
      if (field == null) {
6989
        throw new IllegalArgumentException();
6990
      }
2820 chandransh 6991
 
6992
      switch (field) {
5361 mandeep.dh 6993
      case SUCCESS:
6994
        return isSetSuccess();
2820 chandransh 6995
      case WEX:
6996
        return isSetWex();
6997
      }
6998
      throw new IllegalStateException();
6999
    }
7000
 
7001
    @Override
7002
    public boolean equals(Object that) {
7003
      if (that == null)
7004
        return false;
4496 mandeep.dh 7005
      if (that instanceof scanForOrder_result)
7006
        return this.equals((scanForOrder_result)that);
2820 chandransh 7007
      return false;
7008
    }
7009
 
4496 mandeep.dh 7010
    public boolean equals(scanForOrder_result that) {
2820 chandransh 7011
      if (that == null)
7012
        return false;
7013
 
5361 mandeep.dh 7014
      boolean this_present_success = true && this.isSetSuccess();
7015
      boolean that_present_success = true && that.isSetSuccess();
7016
      if (this_present_success || that_present_success) {
7017
        if (!(this_present_success && that_present_success))
7018
          return false;
7019
        if (!this.success.equals(that.success))
7020
          return false;
7021
      }
7022
 
2820 chandransh 7023
      boolean this_present_wex = true && this.isSetWex();
7024
      boolean that_present_wex = true && that.isSetWex();
7025
      if (this_present_wex || that_present_wex) {
7026
        if (!(this_present_wex && that_present_wex))
7027
          return false;
7028
        if (!this.wex.equals(that.wex))
7029
          return false;
7030
      }
7031
 
7032
      return true;
7033
    }
7034
 
7035
    @Override
7036
    public int hashCode() {
7037
      return 0;
7038
    }
7039
 
4496 mandeep.dh 7040
    public int compareTo(scanForOrder_result other) {
2820 chandransh 7041
      if (!getClass().equals(other.getClass())) {
7042
        return getClass().getName().compareTo(other.getClass().getName());
7043
      }
7044
 
7045
      int lastComparison = 0;
4496 mandeep.dh 7046
      scanForOrder_result typedOther = (scanForOrder_result)other;
2820 chandransh 7047
 
5361 mandeep.dh 7048
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7049
      if (lastComparison != 0) {
7050
        return lastComparison;
7051
      }
7052
      if (isSetSuccess()) {
7053
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7054
        if (lastComparison != 0) {
7055
          return lastComparison;
7056
        }
7057
      }
3430 rajveer 7058
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 7059
      if (lastComparison != 0) {
7060
        return lastComparison;
7061
      }
3430 rajveer 7062
      if (isSetWex()) {
7063
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
7064
        if (lastComparison != 0) {
7065
          return lastComparison;
7066
        }
2820 chandransh 7067
      }
7068
      return 0;
7069
    }
7070
 
3430 rajveer 7071
    public _Fields fieldForId(int fieldId) {
7072
      return _Fields.findByThriftId(fieldId);
7073
    }
7074
 
7075
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7076
      org.apache.thrift.protocol.TField field;
2820 chandransh 7077
      iprot.readStructBegin();
7078
      while (true)
7079
      {
7080
        field = iprot.readFieldBegin();
3430 rajveer 7081
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 7082
          break;
7083
        }
3430 rajveer 7084
        switch (field.id) {
5361 mandeep.dh 7085
          case 0: // SUCCESS
7086
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7087
              this.success = new InventoryItem();
7088
              this.success.read(iprot);
7089
            } else { 
7090
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7091
            }
7092
            break;
3430 rajveer 7093
          case 1: // WEX
7094
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7095
              this.wex = new WarehouseServiceException();
7096
              this.wex.read(iprot);
7097
            } else { 
7098
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7099
            }
7100
            break;
7101
          default:
7102
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 7103
        }
3430 rajveer 7104
        iprot.readFieldEnd();
2820 chandransh 7105
      }
7106
      iprot.readStructEnd();
7107
      validate();
7108
    }
7109
 
3430 rajveer 7110
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 7111
      oprot.writeStructBegin(STRUCT_DESC);
7112
 
5361 mandeep.dh 7113
      if (this.isSetSuccess()) {
7114
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7115
        this.success.write(oprot);
7116
        oprot.writeFieldEnd();
7117
      } else if (this.isSetWex()) {
2820 chandransh 7118
        oprot.writeFieldBegin(WEX_FIELD_DESC);
7119
        this.wex.write(oprot);
7120
        oprot.writeFieldEnd();
7121
      }
7122
      oprot.writeFieldStop();
7123
      oprot.writeStructEnd();
7124
    }
7125
 
7126
    @Override
7127
    public String toString() {
4496 mandeep.dh 7128
      StringBuilder sb = new StringBuilder("scanForOrder_result(");
2820 chandransh 7129
      boolean first = true;
7130
 
5361 mandeep.dh 7131
      sb.append("success:");
7132
      if (this.success == null) {
7133
        sb.append("null");
7134
      } else {
7135
        sb.append(this.success);
7136
      }
7137
      first = false;
7138
      if (!first) sb.append(", ");
2820 chandransh 7139
      sb.append("wex:");
7140
      if (this.wex == null) {
7141
        sb.append("null");
7142
      } else {
7143
        sb.append(this.wex);
7144
      }
7145
      first = false;
7146
      sb.append(")");
7147
      return sb.toString();
7148
    }
7149
 
3430 rajveer 7150
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 7151
      // check for required fields
7152
    }
7153
 
3430 rajveer 7154
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7155
      try {
7156
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7157
      } catch (org.apache.thrift.TException te) {
7158
        throw new java.io.IOException(te);
7159
      }
7160
    }
7161
 
7162
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7163
      try {
7164
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7165
      } catch (org.apache.thrift.TException te) {
7166
        throw new java.io.IOException(te);
7167
      }
7168
    }
7169
 
2820 chandransh 7170
  }
7171
 
4496 mandeep.dh 7172
  public static class createItemNumberMapping_args implements org.apache.thrift.TBase<createItemNumberMapping_args, createItemNumberMapping_args._Fields>, java.io.Serializable, Cloneable   {
7173
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createItemNumberMapping_args");
7174
 
7175
    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);
7176
    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);
7177
 
7178
    private String itemNumber; // required
7179
    private long itemId; // required
7180
 
7181
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7182
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7183
      ITEM_NUMBER((short)1, "itemNumber"),
7184
      ITEM_ID((short)2, "itemId");
7185
 
7186
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7187
 
7188
      static {
7189
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7190
          byName.put(field.getFieldName(), field);
7191
        }
7192
      }
7193
 
7194
      /**
7195
       * Find the _Fields constant that matches fieldId, or null if its not found.
7196
       */
7197
      public static _Fields findByThriftId(int fieldId) {
7198
        switch(fieldId) {
7199
          case 1: // ITEM_NUMBER
7200
            return ITEM_NUMBER;
7201
          case 2: // ITEM_ID
7202
            return ITEM_ID;
7203
          default:
7204
            return null;
7205
        }
7206
      }
7207
 
7208
      /**
7209
       * Find the _Fields constant that matches fieldId, throwing an exception
7210
       * if it is not found.
7211
       */
7212
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7213
        _Fields fields = findByThriftId(fieldId);
7214
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7215
        return fields;
7216
      }
7217
 
7218
      /**
7219
       * Find the _Fields constant that matches name, or null if its not found.
7220
       */
7221
      public static _Fields findByName(String name) {
7222
        return byName.get(name);
7223
      }
7224
 
7225
      private final short _thriftId;
7226
      private final String _fieldName;
7227
 
7228
      _Fields(short thriftId, String fieldName) {
7229
        _thriftId = thriftId;
7230
        _fieldName = fieldName;
7231
      }
7232
 
7233
      public short getThriftFieldId() {
7234
        return _thriftId;
7235
      }
7236
 
7237
      public String getFieldName() {
7238
        return _fieldName;
7239
      }
7240
    }
7241
 
7242
    // isset id assignments
7243
    private static final int __ITEMID_ISSET_ID = 0;
7244
    private BitSet __isset_bit_vector = new BitSet(1);
7245
 
7246
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7247
    static {
7248
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7249
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7250
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
7251
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7252
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7253
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7254
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createItemNumberMapping_args.class, metaDataMap);
7255
    }
7256
 
7257
    public createItemNumberMapping_args() {
7258
    }
7259
 
7260
    public createItemNumberMapping_args(
7261
      String itemNumber,
7262
      long itemId)
7263
    {
7264
      this();
7265
      this.itemNumber = itemNumber;
7266
      this.itemId = itemId;
7267
      setItemIdIsSet(true);
7268
    }
7269
 
7270
    /**
7271
     * Performs a deep copy on <i>other</i>.
7272
     */
7273
    public createItemNumberMapping_args(createItemNumberMapping_args other) {
7274
      __isset_bit_vector.clear();
7275
      __isset_bit_vector.or(other.__isset_bit_vector);
7276
      if (other.isSetItemNumber()) {
7277
        this.itemNumber = other.itemNumber;
7278
      }
7279
      this.itemId = other.itemId;
7280
    }
7281
 
7282
    public createItemNumberMapping_args deepCopy() {
7283
      return new createItemNumberMapping_args(this);
7284
    }
7285
 
7286
    @Override
7287
    public void clear() {
7288
      this.itemNumber = null;
7289
      setItemIdIsSet(false);
7290
      this.itemId = 0;
7291
    }
7292
 
7293
    public String getItemNumber() {
7294
      return this.itemNumber;
7295
    }
7296
 
7297
    public void setItemNumber(String itemNumber) {
7298
      this.itemNumber = itemNumber;
7299
    }
7300
 
7301
    public void unsetItemNumber() {
7302
      this.itemNumber = null;
7303
    }
7304
 
7305
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
7306
    public boolean isSetItemNumber() {
7307
      return this.itemNumber != null;
7308
    }
7309
 
7310
    public void setItemNumberIsSet(boolean value) {
7311
      if (!value) {
7312
        this.itemNumber = null;
7313
      }
7314
    }
7315
 
7316
    public long getItemId() {
7317
      return this.itemId;
7318
    }
7319
 
7320
    public void setItemId(long itemId) {
7321
      this.itemId = itemId;
7322
      setItemIdIsSet(true);
7323
    }
7324
 
7325
    public void unsetItemId() {
7326
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
7327
    }
7328
 
7329
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
7330
    public boolean isSetItemId() {
7331
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
7332
    }
7333
 
7334
    public void setItemIdIsSet(boolean value) {
7335
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
7336
    }
7337
 
7338
    public void setFieldValue(_Fields field, Object value) {
7339
      switch (field) {
7340
      case ITEM_NUMBER:
7341
        if (value == null) {
7342
          unsetItemNumber();
7343
        } else {
7344
          setItemNumber((String)value);
7345
        }
7346
        break;
7347
 
7348
      case ITEM_ID:
7349
        if (value == null) {
7350
          unsetItemId();
7351
        } else {
7352
          setItemId((Long)value);
7353
        }
7354
        break;
7355
 
7356
      }
7357
    }
7358
 
7359
    public Object getFieldValue(_Fields field) {
7360
      switch (field) {
7361
      case ITEM_NUMBER:
7362
        return getItemNumber();
7363
 
7364
      case ITEM_ID:
7365
        return Long.valueOf(getItemId());
7366
 
7367
      }
7368
      throw new IllegalStateException();
7369
    }
7370
 
7371
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7372
    public boolean isSet(_Fields field) {
7373
      if (field == null) {
7374
        throw new IllegalArgumentException();
7375
      }
7376
 
7377
      switch (field) {
7378
      case ITEM_NUMBER:
7379
        return isSetItemNumber();
7380
      case ITEM_ID:
7381
        return isSetItemId();
7382
      }
7383
      throw new IllegalStateException();
7384
    }
7385
 
7386
    @Override
7387
    public boolean equals(Object that) {
7388
      if (that == null)
7389
        return false;
7390
      if (that instanceof createItemNumberMapping_args)
7391
        return this.equals((createItemNumberMapping_args)that);
7392
      return false;
7393
    }
7394
 
7395
    public boolean equals(createItemNumberMapping_args that) {
7396
      if (that == null)
7397
        return false;
7398
 
7399
      boolean this_present_itemNumber = true && this.isSetItemNumber();
7400
      boolean that_present_itemNumber = true && that.isSetItemNumber();
7401
      if (this_present_itemNumber || that_present_itemNumber) {
7402
        if (!(this_present_itemNumber && that_present_itemNumber))
7403
          return false;
7404
        if (!this.itemNumber.equals(that.itemNumber))
7405
          return false;
7406
      }
7407
 
7408
      boolean this_present_itemId = true;
7409
      boolean that_present_itemId = true;
7410
      if (this_present_itemId || that_present_itemId) {
7411
        if (!(this_present_itemId && that_present_itemId))
7412
          return false;
7413
        if (this.itemId != that.itemId)
7414
          return false;
7415
      }
7416
 
7417
      return true;
7418
    }
7419
 
7420
    @Override
7421
    public int hashCode() {
7422
      return 0;
7423
    }
7424
 
7425
    public int compareTo(createItemNumberMapping_args other) {
7426
      if (!getClass().equals(other.getClass())) {
7427
        return getClass().getName().compareTo(other.getClass().getName());
7428
      }
7429
 
7430
      int lastComparison = 0;
7431
      createItemNumberMapping_args typedOther = (createItemNumberMapping_args)other;
7432
 
7433
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
7434
      if (lastComparison != 0) {
7435
        return lastComparison;
7436
      }
7437
      if (isSetItemNumber()) {
7438
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
7439
        if (lastComparison != 0) {
7440
          return lastComparison;
7441
        }
7442
      }
7443
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
7444
      if (lastComparison != 0) {
7445
        return lastComparison;
7446
      }
7447
      if (isSetItemId()) {
7448
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
7449
        if (lastComparison != 0) {
7450
          return lastComparison;
7451
        }
7452
      }
7453
      return 0;
7454
    }
7455
 
7456
    public _Fields fieldForId(int fieldId) {
7457
      return _Fields.findByThriftId(fieldId);
7458
    }
7459
 
7460
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7461
      org.apache.thrift.protocol.TField field;
7462
      iprot.readStructBegin();
7463
      while (true)
7464
      {
7465
        field = iprot.readFieldBegin();
7466
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7467
          break;
7468
        }
7469
        switch (field.id) {
7470
          case 1: // ITEM_NUMBER
7471
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
7472
              this.itemNumber = iprot.readString();
7473
            } else { 
7474
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7475
            }
7476
            break;
7477
          case 2: // ITEM_ID
7478
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7479
              this.itemId = iprot.readI64();
7480
              setItemIdIsSet(true);
7481
            } else { 
7482
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7483
            }
7484
            break;
7485
          default:
7486
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7487
        }
7488
        iprot.readFieldEnd();
7489
      }
7490
      iprot.readStructEnd();
7491
      validate();
7492
    }
7493
 
7494
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7495
      validate();
7496
 
7497
      oprot.writeStructBegin(STRUCT_DESC);
7498
      if (this.itemNumber != null) {
7499
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
7500
        oprot.writeString(this.itemNumber);
7501
        oprot.writeFieldEnd();
7502
      }
7503
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
7504
      oprot.writeI64(this.itemId);
7505
      oprot.writeFieldEnd();
7506
      oprot.writeFieldStop();
7507
      oprot.writeStructEnd();
7508
    }
7509
 
7510
    @Override
7511
    public String toString() {
7512
      StringBuilder sb = new StringBuilder("createItemNumberMapping_args(");
7513
      boolean first = true;
7514
 
7515
      sb.append("itemNumber:");
7516
      if (this.itemNumber == null) {
7517
        sb.append("null");
7518
      } else {
7519
        sb.append(this.itemNumber);
7520
      }
7521
      first = false;
7522
      if (!first) sb.append(", ");
7523
      sb.append("itemId:");
7524
      sb.append(this.itemId);
7525
      first = false;
7526
      sb.append(")");
7527
      return sb.toString();
7528
    }
7529
 
7530
    public void validate() throws org.apache.thrift.TException {
7531
      // check for required fields
7532
    }
7533
 
7534
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7535
      try {
7536
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7537
      } catch (org.apache.thrift.TException te) {
7538
        throw new java.io.IOException(te);
7539
      }
7540
    }
7541
 
7542
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7543
      try {
7544
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
7545
        __isset_bit_vector = new BitSet(1);
7546
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7547
      } catch (org.apache.thrift.TException te) {
7548
        throw new java.io.IOException(te);
7549
      }
7550
    }
7551
 
7552
  }
7553
 
7554
  public static class createItemNumberMapping_result implements org.apache.thrift.TBase<createItemNumberMapping_result, createItemNumberMapping_result._Fields>, java.io.Serializable, Cloneable   {
7555
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createItemNumberMapping_result");
7556
 
7557
 
7558
 
7559
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7560
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7561
;
7562
 
7563
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7564
 
7565
      static {
7566
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7567
          byName.put(field.getFieldName(), field);
7568
        }
7569
      }
7570
 
7571
      /**
7572
       * Find the _Fields constant that matches fieldId, or null if its not found.
7573
       */
7574
      public static _Fields findByThriftId(int fieldId) {
7575
        switch(fieldId) {
7576
          default:
7577
            return null;
7578
        }
7579
      }
7580
 
7581
      /**
7582
       * Find the _Fields constant that matches fieldId, throwing an exception
7583
       * if it is not found.
7584
       */
7585
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7586
        _Fields fields = findByThriftId(fieldId);
7587
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7588
        return fields;
7589
      }
7590
 
7591
      /**
7592
       * Find the _Fields constant that matches name, or null if its not found.
7593
       */
7594
      public static _Fields findByName(String name) {
7595
        return byName.get(name);
7596
      }
7597
 
7598
      private final short _thriftId;
7599
      private final String _fieldName;
7600
 
7601
      _Fields(short thriftId, String fieldName) {
7602
        _thriftId = thriftId;
7603
        _fieldName = fieldName;
7604
      }
7605
 
7606
      public short getThriftFieldId() {
7607
        return _thriftId;
7608
      }
7609
 
7610
      public String getFieldName() {
7611
        return _fieldName;
7612
      }
7613
    }
7614
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7615
    static {
7616
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7617
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7618
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createItemNumberMapping_result.class, metaDataMap);
7619
    }
7620
 
7621
    public createItemNumberMapping_result() {
7622
    }
7623
 
7624
    /**
7625
     * Performs a deep copy on <i>other</i>.
7626
     */
7627
    public createItemNumberMapping_result(createItemNumberMapping_result other) {
7628
    }
7629
 
7630
    public createItemNumberMapping_result deepCopy() {
7631
      return new createItemNumberMapping_result(this);
7632
    }
7633
 
7634
    @Override
7635
    public void clear() {
7636
    }
7637
 
7638
    public void setFieldValue(_Fields field, Object value) {
7639
      switch (field) {
7640
      }
7641
    }
7642
 
7643
    public Object getFieldValue(_Fields field) {
7644
      switch (field) {
7645
      }
7646
      throw new IllegalStateException();
7647
    }
7648
 
7649
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7650
    public boolean isSet(_Fields field) {
7651
      if (field == null) {
7652
        throw new IllegalArgumentException();
7653
      }
7654
 
7655
      switch (field) {
7656
      }
7657
      throw new IllegalStateException();
7658
    }
7659
 
7660
    @Override
7661
    public boolean equals(Object that) {
7662
      if (that == null)
7663
        return false;
7664
      if (that instanceof createItemNumberMapping_result)
7665
        return this.equals((createItemNumberMapping_result)that);
7666
      return false;
7667
    }
7668
 
7669
    public boolean equals(createItemNumberMapping_result that) {
7670
      if (that == null)
7671
        return false;
7672
 
7673
      return true;
7674
    }
7675
 
7676
    @Override
7677
    public int hashCode() {
7678
      return 0;
7679
    }
7680
 
7681
    public int compareTo(createItemNumberMapping_result other) {
7682
      if (!getClass().equals(other.getClass())) {
7683
        return getClass().getName().compareTo(other.getClass().getName());
7684
      }
7685
 
7686
      int lastComparison = 0;
7687
      createItemNumberMapping_result typedOther = (createItemNumberMapping_result)other;
7688
 
7689
      return 0;
7690
    }
7691
 
7692
    public _Fields fieldForId(int fieldId) {
7693
      return _Fields.findByThriftId(fieldId);
7694
    }
7695
 
7696
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7697
      org.apache.thrift.protocol.TField field;
7698
      iprot.readStructBegin();
7699
      while (true)
7700
      {
7701
        field = iprot.readFieldBegin();
7702
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7703
          break;
7704
        }
7705
        switch (field.id) {
7706
          default:
7707
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7708
        }
7709
        iprot.readFieldEnd();
7710
      }
7711
      iprot.readStructEnd();
7712
      validate();
7713
    }
7714
 
7715
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7716
      oprot.writeStructBegin(STRUCT_DESC);
7717
 
7718
      oprot.writeFieldStop();
7719
      oprot.writeStructEnd();
7720
    }
7721
 
7722
    @Override
7723
    public String toString() {
7724
      StringBuilder sb = new StringBuilder("createItemNumberMapping_result(");
7725
      boolean first = true;
7726
 
7727
      sb.append(")");
7728
      return sb.toString();
7729
    }
7730
 
7731
    public void validate() throws org.apache.thrift.TException {
7732
      // check for required fields
7733
    }
7734
 
7735
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7736
      try {
7737
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7738
      } catch (org.apache.thrift.TException te) {
7739
        throw new java.io.IOException(te);
7740
      }
7741
    }
7742
 
7743
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7744
      try {
7745
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7746
      } catch (org.apache.thrift.TException te) {
7747
        throw new java.io.IOException(te);
7748
      }
7749
    }
7750
 
7751
  }
7752
 
4622 amit.gupta 7753
  public static class getItemNumbers_args implements org.apache.thrift.TBase<getItemNumbers_args, getItemNumbers_args._Fields>, java.io.Serializable, Cloneable   {
7754
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemNumbers_args");
7755
 
7756
    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);
7757
 
7758
    private long itemId; // required
7759
 
7760
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7761
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7762
      ITEM_ID((short)1, "itemId");
7763
 
7764
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7765
 
7766
      static {
7767
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7768
          byName.put(field.getFieldName(), field);
7769
        }
7770
      }
7771
 
7772
      /**
7773
       * Find the _Fields constant that matches fieldId, or null if its not found.
7774
       */
7775
      public static _Fields findByThriftId(int fieldId) {
7776
        switch(fieldId) {
7777
          case 1: // ITEM_ID
7778
            return ITEM_ID;
7779
          default:
7780
            return null;
7781
        }
7782
      }
7783
 
7784
      /**
7785
       * Find the _Fields constant that matches fieldId, throwing an exception
7786
       * if it is not found.
7787
       */
7788
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7789
        _Fields fields = findByThriftId(fieldId);
7790
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7791
        return fields;
7792
      }
7793
 
7794
      /**
7795
       * Find the _Fields constant that matches name, or null if its not found.
7796
       */
7797
      public static _Fields findByName(String name) {
7798
        return byName.get(name);
7799
      }
7800
 
7801
      private final short _thriftId;
7802
      private final String _fieldName;
7803
 
7804
      _Fields(short thriftId, String fieldName) {
7805
        _thriftId = thriftId;
7806
        _fieldName = fieldName;
7807
      }
7808
 
7809
      public short getThriftFieldId() {
7810
        return _thriftId;
7811
      }
7812
 
7813
      public String getFieldName() {
7814
        return _fieldName;
7815
      }
7816
    }
7817
 
7818
    // isset id assignments
7819
    private static final int __ITEMID_ISSET_ID = 0;
7820
    private BitSet __isset_bit_vector = new BitSet(1);
7821
 
7822
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7823
    static {
7824
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7825
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7826
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7827
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7828
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemNumbers_args.class, metaDataMap);
7829
    }
7830
 
7831
    public getItemNumbers_args() {
7832
    }
7833
 
7834
    public getItemNumbers_args(
7835
      long itemId)
7836
    {
7837
      this();
7838
      this.itemId = itemId;
7839
      setItemIdIsSet(true);
7840
    }
7841
 
7842
    /**
7843
     * Performs a deep copy on <i>other</i>.
7844
     */
7845
    public getItemNumbers_args(getItemNumbers_args other) {
7846
      __isset_bit_vector.clear();
7847
      __isset_bit_vector.or(other.__isset_bit_vector);
7848
      this.itemId = other.itemId;
7849
    }
7850
 
7851
    public getItemNumbers_args deepCopy() {
7852
      return new getItemNumbers_args(this);
7853
    }
7854
 
7855
    @Override
7856
    public void clear() {
7857
      setItemIdIsSet(false);
7858
      this.itemId = 0;
7859
    }
7860
 
7861
    public long getItemId() {
7862
      return this.itemId;
7863
    }
7864
 
7865
    public void setItemId(long itemId) {
7866
      this.itemId = itemId;
7867
      setItemIdIsSet(true);
7868
    }
7869
 
7870
    public void unsetItemId() {
7871
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
7872
    }
7873
 
7874
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
7875
    public boolean isSetItemId() {
7876
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
7877
    }
7878
 
7879
    public void setItemIdIsSet(boolean value) {
7880
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
7881
    }
7882
 
7883
    public void setFieldValue(_Fields field, Object value) {
7884
      switch (field) {
7885
      case ITEM_ID:
7886
        if (value == null) {
7887
          unsetItemId();
7888
        } else {
7889
          setItemId((Long)value);
7890
        }
7891
        break;
7892
 
7893
      }
7894
    }
7895
 
7896
    public Object getFieldValue(_Fields field) {
7897
      switch (field) {
7898
      case ITEM_ID:
7899
        return Long.valueOf(getItemId());
7900
 
7901
      }
7902
      throw new IllegalStateException();
7903
    }
7904
 
7905
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7906
    public boolean isSet(_Fields field) {
7907
      if (field == null) {
7908
        throw new IllegalArgumentException();
7909
      }
7910
 
7911
      switch (field) {
7912
      case ITEM_ID:
7913
        return isSetItemId();
7914
      }
7915
      throw new IllegalStateException();
7916
    }
7917
 
7918
    @Override
7919
    public boolean equals(Object that) {
7920
      if (that == null)
7921
        return false;
7922
      if (that instanceof getItemNumbers_args)
7923
        return this.equals((getItemNumbers_args)that);
7924
      return false;
7925
    }
7926
 
7927
    public boolean equals(getItemNumbers_args that) {
7928
      if (that == null)
7929
        return false;
7930
 
7931
      boolean this_present_itemId = true;
7932
      boolean that_present_itemId = true;
7933
      if (this_present_itemId || that_present_itemId) {
7934
        if (!(this_present_itemId && that_present_itemId))
7935
          return false;
7936
        if (this.itemId != that.itemId)
7937
          return false;
7938
      }
7939
 
7940
      return true;
7941
    }
7942
 
7943
    @Override
7944
    public int hashCode() {
7945
      return 0;
7946
    }
7947
 
7948
    public int compareTo(getItemNumbers_args other) {
7949
      if (!getClass().equals(other.getClass())) {
7950
        return getClass().getName().compareTo(other.getClass().getName());
7951
      }
7952
 
7953
      int lastComparison = 0;
7954
      getItemNumbers_args typedOther = (getItemNumbers_args)other;
7955
 
7956
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
7957
      if (lastComparison != 0) {
7958
        return lastComparison;
7959
      }
7960
      if (isSetItemId()) {
7961
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
7962
        if (lastComparison != 0) {
7963
          return lastComparison;
7964
        }
7965
      }
7966
      return 0;
7967
    }
7968
 
7969
    public _Fields fieldForId(int fieldId) {
7970
      return _Fields.findByThriftId(fieldId);
7971
    }
7972
 
7973
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7974
      org.apache.thrift.protocol.TField field;
7975
      iprot.readStructBegin();
7976
      while (true)
7977
      {
7978
        field = iprot.readFieldBegin();
7979
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7980
          break;
7981
        }
7982
        switch (field.id) {
7983
          case 1: // ITEM_ID
7984
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7985
              this.itemId = iprot.readI64();
7986
              setItemIdIsSet(true);
7987
            } else { 
7988
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7989
            }
7990
            break;
7991
          default:
7992
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7993
        }
7994
        iprot.readFieldEnd();
7995
      }
7996
      iprot.readStructEnd();
7997
      validate();
7998
    }
7999
 
8000
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8001
      validate();
8002
 
8003
      oprot.writeStructBegin(STRUCT_DESC);
8004
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
8005
      oprot.writeI64(this.itemId);
8006
      oprot.writeFieldEnd();
8007
      oprot.writeFieldStop();
8008
      oprot.writeStructEnd();
8009
    }
8010
 
8011
    @Override
8012
    public String toString() {
8013
      StringBuilder sb = new StringBuilder("getItemNumbers_args(");
8014
      boolean first = true;
8015
 
8016
      sb.append("itemId:");
8017
      sb.append(this.itemId);
8018
      first = false;
8019
      sb.append(")");
8020
      return sb.toString();
8021
    }
8022
 
8023
    public void validate() throws org.apache.thrift.TException {
8024
      // check for required fields
8025
    }
8026
 
8027
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8028
      try {
8029
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8030
      } catch (org.apache.thrift.TException te) {
8031
        throw new java.io.IOException(te);
8032
      }
8033
    }
8034
 
8035
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8036
      try {
8037
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8038
        __isset_bit_vector = new BitSet(1);
8039
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8040
      } catch (org.apache.thrift.TException te) {
8041
        throw new java.io.IOException(te);
8042
      }
8043
    }
8044
 
8045
  }
8046
 
8047
  public static class getItemNumbers_result implements org.apache.thrift.TBase<getItemNumbers_result, getItemNumbers_result._Fields>, java.io.Serializable, Cloneable   {
8048
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemNumbers_result");
8049
 
8050
    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);
8051
 
8052
    private List<String> success; // required
8053
 
8054
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8055
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8056
      SUCCESS((short)0, "success");
8057
 
8058
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8059
 
8060
      static {
8061
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8062
          byName.put(field.getFieldName(), field);
8063
        }
8064
      }
8065
 
8066
      /**
8067
       * Find the _Fields constant that matches fieldId, or null if its not found.
8068
       */
8069
      public static _Fields findByThriftId(int fieldId) {
8070
        switch(fieldId) {
8071
          case 0: // SUCCESS
8072
            return SUCCESS;
8073
          default:
8074
            return null;
8075
        }
8076
      }
8077
 
8078
      /**
8079
       * Find the _Fields constant that matches fieldId, throwing an exception
8080
       * if it is not found.
8081
       */
8082
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8083
        _Fields fields = findByThriftId(fieldId);
8084
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8085
        return fields;
8086
      }
8087
 
8088
      /**
8089
       * Find the _Fields constant that matches name, or null if its not found.
8090
       */
8091
      public static _Fields findByName(String name) {
8092
        return byName.get(name);
8093
      }
8094
 
8095
      private final short _thriftId;
8096
      private final String _fieldName;
8097
 
8098
      _Fields(short thriftId, String fieldName) {
8099
        _thriftId = thriftId;
8100
        _fieldName = fieldName;
8101
      }
8102
 
8103
      public short getThriftFieldId() {
8104
        return _thriftId;
8105
      }
8106
 
8107
      public String getFieldName() {
8108
        return _fieldName;
8109
      }
8110
    }
8111
 
8112
    // isset id assignments
8113
 
8114
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8115
    static {
8116
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8117
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8118
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
8119
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
8120
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8121
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemNumbers_result.class, metaDataMap);
8122
    }
8123
 
8124
    public getItemNumbers_result() {
8125
    }
8126
 
8127
    public getItemNumbers_result(
8128
      List<String> success)
8129
    {
8130
      this();
8131
      this.success = success;
8132
    }
8133
 
8134
    /**
8135
     * Performs a deep copy on <i>other</i>.
8136
     */
8137
    public getItemNumbers_result(getItemNumbers_result other) {
8138
      if (other.isSetSuccess()) {
8139
        List<String> __this__success = new ArrayList<String>();
8140
        for (String other_element : other.success) {
8141
          __this__success.add(other_element);
8142
        }
8143
        this.success = __this__success;
8144
      }
8145
    }
8146
 
8147
    public getItemNumbers_result deepCopy() {
8148
      return new getItemNumbers_result(this);
8149
    }
8150
 
8151
    @Override
8152
    public void clear() {
8153
      this.success = null;
8154
    }
8155
 
8156
    public int getSuccessSize() {
8157
      return (this.success == null) ? 0 : this.success.size();
8158
    }
8159
 
8160
    public java.util.Iterator<String> getSuccessIterator() {
8161
      return (this.success == null) ? null : this.success.iterator();
8162
    }
8163
 
8164
    public void addToSuccess(String elem) {
8165
      if (this.success == null) {
8166
        this.success = new ArrayList<String>();
8167
      }
8168
      this.success.add(elem);
8169
    }
8170
 
8171
    public List<String> getSuccess() {
8172
      return this.success;
8173
    }
8174
 
8175
    public void setSuccess(List<String> success) {
8176
      this.success = success;
8177
    }
8178
 
8179
    public void unsetSuccess() {
8180
      this.success = null;
8181
    }
8182
 
8183
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8184
    public boolean isSetSuccess() {
8185
      return this.success != null;
8186
    }
8187
 
8188
    public void setSuccessIsSet(boolean value) {
8189
      if (!value) {
8190
        this.success = null;
8191
      }
8192
    }
8193
 
8194
    public void setFieldValue(_Fields field, Object value) {
8195
      switch (field) {
8196
      case SUCCESS:
8197
        if (value == null) {
8198
          unsetSuccess();
8199
        } else {
8200
          setSuccess((List<String>)value);
8201
        }
8202
        break;
8203
 
8204
      }
8205
    }
8206
 
8207
    public Object getFieldValue(_Fields field) {
8208
      switch (field) {
8209
      case SUCCESS:
8210
        return getSuccess();
8211
 
8212
      }
8213
      throw new IllegalStateException();
8214
    }
8215
 
8216
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8217
    public boolean isSet(_Fields field) {
8218
      if (field == null) {
8219
        throw new IllegalArgumentException();
8220
      }
8221
 
8222
      switch (field) {
8223
      case SUCCESS:
8224
        return isSetSuccess();
8225
      }
8226
      throw new IllegalStateException();
8227
    }
8228
 
8229
    @Override
8230
    public boolean equals(Object that) {
8231
      if (that == null)
8232
        return false;
8233
      if (that instanceof getItemNumbers_result)
8234
        return this.equals((getItemNumbers_result)that);
8235
      return false;
8236
    }
8237
 
8238
    public boolean equals(getItemNumbers_result that) {
8239
      if (that == null)
8240
        return false;
8241
 
8242
      boolean this_present_success = true && this.isSetSuccess();
8243
      boolean that_present_success = true && that.isSetSuccess();
8244
      if (this_present_success || that_present_success) {
8245
        if (!(this_present_success && that_present_success))
8246
          return false;
8247
        if (!this.success.equals(that.success))
8248
          return false;
8249
      }
8250
 
8251
      return true;
8252
    }
8253
 
8254
    @Override
8255
    public int hashCode() {
8256
      return 0;
8257
    }
8258
 
8259
    public int compareTo(getItemNumbers_result other) {
8260
      if (!getClass().equals(other.getClass())) {
8261
        return getClass().getName().compareTo(other.getClass().getName());
8262
      }
8263
 
8264
      int lastComparison = 0;
8265
      getItemNumbers_result typedOther = (getItemNumbers_result)other;
8266
 
8267
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8268
      if (lastComparison != 0) {
8269
        return lastComparison;
8270
      }
8271
      if (isSetSuccess()) {
8272
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8273
        if (lastComparison != 0) {
8274
          return lastComparison;
8275
        }
8276
      }
8277
      return 0;
8278
    }
8279
 
8280
    public _Fields fieldForId(int fieldId) {
8281
      return _Fields.findByThriftId(fieldId);
8282
    }
8283
 
8284
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8285
      org.apache.thrift.protocol.TField field;
8286
      iprot.readStructBegin();
8287
      while (true)
8288
      {
8289
        field = iprot.readFieldBegin();
8290
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8291
          break;
8292
        }
8293
        switch (field.id) {
8294
          case 0: // SUCCESS
8295
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8296
              {
5361 mandeep.dh 8297
                org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
8298
                this.success = new ArrayList<String>(_list0.size);
8299
                for (int _i1 = 0; _i1 < _list0.size; ++_i1)
4622 amit.gupta 8300
                {
5361 mandeep.dh 8301
                  String _elem2; // required
8302
                  _elem2 = iprot.readString();
8303
                  this.success.add(_elem2);
4622 amit.gupta 8304
                }
8305
                iprot.readListEnd();
8306
              }
8307
            } else { 
8308
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8309
            }
8310
            break;
8311
          default:
8312
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8313
        }
8314
        iprot.readFieldEnd();
8315
      }
8316
      iprot.readStructEnd();
8317
      validate();
8318
    }
8319
 
8320
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8321
      oprot.writeStructBegin(STRUCT_DESC);
8322
 
8323
      if (this.isSetSuccess()) {
8324
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8325
        {
8326
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size()));
5361 mandeep.dh 8327
          for (String _iter3 : this.success)
4622 amit.gupta 8328
          {
5361 mandeep.dh 8329
            oprot.writeString(_iter3);
4622 amit.gupta 8330
          }
8331
          oprot.writeListEnd();
8332
        }
8333
        oprot.writeFieldEnd();
8334
      }
8335
      oprot.writeFieldStop();
8336
      oprot.writeStructEnd();
8337
    }
8338
 
8339
    @Override
8340
    public String toString() {
8341
      StringBuilder sb = new StringBuilder("getItemNumbers_result(");
8342
      boolean first = true;
8343
 
8344
      sb.append("success:");
8345
      if (this.success == null) {
8346
        sb.append("null");
8347
      } else {
8348
        sb.append(this.success);
8349
      }
8350
      first = false;
8351
      sb.append(")");
8352
      return sb.toString();
8353
    }
8354
 
8355
    public void validate() throws org.apache.thrift.TException {
8356
      // check for required fields
8357
    }
8358
 
8359
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8360
      try {
8361
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8362
      } catch (org.apache.thrift.TException te) {
8363
        throw new java.io.IOException(te);
8364
      }
8365
    }
8366
 
8367
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8368
      try {
8369
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8370
      } catch (org.apache.thrift.TException te) {
8371
        throw new java.io.IOException(te);
8372
      }
8373
    }
8374
 
8375
  }
8376
 
5110 mandeep.dh 8377
  public static class getItemIds_args implements org.apache.thrift.TBase<getItemIds_args, getItemIds_args._Fields>, java.io.Serializable, Cloneable   {
8378
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemIds_args");
8379
 
8380
    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);
8381
 
8382
    private String itemNumber; // required
8383
 
8384
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8385
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8386
      ITEM_NUMBER((short)1, "itemNumber");
8387
 
8388
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8389
 
8390
      static {
8391
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8392
          byName.put(field.getFieldName(), field);
8393
        }
8394
      }
8395
 
8396
      /**
8397
       * Find the _Fields constant that matches fieldId, or null if its not found.
8398
       */
8399
      public static _Fields findByThriftId(int fieldId) {
8400
        switch(fieldId) {
8401
          case 1: // ITEM_NUMBER
8402
            return ITEM_NUMBER;
8403
          default:
8404
            return null;
8405
        }
8406
      }
8407
 
8408
      /**
8409
       * Find the _Fields constant that matches fieldId, throwing an exception
8410
       * if it is not found.
8411
       */
8412
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8413
        _Fields fields = findByThriftId(fieldId);
8414
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8415
        return fields;
8416
      }
8417
 
8418
      /**
8419
       * Find the _Fields constant that matches name, or null if its not found.
8420
       */
8421
      public static _Fields findByName(String name) {
8422
        return byName.get(name);
8423
      }
8424
 
8425
      private final short _thriftId;
8426
      private final String _fieldName;
8427
 
8428
      _Fields(short thriftId, String fieldName) {
8429
        _thriftId = thriftId;
8430
        _fieldName = fieldName;
8431
      }
8432
 
8433
      public short getThriftFieldId() {
8434
        return _thriftId;
8435
      }
8436
 
8437
      public String getFieldName() {
8438
        return _fieldName;
8439
      }
8440
    }
8441
 
8442
    // isset id assignments
8443
 
8444
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8445
    static {
8446
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8447
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8448
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
8449
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8450
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemIds_args.class, metaDataMap);
8451
    }
8452
 
8453
    public getItemIds_args() {
8454
    }
8455
 
8456
    public getItemIds_args(
8457
      String itemNumber)
8458
    {
8459
      this();
8460
      this.itemNumber = itemNumber;
8461
    }
8462
 
8463
    /**
8464
     * Performs a deep copy on <i>other</i>.
8465
     */
8466
    public getItemIds_args(getItemIds_args other) {
8467
      if (other.isSetItemNumber()) {
8468
        this.itemNumber = other.itemNumber;
8469
      }
8470
    }
8471
 
8472
    public getItemIds_args deepCopy() {
8473
      return new getItemIds_args(this);
8474
    }
8475
 
8476
    @Override
8477
    public void clear() {
8478
      this.itemNumber = null;
8479
    }
8480
 
8481
    public String getItemNumber() {
8482
      return this.itemNumber;
8483
    }
8484
 
8485
    public void setItemNumber(String itemNumber) {
8486
      this.itemNumber = itemNumber;
8487
    }
8488
 
8489
    public void unsetItemNumber() {
8490
      this.itemNumber = null;
8491
    }
8492
 
8493
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
8494
    public boolean isSetItemNumber() {
8495
      return this.itemNumber != null;
8496
    }
8497
 
8498
    public void setItemNumberIsSet(boolean value) {
8499
      if (!value) {
8500
        this.itemNumber = null;
8501
      }
8502
    }
8503
 
8504
    public void setFieldValue(_Fields field, Object value) {
8505
      switch (field) {
8506
      case ITEM_NUMBER:
8507
        if (value == null) {
8508
          unsetItemNumber();
8509
        } else {
8510
          setItemNumber((String)value);
8511
        }
8512
        break;
8513
 
8514
      }
8515
    }
8516
 
8517
    public Object getFieldValue(_Fields field) {
8518
      switch (field) {
8519
      case ITEM_NUMBER:
8520
        return getItemNumber();
8521
 
8522
      }
8523
      throw new IllegalStateException();
8524
    }
8525
 
8526
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8527
    public boolean isSet(_Fields field) {
8528
      if (field == null) {
8529
        throw new IllegalArgumentException();
8530
      }
8531
 
8532
      switch (field) {
8533
      case ITEM_NUMBER:
8534
        return isSetItemNumber();
8535
      }
8536
      throw new IllegalStateException();
8537
    }
8538
 
8539
    @Override
8540
    public boolean equals(Object that) {
8541
      if (that == null)
8542
        return false;
8543
      if (that instanceof getItemIds_args)
8544
        return this.equals((getItemIds_args)that);
8545
      return false;
8546
    }
8547
 
8548
    public boolean equals(getItemIds_args that) {
8549
      if (that == null)
8550
        return false;
8551
 
8552
      boolean this_present_itemNumber = true && this.isSetItemNumber();
8553
      boolean that_present_itemNumber = true && that.isSetItemNumber();
8554
      if (this_present_itemNumber || that_present_itemNumber) {
8555
        if (!(this_present_itemNumber && that_present_itemNumber))
8556
          return false;
8557
        if (!this.itemNumber.equals(that.itemNumber))
8558
          return false;
8559
      }
8560
 
8561
      return true;
8562
    }
8563
 
8564
    @Override
8565
    public int hashCode() {
8566
      return 0;
8567
    }
8568
 
8569
    public int compareTo(getItemIds_args other) {
8570
      if (!getClass().equals(other.getClass())) {
8571
        return getClass().getName().compareTo(other.getClass().getName());
8572
      }
8573
 
8574
      int lastComparison = 0;
8575
      getItemIds_args typedOther = (getItemIds_args)other;
8576
 
8577
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
8578
      if (lastComparison != 0) {
8579
        return lastComparison;
8580
      }
8581
      if (isSetItemNumber()) {
8582
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
8583
        if (lastComparison != 0) {
8584
          return lastComparison;
8585
        }
8586
      }
8587
      return 0;
8588
    }
8589
 
8590
    public _Fields fieldForId(int fieldId) {
8591
      return _Fields.findByThriftId(fieldId);
8592
    }
8593
 
8594
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8595
      org.apache.thrift.protocol.TField field;
8596
      iprot.readStructBegin();
8597
      while (true)
8598
      {
8599
        field = iprot.readFieldBegin();
8600
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8601
          break;
8602
        }
8603
        switch (field.id) {
8604
          case 1: // ITEM_NUMBER
8605
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
8606
              this.itemNumber = iprot.readString();
8607
            } else { 
8608
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8609
            }
8610
            break;
8611
          default:
8612
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8613
        }
8614
        iprot.readFieldEnd();
8615
      }
8616
      iprot.readStructEnd();
8617
      validate();
8618
    }
8619
 
8620
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8621
      validate();
8622
 
8623
      oprot.writeStructBegin(STRUCT_DESC);
8624
      if (this.itemNumber != null) {
8625
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
8626
        oprot.writeString(this.itemNumber);
8627
        oprot.writeFieldEnd();
8628
      }
8629
      oprot.writeFieldStop();
8630
      oprot.writeStructEnd();
8631
    }
8632
 
8633
    @Override
8634
    public String toString() {
8635
      StringBuilder sb = new StringBuilder("getItemIds_args(");
8636
      boolean first = true;
8637
 
8638
      sb.append("itemNumber:");
8639
      if (this.itemNumber == null) {
8640
        sb.append("null");
8641
      } else {
8642
        sb.append(this.itemNumber);
8643
      }
8644
      first = false;
8645
      sb.append(")");
8646
      return sb.toString();
8647
    }
8648
 
8649
    public void validate() throws org.apache.thrift.TException {
8650
      // check for required fields
8651
    }
8652
 
8653
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8654
      try {
8655
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8656
      } catch (org.apache.thrift.TException te) {
8657
        throw new java.io.IOException(te);
8658
      }
8659
    }
8660
 
8661
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8662
      try {
8663
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8664
      } catch (org.apache.thrift.TException te) {
8665
        throw new java.io.IOException(te);
8666
      }
8667
    }
8668
 
8669
  }
8670
 
8671
  public static class getItemIds_result implements org.apache.thrift.TBase<getItemIds_result, getItemIds_result._Fields>, java.io.Serializable, Cloneable   {
8672
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemIds_result");
8673
 
8674
    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);
8675
 
8676
    private List<Long> success; // required
8677
 
8678
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8679
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8680
      SUCCESS((short)0, "success");
8681
 
8682
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8683
 
8684
      static {
8685
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8686
          byName.put(field.getFieldName(), field);
8687
        }
8688
      }
8689
 
8690
      /**
8691
       * Find the _Fields constant that matches fieldId, or null if its not found.
8692
       */
8693
      public static _Fields findByThriftId(int fieldId) {
8694
        switch(fieldId) {
8695
          case 0: // SUCCESS
8696
            return SUCCESS;
8697
          default:
8698
            return null;
8699
        }
8700
      }
8701
 
8702
      /**
8703
       * Find the _Fields constant that matches fieldId, throwing an exception
8704
       * if it is not found.
8705
       */
8706
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8707
        _Fields fields = findByThriftId(fieldId);
8708
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8709
        return fields;
8710
      }
8711
 
8712
      /**
8713
       * Find the _Fields constant that matches name, or null if its not found.
8714
       */
8715
      public static _Fields findByName(String name) {
8716
        return byName.get(name);
8717
      }
8718
 
8719
      private final short _thriftId;
8720
      private final String _fieldName;
8721
 
8722
      _Fields(short thriftId, String fieldName) {
8723
        _thriftId = thriftId;
8724
        _fieldName = fieldName;
8725
      }
8726
 
8727
      public short getThriftFieldId() {
8728
        return _thriftId;
8729
      }
8730
 
8731
      public String getFieldName() {
8732
        return _fieldName;
8733
      }
8734
    }
8735
 
8736
    // isset id assignments
8737
 
8738
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8739
    static {
8740
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8741
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8742
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
8743
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
8744
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8745
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemIds_result.class, metaDataMap);
8746
    }
8747
 
8748
    public getItemIds_result() {
8749
    }
8750
 
8751
    public getItemIds_result(
8752
      List<Long> success)
8753
    {
8754
      this();
8755
      this.success = success;
8756
    }
8757
 
8758
    /**
8759
     * Performs a deep copy on <i>other</i>.
8760
     */
8761
    public getItemIds_result(getItemIds_result other) {
8762
      if (other.isSetSuccess()) {
8763
        List<Long> __this__success = new ArrayList<Long>();
8764
        for (Long other_element : other.success) {
8765
          __this__success.add(other_element);
8766
        }
8767
        this.success = __this__success;
8768
      }
8769
    }
8770
 
8771
    public getItemIds_result deepCopy() {
8772
      return new getItemIds_result(this);
8773
    }
8774
 
8775
    @Override
8776
    public void clear() {
8777
      this.success = null;
8778
    }
8779
 
8780
    public int getSuccessSize() {
8781
      return (this.success == null) ? 0 : this.success.size();
8782
    }
8783
 
8784
    public java.util.Iterator<Long> getSuccessIterator() {
8785
      return (this.success == null) ? null : this.success.iterator();
8786
    }
8787
 
8788
    public void addToSuccess(long elem) {
8789
      if (this.success == null) {
8790
        this.success = new ArrayList<Long>();
8791
      }
8792
      this.success.add(elem);
8793
    }
8794
 
8795
    public List<Long> getSuccess() {
8796
      return this.success;
8797
    }
8798
 
8799
    public void setSuccess(List<Long> success) {
8800
      this.success = success;
8801
    }
8802
 
8803
    public void unsetSuccess() {
8804
      this.success = null;
8805
    }
8806
 
8807
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8808
    public boolean isSetSuccess() {
8809
      return this.success != null;
8810
    }
8811
 
8812
    public void setSuccessIsSet(boolean value) {
8813
      if (!value) {
8814
        this.success = null;
8815
      }
8816
    }
8817
 
8818
    public void setFieldValue(_Fields field, Object value) {
8819
      switch (field) {
8820
      case SUCCESS:
8821
        if (value == null) {
8822
          unsetSuccess();
8823
        } else {
8824
          setSuccess((List<Long>)value);
8825
        }
8826
        break;
8827
 
8828
      }
8829
    }
8830
 
8831
    public Object getFieldValue(_Fields field) {
8832
      switch (field) {
8833
      case SUCCESS:
8834
        return getSuccess();
8835
 
8836
      }
8837
      throw new IllegalStateException();
8838
    }
8839
 
8840
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8841
    public boolean isSet(_Fields field) {
8842
      if (field == null) {
8843
        throw new IllegalArgumentException();
8844
      }
8845
 
8846
      switch (field) {
8847
      case SUCCESS:
8848
        return isSetSuccess();
8849
      }
8850
      throw new IllegalStateException();
8851
    }
8852
 
8853
    @Override
8854
    public boolean equals(Object that) {
8855
      if (that == null)
8856
        return false;
8857
      if (that instanceof getItemIds_result)
8858
        return this.equals((getItemIds_result)that);
8859
      return false;
8860
    }
8861
 
8862
    public boolean equals(getItemIds_result that) {
8863
      if (that == null)
8864
        return false;
8865
 
8866
      boolean this_present_success = true && this.isSetSuccess();
8867
      boolean that_present_success = true && that.isSetSuccess();
8868
      if (this_present_success || that_present_success) {
8869
        if (!(this_present_success && that_present_success))
8870
          return false;
8871
        if (!this.success.equals(that.success))
8872
          return false;
8873
      }
8874
 
8875
      return true;
8876
    }
8877
 
8878
    @Override
8879
    public int hashCode() {
8880
      return 0;
8881
    }
8882
 
8883
    public int compareTo(getItemIds_result other) {
8884
      if (!getClass().equals(other.getClass())) {
8885
        return getClass().getName().compareTo(other.getClass().getName());
8886
      }
8887
 
8888
      int lastComparison = 0;
8889
      getItemIds_result typedOther = (getItemIds_result)other;
8890
 
8891
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8892
      if (lastComparison != 0) {
8893
        return lastComparison;
8894
      }
8895
      if (isSetSuccess()) {
8896
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8897
        if (lastComparison != 0) {
8898
          return lastComparison;
8899
        }
8900
      }
8901
      return 0;
8902
    }
8903
 
8904
    public _Fields fieldForId(int fieldId) {
8905
      return _Fields.findByThriftId(fieldId);
8906
    }
8907
 
8908
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8909
      org.apache.thrift.protocol.TField field;
8910
      iprot.readStructBegin();
8911
      while (true)
8912
      {
8913
        field = iprot.readFieldBegin();
8914
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8915
          break;
8916
        }
8917
        switch (field.id) {
8918
          case 0: // SUCCESS
8919
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8920
              {
5361 mandeep.dh 8921
                org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
8922
                this.success = new ArrayList<Long>(_list4.size);
8923
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
5110 mandeep.dh 8924
                {
5361 mandeep.dh 8925
                  long _elem6; // required
8926
                  _elem6 = iprot.readI64();
8927
                  this.success.add(_elem6);
5110 mandeep.dh 8928
                }
8929
                iprot.readListEnd();
8930
              }
8931
            } else { 
8932
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8933
            }
8934
            break;
8935
          default:
8936
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8937
        }
8938
        iprot.readFieldEnd();
8939
      }
8940
      iprot.readStructEnd();
8941
      validate();
8942
    }
8943
 
8944
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8945
      oprot.writeStructBegin(STRUCT_DESC);
8946
 
8947
      if (this.isSetSuccess()) {
8948
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8949
        {
8950
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.success.size()));
5361 mandeep.dh 8951
          for (long _iter7 : this.success)
5110 mandeep.dh 8952
          {
5361 mandeep.dh 8953
            oprot.writeI64(_iter7);
5110 mandeep.dh 8954
          }
8955
          oprot.writeListEnd();
8956
        }
8957
        oprot.writeFieldEnd();
8958
      }
8959
      oprot.writeFieldStop();
8960
      oprot.writeStructEnd();
8961
    }
8962
 
8963
    @Override
8964
    public String toString() {
8965
      StringBuilder sb = new StringBuilder("getItemIds_result(");
8966
      boolean first = true;
8967
 
8968
      sb.append("success:");
8969
      if (this.success == null) {
8970
        sb.append("null");
8971
      } else {
8972
        sb.append(this.success);
8973
      }
8974
      first = false;
8975
      sb.append(")");
8976
      return sb.toString();
8977
    }
8978
 
8979
    public void validate() throws org.apache.thrift.TException {
8980
      // check for required fields
8981
    }
8982
 
8983
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8984
      try {
8985
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8986
      } catch (org.apache.thrift.TException te) {
8987
        throw new java.io.IOException(te);
8988
      }
8989
    }
8990
 
8991
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8992
      try {
8993
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8994
      } catch (org.apache.thrift.TException te) {
8995
        throw new java.io.IOException(te);
8996
      }
8997
    }
8998
 
8999
  }
9000
 
5185 mandeep.dh 9001
  public static class getInventoryItemsFromLastScanType_args implements org.apache.thrift.TBase<getInventoryItemsFromLastScanType_args, getInventoryItemsFromLastScanType_args._Fields>, java.io.Serializable, Cloneable   {
9002
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemsFromLastScanType_args");
9003
 
9004
    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);
9005
 
9006
    private ScanType lastScanType; // required
9007
 
9008
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9009
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9010
      /**
9011
       * 
9012
       * @see ScanType
9013
       */
9014
      LAST_SCAN_TYPE((short)1, "lastScanType");
9015
 
9016
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9017
 
9018
      static {
9019
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9020
          byName.put(field.getFieldName(), field);
9021
        }
9022
      }
9023
 
9024
      /**
9025
       * Find the _Fields constant that matches fieldId, or null if its not found.
9026
       */
9027
      public static _Fields findByThriftId(int fieldId) {
9028
        switch(fieldId) {
9029
          case 1: // LAST_SCAN_TYPE
9030
            return LAST_SCAN_TYPE;
9031
          default:
9032
            return null;
9033
        }
9034
      }
9035
 
9036
      /**
9037
       * Find the _Fields constant that matches fieldId, throwing an exception
9038
       * if it is not found.
9039
       */
9040
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9041
        _Fields fields = findByThriftId(fieldId);
9042
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9043
        return fields;
9044
      }
9045
 
9046
      /**
9047
       * Find the _Fields constant that matches name, or null if its not found.
9048
       */
9049
      public static _Fields findByName(String name) {
9050
        return byName.get(name);
9051
      }
9052
 
9053
      private final short _thriftId;
9054
      private final String _fieldName;
9055
 
9056
      _Fields(short thriftId, String fieldName) {
9057
        _thriftId = thriftId;
9058
        _fieldName = fieldName;
9059
      }
9060
 
9061
      public short getThriftFieldId() {
9062
        return _thriftId;
9063
      }
9064
 
9065
      public String getFieldName() {
9066
        return _fieldName;
9067
      }
9068
    }
9069
 
9070
    // isset id assignments
9071
 
9072
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9073
    static {
9074
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9075
      tmpMap.put(_Fields.LAST_SCAN_TYPE, new org.apache.thrift.meta_data.FieldMetaData("lastScanType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9076
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
9077
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9078
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemsFromLastScanType_args.class, metaDataMap);
9079
    }
9080
 
9081
    public getInventoryItemsFromLastScanType_args() {
9082
    }
9083
 
9084
    public getInventoryItemsFromLastScanType_args(
9085
      ScanType lastScanType)
9086
    {
9087
      this();
9088
      this.lastScanType = lastScanType;
9089
    }
9090
 
9091
    /**
9092
     * Performs a deep copy on <i>other</i>.
9093
     */
9094
    public getInventoryItemsFromLastScanType_args(getInventoryItemsFromLastScanType_args other) {
9095
      if (other.isSetLastScanType()) {
9096
        this.lastScanType = other.lastScanType;
9097
      }
9098
    }
9099
 
9100
    public getInventoryItemsFromLastScanType_args deepCopy() {
9101
      return new getInventoryItemsFromLastScanType_args(this);
9102
    }
9103
 
9104
    @Override
9105
    public void clear() {
9106
      this.lastScanType = null;
9107
    }
9108
 
9109
    /**
9110
     * 
9111
     * @see ScanType
9112
     */
9113
    public ScanType getLastScanType() {
9114
      return this.lastScanType;
9115
    }
9116
 
9117
    /**
9118
     * 
9119
     * @see ScanType
9120
     */
9121
    public void setLastScanType(ScanType lastScanType) {
9122
      this.lastScanType = lastScanType;
9123
    }
9124
 
9125
    public void unsetLastScanType() {
9126
      this.lastScanType = null;
9127
    }
9128
 
9129
    /** Returns true if field lastScanType is set (has been assigned a value) and false otherwise */
9130
    public boolean isSetLastScanType() {
9131
      return this.lastScanType != null;
9132
    }
9133
 
9134
    public void setLastScanTypeIsSet(boolean value) {
9135
      if (!value) {
9136
        this.lastScanType = null;
9137
      }
9138
    }
9139
 
9140
    public void setFieldValue(_Fields field, Object value) {
9141
      switch (field) {
9142
      case LAST_SCAN_TYPE:
9143
        if (value == null) {
9144
          unsetLastScanType();
9145
        } else {
9146
          setLastScanType((ScanType)value);
9147
        }
9148
        break;
9149
 
9150
      }
9151
    }
9152
 
9153
    public Object getFieldValue(_Fields field) {
9154
      switch (field) {
9155
      case LAST_SCAN_TYPE:
9156
        return getLastScanType();
9157
 
9158
      }
9159
      throw new IllegalStateException();
9160
    }
9161
 
9162
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9163
    public boolean isSet(_Fields field) {
9164
      if (field == null) {
9165
        throw new IllegalArgumentException();
9166
      }
9167
 
9168
      switch (field) {
9169
      case LAST_SCAN_TYPE:
9170
        return isSetLastScanType();
9171
      }
9172
      throw new IllegalStateException();
9173
    }
9174
 
9175
    @Override
9176
    public boolean equals(Object that) {
9177
      if (that == null)
9178
        return false;
9179
      if (that instanceof getInventoryItemsFromLastScanType_args)
9180
        return this.equals((getInventoryItemsFromLastScanType_args)that);
9181
      return false;
9182
    }
9183
 
9184
    public boolean equals(getInventoryItemsFromLastScanType_args that) {
9185
      if (that == null)
9186
        return false;
9187
 
9188
      boolean this_present_lastScanType = true && this.isSetLastScanType();
9189
      boolean that_present_lastScanType = true && that.isSetLastScanType();
9190
      if (this_present_lastScanType || that_present_lastScanType) {
9191
        if (!(this_present_lastScanType && that_present_lastScanType))
9192
          return false;
9193
        if (!this.lastScanType.equals(that.lastScanType))
9194
          return false;
9195
      }
9196
 
9197
      return true;
9198
    }
9199
 
9200
    @Override
9201
    public int hashCode() {
9202
      return 0;
9203
    }
9204
 
9205
    public int compareTo(getInventoryItemsFromLastScanType_args other) {
9206
      if (!getClass().equals(other.getClass())) {
9207
        return getClass().getName().compareTo(other.getClass().getName());
9208
      }
9209
 
9210
      int lastComparison = 0;
9211
      getInventoryItemsFromLastScanType_args typedOther = (getInventoryItemsFromLastScanType_args)other;
9212
 
9213
      lastComparison = Boolean.valueOf(isSetLastScanType()).compareTo(typedOther.isSetLastScanType());
9214
      if (lastComparison != 0) {
9215
        return lastComparison;
9216
      }
9217
      if (isSetLastScanType()) {
9218
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastScanType, typedOther.lastScanType);
9219
        if (lastComparison != 0) {
9220
          return lastComparison;
9221
        }
9222
      }
9223
      return 0;
9224
    }
9225
 
9226
    public _Fields fieldForId(int fieldId) {
9227
      return _Fields.findByThriftId(fieldId);
9228
    }
9229
 
9230
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9231
      org.apache.thrift.protocol.TField field;
9232
      iprot.readStructBegin();
9233
      while (true)
9234
      {
9235
        field = iprot.readFieldBegin();
9236
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9237
          break;
9238
        }
9239
        switch (field.id) {
9240
          case 1: // LAST_SCAN_TYPE
9241
            if (field.type == org.apache.thrift.protocol.TType.I32) {
9242
              this.lastScanType = ScanType.findByValue(iprot.readI32());
9243
            } else { 
9244
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9245
            }
9246
            break;
9247
          default:
9248
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9249
        }
9250
        iprot.readFieldEnd();
9251
      }
9252
      iprot.readStructEnd();
9253
      validate();
9254
    }
9255
 
9256
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9257
      validate();
9258
 
9259
      oprot.writeStructBegin(STRUCT_DESC);
9260
      if (this.lastScanType != null) {
9261
        oprot.writeFieldBegin(LAST_SCAN_TYPE_FIELD_DESC);
9262
        oprot.writeI32(this.lastScanType.getValue());
9263
        oprot.writeFieldEnd();
9264
      }
9265
      oprot.writeFieldStop();
9266
      oprot.writeStructEnd();
9267
    }
9268
 
9269
    @Override
9270
    public String toString() {
9271
      StringBuilder sb = new StringBuilder("getInventoryItemsFromLastScanType_args(");
9272
      boolean first = true;
9273
 
9274
      sb.append("lastScanType:");
9275
      if (this.lastScanType == null) {
9276
        sb.append("null");
9277
      } else {
9278
        sb.append(this.lastScanType);
9279
      }
9280
      first = false;
9281
      sb.append(")");
9282
      return sb.toString();
9283
    }
9284
 
9285
    public void validate() throws org.apache.thrift.TException {
9286
      // check for required fields
9287
    }
9288
 
9289
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9290
      try {
9291
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9292
      } catch (org.apache.thrift.TException te) {
9293
        throw new java.io.IOException(te);
9294
      }
9295
    }
9296
 
9297
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9298
      try {
9299
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9300
      } catch (org.apache.thrift.TException te) {
9301
        throw new java.io.IOException(te);
9302
      }
9303
    }
9304
 
9305
  }
9306
 
9307
  public static class getInventoryItemsFromLastScanType_result implements org.apache.thrift.TBase<getInventoryItemsFromLastScanType_result, getInventoryItemsFromLastScanType_result._Fields>, java.io.Serializable, Cloneable   {
9308
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemsFromLastScanType_result");
9309
 
9310
    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);
9311
    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);
9312
 
9313
    private List<InventoryItem> success; // required
9314
    private WarehouseServiceException wex; // required
9315
 
9316
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9317
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9318
      SUCCESS((short)0, "success"),
9319
      WEX((short)1, "wex");
9320
 
9321
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9322
 
9323
      static {
9324
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9325
          byName.put(field.getFieldName(), field);
9326
        }
9327
      }
9328
 
9329
      /**
9330
       * Find the _Fields constant that matches fieldId, or null if its not found.
9331
       */
9332
      public static _Fields findByThriftId(int fieldId) {
9333
        switch(fieldId) {
9334
          case 0: // SUCCESS
9335
            return SUCCESS;
9336
          case 1: // WEX
9337
            return WEX;
9338
          default:
9339
            return null;
9340
        }
9341
      }
9342
 
9343
      /**
9344
       * Find the _Fields constant that matches fieldId, throwing an exception
9345
       * if it is not found.
9346
       */
9347
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9348
        _Fields fields = findByThriftId(fieldId);
9349
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9350
        return fields;
9351
      }
9352
 
9353
      /**
9354
       * Find the _Fields constant that matches name, or null if its not found.
9355
       */
9356
      public static _Fields findByName(String name) {
9357
        return byName.get(name);
9358
      }
9359
 
9360
      private final short _thriftId;
9361
      private final String _fieldName;
9362
 
9363
      _Fields(short thriftId, String fieldName) {
9364
        _thriftId = thriftId;
9365
        _fieldName = fieldName;
9366
      }
9367
 
9368
      public short getThriftFieldId() {
9369
        return _thriftId;
9370
      }
9371
 
9372
      public String getFieldName() {
9373
        return _fieldName;
9374
      }
9375
    }
9376
 
9377
    // isset id assignments
9378
 
9379
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9380
    static {
9381
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9382
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9383
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
9384
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class))));
9385
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9386
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9387
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9388
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemsFromLastScanType_result.class, metaDataMap);
9389
    }
9390
 
9391
    public getInventoryItemsFromLastScanType_result() {
9392
    }
9393
 
9394
    public getInventoryItemsFromLastScanType_result(
9395
      List<InventoryItem> success,
9396
      WarehouseServiceException wex)
9397
    {
9398
      this();
9399
      this.success = success;
9400
      this.wex = wex;
9401
    }
9402
 
9403
    /**
9404
     * Performs a deep copy on <i>other</i>.
9405
     */
9406
    public getInventoryItemsFromLastScanType_result(getInventoryItemsFromLastScanType_result other) {
9407
      if (other.isSetSuccess()) {
9408
        List<InventoryItem> __this__success = new ArrayList<InventoryItem>();
9409
        for (InventoryItem other_element : other.success) {
9410
          __this__success.add(new InventoryItem(other_element));
9411
        }
9412
        this.success = __this__success;
9413
      }
9414
      if (other.isSetWex()) {
9415
        this.wex = new WarehouseServiceException(other.wex);
9416
      }
9417
    }
9418
 
9419
    public getInventoryItemsFromLastScanType_result deepCopy() {
9420
      return new getInventoryItemsFromLastScanType_result(this);
9421
    }
9422
 
9423
    @Override
9424
    public void clear() {
9425
      this.success = null;
9426
      this.wex = null;
9427
    }
9428
 
9429
    public int getSuccessSize() {
9430
      return (this.success == null) ? 0 : this.success.size();
9431
    }
9432
 
9433
    public java.util.Iterator<InventoryItem> getSuccessIterator() {
9434
      return (this.success == null) ? null : this.success.iterator();
9435
    }
9436
 
9437
    public void addToSuccess(InventoryItem elem) {
9438
      if (this.success == null) {
9439
        this.success = new ArrayList<InventoryItem>();
9440
      }
9441
      this.success.add(elem);
9442
    }
9443
 
9444
    public List<InventoryItem> getSuccess() {
9445
      return this.success;
9446
    }
9447
 
9448
    public void setSuccess(List<InventoryItem> success) {
9449
      this.success = success;
9450
    }
9451
 
9452
    public void unsetSuccess() {
9453
      this.success = null;
9454
    }
9455
 
9456
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9457
    public boolean isSetSuccess() {
9458
      return this.success != null;
9459
    }
9460
 
9461
    public void setSuccessIsSet(boolean value) {
9462
      if (!value) {
9463
        this.success = null;
9464
      }
9465
    }
9466
 
9467
    public WarehouseServiceException getWex() {
9468
      return this.wex;
9469
    }
9470
 
9471
    public void setWex(WarehouseServiceException wex) {
9472
      this.wex = wex;
9473
    }
9474
 
9475
    public void unsetWex() {
9476
      this.wex = null;
9477
    }
9478
 
9479
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
9480
    public boolean isSetWex() {
9481
      return this.wex != null;
9482
    }
9483
 
9484
    public void setWexIsSet(boolean value) {
9485
      if (!value) {
9486
        this.wex = null;
9487
      }
9488
    }
9489
 
9490
    public void setFieldValue(_Fields field, Object value) {
9491
      switch (field) {
9492
      case SUCCESS:
9493
        if (value == null) {
9494
          unsetSuccess();
9495
        } else {
9496
          setSuccess((List<InventoryItem>)value);
9497
        }
9498
        break;
9499
 
9500
      case WEX:
9501
        if (value == null) {
9502
          unsetWex();
9503
        } else {
9504
          setWex((WarehouseServiceException)value);
9505
        }
9506
        break;
9507
 
9508
      }
9509
    }
9510
 
9511
    public Object getFieldValue(_Fields field) {
9512
      switch (field) {
9513
      case SUCCESS:
9514
        return getSuccess();
9515
 
9516
      case WEX:
9517
        return getWex();
9518
 
9519
      }
9520
      throw new IllegalStateException();
9521
    }
9522
 
9523
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9524
    public boolean isSet(_Fields field) {
9525
      if (field == null) {
9526
        throw new IllegalArgumentException();
9527
      }
9528
 
9529
      switch (field) {
9530
      case SUCCESS:
9531
        return isSetSuccess();
9532
      case WEX:
9533
        return isSetWex();
9534
      }
9535
      throw new IllegalStateException();
9536
    }
9537
 
9538
    @Override
9539
    public boolean equals(Object that) {
9540
      if (that == null)
9541
        return false;
9542
      if (that instanceof getInventoryItemsFromLastScanType_result)
9543
        return this.equals((getInventoryItemsFromLastScanType_result)that);
9544
      return false;
9545
    }
9546
 
9547
    public boolean equals(getInventoryItemsFromLastScanType_result that) {
9548
      if (that == null)
9549
        return false;
9550
 
9551
      boolean this_present_success = true && this.isSetSuccess();
9552
      boolean that_present_success = true && that.isSetSuccess();
9553
      if (this_present_success || that_present_success) {
9554
        if (!(this_present_success && that_present_success))
9555
          return false;
9556
        if (!this.success.equals(that.success))
9557
          return false;
9558
      }
9559
 
9560
      boolean this_present_wex = true && this.isSetWex();
9561
      boolean that_present_wex = true && that.isSetWex();
9562
      if (this_present_wex || that_present_wex) {
9563
        if (!(this_present_wex && that_present_wex))
9564
          return false;
9565
        if (!this.wex.equals(that.wex))
9566
          return false;
9567
      }
9568
 
9569
      return true;
9570
    }
9571
 
9572
    @Override
9573
    public int hashCode() {
9574
      return 0;
9575
    }
9576
 
9577
    public int compareTo(getInventoryItemsFromLastScanType_result other) {
9578
      if (!getClass().equals(other.getClass())) {
9579
        return getClass().getName().compareTo(other.getClass().getName());
9580
      }
9581
 
9582
      int lastComparison = 0;
9583
      getInventoryItemsFromLastScanType_result typedOther = (getInventoryItemsFromLastScanType_result)other;
9584
 
9585
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9586
      if (lastComparison != 0) {
9587
        return lastComparison;
9588
      }
9589
      if (isSetSuccess()) {
9590
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9591
        if (lastComparison != 0) {
9592
          return lastComparison;
9593
        }
9594
      }
9595
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
9596
      if (lastComparison != 0) {
9597
        return lastComparison;
9598
      }
9599
      if (isSetWex()) {
9600
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
9601
        if (lastComparison != 0) {
9602
          return lastComparison;
9603
        }
9604
      }
9605
      return 0;
9606
    }
9607
 
9608
    public _Fields fieldForId(int fieldId) {
9609
      return _Fields.findByThriftId(fieldId);
9610
    }
9611
 
9612
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9613
      org.apache.thrift.protocol.TField field;
9614
      iprot.readStructBegin();
9615
      while (true)
9616
      {
9617
        field = iprot.readFieldBegin();
9618
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9619
          break;
9620
        }
9621
        switch (field.id) {
9622
          case 0: // SUCCESS
9623
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
9624
              {
5361 mandeep.dh 9625
                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
9626
                this.success = new ArrayList<InventoryItem>(_list8.size);
9627
                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
5185 mandeep.dh 9628
                {
5361 mandeep.dh 9629
                  InventoryItem _elem10; // required
9630
                  _elem10 = new InventoryItem();
9631
                  _elem10.read(iprot);
9632
                  this.success.add(_elem10);
5185 mandeep.dh 9633
                }
9634
                iprot.readListEnd();
9635
              }
9636
            } else { 
9637
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9638
            }
9639
            break;
9640
          case 1: // WEX
9641
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9642
              this.wex = new WarehouseServiceException();
9643
              this.wex.read(iprot);
9644
            } else { 
9645
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9646
            }
9647
            break;
9648
          default:
9649
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9650
        }
9651
        iprot.readFieldEnd();
9652
      }
9653
      iprot.readStructEnd();
9654
      validate();
9655
    }
9656
 
9657
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9658
      oprot.writeStructBegin(STRUCT_DESC);
9659
 
9660
      if (this.isSetSuccess()) {
9661
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9662
        {
9663
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
5361 mandeep.dh 9664
          for (InventoryItem _iter11 : this.success)
5185 mandeep.dh 9665
          {
5361 mandeep.dh 9666
            _iter11.write(oprot);
5185 mandeep.dh 9667
          }
9668
          oprot.writeListEnd();
9669
        }
9670
        oprot.writeFieldEnd();
9671
      } else if (this.isSetWex()) {
9672
        oprot.writeFieldBegin(WEX_FIELD_DESC);
9673
        this.wex.write(oprot);
9674
        oprot.writeFieldEnd();
9675
      }
9676
      oprot.writeFieldStop();
9677
      oprot.writeStructEnd();
9678
    }
9679
 
9680
    @Override
9681
    public String toString() {
9682
      StringBuilder sb = new StringBuilder("getInventoryItemsFromLastScanType_result(");
9683
      boolean first = true;
9684
 
9685
      sb.append("success:");
9686
      if (this.success == null) {
9687
        sb.append("null");
9688
      } else {
9689
        sb.append(this.success);
9690
      }
9691
      first = false;
9692
      if (!first) sb.append(", ");
9693
      sb.append("wex:");
9694
      if (this.wex == null) {
9695
        sb.append("null");
9696
      } else {
9697
        sb.append(this.wex);
9698
      }
9699
      first = false;
9700
      sb.append(")");
9701
      return sb.toString();
9702
    }
9703
 
9704
    public void validate() throws org.apache.thrift.TException {
9705
      // check for required fields
9706
    }
9707
 
9708
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9709
      try {
9710
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9711
      } catch (org.apache.thrift.TException te) {
9712
        throw new java.io.IOException(te);
9713
      }
9714
    }
9715
 
9716
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9717
      try {
9718
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9719
      } catch (org.apache.thrift.TException te) {
9720
        throw new java.io.IOException(te);
9721
      }
9722
    }
9723
 
9724
  }
9725
 
9726
  public static class getInventoryItemFromId_args implements org.apache.thrift.TBase<getInventoryItemFromId_args, getInventoryItemFromId_args._Fields>, java.io.Serializable, Cloneable   {
9727
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromId_args");
9728
 
9729
    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);
9730
 
9731
    private long inventoryItemId; // required
9732
 
9733
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9734
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9735
      INVENTORY_ITEM_ID((short)1, "inventoryItemId");
9736
 
9737
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9738
 
9739
      static {
9740
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9741
          byName.put(field.getFieldName(), field);
9742
        }
9743
      }
9744
 
9745
      /**
9746
       * Find the _Fields constant that matches fieldId, or null if its not found.
9747
       */
9748
      public static _Fields findByThriftId(int fieldId) {
9749
        switch(fieldId) {
9750
          case 1: // INVENTORY_ITEM_ID
9751
            return INVENTORY_ITEM_ID;
9752
          default:
9753
            return null;
9754
        }
9755
      }
9756
 
9757
      /**
9758
       * Find the _Fields constant that matches fieldId, throwing an exception
9759
       * if it is not found.
9760
       */
9761
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9762
        _Fields fields = findByThriftId(fieldId);
9763
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9764
        return fields;
9765
      }
9766
 
9767
      /**
9768
       * Find the _Fields constant that matches name, or null if its not found.
9769
       */
9770
      public static _Fields findByName(String name) {
9771
        return byName.get(name);
9772
      }
9773
 
9774
      private final short _thriftId;
9775
      private final String _fieldName;
9776
 
9777
      _Fields(short thriftId, String fieldName) {
9778
        _thriftId = thriftId;
9779
        _fieldName = fieldName;
9780
      }
9781
 
9782
      public short getThriftFieldId() {
9783
        return _thriftId;
9784
      }
9785
 
9786
      public String getFieldName() {
9787
        return _fieldName;
9788
      }
9789
    }
9790
 
9791
    // isset id assignments
9792
    private static final int __INVENTORYITEMID_ISSET_ID = 0;
9793
    private BitSet __isset_bit_vector = new BitSet(1);
9794
 
9795
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9796
    static {
9797
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9798
      tmpMap.put(_Fields.INVENTORY_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("inventoryItemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9799
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9800
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9801
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromId_args.class, metaDataMap);
9802
    }
9803
 
9804
    public getInventoryItemFromId_args() {
9805
    }
9806
 
9807
    public getInventoryItemFromId_args(
9808
      long inventoryItemId)
9809
    {
9810
      this();
9811
      this.inventoryItemId = inventoryItemId;
9812
      setInventoryItemIdIsSet(true);
9813
    }
9814
 
9815
    /**
9816
     * Performs a deep copy on <i>other</i>.
9817
     */
9818
    public getInventoryItemFromId_args(getInventoryItemFromId_args other) {
9819
      __isset_bit_vector.clear();
9820
      __isset_bit_vector.or(other.__isset_bit_vector);
9821
      this.inventoryItemId = other.inventoryItemId;
9822
    }
9823
 
9824
    public getInventoryItemFromId_args deepCopy() {
9825
      return new getInventoryItemFromId_args(this);
9826
    }
9827
 
9828
    @Override
9829
    public void clear() {
9830
      setInventoryItemIdIsSet(false);
9831
      this.inventoryItemId = 0;
9832
    }
9833
 
9834
    public long getInventoryItemId() {
9835
      return this.inventoryItemId;
9836
    }
9837
 
9838
    public void setInventoryItemId(long inventoryItemId) {
9839
      this.inventoryItemId = inventoryItemId;
9840
      setInventoryItemIdIsSet(true);
9841
    }
9842
 
9843
    public void unsetInventoryItemId() {
9844
      __isset_bit_vector.clear(__INVENTORYITEMID_ISSET_ID);
9845
    }
9846
 
9847
    /** Returns true if field inventoryItemId is set (has been assigned a value) and false otherwise */
9848
    public boolean isSetInventoryItemId() {
9849
      return __isset_bit_vector.get(__INVENTORYITEMID_ISSET_ID);
9850
    }
9851
 
9852
    public void setInventoryItemIdIsSet(boolean value) {
9853
      __isset_bit_vector.set(__INVENTORYITEMID_ISSET_ID, value);
9854
    }
9855
 
9856
    public void setFieldValue(_Fields field, Object value) {
9857
      switch (field) {
9858
      case INVENTORY_ITEM_ID:
9859
        if (value == null) {
9860
          unsetInventoryItemId();
9861
        } else {
9862
          setInventoryItemId((Long)value);
9863
        }
9864
        break;
9865
 
9866
      }
9867
    }
9868
 
9869
    public Object getFieldValue(_Fields field) {
9870
      switch (field) {
9871
      case INVENTORY_ITEM_ID:
9872
        return Long.valueOf(getInventoryItemId());
9873
 
9874
      }
9875
      throw new IllegalStateException();
9876
    }
9877
 
9878
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9879
    public boolean isSet(_Fields field) {
9880
      if (field == null) {
9881
        throw new IllegalArgumentException();
9882
      }
9883
 
9884
      switch (field) {
9885
      case INVENTORY_ITEM_ID:
9886
        return isSetInventoryItemId();
9887
      }
9888
      throw new IllegalStateException();
9889
    }
9890
 
9891
    @Override
9892
    public boolean equals(Object that) {
9893
      if (that == null)
9894
        return false;
9895
      if (that instanceof getInventoryItemFromId_args)
9896
        return this.equals((getInventoryItemFromId_args)that);
9897
      return false;
9898
    }
9899
 
9900
    public boolean equals(getInventoryItemFromId_args that) {
9901
      if (that == null)
9902
        return false;
9903
 
9904
      boolean this_present_inventoryItemId = true;
9905
      boolean that_present_inventoryItemId = true;
9906
      if (this_present_inventoryItemId || that_present_inventoryItemId) {
9907
        if (!(this_present_inventoryItemId && that_present_inventoryItemId))
9908
          return false;
9909
        if (this.inventoryItemId != that.inventoryItemId)
9910
          return false;
9911
      }
9912
 
9913
      return true;
9914
    }
9915
 
9916
    @Override
9917
    public int hashCode() {
9918
      return 0;
9919
    }
9920
 
9921
    public int compareTo(getInventoryItemFromId_args other) {
9922
      if (!getClass().equals(other.getClass())) {
9923
        return getClass().getName().compareTo(other.getClass().getName());
9924
      }
9925
 
9926
      int lastComparison = 0;
9927
      getInventoryItemFromId_args typedOther = (getInventoryItemFromId_args)other;
9928
 
9929
      lastComparison = Boolean.valueOf(isSetInventoryItemId()).compareTo(typedOther.isSetInventoryItemId());
9930
      if (lastComparison != 0) {
9931
        return lastComparison;
9932
      }
9933
      if (isSetInventoryItemId()) {
9934
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItemId, typedOther.inventoryItemId);
9935
        if (lastComparison != 0) {
9936
          return lastComparison;
9937
        }
9938
      }
9939
      return 0;
9940
    }
9941
 
9942
    public _Fields fieldForId(int fieldId) {
9943
      return _Fields.findByThriftId(fieldId);
9944
    }
9945
 
9946
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9947
      org.apache.thrift.protocol.TField field;
9948
      iprot.readStructBegin();
9949
      while (true)
9950
      {
9951
        field = iprot.readFieldBegin();
9952
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9953
          break;
9954
        }
9955
        switch (field.id) {
9956
          case 1: // INVENTORY_ITEM_ID
9957
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9958
              this.inventoryItemId = iprot.readI64();
9959
              setInventoryItemIdIsSet(true);
9960
            } else { 
9961
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9962
            }
9963
            break;
9964
          default:
9965
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9966
        }
9967
        iprot.readFieldEnd();
9968
      }
9969
      iprot.readStructEnd();
9970
      validate();
9971
    }
9972
 
9973
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9974
      validate();
9975
 
9976
      oprot.writeStructBegin(STRUCT_DESC);
9977
      oprot.writeFieldBegin(INVENTORY_ITEM_ID_FIELD_DESC);
9978
      oprot.writeI64(this.inventoryItemId);
9979
      oprot.writeFieldEnd();
9980
      oprot.writeFieldStop();
9981
      oprot.writeStructEnd();
9982
    }
9983
 
9984
    @Override
9985
    public String toString() {
9986
      StringBuilder sb = new StringBuilder("getInventoryItemFromId_args(");
9987
      boolean first = true;
9988
 
9989
      sb.append("inventoryItemId:");
9990
      sb.append(this.inventoryItemId);
9991
      first = false;
9992
      sb.append(")");
9993
      return sb.toString();
9994
    }
9995
 
9996
    public void validate() throws org.apache.thrift.TException {
9997
      // check for required fields
9998
    }
9999
 
10000
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10001
      try {
10002
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10003
      } catch (org.apache.thrift.TException te) {
10004
        throw new java.io.IOException(te);
10005
      }
10006
    }
10007
 
10008
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10009
      try {
5372 mandeep.dh 10010
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
10011
        __isset_bit_vector = new BitSet(1);
5185 mandeep.dh 10012
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10013
      } catch (org.apache.thrift.TException te) {
10014
        throw new java.io.IOException(te);
10015
      }
10016
    }
10017
 
10018
  }
10019
 
10020
  public static class getInventoryItemFromId_result implements org.apache.thrift.TBase<getInventoryItemFromId_result, getInventoryItemFromId_result._Fields>, java.io.Serializable, Cloneable   {
10021
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromId_result");
10022
 
10023
    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);
10024
    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);
10025
 
10026
    private InventoryItem success; // required
10027
    private WarehouseServiceException wex; // required
10028
 
10029
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10030
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10031
      SUCCESS((short)0, "success"),
10032
      WEX((short)1, "wex");
10033
 
10034
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10035
 
10036
      static {
10037
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10038
          byName.put(field.getFieldName(), field);
10039
        }
10040
      }
10041
 
10042
      /**
10043
       * Find the _Fields constant that matches fieldId, or null if its not found.
10044
       */
10045
      public static _Fields findByThriftId(int fieldId) {
10046
        switch(fieldId) {
10047
          case 0: // SUCCESS
10048
            return SUCCESS;
10049
          case 1: // WEX
10050
            return WEX;
10051
          default:
10052
            return null;
10053
        }
10054
      }
10055
 
10056
      /**
10057
       * Find the _Fields constant that matches fieldId, throwing an exception
10058
       * if it is not found.
10059
       */
10060
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10061
        _Fields fields = findByThriftId(fieldId);
10062
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10063
        return fields;
10064
      }
10065
 
10066
      /**
10067
       * Find the _Fields constant that matches name, or null if its not found.
10068
       */
10069
      public static _Fields findByName(String name) {
10070
        return byName.get(name);
10071
      }
10072
 
10073
      private final short _thriftId;
10074
      private final String _fieldName;
10075
 
10076
      _Fields(short thriftId, String fieldName) {
10077
        _thriftId = thriftId;
10078
        _fieldName = fieldName;
10079
      }
10080
 
10081
      public short getThriftFieldId() {
10082
        return _thriftId;
10083
      }
10084
 
10085
      public String getFieldName() {
10086
        return _fieldName;
10087
      }
10088
    }
10089
 
10090
    // isset id assignments
10091
 
10092
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10093
    static {
10094
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10095
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10096
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
10097
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10098
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
10099
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10100
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromId_result.class, metaDataMap);
10101
    }
10102
 
10103
    public getInventoryItemFromId_result() {
10104
    }
10105
 
10106
    public getInventoryItemFromId_result(
10107
      InventoryItem success,
10108
      WarehouseServiceException wex)
10109
    {
10110
      this();
10111
      this.success = success;
10112
      this.wex = wex;
10113
    }
10114
 
10115
    /**
10116
     * Performs a deep copy on <i>other</i>.
10117
     */
10118
    public getInventoryItemFromId_result(getInventoryItemFromId_result other) {
10119
      if (other.isSetSuccess()) {
10120
        this.success = new InventoryItem(other.success);
10121
      }
10122
      if (other.isSetWex()) {
10123
        this.wex = new WarehouseServiceException(other.wex);
10124
      }
10125
    }
10126
 
10127
    public getInventoryItemFromId_result deepCopy() {
10128
      return new getInventoryItemFromId_result(this);
10129
    }
10130
 
10131
    @Override
10132
    public void clear() {
10133
      this.success = null;
10134
      this.wex = null;
10135
    }
10136
 
10137
    public InventoryItem getSuccess() {
10138
      return this.success;
10139
    }
10140
 
10141
    public void setSuccess(InventoryItem success) {
10142
      this.success = success;
10143
    }
10144
 
10145
    public void unsetSuccess() {
10146
      this.success = null;
10147
    }
10148
 
10149
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
10150
    public boolean isSetSuccess() {
10151
      return this.success != null;
10152
    }
10153
 
10154
    public void setSuccessIsSet(boolean value) {
10155
      if (!value) {
10156
        this.success = null;
10157
      }
10158
    }
10159
 
10160
    public WarehouseServiceException getWex() {
10161
      return this.wex;
10162
    }
10163
 
10164
    public void setWex(WarehouseServiceException wex) {
10165
      this.wex = wex;
10166
    }
10167
 
10168
    public void unsetWex() {
10169
      this.wex = null;
10170
    }
10171
 
10172
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
10173
    public boolean isSetWex() {
10174
      return this.wex != null;
10175
    }
10176
 
10177
    public void setWexIsSet(boolean value) {
10178
      if (!value) {
10179
        this.wex = null;
10180
      }
10181
    }
10182
 
10183
    public void setFieldValue(_Fields field, Object value) {
10184
      switch (field) {
10185
      case SUCCESS:
10186
        if (value == null) {
10187
          unsetSuccess();
10188
        } else {
10189
          setSuccess((InventoryItem)value);
10190
        }
10191
        break;
10192
 
10193
      case WEX:
10194
        if (value == null) {
10195
          unsetWex();
10196
        } else {
10197
          setWex((WarehouseServiceException)value);
10198
        }
10199
        break;
10200
 
10201
      }
10202
    }
10203
 
10204
    public Object getFieldValue(_Fields field) {
10205
      switch (field) {
10206
      case SUCCESS:
10207
        return getSuccess();
10208
 
10209
      case WEX:
10210
        return getWex();
10211
 
10212
      }
10213
      throw new IllegalStateException();
10214
    }
10215
 
10216
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10217
    public boolean isSet(_Fields field) {
10218
      if (field == null) {
10219
        throw new IllegalArgumentException();
10220
      }
10221
 
10222
      switch (field) {
10223
      case SUCCESS:
10224
        return isSetSuccess();
10225
      case WEX:
10226
        return isSetWex();
10227
      }
10228
      throw new IllegalStateException();
10229
    }
10230
 
10231
    @Override
10232
    public boolean equals(Object that) {
10233
      if (that == null)
10234
        return false;
10235
      if (that instanceof getInventoryItemFromId_result)
10236
        return this.equals((getInventoryItemFromId_result)that);
10237
      return false;
10238
    }
10239
 
10240
    public boolean equals(getInventoryItemFromId_result that) {
10241
      if (that == null)
10242
        return false;
10243
 
10244
      boolean this_present_success = true && this.isSetSuccess();
10245
      boolean that_present_success = true && that.isSetSuccess();
10246
      if (this_present_success || that_present_success) {
10247
        if (!(this_present_success && that_present_success))
10248
          return false;
10249
        if (!this.success.equals(that.success))
10250
          return false;
10251
      }
10252
 
10253
      boolean this_present_wex = true && this.isSetWex();
10254
      boolean that_present_wex = true && that.isSetWex();
10255
      if (this_present_wex || that_present_wex) {
10256
        if (!(this_present_wex && that_present_wex))
10257
          return false;
10258
        if (!this.wex.equals(that.wex))
10259
          return false;
10260
      }
10261
 
10262
      return true;
10263
    }
10264
 
10265
    @Override
10266
    public int hashCode() {
10267
      return 0;
10268
    }
10269
 
10270
    public int compareTo(getInventoryItemFromId_result other) {
10271
      if (!getClass().equals(other.getClass())) {
10272
        return getClass().getName().compareTo(other.getClass().getName());
10273
      }
10274
 
10275
      int lastComparison = 0;
10276
      getInventoryItemFromId_result typedOther = (getInventoryItemFromId_result)other;
10277
 
10278
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
10279
      if (lastComparison != 0) {
10280
        return lastComparison;
10281
      }
10282
      if (isSetSuccess()) {
10283
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
10284
        if (lastComparison != 0) {
10285
          return lastComparison;
10286
        }
10287
      }
10288
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
10289
      if (lastComparison != 0) {
10290
        return lastComparison;
10291
      }
10292
      if (isSetWex()) {
10293
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
10294
        if (lastComparison != 0) {
10295
          return lastComparison;
10296
        }
10297
      }
10298
      return 0;
10299
    }
10300
 
10301
    public _Fields fieldForId(int fieldId) {
10302
      return _Fields.findByThriftId(fieldId);
10303
    }
10304
 
10305
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10306
      org.apache.thrift.protocol.TField field;
10307
      iprot.readStructBegin();
10308
      while (true)
10309
      {
10310
        field = iprot.readFieldBegin();
10311
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10312
          break;
10313
        }
10314
        switch (field.id) {
10315
          case 0: // SUCCESS
10316
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10317
              this.success = new InventoryItem();
10318
              this.success.read(iprot);
10319
            } else { 
10320
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10321
            }
10322
            break;
10323
          case 1: // WEX
10324
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10325
              this.wex = new WarehouseServiceException();
10326
              this.wex.read(iprot);
10327
            } else { 
10328
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10329
            }
10330
            break;
10331
          default:
10332
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10333
        }
10334
        iprot.readFieldEnd();
10335
      }
10336
      iprot.readStructEnd();
10337
      validate();
10338
    }
10339
 
10340
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10341
      oprot.writeStructBegin(STRUCT_DESC);
10342
 
10343
      if (this.isSetSuccess()) {
10344
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10345
        this.success.write(oprot);
10346
        oprot.writeFieldEnd();
10347
      } else if (this.isSetWex()) {
10348
        oprot.writeFieldBegin(WEX_FIELD_DESC);
10349
        this.wex.write(oprot);
10350
        oprot.writeFieldEnd();
10351
      }
10352
      oprot.writeFieldStop();
10353
      oprot.writeStructEnd();
10354
    }
10355
 
10356
    @Override
10357
    public String toString() {
10358
      StringBuilder sb = new StringBuilder("getInventoryItemFromId_result(");
10359
      boolean first = true;
10360
 
10361
      sb.append("success:");
10362
      if (this.success == null) {
10363
        sb.append("null");
10364
      } else {
10365
        sb.append(this.success);
10366
      }
10367
      first = false;
10368
      if (!first) sb.append(", ");
10369
      sb.append("wex:");
10370
      if (this.wex == null) {
10371
        sb.append("null");
10372
      } else {
10373
        sb.append(this.wex);
10374
      }
10375
      first = false;
10376
      sb.append(")");
10377
      return sb.toString();
10378
    }
10379
 
10380
    public void validate() throws org.apache.thrift.TException {
10381
      // check for required fields
10382
    }
10383
 
10384
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10385
      try {
10386
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10387
      } catch (org.apache.thrift.TException te) {
10388
        throw new java.io.IOException(te);
10389
      }
10390
    }
10391
 
10392
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10393
      try {
10394
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10395
      } catch (org.apache.thrift.TException te) {
10396
        throw new java.io.IOException(te);
10397
      }
10398
    }
10399
 
10400
  }
10401
 
5372 mandeep.dh 10402
  public static class getPurchaseScans_args implements org.apache.thrift.TBase<getPurchaseScans_args, getPurchaseScans_args._Fields>, java.io.Serializable, Cloneable   {
10403
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseScans_args");
10404
 
10405
    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);
10406
    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);
10407
 
10408
    private long startDate; // required
10409
    private long endDate; // required
10410
 
10411
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10412
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10413
      START_DATE((short)1, "startDate"),
10414
      END_DATE((short)2, "endDate");
10415
 
10416
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10417
 
10418
      static {
10419
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10420
          byName.put(field.getFieldName(), field);
10421
        }
10422
      }
10423
 
10424
      /**
10425
       * Find the _Fields constant that matches fieldId, or null if its not found.
10426
       */
10427
      public static _Fields findByThriftId(int fieldId) {
10428
        switch(fieldId) {
10429
          case 1: // START_DATE
10430
            return START_DATE;
10431
          case 2: // END_DATE
10432
            return END_DATE;
10433
          default:
10434
            return null;
10435
        }
10436
      }
10437
 
10438
      /**
10439
       * Find the _Fields constant that matches fieldId, throwing an exception
10440
       * if it is not found.
10441
       */
10442
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10443
        _Fields fields = findByThriftId(fieldId);
10444
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10445
        return fields;
10446
      }
10447
 
10448
      /**
10449
       * Find the _Fields constant that matches name, or null if its not found.
10450
       */
10451
      public static _Fields findByName(String name) {
10452
        return byName.get(name);
10453
      }
10454
 
10455
      private final short _thriftId;
10456
      private final String _fieldName;
10457
 
10458
      _Fields(short thriftId, String fieldName) {
10459
        _thriftId = thriftId;
10460
        _fieldName = fieldName;
10461
      }
10462
 
10463
      public short getThriftFieldId() {
10464
        return _thriftId;
10465
      }
10466
 
10467
      public String getFieldName() {
10468
        return _fieldName;
10469
      }
10470
    }
10471
 
10472
    // isset id assignments
10473
    private static final int __STARTDATE_ISSET_ID = 0;
10474
    private static final int __ENDDATE_ISSET_ID = 1;
10475
    private BitSet __isset_bit_vector = new BitSet(2);
10476
 
10477
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10478
    static {
10479
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10480
      tmpMap.put(_Fields.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10481
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10482
      tmpMap.put(_Fields.END_DATE, new org.apache.thrift.meta_data.FieldMetaData("endDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10483
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10484
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10485
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseScans_args.class, metaDataMap);
10486
    }
10487
 
10488
    public getPurchaseScans_args() {
10489
    }
10490
 
10491
    public getPurchaseScans_args(
10492
      long startDate,
10493
      long endDate)
10494
    {
10495
      this();
10496
      this.startDate = startDate;
10497
      setStartDateIsSet(true);
10498
      this.endDate = endDate;
10499
      setEndDateIsSet(true);
10500
    }
10501
 
10502
    /**
10503
     * Performs a deep copy on <i>other</i>.
10504
     */
10505
    public getPurchaseScans_args(getPurchaseScans_args other) {
10506
      __isset_bit_vector.clear();
10507
      __isset_bit_vector.or(other.__isset_bit_vector);
10508
      this.startDate = other.startDate;
10509
      this.endDate = other.endDate;
10510
    }
10511
 
10512
    public getPurchaseScans_args deepCopy() {
10513
      return new getPurchaseScans_args(this);
10514
    }
10515
 
10516
    @Override
10517
    public void clear() {
10518
      setStartDateIsSet(false);
10519
      this.startDate = 0;
10520
      setEndDateIsSet(false);
10521
      this.endDate = 0;
10522
    }
10523
 
10524
    public long getStartDate() {
10525
      return this.startDate;
10526
    }
10527
 
10528
    public void setStartDate(long startDate) {
10529
      this.startDate = startDate;
10530
      setStartDateIsSet(true);
10531
    }
10532
 
10533
    public void unsetStartDate() {
10534
      __isset_bit_vector.clear(__STARTDATE_ISSET_ID);
10535
    }
10536
 
10537
    /** Returns true if field startDate is set (has been assigned a value) and false otherwise */
10538
    public boolean isSetStartDate() {
10539
      return __isset_bit_vector.get(__STARTDATE_ISSET_ID);
10540
    }
10541
 
10542
    public void setStartDateIsSet(boolean value) {
10543
      __isset_bit_vector.set(__STARTDATE_ISSET_ID, value);
10544
    }
10545
 
10546
    public long getEndDate() {
10547
      return this.endDate;
10548
    }
10549
 
10550
    public void setEndDate(long endDate) {
10551
      this.endDate = endDate;
10552
      setEndDateIsSet(true);
10553
    }
10554
 
10555
    public void unsetEndDate() {
10556
      __isset_bit_vector.clear(__ENDDATE_ISSET_ID);
10557
    }
10558
 
10559
    /** Returns true if field endDate is set (has been assigned a value) and false otherwise */
10560
    public boolean isSetEndDate() {
10561
      return __isset_bit_vector.get(__ENDDATE_ISSET_ID);
10562
    }
10563
 
10564
    public void setEndDateIsSet(boolean value) {
10565
      __isset_bit_vector.set(__ENDDATE_ISSET_ID, value);
10566
    }
10567
 
10568
    public void setFieldValue(_Fields field, Object value) {
10569
      switch (field) {
10570
      case START_DATE:
10571
        if (value == null) {
10572
          unsetStartDate();
10573
        } else {
10574
          setStartDate((Long)value);
10575
        }
10576
        break;
10577
 
10578
      case END_DATE:
10579
        if (value == null) {
10580
          unsetEndDate();
10581
        } else {
10582
          setEndDate((Long)value);
10583
        }
10584
        break;
10585
 
10586
      }
10587
    }
10588
 
10589
    public Object getFieldValue(_Fields field) {
10590
      switch (field) {
10591
      case START_DATE:
10592
        return Long.valueOf(getStartDate());
10593
 
10594
      case END_DATE:
10595
        return Long.valueOf(getEndDate());
10596
 
10597
      }
10598
      throw new IllegalStateException();
10599
    }
10600
 
10601
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10602
    public boolean isSet(_Fields field) {
10603
      if (field == null) {
10604
        throw new IllegalArgumentException();
10605
      }
10606
 
10607
      switch (field) {
10608
      case START_DATE:
10609
        return isSetStartDate();
10610
      case END_DATE:
10611
        return isSetEndDate();
10612
      }
10613
      throw new IllegalStateException();
10614
    }
10615
 
10616
    @Override
10617
    public boolean equals(Object that) {
10618
      if (that == null)
10619
        return false;
10620
      if (that instanceof getPurchaseScans_args)
10621
        return this.equals((getPurchaseScans_args)that);
10622
      return false;
10623
    }
10624
 
10625
    public boolean equals(getPurchaseScans_args that) {
10626
      if (that == null)
10627
        return false;
10628
 
10629
      boolean this_present_startDate = true;
10630
      boolean that_present_startDate = true;
10631
      if (this_present_startDate || that_present_startDate) {
10632
        if (!(this_present_startDate && that_present_startDate))
10633
          return false;
10634
        if (this.startDate != that.startDate)
10635
          return false;
10636
      }
10637
 
10638
      boolean this_present_endDate = true;
10639
      boolean that_present_endDate = true;
10640
      if (this_present_endDate || that_present_endDate) {
10641
        if (!(this_present_endDate && that_present_endDate))
10642
          return false;
10643
        if (this.endDate != that.endDate)
10644
          return false;
10645
      }
10646
 
10647
      return true;
10648
    }
10649
 
10650
    @Override
10651
    public int hashCode() {
10652
      return 0;
10653
    }
10654
 
10655
    public int compareTo(getPurchaseScans_args other) {
10656
      if (!getClass().equals(other.getClass())) {
10657
        return getClass().getName().compareTo(other.getClass().getName());
10658
      }
10659
 
10660
      int lastComparison = 0;
10661
      getPurchaseScans_args typedOther = (getPurchaseScans_args)other;
10662
 
10663
      lastComparison = Boolean.valueOf(isSetStartDate()).compareTo(typedOther.isSetStartDate());
10664
      if (lastComparison != 0) {
10665
        return lastComparison;
10666
      }
10667
      if (isSetStartDate()) {
10668
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startDate, typedOther.startDate);
10669
        if (lastComparison != 0) {
10670
          return lastComparison;
10671
        }
10672
      }
10673
      lastComparison = Boolean.valueOf(isSetEndDate()).compareTo(typedOther.isSetEndDate());
10674
      if (lastComparison != 0) {
10675
        return lastComparison;
10676
      }
10677
      if (isSetEndDate()) {
10678
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endDate, typedOther.endDate);
10679
        if (lastComparison != 0) {
10680
          return lastComparison;
10681
        }
10682
      }
10683
      return 0;
10684
    }
10685
 
10686
    public _Fields fieldForId(int fieldId) {
10687
      return _Fields.findByThriftId(fieldId);
10688
    }
10689
 
10690
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10691
      org.apache.thrift.protocol.TField field;
10692
      iprot.readStructBegin();
10693
      while (true)
10694
      {
10695
        field = iprot.readFieldBegin();
10696
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10697
          break;
10698
        }
10699
        switch (field.id) {
10700
          case 1: // START_DATE
10701
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10702
              this.startDate = iprot.readI64();
10703
              setStartDateIsSet(true);
10704
            } else { 
10705
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10706
            }
10707
            break;
10708
          case 2: // END_DATE
10709
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10710
              this.endDate = iprot.readI64();
10711
              setEndDateIsSet(true);
10712
            } else { 
10713
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10714
            }
10715
            break;
10716
          default:
10717
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10718
        }
10719
        iprot.readFieldEnd();
10720
      }
10721
      iprot.readStructEnd();
10722
      validate();
10723
    }
10724
 
10725
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10726
      validate();
10727
 
10728
      oprot.writeStructBegin(STRUCT_DESC);
10729
      oprot.writeFieldBegin(START_DATE_FIELD_DESC);
10730
      oprot.writeI64(this.startDate);
10731
      oprot.writeFieldEnd();
10732
      oprot.writeFieldBegin(END_DATE_FIELD_DESC);
10733
      oprot.writeI64(this.endDate);
10734
      oprot.writeFieldEnd();
10735
      oprot.writeFieldStop();
10736
      oprot.writeStructEnd();
10737
    }
10738
 
10739
    @Override
10740
    public String toString() {
10741
      StringBuilder sb = new StringBuilder("getPurchaseScans_args(");
10742
      boolean first = true;
10743
 
10744
      sb.append("startDate:");
10745
      sb.append(this.startDate);
10746
      first = false;
10747
      if (!first) sb.append(", ");
10748
      sb.append("endDate:");
10749
      sb.append(this.endDate);
10750
      first = false;
10751
      sb.append(")");
10752
      return sb.toString();
10753
    }
10754
 
10755
    public void validate() throws org.apache.thrift.TException {
10756
      // check for required fields
10757
    }
10758
 
10759
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10760
      try {
10761
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10762
      } catch (org.apache.thrift.TException te) {
10763
        throw new java.io.IOException(te);
10764
      }
10765
    }
10766
 
10767
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10768
      try {
10769
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
10770
        __isset_bit_vector = new BitSet(1);
10771
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10772
      } catch (org.apache.thrift.TException te) {
10773
        throw new java.io.IOException(te);
10774
      }
10775
    }
10776
 
10777
  }
10778
 
10779
  public static class getPurchaseScans_result implements org.apache.thrift.TBase<getPurchaseScans_result, getPurchaseScans_result._Fields>, java.io.Serializable, Cloneable   {
10780
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseScans_result");
10781
 
10782
    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);
10783
 
10784
    private List<DetailedPurchaseScan> success; // required
10785
 
10786
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10787
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10788
      SUCCESS((short)0, "success");
10789
 
10790
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10791
 
10792
      static {
10793
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10794
          byName.put(field.getFieldName(), field);
10795
        }
10796
      }
10797
 
10798
      /**
10799
       * Find the _Fields constant that matches fieldId, or null if its not found.
10800
       */
10801
      public static _Fields findByThriftId(int fieldId) {
10802
        switch(fieldId) {
10803
          case 0: // SUCCESS
10804
            return SUCCESS;
10805
          default:
10806
            return null;
10807
        }
10808
      }
10809
 
10810
      /**
10811
       * Find the _Fields constant that matches fieldId, throwing an exception
10812
       * if it is not found.
10813
       */
10814
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10815
        _Fields fields = findByThriftId(fieldId);
10816
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10817
        return fields;
10818
      }
10819
 
10820
      /**
10821
       * Find the _Fields constant that matches name, or null if its not found.
10822
       */
10823
      public static _Fields findByName(String name) {
10824
        return byName.get(name);
10825
      }
10826
 
10827
      private final short _thriftId;
10828
      private final String _fieldName;
10829
 
10830
      _Fields(short thriftId, String fieldName) {
10831
        _thriftId = thriftId;
10832
        _fieldName = fieldName;
10833
      }
10834
 
10835
      public short getThriftFieldId() {
10836
        return _thriftId;
10837
      }
10838
 
10839
      public String getFieldName() {
10840
        return _fieldName;
10841
      }
10842
    }
10843
 
10844
    // isset id assignments
10845
 
10846
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10847
    static {
10848
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10849
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10850
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
10851
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DetailedPurchaseScan.class))));
10852
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10853
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseScans_result.class, metaDataMap);
10854
    }
10855
 
10856
    public getPurchaseScans_result() {
10857
    }
10858
 
10859
    public getPurchaseScans_result(
10860
      List<DetailedPurchaseScan> success)
10861
    {
10862
      this();
10863
      this.success = success;
10864
    }
10865
 
10866
    /**
10867
     * Performs a deep copy on <i>other</i>.
10868
     */
10869
    public getPurchaseScans_result(getPurchaseScans_result other) {
10870
      if (other.isSetSuccess()) {
10871
        List<DetailedPurchaseScan> __this__success = new ArrayList<DetailedPurchaseScan>();
10872
        for (DetailedPurchaseScan other_element : other.success) {
10873
          __this__success.add(new DetailedPurchaseScan(other_element));
10874
        }
10875
        this.success = __this__success;
10876
      }
10877
    }
10878
 
10879
    public getPurchaseScans_result deepCopy() {
10880
      return new getPurchaseScans_result(this);
10881
    }
10882
 
10883
    @Override
10884
    public void clear() {
10885
      this.success = null;
10886
    }
10887
 
10888
    public int getSuccessSize() {
10889
      return (this.success == null) ? 0 : this.success.size();
10890
    }
10891
 
10892
    public java.util.Iterator<DetailedPurchaseScan> getSuccessIterator() {
10893
      return (this.success == null) ? null : this.success.iterator();
10894
    }
10895
 
10896
    public void addToSuccess(DetailedPurchaseScan elem) {
10897
      if (this.success == null) {
10898
        this.success = new ArrayList<DetailedPurchaseScan>();
10899
      }
10900
      this.success.add(elem);
10901
    }
10902
 
10903
    public List<DetailedPurchaseScan> getSuccess() {
10904
      return this.success;
10905
    }
10906
 
10907
    public void setSuccess(List<DetailedPurchaseScan> success) {
10908
      this.success = success;
10909
    }
10910
 
10911
    public void unsetSuccess() {
10912
      this.success = null;
10913
    }
10914
 
10915
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
10916
    public boolean isSetSuccess() {
10917
      return this.success != null;
10918
    }
10919
 
10920
    public void setSuccessIsSet(boolean value) {
10921
      if (!value) {
10922
        this.success = null;
10923
      }
10924
    }
10925
 
10926
    public void setFieldValue(_Fields field, Object value) {
10927
      switch (field) {
10928
      case SUCCESS:
10929
        if (value == null) {
10930
          unsetSuccess();
10931
        } else {
10932
          setSuccess((List<DetailedPurchaseScan>)value);
10933
        }
10934
        break;
10935
 
10936
      }
10937
    }
10938
 
10939
    public Object getFieldValue(_Fields field) {
10940
      switch (field) {
10941
      case SUCCESS:
10942
        return getSuccess();
10943
 
10944
      }
10945
      throw new IllegalStateException();
10946
    }
10947
 
10948
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10949
    public boolean isSet(_Fields field) {
10950
      if (field == null) {
10951
        throw new IllegalArgumentException();
10952
      }
10953
 
10954
      switch (field) {
10955
      case SUCCESS:
10956
        return isSetSuccess();
10957
      }
10958
      throw new IllegalStateException();
10959
    }
10960
 
10961
    @Override
10962
    public boolean equals(Object that) {
10963
      if (that == null)
10964
        return false;
10965
      if (that instanceof getPurchaseScans_result)
10966
        return this.equals((getPurchaseScans_result)that);
10967
      return false;
10968
    }
10969
 
10970
    public boolean equals(getPurchaseScans_result that) {
10971
      if (that == null)
10972
        return false;
10973
 
10974
      boolean this_present_success = true && this.isSetSuccess();
10975
      boolean that_present_success = true && that.isSetSuccess();
10976
      if (this_present_success || that_present_success) {
10977
        if (!(this_present_success && that_present_success))
10978
          return false;
10979
        if (!this.success.equals(that.success))
10980
          return false;
10981
      }
10982
 
10983
      return true;
10984
    }
10985
 
10986
    @Override
10987
    public int hashCode() {
10988
      return 0;
10989
    }
10990
 
10991
    public int compareTo(getPurchaseScans_result other) {
10992
      if (!getClass().equals(other.getClass())) {
10993
        return getClass().getName().compareTo(other.getClass().getName());
10994
      }
10995
 
10996
      int lastComparison = 0;
10997
      getPurchaseScans_result typedOther = (getPurchaseScans_result)other;
10998
 
10999
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
11000
      if (lastComparison != 0) {
11001
        return lastComparison;
11002
      }
11003
      if (isSetSuccess()) {
11004
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
11005
        if (lastComparison != 0) {
11006
          return lastComparison;
11007
        }
11008
      }
11009
      return 0;
11010
    }
11011
 
11012
    public _Fields fieldForId(int fieldId) {
11013
      return _Fields.findByThriftId(fieldId);
11014
    }
11015
 
11016
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11017
      org.apache.thrift.protocol.TField field;
11018
      iprot.readStructBegin();
11019
      while (true)
11020
      {
11021
        field = iprot.readFieldBegin();
11022
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11023
          break;
11024
        }
11025
        switch (field.id) {
11026
          case 0: // SUCCESS
11027
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
11028
              {
11029
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
11030
                this.success = new ArrayList<DetailedPurchaseScan>(_list12.size);
11031
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
11032
                {
11033
                  DetailedPurchaseScan _elem14; // required
11034
                  _elem14 = new DetailedPurchaseScan();
11035
                  _elem14.read(iprot);
11036
                  this.success.add(_elem14);
11037
                }
11038
                iprot.readListEnd();
11039
              }
11040
            } else { 
11041
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11042
            }
11043
            break;
11044
          default:
11045
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11046
        }
11047
        iprot.readFieldEnd();
11048
      }
11049
      iprot.readStructEnd();
11050
      validate();
11051
    }
11052
 
11053
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11054
      oprot.writeStructBegin(STRUCT_DESC);
11055
 
11056
      if (this.isSetSuccess()) {
11057
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11058
        {
11059
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
11060
          for (DetailedPurchaseScan _iter15 : this.success)
11061
          {
11062
            _iter15.write(oprot);
11063
          }
11064
          oprot.writeListEnd();
11065
        }
11066
        oprot.writeFieldEnd();
11067
      }
11068
      oprot.writeFieldStop();
11069
      oprot.writeStructEnd();
11070
    }
11071
 
11072
    @Override
11073
    public String toString() {
11074
      StringBuilder sb = new StringBuilder("getPurchaseScans_result(");
11075
      boolean first = true;
11076
 
11077
      sb.append("success:");
11078
      if (this.success == null) {
11079
        sb.append("null");
11080
      } else {
11081
        sb.append(this.success);
11082
      }
11083
      first = false;
11084
      sb.append(")");
11085
      return sb.toString();
11086
    }
11087
 
11088
    public void validate() throws org.apache.thrift.TException {
11089
      // check for required fields
11090
    }
11091
 
11092
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11093
      try {
11094
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11095
      } catch (org.apache.thrift.TException te) {
11096
        throw new java.io.IOException(te);
11097
      }
11098
    }
11099
 
11100
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11101
      try {
11102
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11103
      } catch (org.apache.thrift.TException te) {
11104
        throw new java.io.IOException(te);
11105
      }
11106
    }
11107
 
11108
  }
11109
 
5496 mandeep.dh 11110
  public static class fetchScansPerInvoiceNumber_args implements org.apache.thrift.TBase<fetchScansPerInvoiceNumber_args, fetchScansPerInvoiceNumber_args._Fields>, java.io.Serializable, Cloneable   {
11111
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchScansPerInvoiceNumber_args");
11112
 
11113
    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);
11114
 
11115
    private long date; // required
11116
 
11117
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11118
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11119
      DATE((short)1, "date");
11120
 
11121
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11122
 
11123
      static {
11124
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11125
          byName.put(field.getFieldName(), field);
11126
        }
11127
      }
11128
 
11129
      /**
11130
       * Find the _Fields constant that matches fieldId, or null if its not found.
11131
       */
11132
      public static _Fields findByThriftId(int fieldId) {
11133
        switch(fieldId) {
11134
          case 1: // DATE
11135
            return DATE;
11136
          default:
11137
            return null;
11138
        }
11139
      }
11140
 
11141
      /**
11142
       * Find the _Fields constant that matches fieldId, throwing an exception
11143
       * if it is not found.
11144
       */
11145
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11146
        _Fields fields = findByThriftId(fieldId);
11147
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11148
        return fields;
11149
      }
11150
 
11151
      /**
11152
       * Find the _Fields constant that matches name, or null if its not found.
11153
       */
11154
      public static _Fields findByName(String name) {
11155
        return byName.get(name);
11156
      }
11157
 
11158
      private final short _thriftId;
11159
      private final String _fieldName;
11160
 
11161
      _Fields(short thriftId, String fieldName) {
11162
        _thriftId = thriftId;
11163
        _fieldName = fieldName;
11164
      }
11165
 
11166
      public short getThriftFieldId() {
11167
        return _thriftId;
11168
      }
11169
 
11170
      public String getFieldName() {
11171
        return _fieldName;
11172
      }
11173
    }
11174
 
11175
    // isset id assignments
11176
    private static final int __DATE_ISSET_ID = 0;
11177
    private BitSet __isset_bit_vector = new BitSet(1);
11178
 
11179
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11180
    static {
11181
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11182
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11183
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11184
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11185
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchScansPerInvoiceNumber_args.class, metaDataMap);
11186
    }
11187
 
11188
    public fetchScansPerInvoiceNumber_args() {
11189
    }
11190
 
11191
    public fetchScansPerInvoiceNumber_args(
11192
      long date)
11193
    {
11194
      this();
11195
      this.date = date;
11196
      setDateIsSet(true);
11197
    }
11198
 
11199
    /**
11200
     * Performs a deep copy on <i>other</i>.
11201
     */
11202
    public fetchScansPerInvoiceNumber_args(fetchScansPerInvoiceNumber_args other) {
11203
      __isset_bit_vector.clear();
11204
      __isset_bit_vector.or(other.__isset_bit_vector);
11205
      this.date = other.date;
11206
    }
11207
 
11208
    public fetchScansPerInvoiceNumber_args deepCopy() {
11209
      return new fetchScansPerInvoiceNumber_args(this);
11210
    }
11211
 
11212
    @Override
11213
    public void clear() {
11214
      setDateIsSet(false);
11215
      this.date = 0;
11216
    }
11217
 
11218
    public long getDate() {
11219
      return this.date;
11220
    }
11221
 
11222
    public void setDate(long date) {
11223
      this.date = date;
11224
      setDateIsSet(true);
11225
    }
11226
 
11227
    public void unsetDate() {
11228
      __isset_bit_vector.clear(__DATE_ISSET_ID);
11229
    }
11230
 
11231
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
11232
    public boolean isSetDate() {
11233
      return __isset_bit_vector.get(__DATE_ISSET_ID);
11234
    }
11235
 
11236
    public void setDateIsSet(boolean value) {
11237
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
11238
    }
11239
 
11240
    public void setFieldValue(_Fields field, Object value) {
11241
      switch (field) {
11242
      case DATE:
11243
        if (value == null) {
11244
          unsetDate();
11245
        } else {
11246
          setDate((Long)value);
11247
        }
11248
        break;
11249
 
11250
      }
11251
    }
11252
 
11253
    public Object getFieldValue(_Fields field) {
11254
      switch (field) {
11255
      case DATE:
11256
        return Long.valueOf(getDate());
11257
 
11258
      }
11259
      throw new IllegalStateException();
11260
    }
11261
 
11262
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11263
    public boolean isSet(_Fields field) {
11264
      if (field == null) {
11265
        throw new IllegalArgumentException();
11266
      }
11267
 
11268
      switch (field) {
11269
      case DATE:
11270
        return isSetDate();
11271
      }
11272
      throw new IllegalStateException();
11273
    }
11274
 
11275
    @Override
11276
    public boolean equals(Object that) {
11277
      if (that == null)
11278
        return false;
11279
      if (that instanceof fetchScansPerInvoiceNumber_args)
11280
        return this.equals((fetchScansPerInvoiceNumber_args)that);
11281
      return false;
11282
    }
11283
 
11284
    public boolean equals(fetchScansPerInvoiceNumber_args that) {
11285
      if (that == null)
11286
        return false;
11287
 
11288
      boolean this_present_date = true;
11289
      boolean that_present_date = true;
11290
      if (this_present_date || that_present_date) {
11291
        if (!(this_present_date && that_present_date))
11292
          return false;
11293
        if (this.date != that.date)
11294
          return false;
11295
      }
11296
 
11297
      return true;
11298
    }
11299
 
11300
    @Override
11301
    public int hashCode() {
11302
      return 0;
11303
    }
11304
 
11305
    public int compareTo(fetchScansPerInvoiceNumber_args other) {
11306
      if (!getClass().equals(other.getClass())) {
11307
        return getClass().getName().compareTo(other.getClass().getName());
11308
      }
11309
 
11310
      int lastComparison = 0;
11311
      fetchScansPerInvoiceNumber_args typedOther = (fetchScansPerInvoiceNumber_args)other;
11312
 
11313
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
11314
      if (lastComparison != 0) {
11315
        return lastComparison;
11316
      }
11317
      if (isSetDate()) {
11318
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
11319
        if (lastComparison != 0) {
11320
          return lastComparison;
11321
        }
11322
      }
11323
      return 0;
11324
    }
11325
 
11326
    public _Fields fieldForId(int fieldId) {
11327
      return _Fields.findByThriftId(fieldId);
11328
    }
11329
 
11330
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11331
      org.apache.thrift.protocol.TField field;
11332
      iprot.readStructBegin();
11333
      while (true)
11334
      {
11335
        field = iprot.readFieldBegin();
11336
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11337
          break;
11338
        }
11339
        switch (field.id) {
11340
          case 1: // DATE
11341
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11342
              this.date = iprot.readI64();
11343
              setDateIsSet(true);
11344
            } else { 
11345
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11346
            }
11347
            break;
11348
          default:
11349
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11350
        }
11351
        iprot.readFieldEnd();
11352
      }
11353
      iprot.readStructEnd();
11354
      validate();
11355
    }
11356
 
11357
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11358
      validate();
11359
 
11360
      oprot.writeStructBegin(STRUCT_DESC);
11361
      oprot.writeFieldBegin(DATE_FIELD_DESC);
11362
      oprot.writeI64(this.date);
11363
      oprot.writeFieldEnd();
11364
      oprot.writeFieldStop();
11365
      oprot.writeStructEnd();
11366
    }
11367
 
11368
    @Override
11369
    public String toString() {
11370
      StringBuilder sb = new StringBuilder("fetchScansPerInvoiceNumber_args(");
11371
      boolean first = true;
11372
 
11373
      sb.append("date:");
11374
      sb.append(this.date);
11375
      first = false;
11376
      sb.append(")");
11377
      return sb.toString();
11378
    }
11379
 
11380
    public void validate() throws org.apache.thrift.TException {
11381
      // check for required fields
11382
    }
11383
 
11384
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11385
      try {
11386
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11387
      } catch (org.apache.thrift.TException te) {
11388
        throw new java.io.IOException(te);
11389
      }
11390
    }
11391
 
11392
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11393
      try {
5711 mandeep.dh 11394
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
11395
        __isset_bit_vector = new BitSet(1);
5496 mandeep.dh 11396
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11397
      } catch (org.apache.thrift.TException te) {
11398
        throw new java.io.IOException(te);
11399
      }
11400
    }
11401
 
11402
  }
11403
 
11404
  public static class fetchScansPerInvoiceNumber_result implements org.apache.thrift.TBase<fetchScansPerInvoiceNumber_result, fetchScansPerInvoiceNumber_result._Fields>, java.io.Serializable, Cloneable   {
11405
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchScansPerInvoiceNumber_result");
11406
 
11407
    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);
11408
 
11409
    private List<InvoiceScan> success; // required
11410
 
11411
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11412
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11413
      SUCCESS((short)0, "success");
11414
 
11415
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11416
 
11417
      static {
11418
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11419
          byName.put(field.getFieldName(), field);
11420
        }
11421
      }
11422
 
11423
      /**
11424
       * Find the _Fields constant that matches fieldId, or null if its not found.
11425
       */
11426
      public static _Fields findByThriftId(int fieldId) {
11427
        switch(fieldId) {
11428
          case 0: // SUCCESS
11429
            return SUCCESS;
11430
          default:
11431
            return null;
11432
        }
11433
      }
11434
 
11435
      /**
11436
       * Find the _Fields constant that matches fieldId, throwing an exception
11437
       * if it is not found.
11438
       */
11439
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11440
        _Fields fields = findByThriftId(fieldId);
11441
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11442
        return fields;
11443
      }
11444
 
11445
      /**
11446
       * Find the _Fields constant that matches name, or null if its not found.
11447
       */
11448
      public static _Fields findByName(String name) {
11449
        return byName.get(name);
11450
      }
11451
 
11452
      private final short _thriftId;
11453
      private final String _fieldName;
11454
 
11455
      _Fields(short thriftId, String fieldName) {
11456
        _thriftId = thriftId;
11457
        _fieldName = fieldName;
11458
      }
11459
 
11460
      public short getThriftFieldId() {
11461
        return _thriftId;
11462
      }
11463
 
11464
      public String getFieldName() {
11465
        return _fieldName;
11466
      }
11467
    }
11468
 
11469
    // isset id assignments
11470
 
11471
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11472
    static {
11473
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11474
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11475
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
11476
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InvoiceScan.class))));
11477
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11478
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchScansPerInvoiceNumber_result.class, metaDataMap);
11479
    }
11480
 
11481
    public fetchScansPerInvoiceNumber_result() {
11482
    }
11483
 
11484
    public fetchScansPerInvoiceNumber_result(
11485
      List<InvoiceScan> success)
11486
    {
11487
      this();
11488
      this.success = success;
11489
    }
11490
 
11491
    /**
11492
     * Performs a deep copy on <i>other</i>.
11493
     */
11494
    public fetchScansPerInvoiceNumber_result(fetchScansPerInvoiceNumber_result other) {
11495
      if (other.isSetSuccess()) {
11496
        List<InvoiceScan> __this__success = new ArrayList<InvoiceScan>();
11497
        for (InvoiceScan other_element : other.success) {
11498
          __this__success.add(new InvoiceScan(other_element));
11499
        }
11500
        this.success = __this__success;
11501
      }
11502
    }
11503
 
11504
    public fetchScansPerInvoiceNumber_result deepCopy() {
11505
      return new fetchScansPerInvoiceNumber_result(this);
11506
    }
11507
 
11508
    @Override
11509
    public void clear() {
11510
      this.success = null;
11511
    }
11512
 
11513
    public int getSuccessSize() {
11514
      return (this.success == null) ? 0 : this.success.size();
11515
    }
11516
 
11517
    public java.util.Iterator<InvoiceScan> getSuccessIterator() {
11518
      return (this.success == null) ? null : this.success.iterator();
11519
    }
11520
 
11521
    public void addToSuccess(InvoiceScan elem) {
11522
      if (this.success == null) {
11523
        this.success = new ArrayList<InvoiceScan>();
11524
      }
11525
      this.success.add(elem);
11526
    }
11527
 
11528
    public List<InvoiceScan> getSuccess() {
11529
      return this.success;
11530
    }
11531
 
11532
    public void setSuccess(List<InvoiceScan> success) {
11533
      this.success = success;
11534
    }
11535
 
11536
    public void unsetSuccess() {
11537
      this.success = null;
11538
    }
11539
 
11540
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
11541
    public boolean isSetSuccess() {
11542
      return this.success != null;
11543
    }
11544
 
11545
    public void setSuccessIsSet(boolean value) {
11546
      if (!value) {
11547
        this.success = null;
11548
      }
11549
    }
11550
 
11551
    public void setFieldValue(_Fields field, Object value) {
11552
      switch (field) {
11553
      case SUCCESS:
11554
        if (value == null) {
11555
          unsetSuccess();
11556
        } else {
11557
          setSuccess((List<InvoiceScan>)value);
11558
        }
11559
        break;
11560
 
11561
      }
11562
    }
11563
 
11564
    public Object getFieldValue(_Fields field) {
11565
      switch (field) {
11566
      case SUCCESS:
11567
        return getSuccess();
11568
 
11569
      }
11570
      throw new IllegalStateException();
11571
    }
11572
 
11573
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11574
    public boolean isSet(_Fields field) {
11575
      if (field == null) {
11576
        throw new IllegalArgumentException();
11577
      }
11578
 
11579
      switch (field) {
11580
      case SUCCESS:
11581
        return isSetSuccess();
11582
      }
11583
      throw new IllegalStateException();
11584
    }
11585
 
11586
    @Override
11587
    public boolean equals(Object that) {
11588
      if (that == null)
11589
        return false;
11590
      if (that instanceof fetchScansPerInvoiceNumber_result)
11591
        return this.equals((fetchScansPerInvoiceNumber_result)that);
11592
      return false;
11593
    }
11594
 
11595
    public boolean equals(fetchScansPerInvoiceNumber_result that) {
11596
      if (that == null)
11597
        return false;
11598
 
11599
      boolean this_present_success = true && this.isSetSuccess();
11600
      boolean that_present_success = true && that.isSetSuccess();
11601
      if (this_present_success || that_present_success) {
11602
        if (!(this_present_success && that_present_success))
11603
          return false;
11604
        if (!this.success.equals(that.success))
11605
          return false;
11606
      }
11607
 
11608
      return true;
11609
    }
11610
 
11611
    @Override
11612
    public int hashCode() {
11613
      return 0;
11614
    }
11615
 
11616
    public int compareTo(fetchScansPerInvoiceNumber_result other) {
11617
      if (!getClass().equals(other.getClass())) {
11618
        return getClass().getName().compareTo(other.getClass().getName());
11619
      }
11620
 
11621
      int lastComparison = 0;
11622
      fetchScansPerInvoiceNumber_result typedOther = (fetchScansPerInvoiceNumber_result)other;
11623
 
11624
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
11625
      if (lastComparison != 0) {
11626
        return lastComparison;
11627
      }
11628
      if (isSetSuccess()) {
11629
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
11630
        if (lastComparison != 0) {
11631
          return lastComparison;
11632
        }
11633
      }
11634
      return 0;
11635
    }
11636
 
11637
    public _Fields fieldForId(int fieldId) {
11638
      return _Fields.findByThriftId(fieldId);
11639
    }
11640
 
11641
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11642
      org.apache.thrift.protocol.TField field;
11643
      iprot.readStructBegin();
11644
      while (true)
11645
      {
11646
        field = iprot.readFieldBegin();
11647
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11648
          break;
11649
        }
11650
        switch (field.id) {
11651
          case 0: // SUCCESS
11652
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
11653
              {
11654
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
11655
                this.success = new ArrayList<InvoiceScan>(_list16.size);
11656
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
11657
                {
11658
                  InvoiceScan _elem18; // required
11659
                  _elem18 = new InvoiceScan();
11660
                  _elem18.read(iprot);
11661
                  this.success.add(_elem18);
11662
                }
11663
                iprot.readListEnd();
11664
              }
11665
            } else { 
11666
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11667
            }
11668
            break;
11669
          default:
11670
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11671
        }
11672
        iprot.readFieldEnd();
11673
      }
11674
      iprot.readStructEnd();
11675
      validate();
11676
    }
11677
 
11678
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11679
      oprot.writeStructBegin(STRUCT_DESC);
11680
 
11681
      if (this.isSetSuccess()) {
11682
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11683
        {
11684
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
11685
          for (InvoiceScan _iter19 : this.success)
11686
          {
11687
            _iter19.write(oprot);
11688
          }
11689
          oprot.writeListEnd();
11690
        }
11691
        oprot.writeFieldEnd();
11692
      }
11693
      oprot.writeFieldStop();
11694
      oprot.writeStructEnd();
11695
    }
11696
 
11697
    @Override
11698
    public String toString() {
11699
      StringBuilder sb = new StringBuilder("fetchScansPerInvoiceNumber_result(");
11700
      boolean first = true;
11701
 
11702
      sb.append("success:");
11703
      if (this.success == null) {
11704
        sb.append("null");
11705
      } else {
11706
        sb.append(this.success);
11707
      }
11708
      first = false;
11709
      sb.append(")");
11710
      return sb.toString();
11711
    }
11712
 
11713
    public void validate() throws org.apache.thrift.TException {
11714
      // check for required fields
11715
    }
11716
 
11717
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11718
      try {
11719
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11720
      } catch (org.apache.thrift.TException te) {
11721
        throw new java.io.IOException(te);
11722
      }
11723
    }
11724
 
11725
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11726
      try {
11727
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11728
      } catch (org.apache.thrift.TException te) {
11729
        throw new java.io.IOException(te);
11730
      }
11731
    }
11732
 
11733
  }
11734
 
5620 mandeep.dh 11735
  public static class getInventoryItemFromOrder_args implements org.apache.thrift.TBase<getInventoryItemFromOrder_args, getInventoryItemFromOrder_args._Fields>, java.io.Serializable, Cloneable   {
11736
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromOrder_args");
11737
 
11738
    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);
11739
 
11740
    private long orderId; // required
11741
 
11742
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11743
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11744
      ORDER_ID((short)1, "orderId");
11745
 
11746
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11747
 
11748
      static {
11749
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11750
          byName.put(field.getFieldName(), field);
11751
        }
11752
      }
11753
 
11754
      /**
11755
       * Find the _Fields constant that matches fieldId, or null if its not found.
11756
       */
11757
      public static _Fields findByThriftId(int fieldId) {
11758
        switch(fieldId) {
11759
          case 1: // ORDER_ID
11760
            return ORDER_ID;
11761
          default:
11762
            return null;
11763
        }
11764
      }
11765
 
11766
      /**
11767
       * Find the _Fields constant that matches fieldId, throwing an exception
11768
       * if it is not found.
11769
       */
11770
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11771
        _Fields fields = findByThriftId(fieldId);
11772
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11773
        return fields;
11774
      }
11775
 
11776
      /**
11777
       * Find the _Fields constant that matches name, or null if its not found.
11778
       */
11779
      public static _Fields findByName(String name) {
11780
        return byName.get(name);
11781
      }
11782
 
11783
      private final short _thriftId;
11784
      private final String _fieldName;
11785
 
11786
      _Fields(short thriftId, String fieldName) {
11787
        _thriftId = thriftId;
11788
        _fieldName = fieldName;
11789
      }
11790
 
11791
      public short getThriftFieldId() {
11792
        return _thriftId;
11793
      }
11794
 
11795
      public String getFieldName() {
11796
        return _fieldName;
11797
      }
11798
    }
11799
 
11800
    // isset id assignments
11801
    private static final int __ORDERID_ISSET_ID = 0;
11802
    private BitSet __isset_bit_vector = new BitSet(1);
11803
 
11804
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11805
    static {
11806
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11807
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11808
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11809
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11810
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromOrder_args.class, metaDataMap);
11811
    }
11812
 
11813
    public getInventoryItemFromOrder_args() {
11814
    }
11815
 
11816
    public getInventoryItemFromOrder_args(
11817
      long orderId)
11818
    {
11819
      this();
11820
      this.orderId = orderId;
11821
      setOrderIdIsSet(true);
11822
    }
11823
 
11824
    /**
11825
     * Performs a deep copy on <i>other</i>.
11826
     */
11827
    public getInventoryItemFromOrder_args(getInventoryItemFromOrder_args other) {
11828
      __isset_bit_vector.clear();
11829
      __isset_bit_vector.or(other.__isset_bit_vector);
11830
      this.orderId = other.orderId;
11831
    }
11832
 
11833
    public getInventoryItemFromOrder_args deepCopy() {
11834
      return new getInventoryItemFromOrder_args(this);
11835
    }
11836
 
11837
    @Override
11838
    public void clear() {
11839
      setOrderIdIsSet(false);
11840
      this.orderId = 0;
11841
    }
11842
 
11843
    public long getOrderId() {
11844
      return this.orderId;
11845
    }
11846
 
11847
    public void setOrderId(long orderId) {
11848
      this.orderId = orderId;
11849
      setOrderIdIsSet(true);
11850
    }
11851
 
11852
    public void unsetOrderId() {
11853
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
11854
    }
11855
 
11856
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
11857
    public boolean isSetOrderId() {
11858
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
11859
    }
11860
 
11861
    public void setOrderIdIsSet(boolean value) {
11862
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
11863
    }
11864
 
11865
    public void setFieldValue(_Fields field, Object value) {
11866
      switch (field) {
11867
      case ORDER_ID:
11868
        if (value == null) {
11869
          unsetOrderId();
11870
        } else {
11871
          setOrderId((Long)value);
11872
        }
11873
        break;
11874
 
11875
      }
11876
    }
11877
 
11878
    public Object getFieldValue(_Fields field) {
11879
      switch (field) {
11880
      case ORDER_ID:
11881
        return Long.valueOf(getOrderId());
11882
 
11883
      }
11884
      throw new IllegalStateException();
11885
    }
11886
 
11887
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11888
    public boolean isSet(_Fields field) {
11889
      if (field == null) {
11890
        throw new IllegalArgumentException();
11891
      }
11892
 
11893
      switch (field) {
11894
      case ORDER_ID:
11895
        return isSetOrderId();
11896
      }
11897
      throw new IllegalStateException();
11898
    }
11899
 
11900
    @Override
11901
    public boolean equals(Object that) {
11902
      if (that == null)
11903
        return false;
11904
      if (that instanceof getInventoryItemFromOrder_args)
11905
        return this.equals((getInventoryItemFromOrder_args)that);
11906
      return false;
11907
    }
11908
 
11909
    public boolean equals(getInventoryItemFromOrder_args that) {
11910
      if (that == null)
11911
        return false;
11912
 
11913
      boolean this_present_orderId = true;
11914
      boolean that_present_orderId = true;
11915
      if (this_present_orderId || that_present_orderId) {
11916
        if (!(this_present_orderId && that_present_orderId))
11917
          return false;
11918
        if (this.orderId != that.orderId)
11919
          return false;
11920
      }
11921
 
11922
      return true;
11923
    }
11924
 
11925
    @Override
11926
    public int hashCode() {
11927
      return 0;
11928
    }
11929
 
11930
    public int compareTo(getInventoryItemFromOrder_args other) {
11931
      if (!getClass().equals(other.getClass())) {
11932
        return getClass().getName().compareTo(other.getClass().getName());
11933
      }
11934
 
11935
      int lastComparison = 0;
11936
      getInventoryItemFromOrder_args typedOther = (getInventoryItemFromOrder_args)other;
11937
 
11938
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
11939
      if (lastComparison != 0) {
11940
        return lastComparison;
11941
      }
11942
      if (isSetOrderId()) {
11943
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
11944
        if (lastComparison != 0) {
11945
          return lastComparison;
11946
        }
11947
      }
11948
      return 0;
11949
    }
11950
 
11951
    public _Fields fieldForId(int fieldId) {
11952
      return _Fields.findByThriftId(fieldId);
11953
    }
11954
 
11955
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11956
      org.apache.thrift.protocol.TField field;
11957
      iprot.readStructBegin();
11958
      while (true)
11959
      {
11960
        field = iprot.readFieldBegin();
11961
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11962
          break;
11963
        }
11964
        switch (field.id) {
11965
          case 1: // ORDER_ID
11966
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11967
              this.orderId = iprot.readI64();
11968
              setOrderIdIsSet(true);
11969
            } else { 
11970
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11971
            }
11972
            break;
11973
          default:
11974
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11975
        }
11976
        iprot.readFieldEnd();
11977
      }
11978
      iprot.readStructEnd();
11979
      validate();
11980
    }
11981
 
11982
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11983
      validate();
11984
 
11985
      oprot.writeStructBegin(STRUCT_DESC);
11986
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
11987
      oprot.writeI64(this.orderId);
11988
      oprot.writeFieldEnd();
11989
      oprot.writeFieldStop();
11990
      oprot.writeStructEnd();
11991
    }
11992
 
11993
    @Override
11994
    public String toString() {
11995
      StringBuilder sb = new StringBuilder("getInventoryItemFromOrder_args(");
11996
      boolean first = true;
11997
 
11998
      sb.append("orderId:");
11999
      sb.append(this.orderId);
12000
      first = false;
12001
      sb.append(")");
12002
      return sb.toString();
12003
    }
12004
 
12005
    public void validate() throws org.apache.thrift.TException {
12006
      // check for required fields
12007
    }
12008
 
12009
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12010
      try {
12011
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12012
      } catch (org.apache.thrift.TException te) {
12013
        throw new java.io.IOException(te);
12014
      }
12015
    }
12016
 
12017
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12018
      try {
12019
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
12020
        __isset_bit_vector = new BitSet(1);
12021
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12022
      } catch (org.apache.thrift.TException te) {
12023
        throw new java.io.IOException(te);
12024
      }
12025
    }
12026
 
12027
  }
12028
 
12029
  public static class getInventoryItemFromOrder_result implements org.apache.thrift.TBase<getInventoryItemFromOrder_result, getInventoryItemFromOrder_result._Fields>, java.io.Serializable, Cloneable   {
12030
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromOrder_result");
12031
 
12032
    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);
12033
    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);
12034
 
12035
    private InventoryItem success; // required
12036
    private WarehouseServiceException we; // required
12037
 
12038
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12039
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12040
      SUCCESS((short)0, "success"),
12041
      WE((short)1, "we");
12042
 
12043
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12044
 
12045
      static {
12046
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12047
          byName.put(field.getFieldName(), field);
12048
        }
12049
      }
12050
 
12051
      /**
12052
       * Find the _Fields constant that matches fieldId, or null if its not found.
12053
       */
12054
      public static _Fields findByThriftId(int fieldId) {
12055
        switch(fieldId) {
12056
          case 0: // SUCCESS
12057
            return SUCCESS;
12058
          case 1: // WE
12059
            return WE;
12060
          default:
12061
            return null;
12062
        }
12063
      }
12064
 
12065
      /**
12066
       * Find the _Fields constant that matches fieldId, throwing an exception
12067
       * if it is not found.
12068
       */
12069
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12070
        _Fields fields = findByThriftId(fieldId);
12071
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12072
        return fields;
12073
      }
12074
 
12075
      /**
12076
       * Find the _Fields constant that matches name, or null if its not found.
12077
       */
12078
      public static _Fields findByName(String name) {
12079
        return byName.get(name);
12080
      }
12081
 
12082
      private final short _thriftId;
12083
      private final String _fieldName;
12084
 
12085
      _Fields(short thriftId, String fieldName) {
12086
        _thriftId = thriftId;
12087
        _fieldName = fieldName;
12088
      }
12089
 
12090
      public short getThriftFieldId() {
12091
        return _thriftId;
12092
      }
12093
 
12094
      public String getFieldName() {
12095
        return _fieldName;
12096
      }
12097
    }
12098
 
12099
    // isset id assignments
12100
 
12101
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12102
    static {
12103
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12104
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12105
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
12106
      tmpMap.put(_Fields.WE, new org.apache.thrift.meta_data.FieldMetaData("we", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12107
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
12108
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12109
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromOrder_result.class, metaDataMap);
12110
    }
12111
 
12112
    public getInventoryItemFromOrder_result() {
12113
    }
12114
 
12115
    public getInventoryItemFromOrder_result(
12116
      InventoryItem success,
12117
      WarehouseServiceException we)
12118
    {
12119
      this();
12120
      this.success = success;
12121
      this.we = we;
12122
    }
12123
 
12124
    /**
12125
     * Performs a deep copy on <i>other</i>.
12126
     */
12127
    public getInventoryItemFromOrder_result(getInventoryItemFromOrder_result other) {
12128
      if (other.isSetSuccess()) {
12129
        this.success = new InventoryItem(other.success);
12130
      }
12131
      if (other.isSetWe()) {
12132
        this.we = new WarehouseServiceException(other.we);
12133
      }
12134
    }
12135
 
12136
    public getInventoryItemFromOrder_result deepCopy() {
12137
      return new getInventoryItemFromOrder_result(this);
12138
    }
12139
 
12140
    @Override
12141
    public void clear() {
12142
      this.success = null;
12143
      this.we = null;
12144
    }
12145
 
12146
    public InventoryItem getSuccess() {
12147
      return this.success;
12148
    }
12149
 
12150
    public void setSuccess(InventoryItem success) {
12151
      this.success = success;
12152
    }
12153
 
12154
    public void unsetSuccess() {
12155
      this.success = null;
12156
    }
12157
 
12158
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
12159
    public boolean isSetSuccess() {
12160
      return this.success != null;
12161
    }
12162
 
12163
    public void setSuccessIsSet(boolean value) {
12164
      if (!value) {
12165
        this.success = null;
12166
      }
12167
    }
12168
 
12169
    public WarehouseServiceException getWe() {
12170
      return this.we;
12171
    }
12172
 
12173
    public void setWe(WarehouseServiceException we) {
12174
      this.we = we;
12175
    }
12176
 
12177
    public void unsetWe() {
12178
      this.we = null;
12179
    }
12180
 
12181
    /** Returns true if field we is set (has been assigned a value) and false otherwise */
12182
    public boolean isSetWe() {
12183
      return this.we != null;
12184
    }
12185
 
12186
    public void setWeIsSet(boolean value) {
12187
      if (!value) {
12188
        this.we = null;
12189
      }
12190
    }
12191
 
12192
    public void setFieldValue(_Fields field, Object value) {
12193
      switch (field) {
12194
      case SUCCESS:
12195
        if (value == null) {
12196
          unsetSuccess();
12197
        } else {
12198
          setSuccess((InventoryItem)value);
12199
        }
12200
        break;
12201
 
12202
      case WE:
12203
        if (value == null) {
12204
          unsetWe();
12205
        } else {
12206
          setWe((WarehouseServiceException)value);
12207
        }
12208
        break;
12209
 
12210
      }
12211
    }
12212
 
12213
    public Object getFieldValue(_Fields field) {
12214
      switch (field) {
12215
      case SUCCESS:
12216
        return getSuccess();
12217
 
12218
      case WE:
12219
        return getWe();
12220
 
12221
      }
12222
      throw new IllegalStateException();
12223
    }
12224
 
12225
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12226
    public boolean isSet(_Fields field) {
12227
      if (field == null) {
12228
        throw new IllegalArgumentException();
12229
      }
12230
 
12231
      switch (field) {
12232
      case SUCCESS:
12233
        return isSetSuccess();
12234
      case WE:
12235
        return isSetWe();
12236
      }
12237
      throw new IllegalStateException();
12238
    }
12239
 
12240
    @Override
12241
    public boolean equals(Object that) {
12242
      if (that == null)
12243
        return false;
12244
      if (that instanceof getInventoryItemFromOrder_result)
12245
        return this.equals((getInventoryItemFromOrder_result)that);
12246
      return false;
12247
    }
12248
 
12249
    public boolean equals(getInventoryItemFromOrder_result that) {
12250
      if (that == null)
12251
        return false;
12252
 
12253
      boolean this_present_success = true && this.isSetSuccess();
12254
      boolean that_present_success = true && that.isSetSuccess();
12255
      if (this_present_success || that_present_success) {
12256
        if (!(this_present_success && that_present_success))
12257
          return false;
12258
        if (!this.success.equals(that.success))
12259
          return false;
12260
      }
12261
 
12262
      boolean this_present_we = true && this.isSetWe();
12263
      boolean that_present_we = true && that.isSetWe();
12264
      if (this_present_we || that_present_we) {
12265
        if (!(this_present_we && that_present_we))
12266
          return false;
12267
        if (!this.we.equals(that.we))
12268
          return false;
12269
      }
12270
 
12271
      return true;
12272
    }
12273
 
12274
    @Override
12275
    public int hashCode() {
12276
      return 0;
12277
    }
12278
 
12279
    public int compareTo(getInventoryItemFromOrder_result other) {
12280
      if (!getClass().equals(other.getClass())) {
12281
        return getClass().getName().compareTo(other.getClass().getName());
12282
      }
12283
 
12284
      int lastComparison = 0;
12285
      getInventoryItemFromOrder_result typedOther = (getInventoryItemFromOrder_result)other;
12286
 
12287
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
12288
      if (lastComparison != 0) {
12289
        return lastComparison;
12290
      }
12291
      if (isSetSuccess()) {
12292
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
12293
        if (lastComparison != 0) {
12294
          return lastComparison;
12295
        }
12296
      }
12297
      lastComparison = Boolean.valueOf(isSetWe()).compareTo(typedOther.isSetWe());
12298
      if (lastComparison != 0) {
12299
        return lastComparison;
12300
      }
12301
      if (isSetWe()) {
12302
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.we, typedOther.we);
12303
        if (lastComparison != 0) {
12304
          return lastComparison;
12305
        }
12306
      }
12307
      return 0;
12308
    }
12309
 
12310
    public _Fields fieldForId(int fieldId) {
12311
      return _Fields.findByThriftId(fieldId);
12312
    }
12313
 
12314
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12315
      org.apache.thrift.protocol.TField field;
12316
      iprot.readStructBegin();
12317
      while (true)
12318
      {
12319
        field = iprot.readFieldBegin();
12320
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12321
          break;
12322
        }
12323
        switch (field.id) {
12324
          case 0: // SUCCESS
12325
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12326
              this.success = new InventoryItem();
12327
              this.success.read(iprot);
12328
            } else { 
12329
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12330
            }
12331
            break;
12332
          case 1: // WE
12333
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12334
              this.we = new WarehouseServiceException();
12335
              this.we.read(iprot);
12336
            } else { 
12337
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12338
            }
12339
            break;
12340
          default:
12341
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12342
        }
12343
        iprot.readFieldEnd();
12344
      }
12345
      iprot.readStructEnd();
12346
      validate();
12347
    }
12348
 
12349
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12350
      oprot.writeStructBegin(STRUCT_DESC);
12351
 
12352
      if (this.isSetSuccess()) {
12353
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12354
        this.success.write(oprot);
12355
        oprot.writeFieldEnd();
12356
      } else if (this.isSetWe()) {
12357
        oprot.writeFieldBegin(WE_FIELD_DESC);
12358
        this.we.write(oprot);
12359
        oprot.writeFieldEnd();
12360
      }
12361
      oprot.writeFieldStop();
12362
      oprot.writeStructEnd();
12363
    }
12364
 
12365
    @Override
12366
    public String toString() {
12367
      StringBuilder sb = new StringBuilder("getInventoryItemFromOrder_result(");
12368
      boolean first = true;
12369
 
12370
      sb.append("success:");
12371
      if (this.success == null) {
12372
        sb.append("null");
12373
      } else {
12374
        sb.append(this.success);
12375
      }
12376
      first = false;
12377
      if (!first) sb.append(", ");
12378
      sb.append("we:");
12379
      if (this.we == null) {
12380
        sb.append("null");
12381
      } else {
12382
        sb.append(this.we);
12383
      }
12384
      first = false;
12385
      sb.append(")");
12386
      return sb.toString();
12387
    }
12388
 
12389
    public void validate() throws org.apache.thrift.TException {
12390
      // check for required fields
12391
    }
12392
 
12393
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12394
      try {
12395
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12396
      } catch (org.apache.thrift.TException te) {
12397
        throw new java.io.IOException(te);
12398
      }
12399
    }
12400
 
12401
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12402
      try {
12403
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12404
      } catch (org.apache.thrift.TException te) {
12405
        throw new java.io.IOException(te);
12406
      }
12407
    }
12408
 
12409
  }
12410
 
5711 mandeep.dh 12411
  public static class getInventoryAge_args implements org.apache.thrift.TBase<getInventoryAge_args, getInventoryAge_args._Fields>, java.io.Serializable, Cloneable   {
12412
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryAge_args");
12413
 
12414
 
12415
 
12416
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12417
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12418
;
12419
 
12420
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12421
 
12422
      static {
12423
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12424
          byName.put(field.getFieldName(), field);
12425
        }
12426
      }
12427
 
12428
      /**
12429
       * Find the _Fields constant that matches fieldId, or null if its not found.
12430
       */
12431
      public static _Fields findByThriftId(int fieldId) {
12432
        switch(fieldId) {
12433
          default:
12434
            return null;
12435
        }
12436
      }
12437
 
12438
      /**
12439
       * Find the _Fields constant that matches fieldId, throwing an exception
12440
       * if it is not found.
12441
       */
12442
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12443
        _Fields fields = findByThriftId(fieldId);
12444
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12445
        return fields;
12446
      }
12447
 
12448
      /**
12449
       * Find the _Fields constant that matches name, or null if its not found.
12450
       */
12451
      public static _Fields findByName(String name) {
12452
        return byName.get(name);
12453
      }
12454
 
12455
      private final short _thriftId;
12456
      private final String _fieldName;
12457
 
12458
      _Fields(short thriftId, String fieldName) {
12459
        _thriftId = thriftId;
12460
        _fieldName = fieldName;
12461
      }
12462
 
12463
      public short getThriftFieldId() {
12464
        return _thriftId;
12465
      }
12466
 
12467
      public String getFieldName() {
12468
        return _fieldName;
12469
      }
12470
    }
12471
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12472
    static {
12473
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12474
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12475
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryAge_args.class, metaDataMap);
12476
    }
12477
 
12478
    public getInventoryAge_args() {
12479
    }
12480
 
12481
    /**
12482
     * Performs a deep copy on <i>other</i>.
12483
     */
12484
    public getInventoryAge_args(getInventoryAge_args other) {
12485
    }
12486
 
12487
    public getInventoryAge_args deepCopy() {
12488
      return new getInventoryAge_args(this);
12489
    }
12490
 
12491
    @Override
12492
    public void clear() {
12493
    }
12494
 
12495
    public void setFieldValue(_Fields field, Object value) {
12496
      switch (field) {
12497
      }
12498
    }
12499
 
12500
    public Object getFieldValue(_Fields field) {
12501
      switch (field) {
12502
      }
12503
      throw new IllegalStateException();
12504
    }
12505
 
12506
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12507
    public boolean isSet(_Fields field) {
12508
      if (field == null) {
12509
        throw new IllegalArgumentException();
12510
      }
12511
 
12512
      switch (field) {
12513
      }
12514
      throw new IllegalStateException();
12515
    }
12516
 
12517
    @Override
12518
    public boolean equals(Object that) {
12519
      if (that == null)
12520
        return false;
12521
      if (that instanceof getInventoryAge_args)
12522
        return this.equals((getInventoryAge_args)that);
12523
      return false;
12524
    }
12525
 
12526
    public boolean equals(getInventoryAge_args that) {
12527
      if (that == null)
12528
        return false;
12529
 
12530
      return true;
12531
    }
12532
 
12533
    @Override
12534
    public int hashCode() {
12535
      return 0;
12536
    }
12537
 
12538
    public int compareTo(getInventoryAge_args other) {
12539
      if (!getClass().equals(other.getClass())) {
12540
        return getClass().getName().compareTo(other.getClass().getName());
12541
      }
12542
 
12543
      int lastComparison = 0;
12544
      getInventoryAge_args typedOther = (getInventoryAge_args)other;
12545
 
12546
      return 0;
12547
    }
12548
 
12549
    public _Fields fieldForId(int fieldId) {
12550
      return _Fields.findByThriftId(fieldId);
12551
    }
12552
 
12553
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12554
      org.apache.thrift.protocol.TField field;
12555
      iprot.readStructBegin();
12556
      while (true)
12557
      {
12558
        field = iprot.readFieldBegin();
12559
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12560
          break;
12561
        }
12562
        switch (field.id) {
12563
          default:
12564
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12565
        }
12566
        iprot.readFieldEnd();
12567
      }
12568
      iprot.readStructEnd();
12569
      validate();
12570
    }
12571
 
12572
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12573
      validate();
12574
 
12575
      oprot.writeStructBegin(STRUCT_DESC);
12576
      oprot.writeFieldStop();
12577
      oprot.writeStructEnd();
12578
    }
12579
 
12580
    @Override
12581
    public String toString() {
12582
      StringBuilder sb = new StringBuilder("getInventoryAge_args(");
12583
      boolean first = true;
12584
 
12585
      sb.append(")");
12586
      return sb.toString();
12587
    }
12588
 
12589
    public void validate() throws org.apache.thrift.TException {
12590
      // check for required fields
12591
    }
12592
 
12593
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12594
      try {
12595
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12596
      } catch (org.apache.thrift.TException te) {
12597
        throw new java.io.IOException(te);
12598
      }
12599
    }
12600
 
12601
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12602
      try {
12603
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12604
      } catch (org.apache.thrift.TException te) {
12605
        throw new java.io.IOException(te);
12606
      }
12607
    }
12608
 
12609
  }
12610
 
12611
  public static class getInventoryAge_result implements org.apache.thrift.TBase<getInventoryAge_result, getInventoryAge_result._Fields>, java.io.Serializable, Cloneable   {
12612
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryAge_result");
12613
 
12614
    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);
12615
 
12616
    private List<InventoryAge> success; // required
12617
 
12618
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12619
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12620
      SUCCESS((short)0, "success");
12621
 
12622
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12623
 
12624
      static {
12625
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12626
          byName.put(field.getFieldName(), field);
12627
        }
12628
      }
12629
 
12630
      /**
12631
       * Find the _Fields constant that matches fieldId, or null if its not found.
12632
       */
12633
      public static _Fields findByThriftId(int fieldId) {
12634
        switch(fieldId) {
12635
          case 0: // SUCCESS
12636
            return SUCCESS;
12637
          default:
12638
            return null;
12639
        }
12640
      }
12641
 
12642
      /**
12643
       * Find the _Fields constant that matches fieldId, throwing an exception
12644
       * if it is not found.
12645
       */
12646
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12647
        _Fields fields = findByThriftId(fieldId);
12648
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12649
        return fields;
12650
      }
12651
 
12652
      /**
12653
       * Find the _Fields constant that matches name, or null if its not found.
12654
       */
12655
      public static _Fields findByName(String name) {
12656
        return byName.get(name);
12657
      }
12658
 
12659
      private final short _thriftId;
12660
      private final String _fieldName;
12661
 
12662
      _Fields(short thriftId, String fieldName) {
12663
        _thriftId = thriftId;
12664
        _fieldName = fieldName;
12665
      }
12666
 
12667
      public short getThriftFieldId() {
12668
        return _thriftId;
12669
      }
12670
 
12671
      public String getFieldName() {
12672
        return _fieldName;
12673
      }
12674
    }
12675
 
12676
    // isset id assignments
12677
 
12678
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12679
    static {
12680
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12681
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12682
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
12683
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryAge.class))));
12684
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12685
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryAge_result.class, metaDataMap);
12686
    }
12687
 
12688
    public getInventoryAge_result() {
12689
    }
12690
 
12691
    public getInventoryAge_result(
12692
      List<InventoryAge> success)
12693
    {
12694
      this();
12695
      this.success = success;
12696
    }
12697
 
12698
    /**
12699
     * Performs a deep copy on <i>other</i>.
12700
     */
12701
    public getInventoryAge_result(getInventoryAge_result other) {
12702
      if (other.isSetSuccess()) {
12703
        List<InventoryAge> __this__success = new ArrayList<InventoryAge>();
12704
        for (InventoryAge other_element : other.success) {
12705
          __this__success.add(new InventoryAge(other_element));
12706
        }
12707
        this.success = __this__success;
12708
      }
12709
    }
12710
 
12711
    public getInventoryAge_result deepCopy() {
12712
      return new getInventoryAge_result(this);
12713
    }
12714
 
12715
    @Override
12716
    public void clear() {
12717
      this.success = null;
12718
    }
12719
 
12720
    public int getSuccessSize() {
12721
      return (this.success == null) ? 0 : this.success.size();
12722
    }
12723
 
12724
    public java.util.Iterator<InventoryAge> getSuccessIterator() {
12725
      return (this.success == null) ? null : this.success.iterator();
12726
    }
12727
 
12728
    public void addToSuccess(InventoryAge elem) {
12729
      if (this.success == null) {
12730
        this.success = new ArrayList<InventoryAge>();
12731
      }
12732
      this.success.add(elem);
12733
    }
12734
 
12735
    public List<InventoryAge> getSuccess() {
12736
      return this.success;
12737
    }
12738
 
12739
    public void setSuccess(List<InventoryAge> success) {
12740
      this.success = success;
12741
    }
12742
 
12743
    public void unsetSuccess() {
12744
      this.success = null;
12745
    }
12746
 
12747
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
12748
    public boolean isSetSuccess() {
12749
      return this.success != null;
12750
    }
12751
 
12752
    public void setSuccessIsSet(boolean value) {
12753
      if (!value) {
12754
        this.success = null;
12755
      }
12756
    }
12757
 
12758
    public void setFieldValue(_Fields field, Object value) {
12759
      switch (field) {
12760
      case SUCCESS:
12761
        if (value == null) {
12762
          unsetSuccess();
12763
        } else {
12764
          setSuccess((List<InventoryAge>)value);
12765
        }
12766
        break;
12767
 
12768
      }
12769
    }
12770
 
12771
    public Object getFieldValue(_Fields field) {
12772
      switch (field) {
12773
      case SUCCESS:
12774
        return getSuccess();
12775
 
12776
      }
12777
      throw new IllegalStateException();
12778
    }
12779
 
12780
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12781
    public boolean isSet(_Fields field) {
12782
      if (field == null) {
12783
        throw new IllegalArgumentException();
12784
      }
12785
 
12786
      switch (field) {
12787
      case SUCCESS:
12788
        return isSetSuccess();
12789
      }
12790
      throw new IllegalStateException();
12791
    }
12792
 
12793
    @Override
12794
    public boolean equals(Object that) {
12795
      if (that == null)
12796
        return false;
12797
      if (that instanceof getInventoryAge_result)
12798
        return this.equals((getInventoryAge_result)that);
12799
      return false;
12800
    }
12801
 
12802
    public boolean equals(getInventoryAge_result that) {
12803
      if (that == null)
12804
        return false;
12805
 
12806
      boolean this_present_success = true && this.isSetSuccess();
12807
      boolean that_present_success = true && that.isSetSuccess();
12808
      if (this_present_success || that_present_success) {
12809
        if (!(this_present_success && that_present_success))
12810
          return false;
12811
        if (!this.success.equals(that.success))
12812
          return false;
12813
      }
12814
 
12815
      return true;
12816
    }
12817
 
12818
    @Override
12819
    public int hashCode() {
12820
      return 0;
12821
    }
12822
 
12823
    public int compareTo(getInventoryAge_result other) {
12824
      if (!getClass().equals(other.getClass())) {
12825
        return getClass().getName().compareTo(other.getClass().getName());
12826
      }
12827
 
12828
      int lastComparison = 0;
12829
      getInventoryAge_result typedOther = (getInventoryAge_result)other;
12830
 
12831
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
12832
      if (lastComparison != 0) {
12833
        return lastComparison;
12834
      }
12835
      if (isSetSuccess()) {
12836
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
12837
        if (lastComparison != 0) {
12838
          return lastComparison;
12839
        }
12840
      }
12841
      return 0;
12842
    }
12843
 
12844
    public _Fields fieldForId(int fieldId) {
12845
      return _Fields.findByThriftId(fieldId);
12846
    }
12847
 
12848
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12849
      org.apache.thrift.protocol.TField field;
12850
      iprot.readStructBegin();
12851
      while (true)
12852
      {
12853
        field = iprot.readFieldBegin();
12854
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12855
          break;
12856
        }
12857
        switch (field.id) {
12858
          case 0: // SUCCESS
12859
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
12860
              {
12861
                org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
12862
                this.success = new ArrayList<InventoryAge>(_list20.size);
12863
                for (int _i21 = 0; _i21 < _list20.size; ++_i21)
12864
                {
12865
                  InventoryAge _elem22; // required
12866
                  _elem22 = new InventoryAge();
12867
                  _elem22.read(iprot);
12868
                  this.success.add(_elem22);
12869
                }
12870
                iprot.readListEnd();
12871
              }
12872
            } else { 
12873
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12874
            }
12875
            break;
12876
          default:
12877
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12878
        }
12879
        iprot.readFieldEnd();
12880
      }
12881
      iprot.readStructEnd();
12882
      validate();
12883
    }
12884
 
12885
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12886
      oprot.writeStructBegin(STRUCT_DESC);
12887
 
12888
      if (this.isSetSuccess()) {
12889
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12890
        {
12891
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
12892
          for (InventoryAge _iter23 : this.success)
12893
          {
12894
            _iter23.write(oprot);
12895
          }
12896
          oprot.writeListEnd();
12897
        }
12898
        oprot.writeFieldEnd();
12899
      }
12900
      oprot.writeFieldStop();
12901
      oprot.writeStructEnd();
12902
    }
12903
 
12904
    @Override
12905
    public String toString() {
12906
      StringBuilder sb = new StringBuilder("getInventoryAge_result(");
12907
      boolean first = true;
12908
 
12909
      sb.append("success:");
12910
      if (this.success == null) {
12911
        sb.append("null");
12912
      } else {
12913
        sb.append(this.success);
12914
      }
12915
      first = false;
12916
      sb.append(")");
12917
      return sb.toString();
12918
    }
12919
 
12920
    public void validate() throws org.apache.thrift.TException {
12921
      // check for required fields
12922
    }
12923
 
12924
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12925
      try {
12926
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12927
      } catch (org.apache.thrift.TException te) {
12928
        throw new java.io.IOException(te);
12929
      }
12930
    }
12931
 
12932
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12933
      try {
12934
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12935
      } catch (org.apache.thrift.TException te) {
12936
        throw new java.io.IOException(te);
12937
      }
12938
    }
12939
 
12940
  }
12941
 
6322 amar.kumar 12942
  public static class getInventoryScansForItem_args implements org.apache.thrift.TBase<getInventoryScansForItem_args, getInventoryScansForItem_args._Fields>, java.io.Serializable, Cloneable   {
12943
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryScansForItem_args");
12944
 
12945
    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);
12946
    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);
12947
    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);
12948
 
12949
    private long itemId; // required
12950
    private long fromDate; // required
12951
    private long toDate; // 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
      ITEM_ID((short)1, "itemId"),
12956
      FROM_DATE((short)2, "fromDate"),
12957
      TO_DATE((short)3, "toDate");
12958
 
12959
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12960
 
12961
      static {
12962
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12963
          byName.put(field.getFieldName(), field);
12964
        }
12965
      }
12966
 
12967
      /**
12968
       * Find the _Fields constant that matches fieldId, or null if its not found.
12969
       */
12970
      public static _Fields findByThriftId(int fieldId) {
12971
        switch(fieldId) {
12972
          case 1: // ITEM_ID
12973
            return ITEM_ID;
12974
          case 2: // FROM_DATE
12975
            return FROM_DATE;
12976
          case 3: // TO_DATE
12977
            return TO_DATE;
12978
          default:
12979
            return null;
12980
        }
12981
      }
12982
 
12983
      /**
12984
       * Find the _Fields constant that matches fieldId, throwing an exception
12985
       * if it is not found.
12986
       */
12987
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12988
        _Fields fields = findByThriftId(fieldId);
12989
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12990
        return fields;
12991
      }
12992
 
12993
      /**
12994
       * Find the _Fields constant that matches name, or null if its not found.
12995
       */
12996
      public static _Fields findByName(String name) {
12997
        return byName.get(name);
12998
      }
12999
 
13000
      private final short _thriftId;
13001
      private final String _fieldName;
13002
 
13003
      _Fields(short thriftId, String fieldName) {
13004
        _thriftId = thriftId;
13005
        _fieldName = fieldName;
13006
      }
13007
 
13008
      public short getThriftFieldId() {
13009
        return _thriftId;
13010
      }
13011
 
13012
      public String getFieldName() {
13013
        return _fieldName;
13014
      }
13015
    }
13016
 
13017
    // isset id assignments
13018
    private static final int __ITEMID_ISSET_ID = 0;
13019
    private static final int __FROMDATE_ISSET_ID = 1;
13020
    private static final int __TODATE_ISSET_ID = 2;
13021
    private BitSet __isset_bit_vector = new BitSet(3);
13022
 
13023
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13024
    static {
13025
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13026
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13027
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13028
      tmpMap.put(_Fields.FROM_DATE, new org.apache.thrift.meta_data.FieldMetaData("fromDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13029
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13030
      tmpMap.put(_Fields.TO_DATE, new org.apache.thrift.meta_data.FieldMetaData("toDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13031
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13032
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13033
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryScansForItem_args.class, metaDataMap);
13034
    }
13035
 
13036
    public getInventoryScansForItem_args() {
13037
    }
13038
 
13039
    public getInventoryScansForItem_args(
13040
      long itemId,
13041
      long fromDate,
13042
      long toDate)
13043
    {
13044
      this();
13045
      this.itemId = itemId;
13046
      setItemIdIsSet(true);
13047
      this.fromDate = fromDate;
13048
      setFromDateIsSet(true);
13049
      this.toDate = toDate;
13050
      setToDateIsSet(true);
13051
    }
13052
 
13053
    /**
13054
     * Performs a deep copy on <i>other</i>.
13055
     */
13056
    public getInventoryScansForItem_args(getInventoryScansForItem_args other) {
13057
      __isset_bit_vector.clear();
13058
      __isset_bit_vector.or(other.__isset_bit_vector);
13059
      this.itemId = other.itemId;
13060
      this.fromDate = other.fromDate;
13061
      this.toDate = other.toDate;
13062
    }
13063
 
13064
    public getInventoryScansForItem_args deepCopy() {
13065
      return new getInventoryScansForItem_args(this);
13066
    }
13067
 
13068
    @Override
13069
    public void clear() {
13070
      setItemIdIsSet(false);
13071
      this.itemId = 0;
13072
      setFromDateIsSet(false);
13073
      this.fromDate = 0;
13074
      setToDateIsSet(false);
13075
      this.toDate = 0;
13076
    }
13077
 
13078
    public long getItemId() {
13079
      return this.itemId;
13080
    }
13081
 
13082
    public void setItemId(long itemId) {
13083
      this.itemId = itemId;
13084
      setItemIdIsSet(true);
13085
    }
13086
 
13087
    public void unsetItemId() {
13088
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
13089
    }
13090
 
13091
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
13092
    public boolean isSetItemId() {
13093
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
13094
    }
13095
 
13096
    public void setItemIdIsSet(boolean value) {
13097
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
13098
    }
13099
 
13100
    public long getFromDate() {
13101
      return this.fromDate;
13102
    }
13103
 
13104
    public void setFromDate(long fromDate) {
13105
      this.fromDate = fromDate;
13106
      setFromDateIsSet(true);
13107
    }
13108
 
13109
    public void unsetFromDate() {
13110
      __isset_bit_vector.clear(__FROMDATE_ISSET_ID);
13111
    }
13112
 
13113
    /** Returns true if field fromDate is set (has been assigned a value) and false otherwise */
13114
    public boolean isSetFromDate() {
13115
      return __isset_bit_vector.get(__FROMDATE_ISSET_ID);
13116
    }
13117
 
13118
    public void setFromDateIsSet(boolean value) {
13119
      __isset_bit_vector.set(__FROMDATE_ISSET_ID, value);
13120
    }
13121
 
13122
    public long getToDate() {
13123
      return this.toDate;
13124
    }
13125
 
13126
    public void setToDate(long toDate) {
13127
      this.toDate = toDate;
13128
      setToDateIsSet(true);
13129
    }
13130
 
13131
    public void unsetToDate() {
13132
      __isset_bit_vector.clear(__TODATE_ISSET_ID);
13133
    }
13134
 
13135
    /** Returns true if field toDate is set (has been assigned a value) and false otherwise */
13136
    public boolean isSetToDate() {
13137
      return __isset_bit_vector.get(__TODATE_ISSET_ID);
13138
    }
13139
 
13140
    public void setToDateIsSet(boolean value) {
13141
      __isset_bit_vector.set(__TODATE_ISSET_ID, value);
13142
    }
13143
 
13144
    public void setFieldValue(_Fields field, Object value) {
13145
      switch (field) {
13146
      case ITEM_ID:
13147
        if (value == null) {
13148
          unsetItemId();
13149
        } else {
13150
          setItemId((Long)value);
13151
        }
13152
        break;
13153
 
13154
      case FROM_DATE:
13155
        if (value == null) {
13156
          unsetFromDate();
13157
        } else {
13158
          setFromDate((Long)value);
13159
        }
13160
        break;
13161
 
13162
      case TO_DATE:
13163
        if (value == null) {
13164
          unsetToDate();
13165
        } else {
13166
          setToDate((Long)value);
13167
        }
13168
        break;
13169
 
13170
      }
13171
    }
13172
 
13173
    public Object getFieldValue(_Fields field) {
13174
      switch (field) {
13175
      case ITEM_ID:
13176
        return Long.valueOf(getItemId());
13177
 
13178
      case FROM_DATE:
13179
        return Long.valueOf(getFromDate());
13180
 
13181
      case TO_DATE:
13182
        return Long.valueOf(getToDate());
13183
 
13184
      }
13185
      throw new IllegalStateException();
13186
    }
13187
 
13188
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13189
    public boolean isSet(_Fields field) {
13190
      if (field == null) {
13191
        throw new IllegalArgumentException();
13192
      }
13193
 
13194
      switch (field) {
13195
      case ITEM_ID:
13196
        return isSetItemId();
13197
      case FROM_DATE:
13198
        return isSetFromDate();
13199
      case TO_DATE:
13200
        return isSetToDate();
13201
      }
13202
      throw new IllegalStateException();
13203
    }
13204
 
13205
    @Override
13206
    public boolean equals(Object that) {
13207
      if (that == null)
13208
        return false;
13209
      if (that instanceof getInventoryScansForItem_args)
13210
        return this.equals((getInventoryScansForItem_args)that);
13211
      return false;
13212
    }
13213
 
13214
    public boolean equals(getInventoryScansForItem_args that) {
13215
      if (that == null)
13216
        return false;
13217
 
13218
      boolean this_present_itemId = true;
13219
      boolean that_present_itemId = true;
13220
      if (this_present_itemId || that_present_itemId) {
13221
        if (!(this_present_itemId && that_present_itemId))
13222
          return false;
13223
        if (this.itemId != that.itemId)
13224
          return false;
13225
      }
13226
 
13227
      boolean this_present_fromDate = true;
13228
      boolean that_present_fromDate = true;
13229
      if (this_present_fromDate || that_present_fromDate) {
13230
        if (!(this_present_fromDate && that_present_fromDate))
13231
          return false;
13232
        if (this.fromDate != that.fromDate)
13233
          return false;
13234
      }
13235
 
13236
      boolean this_present_toDate = true;
13237
      boolean that_present_toDate = true;
13238
      if (this_present_toDate || that_present_toDate) {
13239
        if (!(this_present_toDate && that_present_toDate))
13240
          return false;
13241
        if (this.toDate != that.toDate)
13242
          return false;
13243
      }
13244
 
13245
      return true;
13246
    }
13247
 
13248
    @Override
13249
    public int hashCode() {
13250
      return 0;
13251
    }
13252
 
13253
    public int compareTo(getInventoryScansForItem_args other) {
13254
      if (!getClass().equals(other.getClass())) {
13255
        return getClass().getName().compareTo(other.getClass().getName());
13256
      }
13257
 
13258
      int lastComparison = 0;
13259
      getInventoryScansForItem_args typedOther = (getInventoryScansForItem_args)other;
13260
 
13261
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
13262
      if (lastComparison != 0) {
13263
        return lastComparison;
13264
      }
13265
      if (isSetItemId()) {
13266
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
13267
        if (lastComparison != 0) {
13268
          return lastComparison;
13269
        }
13270
      }
13271
      lastComparison = Boolean.valueOf(isSetFromDate()).compareTo(typedOther.isSetFromDate());
13272
      if (lastComparison != 0) {
13273
        return lastComparison;
13274
      }
13275
      if (isSetFromDate()) {
13276
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fromDate, typedOther.fromDate);
13277
        if (lastComparison != 0) {
13278
          return lastComparison;
13279
        }
13280
      }
13281
      lastComparison = Boolean.valueOf(isSetToDate()).compareTo(typedOther.isSetToDate());
13282
      if (lastComparison != 0) {
13283
        return lastComparison;
13284
      }
13285
      if (isSetToDate()) {
13286
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.toDate, typedOther.toDate);
13287
        if (lastComparison != 0) {
13288
          return lastComparison;
13289
        }
13290
      }
13291
      return 0;
13292
    }
13293
 
13294
    public _Fields fieldForId(int fieldId) {
13295
      return _Fields.findByThriftId(fieldId);
13296
    }
13297
 
13298
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13299
      org.apache.thrift.protocol.TField field;
13300
      iprot.readStructBegin();
13301
      while (true)
13302
      {
13303
        field = iprot.readFieldBegin();
13304
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13305
          break;
13306
        }
13307
        switch (field.id) {
13308
          case 1: // ITEM_ID
13309
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13310
              this.itemId = iprot.readI64();
13311
              setItemIdIsSet(true);
13312
            } else { 
13313
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13314
            }
13315
            break;
13316
          case 2: // FROM_DATE
13317
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13318
              this.fromDate = iprot.readI64();
13319
              setFromDateIsSet(true);
13320
            } else { 
13321
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13322
            }
13323
            break;
13324
          case 3: // TO_DATE
13325
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13326
              this.toDate = iprot.readI64();
13327
              setToDateIsSet(true);
13328
            } else { 
13329
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13330
            }
13331
            break;
13332
          default:
13333
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13334
        }
13335
        iprot.readFieldEnd();
13336
      }
13337
      iprot.readStructEnd();
13338
      validate();
13339
    }
13340
 
13341
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13342
      validate();
13343
 
13344
      oprot.writeStructBegin(STRUCT_DESC);
13345
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
13346
      oprot.writeI64(this.itemId);
13347
      oprot.writeFieldEnd();
13348
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
13349
      oprot.writeI64(this.fromDate);
13350
      oprot.writeFieldEnd();
13351
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
13352
      oprot.writeI64(this.toDate);
13353
      oprot.writeFieldEnd();
13354
      oprot.writeFieldStop();
13355
      oprot.writeStructEnd();
13356
    }
13357
 
13358
    @Override
13359
    public String toString() {
13360
      StringBuilder sb = new StringBuilder("getInventoryScansForItem_args(");
13361
      boolean first = true;
13362
 
13363
      sb.append("itemId:");
13364
      sb.append(this.itemId);
13365
      first = false;
13366
      if (!first) sb.append(", ");
13367
      sb.append("fromDate:");
13368
      sb.append(this.fromDate);
13369
      first = false;
13370
      if (!first) sb.append(", ");
13371
      sb.append("toDate:");
13372
      sb.append(this.toDate);
13373
      first = false;
13374
      sb.append(")");
13375
      return sb.toString();
13376
    }
13377
 
13378
    public void validate() throws org.apache.thrift.TException {
13379
      // check for required fields
13380
    }
13381
 
13382
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13383
      try {
13384
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13385
      } catch (org.apache.thrift.TException te) {
13386
        throw new java.io.IOException(te);
13387
      }
13388
    }
13389
 
13390
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13391
      try {
13392
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13393
      } catch (org.apache.thrift.TException te) {
13394
        throw new java.io.IOException(te);
13395
      }
13396
    }
13397
 
13398
  }
13399
 
13400
  public static class getInventoryScansForItem_result implements org.apache.thrift.TBase<getInventoryScansForItem_result, getInventoryScansForItem_result._Fields>, java.io.Serializable, Cloneable   {
13401
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryScansForItem_result");
13402
 
13403
    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);
13404
 
13405
    private List<Scan> success; // required
13406
 
13407
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13408
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13409
      SUCCESS((short)0, "success");
13410
 
13411
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13412
 
13413
      static {
13414
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13415
          byName.put(field.getFieldName(), field);
13416
        }
13417
      }
13418
 
13419
      /**
13420
       * Find the _Fields constant that matches fieldId, or null if its not found.
13421
       */
13422
      public static _Fields findByThriftId(int fieldId) {
13423
        switch(fieldId) {
13424
          case 0: // SUCCESS
13425
            return SUCCESS;
13426
          default:
13427
            return null;
13428
        }
13429
      }
13430
 
13431
      /**
13432
       * Find the _Fields constant that matches fieldId, throwing an exception
13433
       * if it is not found.
13434
       */
13435
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13436
        _Fields fields = findByThriftId(fieldId);
13437
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13438
        return fields;
13439
      }
13440
 
13441
      /**
13442
       * Find the _Fields constant that matches name, or null if its not found.
13443
       */
13444
      public static _Fields findByName(String name) {
13445
        return byName.get(name);
13446
      }
13447
 
13448
      private final short _thriftId;
13449
      private final String _fieldName;
13450
 
13451
      _Fields(short thriftId, String fieldName) {
13452
        _thriftId = thriftId;
13453
        _fieldName = fieldName;
13454
      }
13455
 
13456
      public short getThriftFieldId() {
13457
        return _thriftId;
13458
      }
13459
 
13460
      public String getFieldName() {
13461
        return _fieldName;
13462
      }
13463
    }
13464
 
13465
    // isset id assignments
13466
 
13467
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13468
    static {
13469
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13470
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13471
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
13472
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Scan.class))));
13473
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13474
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryScansForItem_result.class, metaDataMap);
13475
    }
13476
 
13477
    public getInventoryScansForItem_result() {
13478
    }
13479
 
13480
    public getInventoryScansForItem_result(
13481
      List<Scan> success)
13482
    {
13483
      this();
13484
      this.success = success;
13485
    }
13486
 
13487
    /**
13488
     * Performs a deep copy on <i>other</i>.
13489
     */
13490
    public getInventoryScansForItem_result(getInventoryScansForItem_result other) {
13491
      if (other.isSetSuccess()) {
13492
        List<Scan> __this__success = new ArrayList<Scan>();
13493
        for (Scan other_element : other.success) {
13494
          __this__success.add(new Scan(other_element));
13495
        }
13496
        this.success = __this__success;
13497
      }
13498
    }
13499
 
13500
    public getInventoryScansForItem_result deepCopy() {
13501
      return new getInventoryScansForItem_result(this);
13502
    }
13503
 
13504
    @Override
13505
    public void clear() {
13506
      this.success = null;
13507
    }
13508
 
13509
    public int getSuccessSize() {
13510
      return (this.success == null) ? 0 : this.success.size();
13511
    }
13512
 
13513
    public java.util.Iterator<Scan> getSuccessIterator() {
13514
      return (this.success == null) ? null : this.success.iterator();
13515
    }
13516
 
13517
    public void addToSuccess(Scan elem) {
13518
      if (this.success == null) {
13519
        this.success = new ArrayList<Scan>();
13520
      }
13521
      this.success.add(elem);
13522
    }
13523
 
13524
    public List<Scan> getSuccess() {
13525
      return this.success;
13526
    }
13527
 
13528
    public void setSuccess(List<Scan> success) {
13529
      this.success = success;
13530
    }
13531
 
13532
    public void unsetSuccess() {
13533
      this.success = null;
13534
    }
13535
 
13536
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
13537
    public boolean isSetSuccess() {
13538
      return this.success != null;
13539
    }
13540
 
13541
    public void setSuccessIsSet(boolean value) {
13542
      if (!value) {
13543
        this.success = null;
13544
      }
13545
    }
13546
 
13547
    public void setFieldValue(_Fields field, Object value) {
13548
      switch (field) {
13549
      case SUCCESS:
13550
        if (value == null) {
13551
          unsetSuccess();
13552
        } else {
13553
          setSuccess((List<Scan>)value);
13554
        }
13555
        break;
13556
 
13557
      }
13558
    }
13559
 
13560
    public Object getFieldValue(_Fields field) {
13561
      switch (field) {
13562
      case SUCCESS:
13563
        return getSuccess();
13564
 
13565
      }
13566
      throw new IllegalStateException();
13567
    }
13568
 
13569
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13570
    public boolean isSet(_Fields field) {
13571
      if (field == null) {
13572
        throw new IllegalArgumentException();
13573
      }
13574
 
13575
      switch (field) {
13576
      case SUCCESS:
13577
        return isSetSuccess();
13578
      }
13579
      throw new IllegalStateException();
13580
    }
13581
 
13582
    @Override
13583
    public boolean equals(Object that) {
13584
      if (that == null)
13585
        return false;
13586
      if (that instanceof getInventoryScansForItem_result)
13587
        return this.equals((getInventoryScansForItem_result)that);
13588
      return false;
13589
    }
13590
 
13591
    public boolean equals(getInventoryScansForItem_result that) {
13592
      if (that == null)
13593
        return false;
13594
 
13595
      boolean this_present_success = true && this.isSetSuccess();
13596
      boolean that_present_success = true && that.isSetSuccess();
13597
      if (this_present_success || that_present_success) {
13598
        if (!(this_present_success && that_present_success))
13599
          return false;
13600
        if (!this.success.equals(that.success))
13601
          return false;
13602
      }
13603
 
13604
      return true;
13605
    }
13606
 
13607
    @Override
13608
    public int hashCode() {
13609
      return 0;
13610
    }
13611
 
13612
    public int compareTo(getInventoryScansForItem_result other) {
13613
      if (!getClass().equals(other.getClass())) {
13614
        return getClass().getName().compareTo(other.getClass().getName());
13615
      }
13616
 
13617
      int lastComparison = 0;
13618
      getInventoryScansForItem_result typedOther = (getInventoryScansForItem_result)other;
13619
 
13620
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
13621
      if (lastComparison != 0) {
13622
        return lastComparison;
13623
      }
13624
      if (isSetSuccess()) {
13625
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
13626
        if (lastComparison != 0) {
13627
          return lastComparison;
13628
        }
13629
      }
13630
      return 0;
13631
    }
13632
 
13633
    public _Fields fieldForId(int fieldId) {
13634
      return _Fields.findByThriftId(fieldId);
13635
    }
13636
 
13637
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13638
      org.apache.thrift.protocol.TField field;
13639
      iprot.readStructBegin();
13640
      while (true)
13641
      {
13642
        field = iprot.readFieldBegin();
13643
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13644
          break;
13645
        }
13646
        switch (field.id) {
13647
          case 0: // SUCCESS
13648
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
13649
              {
13650
                org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
13651
                this.success = new ArrayList<Scan>(_list24.size);
13652
                for (int _i25 = 0; _i25 < _list24.size; ++_i25)
13653
                {
13654
                  Scan _elem26; // required
13655
                  _elem26 = new Scan();
13656
                  _elem26.read(iprot);
13657
                  this.success.add(_elem26);
13658
                }
13659
                iprot.readListEnd();
13660
              }
13661
            } else { 
13662
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13663
            }
13664
            break;
13665
          default:
13666
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13667
        }
13668
        iprot.readFieldEnd();
13669
      }
13670
      iprot.readStructEnd();
13671
      validate();
13672
    }
13673
 
13674
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13675
      oprot.writeStructBegin(STRUCT_DESC);
13676
 
13677
      if (this.isSetSuccess()) {
13678
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13679
        {
13680
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
13681
          for (Scan _iter27 : this.success)
13682
          {
13683
            _iter27.write(oprot);
13684
          }
13685
          oprot.writeListEnd();
13686
        }
13687
        oprot.writeFieldEnd();
13688
      }
13689
      oprot.writeFieldStop();
13690
      oprot.writeStructEnd();
13691
    }
13692
 
13693
    @Override
13694
    public String toString() {
13695
      StringBuilder sb = new StringBuilder("getInventoryScansForItem_result(");
13696
      boolean first = true;
13697
 
13698
      sb.append("success:");
13699
      if (this.success == null) {
13700
        sb.append("null");
13701
      } else {
13702
        sb.append(this.success);
13703
      }
13704
      first = false;
13705
      sb.append(")");
13706
      return sb.toString();
13707
    }
13708
 
13709
    public void validate() throws org.apache.thrift.TException {
13710
      // check for required fields
13711
    }
13712
 
13713
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13714
      try {
13715
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13716
      } catch (org.apache.thrift.TException te) {
13717
        throw new java.io.IOException(te);
13718
      }
13719
    }
13720
 
13721
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13722
      try {
13723
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13724
      } catch (org.apache.thrift.TException te) {
13725
        throw new java.io.IOException(te);
13726
      }
13727
    }
13728
 
13729
  }
13730
 
13731
  public static class getScanRecordsForSerialNumber_args implements org.apache.thrift.TBase<getScanRecordsForSerialNumber_args, getScanRecordsForSerialNumber_args._Fields>, java.io.Serializable, Cloneable   {
13732
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScanRecordsForSerialNumber_args");
13733
 
13734
    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);
13735
 
13736
    private long serialNumber; // required
13737
 
13738
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13739
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13740
      SERIAL_NUMBER((short)1, "serialNumber");
13741
 
13742
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13743
 
13744
      static {
13745
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13746
          byName.put(field.getFieldName(), field);
13747
        }
13748
      }
13749
 
13750
      /**
13751
       * Find the _Fields constant that matches fieldId, or null if its not found.
13752
       */
13753
      public static _Fields findByThriftId(int fieldId) {
13754
        switch(fieldId) {
13755
          case 1: // SERIAL_NUMBER
13756
            return SERIAL_NUMBER;
13757
          default:
13758
            return null;
13759
        }
13760
      }
13761
 
13762
      /**
13763
       * Find the _Fields constant that matches fieldId, throwing an exception
13764
       * if it is not found.
13765
       */
13766
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13767
        _Fields fields = findByThriftId(fieldId);
13768
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13769
        return fields;
13770
      }
13771
 
13772
      /**
13773
       * Find the _Fields constant that matches name, or null if its not found.
13774
       */
13775
      public static _Fields findByName(String name) {
13776
        return byName.get(name);
13777
      }
13778
 
13779
      private final short _thriftId;
13780
      private final String _fieldName;
13781
 
13782
      _Fields(short thriftId, String fieldName) {
13783
        _thriftId = thriftId;
13784
        _fieldName = fieldName;
13785
      }
13786
 
13787
      public short getThriftFieldId() {
13788
        return _thriftId;
13789
      }
13790
 
13791
      public String getFieldName() {
13792
        return _fieldName;
13793
      }
13794
    }
13795
 
13796
    // isset id assignments
13797
    private static final int __SERIALNUMBER_ISSET_ID = 0;
13798
    private BitSet __isset_bit_vector = new BitSet(1);
13799
 
13800
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13801
    static {
13802
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13803
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13804
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13805
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13806
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScanRecordsForSerialNumber_args.class, metaDataMap);
13807
    }
13808
 
13809
    public getScanRecordsForSerialNumber_args() {
13810
    }
13811
 
13812
    public getScanRecordsForSerialNumber_args(
13813
      long serialNumber)
13814
    {
13815
      this();
13816
      this.serialNumber = serialNumber;
13817
      setSerialNumberIsSet(true);
13818
    }
13819
 
13820
    /**
13821
     * Performs a deep copy on <i>other</i>.
13822
     */
13823
    public getScanRecordsForSerialNumber_args(getScanRecordsForSerialNumber_args other) {
13824
      __isset_bit_vector.clear();
13825
      __isset_bit_vector.or(other.__isset_bit_vector);
13826
      this.serialNumber = other.serialNumber;
13827
    }
13828
 
13829
    public getScanRecordsForSerialNumber_args deepCopy() {
13830
      return new getScanRecordsForSerialNumber_args(this);
13831
    }
13832
 
13833
    @Override
13834
    public void clear() {
13835
      setSerialNumberIsSet(false);
13836
      this.serialNumber = 0;
13837
    }
13838
 
13839
    public long getSerialNumber() {
13840
      return this.serialNumber;
13841
    }
13842
 
13843
    public void setSerialNumber(long serialNumber) {
13844
      this.serialNumber = serialNumber;
13845
      setSerialNumberIsSet(true);
13846
    }
13847
 
13848
    public void unsetSerialNumber() {
13849
      __isset_bit_vector.clear(__SERIALNUMBER_ISSET_ID);
13850
    }
13851
 
13852
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
13853
    public boolean isSetSerialNumber() {
13854
      return __isset_bit_vector.get(__SERIALNUMBER_ISSET_ID);
13855
    }
13856
 
13857
    public void setSerialNumberIsSet(boolean value) {
13858
      __isset_bit_vector.set(__SERIALNUMBER_ISSET_ID, value);
13859
    }
13860
 
13861
    public void setFieldValue(_Fields field, Object value) {
13862
      switch (field) {
13863
      case SERIAL_NUMBER:
13864
        if (value == null) {
13865
          unsetSerialNumber();
13866
        } else {
13867
          setSerialNumber((Long)value);
13868
        }
13869
        break;
13870
 
13871
      }
13872
    }
13873
 
13874
    public Object getFieldValue(_Fields field) {
13875
      switch (field) {
13876
      case SERIAL_NUMBER:
13877
        return Long.valueOf(getSerialNumber());
13878
 
13879
      }
13880
      throw new IllegalStateException();
13881
    }
13882
 
13883
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13884
    public boolean isSet(_Fields field) {
13885
      if (field == null) {
13886
        throw new IllegalArgumentException();
13887
      }
13888
 
13889
      switch (field) {
13890
      case SERIAL_NUMBER:
13891
        return isSetSerialNumber();
13892
      }
13893
      throw new IllegalStateException();
13894
    }
13895
 
13896
    @Override
13897
    public boolean equals(Object that) {
13898
      if (that == null)
13899
        return false;
13900
      if (that instanceof getScanRecordsForSerialNumber_args)
13901
        return this.equals((getScanRecordsForSerialNumber_args)that);
13902
      return false;
13903
    }
13904
 
13905
    public boolean equals(getScanRecordsForSerialNumber_args that) {
13906
      if (that == null)
13907
        return false;
13908
 
13909
      boolean this_present_serialNumber = true;
13910
      boolean that_present_serialNumber = true;
13911
      if (this_present_serialNumber || that_present_serialNumber) {
13912
        if (!(this_present_serialNumber && that_present_serialNumber))
13913
          return false;
13914
        if (this.serialNumber != that.serialNumber)
13915
          return false;
13916
      }
13917
 
13918
      return true;
13919
    }
13920
 
13921
    @Override
13922
    public int hashCode() {
13923
      return 0;
13924
    }
13925
 
13926
    public int compareTo(getScanRecordsForSerialNumber_args other) {
13927
      if (!getClass().equals(other.getClass())) {
13928
        return getClass().getName().compareTo(other.getClass().getName());
13929
      }
13930
 
13931
      int lastComparison = 0;
13932
      getScanRecordsForSerialNumber_args typedOther = (getScanRecordsForSerialNumber_args)other;
13933
 
13934
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
13935
      if (lastComparison != 0) {
13936
        return lastComparison;
13937
      }
13938
      if (isSetSerialNumber()) {
13939
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
13940
        if (lastComparison != 0) {
13941
          return lastComparison;
13942
        }
13943
      }
13944
      return 0;
13945
    }
13946
 
13947
    public _Fields fieldForId(int fieldId) {
13948
      return _Fields.findByThriftId(fieldId);
13949
    }
13950
 
13951
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13952
      org.apache.thrift.protocol.TField field;
13953
      iprot.readStructBegin();
13954
      while (true)
13955
      {
13956
        field = iprot.readFieldBegin();
13957
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13958
          break;
13959
        }
13960
        switch (field.id) {
13961
          case 1: // SERIAL_NUMBER
13962
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13963
              this.serialNumber = iprot.readI64();
13964
              setSerialNumberIsSet(true);
13965
            } else { 
13966
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13967
            }
13968
            break;
13969
          default:
13970
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13971
        }
13972
        iprot.readFieldEnd();
13973
      }
13974
      iprot.readStructEnd();
13975
      validate();
13976
    }
13977
 
13978
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13979
      validate();
13980
 
13981
      oprot.writeStructBegin(STRUCT_DESC);
13982
      oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
13983
      oprot.writeI64(this.serialNumber);
13984
      oprot.writeFieldEnd();
13985
      oprot.writeFieldStop();
13986
      oprot.writeStructEnd();
13987
    }
13988
 
13989
    @Override
13990
    public String toString() {
13991
      StringBuilder sb = new StringBuilder("getScanRecordsForSerialNumber_args(");
13992
      boolean first = true;
13993
 
13994
      sb.append("serialNumber:");
13995
      sb.append(this.serialNumber);
13996
      first = false;
13997
      sb.append(")");
13998
      return sb.toString();
13999
    }
14000
 
14001
    public void validate() throws org.apache.thrift.TException {
14002
      // check for required fields
14003
    }
14004
 
14005
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14006
      try {
14007
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14008
      } catch (org.apache.thrift.TException te) {
14009
        throw new java.io.IOException(te);
14010
      }
14011
    }
14012
 
14013
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14014
      try {
14015
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
14016
        __isset_bit_vector = new BitSet(1);
14017
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14018
      } catch (org.apache.thrift.TException te) {
14019
        throw new java.io.IOException(te);
14020
      }
14021
    }
14022
 
14023
  }
14024
 
14025
  public static class getScanRecordsForSerialNumber_result implements org.apache.thrift.TBase<getScanRecordsForSerialNumber_result, getScanRecordsForSerialNumber_result._Fields>, java.io.Serializable, Cloneable   {
14026
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScanRecordsForSerialNumber_result");
14027
 
14028
    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);
14029
 
14030
    private List<Scan> success; // required
14031
 
14032
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14033
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14034
      SUCCESS((short)0, "success");
14035
 
14036
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14037
 
14038
      static {
14039
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14040
          byName.put(field.getFieldName(), field);
14041
        }
14042
      }
14043
 
14044
      /**
14045
       * Find the _Fields constant that matches fieldId, or null if its not found.
14046
       */
14047
      public static _Fields findByThriftId(int fieldId) {
14048
        switch(fieldId) {
14049
          case 0: // SUCCESS
14050
            return SUCCESS;
14051
          default:
14052
            return null;
14053
        }
14054
      }
14055
 
14056
      /**
14057
       * Find the _Fields constant that matches fieldId, throwing an exception
14058
       * if it is not found.
14059
       */
14060
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14061
        _Fields fields = findByThriftId(fieldId);
14062
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14063
        return fields;
14064
      }
14065
 
14066
      /**
14067
       * Find the _Fields constant that matches name, or null if its not found.
14068
       */
14069
      public static _Fields findByName(String name) {
14070
        return byName.get(name);
14071
      }
14072
 
14073
      private final short _thriftId;
14074
      private final String _fieldName;
14075
 
14076
      _Fields(short thriftId, String fieldName) {
14077
        _thriftId = thriftId;
14078
        _fieldName = fieldName;
14079
      }
14080
 
14081
      public short getThriftFieldId() {
14082
        return _thriftId;
14083
      }
14084
 
14085
      public String getFieldName() {
14086
        return _fieldName;
14087
      }
14088
    }
14089
 
14090
    // isset id assignments
14091
 
14092
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14093
    static {
14094
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14095
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14096
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
14097
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Scan.class))));
14098
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14099
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScanRecordsForSerialNumber_result.class, metaDataMap);
14100
    }
14101
 
14102
    public getScanRecordsForSerialNumber_result() {
14103
    }
14104
 
14105
    public getScanRecordsForSerialNumber_result(
14106
      List<Scan> success)
14107
    {
14108
      this();
14109
      this.success = success;
14110
    }
14111
 
14112
    /**
14113
     * Performs a deep copy on <i>other</i>.
14114
     */
14115
    public getScanRecordsForSerialNumber_result(getScanRecordsForSerialNumber_result other) {
14116
      if (other.isSetSuccess()) {
14117
        List<Scan> __this__success = new ArrayList<Scan>();
14118
        for (Scan other_element : other.success) {
14119
          __this__success.add(new Scan(other_element));
14120
        }
14121
        this.success = __this__success;
14122
      }
14123
    }
14124
 
14125
    public getScanRecordsForSerialNumber_result deepCopy() {
14126
      return new getScanRecordsForSerialNumber_result(this);
14127
    }
14128
 
14129
    @Override
14130
    public void clear() {
14131
      this.success = null;
14132
    }
14133
 
14134
    public int getSuccessSize() {
14135
      return (this.success == null) ? 0 : this.success.size();
14136
    }
14137
 
14138
    public java.util.Iterator<Scan> getSuccessIterator() {
14139
      return (this.success == null) ? null : this.success.iterator();
14140
    }
14141
 
14142
    public void addToSuccess(Scan elem) {
14143
      if (this.success == null) {
14144
        this.success = new ArrayList<Scan>();
14145
      }
14146
      this.success.add(elem);
14147
    }
14148
 
14149
    public List<Scan> getSuccess() {
14150
      return this.success;
14151
    }
14152
 
14153
    public void setSuccess(List<Scan> success) {
14154
      this.success = success;
14155
    }
14156
 
14157
    public void unsetSuccess() {
14158
      this.success = null;
14159
    }
14160
 
14161
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
14162
    public boolean isSetSuccess() {
14163
      return this.success != null;
14164
    }
14165
 
14166
    public void setSuccessIsSet(boolean value) {
14167
      if (!value) {
14168
        this.success = null;
14169
      }
14170
    }
14171
 
14172
    public void setFieldValue(_Fields field, Object value) {
14173
      switch (field) {
14174
      case SUCCESS:
14175
        if (value == null) {
14176
          unsetSuccess();
14177
        } else {
14178
          setSuccess((List<Scan>)value);
14179
        }
14180
        break;
14181
 
14182
      }
14183
    }
14184
 
14185
    public Object getFieldValue(_Fields field) {
14186
      switch (field) {
14187
      case SUCCESS:
14188
        return getSuccess();
14189
 
14190
      }
14191
      throw new IllegalStateException();
14192
    }
14193
 
14194
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14195
    public boolean isSet(_Fields field) {
14196
      if (field == null) {
14197
        throw new IllegalArgumentException();
14198
      }
14199
 
14200
      switch (field) {
14201
      case SUCCESS:
14202
        return isSetSuccess();
14203
      }
14204
      throw new IllegalStateException();
14205
    }
14206
 
14207
    @Override
14208
    public boolean equals(Object that) {
14209
      if (that == null)
14210
        return false;
14211
      if (that instanceof getScanRecordsForSerialNumber_result)
14212
        return this.equals((getScanRecordsForSerialNumber_result)that);
14213
      return false;
14214
    }
14215
 
14216
    public boolean equals(getScanRecordsForSerialNumber_result that) {
14217
      if (that == null)
14218
        return false;
14219
 
14220
      boolean this_present_success = true && this.isSetSuccess();
14221
      boolean that_present_success = true && that.isSetSuccess();
14222
      if (this_present_success || that_present_success) {
14223
        if (!(this_present_success && that_present_success))
14224
          return false;
14225
        if (!this.success.equals(that.success))
14226
          return false;
14227
      }
14228
 
14229
      return true;
14230
    }
14231
 
14232
    @Override
14233
    public int hashCode() {
14234
      return 0;
14235
    }
14236
 
14237
    public int compareTo(getScanRecordsForSerialNumber_result other) {
14238
      if (!getClass().equals(other.getClass())) {
14239
        return getClass().getName().compareTo(other.getClass().getName());
14240
      }
14241
 
14242
      int lastComparison = 0;
14243
      getScanRecordsForSerialNumber_result typedOther = (getScanRecordsForSerialNumber_result)other;
14244
 
14245
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
14246
      if (lastComparison != 0) {
14247
        return lastComparison;
14248
      }
14249
      if (isSetSuccess()) {
14250
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
14251
        if (lastComparison != 0) {
14252
          return lastComparison;
14253
        }
14254
      }
14255
      return 0;
14256
    }
14257
 
14258
    public _Fields fieldForId(int fieldId) {
14259
      return _Fields.findByThriftId(fieldId);
14260
    }
14261
 
14262
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14263
      org.apache.thrift.protocol.TField field;
14264
      iprot.readStructBegin();
14265
      while (true)
14266
      {
14267
        field = iprot.readFieldBegin();
14268
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14269
          break;
14270
        }
14271
        switch (field.id) {
14272
          case 0: // SUCCESS
14273
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
14274
              {
14275
                org.apache.thrift.protocol.TList _list28 = iprot.readListBegin();
14276
                this.success = new ArrayList<Scan>(_list28.size);
14277
                for (int _i29 = 0; _i29 < _list28.size; ++_i29)
14278
                {
14279
                  Scan _elem30; // required
14280
                  _elem30 = new Scan();
14281
                  _elem30.read(iprot);
14282
                  this.success.add(_elem30);
14283
                }
14284
                iprot.readListEnd();
14285
              }
14286
            } else { 
14287
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14288
            }
14289
            break;
14290
          default:
14291
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14292
        }
14293
        iprot.readFieldEnd();
14294
      }
14295
      iprot.readStructEnd();
14296
      validate();
14297
    }
14298
 
14299
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14300
      oprot.writeStructBegin(STRUCT_DESC);
14301
 
14302
      if (this.isSetSuccess()) {
14303
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14304
        {
14305
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
14306
          for (Scan _iter31 : this.success)
14307
          {
14308
            _iter31.write(oprot);
14309
          }
14310
          oprot.writeListEnd();
14311
        }
14312
        oprot.writeFieldEnd();
14313
      }
14314
      oprot.writeFieldStop();
14315
      oprot.writeStructEnd();
14316
    }
14317
 
14318
    @Override
14319
    public String toString() {
14320
      StringBuilder sb = new StringBuilder("getScanRecordsForSerialNumber_result(");
14321
      boolean first = true;
14322
 
14323
      sb.append("success:");
14324
      if (this.success == null) {
14325
        sb.append("null");
14326
      } else {
14327
        sb.append(this.success);
14328
      }
14329
      first = false;
14330
      sb.append(")");
14331
      return sb.toString();
14332
    }
14333
 
14334
    public void validate() throws org.apache.thrift.TException {
14335
      // check for required fields
14336
    }
14337
 
14338
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14339
      try {
14340
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14341
      } catch (org.apache.thrift.TException te) {
14342
        throw new java.io.IOException(te);
14343
      }
14344
    }
14345
 
14346
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14347
      try {
14348
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14349
      } catch (org.apache.thrift.TException te) {
14350
        throw new java.io.IOException(te);
14351
      }
14352
    }
14353
 
14354
  }
14355
 
6467 amar.kumar 14356
  public static class scanForPurchaseReturn_args implements org.apache.thrift.TBase<scanForPurchaseReturn_args, scanForPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
14357
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForPurchaseReturn_args");
14358
 
14359
    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);
14360
    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);
14361
 
14362
    private List<InventoryItem> saleReturnItems; // required
14363
    private long vendorId; // required
14364
 
14365
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14366
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14367
      SALE_RETURN_ITEMS((short)1, "saleReturnItems"),
14368
      VENDOR_ID((short)2, "vendorId");
14369
 
14370
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14371
 
14372
      static {
14373
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14374
          byName.put(field.getFieldName(), field);
14375
        }
14376
      }
14377
 
14378
      /**
14379
       * Find the _Fields constant that matches fieldId, or null if its not found.
14380
       */
14381
      public static _Fields findByThriftId(int fieldId) {
14382
        switch(fieldId) {
14383
          case 1: // SALE_RETURN_ITEMS
14384
            return SALE_RETURN_ITEMS;
14385
          case 2: // VENDOR_ID
14386
            return VENDOR_ID;
14387
          default:
14388
            return null;
14389
        }
14390
      }
14391
 
14392
      /**
14393
       * Find the _Fields constant that matches fieldId, throwing an exception
14394
       * if it is not found.
14395
       */
14396
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14397
        _Fields fields = findByThriftId(fieldId);
14398
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14399
        return fields;
14400
      }
14401
 
14402
      /**
14403
       * Find the _Fields constant that matches name, or null if its not found.
14404
       */
14405
      public static _Fields findByName(String name) {
14406
        return byName.get(name);
14407
      }
14408
 
14409
      private final short _thriftId;
14410
      private final String _fieldName;
14411
 
14412
      _Fields(short thriftId, String fieldName) {
14413
        _thriftId = thriftId;
14414
        _fieldName = fieldName;
14415
      }
14416
 
14417
      public short getThriftFieldId() {
14418
        return _thriftId;
14419
      }
14420
 
14421
      public String getFieldName() {
14422
        return _fieldName;
14423
      }
14424
    }
14425
 
14426
    // isset id assignments
14427
    private static final int __VENDORID_ISSET_ID = 0;
14428
    private BitSet __isset_bit_vector = new BitSet(1);
14429
 
14430
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14431
    static {
14432
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14433
      tmpMap.put(_Fields.SALE_RETURN_ITEMS, new org.apache.thrift.meta_data.FieldMetaData("saleReturnItems", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14434
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
14435
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class))));
14436
      tmpMap.put(_Fields.VENDOR_ID, new org.apache.thrift.meta_data.FieldMetaData("vendorId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14437
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
14438
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14439
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForPurchaseReturn_args.class, metaDataMap);
14440
    }
14441
 
14442
    public scanForPurchaseReturn_args() {
14443
    }
14444
 
14445
    public scanForPurchaseReturn_args(
14446
      List<InventoryItem> saleReturnItems,
14447
      long vendorId)
14448
    {
14449
      this();
14450
      this.saleReturnItems = saleReturnItems;
14451
      this.vendorId = vendorId;
14452
      setVendorIdIsSet(true);
14453
    }
14454
 
14455
    /**
14456
     * Performs a deep copy on <i>other</i>.
14457
     */
14458
    public scanForPurchaseReturn_args(scanForPurchaseReturn_args other) {
14459
      __isset_bit_vector.clear();
14460
      __isset_bit_vector.or(other.__isset_bit_vector);
14461
      if (other.isSetSaleReturnItems()) {
14462
        List<InventoryItem> __this__saleReturnItems = new ArrayList<InventoryItem>();
14463
        for (InventoryItem other_element : other.saleReturnItems) {
14464
          __this__saleReturnItems.add(new InventoryItem(other_element));
14465
        }
14466
        this.saleReturnItems = __this__saleReturnItems;
14467
      }
14468
      this.vendorId = other.vendorId;
14469
    }
14470
 
14471
    public scanForPurchaseReturn_args deepCopy() {
14472
      return new scanForPurchaseReturn_args(this);
14473
    }
14474
 
14475
    @Override
14476
    public void clear() {
14477
      this.saleReturnItems = null;
14478
      setVendorIdIsSet(false);
14479
      this.vendorId = 0;
14480
    }
14481
 
14482
    public int getSaleReturnItemsSize() {
14483
      return (this.saleReturnItems == null) ? 0 : this.saleReturnItems.size();
14484
    }
14485
 
14486
    public java.util.Iterator<InventoryItem> getSaleReturnItemsIterator() {
14487
      return (this.saleReturnItems == null) ? null : this.saleReturnItems.iterator();
14488
    }
14489
 
14490
    public void addToSaleReturnItems(InventoryItem elem) {
14491
      if (this.saleReturnItems == null) {
14492
        this.saleReturnItems = new ArrayList<InventoryItem>();
14493
      }
14494
      this.saleReturnItems.add(elem);
14495
    }
14496
 
14497
    public List<InventoryItem> getSaleReturnItems() {
14498
      return this.saleReturnItems;
14499
    }
14500
 
14501
    public void setSaleReturnItems(List<InventoryItem> saleReturnItems) {
14502
      this.saleReturnItems = saleReturnItems;
14503
    }
14504
 
14505
    public void unsetSaleReturnItems() {
14506
      this.saleReturnItems = null;
14507
    }
14508
 
14509
    /** Returns true if field saleReturnItems is set (has been assigned a value) and false otherwise */
14510
    public boolean isSetSaleReturnItems() {
14511
      return this.saleReturnItems != null;
14512
    }
14513
 
14514
    public void setSaleReturnItemsIsSet(boolean value) {
14515
      if (!value) {
14516
        this.saleReturnItems = null;
14517
      }
14518
    }
14519
 
14520
    public long getVendorId() {
14521
      return this.vendorId;
14522
    }
14523
 
14524
    public void setVendorId(long vendorId) {
14525
      this.vendorId = vendorId;
14526
      setVendorIdIsSet(true);
14527
    }
14528
 
14529
    public void unsetVendorId() {
14530
      __isset_bit_vector.clear(__VENDORID_ISSET_ID);
14531
    }
14532
 
14533
    /** Returns true if field vendorId is set (has been assigned a value) and false otherwise */
14534
    public boolean isSetVendorId() {
14535
      return __isset_bit_vector.get(__VENDORID_ISSET_ID);
14536
    }
14537
 
14538
    public void setVendorIdIsSet(boolean value) {
14539
      __isset_bit_vector.set(__VENDORID_ISSET_ID, value);
14540
    }
14541
 
14542
    public void setFieldValue(_Fields field, Object value) {
14543
      switch (field) {
14544
      case SALE_RETURN_ITEMS:
14545
        if (value == null) {
14546
          unsetSaleReturnItems();
14547
        } else {
14548
          setSaleReturnItems((List<InventoryItem>)value);
14549
        }
14550
        break;
14551
 
14552
      case VENDOR_ID:
14553
        if (value == null) {
14554
          unsetVendorId();
14555
        } else {
14556
          setVendorId((Long)value);
14557
        }
14558
        break;
14559
 
14560
      }
14561
    }
14562
 
14563
    public Object getFieldValue(_Fields field) {
14564
      switch (field) {
14565
      case SALE_RETURN_ITEMS:
14566
        return getSaleReturnItems();
14567
 
14568
      case VENDOR_ID:
14569
        return Long.valueOf(getVendorId());
14570
 
14571
      }
14572
      throw new IllegalStateException();
14573
    }
14574
 
14575
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14576
    public boolean isSet(_Fields field) {
14577
      if (field == null) {
14578
        throw new IllegalArgumentException();
14579
      }
14580
 
14581
      switch (field) {
14582
      case SALE_RETURN_ITEMS:
14583
        return isSetSaleReturnItems();
14584
      case VENDOR_ID:
14585
        return isSetVendorId();
14586
      }
14587
      throw new IllegalStateException();
14588
    }
14589
 
14590
    @Override
14591
    public boolean equals(Object that) {
14592
      if (that == null)
14593
        return false;
14594
      if (that instanceof scanForPurchaseReturn_args)
14595
        return this.equals((scanForPurchaseReturn_args)that);
14596
      return false;
14597
    }
14598
 
14599
    public boolean equals(scanForPurchaseReturn_args that) {
14600
      if (that == null)
14601
        return false;
14602
 
14603
      boolean this_present_saleReturnItems = true && this.isSetSaleReturnItems();
14604
      boolean that_present_saleReturnItems = true && that.isSetSaleReturnItems();
14605
      if (this_present_saleReturnItems || that_present_saleReturnItems) {
14606
        if (!(this_present_saleReturnItems && that_present_saleReturnItems))
14607
          return false;
14608
        if (!this.saleReturnItems.equals(that.saleReturnItems))
14609
          return false;
14610
      }
14611
 
14612
      boolean this_present_vendorId = true;
14613
      boolean that_present_vendorId = true;
14614
      if (this_present_vendorId || that_present_vendorId) {
14615
        if (!(this_present_vendorId && that_present_vendorId))
14616
          return false;
14617
        if (this.vendorId != that.vendorId)
14618
          return false;
14619
      }
14620
 
14621
      return true;
14622
    }
14623
 
14624
    @Override
14625
    public int hashCode() {
14626
      return 0;
14627
    }
14628
 
14629
    public int compareTo(scanForPurchaseReturn_args other) {
14630
      if (!getClass().equals(other.getClass())) {
14631
        return getClass().getName().compareTo(other.getClass().getName());
14632
      }
14633
 
14634
      int lastComparison = 0;
14635
      scanForPurchaseReturn_args typedOther = (scanForPurchaseReturn_args)other;
14636
 
14637
      lastComparison = Boolean.valueOf(isSetSaleReturnItems()).compareTo(typedOther.isSetSaleReturnItems());
14638
      if (lastComparison != 0) {
14639
        return lastComparison;
14640
      }
14641
      if (isSetSaleReturnItems()) {
14642
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.saleReturnItems, typedOther.saleReturnItems);
14643
        if (lastComparison != 0) {
14644
          return lastComparison;
14645
        }
14646
      }
14647
      lastComparison = Boolean.valueOf(isSetVendorId()).compareTo(typedOther.isSetVendorId());
14648
      if (lastComparison != 0) {
14649
        return lastComparison;
14650
      }
14651
      if (isSetVendorId()) {
14652
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vendorId, typedOther.vendorId);
14653
        if (lastComparison != 0) {
14654
          return lastComparison;
14655
        }
14656
      }
14657
      return 0;
14658
    }
14659
 
14660
    public _Fields fieldForId(int fieldId) {
14661
      return _Fields.findByThriftId(fieldId);
14662
    }
14663
 
14664
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14665
      org.apache.thrift.protocol.TField field;
14666
      iprot.readStructBegin();
14667
      while (true)
14668
      {
14669
        field = iprot.readFieldBegin();
14670
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14671
          break;
14672
        }
14673
        switch (field.id) {
14674
          case 1: // SALE_RETURN_ITEMS
14675
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
14676
              {
14677
                org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
14678
                this.saleReturnItems = new ArrayList<InventoryItem>(_list32.size);
14679
                for (int _i33 = 0; _i33 < _list32.size; ++_i33)
14680
                {
14681
                  InventoryItem _elem34; // required
14682
                  _elem34 = new InventoryItem();
14683
                  _elem34.read(iprot);
14684
                  this.saleReturnItems.add(_elem34);
14685
                }
14686
                iprot.readListEnd();
14687
              }
14688
            } else { 
14689
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14690
            }
14691
            break;
14692
          case 2: // VENDOR_ID
14693
            if (field.type == org.apache.thrift.protocol.TType.I64) {
14694
              this.vendorId = iprot.readI64();
14695
              setVendorIdIsSet(true);
14696
            } else { 
14697
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14698
            }
14699
            break;
14700
          default:
14701
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14702
        }
14703
        iprot.readFieldEnd();
14704
      }
14705
      iprot.readStructEnd();
14706
      validate();
14707
    }
14708
 
14709
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14710
      validate();
14711
 
14712
      oprot.writeStructBegin(STRUCT_DESC);
14713
      if (this.saleReturnItems != null) {
14714
        oprot.writeFieldBegin(SALE_RETURN_ITEMS_FIELD_DESC);
14715
        {
14716
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.saleReturnItems.size()));
14717
          for (InventoryItem _iter35 : this.saleReturnItems)
14718
          {
14719
            _iter35.write(oprot);
14720
          }
14721
          oprot.writeListEnd();
14722
        }
14723
        oprot.writeFieldEnd();
14724
      }
14725
      oprot.writeFieldBegin(VENDOR_ID_FIELD_DESC);
14726
      oprot.writeI64(this.vendorId);
14727
      oprot.writeFieldEnd();
14728
      oprot.writeFieldStop();
14729
      oprot.writeStructEnd();
14730
    }
14731
 
14732
    @Override
14733
    public String toString() {
14734
      StringBuilder sb = new StringBuilder("scanForPurchaseReturn_args(");
14735
      boolean first = true;
14736
 
14737
      sb.append("saleReturnItems:");
14738
      if (this.saleReturnItems == null) {
14739
        sb.append("null");
14740
      } else {
14741
        sb.append(this.saleReturnItems);
14742
      }
14743
      first = false;
14744
      if (!first) sb.append(", ");
14745
      sb.append("vendorId:");
14746
      sb.append(this.vendorId);
14747
      first = false;
14748
      sb.append(")");
14749
      return sb.toString();
14750
    }
14751
 
14752
    public void validate() throws org.apache.thrift.TException {
14753
      // check for required fields
14754
    }
14755
 
14756
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14757
      try {
14758
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14759
      } catch (org.apache.thrift.TException te) {
14760
        throw new java.io.IOException(te);
14761
      }
14762
    }
14763
 
14764
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14765
      try {
14766
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14767
      } catch (org.apache.thrift.TException te) {
14768
        throw new java.io.IOException(te);
14769
      }
14770
    }
14771
 
14772
  }
14773
 
14774
  public static class scanForPurchaseReturn_result implements org.apache.thrift.TBase<scanForPurchaseReturn_result, scanForPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
14775
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForPurchaseReturn_result");
14776
 
14777
    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);
14778
 
14779
    private WarehouseServiceException ex; // required
14780
 
14781
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14782
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14783
      EX((short)1, "ex");
14784
 
14785
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14786
 
14787
      static {
14788
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14789
          byName.put(field.getFieldName(), field);
14790
        }
14791
      }
14792
 
14793
      /**
14794
       * Find the _Fields constant that matches fieldId, or null if its not found.
14795
       */
14796
      public static _Fields findByThriftId(int fieldId) {
14797
        switch(fieldId) {
14798
          case 1: // EX
14799
            return EX;
14800
          default:
14801
            return null;
14802
        }
14803
      }
14804
 
14805
      /**
14806
       * Find the _Fields constant that matches fieldId, throwing an exception
14807
       * if it is not found.
14808
       */
14809
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14810
        _Fields fields = findByThriftId(fieldId);
14811
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14812
        return fields;
14813
      }
14814
 
14815
      /**
14816
       * Find the _Fields constant that matches name, or null if its not found.
14817
       */
14818
      public static _Fields findByName(String name) {
14819
        return byName.get(name);
14820
      }
14821
 
14822
      private final short _thriftId;
14823
      private final String _fieldName;
14824
 
14825
      _Fields(short thriftId, String fieldName) {
14826
        _thriftId = thriftId;
14827
        _fieldName = fieldName;
14828
      }
14829
 
14830
      public short getThriftFieldId() {
14831
        return _thriftId;
14832
      }
14833
 
14834
      public String getFieldName() {
14835
        return _fieldName;
14836
      }
14837
    }
14838
 
14839
    // isset id assignments
14840
 
14841
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14842
    static {
14843
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14844
      tmpMap.put(_Fields.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14845
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
14846
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14847
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForPurchaseReturn_result.class, metaDataMap);
14848
    }
14849
 
14850
    public scanForPurchaseReturn_result() {
14851
    }
14852
 
14853
    public scanForPurchaseReturn_result(
14854
      WarehouseServiceException ex)
14855
    {
14856
      this();
14857
      this.ex = ex;
14858
    }
14859
 
14860
    /**
14861
     * Performs a deep copy on <i>other</i>.
14862
     */
14863
    public scanForPurchaseReturn_result(scanForPurchaseReturn_result other) {
14864
      if (other.isSetEx()) {
14865
        this.ex = new WarehouseServiceException(other.ex);
14866
      }
14867
    }
14868
 
14869
    public scanForPurchaseReturn_result deepCopy() {
14870
      return new scanForPurchaseReturn_result(this);
14871
    }
14872
 
14873
    @Override
14874
    public void clear() {
14875
      this.ex = null;
14876
    }
14877
 
14878
    public WarehouseServiceException getEx() {
14879
      return this.ex;
14880
    }
14881
 
14882
    public void setEx(WarehouseServiceException ex) {
14883
      this.ex = ex;
14884
    }
14885
 
14886
    public void unsetEx() {
14887
      this.ex = null;
14888
    }
14889
 
14890
    /** Returns true if field ex is set (has been assigned a value) and false otherwise */
14891
    public boolean isSetEx() {
14892
      return this.ex != null;
14893
    }
14894
 
14895
    public void setExIsSet(boolean value) {
14896
      if (!value) {
14897
        this.ex = null;
14898
      }
14899
    }
14900
 
14901
    public void setFieldValue(_Fields field, Object value) {
14902
      switch (field) {
14903
      case EX:
14904
        if (value == null) {
14905
          unsetEx();
14906
        } else {
14907
          setEx((WarehouseServiceException)value);
14908
        }
14909
        break;
14910
 
14911
      }
14912
    }
14913
 
14914
    public Object getFieldValue(_Fields field) {
14915
      switch (field) {
14916
      case EX:
14917
        return getEx();
14918
 
14919
      }
14920
      throw new IllegalStateException();
14921
    }
14922
 
14923
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14924
    public boolean isSet(_Fields field) {
14925
      if (field == null) {
14926
        throw new IllegalArgumentException();
14927
      }
14928
 
14929
      switch (field) {
14930
      case EX:
14931
        return isSetEx();
14932
      }
14933
      throw new IllegalStateException();
14934
    }
14935
 
14936
    @Override
14937
    public boolean equals(Object that) {
14938
      if (that == null)
14939
        return false;
14940
      if (that instanceof scanForPurchaseReturn_result)
14941
        return this.equals((scanForPurchaseReturn_result)that);
14942
      return false;
14943
    }
14944
 
14945
    public boolean equals(scanForPurchaseReturn_result that) {
14946
      if (that == null)
14947
        return false;
14948
 
14949
      boolean this_present_ex = true && this.isSetEx();
14950
      boolean that_present_ex = true && that.isSetEx();
14951
      if (this_present_ex || that_present_ex) {
14952
        if (!(this_present_ex && that_present_ex))
14953
          return false;
14954
        if (!this.ex.equals(that.ex))
14955
          return false;
14956
      }
14957
 
14958
      return true;
14959
    }
14960
 
14961
    @Override
14962
    public int hashCode() {
14963
      return 0;
14964
    }
14965
 
14966
    public int compareTo(scanForPurchaseReturn_result other) {
14967
      if (!getClass().equals(other.getClass())) {
14968
        return getClass().getName().compareTo(other.getClass().getName());
14969
      }
14970
 
14971
      int lastComparison = 0;
14972
      scanForPurchaseReturn_result typedOther = (scanForPurchaseReturn_result)other;
14973
 
14974
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx());
14975
      if (lastComparison != 0) {
14976
        return lastComparison;
14977
      }
14978
      if (isSetEx()) {
14979
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, typedOther.ex);
14980
        if (lastComparison != 0) {
14981
          return lastComparison;
14982
        }
14983
      }
14984
      return 0;
14985
    }
14986
 
14987
    public _Fields fieldForId(int fieldId) {
14988
      return _Fields.findByThriftId(fieldId);
14989
    }
14990
 
14991
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14992
      org.apache.thrift.protocol.TField field;
14993
      iprot.readStructBegin();
14994
      while (true)
14995
      {
14996
        field = iprot.readFieldBegin();
14997
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14998
          break;
14999
        }
15000
        switch (field.id) {
15001
          case 1: // EX
15002
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15003
              this.ex = new WarehouseServiceException();
15004
              this.ex.read(iprot);
15005
            } else { 
15006
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15007
            }
15008
            break;
15009
          default:
15010
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15011
        }
15012
        iprot.readFieldEnd();
15013
      }
15014
      iprot.readStructEnd();
15015
      validate();
15016
    }
15017
 
15018
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15019
      oprot.writeStructBegin(STRUCT_DESC);
15020
 
15021
      if (this.isSetEx()) {
15022
        oprot.writeFieldBegin(EX_FIELD_DESC);
15023
        this.ex.write(oprot);
15024
        oprot.writeFieldEnd();
15025
      }
15026
      oprot.writeFieldStop();
15027
      oprot.writeStructEnd();
15028
    }
15029
 
15030
    @Override
15031
    public String toString() {
15032
      StringBuilder sb = new StringBuilder("scanForPurchaseReturn_result(");
15033
      boolean first = true;
15034
 
15035
      sb.append("ex:");
15036
      if (this.ex == null) {
15037
        sb.append("null");
15038
      } else {
15039
        sb.append(this.ex);
15040
      }
15041
      first = false;
15042
      sb.append(")");
15043
      return sb.toString();
15044
    }
15045
 
15046
    public void validate() throws org.apache.thrift.TException {
15047
      // check for required fields
15048
    }
15049
 
15050
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15051
      try {
15052
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15053
      } catch (org.apache.thrift.TException te) {
15054
        throw new java.io.IOException(te);
15055
      }
15056
    }
15057
 
15058
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15059
      try {
15060
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15061
      } catch (org.apache.thrift.TException te) {
15062
        throw new java.io.IOException(te);
15063
      }
15064
    }
15065
 
15066
  }
15067
 
6548 amar.kumar 15068
  public static class scanForLostItem_args implements org.apache.thrift.TBase<scanForLostItem_args, scanForLostItem_args._Fields>, java.io.Serializable, Cloneable   {
15069
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForLostItem_args");
15070
 
15071
    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);
15072
    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);
15073
 
15074
    private List<InventoryItem> lostItems; // required
15075
    private long vendorId; // required
15076
 
15077
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15078
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15079
      LOST_ITEMS((short)1, "lostItems"),
15080
      VENDOR_ID((short)2, "vendorId");
15081
 
15082
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15083
 
15084
      static {
15085
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15086
          byName.put(field.getFieldName(), field);
15087
        }
15088
      }
15089
 
15090
      /**
15091
       * Find the _Fields constant that matches fieldId, or null if its not found.
15092
       */
15093
      public static _Fields findByThriftId(int fieldId) {
15094
        switch(fieldId) {
15095
          case 1: // LOST_ITEMS
15096
            return LOST_ITEMS;
15097
          case 2: // VENDOR_ID
15098
            return VENDOR_ID;
15099
          default:
15100
            return null;
15101
        }
15102
      }
15103
 
15104
      /**
15105
       * Find the _Fields constant that matches fieldId, throwing an exception
15106
       * if it is not found.
15107
       */
15108
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15109
        _Fields fields = findByThriftId(fieldId);
15110
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15111
        return fields;
15112
      }
15113
 
15114
      /**
15115
       * Find the _Fields constant that matches name, or null if its not found.
15116
       */
15117
      public static _Fields findByName(String name) {
15118
        return byName.get(name);
15119
      }
15120
 
15121
      private final short _thriftId;
15122
      private final String _fieldName;
15123
 
15124
      _Fields(short thriftId, String fieldName) {
15125
        _thriftId = thriftId;
15126
        _fieldName = fieldName;
15127
      }
15128
 
15129
      public short getThriftFieldId() {
15130
        return _thriftId;
15131
      }
15132
 
15133
      public String getFieldName() {
15134
        return _fieldName;
15135
      }
15136
    }
15137
 
15138
    // isset id assignments
15139
    private static final int __VENDORID_ISSET_ID = 0;
15140
    private BitSet __isset_bit_vector = new BitSet(1);
15141
 
15142
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15143
    static {
15144
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15145
      tmpMap.put(_Fields.LOST_ITEMS, new org.apache.thrift.meta_data.FieldMetaData("lostItems", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15146
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
15147
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class))));
15148
      tmpMap.put(_Fields.VENDOR_ID, new org.apache.thrift.meta_data.FieldMetaData("vendorId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15149
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
15150
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15151
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForLostItem_args.class, metaDataMap);
15152
    }
15153
 
15154
    public scanForLostItem_args() {
15155
    }
15156
 
15157
    public scanForLostItem_args(
15158
      List<InventoryItem> lostItems,
15159
      long vendorId)
15160
    {
15161
      this();
15162
      this.lostItems = lostItems;
15163
      this.vendorId = vendorId;
15164
      setVendorIdIsSet(true);
15165
    }
15166
 
15167
    /**
15168
     * Performs a deep copy on <i>other</i>.
15169
     */
15170
    public scanForLostItem_args(scanForLostItem_args other) {
15171
      __isset_bit_vector.clear();
15172
      __isset_bit_vector.or(other.__isset_bit_vector);
15173
      if (other.isSetLostItems()) {
15174
        List<InventoryItem> __this__lostItems = new ArrayList<InventoryItem>();
15175
        for (InventoryItem other_element : other.lostItems) {
15176
          __this__lostItems.add(new InventoryItem(other_element));
15177
        }
15178
        this.lostItems = __this__lostItems;
15179
      }
15180
      this.vendorId = other.vendorId;
15181
    }
15182
 
15183
    public scanForLostItem_args deepCopy() {
15184
      return new scanForLostItem_args(this);
15185
    }
15186
 
15187
    @Override
15188
    public void clear() {
15189
      this.lostItems = null;
15190
      setVendorIdIsSet(false);
15191
      this.vendorId = 0;
15192
    }
15193
 
15194
    public int getLostItemsSize() {
15195
      return (this.lostItems == null) ? 0 : this.lostItems.size();
15196
    }
15197
 
15198
    public java.util.Iterator<InventoryItem> getLostItemsIterator() {
15199
      return (this.lostItems == null) ? null : this.lostItems.iterator();
15200
    }
15201
 
15202
    public void addToLostItems(InventoryItem elem) {
15203
      if (this.lostItems == null) {
15204
        this.lostItems = new ArrayList<InventoryItem>();
15205
      }
15206
      this.lostItems.add(elem);
15207
    }
15208
 
15209
    public List<InventoryItem> getLostItems() {
15210
      return this.lostItems;
15211
    }
15212
 
15213
    public void setLostItems(List<InventoryItem> lostItems) {
15214
      this.lostItems = lostItems;
15215
    }
15216
 
15217
    public void unsetLostItems() {
15218
      this.lostItems = null;
15219
    }
15220
 
15221
    /** Returns true if field lostItems is set (has been assigned a value) and false otherwise */
15222
    public boolean isSetLostItems() {
15223
      return this.lostItems != null;
15224
    }
15225
 
15226
    public void setLostItemsIsSet(boolean value) {
15227
      if (!value) {
15228
        this.lostItems = null;
15229
      }
15230
    }
15231
 
15232
    public long getVendorId() {
15233
      return this.vendorId;
15234
    }
15235
 
15236
    public void setVendorId(long vendorId) {
15237
      this.vendorId = vendorId;
15238
      setVendorIdIsSet(true);
15239
    }
15240
 
15241
    public void unsetVendorId() {
15242
      __isset_bit_vector.clear(__VENDORID_ISSET_ID);
15243
    }
15244
 
15245
    /** Returns true if field vendorId is set (has been assigned a value) and false otherwise */
15246
    public boolean isSetVendorId() {
15247
      return __isset_bit_vector.get(__VENDORID_ISSET_ID);
15248
    }
15249
 
15250
    public void setVendorIdIsSet(boolean value) {
15251
      __isset_bit_vector.set(__VENDORID_ISSET_ID, value);
15252
    }
15253
 
15254
    public void setFieldValue(_Fields field, Object value) {
15255
      switch (field) {
15256
      case LOST_ITEMS:
15257
        if (value == null) {
15258
          unsetLostItems();
15259
        } else {
15260
          setLostItems((List<InventoryItem>)value);
15261
        }
15262
        break;
15263
 
15264
      case VENDOR_ID:
15265
        if (value == null) {
15266
          unsetVendorId();
15267
        } else {
15268
          setVendorId((Long)value);
15269
        }
15270
        break;
15271
 
15272
      }
15273
    }
15274
 
15275
    public Object getFieldValue(_Fields field) {
15276
      switch (field) {
15277
      case LOST_ITEMS:
15278
        return getLostItems();
15279
 
15280
      case VENDOR_ID:
15281
        return Long.valueOf(getVendorId());
15282
 
15283
      }
15284
      throw new IllegalStateException();
15285
    }
15286
 
15287
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15288
    public boolean isSet(_Fields field) {
15289
      if (field == null) {
15290
        throw new IllegalArgumentException();
15291
      }
15292
 
15293
      switch (field) {
15294
      case LOST_ITEMS:
15295
        return isSetLostItems();
15296
      case VENDOR_ID:
15297
        return isSetVendorId();
15298
      }
15299
      throw new IllegalStateException();
15300
    }
15301
 
15302
    @Override
15303
    public boolean equals(Object that) {
15304
      if (that == null)
15305
        return false;
15306
      if (that instanceof scanForLostItem_args)
15307
        return this.equals((scanForLostItem_args)that);
15308
      return false;
15309
    }
15310
 
15311
    public boolean equals(scanForLostItem_args that) {
15312
      if (that == null)
15313
        return false;
15314
 
15315
      boolean this_present_lostItems = true && this.isSetLostItems();
15316
      boolean that_present_lostItems = true && that.isSetLostItems();
15317
      if (this_present_lostItems || that_present_lostItems) {
15318
        if (!(this_present_lostItems && that_present_lostItems))
15319
          return false;
15320
        if (!this.lostItems.equals(that.lostItems))
15321
          return false;
15322
      }
15323
 
15324
      boolean this_present_vendorId = true;
15325
      boolean that_present_vendorId = true;
15326
      if (this_present_vendorId || that_present_vendorId) {
15327
        if (!(this_present_vendorId && that_present_vendorId))
15328
          return false;
15329
        if (this.vendorId != that.vendorId)
15330
          return false;
15331
      }
15332
 
15333
      return true;
15334
    }
15335
 
15336
    @Override
15337
    public int hashCode() {
15338
      return 0;
15339
    }
15340
 
15341
    public int compareTo(scanForLostItem_args other) {
15342
      if (!getClass().equals(other.getClass())) {
15343
        return getClass().getName().compareTo(other.getClass().getName());
15344
      }
15345
 
15346
      int lastComparison = 0;
15347
      scanForLostItem_args typedOther = (scanForLostItem_args)other;
15348
 
15349
      lastComparison = Boolean.valueOf(isSetLostItems()).compareTo(typedOther.isSetLostItems());
15350
      if (lastComparison != 0) {
15351
        return lastComparison;
15352
      }
15353
      if (isSetLostItems()) {
15354
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lostItems, typedOther.lostItems);
15355
        if (lastComparison != 0) {
15356
          return lastComparison;
15357
        }
15358
      }
15359
      lastComparison = Boolean.valueOf(isSetVendorId()).compareTo(typedOther.isSetVendorId());
15360
      if (lastComparison != 0) {
15361
        return lastComparison;
15362
      }
15363
      if (isSetVendorId()) {
15364
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vendorId, typedOther.vendorId);
15365
        if (lastComparison != 0) {
15366
          return lastComparison;
15367
        }
15368
      }
15369
      return 0;
15370
    }
15371
 
15372
    public _Fields fieldForId(int fieldId) {
15373
      return _Fields.findByThriftId(fieldId);
15374
    }
15375
 
15376
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15377
      org.apache.thrift.protocol.TField field;
15378
      iprot.readStructBegin();
15379
      while (true)
15380
      {
15381
        field = iprot.readFieldBegin();
15382
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15383
          break;
15384
        }
15385
        switch (field.id) {
15386
          case 1: // LOST_ITEMS
15387
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
15388
              {
15389
                org.apache.thrift.protocol.TList _list36 = iprot.readListBegin();
15390
                this.lostItems = new ArrayList<InventoryItem>(_list36.size);
15391
                for (int _i37 = 0; _i37 < _list36.size; ++_i37)
15392
                {
15393
                  InventoryItem _elem38; // required
15394
                  _elem38 = new InventoryItem();
15395
                  _elem38.read(iprot);
15396
                  this.lostItems.add(_elem38);
15397
                }
15398
                iprot.readListEnd();
15399
              }
15400
            } else { 
15401
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15402
            }
15403
            break;
15404
          case 2: // VENDOR_ID
15405
            if (field.type == org.apache.thrift.protocol.TType.I64) {
15406
              this.vendorId = iprot.readI64();
15407
              setVendorIdIsSet(true);
15408
            } else { 
15409
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15410
            }
15411
            break;
15412
          default:
15413
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15414
        }
15415
        iprot.readFieldEnd();
15416
      }
15417
      iprot.readStructEnd();
15418
      validate();
15419
    }
15420
 
15421
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15422
      validate();
15423
 
15424
      oprot.writeStructBegin(STRUCT_DESC);
15425
      if (this.lostItems != null) {
15426
        oprot.writeFieldBegin(LOST_ITEMS_FIELD_DESC);
15427
        {
15428
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.lostItems.size()));
15429
          for (InventoryItem _iter39 : this.lostItems)
15430
          {
15431
            _iter39.write(oprot);
15432
          }
15433
          oprot.writeListEnd();
15434
        }
15435
        oprot.writeFieldEnd();
15436
      }
15437
      oprot.writeFieldBegin(VENDOR_ID_FIELD_DESC);
15438
      oprot.writeI64(this.vendorId);
15439
      oprot.writeFieldEnd();
15440
      oprot.writeFieldStop();
15441
      oprot.writeStructEnd();
15442
    }
15443
 
15444
    @Override
15445
    public String toString() {
15446
      StringBuilder sb = new StringBuilder("scanForLostItem_args(");
15447
      boolean first = true;
15448
 
15449
      sb.append("lostItems:");
15450
      if (this.lostItems == null) {
15451
        sb.append("null");
15452
      } else {
15453
        sb.append(this.lostItems);
15454
      }
15455
      first = false;
15456
      if (!first) sb.append(", ");
15457
      sb.append("vendorId:");
15458
      sb.append(this.vendorId);
15459
      first = false;
15460
      sb.append(")");
15461
      return sb.toString();
15462
    }
15463
 
15464
    public void validate() throws org.apache.thrift.TException {
15465
      // check for required fields
15466
    }
15467
 
15468
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15469
      try {
15470
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15471
      } catch (org.apache.thrift.TException te) {
15472
        throw new java.io.IOException(te);
15473
      }
15474
    }
15475
 
15476
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15477
      try {
15478
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15479
      } catch (org.apache.thrift.TException te) {
15480
        throw new java.io.IOException(te);
15481
      }
15482
    }
15483
 
15484
  }
15485
 
15486
  public static class scanForLostItem_result implements org.apache.thrift.TBase<scanForLostItem_result, scanForLostItem_result._Fields>, java.io.Serializable, Cloneable   {
15487
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForLostItem_result");
15488
 
15489
    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);
15490
 
15491
    private WarehouseServiceException ex; // required
15492
 
15493
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15494
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15495
      EX((short)1, "ex");
15496
 
15497
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15498
 
15499
      static {
15500
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15501
          byName.put(field.getFieldName(), field);
15502
        }
15503
      }
15504
 
15505
      /**
15506
       * Find the _Fields constant that matches fieldId, or null if its not found.
15507
       */
15508
      public static _Fields findByThriftId(int fieldId) {
15509
        switch(fieldId) {
15510
          case 1: // EX
15511
            return EX;
15512
          default:
15513
            return null;
15514
        }
15515
      }
15516
 
15517
      /**
15518
       * Find the _Fields constant that matches fieldId, throwing an exception
15519
       * if it is not found.
15520
       */
15521
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15522
        _Fields fields = findByThriftId(fieldId);
15523
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15524
        return fields;
15525
      }
15526
 
15527
      /**
15528
       * Find the _Fields constant that matches name, or null if its not found.
15529
       */
15530
      public static _Fields findByName(String name) {
15531
        return byName.get(name);
15532
      }
15533
 
15534
      private final short _thriftId;
15535
      private final String _fieldName;
15536
 
15537
      _Fields(short thriftId, String fieldName) {
15538
        _thriftId = thriftId;
15539
        _fieldName = fieldName;
15540
      }
15541
 
15542
      public short getThriftFieldId() {
15543
        return _thriftId;
15544
      }
15545
 
15546
      public String getFieldName() {
15547
        return _fieldName;
15548
      }
15549
    }
15550
 
15551
    // isset id assignments
15552
 
15553
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15554
    static {
15555
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15556
      tmpMap.put(_Fields.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15557
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
15558
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15559
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForLostItem_result.class, metaDataMap);
15560
    }
15561
 
15562
    public scanForLostItem_result() {
15563
    }
15564
 
15565
    public scanForLostItem_result(
15566
      WarehouseServiceException ex)
15567
    {
15568
      this();
15569
      this.ex = ex;
15570
    }
15571
 
15572
    /**
15573
     * Performs a deep copy on <i>other</i>.
15574
     */
15575
    public scanForLostItem_result(scanForLostItem_result other) {
15576
      if (other.isSetEx()) {
15577
        this.ex = new WarehouseServiceException(other.ex);
15578
      }
15579
    }
15580
 
15581
    public scanForLostItem_result deepCopy() {
15582
      return new scanForLostItem_result(this);
15583
    }
15584
 
15585
    @Override
15586
    public void clear() {
15587
      this.ex = null;
15588
    }
15589
 
15590
    public WarehouseServiceException getEx() {
15591
      return this.ex;
15592
    }
15593
 
15594
    public void setEx(WarehouseServiceException ex) {
15595
      this.ex = ex;
15596
    }
15597
 
15598
    public void unsetEx() {
15599
      this.ex = null;
15600
    }
15601
 
15602
    /** Returns true if field ex is set (has been assigned a value) and false otherwise */
15603
    public boolean isSetEx() {
15604
      return this.ex != null;
15605
    }
15606
 
15607
    public void setExIsSet(boolean value) {
15608
      if (!value) {
15609
        this.ex = null;
15610
      }
15611
    }
15612
 
15613
    public void setFieldValue(_Fields field, Object value) {
15614
      switch (field) {
15615
      case EX:
15616
        if (value == null) {
15617
          unsetEx();
15618
        } else {
15619
          setEx((WarehouseServiceException)value);
15620
        }
15621
        break;
15622
 
15623
      }
15624
    }
15625
 
15626
    public Object getFieldValue(_Fields field) {
15627
      switch (field) {
15628
      case EX:
15629
        return getEx();
15630
 
15631
      }
15632
      throw new IllegalStateException();
15633
    }
15634
 
15635
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15636
    public boolean isSet(_Fields field) {
15637
      if (field == null) {
15638
        throw new IllegalArgumentException();
15639
      }
15640
 
15641
      switch (field) {
15642
      case EX:
15643
        return isSetEx();
15644
      }
15645
      throw new IllegalStateException();
15646
    }
15647
 
15648
    @Override
15649
    public boolean equals(Object that) {
15650
      if (that == null)
15651
        return false;
15652
      if (that instanceof scanForLostItem_result)
15653
        return this.equals((scanForLostItem_result)that);
15654
      return false;
15655
    }
15656
 
15657
    public boolean equals(scanForLostItem_result that) {
15658
      if (that == null)
15659
        return false;
15660
 
15661
      boolean this_present_ex = true && this.isSetEx();
15662
      boolean that_present_ex = true && that.isSetEx();
15663
      if (this_present_ex || that_present_ex) {
15664
        if (!(this_present_ex && that_present_ex))
15665
          return false;
15666
        if (!this.ex.equals(that.ex))
15667
          return false;
15668
      }
15669
 
15670
      return true;
15671
    }
15672
 
15673
    @Override
15674
    public int hashCode() {
15675
      return 0;
15676
    }
15677
 
15678
    public int compareTo(scanForLostItem_result other) {
15679
      if (!getClass().equals(other.getClass())) {
15680
        return getClass().getName().compareTo(other.getClass().getName());
15681
      }
15682
 
15683
      int lastComparison = 0;
15684
      scanForLostItem_result typedOther = (scanForLostItem_result)other;
15685
 
15686
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx());
15687
      if (lastComparison != 0) {
15688
        return lastComparison;
15689
      }
15690
      if (isSetEx()) {
15691
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, typedOther.ex);
15692
        if (lastComparison != 0) {
15693
          return lastComparison;
15694
        }
15695
      }
15696
      return 0;
15697
    }
15698
 
15699
    public _Fields fieldForId(int fieldId) {
15700
      return _Fields.findByThriftId(fieldId);
15701
    }
15702
 
15703
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15704
      org.apache.thrift.protocol.TField field;
15705
      iprot.readStructBegin();
15706
      while (true)
15707
      {
15708
        field = iprot.readFieldBegin();
15709
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15710
          break;
15711
        }
15712
        switch (field.id) {
15713
          case 1: // EX
15714
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15715
              this.ex = new WarehouseServiceException();
15716
              this.ex.read(iprot);
15717
            } else { 
15718
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15719
            }
15720
            break;
15721
          default:
15722
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15723
        }
15724
        iprot.readFieldEnd();
15725
      }
15726
      iprot.readStructEnd();
15727
      validate();
15728
    }
15729
 
15730
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15731
      oprot.writeStructBegin(STRUCT_DESC);
15732
 
15733
      if (this.isSetEx()) {
15734
        oprot.writeFieldBegin(EX_FIELD_DESC);
15735
        this.ex.write(oprot);
15736
        oprot.writeFieldEnd();
15737
      }
15738
      oprot.writeFieldStop();
15739
      oprot.writeStructEnd();
15740
    }
15741
 
15742
    @Override
15743
    public String toString() {
15744
      StringBuilder sb = new StringBuilder("scanForLostItem_result(");
15745
      boolean first = true;
15746
 
15747
      sb.append("ex:");
15748
      if (this.ex == null) {
15749
        sb.append("null");
15750
      } else {
15751
        sb.append(this.ex);
15752
      }
15753
      first = false;
15754
      sb.append(")");
15755
      return sb.toString();
15756
    }
15757
 
15758
    public void validate() throws org.apache.thrift.TException {
15759
      // check for required fields
15760
    }
15761
 
15762
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15763
      try {
15764
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15765
      } catch (org.apache.thrift.TException te) {
15766
        throw new java.io.IOException(te);
15767
      }
15768
    }
15769
 
15770
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15771
      try {
15772
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15773
      } catch (org.apache.thrift.TException te) {
15774
        throw new java.io.IOException(te);
15775
      }
15776
    }
15777
 
15778
  }
15779
 
15780
  public static class getCurrentSerializedInventoryByScans_args implements org.apache.thrift.TBase<getCurrentSerializedInventoryByScans_args, getCurrentSerializedInventoryByScans_args._Fields>, java.io.Serializable, Cloneable   {
15781
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCurrentSerializedInventoryByScans_args");
15782
 
15783
 
15784
 
15785
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15786
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15787
;
15788
 
15789
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15790
 
15791
      static {
15792
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15793
          byName.put(field.getFieldName(), field);
15794
        }
15795
      }
15796
 
15797
      /**
15798
       * Find the _Fields constant that matches fieldId, or null if its not found.
15799
       */
15800
      public static _Fields findByThriftId(int fieldId) {
15801
        switch(fieldId) {
15802
          default:
15803
            return null;
15804
        }
15805
      }
15806
 
15807
      /**
15808
       * Find the _Fields constant that matches fieldId, throwing an exception
15809
       * if it is not found.
15810
       */
15811
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15812
        _Fields fields = findByThriftId(fieldId);
15813
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15814
        return fields;
15815
      }
15816
 
15817
      /**
15818
       * Find the _Fields constant that matches name, or null if its not found.
15819
       */
15820
      public static _Fields findByName(String name) {
15821
        return byName.get(name);
15822
      }
15823
 
15824
      private final short _thriftId;
15825
      private final String _fieldName;
15826
 
15827
      _Fields(short thriftId, String fieldName) {
15828
        _thriftId = thriftId;
15829
        _fieldName = fieldName;
15830
      }
15831
 
15832
      public short getThriftFieldId() {
15833
        return _thriftId;
15834
      }
15835
 
15836
      public String getFieldName() {
15837
        return _fieldName;
15838
      }
15839
    }
15840
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15841
    static {
15842
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15843
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15844
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCurrentSerializedInventoryByScans_args.class, metaDataMap);
15845
    }
15846
 
15847
    public getCurrentSerializedInventoryByScans_args() {
15848
    }
15849
 
15850
    /**
15851
     * Performs a deep copy on <i>other</i>.
15852
     */
15853
    public getCurrentSerializedInventoryByScans_args(getCurrentSerializedInventoryByScans_args other) {
15854
    }
15855
 
15856
    public getCurrentSerializedInventoryByScans_args deepCopy() {
15857
      return new getCurrentSerializedInventoryByScans_args(this);
15858
    }
15859
 
15860
    @Override
15861
    public void clear() {
15862
    }
15863
 
15864
    public void setFieldValue(_Fields field, Object value) {
15865
      switch (field) {
15866
      }
15867
    }
15868
 
15869
    public Object getFieldValue(_Fields field) {
15870
      switch (field) {
15871
      }
15872
      throw new IllegalStateException();
15873
    }
15874
 
15875
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15876
    public boolean isSet(_Fields field) {
15877
      if (field == null) {
15878
        throw new IllegalArgumentException();
15879
      }
15880
 
15881
      switch (field) {
15882
      }
15883
      throw new IllegalStateException();
15884
    }
15885
 
15886
    @Override
15887
    public boolean equals(Object that) {
15888
      if (that == null)
15889
        return false;
15890
      if (that instanceof getCurrentSerializedInventoryByScans_args)
15891
        return this.equals((getCurrentSerializedInventoryByScans_args)that);
15892
      return false;
15893
    }
15894
 
15895
    public boolean equals(getCurrentSerializedInventoryByScans_args that) {
15896
      if (that == null)
15897
        return false;
15898
 
15899
      return true;
15900
    }
15901
 
15902
    @Override
15903
    public int hashCode() {
15904
      return 0;
15905
    }
15906
 
15907
    public int compareTo(getCurrentSerializedInventoryByScans_args other) {
15908
      if (!getClass().equals(other.getClass())) {
15909
        return getClass().getName().compareTo(other.getClass().getName());
15910
      }
15911
 
15912
      int lastComparison = 0;
15913
      getCurrentSerializedInventoryByScans_args typedOther = (getCurrentSerializedInventoryByScans_args)other;
15914
 
15915
      return 0;
15916
    }
15917
 
15918
    public _Fields fieldForId(int fieldId) {
15919
      return _Fields.findByThriftId(fieldId);
15920
    }
15921
 
15922
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15923
      org.apache.thrift.protocol.TField field;
15924
      iprot.readStructBegin();
15925
      while (true)
15926
      {
15927
        field = iprot.readFieldBegin();
15928
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15929
          break;
15930
        }
15931
        switch (field.id) {
15932
          default:
15933
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15934
        }
15935
        iprot.readFieldEnd();
15936
      }
15937
      iprot.readStructEnd();
15938
      validate();
15939
    }
15940
 
15941
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15942
      validate();
15943
 
15944
      oprot.writeStructBegin(STRUCT_DESC);
15945
      oprot.writeFieldStop();
15946
      oprot.writeStructEnd();
15947
    }
15948
 
15949
    @Override
15950
    public String toString() {
15951
      StringBuilder sb = new StringBuilder("getCurrentSerializedInventoryByScans_args(");
15952
      boolean first = true;
15953
 
15954
      sb.append(")");
15955
      return sb.toString();
15956
    }
15957
 
15958
    public void validate() throws org.apache.thrift.TException {
15959
      // check for required fields
15960
    }
15961
 
15962
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15963
      try {
15964
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15965
      } catch (org.apache.thrift.TException te) {
15966
        throw new java.io.IOException(te);
15967
      }
15968
    }
15969
 
15970
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15971
      try {
15972
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15973
      } catch (org.apache.thrift.TException te) {
15974
        throw new java.io.IOException(te);
15975
      }
15976
    }
15977
 
15978
  }
15979
 
15980
  public static class getCurrentSerializedInventoryByScans_result implements org.apache.thrift.TBase<getCurrentSerializedInventoryByScans_result, getCurrentSerializedInventoryByScans_result._Fields>, java.io.Serializable, Cloneable   {
15981
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCurrentSerializedInventoryByScans_result");
15982
 
15983
    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);
15984
 
15985
    private List<InventoryAvailability> success; // required
15986
 
15987
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15988
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15989
      SUCCESS((short)0, "success");
15990
 
15991
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15992
 
15993
      static {
15994
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15995
          byName.put(field.getFieldName(), field);
15996
        }
15997
      }
15998
 
15999
      /**
16000
       * Find the _Fields constant that matches fieldId, or null if its not found.
16001
       */
16002
      public static _Fields findByThriftId(int fieldId) {
16003
        switch(fieldId) {
16004
          case 0: // SUCCESS
16005
            return SUCCESS;
16006
          default:
16007
            return null;
16008
        }
16009
      }
16010
 
16011
      /**
16012
       * Find the _Fields constant that matches fieldId, throwing an exception
16013
       * if it is not found.
16014
       */
16015
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16016
        _Fields fields = findByThriftId(fieldId);
16017
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16018
        return fields;
16019
      }
16020
 
16021
      /**
16022
       * Find the _Fields constant that matches name, or null if its not found.
16023
       */
16024
      public static _Fields findByName(String name) {
16025
        return byName.get(name);
16026
      }
16027
 
16028
      private final short _thriftId;
16029
      private final String _fieldName;
16030
 
16031
      _Fields(short thriftId, String fieldName) {
16032
        _thriftId = thriftId;
16033
        _fieldName = fieldName;
16034
      }
16035
 
16036
      public short getThriftFieldId() {
16037
        return _thriftId;
16038
      }
16039
 
16040
      public String getFieldName() {
16041
        return _fieldName;
16042
      }
16043
    }
16044
 
16045
    // isset id assignments
16046
 
16047
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16048
    static {
16049
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16050
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16051
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
16052
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryAvailability.class))));
16053
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16054
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCurrentSerializedInventoryByScans_result.class, metaDataMap);
16055
    }
16056
 
16057
    public getCurrentSerializedInventoryByScans_result() {
16058
    }
16059
 
16060
    public getCurrentSerializedInventoryByScans_result(
16061
      List<InventoryAvailability> success)
16062
    {
16063
      this();
16064
      this.success = success;
16065
    }
16066
 
16067
    /**
16068
     * Performs a deep copy on <i>other</i>.
16069
     */
16070
    public getCurrentSerializedInventoryByScans_result(getCurrentSerializedInventoryByScans_result other) {
16071
      if (other.isSetSuccess()) {
16072
        List<InventoryAvailability> __this__success = new ArrayList<InventoryAvailability>();
16073
        for (InventoryAvailability other_element : other.success) {
16074
          __this__success.add(new InventoryAvailability(other_element));
16075
        }
16076
        this.success = __this__success;
16077
      }
16078
    }
16079
 
16080
    public getCurrentSerializedInventoryByScans_result deepCopy() {
16081
      return new getCurrentSerializedInventoryByScans_result(this);
16082
    }
16083
 
16084
    @Override
16085
    public void clear() {
16086
      this.success = null;
16087
    }
16088
 
16089
    public int getSuccessSize() {
16090
      return (this.success == null) ? 0 : this.success.size();
16091
    }
16092
 
16093
    public java.util.Iterator<InventoryAvailability> getSuccessIterator() {
16094
      return (this.success == null) ? null : this.success.iterator();
16095
    }
16096
 
16097
    public void addToSuccess(InventoryAvailability elem) {
16098
      if (this.success == null) {
16099
        this.success = new ArrayList<InventoryAvailability>();
16100
      }
16101
      this.success.add(elem);
16102
    }
16103
 
16104
    public List<InventoryAvailability> getSuccess() {
16105
      return this.success;
16106
    }
16107
 
16108
    public void setSuccess(List<InventoryAvailability> success) {
16109
      this.success = success;
16110
    }
16111
 
16112
    public void unsetSuccess() {
16113
      this.success = null;
16114
    }
16115
 
16116
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
16117
    public boolean isSetSuccess() {
16118
      return this.success != null;
16119
    }
16120
 
16121
    public void setSuccessIsSet(boolean value) {
16122
      if (!value) {
16123
        this.success = null;
16124
      }
16125
    }
16126
 
16127
    public void setFieldValue(_Fields field, Object value) {
16128
      switch (field) {
16129
      case SUCCESS:
16130
        if (value == null) {
16131
          unsetSuccess();
16132
        } else {
16133
          setSuccess((List<InventoryAvailability>)value);
16134
        }
16135
        break;
16136
 
16137
      }
16138
    }
16139
 
16140
    public Object getFieldValue(_Fields field) {
16141
      switch (field) {
16142
      case SUCCESS:
16143
        return getSuccess();
16144
 
16145
      }
16146
      throw new IllegalStateException();
16147
    }
16148
 
16149
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16150
    public boolean isSet(_Fields field) {
16151
      if (field == null) {
16152
        throw new IllegalArgumentException();
16153
      }
16154
 
16155
      switch (field) {
16156
      case SUCCESS:
16157
        return isSetSuccess();
16158
      }
16159
      throw new IllegalStateException();
16160
    }
16161
 
16162
    @Override
16163
    public boolean equals(Object that) {
16164
      if (that == null)
16165
        return false;
16166
      if (that instanceof getCurrentSerializedInventoryByScans_result)
16167
        return this.equals((getCurrentSerializedInventoryByScans_result)that);
16168
      return false;
16169
    }
16170
 
16171
    public boolean equals(getCurrentSerializedInventoryByScans_result that) {
16172
      if (that == null)
16173
        return false;
16174
 
16175
      boolean this_present_success = true && this.isSetSuccess();
16176
      boolean that_present_success = true && that.isSetSuccess();
16177
      if (this_present_success || that_present_success) {
16178
        if (!(this_present_success && that_present_success))
16179
          return false;
16180
        if (!this.success.equals(that.success))
16181
          return false;
16182
      }
16183
 
16184
      return true;
16185
    }
16186
 
16187
    @Override
16188
    public int hashCode() {
16189
      return 0;
16190
    }
16191
 
16192
    public int compareTo(getCurrentSerializedInventoryByScans_result other) {
16193
      if (!getClass().equals(other.getClass())) {
16194
        return getClass().getName().compareTo(other.getClass().getName());
16195
      }
16196
 
16197
      int lastComparison = 0;
16198
      getCurrentSerializedInventoryByScans_result typedOther = (getCurrentSerializedInventoryByScans_result)other;
16199
 
16200
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
16201
      if (lastComparison != 0) {
16202
        return lastComparison;
16203
      }
16204
      if (isSetSuccess()) {
16205
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
16206
        if (lastComparison != 0) {
16207
          return lastComparison;
16208
        }
16209
      }
16210
      return 0;
16211
    }
16212
 
16213
    public _Fields fieldForId(int fieldId) {
16214
      return _Fields.findByThriftId(fieldId);
16215
    }
16216
 
16217
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16218
      org.apache.thrift.protocol.TField field;
16219
      iprot.readStructBegin();
16220
      while (true)
16221
      {
16222
        field = iprot.readFieldBegin();
16223
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16224
          break;
16225
        }
16226
        switch (field.id) {
16227
          case 0: // SUCCESS
16228
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
16229
              {
16230
                org.apache.thrift.protocol.TList _list40 = iprot.readListBegin();
16231
                this.success = new ArrayList<InventoryAvailability>(_list40.size);
16232
                for (int _i41 = 0; _i41 < _list40.size; ++_i41)
16233
                {
16234
                  InventoryAvailability _elem42; // required
16235
                  _elem42 = new InventoryAvailability();
16236
                  _elem42.read(iprot);
16237
                  this.success.add(_elem42);
16238
                }
16239
                iprot.readListEnd();
16240
              }
16241
            } else { 
16242
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16243
            }
16244
            break;
16245
          default:
16246
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16247
        }
16248
        iprot.readFieldEnd();
16249
      }
16250
      iprot.readStructEnd();
16251
      validate();
16252
    }
16253
 
16254
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16255
      oprot.writeStructBegin(STRUCT_DESC);
16256
 
16257
      if (this.isSetSuccess()) {
16258
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16259
        {
16260
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
16261
          for (InventoryAvailability _iter43 : this.success)
16262
          {
16263
            _iter43.write(oprot);
16264
          }
16265
          oprot.writeListEnd();
16266
        }
16267
        oprot.writeFieldEnd();
16268
      }
16269
      oprot.writeFieldStop();
16270
      oprot.writeStructEnd();
16271
    }
16272
 
16273
    @Override
16274
    public String toString() {
16275
      StringBuilder sb = new StringBuilder("getCurrentSerializedInventoryByScans_result(");
16276
      boolean first = true;
16277
 
16278
      sb.append("success:");
16279
      if (this.success == null) {
16280
        sb.append("null");
16281
      } else {
16282
        sb.append(this.success);
16283
      }
16284
      first = false;
16285
      sb.append(")");
16286
      return sb.toString();
16287
    }
16288
 
16289
    public void validate() throws org.apache.thrift.TException {
16290
      // check for required fields
16291
    }
16292
 
16293
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16294
      try {
16295
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16296
      } catch (org.apache.thrift.TException te) {
16297
        throw new java.io.IOException(te);
16298
      }
16299
    }
16300
 
16301
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16302
      try {
16303
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16304
      } catch (org.apache.thrift.TException te) {
16305
        throw new java.io.IOException(te);
16306
      }
16307
    }
16308
 
16309
  }
16310
 
6630 amar.kumar 16311
  public static class getCurrentNonSerializedInventoryByScans_args implements org.apache.thrift.TBase<getCurrentNonSerializedInventoryByScans_args, getCurrentNonSerializedInventoryByScans_args._Fields>, java.io.Serializable, Cloneable   {
16312
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCurrentNonSerializedInventoryByScans_args");
16313
 
16314
 
16315
 
16316
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16317
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16318
;
16319
 
16320
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16321
 
16322
      static {
16323
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16324
          byName.put(field.getFieldName(), field);
16325
        }
16326
      }
16327
 
16328
      /**
16329
       * Find the _Fields constant that matches fieldId, or null if its not found.
16330
       */
16331
      public static _Fields findByThriftId(int fieldId) {
16332
        switch(fieldId) {
16333
          default:
16334
            return null;
16335
        }
16336
      }
16337
 
16338
      /**
16339
       * Find the _Fields constant that matches fieldId, throwing an exception
16340
       * if it is not found.
16341
       */
16342
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16343
        _Fields fields = findByThriftId(fieldId);
16344
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16345
        return fields;
16346
      }
16347
 
16348
      /**
16349
       * Find the _Fields constant that matches name, or null if its not found.
16350
       */
16351
      public static _Fields findByName(String name) {
16352
        return byName.get(name);
16353
      }
16354
 
16355
      private final short _thriftId;
16356
      private final String _fieldName;
16357
 
16358
      _Fields(short thriftId, String fieldName) {
16359
        _thriftId = thriftId;
16360
        _fieldName = fieldName;
16361
      }
16362
 
16363
      public short getThriftFieldId() {
16364
        return _thriftId;
16365
      }
16366
 
16367
      public String getFieldName() {
16368
        return _fieldName;
16369
      }
16370
    }
16371
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16372
    static {
16373
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16374
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16375
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCurrentNonSerializedInventoryByScans_args.class, metaDataMap);
16376
    }
16377
 
16378
    public getCurrentNonSerializedInventoryByScans_args() {
16379
    }
16380
 
16381
    /**
16382
     * Performs a deep copy on <i>other</i>.
16383
     */
16384
    public getCurrentNonSerializedInventoryByScans_args(getCurrentNonSerializedInventoryByScans_args other) {
16385
    }
16386
 
16387
    public getCurrentNonSerializedInventoryByScans_args deepCopy() {
16388
      return new getCurrentNonSerializedInventoryByScans_args(this);
16389
    }
16390
 
16391
    @Override
16392
    public void clear() {
16393
    }
16394
 
16395
    public void setFieldValue(_Fields field, Object value) {
16396
      switch (field) {
16397
      }
16398
    }
16399
 
16400
    public Object getFieldValue(_Fields field) {
16401
      switch (field) {
16402
      }
16403
      throw new IllegalStateException();
16404
    }
16405
 
16406
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16407
    public boolean isSet(_Fields field) {
16408
      if (field == null) {
16409
        throw new IllegalArgumentException();
16410
      }
16411
 
16412
      switch (field) {
16413
      }
16414
      throw new IllegalStateException();
16415
    }
16416
 
16417
    @Override
16418
    public boolean equals(Object that) {
16419
      if (that == null)
16420
        return false;
16421
      if (that instanceof getCurrentNonSerializedInventoryByScans_args)
16422
        return this.equals((getCurrentNonSerializedInventoryByScans_args)that);
16423
      return false;
16424
    }
16425
 
16426
    public boolean equals(getCurrentNonSerializedInventoryByScans_args that) {
16427
      if (that == null)
16428
        return false;
16429
 
16430
      return true;
16431
    }
16432
 
16433
    @Override
16434
    public int hashCode() {
16435
      return 0;
16436
    }
16437
 
16438
    public int compareTo(getCurrentNonSerializedInventoryByScans_args other) {
16439
      if (!getClass().equals(other.getClass())) {
16440
        return getClass().getName().compareTo(other.getClass().getName());
16441
      }
16442
 
16443
      int lastComparison = 0;
16444
      getCurrentNonSerializedInventoryByScans_args typedOther = (getCurrentNonSerializedInventoryByScans_args)other;
16445
 
16446
      return 0;
16447
    }
16448
 
16449
    public _Fields fieldForId(int fieldId) {
16450
      return _Fields.findByThriftId(fieldId);
16451
    }
16452
 
16453
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16454
      org.apache.thrift.protocol.TField field;
16455
      iprot.readStructBegin();
16456
      while (true)
16457
      {
16458
        field = iprot.readFieldBegin();
16459
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16460
          break;
16461
        }
16462
        switch (field.id) {
16463
          default:
16464
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16465
        }
16466
        iprot.readFieldEnd();
16467
      }
16468
      iprot.readStructEnd();
16469
      validate();
16470
    }
16471
 
16472
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16473
      validate();
16474
 
16475
      oprot.writeStructBegin(STRUCT_DESC);
16476
      oprot.writeFieldStop();
16477
      oprot.writeStructEnd();
16478
    }
16479
 
16480
    @Override
16481
    public String toString() {
16482
      StringBuilder sb = new StringBuilder("getCurrentNonSerializedInventoryByScans_args(");
16483
      boolean first = true;
16484
 
16485
      sb.append(")");
16486
      return sb.toString();
16487
    }
16488
 
16489
    public void validate() throws org.apache.thrift.TException {
16490
      // check for required fields
16491
    }
16492
 
16493
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16494
      try {
16495
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16496
      } catch (org.apache.thrift.TException te) {
16497
        throw new java.io.IOException(te);
16498
      }
16499
    }
16500
 
16501
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16502
      try {
16503
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16504
      } catch (org.apache.thrift.TException te) {
16505
        throw new java.io.IOException(te);
16506
      }
16507
    }
16508
 
16509
  }
16510
 
16511
  public static class getCurrentNonSerializedInventoryByScans_result implements org.apache.thrift.TBase<getCurrentNonSerializedInventoryByScans_result, getCurrentNonSerializedInventoryByScans_result._Fields>, java.io.Serializable, Cloneable   {
16512
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCurrentNonSerializedInventoryByScans_result");
16513
 
16514
    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);
16515
 
16516
    private List<InventoryAvailability> success; // required
16517
 
16518
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16519
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16520
      SUCCESS((short)0, "success");
16521
 
16522
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16523
 
16524
      static {
16525
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16526
          byName.put(field.getFieldName(), field);
16527
        }
16528
      }
16529
 
16530
      /**
16531
       * Find the _Fields constant that matches fieldId, or null if its not found.
16532
       */
16533
      public static _Fields findByThriftId(int fieldId) {
16534
        switch(fieldId) {
16535
          case 0: // SUCCESS
16536
            return SUCCESS;
16537
          default:
16538
            return null;
16539
        }
16540
      }
16541
 
16542
      /**
16543
       * Find the _Fields constant that matches fieldId, throwing an exception
16544
       * if it is not found.
16545
       */
16546
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16547
        _Fields fields = findByThriftId(fieldId);
16548
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16549
        return fields;
16550
      }
16551
 
16552
      /**
16553
       * Find the _Fields constant that matches name, or null if its not found.
16554
       */
16555
      public static _Fields findByName(String name) {
16556
        return byName.get(name);
16557
      }
16558
 
16559
      private final short _thriftId;
16560
      private final String _fieldName;
16561
 
16562
      _Fields(short thriftId, String fieldName) {
16563
        _thriftId = thriftId;
16564
        _fieldName = fieldName;
16565
      }
16566
 
16567
      public short getThriftFieldId() {
16568
        return _thriftId;
16569
      }
16570
 
16571
      public String getFieldName() {
16572
        return _fieldName;
16573
      }
16574
    }
16575
 
16576
    // isset id assignments
16577
 
16578
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16579
    static {
16580
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16581
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16582
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
16583
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryAvailability.class))));
16584
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16585
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCurrentNonSerializedInventoryByScans_result.class, metaDataMap);
16586
    }
16587
 
16588
    public getCurrentNonSerializedInventoryByScans_result() {
16589
    }
16590
 
16591
    public getCurrentNonSerializedInventoryByScans_result(
16592
      List<InventoryAvailability> success)
16593
    {
16594
      this();
16595
      this.success = success;
16596
    }
16597
 
16598
    /**
16599
     * Performs a deep copy on <i>other</i>.
16600
     */
16601
    public getCurrentNonSerializedInventoryByScans_result(getCurrentNonSerializedInventoryByScans_result other) {
16602
      if (other.isSetSuccess()) {
16603
        List<InventoryAvailability> __this__success = new ArrayList<InventoryAvailability>();
16604
        for (InventoryAvailability other_element : other.success) {
16605
          __this__success.add(new InventoryAvailability(other_element));
16606
        }
16607
        this.success = __this__success;
16608
      }
16609
    }
16610
 
16611
    public getCurrentNonSerializedInventoryByScans_result deepCopy() {
16612
      return new getCurrentNonSerializedInventoryByScans_result(this);
16613
    }
16614
 
16615
    @Override
16616
    public void clear() {
16617
      this.success = null;
16618
    }
16619
 
16620
    public int getSuccessSize() {
16621
      return (this.success == null) ? 0 : this.success.size();
16622
    }
16623
 
16624
    public java.util.Iterator<InventoryAvailability> getSuccessIterator() {
16625
      return (this.success == null) ? null : this.success.iterator();
16626
    }
16627
 
16628
    public void addToSuccess(InventoryAvailability elem) {
16629
      if (this.success == null) {
16630
        this.success = new ArrayList<InventoryAvailability>();
16631
      }
16632
      this.success.add(elem);
16633
    }
16634
 
16635
    public List<InventoryAvailability> getSuccess() {
16636
      return this.success;
16637
    }
16638
 
16639
    public void setSuccess(List<InventoryAvailability> success) {
16640
      this.success = success;
16641
    }
16642
 
16643
    public void unsetSuccess() {
16644
      this.success = null;
16645
    }
16646
 
16647
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
16648
    public boolean isSetSuccess() {
16649
      return this.success != null;
16650
    }
16651
 
16652
    public void setSuccessIsSet(boolean value) {
16653
      if (!value) {
16654
        this.success = null;
16655
      }
16656
    }
16657
 
16658
    public void setFieldValue(_Fields field, Object value) {
16659
      switch (field) {
16660
      case SUCCESS:
16661
        if (value == null) {
16662
          unsetSuccess();
16663
        } else {
16664
          setSuccess((List<InventoryAvailability>)value);
16665
        }
16666
        break;
16667
 
16668
      }
16669
    }
16670
 
16671
    public Object getFieldValue(_Fields field) {
16672
      switch (field) {
16673
      case SUCCESS:
16674
        return getSuccess();
16675
 
16676
      }
16677
      throw new IllegalStateException();
16678
    }
16679
 
16680
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16681
    public boolean isSet(_Fields field) {
16682
      if (field == null) {
16683
        throw new IllegalArgumentException();
16684
      }
16685
 
16686
      switch (field) {
16687
      case SUCCESS:
16688
        return isSetSuccess();
16689
      }
16690
      throw new IllegalStateException();
16691
    }
16692
 
16693
    @Override
16694
    public boolean equals(Object that) {
16695
      if (that == null)
16696
        return false;
16697
      if (that instanceof getCurrentNonSerializedInventoryByScans_result)
16698
        return this.equals((getCurrentNonSerializedInventoryByScans_result)that);
16699
      return false;
16700
    }
16701
 
16702
    public boolean equals(getCurrentNonSerializedInventoryByScans_result that) {
16703
      if (that == null)
16704
        return false;
16705
 
16706
      boolean this_present_success = true && this.isSetSuccess();
16707
      boolean that_present_success = true && that.isSetSuccess();
16708
      if (this_present_success || that_present_success) {
16709
        if (!(this_present_success && that_present_success))
16710
          return false;
16711
        if (!this.success.equals(that.success))
16712
          return false;
16713
      }
16714
 
16715
      return true;
16716
    }
16717
 
16718
    @Override
16719
    public int hashCode() {
16720
      return 0;
16721
    }
16722
 
16723
    public int compareTo(getCurrentNonSerializedInventoryByScans_result other) {
16724
      if (!getClass().equals(other.getClass())) {
16725
        return getClass().getName().compareTo(other.getClass().getName());
16726
      }
16727
 
16728
      int lastComparison = 0;
16729
      getCurrentNonSerializedInventoryByScans_result typedOther = (getCurrentNonSerializedInventoryByScans_result)other;
16730
 
16731
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
16732
      if (lastComparison != 0) {
16733
        return lastComparison;
16734
      }
16735
      if (isSetSuccess()) {
16736
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
16737
        if (lastComparison != 0) {
16738
          return lastComparison;
16739
        }
16740
      }
16741
      return 0;
16742
    }
16743
 
16744
    public _Fields fieldForId(int fieldId) {
16745
      return _Fields.findByThriftId(fieldId);
16746
    }
16747
 
16748
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16749
      org.apache.thrift.protocol.TField field;
16750
      iprot.readStructBegin();
16751
      while (true)
16752
      {
16753
        field = iprot.readFieldBegin();
16754
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16755
          break;
16756
        }
16757
        switch (field.id) {
16758
          case 0: // SUCCESS
16759
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
16760
              {
16761
                org.apache.thrift.protocol.TList _list44 = iprot.readListBegin();
16762
                this.success = new ArrayList<InventoryAvailability>(_list44.size);
16763
                for (int _i45 = 0; _i45 < _list44.size; ++_i45)
16764
                {
16765
                  InventoryAvailability _elem46; // required
16766
                  _elem46 = new InventoryAvailability();
16767
                  _elem46.read(iprot);
16768
                  this.success.add(_elem46);
16769
                }
16770
                iprot.readListEnd();
16771
              }
16772
            } else { 
16773
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16774
            }
16775
            break;
16776
          default:
16777
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16778
        }
16779
        iprot.readFieldEnd();
16780
      }
16781
      iprot.readStructEnd();
16782
      validate();
16783
    }
16784
 
16785
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16786
      oprot.writeStructBegin(STRUCT_DESC);
16787
 
16788
      if (this.isSetSuccess()) {
16789
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16790
        {
16791
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
16792
          for (InventoryAvailability _iter47 : this.success)
16793
          {
16794
            _iter47.write(oprot);
16795
          }
16796
          oprot.writeListEnd();
16797
        }
16798
        oprot.writeFieldEnd();
16799
      }
16800
      oprot.writeFieldStop();
16801
      oprot.writeStructEnd();
16802
    }
16803
 
16804
    @Override
16805
    public String toString() {
16806
      StringBuilder sb = new StringBuilder("getCurrentNonSerializedInventoryByScans_result(");
16807
      boolean first = true;
16808
 
16809
      sb.append("success:");
16810
      if (this.success == null) {
16811
        sb.append("null");
16812
      } else {
16813
        sb.append(this.success);
16814
      }
16815
      first = false;
16816
      sb.append(")");
16817
      return sb.toString();
16818
    }
16819
 
16820
    public void validate() throws org.apache.thrift.TException {
16821
      // check for required fields
16822
    }
16823
 
16824
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16825
      try {
16826
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16827
      } catch (org.apache.thrift.TException te) {
16828
        throw new java.io.IOException(te);
16829
      }
16830
    }
16831
 
16832
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16833
      try {
16834
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16835
      } catch (org.apache.thrift.TException te) {
16836
        throw new java.io.IOException(te);
16837
      }
16838
    }
16839
 
16840
  }
16841
 
6762 amar.kumar 16842
  public static class getHistoricSerializedInventoryByScans_args implements org.apache.thrift.TBase<getHistoricSerializedInventoryByScans_args, getHistoricSerializedInventoryByScans_args._Fields>, java.io.Serializable, Cloneable   {
16843
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getHistoricSerializedInventoryByScans_args");
16844
 
16845
    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);
16846
 
16847
    private long date; // required
16848
 
16849
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16850
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16851
      DATE((short)1, "date");
16852
 
16853
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16854
 
16855
      static {
16856
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16857
          byName.put(field.getFieldName(), field);
16858
        }
16859
      }
16860
 
16861
      /**
16862
       * Find the _Fields constant that matches fieldId, or null if its not found.
16863
       */
16864
      public static _Fields findByThriftId(int fieldId) {
16865
        switch(fieldId) {
16866
          case 1: // DATE
16867
            return DATE;
16868
          default:
16869
            return null;
16870
        }
16871
      }
16872
 
16873
      /**
16874
       * Find the _Fields constant that matches fieldId, throwing an exception
16875
       * if it is not found.
16876
       */
16877
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16878
        _Fields fields = findByThriftId(fieldId);
16879
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16880
        return fields;
16881
      }
16882
 
16883
      /**
16884
       * Find the _Fields constant that matches name, or null if its not found.
16885
       */
16886
      public static _Fields findByName(String name) {
16887
        return byName.get(name);
16888
      }
16889
 
16890
      private final short _thriftId;
16891
      private final String _fieldName;
16892
 
16893
      _Fields(short thriftId, String fieldName) {
16894
        _thriftId = thriftId;
16895
        _fieldName = fieldName;
16896
      }
16897
 
16898
      public short getThriftFieldId() {
16899
        return _thriftId;
16900
      }
16901
 
16902
      public String getFieldName() {
16903
        return _fieldName;
16904
      }
16905
    }
16906
 
16907
    // isset id assignments
16908
    private static final int __DATE_ISSET_ID = 0;
16909
    private BitSet __isset_bit_vector = new BitSet(1);
16910
 
16911
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16912
    static {
16913
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16914
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16915
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
16916
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16917
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getHistoricSerializedInventoryByScans_args.class, metaDataMap);
16918
    }
16919
 
16920
    public getHistoricSerializedInventoryByScans_args() {
16921
    }
16922
 
16923
    public getHistoricSerializedInventoryByScans_args(
16924
      long date)
16925
    {
16926
      this();
16927
      this.date = date;
16928
      setDateIsSet(true);
16929
    }
16930
 
16931
    /**
16932
     * Performs a deep copy on <i>other</i>.
16933
     */
16934
    public getHistoricSerializedInventoryByScans_args(getHistoricSerializedInventoryByScans_args other) {
16935
      __isset_bit_vector.clear();
16936
      __isset_bit_vector.or(other.__isset_bit_vector);
16937
      this.date = other.date;
16938
    }
16939
 
16940
    public getHistoricSerializedInventoryByScans_args deepCopy() {
16941
      return new getHistoricSerializedInventoryByScans_args(this);
16942
    }
16943
 
16944
    @Override
16945
    public void clear() {
16946
      setDateIsSet(false);
16947
      this.date = 0;
16948
    }
16949
 
16950
    public long getDate() {
16951
      return this.date;
16952
    }
16953
 
16954
    public void setDate(long date) {
16955
      this.date = date;
16956
      setDateIsSet(true);
16957
    }
16958
 
16959
    public void unsetDate() {
16960
      __isset_bit_vector.clear(__DATE_ISSET_ID);
16961
    }
16962
 
16963
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
16964
    public boolean isSetDate() {
16965
      return __isset_bit_vector.get(__DATE_ISSET_ID);
16966
    }
16967
 
16968
    public void setDateIsSet(boolean value) {
16969
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
16970
    }
16971
 
16972
    public void setFieldValue(_Fields field, Object value) {
16973
      switch (field) {
16974
      case DATE:
16975
        if (value == null) {
16976
          unsetDate();
16977
        } else {
16978
          setDate((Long)value);
16979
        }
16980
        break;
16981
 
16982
      }
16983
    }
16984
 
16985
    public Object getFieldValue(_Fields field) {
16986
      switch (field) {
16987
      case DATE:
16988
        return Long.valueOf(getDate());
16989
 
16990
      }
16991
      throw new IllegalStateException();
16992
    }
16993
 
16994
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16995
    public boolean isSet(_Fields field) {
16996
      if (field == null) {
16997
        throw new IllegalArgumentException();
16998
      }
16999
 
17000
      switch (field) {
17001
      case DATE:
17002
        return isSetDate();
17003
      }
17004
      throw new IllegalStateException();
17005
    }
17006
 
17007
    @Override
17008
    public boolean equals(Object that) {
17009
      if (that == null)
17010
        return false;
17011
      if (that instanceof getHistoricSerializedInventoryByScans_args)
17012
        return this.equals((getHistoricSerializedInventoryByScans_args)that);
17013
      return false;
17014
    }
17015
 
17016
    public boolean equals(getHistoricSerializedInventoryByScans_args that) {
17017
      if (that == null)
17018
        return false;
17019
 
17020
      boolean this_present_date = true;
17021
      boolean that_present_date = true;
17022
      if (this_present_date || that_present_date) {
17023
        if (!(this_present_date && that_present_date))
17024
          return false;
17025
        if (this.date != that.date)
17026
          return false;
17027
      }
17028
 
17029
      return true;
17030
    }
17031
 
17032
    @Override
17033
    public int hashCode() {
17034
      return 0;
17035
    }
17036
 
17037
    public int compareTo(getHistoricSerializedInventoryByScans_args other) {
17038
      if (!getClass().equals(other.getClass())) {
17039
        return getClass().getName().compareTo(other.getClass().getName());
17040
      }
17041
 
17042
      int lastComparison = 0;
17043
      getHistoricSerializedInventoryByScans_args typedOther = (getHistoricSerializedInventoryByScans_args)other;
17044
 
17045
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
17046
      if (lastComparison != 0) {
17047
        return lastComparison;
17048
      }
17049
      if (isSetDate()) {
17050
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
17051
        if (lastComparison != 0) {
17052
          return lastComparison;
17053
        }
17054
      }
17055
      return 0;
17056
    }
17057
 
17058
    public _Fields fieldForId(int fieldId) {
17059
      return _Fields.findByThriftId(fieldId);
17060
    }
17061
 
17062
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17063
      org.apache.thrift.protocol.TField field;
17064
      iprot.readStructBegin();
17065
      while (true)
17066
      {
17067
        field = iprot.readFieldBegin();
17068
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17069
          break;
17070
        }
17071
        switch (field.id) {
17072
          case 1: // DATE
17073
            if (field.type == org.apache.thrift.protocol.TType.I64) {
17074
              this.date = iprot.readI64();
17075
              setDateIsSet(true);
17076
            } else { 
17077
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17078
            }
17079
            break;
17080
          default:
17081
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17082
        }
17083
        iprot.readFieldEnd();
17084
      }
17085
      iprot.readStructEnd();
17086
      validate();
17087
    }
17088
 
17089
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17090
      validate();
17091
 
17092
      oprot.writeStructBegin(STRUCT_DESC);
17093
      oprot.writeFieldBegin(DATE_FIELD_DESC);
17094
      oprot.writeI64(this.date);
17095
      oprot.writeFieldEnd();
17096
      oprot.writeFieldStop();
17097
      oprot.writeStructEnd();
17098
    }
17099
 
17100
    @Override
17101
    public String toString() {
17102
      StringBuilder sb = new StringBuilder("getHistoricSerializedInventoryByScans_args(");
17103
      boolean first = true;
17104
 
17105
      sb.append("date:");
17106
      sb.append(this.date);
17107
      first = false;
17108
      sb.append(")");
17109
      return sb.toString();
17110
    }
17111
 
17112
    public void validate() throws org.apache.thrift.TException {
17113
      // check for required fields
17114
    }
17115
 
17116
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17117
      try {
17118
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17119
      } catch (org.apache.thrift.TException te) {
17120
        throw new java.io.IOException(te);
17121
      }
17122
    }
17123
 
17124
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17125
      try {
17126
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17127
      } catch (org.apache.thrift.TException te) {
17128
        throw new java.io.IOException(te);
17129
      }
17130
    }
17131
 
17132
  }
17133
 
17134
  public static class getHistoricSerializedInventoryByScans_result implements org.apache.thrift.TBase<getHistoricSerializedInventoryByScans_result, getHistoricSerializedInventoryByScans_result._Fields>, java.io.Serializable, Cloneable   {
17135
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getHistoricSerializedInventoryByScans_result");
17136
 
17137
    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);
17138
 
17139
    private List<InventoryAvailability> success; // required
17140
 
17141
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17142
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17143
      SUCCESS((short)0, "success");
17144
 
17145
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17146
 
17147
      static {
17148
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17149
          byName.put(field.getFieldName(), field);
17150
        }
17151
      }
17152
 
17153
      /**
17154
       * Find the _Fields constant that matches fieldId, or null if its not found.
17155
       */
17156
      public static _Fields findByThriftId(int fieldId) {
17157
        switch(fieldId) {
17158
          case 0: // SUCCESS
17159
            return SUCCESS;
17160
          default:
17161
            return null;
17162
        }
17163
      }
17164
 
17165
      /**
17166
       * Find the _Fields constant that matches fieldId, throwing an exception
17167
       * if it is not found.
17168
       */
17169
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17170
        _Fields fields = findByThriftId(fieldId);
17171
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17172
        return fields;
17173
      }
17174
 
17175
      /**
17176
       * Find the _Fields constant that matches name, or null if its not found.
17177
       */
17178
      public static _Fields findByName(String name) {
17179
        return byName.get(name);
17180
      }
17181
 
17182
      private final short _thriftId;
17183
      private final String _fieldName;
17184
 
17185
      _Fields(short thriftId, String fieldName) {
17186
        _thriftId = thriftId;
17187
        _fieldName = fieldName;
17188
      }
17189
 
17190
      public short getThriftFieldId() {
17191
        return _thriftId;
17192
      }
17193
 
17194
      public String getFieldName() {
17195
        return _fieldName;
17196
      }
17197
    }
17198
 
17199
    // isset id assignments
17200
 
17201
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17202
    static {
17203
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17204
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17205
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
17206
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryAvailability.class))));
17207
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17208
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getHistoricSerializedInventoryByScans_result.class, metaDataMap);
17209
    }
17210
 
17211
    public getHistoricSerializedInventoryByScans_result() {
17212
    }
17213
 
17214
    public getHistoricSerializedInventoryByScans_result(
17215
      List<InventoryAvailability> success)
17216
    {
17217
      this();
17218
      this.success = success;
17219
    }
17220
 
17221
    /**
17222
     * Performs a deep copy on <i>other</i>.
17223
     */
17224
    public getHistoricSerializedInventoryByScans_result(getHistoricSerializedInventoryByScans_result other) {
17225
      if (other.isSetSuccess()) {
17226
        List<InventoryAvailability> __this__success = new ArrayList<InventoryAvailability>();
17227
        for (InventoryAvailability other_element : other.success) {
17228
          __this__success.add(new InventoryAvailability(other_element));
17229
        }
17230
        this.success = __this__success;
17231
      }
17232
    }
17233
 
17234
    public getHistoricSerializedInventoryByScans_result deepCopy() {
17235
      return new getHistoricSerializedInventoryByScans_result(this);
17236
    }
17237
 
17238
    @Override
17239
    public void clear() {
17240
      this.success = null;
17241
    }
17242
 
17243
    public int getSuccessSize() {
17244
      return (this.success == null) ? 0 : this.success.size();
17245
    }
17246
 
17247
    public java.util.Iterator<InventoryAvailability> getSuccessIterator() {
17248
      return (this.success == null) ? null : this.success.iterator();
17249
    }
17250
 
17251
    public void addToSuccess(InventoryAvailability elem) {
17252
      if (this.success == null) {
17253
        this.success = new ArrayList<InventoryAvailability>();
17254
      }
17255
      this.success.add(elem);
17256
    }
17257
 
17258
    public List<InventoryAvailability> getSuccess() {
17259
      return this.success;
17260
    }
17261
 
17262
    public void setSuccess(List<InventoryAvailability> success) {
17263
      this.success = success;
17264
    }
17265
 
17266
    public void unsetSuccess() {
17267
      this.success = null;
17268
    }
17269
 
17270
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
17271
    public boolean isSetSuccess() {
17272
      return this.success != null;
17273
    }
17274
 
17275
    public void setSuccessIsSet(boolean value) {
17276
      if (!value) {
17277
        this.success = null;
17278
      }
17279
    }
17280
 
17281
    public void setFieldValue(_Fields field, Object value) {
17282
      switch (field) {
17283
      case SUCCESS:
17284
        if (value == null) {
17285
          unsetSuccess();
17286
        } else {
17287
          setSuccess((List<InventoryAvailability>)value);
17288
        }
17289
        break;
17290
 
17291
      }
17292
    }
17293
 
17294
    public Object getFieldValue(_Fields field) {
17295
      switch (field) {
17296
      case SUCCESS:
17297
        return getSuccess();
17298
 
17299
      }
17300
      throw new IllegalStateException();
17301
    }
17302
 
17303
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17304
    public boolean isSet(_Fields field) {
17305
      if (field == null) {
17306
        throw new IllegalArgumentException();
17307
      }
17308
 
17309
      switch (field) {
17310
      case SUCCESS:
17311
        return isSetSuccess();
17312
      }
17313
      throw new IllegalStateException();
17314
    }
17315
 
17316
    @Override
17317
    public boolean equals(Object that) {
17318
      if (that == null)
17319
        return false;
17320
      if (that instanceof getHistoricSerializedInventoryByScans_result)
17321
        return this.equals((getHistoricSerializedInventoryByScans_result)that);
17322
      return false;
17323
    }
17324
 
17325
    public boolean equals(getHistoricSerializedInventoryByScans_result that) {
17326
      if (that == null)
17327
        return false;
17328
 
17329
      boolean this_present_success = true && this.isSetSuccess();
17330
      boolean that_present_success = true && that.isSetSuccess();
17331
      if (this_present_success || that_present_success) {
17332
        if (!(this_present_success && that_present_success))
17333
          return false;
17334
        if (!this.success.equals(that.success))
17335
          return false;
17336
      }
17337
 
17338
      return true;
17339
    }
17340
 
17341
    @Override
17342
    public int hashCode() {
17343
      return 0;
17344
    }
17345
 
17346
    public int compareTo(getHistoricSerializedInventoryByScans_result other) {
17347
      if (!getClass().equals(other.getClass())) {
17348
        return getClass().getName().compareTo(other.getClass().getName());
17349
      }
17350
 
17351
      int lastComparison = 0;
17352
      getHistoricSerializedInventoryByScans_result typedOther = (getHistoricSerializedInventoryByScans_result)other;
17353
 
17354
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
17355
      if (lastComparison != 0) {
17356
        return lastComparison;
17357
      }
17358
      if (isSetSuccess()) {
17359
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
17360
        if (lastComparison != 0) {
17361
          return lastComparison;
17362
        }
17363
      }
17364
      return 0;
17365
    }
17366
 
17367
    public _Fields fieldForId(int fieldId) {
17368
      return _Fields.findByThriftId(fieldId);
17369
    }
17370
 
17371
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17372
      org.apache.thrift.protocol.TField field;
17373
      iprot.readStructBegin();
17374
      while (true)
17375
      {
17376
        field = iprot.readFieldBegin();
17377
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17378
          break;
17379
        }
17380
        switch (field.id) {
17381
          case 0: // SUCCESS
17382
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
17383
              {
17384
                org.apache.thrift.protocol.TList _list48 = iprot.readListBegin();
17385
                this.success = new ArrayList<InventoryAvailability>(_list48.size);
17386
                for (int _i49 = 0; _i49 < _list48.size; ++_i49)
17387
                {
17388
                  InventoryAvailability _elem50; // required
17389
                  _elem50 = new InventoryAvailability();
17390
                  _elem50.read(iprot);
17391
                  this.success.add(_elem50);
17392
                }
17393
                iprot.readListEnd();
17394
              }
17395
            } else { 
17396
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17397
            }
17398
            break;
17399
          default:
17400
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17401
        }
17402
        iprot.readFieldEnd();
17403
      }
17404
      iprot.readStructEnd();
17405
      validate();
17406
    }
17407
 
17408
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17409
      oprot.writeStructBegin(STRUCT_DESC);
17410
 
17411
      if (this.isSetSuccess()) {
17412
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17413
        {
17414
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
17415
          for (InventoryAvailability _iter51 : this.success)
17416
          {
17417
            _iter51.write(oprot);
17418
          }
17419
          oprot.writeListEnd();
17420
        }
17421
        oprot.writeFieldEnd();
17422
      }
17423
      oprot.writeFieldStop();
17424
      oprot.writeStructEnd();
17425
    }
17426
 
17427
    @Override
17428
    public String toString() {
17429
      StringBuilder sb = new StringBuilder("getHistoricSerializedInventoryByScans_result(");
17430
      boolean first = true;
17431
 
17432
      sb.append("success:");
17433
      if (this.success == null) {
17434
        sb.append("null");
17435
      } else {
17436
        sb.append(this.success);
17437
      }
17438
      first = false;
17439
      sb.append(")");
17440
      return sb.toString();
17441
    }
17442
 
17443
    public void validate() throws org.apache.thrift.TException {
17444
      // check for required fields
17445
    }
17446
 
17447
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17448
      try {
17449
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17450
      } catch (org.apache.thrift.TException te) {
17451
        throw new java.io.IOException(te);
17452
      }
17453
    }
17454
 
17455
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17456
      try {
17457
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17458
      } catch (org.apache.thrift.TException te) {
17459
        throw new java.io.IOException(te);
17460
      }
17461
    }
17462
 
17463
  }
17464
 
17465
  public static class getHistoricNonSerializedInventoryByScans_args implements org.apache.thrift.TBase<getHistoricNonSerializedInventoryByScans_args, getHistoricNonSerializedInventoryByScans_args._Fields>, java.io.Serializable, Cloneable   {
17466
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getHistoricNonSerializedInventoryByScans_args");
17467
 
17468
    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);
17469
 
17470
    private long date; // required
17471
 
17472
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17473
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17474
      DATE((short)1, "date");
17475
 
17476
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17477
 
17478
      static {
17479
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17480
          byName.put(field.getFieldName(), field);
17481
        }
17482
      }
17483
 
17484
      /**
17485
       * Find the _Fields constant that matches fieldId, or null if its not found.
17486
       */
17487
      public static _Fields findByThriftId(int fieldId) {
17488
        switch(fieldId) {
17489
          case 1: // DATE
17490
            return DATE;
17491
          default:
17492
            return null;
17493
        }
17494
      }
17495
 
17496
      /**
17497
       * Find the _Fields constant that matches fieldId, throwing an exception
17498
       * if it is not found.
17499
       */
17500
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17501
        _Fields fields = findByThriftId(fieldId);
17502
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17503
        return fields;
17504
      }
17505
 
17506
      /**
17507
       * Find the _Fields constant that matches name, or null if its not found.
17508
       */
17509
      public static _Fields findByName(String name) {
17510
        return byName.get(name);
17511
      }
17512
 
17513
      private final short _thriftId;
17514
      private final String _fieldName;
17515
 
17516
      _Fields(short thriftId, String fieldName) {
17517
        _thriftId = thriftId;
17518
        _fieldName = fieldName;
17519
      }
17520
 
17521
      public short getThriftFieldId() {
17522
        return _thriftId;
17523
      }
17524
 
17525
      public String getFieldName() {
17526
        return _fieldName;
17527
      }
17528
    }
17529
 
17530
    // isset id assignments
17531
    private static final int __DATE_ISSET_ID = 0;
17532
    private BitSet __isset_bit_vector = new BitSet(1);
17533
 
17534
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17535
    static {
17536
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17537
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17538
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
17539
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17540
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getHistoricNonSerializedInventoryByScans_args.class, metaDataMap);
17541
    }
17542
 
17543
    public getHistoricNonSerializedInventoryByScans_args() {
17544
    }
17545
 
17546
    public getHistoricNonSerializedInventoryByScans_args(
17547
      long date)
17548
    {
17549
      this();
17550
      this.date = date;
17551
      setDateIsSet(true);
17552
    }
17553
 
17554
    /**
17555
     * Performs a deep copy on <i>other</i>.
17556
     */
17557
    public getHistoricNonSerializedInventoryByScans_args(getHistoricNonSerializedInventoryByScans_args other) {
17558
      __isset_bit_vector.clear();
17559
      __isset_bit_vector.or(other.__isset_bit_vector);
17560
      this.date = other.date;
17561
    }
17562
 
17563
    public getHistoricNonSerializedInventoryByScans_args deepCopy() {
17564
      return new getHistoricNonSerializedInventoryByScans_args(this);
17565
    }
17566
 
17567
    @Override
17568
    public void clear() {
17569
      setDateIsSet(false);
17570
      this.date = 0;
17571
    }
17572
 
17573
    public long getDate() {
17574
      return this.date;
17575
    }
17576
 
17577
    public void setDate(long date) {
17578
      this.date = date;
17579
      setDateIsSet(true);
17580
    }
17581
 
17582
    public void unsetDate() {
17583
      __isset_bit_vector.clear(__DATE_ISSET_ID);
17584
    }
17585
 
17586
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
17587
    public boolean isSetDate() {
17588
      return __isset_bit_vector.get(__DATE_ISSET_ID);
17589
    }
17590
 
17591
    public void setDateIsSet(boolean value) {
17592
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
17593
    }
17594
 
17595
    public void setFieldValue(_Fields field, Object value) {
17596
      switch (field) {
17597
      case DATE:
17598
        if (value == null) {
17599
          unsetDate();
17600
        } else {
17601
          setDate((Long)value);
17602
        }
17603
        break;
17604
 
17605
      }
17606
    }
17607
 
17608
    public Object getFieldValue(_Fields field) {
17609
      switch (field) {
17610
      case DATE:
17611
        return Long.valueOf(getDate());
17612
 
17613
      }
17614
      throw new IllegalStateException();
17615
    }
17616
 
17617
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17618
    public boolean isSet(_Fields field) {
17619
      if (field == null) {
17620
        throw new IllegalArgumentException();
17621
      }
17622
 
17623
      switch (field) {
17624
      case DATE:
17625
        return isSetDate();
17626
      }
17627
      throw new IllegalStateException();
17628
    }
17629
 
17630
    @Override
17631
    public boolean equals(Object that) {
17632
      if (that == null)
17633
        return false;
17634
      if (that instanceof getHistoricNonSerializedInventoryByScans_args)
17635
        return this.equals((getHistoricNonSerializedInventoryByScans_args)that);
17636
      return false;
17637
    }
17638
 
17639
    public boolean equals(getHistoricNonSerializedInventoryByScans_args that) {
17640
      if (that == null)
17641
        return false;
17642
 
17643
      boolean this_present_date = true;
17644
      boolean that_present_date = true;
17645
      if (this_present_date || that_present_date) {
17646
        if (!(this_present_date && that_present_date))
17647
          return false;
17648
        if (this.date != that.date)
17649
          return false;
17650
      }
17651
 
17652
      return true;
17653
    }
17654
 
17655
    @Override
17656
    public int hashCode() {
17657
      return 0;
17658
    }
17659
 
17660
    public int compareTo(getHistoricNonSerializedInventoryByScans_args other) {
17661
      if (!getClass().equals(other.getClass())) {
17662
        return getClass().getName().compareTo(other.getClass().getName());
17663
      }
17664
 
17665
      int lastComparison = 0;
17666
      getHistoricNonSerializedInventoryByScans_args typedOther = (getHistoricNonSerializedInventoryByScans_args)other;
17667
 
17668
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
17669
      if (lastComparison != 0) {
17670
        return lastComparison;
17671
      }
17672
      if (isSetDate()) {
17673
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
17674
        if (lastComparison != 0) {
17675
          return lastComparison;
17676
        }
17677
      }
17678
      return 0;
17679
    }
17680
 
17681
    public _Fields fieldForId(int fieldId) {
17682
      return _Fields.findByThriftId(fieldId);
17683
    }
17684
 
17685
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17686
      org.apache.thrift.protocol.TField field;
17687
      iprot.readStructBegin();
17688
      while (true)
17689
      {
17690
        field = iprot.readFieldBegin();
17691
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17692
          break;
17693
        }
17694
        switch (field.id) {
17695
          case 1: // DATE
17696
            if (field.type == org.apache.thrift.protocol.TType.I64) {
17697
              this.date = iprot.readI64();
17698
              setDateIsSet(true);
17699
            } else { 
17700
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17701
            }
17702
            break;
17703
          default:
17704
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17705
        }
17706
        iprot.readFieldEnd();
17707
      }
17708
      iprot.readStructEnd();
17709
      validate();
17710
    }
17711
 
17712
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17713
      validate();
17714
 
17715
      oprot.writeStructBegin(STRUCT_DESC);
17716
      oprot.writeFieldBegin(DATE_FIELD_DESC);
17717
      oprot.writeI64(this.date);
17718
      oprot.writeFieldEnd();
17719
      oprot.writeFieldStop();
17720
      oprot.writeStructEnd();
17721
    }
17722
 
17723
    @Override
17724
    public String toString() {
17725
      StringBuilder sb = new StringBuilder("getHistoricNonSerializedInventoryByScans_args(");
17726
      boolean first = true;
17727
 
17728
      sb.append("date:");
17729
      sb.append(this.date);
17730
      first = false;
17731
      sb.append(")");
17732
      return sb.toString();
17733
    }
17734
 
17735
    public void validate() throws org.apache.thrift.TException {
17736
      // check for required fields
17737
    }
17738
 
17739
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17740
      try {
17741
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17742
      } catch (org.apache.thrift.TException te) {
17743
        throw new java.io.IOException(te);
17744
      }
17745
    }
17746
 
17747
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17748
      try {
17749
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
17750
        __isset_bit_vector = new BitSet(1);
17751
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17752
      } catch (org.apache.thrift.TException te) {
17753
        throw new java.io.IOException(te);
17754
      }
17755
    }
17756
 
17757
  }
17758
 
17759
  public static class getHistoricNonSerializedInventoryByScans_result implements org.apache.thrift.TBase<getHistoricNonSerializedInventoryByScans_result, getHistoricNonSerializedInventoryByScans_result._Fields>, java.io.Serializable, Cloneable   {
17760
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getHistoricNonSerializedInventoryByScans_result");
17761
 
17762
    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);
17763
 
17764
    private List<InventoryAvailability> success; // required
17765
 
17766
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17767
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17768
      SUCCESS((short)0, "success");
17769
 
17770
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17771
 
17772
      static {
17773
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17774
          byName.put(field.getFieldName(), field);
17775
        }
17776
      }
17777
 
17778
      /**
17779
       * Find the _Fields constant that matches fieldId, or null if its not found.
17780
       */
17781
      public static _Fields findByThriftId(int fieldId) {
17782
        switch(fieldId) {
17783
          case 0: // SUCCESS
17784
            return SUCCESS;
17785
          default:
17786
            return null;
17787
        }
17788
      }
17789
 
17790
      /**
17791
       * Find the _Fields constant that matches fieldId, throwing an exception
17792
       * if it is not found.
17793
       */
17794
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17795
        _Fields fields = findByThriftId(fieldId);
17796
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17797
        return fields;
17798
      }
17799
 
17800
      /**
17801
       * Find the _Fields constant that matches name, or null if its not found.
17802
       */
17803
      public static _Fields findByName(String name) {
17804
        return byName.get(name);
17805
      }
17806
 
17807
      private final short _thriftId;
17808
      private final String _fieldName;
17809
 
17810
      _Fields(short thriftId, String fieldName) {
17811
        _thriftId = thriftId;
17812
        _fieldName = fieldName;
17813
      }
17814
 
17815
      public short getThriftFieldId() {
17816
        return _thriftId;
17817
      }
17818
 
17819
      public String getFieldName() {
17820
        return _fieldName;
17821
      }
17822
    }
17823
 
17824
    // isset id assignments
17825
 
17826
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17827
    static {
17828
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17829
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17830
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
17831
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryAvailability.class))));
17832
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17833
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getHistoricNonSerializedInventoryByScans_result.class, metaDataMap);
17834
    }
17835
 
17836
    public getHistoricNonSerializedInventoryByScans_result() {
17837
    }
17838
 
17839
    public getHistoricNonSerializedInventoryByScans_result(
17840
      List<InventoryAvailability> success)
17841
    {
17842
      this();
17843
      this.success = success;
17844
    }
17845
 
17846
    /**
17847
     * Performs a deep copy on <i>other</i>.
17848
     */
17849
    public getHistoricNonSerializedInventoryByScans_result(getHistoricNonSerializedInventoryByScans_result other) {
17850
      if (other.isSetSuccess()) {
17851
        List<InventoryAvailability> __this__success = new ArrayList<InventoryAvailability>();
17852
        for (InventoryAvailability other_element : other.success) {
17853
          __this__success.add(new InventoryAvailability(other_element));
17854
        }
17855
        this.success = __this__success;
17856
      }
17857
    }
17858
 
17859
    public getHistoricNonSerializedInventoryByScans_result deepCopy() {
17860
      return new getHistoricNonSerializedInventoryByScans_result(this);
17861
    }
17862
 
17863
    @Override
17864
    public void clear() {
17865
      this.success = null;
17866
    }
17867
 
17868
    public int getSuccessSize() {
17869
      return (this.success == null) ? 0 : this.success.size();
17870
    }
17871
 
17872
    public java.util.Iterator<InventoryAvailability> getSuccessIterator() {
17873
      return (this.success == null) ? null : this.success.iterator();
17874
    }
17875
 
17876
    public void addToSuccess(InventoryAvailability elem) {
17877
      if (this.success == null) {
17878
        this.success = new ArrayList<InventoryAvailability>();
17879
      }
17880
      this.success.add(elem);
17881
    }
17882
 
17883
    public List<InventoryAvailability> getSuccess() {
17884
      return this.success;
17885
    }
17886
 
17887
    public void setSuccess(List<InventoryAvailability> success) {
17888
      this.success = success;
17889
    }
17890
 
17891
    public void unsetSuccess() {
17892
      this.success = null;
17893
    }
17894
 
17895
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
17896
    public boolean isSetSuccess() {
17897
      return this.success != null;
17898
    }
17899
 
17900
    public void setSuccessIsSet(boolean value) {
17901
      if (!value) {
17902
        this.success = null;
17903
      }
17904
    }
17905
 
17906
    public void setFieldValue(_Fields field, Object value) {
17907
      switch (field) {
17908
      case SUCCESS:
17909
        if (value == null) {
17910
          unsetSuccess();
17911
        } else {
17912
          setSuccess((List<InventoryAvailability>)value);
17913
        }
17914
        break;
17915
 
17916
      }
17917
    }
17918
 
17919
    public Object getFieldValue(_Fields field) {
17920
      switch (field) {
17921
      case SUCCESS:
17922
        return getSuccess();
17923
 
17924
      }
17925
      throw new IllegalStateException();
17926
    }
17927
 
17928
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17929
    public boolean isSet(_Fields field) {
17930
      if (field == null) {
17931
        throw new IllegalArgumentException();
17932
      }
17933
 
17934
      switch (field) {
17935
      case SUCCESS:
17936
        return isSetSuccess();
17937
      }
17938
      throw new IllegalStateException();
17939
    }
17940
 
17941
    @Override
17942
    public boolean equals(Object that) {
17943
      if (that == null)
17944
        return false;
17945
      if (that instanceof getHistoricNonSerializedInventoryByScans_result)
17946
        return this.equals((getHistoricNonSerializedInventoryByScans_result)that);
17947
      return false;
17948
    }
17949
 
17950
    public boolean equals(getHistoricNonSerializedInventoryByScans_result that) {
17951
      if (that == null)
17952
        return false;
17953
 
17954
      boolean this_present_success = true && this.isSetSuccess();
17955
      boolean that_present_success = true && that.isSetSuccess();
17956
      if (this_present_success || that_present_success) {
17957
        if (!(this_present_success && that_present_success))
17958
          return false;
17959
        if (!this.success.equals(that.success))
17960
          return false;
17961
      }
17962
 
17963
      return true;
17964
    }
17965
 
17966
    @Override
17967
    public int hashCode() {
17968
      return 0;
17969
    }
17970
 
17971
    public int compareTo(getHistoricNonSerializedInventoryByScans_result other) {
17972
      if (!getClass().equals(other.getClass())) {
17973
        return getClass().getName().compareTo(other.getClass().getName());
17974
      }
17975
 
17976
      int lastComparison = 0;
17977
      getHistoricNonSerializedInventoryByScans_result typedOther = (getHistoricNonSerializedInventoryByScans_result)other;
17978
 
17979
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
17980
      if (lastComparison != 0) {
17981
        return lastComparison;
17982
      }
17983
      if (isSetSuccess()) {
17984
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
17985
        if (lastComparison != 0) {
17986
          return lastComparison;
17987
        }
17988
      }
17989
      return 0;
17990
    }
17991
 
17992
    public _Fields fieldForId(int fieldId) {
17993
      return _Fields.findByThriftId(fieldId);
17994
    }
17995
 
17996
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17997
      org.apache.thrift.protocol.TField field;
17998
      iprot.readStructBegin();
17999
      while (true)
18000
      {
18001
        field = iprot.readFieldBegin();
18002
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18003
          break;
18004
        }
18005
        switch (field.id) {
18006
          case 0: // SUCCESS
18007
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
18008
              {
18009
                org.apache.thrift.protocol.TList _list52 = iprot.readListBegin();
18010
                this.success = new ArrayList<InventoryAvailability>(_list52.size);
18011
                for (int _i53 = 0; _i53 < _list52.size; ++_i53)
18012
                {
18013
                  InventoryAvailability _elem54; // required
18014
                  _elem54 = new InventoryAvailability();
18015
                  _elem54.read(iprot);
18016
                  this.success.add(_elem54);
18017
                }
18018
                iprot.readListEnd();
18019
              }
18020
            } else { 
18021
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18022
            }
18023
            break;
18024
          default:
18025
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18026
        }
18027
        iprot.readFieldEnd();
18028
      }
18029
      iprot.readStructEnd();
18030
      validate();
18031
    }
18032
 
18033
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18034
      oprot.writeStructBegin(STRUCT_DESC);
18035
 
18036
      if (this.isSetSuccess()) {
18037
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18038
        {
18039
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
18040
          for (InventoryAvailability _iter55 : this.success)
18041
          {
18042
            _iter55.write(oprot);
18043
          }
18044
          oprot.writeListEnd();
18045
        }
18046
        oprot.writeFieldEnd();
18047
      }
18048
      oprot.writeFieldStop();
18049
      oprot.writeStructEnd();
18050
    }
18051
 
18052
    @Override
18053
    public String toString() {
18054
      StringBuilder sb = new StringBuilder("getHistoricNonSerializedInventoryByScans_result(");
18055
      boolean first = true;
18056
 
18057
      sb.append("success:");
18058
      if (this.success == null) {
18059
        sb.append("null");
18060
      } else {
18061
        sb.append(this.success);
18062
      }
18063
      first = false;
18064
      sb.append(")");
18065
      return sb.toString();
18066
    }
18067
 
18068
    public void validate() throws org.apache.thrift.TException {
18069
      // check for required fields
18070
    }
18071
 
18072
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18073
      try {
18074
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18075
      } catch (org.apache.thrift.TException te) {
18076
        throw new java.io.IOException(te);
18077
      }
18078
    }
18079
 
18080
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18081
      try {
18082
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18083
      } catch (org.apache.thrift.TException te) {
18084
        throw new java.io.IOException(te);
18085
      }
18086
    }
18087
 
18088
  }
18089
 
18090
  public static class scanForOursExternalSale_args implements org.apache.thrift.TBase<scanForOursExternalSale_args, scanForOursExternalSale_args._Fields>, java.io.Serializable, Cloneable   {
18091
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOursExternalSale_args");
18092
 
18093
    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);
18094
    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)2);
18095
    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)3);
18096
    private static final org.apache.thrift.protocol.TField INVOICE_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("invoiceNumber", org.apache.thrift.protocol.TType.STRING, (short)4);
18097
    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)5);
18098
    private static final org.apache.thrift.protocol.TField UNIT_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("unitPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)6);
18099
    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)7);
18100
 
18101
    private long itemId; // required
18102
    private String serialNumber; // required
18103
    private String itemNumber; // required
18104
    private String invoiceNumber; // required
18105
    private long warehouseId; // required
18106
    private double unitPrice; // required
18107
    private long orderId; // required
18108
 
18109
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18110
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18111
      ITEM_ID((short)1, "itemId"),
18112
      SERIAL_NUMBER((short)2, "serialNumber"),
18113
      ITEM_NUMBER((short)3, "itemNumber"),
18114
      INVOICE_NUMBER((short)4, "invoiceNumber"),
18115
      WAREHOUSE_ID((short)5, "warehouseId"),
18116
      UNIT_PRICE((short)6, "unitPrice"),
18117
      ORDER_ID((short)7, "orderId");
18118
 
18119
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18120
 
18121
      static {
18122
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18123
          byName.put(field.getFieldName(), field);
18124
        }
18125
      }
18126
 
18127
      /**
18128
       * Find the _Fields constant that matches fieldId, or null if its not found.
18129
       */
18130
      public static _Fields findByThriftId(int fieldId) {
18131
        switch(fieldId) {
18132
          case 1: // ITEM_ID
18133
            return ITEM_ID;
18134
          case 2: // SERIAL_NUMBER
18135
            return SERIAL_NUMBER;
18136
          case 3: // ITEM_NUMBER
18137
            return ITEM_NUMBER;
18138
          case 4: // INVOICE_NUMBER
18139
            return INVOICE_NUMBER;
18140
          case 5: // WAREHOUSE_ID
18141
            return WAREHOUSE_ID;
18142
          case 6: // UNIT_PRICE
18143
            return UNIT_PRICE;
18144
          case 7: // ORDER_ID
18145
            return ORDER_ID;
18146
          default:
18147
            return null;
18148
        }
18149
      }
18150
 
18151
      /**
18152
       * Find the _Fields constant that matches fieldId, throwing an exception
18153
       * if it is not found.
18154
       */
18155
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18156
        _Fields fields = findByThriftId(fieldId);
18157
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18158
        return fields;
18159
      }
18160
 
18161
      /**
18162
       * Find the _Fields constant that matches name, or null if its not found.
18163
       */
18164
      public static _Fields findByName(String name) {
18165
        return byName.get(name);
18166
      }
18167
 
18168
      private final short _thriftId;
18169
      private final String _fieldName;
18170
 
18171
      _Fields(short thriftId, String fieldName) {
18172
        _thriftId = thriftId;
18173
        _fieldName = fieldName;
18174
      }
18175
 
18176
      public short getThriftFieldId() {
18177
        return _thriftId;
18178
      }
18179
 
18180
      public String getFieldName() {
18181
        return _fieldName;
18182
      }
18183
    }
18184
 
18185
    // isset id assignments
18186
    private static final int __ITEMID_ISSET_ID = 0;
18187
    private static final int __WAREHOUSEID_ISSET_ID = 1;
18188
    private static final int __UNITPRICE_ISSET_ID = 2;
18189
    private static final int __ORDERID_ISSET_ID = 3;
18190
    private BitSet __isset_bit_vector = new BitSet(4);
18191
 
18192
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18193
    static {
18194
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18195
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18196
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18197
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18198
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
18199
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18200
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
18201
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18202
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
18203
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18204
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18205
      tmpMap.put(_Fields.UNIT_PRICE, new org.apache.thrift.meta_data.FieldMetaData("unitPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18206
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
18207
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18208
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18209
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18210
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOursExternalSale_args.class, metaDataMap);
18211
    }
18212
 
18213
    public scanForOursExternalSale_args() {
18214
    }
18215
 
18216
    public scanForOursExternalSale_args(
18217
      long itemId,
18218
      String serialNumber,
18219
      String itemNumber,
18220
      String invoiceNumber,
18221
      long warehouseId,
18222
      double unitPrice,
18223
      long orderId)
18224
    {
18225
      this();
18226
      this.itemId = itemId;
18227
      setItemIdIsSet(true);
18228
      this.serialNumber = serialNumber;
18229
      this.itemNumber = itemNumber;
18230
      this.invoiceNumber = invoiceNumber;
18231
      this.warehouseId = warehouseId;
18232
      setWarehouseIdIsSet(true);
18233
      this.unitPrice = unitPrice;
18234
      setUnitPriceIsSet(true);
18235
      this.orderId = orderId;
18236
      setOrderIdIsSet(true);
18237
    }
18238
 
18239
    /**
18240
     * Performs a deep copy on <i>other</i>.
18241
     */
18242
    public scanForOursExternalSale_args(scanForOursExternalSale_args other) {
18243
      __isset_bit_vector.clear();
18244
      __isset_bit_vector.or(other.__isset_bit_vector);
18245
      this.itemId = other.itemId;
18246
      if (other.isSetSerialNumber()) {
18247
        this.serialNumber = other.serialNumber;
18248
      }
18249
      if (other.isSetItemNumber()) {
18250
        this.itemNumber = other.itemNumber;
18251
      }
18252
      if (other.isSetInvoiceNumber()) {
18253
        this.invoiceNumber = other.invoiceNumber;
18254
      }
18255
      this.warehouseId = other.warehouseId;
18256
      this.unitPrice = other.unitPrice;
18257
      this.orderId = other.orderId;
18258
    }
18259
 
18260
    public scanForOursExternalSale_args deepCopy() {
18261
      return new scanForOursExternalSale_args(this);
18262
    }
18263
 
18264
    @Override
18265
    public void clear() {
18266
      setItemIdIsSet(false);
18267
      this.itemId = 0;
18268
      this.serialNumber = null;
18269
      this.itemNumber = null;
18270
      this.invoiceNumber = null;
18271
      setWarehouseIdIsSet(false);
18272
      this.warehouseId = 0;
18273
      setUnitPriceIsSet(false);
18274
      this.unitPrice = 0.0;
18275
      setOrderIdIsSet(false);
18276
      this.orderId = 0;
18277
    }
18278
 
18279
    public long getItemId() {
18280
      return this.itemId;
18281
    }
18282
 
18283
    public void setItemId(long itemId) {
18284
      this.itemId = itemId;
18285
      setItemIdIsSet(true);
18286
    }
18287
 
18288
    public void unsetItemId() {
18289
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
18290
    }
18291
 
18292
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
18293
    public boolean isSetItemId() {
18294
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
18295
    }
18296
 
18297
    public void setItemIdIsSet(boolean value) {
18298
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
18299
    }
18300
 
18301
    public String getSerialNumber() {
18302
      return this.serialNumber;
18303
    }
18304
 
18305
    public void setSerialNumber(String serialNumber) {
18306
      this.serialNumber = serialNumber;
18307
    }
18308
 
18309
    public void unsetSerialNumber() {
18310
      this.serialNumber = null;
18311
    }
18312
 
18313
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
18314
    public boolean isSetSerialNumber() {
18315
      return this.serialNumber != null;
18316
    }
18317
 
18318
    public void setSerialNumberIsSet(boolean value) {
18319
      if (!value) {
18320
        this.serialNumber = null;
18321
      }
18322
    }
18323
 
18324
    public String getItemNumber() {
18325
      return this.itemNumber;
18326
    }
18327
 
18328
    public void setItemNumber(String itemNumber) {
18329
      this.itemNumber = itemNumber;
18330
    }
18331
 
18332
    public void unsetItemNumber() {
18333
      this.itemNumber = null;
18334
    }
18335
 
18336
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
18337
    public boolean isSetItemNumber() {
18338
      return this.itemNumber != null;
18339
    }
18340
 
18341
    public void setItemNumberIsSet(boolean value) {
18342
      if (!value) {
18343
        this.itemNumber = null;
18344
      }
18345
    }
18346
 
18347
    public String getInvoiceNumber() {
18348
      return this.invoiceNumber;
18349
    }
18350
 
18351
    public void setInvoiceNumber(String invoiceNumber) {
18352
      this.invoiceNumber = invoiceNumber;
18353
    }
18354
 
18355
    public void unsetInvoiceNumber() {
18356
      this.invoiceNumber = null;
18357
    }
18358
 
18359
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
18360
    public boolean isSetInvoiceNumber() {
18361
      return this.invoiceNumber != null;
18362
    }
18363
 
18364
    public void setInvoiceNumberIsSet(boolean value) {
18365
      if (!value) {
18366
        this.invoiceNumber = null;
18367
      }
18368
    }
18369
 
18370
    public long getWarehouseId() {
18371
      return this.warehouseId;
18372
    }
18373
 
18374
    public void setWarehouseId(long warehouseId) {
18375
      this.warehouseId = warehouseId;
18376
      setWarehouseIdIsSet(true);
18377
    }
18378
 
18379
    public void unsetWarehouseId() {
18380
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
18381
    }
18382
 
18383
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
18384
    public boolean isSetWarehouseId() {
18385
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
18386
    }
18387
 
18388
    public void setWarehouseIdIsSet(boolean value) {
18389
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
18390
    }
18391
 
18392
    public double getUnitPrice() {
18393
      return this.unitPrice;
18394
    }
18395
 
18396
    public void setUnitPrice(double unitPrice) {
18397
      this.unitPrice = unitPrice;
18398
      setUnitPriceIsSet(true);
18399
    }
18400
 
18401
    public void unsetUnitPrice() {
18402
      __isset_bit_vector.clear(__UNITPRICE_ISSET_ID);
18403
    }
18404
 
18405
    /** Returns true if field unitPrice is set (has been assigned a value) and false otherwise */
18406
    public boolean isSetUnitPrice() {
18407
      return __isset_bit_vector.get(__UNITPRICE_ISSET_ID);
18408
    }
18409
 
18410
    public void setUnitPriceIsSet(boolean value) {
18411
      __isset_bit_vector.set(__UNITPRICE_ISSET_ID, value);
18412
    }
18413
 
18414
    public long getOrderId() {
18415
      return this.orderId;
18416
    }
18417
 
18418
    public void setOrderId(long orderId) {
18419
      this.orderId = orderId;
18420
      setOrderIdIsSet(true);
18421
    }
18422
 
18423
    public void unsetOrderId() {
18424
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
18425
    }
18426
 
18427
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
18428
    public boolean isSetOrderId() {
18429
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
18430
    }
18431
 
18432
    public void setOrderIdIsSet(boolean value) {
18433
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
18434
    }
18435
 
18436
    public void setFieldValue(_Fields field, Object value) {
18437
      switch (field) {
18438
      case ITEM_ID:
18439
        if (value == null) {
18440
          unsetItemId();
18441
        } else {
18442
          setItemId((Long)value);
18443
        }
18444
        break;
18445
 
18446
      case SERIAL_NUMBER:
18447
        if (value == null) {
18448
          unsetSerialNumber();
18449
        } else {
18450
          setSerialNumber((String)value);
18451
        }
18452
        break;
18453
 
18454
      case ITEM_NUMBER:
18455
        if (value == null) {
18456
          unsetItemNumber();
18457
        } else {
18458
          setItemNumber((String)value);
18459
        }
18460
        break;
18461
 
18462
      case INVOICE_NUMBER:
18463
        if (value == null) {
18464
          unsetInvoiceNumber();
18465
        } else {
18466
          setInvoiceNumber((String)value);
18467
        }
18468
        break;
18469
 
18470
      case WAREHOUSE_ID:
18471
        if (value == null) {
18472
          unsetWarehouseId();
18473
        } else {
18474
          setWarehouseId((Long)value);
18475
        }
18476
        break;
18477
 
18478
      case UNIT_PRICE:
18479
        if (value == null) {
18480
          unsetUnitPrice();
18481
        } else {
18482
          setUnitPrice((Double)value);
18483
        }
18484
        break;
18485
 
18486
      case ORDER_ID:
18487
        if (value == null) {
18488
          unsetOrderId();
18489
        } else {
18490
          setOrderId((Long)value);
18491
        }
18492
        break;
18493
 
18494
      }
18495
    }
18496
 
18497
    public Object getFieldValue(_Fields field) {
18498
      switch (field) {
18499
      case ITEM_ID:
18500
        return Long.valueOf(getItemId());
18501
 
18502
      case SERIAL_NUMBER:
18503
        return getSerialNumber();
18504
 
18505
      case ITEM_NUMBER:
18506
        return getItemNumber();
18507
 
18508
      case INVOICE_NUMBER:
18509
        return getInvoiceNumber();
18510
 
18511
      case WAREHOUSE_ID:
18512
        return Long.valueOf(getWarehouseId());
18513
 
18514
      case UNIT_PRICE:
18515
        return Double.valueOf(getUnitPrice());
18516
 
18517
      case ORDER_ID:
18518
        return Long.valueOf(getOrderId());
18519
 
18520
      }
18521
      throw new IllegalStateException();
18522
    }
18523
 
18524
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18525
    public boolean isSet(_Fields field) {
18526
      if (field == null) {
18527
        throw new IllegalArgumentException();
18528
      }
18529
 
18530
      switch (field) {
18531
      case ITEM_ID:
18532
        return isSetItemId();
18533
      case SERIAL_NUMBER:
18534
        return isSetSerialNumber();
18535
      case ITEM_NUMBER:
18536
        return isSetItemNumber();
18537
      case INVOICE_NUMBER:
18538
        return isSetInvoiceNumber();
18539
      case WAREHOUSE_ID:
18540
        return isSetWarehouseId();
18541
      case UNIT_PRICE:
18542
        return isSetUnitPrice();
18543
      case ORDER_ID:
18544
        return isSetOrderId();
18545
      }
18546
      throw new IllegalStateException();
18547
    }
18548
 
18549
    @Override
18550
    public boolean equals(Object that) {
18551
      if (that == null)
18552
        return false;
18553
      if (that instanceof scanForOursExternalSale_args)
18554
        return this.equals((scanForOursExternalSale_args)that);
18555
      return false;
18556
    }
18557
 
18558
    public boolean equals(scanForOursExternalSale_args that) {
18559
      if (that == null)
18560
        return false;
18561
 
18562
      boolean this_present_itemId = true;
18563
      boolean that_present_itemId = true;
18564
      if (this_present_itemId || that_present_itemId) {
18565
        if (!(this_present_itemId && that_present_itemId))
18566
          return false;
18567
        if (this.itemId != that.itemId)
18568
          return false;
18569
      }
18570
 
18571
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
18572
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
18573
      if (this_present_serialNumber || that_present_serialNumber) {
18574
        if (!(this_present_serialNumber && that_present_serialNumber))
18575
          return false;
18576
        if (!this.serialNumber.equals(that.serialNumber))
18577
          return false;
18578
      }
18579
 
18580
      boolean this_present_itemNumber = true && this.isSetItemNumber();
18581
      boolean that_present_itemNumber = true && that.isSetItemNumber();
18582
      if (this_present_itemNumber || that_present_itemNumber) {
18583
        if (!(this_present_itemNumber && that_present_itemNumber))
18584
          return false;
18585
        if (!this.itemNumber.equals(that.itemNumber))
18586
          return false;
18587
      }
18588
 
18589
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
18590
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
18591
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
18592
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
18593
          return false;
18594
        if (!this.invoiceNumber.equals(that.invoiceNumber))
18595
          return false;
18596
      }
18597
 
18598
      boolean this_present_warehouseId = true;
18599
      boolean that_present_warehouseId = true;
18600
      if (this_present_warehouseId || that_present_warehouseId) {
18601
        if (!(this_present_warehouseId && that_present_warehouseId))
18602
          return false;
18603
        if (this.warehouseId != that.warehouseId)
18604
          return false;
18605
      }
18606
 
18607
      boolean this_present_unitPrice = true;
18608
      boolean that_present_unitPrice = true;
18609
      if (this_present_unitPrice || that_present_unitPrice) {
18610
        if (!(this_present_unitPrice && that_present_unitPrice))
18611
          return false;
18612
        if (this.unitPrice != that.unitPrice)
18613
          return false;
18614
      }
18615
 
18616
      boolean this_present_orderId = true;
18617
      boolean that_present_orderId = true;
18618
      if (this_present_orderId || that_present_orderId) {
18619
        if (!(this_present_orderId && that_present_orderId))
18620
          return false;
18621
        if (this.orderId != that.orderId)
18622
          return false;
18623
      }
18624
 
18625
      return true;
18626
    }
18627
 
18628
    @Override
18629
    public int hashCode() {
18630
      return 0;
18631
    }
18632
 
18633
    public int compareTo(scanForOursExternalSale_args other) {
18634
      if (!getClass().equals(other.getClass())) {
18635
        return getClass().getName().compareTo(other.getClass().getName());
18636
      }
18637
 
18638
      int lastComparison = 0;
18639
      scanForOursExternalSale_args typedOther = (scanForOursExternalSale_args)other;
18640
 
18641
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
18642
      if (lastComparison != 0) {
18643
        return lastComparison;
18644
      }
18645
      if (isSetItemId()) {
18646
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
18647
        if (lastComparison != 0) {
18648
          return lastComparison;
18649
        }
18650
      }
18651
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
18652
      if (lastComparison != 0) {
18653
        return lastComparison;
18654
      }
18655
      if (isSetSerialNumber()) {
18656
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
18657
        if (lastComparison != 0) {
18658
          return lastComparison;
18659
        }
18660
      }
18661
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
18662
      if (lastComparison != 0) {
18663
        return lastComparison;
18664
      }
18665
      if (isSetItemNumber()) {
18666
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
18667
        if (lastComparison != 0) {
18668
          return lastComparison;
18669
        }
18670
      }
18671
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
18672
      if (lastComparison != 0) {
18673
        return lastComparison;
18674
      }
18675
      if (isSetInvoiceNumber()) {
18676
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
18677
        if (lastComparison != 0) {
18678
          return lastComparison;
18679
        }
18680
      }
18681
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
18682
      if (lastComparison != 0) {
18683
        return lastComparison;
18684
      }
18685
      if (isSetWarehouseId()) {
18686
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
18687
        if (lastComparison != 0) {
18688
          return lastComparison;
18689
        }
18690
      }
18691
      lastComparison = Boolean.valueOf(isSetUnitPrice()).compareTo(typedOther.isSetUnitPrice());
18692
      if (lastComparison != 0) {
18693
        return lastComparison;
18694
      }
18695
      if (isSetUnitPrice()) {
18696
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unitPrice, typedOther.unitPrice);
18697
        if (lastComparison != 0) {
18698
          return lastComparison;
18699
        }
18700
      }
18701
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
18702
      if (lastComparison != 0) {
18703
        return lastComparison;
18704
      }
18705
      if (isSetOrderId()) {
18706
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
18707
        if (lastComparison != 0) {
18708
          return lastComparison;
18709
        }
18710
      }
18711
      return 0;
18712
    }
18713
 
18714
    public _Fields fieldForId(int fieldId) {
18715
      return _Fields.findByThriftId(fieldId);
18716
    }
18717
 
18718
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18719
      org.apache.thrift.protocol.TField field;
18720
      iprot.readStructBegin();
18721
      while (true)
18722
      {
18723
        field = iprot.readFieldBegin();
18724
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18725
          break;
18726
        }
18727
        switch (field.id) {
18728
          case 1: // ITEM_ID
18729
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18730
              this.itemId = iprot.readI64();
18731
              setItemIdIsSet(true);
18732
            } else { 
18733
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18734
            }
18735
            break;
18736
          case 2: // SERIAL_NUMBER
18737
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
18738
              this.serialNumber = iprot.readString();
18739
            } else { 
18740
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18741
            }
18742
            break;
18743
          case 3: // ITEM_NUMBER
18744
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
18745
              this.itemNumber = iprot.readString();
18746
            } else { 
18747
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18748
            }
18749
            break;
18750
          case 4: // INVOICE_NUMBER
18751
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
18752
              this.invoiceNumber = iprot.readString();
18753
            } else { 
18754
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18755
            }
18756
            break;
18757
          case 5: // WAREHOUSE_ID
18758
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18759
              this.warehouseId = iprot.readI64();
18760
              setWarehouseIdIsSet(true);
18761
            } else { 
18762
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18763
            }
18764
            break;
18765
          case 6: // UNIT_PRICE
18766
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
18767
              this.unitPrice = iprot.readDouble();
18768
              setUnitPriceIsSet(true);
18769
            } else { 
18770
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18771
            }
18772
            break;
18773
          case 7: // ORDER_ID
18774
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18775
              this.orderId = iprot.readI64();
18776
              setOrderIdIsSet(true);
18777
            } else { 
18778
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18779
            }
18780
            break;
18781
          default:
18782
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18783
        }
18784
        iprot.readFieldEnd();
18785
      }
18786
      iprot.readStructEnd();
18787
      validate();
18788
    }
18789
 
18790
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18791
      validate();
18792
 
18793
      oprot.writeStructBegin(STRUCT_DESC);
18794
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
18795
      oprot.writeI64(this.itemId);
18796
      oprot.writeFieldEnd();
18797
      if (this.serialNumber != null) {
18798
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
18799
        oprot.writeString(this.serialNumber);
18800
        oprot.writeFieldEnd();
18801
      }
18802
      if (this.itemNumber != null) {
18803
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
18804
        oprot.writeString(this.itemNumber);
18805
        oprot.writeFieldEnd();
18806
      }
18807
      if (this.invoiceNumber != null) {
18808
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
18809
        oprot.writeString(this.invoiceNumber);
18810
        oprot.writeFieldEnd();
18811
      }
18812
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
18813
      oprot.writeI64(this.warehouseId);
18814
      oprot.writeFieldEnd();
18815
      oprot.writeFieldBegin(UNIT_PRICE_FIELD_DESC);
18816
      oprot.writeDouble(this.unitPrice);
18817
      oprot.writeFieldEnd();
18818
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
18819
      oprot.writeI64(this.orderId);
18820
      oprot.writeFieldEnd();
18821
      oprot.writeFieldStop();
18822
      oprot.writeStructEnd();
18823
    }
18824
 
18825
    @Override
18826
    public String toString() {
18827
      StringBuilder sb = new StringBuilder("scanForOursExternalSale_args(");
18828
      boolean first = true;
18829
 
18830
      sb.append("itemId:");
18831
      sb.append(this.itemId);
18832
      first = false;
18833
      if (!first) sb.append(", ");
18834
      sb.append("serialNumber:");
18835
      if (this.serialNumber == null) {
18836
        sb.append("null");
18837
      } else {
18838
        sb.append(this.serialNumber);
18839
      }
18840
      first = false;
18841
      if (!first) sb.append(", ");
18842
      sb.append("itemNumber:");
18843
      if (this.itemNumber == null) {
18844
        sb.append("null");
18845
      } else {
18846
        sb.append(this.itemNumber);
18847
      }
18848
      first = false;
18849
      if (!first) sb.append(", ");
18850
      sb.append("invoiceNumber:");
18851
      if (this.invoiceNumber == null) {
18852
        sb.append("null");
18853
      } else {
18854
        sb.append(this.invoiceNumber);
18855
      }
18856
      first = false;
18857
      if (!first) sb.append(", ");
18858
      sb.append("warehouseId:");
18859
      sb.append(this.warehouseId);
18860
      first = false;
18861
      if (!first) sb.append(", ");
18862
      sb.append("unitPrice:");
18863
      sb.append(this.unitPrice);
18864
      first = false;
18865
      if (!first) sb.append(", ");
18866
      sb.append("orderId:");
18867
      sb.append(this.orderId);
18868
      first = false;
18869
      sb.append(")");
18870
      return sb.toString();
18871
    }
18872
 
18873
    public void validate() throws org.apache.thrift.TException {
18874
      // check for required fields
18875
    }
18876
 
18877
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18878
      try {
18879
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18880
      } catch (org.apache.thrift.TException te) {
18881
        throw new java.io.IOException(te);
18882
      }
18883
    }
18884
 
18885
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18886
      try {
18887
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
18888
        __isset_bit_vector = new BitSet(1);
18889
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18890
      } catch (org.apache.thrift.TException te) {
18891
        throw new java.io.IOException(te);
18892
      }
18893
    }
18894
 
18895
  }
18896
 
18897
  public static class scanForOursExternalSale_result implements org.apache.thrift.TBase<scanForOursExternalSale_result, scanForOursExternalSale_result._Fields>, java.io.Serializable, Cloneable   {
18898
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOursExternalSale_result");
18899
 
18900
    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);
18901
    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);
18902
 
18903
    private InventoryItem success; // required
18904
    private WarehouseServiceException ex; // required
18905
 
18906
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18907
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18908
      SUCCESS((short)0, "success"),
18909
      EX((short)1, "ex");
18910
 
18911
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18912
 
18913
      static {
18914
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18915
          byName.put(field.getFieldName(), field);
18916
        }
18917
      }
18918
 
18919
      /**
18920
       * Find the _Fields constant that matches fieldId, or null if its not found.
18921
       */
18922
      public static _Fields findByThriftId(int fieldId) {
18923
        switch(fieldId) {
18924
          case 0: // SUCCESS
18925
            return SUCCESS;
18926
          case 1: // EX
18927
            return EX;
18928
          default:
18929
            return null;
18930
        }
18931
      }
18932
 
18933
      /**
18934
       * Find the _Fields constant that matches fieldId, throwing an exception
18935
       * if it is not found.
18936
       */
18937
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18938
        _Fields fields = findByThriftId(fieldId);
18939
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18940
        return fields;
18941
      }
18942
 
18943
      /**
18944
       * Find the _Fields constant that matches name, or null if its not found.
18945
       */
18946
      public static _Fields findByName(String name) {
18947
        return byName.get(name);
18948
      }
18949
 
18950
      private final short _thriftId;
18951
      private final String _fieldName;
18952
 
18953
      _Fields(short thriftId, String fieldName) {
18954
        _thriftId = thriftId;
18955
        _fieldName = fieldName;
18956
      }
18957
 
18958
      public short getThriftFieldId() {
18959
        return _thriftId;
18960
      }
18961
 
18962
      public String getFieldName() {
18963
        return _fieldName;
18964
      }
18965
    }
18966
 
18967
    // isset id assignments
18968
 
18969
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18970
    static {
18971
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18972
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18973
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
18974
      tmpMap.put(_Fields.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18975
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
18976
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18977
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOursExternalSale_result.class, metaDataMap);
18978
    }
18979
 
18980
    public scanForOursExternalSale_result() {
18981
    }
18982
 
18983
    public scanForOursExternalSale_result(
18984
      InventoryItem success,
18985
      WarehouseServiceException ex)
18986
    {
18987
      this();
18988
      this.success = success;
18989
      this.ex = ex;
18990
    }
18991
 
18992
    /**
18993
     * Performs a deep copy on <i>other</i>.
18994
     */
18995
    public scanForOursExternalSale_result(scanForOursExternalSale_result other) {
18996
      if (other.isSetSuccess()) {
18997
        this.success = new InventoryItem(other.success);
18998
      }
18999
      if (other.isSetEx()) {
19000
        this.ex = new WarehouseServiceException(other.ex);
19001
      }
19002
    }
19003
 
19004
    public scanForOursExternalSale_result deepCopy() {
19005
      return new scanForOursExternalSale_result(this);
19006
    }
19007
 
19008
    @Override
19009
    public void clear() {
19010
      this.success = null;
19011
      this.ex = null;
19012
    }
19013
 
19014
    public InventoryItem getSuccess() {
19015
      return this.success;
19016
    }
19017
 
19018
    public void setSuccess(InventoryItem success) {
19019
      this.success = success;
19020
    }
19021
 
19022
    public void unsetSuccess() {
19023
      this.success = null;
19024
    }
19025
 
19026
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
19027
    public boolean isSetSuccess() {
19028
      return this.success != null;
19029
    }
19030
 
19031
    public void setSuccessIsSet(boolean value) {
19032
      if (!value) {
19033
        this.success = null;
19034
      }
19035
    }
19036
 
19037
    public WarehouseServiceException getEx() {
19038
      return this.ex;
19039
    }
19040
 
19041
    public void setEx(WarehouseServiceException ex) {
19042
      this.ex = ex;
19043
    }
19044
 
19045
    public void unsetEx() {
19046
      this.ex = null;
19047
    }
19048
 
19049
    /** Returns true if field ex is set (has been assigned a value) and false otherwise */
19050
    public boolean isSetEx() {
19051
      return this.ex != null;
19052
    }
19053
 
19054
    public void setExIsSet(boolean value) {
19055
      if (!value) {
19056
        this.ex = null;
19057
      }
19058
    }
19059
 
19060
    public void setFieldValue(_Fields field, Object value) {
19061
      switch (field) {
19062
      case SUCCESS:
19063
        if (value == null) {
19064
          unsetSuccess();
19065
        } else {
19066
          setSuccess((InventoryItem)value);
19067
        }
19068
        break;
19069
 
19070
      case EX:
19071
        if (value == null) {
19072
          unsetEx();
19073
        } else {
19074
          setEx((WarehouseServiceException)value);
19075
        }
19076
        break;
19077
 
19078
      }
19079
    }
19080
 
19081
    public Object getFieldValue(_Fields field) {
19082
      switch (field) {
19083
      case SUCCESS:
19084
        return getSuccess();
19085
 
19086
      case EX:
19087
        return getEx();
19088
 
19089
      }
19090
      throw new IllegalStateException();
19091
    }
19092
 
19093
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19094
    public boolean isSet(_Fields field) {
19095
      if (field == null) {
19096
        throw new IllegalArgumentException();
19097
      }
19098
 
19099
      switch (field) {
19100
      case SUCCESS:
19101
        return isSetSuccess();
19102
      case EX:
19103
        return isSetEx();
19104
      }
19105
      throw new IllegalStateException();
19106
    }
19107
 
19108
    @Override
19109
    public boolean equals(Object that) {
19110
      if (that == null)
19111
        return false;
19112
      if (that instanceof scanForOursExternalSale_result)
19113
        return this.equals((scanForOursExternalSale_result)that);
19114
      return false;
19115
    }
19116
 
19117
    public boolean equals(scanForOursExternalSale_result that) {
19118
      if (that == null)
19119
        return false;
19120
 
19121
      boolean this_present_success = true && this.isSetSuccess();
19122
      boolean that_present_success = true && that.isSetSuccess();
19123
      if (this_present_success || that_present_success) {
19124
        if (!(this_present_success && that_present_success))
19125
          return false;
19126
        if (!this.success.equals(that.success))
19127
          return false;
19128
      }
19129
 
19130
      boolean this_present_ex = true && this.isSetEx();
19131
      boolean that_present_ex = true && that.isSetEx();
19132
      if (this_present_ex || that_present_ex) {
19133
        if (!(this_present_ex && that_present_ex))
19134
          return false;
19135
        if (!this.ex.equals(that.ex))
19136
          return false;
19137
      }
19138
 
19139
      return true;
19140
    }
19141
 
19142
    @Override
19143
    public int hashCode() {
19144
      return 0;
19145
    }
19146
 
19147
    public int compareTo(scanForOursExternalSale_result other) {
19148
      if (!getClass().equals(other.getClass())) {
19149
        return getClass().getName().compareTo(other.getClass().getName());
19150
      }
19151
 
19152
      int lastComparison = 0;
19153
      scanForOursExternalSale_result typedOther = (scanForOursExternalSale_result)other;
19154
 
19155
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
19156
      if (lastComparison != 0) {
19157
        return lastComparison;
19158
      }
19159
      if (isSetSuccess()) {
19160
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
19161
        if (lastComparison != 0) {
19162
          return lastComparison;
19163
        }
19164
      }
19165
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx());
19166
      if (lastComparison != 0) {
19167
        return lastComparison;
19168
      }
19169
      if (isSetEx()) {
19170
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, typedOther.ex);
19171
        if (lastComparison != 0) {
19172
          return lastComparison;
19173
        }
19174
      }
19175
      return 0;
19176
    }
19177
 
19178
    public _Fields fieldForId(int fieldId) {
19179
      return _Fields.findByThriftId(fieldId);
19180
    }
19181
 
19182
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19183
      org.apache.thrift.protocol.TField field;
19184
      iprot.readStructBegin();
19185
      while (true)
19186
      {
19187
        field = iprot.readFieldBegin();
19188
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19189
          break;
19190
        }
19191
        switch (field.id) {
19192
          case 0: // SUCCESS
19193
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
19194
              this.success = new InventoryItem();
19195
              this.success.read(iprot);
19196
            } else { 
19197
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19198
            }
19199
            break;
19200
          case 1: // EX
19201
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
19202
              this.ex = new WarehouseServiceException();
19203
              this.ex.read(iprot);
19204
            } else { 
19205
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19206
            }
19207
            break;
19208
          default:
19209
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19210
        }
19211
        iprot.readFieldEnd();
19212
      }
19213
      iprot.readStructEnd();
19214
      validate();
19215
    }
19216
 
19217
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19218
      oprot.writeStructBegin(STRUCT_DESC);
19219
 
19220
      if (this.isSetSuccess()) {
19221
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
19222
        this.success.write(oprot);
19223
        oprot.writeFieldEnd();
19224
      } else if (this.isSetEx()) {
19225
        oprot.writeFieldBegin(EX_FIELD_DESC);
19226
        this.ex.write(oprot);
19227
        oprot.writeFieldEnd();
19228
      }
19229
      oprot.writeFieldStop();
19230
      oprot.writeStructEnd();
19231
    }
19232
 
19233
    @Override
19234
    public String toString() {
19235
      StringBuilder sb = new StringBuilder("scanForOursExternalSale_result(");
19236
      boolean first = true;
19237
 
19238
      sb.append("success:");
19239
      if (this.success == null) {
19240
        sb.append("null");
19241
      } else {
19242
        sb.append(this.success);
19243
      }
19244
      first = false;
19245
      if (!first) sb.append(", ");
19246
      sb.append("ex:");
19247
      if (this.ex == null) {
19248
        sb.append("null");
19249
      } else {
19250
        sb.append(this.ex);
19251
      }
19252
      first = false;
19253
      sb.append(")");
19254
      return sb.toString();
19255
    }
19256
 
19257
    public void validate() throws org.apache.thrift.TException {
19258
      // check for required fields
19259
    }
19260
 
19261
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19262
      try {
19263
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19264
      } catch (org.apache.thrift.TException te) {
19265
        throw new java.io.IOException(te);
19266
      }
19267
    }
19268
 
19269
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19270
      try {
19271
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19272
      } catch (org.apache.thrift.TException te) {
19273
        throw new java.io.IOException(te);
19274
      }
19275
    }
19276
 
19277
  }
19278
 
19279
  public static class scanForOursExternalSaleReturn_args implements org.apache.thrift.TBase<scanForOursExternalSaleReturn_args, scanForOursExternalSaleReturn_args._Fields>, java.io.Serializable, Cloneable   {
19280
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOursExternalSaleReturn_args");
19281
 
19282
    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);
19283
    private static final org.apache.thrift.protocol.TField UNIT_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("unitPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)2);
19284
 
19285
    private long orderId; // required
19286
    private double unitPrice; // required
19287
 
19288
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19289
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19290
      ORDER_ID((short)1, "orderId"),
19291
      UNIT_PRICE((short)2, "unitPrice");
19292
 
19293
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19294
 
19295
      static {
19296
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19297
          byName.put(field.getFieldName(), field);
19298
        }
19299
      }
19300
 
19301
      /**
19302
       * Find the _Fields constant that matches fieldId, or null if its not found.
19303
       */
19304
      public static _Fields findByThriftId(int fieldId) {
19305
        switch(fieldId) {
19306
          case 1: // ORDER_ID
19307
            return ORDER_ID;
19308
          case 2: // UNIT_PRICE
19309
            return UNIT_PRICE;
19310
          default:
19311
            return null;
19312
        }
19313
      }
19314
 
19315
      /**
19316
       * Find the _Fields constant that matches fieldId, throwing an exception
19317
       * if it is not found.
19318
       */
19319
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19320
        _Fields fields = findByThriftId(fieldId);
19321
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19322
        return fields;
19323
      }
19324
 
19325
      /**
19326
       * Find the _Fields constant that matches name, or null if its not found.
19327
       */
19328
      public static _Fields findByName(String name) {
19329
        return byName.get(name);
19330
      }
19331
 
19332
      private final short _thriftId;
19333
      private final String _fieldName;
19334
 
19335
      _Fields(short thriftId, String fieldName) {
19336
        _thriftId = thriftId;
19337
        _fieldName = fieldName;
19338
      }
19339
 
19340
      public short getThriftFieldId() {
19341
        return _thriftId;
19342
      }
19343
 
19344
      public String getFieldName() {
19345
        return _fieldName;
19346
      }
19347
    }
19348
 
19349
    // isset id assignments
19350
    private static final int __ORDERID_ISSET_ID = 0;
19351
    private static final int __UNITPRICE_ISSET_ID = 1;
19352
    private BitSet __isset_bit_vector = new BitSet(2);
19353
 
19354
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19355
    static {
19356
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19357
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19358
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19359
      tmpMap.put(_Fields.UNIT_PRICE, new org.apache.thrift.meta_data.FieldMetaData("unitPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19360
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
19361
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19362
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOursExternalSaleReturn_args.class, metaDataMap);
19363
    }
19364
 
19365
    public scanForOursExternalSaleReturn_args() {
19366
    }
19367
 
19368
    public scanForOursExternalSaleReturn_args(
19369
      long orderId,
19370
      double unitPrice)
19371
    {
19372
      this();
19373
      this.orderId = orderId;
19374
      setOrderIdIsSet(true);
19375
      this.unitPrice = unitPrice;
19376
      setUnitPriceIsSet(true);
19377
    }
19378
 
19379
    /**
19380
     * Performs a deep copy on <i>other</i>.
19381
     */
19382
    public scanForOursExternalSaleReturn_args(scanForOursExternalSaleReturn_args other) {
19383
      __isset_bit_vector.clear();
19384
      __isset_bit_vector.or(other.__isset_bit_vector);
19385
      this.orderId = other.orderId;
19386
      this.unitPrice = other.unitPrice;
19387
    }
19388
 
19389
    public scanForOursExternalSaleReturn_args deepCopy() {
19390
      return new scanForOursExternalSaleReturn_args(this);
19391
    }
19392
 
19393
    @Override
19394
    public void clear() {
19395
      setOrderIdIsSet(false);
19396
      this.orderId = 0;
19397
      setUnitPriceIsSet(false);
19398
      this.unitPrice = 0.0;
19399
    }
19400
 
19401
    public long getOrderId() {
19402
      return this.orderId;
19403
    }
19404
 
19405
    public void setOrderId(long orderId) {
19406
      this.orderId = orderId;
19407
      setOrderIdIsSet(true);
19408
    }
19409
 
19410
    public void unsetOrderId() {
19411
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
19412
    }
19413
 
19414
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
19415
    public boolean isSetOrderId() {
19416
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
19417
    }
19418
 
19419
    public void setOrderIdIsSet(boolean value) {
19420
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
19421
    }
19422
 
19423
    public double getUnitPrice() {
19424
      return this.unitPrice;
19425
    }
19426
 
19427
    public void setUnitPrice(double unitPrice) {
19428
      this.unitPrice = unitPrice;
19429
      setUnitPriceIsSet(true);
19430
    }
19431
 
19432
    public void unsetUnitPrice() {
19433
      __isset_bit_vector.clear(__UNITPRICE_ISSET_ID);
19434
    }
19435
 
19436
    /** Returns true if field unitPrice is set (has been assigned a value) and false otherwise */
19437
    public boolean isSetUnitPrice() {
19438
      return __isset_bit_vector.get(__UNITPRICE_ISSET_ID);
19439
    }
19440
 
19441
    public void setUnitPriceIsSet(boolean value) {
19442
      __isset_bit_vector.set(__UNITPRICE_ISSET_ID, value);
19443
    }
19444
 
19445
    public void setFieldValue(_Fields field, Object value) {
19446
      switch (field) {
19447
      case ORDER_ID:
19448
        if (value == null) {
19449
          unsetOrderId();
19450
        } else {
19451
          setOrderId((Long)value);
19452
        }
19453
        break;
19454
 
19455
      case UNIT_PRICE:
19456
        if (value == null) {
19457
          unsetUnitPrice();
19458
        } else {
19459
          setUnitPrice((Double)value);
19460
        }
19461
        break;
19462
 
19463
      }
19464
    }
19465
 
19466
    public Object getFieldValue(_Fields field) {
19467
      switch (field) {
19468
      case ORDER_ID:
19469
        return Long.valueOf(getOrderId());
19470
 
19471
      case UNIT_PRICE:
19472
        return Double.valueOf(getUnitPrice());
19473
 
19474
      }
19475
      throw new IllegalStateException();
19476
    }
19477
 
19478
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19479
    public boolean isSet(_Fields field) {
19480
      if (field == null) {
19481
        throw new IllegalArgumentException();
19482
      }
19483
 
19484
      switch (field) {
19485
      case ORDER_ID:
19486
        return isSetOrderId();
19487
      case UNIT_PRICE:
19488
        return isSetUnitPrice();
19489
      }
19490
      throw new IllegalStateException();
19491
    }
19492
 
19493
    @Override
19494
    public boolean equals(Object that) {
19495
      if (that == null)
19496
        return false;
19497
      if (that instanceof scanForOursExternalSaleReturn_args)
19498
        return this.equals((scanForOursExternalSaleReturn_args)that);
19499
      return false;
19500
    }
19501
 
19502
    public boolean equals(scanForOursExternalSaleReturn_args that) {
19503
      if (that == null)
19504
        return false;
19505
 
19506
      boolean this_present_orderId = true;
19507
      boolean that_present_orderId = true;
19508
      if (this_present_orderId || that_present_orderId) {
19509
        if (!(this_present_orderId && that_present_orderId))
19510
          return false;
19511
        if (this.orderId != that.orderId)
19512
          return false;
19513
      }
19514
 
19515
      boolean this_present_unitPrice = true;
19516
      boolean that_present_unitPrice = true;
19517
      if (this_present_unitPrice || that_present_unitPrice) {
19518
        if (!(this_present_unitPrice && that_present_unitPrice))
19519
          return false;
19520
        if (this.unitPrice != that.unitPrice)
19521
          return false;
19522
      }
19523
 
19524
      return true;
19525
    }
19526
 
19527
    @Override
19528
    public int hashCode() {
19529
      return 0;
19530
    }
19531
 
19532
    public int compareTo(scanForOursExternalSaleReturn_args other) {
19533
      if (!getClass().equals(other.getClass())) {
19534
        return getClass().getName().compareTo(other.getClass().getName());
19535
      }
19536
 
19537
      int lastComparison = 0;
19538
      scanForOursExternalSaleReturn_args typedOther = (scanForOursExternalSaleReturn_args)other;
19539
 
19540
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
19541
      if (lastComparison != 0) {
19542
        return lastComparison;
19543
      }
19544
      if (isSetOrderId()) {
19545
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
19546
        if (lastComparison != 0) {
19547
          return lastComparison;
19548
        }
19549
      }
19550
      lastComparison = Boolean.valueOf(isSetUnitPrice()).compareTo(typedOther.isSetUnitPrice());
19551
      if (lastComparison != 0) {
19552
        return lastComparison;
19553
      }
19554
      if (isSetUnitPrice()) {
19555
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unitPrice, typedOther.unitPrice);
19556
        if (lastComparison != 0) {
19557
          return lastComparison;
19558
        }
19559
      }
19560
      return 0;
19561
    }
19562
 
19563
    public _Fields fieldForId(int fieldId) {
19564
      return _Fields.findByThriftId(fieldId);
19565
    }
19566
 
19567
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19568
      org.apache.thrift.protocol.TField field;
19569
      iprot.readStructBegin();
19570
      while (true)
19571
      {
19572
        field = iprot.readFieldBegin();
19573
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19574
          break;
19575
        }
19576
        switch (field.id) {
19577
          case 1: // ORDER_ID
19578
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19579
              this.orderId = iprot.readI64();
19580
              setOrderIdIsSet(true);
19581
            } else { 
19582
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19583
            }
19584
            break;
19585
          case 2: // UNIT_PRICE
19586
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
19587
              this.unitPrice = iprot.readDouble();
19588
              setUnitPriceIsSet(true);
19589
            } else { 
19590
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19591
            }
19592
            break;
19593
          default:
19594
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19595
        }
19596
        iprot.readFieldEnd();
19597
      }
19598
      iprot.readStructEnd();
19599
      validate();
19600
    }
19601
 
19602
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19603
      validate();
19604
 
19605
      oprot.writeStructBegin(STRUCT_DESC);
19606
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
19607
      oprot.writeI64(this.orderId);
19608
      oprot.writeFieldEnd();
19609
      oprot.writeFieldBegin(UNIT_PRICE_FIELD_DESC);
19610
      oprot.writeDouble(this.unitPrice);
19611
      oprot.writeFieldEnd();
19612
      oprot.writeFieldStop();
19613
      oprot.writeStructEnd();
19614
    }
19615
 
19616
    @Override
19617
    public String toString() {
19618
      StringBuilder sb = new StringBuilder("scanForOursExternalSaleReturn_args(");
19619
      boolean first = true;
19620
 
19621
      sb.append("orderId:");
19622
      sb.append(this.orderId);
19623
      first = false;
19624
      if (!first) sb.append(", ");
19625
      sb.append("unitPrice:");
19626
      sb.append(this.unitPrice);
19627
      first = false;
19628
      sb.append(")");
19629
      return sb.toString();
19630
    }
19631
 
19632
    public void validate() throws org.apache.thrift.TException {
19633
      // check for required fields
19634
    }
19635
 
19636
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19637
      try {
19638
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19639
      } catch (org.apache.thrift.TException te) {
19640
        throw new java.io.IOException(te);
19641
      }
19642
    }
19643
 
19644
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19645
      try {
19646
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19647
      } catch (org.apache.thrift.TException te) {
19648
        throw new java.io.IOException(te);
19649
      }
19650
    }
19651
 
19652
  }
19653
 
19654
  public static class scanForOursExternalSaleReturn_result implements org.apache.thrift.TBase<scanForOursExternalSaleReturn_result, scanForOursExternalSaleReturn_result._Fields>, java.io.Serializable, Cloneable   {
19655
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOursExternalSaleReturn_result");
19656
 
19657
 
19658
 
19659
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19660
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19661
;
19662
 
19663
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19664
 
19665
      static {
19666
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19667
          byName.put(field.getFieldName(), field);
19668
        }
19669
      }
19670
 
19671
      /**
19672
       * Find the _Fields constant that matches fieldId, or null if its not found.
19673
       */
19674
      public static _Fields findByThriftId(int fieldId) {
19675
        switch(fieldId) {
19676
          default:
19677
            return null;
19678
        }
19679
      }
19680
 
19681
      /**
19682
       * Find the _Fields constant that matches fieldId, throwing an exception
19683
       * if it is not found.
19684
       */
19685
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19686
        _Fields fields = findByThriftId(fieldId);
19687
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19688
        return fields;
19689
      }
19690
 
19691
      /**
19692
       * Find the _Fields constant that matches name, or null if its not found.
19693
       */
19694
      public static _Fields findByName(String name) {
19695
        return byName.get(name);
19696
      }
19697
 
19698
      private final short _thriftId;
19699
      private final String _fieldName;
19700
 
19701
      _Fields(short thriftId, String fieldName) {
19702
        _thriftId = thriftId;
19703
        _fieldName = fieldName;
19704
      }
19705
 
19706
      public short getThriftFieldId() {
19707
        return _thriftId;
19708
      }
19709
 
19710
      public String getFieldName() {
19711
        return _fieldName;
19712
      }
19713
    }
19714
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19715
    static {
19716
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19717
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19718
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOursExternalSaleReturn_result.class, metaDataMap);
19719
    }
19720
 
19721
    public scanForOursExternalSaleReturn_result() {
19722
    }
19723
 
19724
    /**
19725
     * Performs a deep copy on <i>other</i>.
19726
     */
19727
    public scanForOursExternalSaleReturn_result(scanForOursExternalSaleReturn_result other) {
19728
    }
19729
 
19730
    public scanForOursExternalSaleReturn_result deepCopy() {
19731
      return new scanForOursExternalSaleReturn_result(this);
19732
    }
19733
 
19734
    @Override
19735
    public void clear() {
19736
    }
19737
 
19738
    public void setFieldValue(_Fields field, Object value) {
19739
      switch (field) {
19740
      }
19741
    }
19742
 
19743
    public Object getFieldValue(_Fields field) {
19744
      switch (field) {
19745
      }
19746
      throw new IllegalStateException();
19747
    }
19748
 
19749
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19750
    public boolean isSet(_Fields field) {
19751
      if (field == null) {
19752
        throw new IllegalArgumentException();
19753
      }
19754
 
19755
      switch (field) {
19756
      }
19757
      throw new IllegalStateException();
19758
    }
19759
 
19760
    @Override
19761
    public boolean equals(Object that) {
19762
      if (that == null)
19763
        return false;
19764
      if (that instanceof scanForOursExternalSaleReturn_result)
19765
        return this.equals((scanForOursExternalSaleReturn_result)that);
19766
      return false;
19767
    }
19768
 
19769
    public boolean equals(scanForOursExternalSaleReturn_result that) {
19770
      if (that == null)
19771
        return false;
19772
 
19773
      return true;
19774
    }
19775
 
19776
    @Override
19777
    public int hashCode() {
19778
      return 0;
19779
    }
19780
 
19781
    public int compareTo(scanForOursExternalSaleReturn_result other) {
19782
      if (!getClass().equals(other.getClass())) {
19783
        return getClass().getName().compareTo(other.getClass().getName());
19784
      }
19785
 
19786
      int lastComparison = 0;
19787
      scanForOursExternalSaleReturn_result typedOther = (scanForOursExternalSaleReturn_result)other;
19788
 
19789
      return 0;
19790
    }
19791
 
19792
    public _Fields fieldForId(int fieldId) {
19793
      return _Fields.findByThriftId(fieldId);
19794
    }
19795
 
19796
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19797
      org.apache.thrift.protocol.TField field;
19798
      iprot.readStructBegin();
19799
      while (true)
19800
      {
19801
        field = iprot.readFieldBegin();
19802
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19803
          break;
19804
        }
19805
        switch (field.id) {
19806
          default:
19807
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19808
        }
19809
        iprot.readFieldEnd();
19810
      }
19811
      iprot.readStructEnd();
19812
      validate();
19813
    }
19814
 
19815
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19816
      oprot.writeStructBegin(STRUCT_DESC);
19817
 
19818
      oprot.writeFieldStop();
19819
      oprot.writeStructEnd();
19820
    }
19821
 
19822
    @Override
19823
    public String toString() {
19824
      StringBuilder sb = new StringBuilder("scanForOursExternalSaleReturn_result(");
19825
      boolean first = true;
19826
 
19827
      sb.append(")");
19828
      return sb.toString();
19829
    }
19830
 
19831
    public void validate() throws org.apache.thrift.TException {
19832
      // check for required fields
19833
    }
19834
 
19835
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19836
      try {
19837
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19838
      } catch (org.apache.thrift.TException te) {
19839
        throw new java.io.IOException(te);
19840
      }
19841
    }
19842
 
19843
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19844
      try {
19845
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19846
      } catch (org.apache.thrift.TException te) {
19847
        throw new java.io.IOException(te);
19848
      }
19849
    }
19850
 
19851
  }
19852
 
6880 amar.kumar 19853
  public static class getMovementNonSerializedInventoryByScans_args implements org.apache.thrift.TBase<getMovementNonSerializedInventoryByScans_args, getMovementNonSerializedInventoryByScans_args._Fields>, java.io.Serializable, Cloneable   {
19854
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMovementNonSerializedInventoryByScans_args");
19855
 
19856
    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);
19857
    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);
19858
 
19859
    private long startDate; // required
19860
    private long endDate; // required
19861
 
19862
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19863
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19864
      START_DATE((short)1, "startDate"),
19865
      END_DATE((short)2, "endDate");
19866
 
19867
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19868
 
19869
      static {
19870
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19871
          byName.put(field.getFieldName(), field);
19872
        }
19873
      }
19874
 
19875
      /**
19876
       * Find the _Fields constant that matches fieldId, or null if its not found.
19877
       */
19878
      public static _Fields findByThriftId(int fieldId) {
19879
        switch(fieldId) {
19880
          case 1: // START_DATE
19881
            return START_DATE;
19882
          case 2: // END_DATE
19883
            return END_DATE;
19884
          default:
19885
            return null;
19886
        }
19887
      }
19888
 
19889
      /**
19890
       * Find the _Fields constant that matches fieldId, throwing an exception
19891
       * if it is not found.
19892
       */
19893
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19894
        _Fields fields = findByThriftId(fieldId);
19895
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19896
        return fields;
19897
      }
19898
 
19899
      /**
19900
       * Find the _Fields constant that matches name, or null if its not found.
19901
       */
19902
      public static _Fields findByName(String name) {
19903
        return byName.get(name);
19904
      }
19905
 
19906
      private final short _thriftId;
19907
      private final String _fieldName;
19908
 
19909
      _Fields(short thriftId, String fieldName) {
19910
        _thriftId = thriftId;
19911
        _fieldName = fieldName;
19912
      }
19913
 
19914
      public short getThriftFieldId() {
19915
        return _thriftId;
19916
      }
19917
 
19918
      public String getFieldName() {
19919
        return _fieldName;
19920
      }
19921
    }
19922
 
19923
    // isset id assignments
19924
    private static final int __STARTDATE_ISSET_ID = 0;
19925
    private static final int __ENDDATE_ISSET_ID = 1;
19926
    private BitSet __isset_bit_vector = new BitSet(2);
19927
 
19928
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19929
    static {
19930
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19931
      tmpMap.put(_Fields.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19932
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19933
      tmpMap.put(_Fields.END_DATE, new org.apache.thrift.meta_data.FieldMetaData("endDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19934
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19935
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19936
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMovementNonSerializedInventoryByScans_args.class, metaDataMap);
19937
    }
19938
 
19939
    public getMovementNonSerializedInventoryByScans_args() {
19940
    }
19941
 
19942
    public getMovementNonSerializedInventoryByScans_args(
19943
      long startDate,
19944
      long endDate)
19945
    {
19946
      this();
19947
      this.startDate = startDate;
19948
      setStartDateIsSet(true);
19949
      this.endDate = endDate;
19950
      setEndDateIsSet(true);
19951
    }
19952
 
19953
    /**
19954
     * Performs a deep copy on <i>other</i>.
19955
     */
19956
    public getMovementNonSerializedInventoryByScans_args(getMovementNonSerializedInventoryByScans_args other) {
19957
      __isset_bit_vector.clear();
19958
      __isset_bit_vector.or(other.__isset_bit_vector);
19959
      this.startDate = other.startDate;
19960
      this.endDate = other.endDate;
19961
    }
19962
 
19963
    public getMovementNonSerializedInventoryByScans_args deepCopy() {
19964
      return new getMovementNonSerializedInventoryByScans_args(this);
19965
    }
19966
 
19967
    @Override
19968
    public void clear() {
19969
      setStartDateIsSet(false);
19970
      this.startDate = 0;
19971
      setEndDateIsSet(false);
19972
      this.endDate = 0;
19973
    }
19974
 
19975
    public long getStartDate() {
19976
      return this.startDate;
19977
    }
19978
 
19979
    public void setStartDate(long startDate) {
19980
      this.startDate = startDate;
19981
      setStartDateIsSet(true);
19982
    }
19983
 
19984
    public void unsetStartDate() {
19985
      __isset_bit_vector.clear(__STARTDATE_ISSET_ID);
19986
    }
19987
 
19988
    /** Returns true if field startDate is set (has been assigned a value) and false otherwise */
19989
    public boolean isSetStartDate() {
19990
      return __isset_bit_vector.get(__STARTDATE_ISSET_ID);
19991
    }
19992
 
19993
    public void setStartDateIsSet(boolean value) {
19994
      __isset_bit_vector.set(__STARTDATE_ISSET_ID, value);
19995
    }
19996
 
19997
    public long getEndDate() {
19998
      return this.endDate;
19999
    }
20000
 
20001
    public void setEndDate(long endDate) {
20002
      this.endDate = endDate;
20003
      setEndDateIsSet(true);
20004
    }
20005
 
20006
    public void unsetEndDate() {
20007
      __isset_bit_vector.clear(__ENDDATE_ISSET_ID);
20008
    }
20009
 
20010
    /** Returns true if field endDate is set (has been assigned a value) and false otherwise */
20011
    public boolean isSetEndDate() {
20012
      return __isset_bit_vector.get(__ENDDATE_ISSET_ID);
20013
    }
20014
 
20015
    public void setEndDateIsSet(boolean value) {
20016
      __isset_bit_vector.set(__ENDDATE_ISSET_ID, value);
20017
    }
20018
 
20019
    public void setFieldValue(_Fields field, Object value) {
20020
      switch (field) {
20021
      case START_DATE:
20022
        if (value == null) {
20023
          unsetStartDate();
20024
        } else {
20025
          setStartDate((Long)value);
20026
        }
20027
        break;
20028
 
20029
      case END_DATE:
20030
        if (value == null) {
20031
          unsetEndDate();
20032
        } else {
20033
          setEndDate((Long)value);
20034
        }
20035
        break;
20036
 
20037
      }
20038
    }
20039
 
20040
    public Object getFieldValue(_Fields field) {
20041
      switch (field) {
20042
      case START_DATE:
20043
        return Long.valueOf(getStartDate());
20044
 
20045
      case END_DATE:
20046
        return Long.valueOf(getEndDate());
20047
 
20048
      }
20049
      throw new IllegalStateException();
20050
    }
20051
 
20052
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20053
    public boolean isSet(_Fields field) {
20054
      if (field == null) {
20055
        throw new IllegalArgumentException();
20056
      }
20057
 
20058
      switch (field) {
20059
      case START_DATE:
20060
        return isSetStartDate();
20061
      case END_DATE:
20062
        return isSetEndDate();
20063
      }
20064
      throw new IllegalStateException();
20065
    }
20066
 
20067
    @Override
20068
    public boolean equals(Object that) {
20069
      if (that == null)
20070
        return false;
20071
      if (that instanceof getMovementNonSerializedInventoryByScans_args)
20072
        return this.equals((getMovementNonSerializedInventoryByScans_args)that);
20073
      return false;
20074
    }
20075
 
20076
    public boolean equals(getMovementNonSerializedInventoryByScans_args that) {
20077
      if (that == null)
20078
        return false;
20079
 
20080
      boolean this_present_startDate = true;
20081
      boolean that_present_startDate = true;
20082
      if (this_present_startDate || that_present_startDate) {
20083
        if (!(this_present_startDate && that_present_startDate))
20084
          return false;
20085
        if (this.startDate != that.startDate)
20086
          return false;
20087
      }
20088
 
20089
      boolean this_present_endDate = true;
20090
      boolean that_present_endDate = true;
20091
      if (this_present_endDate || that_present_endDate) {
20092
        if (!(this_present_endDate && that_present_endDate))
20093
          return false;
20094
        if (this.endDate != that.endDate)
20095
          return false;
20096
      }
20097
 
20098
      return true;
20099
    }
20100
 
20101
    @Override
20102
    public int hashCode() {
20103
      return 0;
20104
    }
20105
 
20106
    public int compareTo(getMovementNonSerializedInventoryByScans_args other) {
20107
      if (!getClass().equals(other.getClass())) {
20108
        return getClass().getName().compareTo(other.getClass().getName());
20109
      }
20110
 
20111
      int lastComparison = 0;
20112
      getMovementNonSerializedInventoryByScans_args typedOther = (getMovementNonSerializedInventoryByScans_args)other;
20113
 
20114
      lastComparison = Boolean.valueOf(isSetStartDate()).compareTo(typedOther.isSetStartDate());
20115
      if (lastComparison != 0) {
20116
        return lastComparison;
20117
      }
20118
      if (isSetStartDate()) {
20119
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startDate, typedOther.startDate);
20120
        if (lastComparison != 0) {
20121
          return lastComparison;
20122
        }
20123
      }
20124
      lastComparison = Boolean.valueOf(isSetEndDate()).compareTo(typedOther.isSetEndDate());
20125
      if (lastComparison != 0) {
20126
        return lastComparison;
20127
      }
20128
      if (isSetEndDate()) {
20129
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endDate, typedOther.endDate);
20130
        if (lastComparison != 0) {
20131
          return lastComparison;
20132
        }
20133
      }
20134
      return 0;
20135
    }
20136
 
20137
    public _Fields fieldForId(int fieldId) {
20138
      return _Fields.findByThriftId(fieldId);
20139
    }
20140
 
20141
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20142
      org.apache.thrift.protocol.TField field;
20143
      iprot.readStructBegin();
20144
      while (true)
20145
      {
20146
        field = iprot.readFieldBegin();
20147
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20148
          break;
20149
        }
20150
        switch (field.id) {
20151
          case 1: // START_DATE
20152
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20153
              this.startDate = iprot.readI64();
20154
              setStartDateIsSet(true);
20155
            } else { 
20156
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20157
            }
20158
            break;
20159
          case 2: // END_DATE
20160
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20161
              this.endDate = iprot.readI64();
20162
              setEndDateIsSet(true);
20163
            } else { 
20164
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20165
            }
20166
            break;
20167
          default:
20168
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20169
        }
20170
        iprot.readFieldEnd();
20171
      }
20172
      iprot.readStructEnd();
20173
      validate();
20174
    }
20175
 
20176
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20177
      validate();
20178
 
20179
      oprot.writeStructBegin(STRUCT_DESC);
20180
      oprot.writeFieldBegin(START_DATE_FIELD_DESC);
20181
      oprot.writeI64(this.startDate);
20182
      oprot.writeFieldEnd();
20183
      oprot.writeFieldBegin(END_DATE_FIELD_DESC);
20184
      oprot.writeI64(this.endDate);
20185
      oprot.writeFieldEnd();
20186
      oprot.writeFieldStop();
20187
      oprot.writeStructEnd();
20188
    }
20189
 
20190
    @Override
20191
    public String toString() {
20192
      StringBuilder sb = new StringBuilder("getMovementNonSerializedInventoryByScans_args(");
20193
      boolean first = true;
20194
 
20195
      sb.append("startDate:");
20196
      sb.append(this.startDate);
20197
      first = false;
20198
      if (!first) sb.append(", ");
20199
      sb.append("endDate:");
20200
      sb.append(this.endDate);
20201
      first = false;
20202
      sb.append(")");
20203
      return sb.toString();
20204
    }
20205
 
20206
    public void validate() throws org.apache.thrift.TException {
20207
      // check for required fields
20208
    }
20209
 
20210
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20211
      try {
20212
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20213
      } catch (org.apache.thrift.TException te) {
20214
        throw new java.io.IOException(te);
20215
      }
20216
    }
20217
 
20218
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20219
      try {
20220
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
20221
        __isset_bit_vector = new BitSet(1);
20222
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20223
      } catch (org.apache.thrift.TException te) {
20224
        throw new java.io.IOException(te);
20225
      }
20226
    }
20227
 
20228
  }
20229
 
20230
  public static class getMovementNonSerializedInventoryByScans_result implements org.apache.thrift.TBase<getMovementNonSerializedInventoryByScans_result, getMovementNonSerializedInventoryByScans_result._Fields>, java.io.Serializable, Cloneable   {
20231
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMovementNonSerializedInventoryByScans_result");
20232
 
20233
    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);
20234
 
20235
    private List<InventoryMovement> success; // required
20236
 
20237
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20238
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20239
      SUCCESS((short)0, "success");
20240
 
20241
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20242
 
20243
      static {
20244
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20245
          byName.put(field.getFieldName(), field);
20246
        }
20247
      }
20248
 
20249
      /**
20250
       * Find the _Fields constant that matches fieldId, or null if its not found.
20251
       */
20252
      public static _Fields findByThriftId(int fieldId) {
20253
        switch(fieldId) {
20254
          case 0: // SUCCESS
20255
            return SUCCESS;
20256
          default:
20257
            return null;
20258
        }
20259
      }
20260
 
20261
      /**
20262
       * Find the _Fields constant that matches fieldId, throwing an exception
20263
       * if it is not found.
20264
       */
20265
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20266
        _Fields fields = findByThriftId(fieldId);
20267
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20268
        return fields;
20269
      }
20270
 
20271
      /**
20272
       * Find the _Fields constant that matches name, or null if its not found.
20273
       */
20274
      public static _Fields findByName(String name) {
20275
        return byName.get(name);
20276
      }
20277
 
20278
      private final short _thriftId;
20279
      private final String _fieldName;
20280
 
20281
      _Fields(short thriftId, String fieldName) {
20282
        _thriftId = thriftId;
20283
        _fieldName = fieldName;
20284
      }
20285
 
20286
      public short getThriftFieldId() {
20287
        return _thriftId;
20288
      }
20289
 
20290
      public String getFieldName() {
20291
        return _fieldName;
20292
      }
20293
    }
20294
 
20295
    // isset id assignments
20296
 
20297
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20298
    static {
20299
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20300
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20301
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
20302
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryMovement.class))));
20303
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20304
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMovementNonSerializedInventoryByScans_result.class, metaDataMap);
20305
    }
20306
 
20307
    public getMovementNonSerializedInventoryByScans_result() {
20308
    }
20309
 
20310
    public getMovementNonSerializedInventoryByScans_result(
20311
      List<InventoryMovement> success)
20312
    {
20313
      this();
20314
      this.success = success;
20315
    }
20316
 
20317
    /**
20318
     * Performs a deep copy on <i>other</i>.
20319
     */
20320
    public getMovementNonSerializedInventoryByScans_result(getMovementNonSerializedInventoryByScans_result other) {
20321
      if (other.isSetSuccess()) {
20322
        List<InventoryMovement> __this__success = new ArrayList<InventoryMovement>();
20323
        for (InventoryMovement other_element : other.success) {
20324
          __this__success.add(new InventoryMovement(other_element));
20325
        }
20326
        this.success = __this__success;
20327
      }
20328
    }
20329
 
20330
    public getMovementNonSerializedInventoryByScans_result deepCopy() {
20331
      return new getMovementNonSerializedInventoryByScans_result(this);
20332
    }
20333
 
20334
    @Override
20335
    public void clear() {
20336
      this.success = null;
20337
    }
20338
 
20339
    public int getSuccessSize() {
20340
      return (this.success == null) ? 0 : this.success.size();
20341
    }
20342
 
20343
    public java.util.Iterator<InventoryMovement> getSuccessIterator() {
20344
      return (this.success == null) ? null : this.success.iterator();
20345
    }
20346
 
20347
    public void addToSuccess(InventoryMovement elem) {
20348
      if (this.success == null) {
20349
        this.success = new ArrayList<InventoryMovement>();
20350
      }
20351
      this.success.add(elem);
20352
    }
20353
 
20354
    public List<InventoryMovement> getSuccess() {
20355
      return this.success;
20356
    }
20357
 
20358
    public void setSuccess(List<InventoryMovement> success) {
20359
      this.success = success;
20360
    }
20361
 
20362
    public void unsetSuccess() {
20363
      this.success = null;
20364
    }
20365
 
20366
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
20367
    public boolean isSetSuccess() {
20368
      return this.success != null;
20369
    }
20370
 
20371
    public void setSuccessIsSet(boolean value) {
20372
      if (!value) {
20373
        this.success = null;
20374
      }
20375
    }
20376
 
20377
    public void setFieldValue(_Fields field, Object value) {
20378
      switch (field) {
20379
      case SUCCESS:
20380
        if (value == null) {
20381
          unsetSuccess();
20382
        } else {
20383
          setSuccess((List<InventoryMovement>)value);
20384
        }
20385
        break;
20386
 
20387
      }
20388
    }
20389
 
20390
    public Object getFieldValue(_Fields field) {
20391
      switch (field) {
20392
      case SUCCESS:
20393
        return getSuccess();
20394
 
20395
      }
20396
      throw new IllegalStateException();
20397
    }
20398
 
20399
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20400
    public boolean isSet(_Fields field) {
20401
      if (field == null) {
20402
        throw new IllegalArgumentException();
20403
      }
20404
 
20405
      switch (field) {
20406
      case SUCCESS:
20407
        return isSetSuccess();
20408
      }
20409
      throw new IllegalStateException();
20410
    }
20411
 
20412
    @Override
20413
    public boolean equals(Object that) {
20414
      if (that == null)
20415
        return false;
20416
      if (that instanceof getMovementNonSerializedInventoryByScans_result)
20417
        return this.equals((getMovementNonSerializedInventoryByScans_result)that);
20418
      return false;
20419
    }
20420
 
20421
    public boolean equals(getMovementNonSerializedInventoryByScans_result that) {
20422
      if (that == null)
20423
        return false;
20424
 
20425
      boolean this_present_success = true && this.isSetSuccess();
20426
      boolean that_present_success = true && that.isSetSuccess();
20427
      if (this_present_success || that_present_success) {
20428
        if (!(this_present_success && that_present_success))
20429
          return false;
20430
        if (!this.success.equals(that.success))
20431
          return false;
20432
      }
20433
 
20434
      return true;
20435
    }
20436
 
20437
    @Override
20438
    public int hashCode() {
20439
      return 0;
20440
    }
20441
 
20442
    public int compareTo(getMovementNonSerializedInventoryByScans_result other) {
20443
      if (!getClass().equals(other.getClass())) {
20444
        return getClass().getName().compareTo(other.getClass().getName());
20445
      }
20446
 
20447
      int lastComparison = 0;
20448
      getMovementNonSerializedInventoryByScans_result typedOther = (getMovementNonSerializedInventoryByScans_result)other;
20449
 
20450
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
20451
      if (lastComparison != 0) {
20452
        return lastComparison;
20453
      }
20454
      if (isSetSuccess()) {
20455
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
20456
        if (lastComparison != 0) {
20457
          return lastComparison;
20458
        }
20459
      }
20460
      return 0;
20461
    }
20462
 
20463
    public _Fields fieldForId(int fieldId) {
20464
      return _Fields.findByThriftId(fieldId);
20465
    }
20466
 
20467
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20468
      org.apache.thrift.protocol.TField field;
20469
      iprot.readStructBegin();
20470
      while (true)
20471
      {
20472
        field = iprot.readFieldBegin();
20473
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20474
          break;
20475
        }
20476
        switch (field.id) {
20477
          case 0: // SUCCESS
20478
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
20479
              {
20480
                org.apache.thrift.protocol.TList _list56 = iprot.readListBegin();
20481
                this.success = new ArrayList<InventoryMovement>(_list56.size);
20482
                for (int _i57 = 0; _i57 < _list56.size; ++_i57)
20483
                {
20484
                  InventoryMovement _elem58; // required
20485
                  _elem58 = new InventoryMovement();
20486
                  _elem58.read(iprot);
20487
                  this.success.add(_elem58);
20488
                }
20489
                iprot.readListEnd();
20490
              }
20491
            } else { 
20492
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20493
            }
20494
            break;
20495
          default:
20496
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20497
        }
20498
        iprot.readFieldEnd();
20499
      }
20500
      iprot.readStructEnd();
20501
      validate();
20502
    }
20503
 
20504
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20505
      oprot.writeStructBegin(STRUCT_DESC);
20506
 
20507
      if (this.isSetSuccess()) {
20508
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20509
        {
20510
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
20511
          for (InventoryMovement _iter59 : this.success)
20512
          {
20513
            _iter59.write(oprot);
20514
          }
20515
          oprot.writeListEnd();
20516
        }
20517
        oprot.writeFieldEnd();
20518
      }
20519
      oprot.writeFieldStop();
20520
      oprot.writeStructEnd();
20521
    }
20522
 
20523
    @Override
20524
    public String toString() {
20525
      StringBuilder sb = new StringBuilder("getMovementNonSerializedInventoryByScans_result(");
20526
      boolean first = true;
20527
 
20528
      sb.append("success:");
20529
      if (this.success == null) {
20530
        sb.append("null");
20531
      } else {
20532
        sb.append(this.success);
20533
      }
20534
      first = false;
20535
      sb.append(")");
20536
      return sb.toString();
20537
    }
20538
 
20539
    public void validate() throws org.apache.thrift.TException {
20540
      // check for required fields
20541
    }
20542
 
20543
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20544
      try {
20545
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20546
      } catch (org.apache.thrift.TException te) {
20547
        throw new java.io.IOException(te);
20548
      }
20549
    }
20550
 
20551
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20552
      try {
20553
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20554
      } catch (org.apache.thrift.TException te) {
20555
        throw new java.io.IOException(te);
20556
      }
20557
    }
20558
 
20559
  }
20560
 
20561
  public static class getMovementSerializedInventoryByScans_args implements org.apache.thrift.TBase<getMovementSerializedInventoryByScans_args, getMovementSerializedInventoryByScans_args._Fields>, java.io.Serializable, Cloneable   {
20562
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMovementSerializedInventoryByScans_args");
20563
 
20564
    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);
20565
    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);
20566
 
20567
    private long startDate; // required
20568
    private long endDate; // required
20569
 
20570
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20571
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20572
      START_DATE((short)1, "startDate"),
20573
      END_DATE((short)2, "endDate");
20574
 
20575
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20576
 
20577
      static {
20578
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20579
          byName.put(field.getFieldName(), field);
20580
        }
20581
      }
20582
 
20583
      /**
20584
       * Find the _Fields constant that matches fieldId, or null if its not found.
20585
       */
20586
      public static _Fields findByThriftId(int fieldId) {
20587
        switch(fieldId) {
20588
          case 1: // START_DATE
20589
            return START_DATE;
20590
          case 2: // END_DATE
20591
            return END_DATE;
20592
          default:
20593
            return null;
20594
        }
20595
      }
20596
 
20597
      /**
20598
       * Find the _Fields constant that matches fieldId, throwing an exception
20599
       * if it is not found.
20600
       */
20601
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20602
        _Fields fields = findByThriftId(fieldId);
20603
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20604
        return fields;
20605
      }
20606
 
20607
      /**
20608
       * Find the _Fields constant that matches name, or null if its not found.
20609
       */
20610
      public static _Fields findByName(String name) {
20611
        return byName.get(name);
20612
      }
20613
 
20614
      private final short _thriftId;
20615
      private final String _fieldName;
20616
 
20617
      _Fields(short thriftId, String fieldName) {
20618
        _thriftId = thriftId;
20619
        _fieldName = fieldName;
20620
      }
20621
 
20622
      public short getThriftFieldId() {
20623
        return _thriftId;
20624
      }
20625
 
20626
      public String getFieldName() {
20627
        return _fieldName;
20628
      }
20629
    }
20630
 
20631
    // isset id assignments
20632
    private static final int __STARTDATE_ISSET_ID = 0;
20633
    private static final int __ENDDATE_ISSET_ID = 1;
20634
    private BitSet __isset_bit_vector = new BitSet(2);
20635
 
20636
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20637
    static {
20638
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20639
      tmpMap.put(_Fields.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20640
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
20641
      tmpMap.put(_Fields.END_DATE, new org.apache.thrift.meta_data.FieldMetaData("endDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20642
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
20643
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20644
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMovementSerializedInventoryByScans_args.class, metaDataMap);
20645
    }
20646
 
20647
    public getMovementSerializedInventoryByScans_args() {
20648
    }
20649
 
20650
    public getMovementSerializedInventoryByScans_args(
20651
      long startDate,
20652
      long endDate)
20653
    {
20654
      this();
20655
      this.startDate = startDate;
20656
      setStartDateIsSet(true);
20657
      this.endDate = endDate;
20658
      setEndDateIsSet(true);
20659
    }
20660
 
20661
    /**
20662
     * Performs a deep copy on <i>other</i>.
20663
     */
20664
    public getMovementSerializedInventoryByScans_args(getMovementSerializedInventoryByScans_args other) {
20665
      __isset_bit_vector.clear();
20666
      __isset_bit_vector.or(other.__isset_bit_vector);
20667
      this.startDate = other.startDate;
20668
      this.endDate = other.endDate;
20669
    }
20670
 
20671
    public getMovementSerializedInventoryByScans_args deepCopy() {
20672
      return new getMovementSerializedInventoryByScans_args(this);
20673
    }
20674
 
20675
    @Override
20676
    public void clear() {
20677
      setStartDateIsSet(false);
20678
      this.startDate = 0;
20679
      setEndDateIsSet(false);
20680
      this.endDate = 0;
20681
    }
20682
 
20683
    public long getStartDate() {
20684
      return this.startDate;
20685
    }
20686
 
20687
    public void setStartDate(long startDate) {
20688
      this.startDate = startDate;
20689
      setStartDateIsSet(true);
20690
    }
20691
 
20692
    public void unsetStartDate() {
20693
      __isset_bit_vector.clear(__STARTDATE_ISSET_ID);
20694
    }
20695
 
20696
    /** Returns true if field startDate is set (has been assigned a value) and false otherwise */
20697
    public boolean isSetStartDate() {
20698
      return __isset_bit_vector.get(__STARTDATE_ISSET_ID);
20699
    }
20700
 
20701
    public void setStartDateIsSet(boolean value) {
20702
      __isset_bit_vector.set(__STARTDATE_ISSET_ID, value);
20703
    }
20704
 
20705
    public long getEndDate() {
20706
      return this.endDate;
20707
    }
20708
 
20709
    public void setEndDate(long endDate) {
20710
      this.endDate = endDate;
20711
      setEndDateIsSet(true);
20712
    }
20713
 
20714
    public void unsetEndDate() {
20715
      __isset_bit_vector.clear(__ENDDATE_ISSET_ID);
20716
    }
20717
 
20718
    /** Returns true if field endDate is set (has been assigned a value) and false otherwise */
20719
    public boolean isSetEndDate() {
20720
      return __isset_bit_vector.get(__ENDDATE_ISSET_ID);
20721
    }
20722
 
20723
    public void setEndDateIsSet(boolean value) {
20724
      __isset_bit_vector.set(__ENDDATE_ISSET_ID, value);
20725
    }
20726
 
20727
    public void setFieldValue(_Fields field, Object value) {
20728
      switch (field) {
20729
      case START_DATE:
20730
        if (value == null) {
20731
          unsetStartDate();
20732
        } else {
20733
          setStartDate((Long)value);
20734
        }
20735
        break;
20736
 
20737
      case END_DATE:
20738
        if (value == null) {
20739
          unsetEndDate();
20740
        } else {
20741
          setEndDate((Long)value);
20742
        }
20743
        break;
20744
 
20745
      }
20746
    }
20747
 
20748
    public Object getFieldValue(_Fields field) {
20749
      switch (field) {
20750
      case START_DATE:
20751
        return Long.valueOf(getStartDate());
20752
 
20753
      case END_DATE:
20754
        return Long.valueOf(getEndDate());
20755
 
20756
      }
20757
      throw new IllegalStateException();
20758
    }
20759
 
20760
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20761
    public boolean isSet(_Fields field) {
20762
      if (field == null) {
20763
        throw new IllegalArgumentException();
20764
      }
20765
 
20766
      switch (field) {
20767
      case START_DATE:
20768
        return isSetStartDate();
20769
      case END_DATE:
20770
        return isSetEndDate();
20771
      }
20772
      throw new IllegalStateException();
20773
    }
20774
 
20775
    @Override
20776
    public boolean equals(Object that) {
20777
      if (that == null)
20778
        return false;
20779
      if (that instanceof getMovementSerializedInventoryByScans_args)
20780
        return this.equals((getMovementSerializedInventoryByScans_args)that);
20781
      return false;
20782
    }
20783
 
20784
    public boolean equals(getMovementSerializedInventoryByScans_args that) {
20785
      if (that == null)
20786
        return false;
20787
 
20788
      boolean this_present_startDate = true;
20789
      boolean that_present_startDate = true;
20790
      if (this_present_startDate || that_present_startDate) {
20791
        if (!(this_present_startDate && that_present_startDate))
20792
          return false;
20793
        if (this.startDate != that.startDate)
20794
          return false;
20795
      }
20796
 
20797
      boolean this_present_endDate = true;
20798
      boolean that_present_endDate = true;
20799
      if (this_present_endDate || that_present_endDate) {
20800
        if (!(this_present_endDate && that_present_endDate))
20801
          return false;
20802
        if (this.endDate != that.endDate)
20803
          return false;
20804
      }
20805
 
20806
      return true;
20807
    }
20808
 
20809
    @Override
20810
    public int hashCode() {
20811
      return 0;
20812
    }
20813
 
20814
    public int compareTo(getMovementSerializedInventoryByScans_args other) {
20815
      if (!getClass().equals(other.getClass())) {
20816
        return getClass().getName().compareTo(other.getClass().getName());
20817
      }
20818
 
20819
      int lastComparison = 0;
20820
      getMovementSerializedInventoryByScans_args typedOther = (getMovementSerializedInventoryByScans_args)other;
20821
 
20822
      lastComparison = Boolean.valueOf(isSetStartDate()).compareTo(typedOther.isSetStartDate());
20823
      if (lastComparison != 0) {
20824
        return lastComparison;
20825
      }
20826
      if (isSetStartDate()) {
20827
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startDate, typedOther.startDate);
20828
        if (lastComparison != 0) {
20829
          return lastComparison;
20830
        }
20831
      }
20832
      lastComparison = Boolean.valueOf(isSetEndDate()).compareTo(typedOther.isSetEndDate());
20833
      if (lastComparison != 0) {
20834
        return lastComparison;
20835
      }
20836
      if (isSetEndDate()) {
20837
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endDate, typedOther.endDate);
20838
        if (lastComparison != 0) {
20839
          return lastComparison;
20840
        }
20841
      }
20842
      return 0;
20843
    }
20844
 
20845
    public _Fields fieldForId(int fieldId) {
20846
      return _Fields.findByThriftId(fieldId);
20847
    }
20848
 
20849
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20850
      org.apache.thrift.protocol.TField field;
20851
      iprot.readStructBegin();
20852
      while (true)
20853
      {
20854
        field = iprot.readFieldBegin();
20855
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20856
          break;
20857
        }
20858
        switch (field.id) {
20859
          case 1: // START_DATE
20860
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20861
              this.startDate = iprot.readI64();
20862
              setStartDateIsSet(true);
20863
            } else { 
20864
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20865
            }
20866
            break;
20867
          case 2: // END_DATE
20868
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20869
              this.endDate = iprot.readI64();
20870
              setEndDateIsSet(true);
20871
            } else { 
20872
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20873
            }
20874
            break;
20875
          default:
20876
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20877
        }
20878
        iprot.readFieldEnd();
20879
      }
20880
      iprot.readStructEnd();
20881
      validate();
20882
    }
20883
 
20884
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20885
      validate();
20886
 
20887
      oprot.writeStructBegin(STRUCT_DESC);
20888
      oprot.writeFieldBegin(START_DATE_FIELD_DESC);
20889
      oprot.writeI64(this.startDate);
20890
      oprot.writeFieldEnd();
20891
      oprot.writeFieldBegin(END_DATE_FIELD_DESC);
20892
      oprot.writeI64(this.endDate);
20893
      oprot.writeFieldEnd();
20894
      oprot.writeFieldStop();
20895
      oprot.writeStructEnd();
20896
    }
20897
 
20898
    @Override
20899
    public String toString() {
20900
      StringBuilder sb = new StringBuilder("getMovementSerializedInventoryByScans_args(");
20901
      boolean first = true;
20902
 
20903
      sb.append("startDate:");
20904
      sb.append(this.startDate);
20905
      first = false;
20906
      if (!first) sb.append(", ");
20907
      sb.append("endDate:");
20908
      sb.append(this.endDate);
20909
      first = false;
20910
      sb.append(")");
20911
      return sb.toString();
20912
    }
20913
 
20914
    public void validate() throws org.apache.thrift.TException {
20915
      // check for required fields
20916
    }
20917
 
20918
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20919
      try {
20920
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20921
      } catch (org.apache.thrift.TException te) {
20922
        throw new java.io.IOException(te);
20923
      }
20924
    }
20925
 
20926
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20927
      try {
20928
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
20929
        __isset_bit_vector = new BitSet(1);
20930
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20931
      } catch (org.apache.thrift.TException te) {
20932
        throw new java.io.IOException(te);
20933
      }
20934
    }
20935
 
20936
  }
20937
 
20938
  public static class getMovementSerializedInventoryByScans_result implements org.apache.thrift.TBase<getMovementSerializedInventoryByScans_result, getMovementSerializedInventoryByScans_result._Fields>, java.io.Serializable, Cloneable   {
20939
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMovementSerializedInventoryByScans_result");
20940
 
20941
    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);
20942
 
20943
    private List<InventoryMovement> success; // required
20944
 
20945
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20946
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20947
      SUCCESS((short)0, "success");
20948
 
20949
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20950
 
20951
      static {
20952
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20953
          byName.put(field.getFieldName(), field);
20954
        }
20955
      }
20956
 
20957
      /**
20958
       * Find the _Fields constant that matches fieldId, or null if its not found.
20959
       */
20960
      public static _Fields findByThriftId(int fieldId) {
20961
        switch(fieldId) {
20962
          case 0: // SUCCESS
20963
            return SUCCESS;
20964
          default:
20965
            return null;
20966
        }
20967
      }
20968
 
20969
      /**
20970
       * Find the _Fields constant that matches fieldId, throwing an exception
20971
       * if it is not found.
20972
       */
20973
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20974
        _Fields fields = findByThriftId(fieldId);
20975
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20976
        return fields;
20977
      }
20978
 
20979
      /**
20980
       * Find the _Fields constant that matches name, or null if its not found.
20981
       */
20982
      public static _Fields findByName(String name) {
20983
        return byName.get(name);
20984
      }
20985
 
20986
      private final short _thriftId;
20987
      private final String _fieldName;
20988
 
20989
      _Fields(short thriftId, String fieldName) {
20990
        _thriftId = thriftId;
20991
        _fieldName = fieldName;
20992
      }
20993
 
20994
      public short getThriftFieldId() {
20995
        return _thriftId;
20996
      }
20997
 
20998
      public String getFieldName() {
20999
        return _fieldName;
21000
      }
21001
    }
21002
 
21003
    // isset id assignments
21004
 
21005
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
21006
    static {
21007
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
21008
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21009
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
21010
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryMovement.class))));
21011
      metaDataMap = Collections.unmodifiableMap(tmpMap);
21012
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMovementSerializedInventoryByScans_result.class, metaDataMap);
21013
    }
21014
 
21015
    public getMovementSerializedInventoryByScans_result() {
21016
    }
21017
 
21018
    public getMovementSerializedInventoryByScans_result(
21019
      List<InventoryMovement> success)
21020
    {
21021
      this();
21022
      this.success = success;
21023
    }
21024
 
21025
    /**
21026
     * Performs a deep copy on <i>other</i>.
21027
     */
21028
    public getMovementSerializedInventoryByScans_result(getMovementSerializedInventoryByScans_result other) {
21029
      if (other.isSetSuccess()) {
21030
        List<InventoryMovement> __this__success = new ArrayList<InventoryMovement>();
21031
        for (InventoryMovement other_element : other.success) {
21032
          __this__success.add(new InventoryMovement(other_element));
21033
        }
21034
        this.success = __this__success;
21035
      }
21036
    }
21037
 
21038
    public getMovementSerializedInventoryByScans_result deepCopy() {
21039
      return new getMovementSerializedInventoryByScans_result(this);
21040
    }
21041
 
21042
    @Override
21043
    public void clear() {
21044
      this.success = null;
21045
    }
21046
 
21047
    public int getSuccessSize() {
21048
      return (this.success == null) ? 0 : this.success.size();
21049
    }
21050
 
21051
    public java.util.Iterator<InventoryMovement> getSuccessIterator() {
21052
      return (this.success == null) ? null : this.success.iterator();
21053
    }
21054
 
21055
    public void addToSuccess(InventoryMovement elem) {
21056
      if (this.success == null) {
21057
        this.success = new ArrayList<InventoryMovement>();
21058
      }
21059
      this.success.add(elem);
21060
    }
21061
 
21062
    public List<InventoryMovement> getSuccess() {
21063
      return this.success;
21064
    }
21065
 
21066
    public void setSuccess(List<InventoryMovement> success) {
21067
      this.success = success;
21068
    }
21069
 
21070
    public void unsetSuccess() {
21071
      this.success = null;
21072
    }
21073
 
21074
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
21075
    public boolean isSetSuccess() {
21076
      return this.success != null;
21077
    }
21078
 
21079
    public void setSuccessIsSet(boolean value) {
21080
      if (!value) {
21081
        this.success = null;
21082
      }
21083
    }
21084
 
21085
    public void setFieldValue(_Fields field, Object value) {
21086
      switch (field) {
21087
      case SUCCESS:
21088
        if (value == null) {
21089
          unsetSuccess();
21090
        } else {
21091
          setSuccess((List<InventoryMovement>)value);
21092
        }
21093
        break;
21094
 
21095
      }
21096
    }
21097
 
21098
    public Object getFieldValue(_Fields field) {
21099
      switch (field) {
21100
      case SUCCESS:
21101
        return getSuccess();
21102
 
21103
      }
21104
      throw new IllegalStateException();
21105
    }
21106
 
21107
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
21108
    public boolean isSet(_Fields field) {
21109
      if (field == null) {
21110
        throw new IllegalArgumentException();
21111
      }
21112
 
21113
      switch (field) {
21114
      case SUCCESS:
21115
        return isSetSuccess();
21116
      }
21117
      throw new IllegalStateException();
21118
    }
21119
 
21120
    @Override
21121
    public boolean equals(Object that) {
21122
      if (that == null)
21123
        return false;
21124
      if (that instanceof getMovementSerializedInventoryByScans_result)
21125
        return this.equals((getMovementSerializedInventoryByScans_result)that);
21126
      return false;
21127
    }
21128
 
21129
    public boolean equals(getMovementSerializedInventoryByScans_result that) {
21130
      if (that == null)
21131
        return false;
21132
 
21133
      boolean this_present_success = true && this.isSetSuccess();
21134
      boolean that_present_success = true && that.isSetSuccess();
21135
      if (this_present_success || that_present_success) {
21136
        if (!(this_present_success && that_present_success))
21137
          return false;
21138
        if (!this.success.equals(that.success))
21139
          return false;
21140
      }
21141
 
21142
      return true;
21143
    }
21144
 
21145
    @Override
21146
    public int hashCode() {
21147
      return 0;
21148
    }
21149
 
21150
    public int compareTo(getMovementSerializedInventoryByScans_result other) {
21151
      if (!getClass().equals(other.getClass())) {
21152
        return getClass().getName().compareTo(other.getClass().getName());
21153
      }
21154
 
21155
      int lastComparison = 0;
21156
      getMovementSerializedInventoryByScans_result typedOther = (getMovementSerializedInventoryByScans_result)other;
21157
 
21158
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
21159
      if (lastComparison != 0) {
21160
        return lastComparison;
21161
      }
21162
      if (isSetSuccess()) {
21163
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
21164
        if (lastComparison != 0) {
21165
          return lastComparison;
21166
        }
21167
      }
21168
      return 0;
21169
    }
21170
 
21171
    public _Fields fieldForId(int fieldId) {
21172
      return _Fields.findByThriftId(fieldId);
21173
    }
21174
 
21175
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
21176
      org.apache.thrift.protocol.TField field;
21177
      iprot.readStructBegin();
21178
      while (true)
21179
      {
21180
        field = iprot.readFieldBegin();
21181
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
21182
          break;
21183
        }
21184
        switch (field.id) {
21185
          case 0: // SUCCESS
21186
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
21187
              {
21188
                org.apache.thrift.protocol.TList _list60 = iprot.readListBegin();
21189
                this.success = new ArrayList<InventoryMovement>(_list60.size);
21190
                for (int _i61 = 0; _i61 < _list60.size; ++_i61)
21191
                {
21192
                  InventoryMovement _elem62; // required
21193
                  _elem62 = new InventoryMovement();
21194
                  _elem62.read(iprot);
21195
                  this.success.add(_elem62);
21196
                }
21197
                iprot.readListEnd();
21198
              }
21199
            } else { 
21200
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21201
            }
21202
            break;
21203
          default:
21204
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21205
        }
21206
        iprot.readFieldEnd();
21207
      }
21208
      iprot.readStructEnd();
21209
      validate();
21210
    }
21211
 
21212
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
21213
      oprot.writeStructBegin(STRUCT_DESC);
21214
 
21215
      if (this.isSetSuccess()) {
21216
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21217
        {
21218
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
21219
          for (InventoryMovement _iter63 : this.success)
21220
          {
21221
            _iter63.write(oprot);
21222
          }
21223
          oprot.writeListEnd();
21224
        }
21225
        oprot.writeFieldEnd();
21226
      }
21227
      oprot.writeFieldStop();
21228
      oprot.writeStructEnd();
21229
    }
21230
 
21231
    @Override
21232
    public String toString() {
21233
      StringBuilder sb = new StringBuilder("getMovementSerializedInventoryByScans_result(");
21234
      boolean first = true;
21235
 
21236
      sb.append("success:");
21237
      if (this.success == null) {
21238
        sb.append("null");
21239
      } else {
21240
        sb.append(this.success);
21241
      }
21242
      first = false;
21243
      sb.append(")");
21244
      return sb.toString();
21245
    }
21246
 
21247
    public void validate() throws org.apache.thrift.TException {
21248
      // check for required fields
21249
    }
21250
 
21251
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21252
      try {
21253
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
21254
      } catch (org.apache.thrift.TException te) {
21255
        throw new java.io.IOException(te);
21256
      }
21257
    }
21258
 
21259
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
21260
      try {
21261
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
21262
      } catch (org.apache.thrift.TException te) {
21263
        throw new java.io.IOException(te);
21264
      }
21265
    }
21266
 
21267
  }
21268
 
7190 amar.kumar 21269
  public static class scanfreebie_args implements org.apache.thrift.TBase<scanfreebie_args, scanfreebie_args._Fields>, java.io.Serializable, Cloneable   {
21270
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanfreebie_args");
21271
 
21272
    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);
21273
    private static final org.apache.thrift.protocol.TField FREEBIE_ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("freebieItemId", org.apache.thrift.protocol.TType.I64, (short)2);
21274
    private static final org.apache.thrift.protocol.TField FREEBIE_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("freebieWarehouseId", org.apache.thrift.protocol.TType.I64, (short)3);
21275
    private static final org.apache.thrift.protocol.TField SCAN_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("scanType", org.apache.thrift.protocol.TType.I32, (short)4);
21276
 
21277
    private long orderId; // required
21278
    private long freebieItemId; // required
21279
    private long freebieWarehouseId; // required
21280
    private ScanType scanType; // required
21281
 
21282
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21283
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
21284
      ORDER_ID((short)1, "orderId"),
21285
      FREEBIE_ITEM_ID((short)2, "freebieItemId"),
21286
      FREEBIE_WAREHOUSE_ID((short)3, "freebieWarehouseId"),
21287
      /**
21288
       * 
21289
       * @see ScanType
21290
       */
21291
      SCAN_TYPE((short)4, "scanType");
21292
 
21293
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21294
 
21295
      static {
21296
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21297
          byName.put(field.getFieldName(), field);
21298
        }
21299
      }
21300
 
21301
      /**
21302
       * Find the _Fields constant that matches fieldId, or null if its not found.
21303
       */
21304
      public static _Fields findByThriftId(int fieldId) {
21305
        switch(fieldId) {
21306
          case 1: // ORDER_ID
21307
            return ORDER_ID;
21308
          case 2: // FREEBIE_ITEM_ID
21309
            return FREEBIE_ITEM_ID;
21310
          case 3: // FREEBIE_WAREHOUSE_ID
21311
            return FREEBIE_WAREHOUSE_ID;
21312
          case 4: // SCAN_TYPE
21313
            return SCAN_TYPE;
21314
          default:
21315
            return null;
21316
        }
21317
      }
21318
 
21319
      /**
21320
       * Find the _Fields constant that matches fieldId, throwing an exception
21321
       * if it is not found.
21322
       */
21323
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21324
        _Fields fields = findByThriftId(fieldId);
21325
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21326
        return fields;
21327
      }
21328
 
21329
      /**
21330
       * Find the _Fields constant that matches name, or null if its not found.
21331
       */
21332
      public static _Fields findByName(String name) {
21333
        return byName.get(name);
21334
      }
21335
 
21336
      private final short _thriftId;
21337
      private final String _fieldName;
21338
 
21339
      _Fields(short thriftId, String fieldName) {
21340
        _thriftId = thriftId;
21341
        _fieldName = fieldName;
21342
      }
21343
 
21344
      public short getThriftFieldId() {
21345
        return _thriftId;
21346
      }
21347
 
21348
      public String getFieldName() {
21349
        return _fieldName;
21350
      }
21351
    }
21352
 
21353
    // isset id assignments
21354
    private static final int __ORDERID_ISSET_ID = 0;
21355
    private static final int __FREEBIEITEMID_ISSET_ID = 1;
21356
    private static final int __FREEBIEWAREHOUSEID_ISSET_ID = 2;
21357
    private BitSet __isset_bit_vector = new BitSet(3);
21358
 
21359
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
21360
    static {
21361
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
21362
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21363
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
21364
      tmpMap.put(_Fields.FREEBIE_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("freebieItemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21365
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
21366
      tmpMap.put(_Fields.FREEBIE_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("freebieWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21367
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
21368
      tmpMap.put(_Fields.SCAN_TYPE, new org.apache.thrift.meta_data.FieldMetaData("scanType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21369
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
21370
      metaDataMap = Collections.unmodifiableMap(tmpMap);
21371
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanfreebie_args.class, metaDataMap);
21372
    }
21373
 
21374
    public scanfreebie_args() {
21375
    }
21376
 
21377
    public scanfreebie_args(
21378
      long orderId,
21379
      long freebieItemId,
21380
      long freebieWarehouseId,
21381
      ScanType scanType)
21382
    {
21383
      this();
21384
      this.orderId = orderId;
21385
      setOrderIdIsSet(true);
21386
      this.freebieItemId = freebieItemId;
21387
      setFreebieItemIdIsSet(true);
21388
      this.freebieWarehouseId = freebieWarehouseId;
21389
      setFreebieWarehouseIdIsSet(true);
21390
      this.scanType = scanType;
21391
    }
21392
 
21393
    /**
21394
     * Performs a deep copy on <i>other</i>.
21395
     */
21396
    public scanfreebie_args(scanfreebie_args other) {
21397
      __isset_bit_vector.clear();
21398
      __isset_bit_vector.or(other.__isset_bit_vector);
21399
      this.orderId = other.orderId;
21400
      this.freebieItemId = other.freebieItemId;
21401
      this.freebieWarehouseId = other.freebieWarehouseId;
21402
      if (other.isSetScanType()) {
21403
        this.scanType = other.scanType;
21404
      }
21405
    }
21406
 
21407
    public scanfreebie_args deepCopy() {
21408
      return new scanfreebie_args(this);
21409
    }
21410
 
21411
    @Override
21412
    public void clear() {
21413
      setOrderIdIsSet(false);
21414
      this.orderId = 0;
21415
      setFreebieItemIdIsSet(false);
21416
      this.freebieItemId = 0;
21417
      setFreebieWarehouseIdIsSet(false);
21418
      this.freebieWarehouseId = 0;
21419
      this.scanType = null;
21420
    }
21421
 
21422
    public long getOrderId() {
21423
      return this.orderId;
21424
    }
21425
 
21426
    public void setOrderId(long orderId) {
21427
      this.orderId = orderId;
21428
      setOrderIdIsSet(true);
21429
    }
21430
 
21431
    public void unsetOrderId() {
21432
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
21433
    }
21434
 
21435
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
21436
    public boolean isSetOrderId() {
21437
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
21438
    }
21439
 
21440
    public void setOrderIdIsSet(boolean value) {
21441
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
21442
    }
21443
 
21444
    public long getFreebieItemId() {
21445
      return this.freebieItemId;
21446
    }
21447
 
21448
    public void setFreebieItemId(long freebieItemId) {
21449
      this.freebieItemId = freebieItemId;
21450
      setFreebieItemIdIsSet(true);
21451
    }
21452
 
21453
    public void unsetFreebieItemId() {
21454
      __isset_bit_vector.clear(__FREEBIEITEMID_ISSET_ID);
21455
    }
21456
 
21457
    /** Returns true if field freebieItemId is set (has been assigned a value) and false otherwise */
21458
    public boolean isSetFreebieItemId() {
21459
      return __isset_bit_vector.get(__FREEBIEITEMID_ISSET_ID);
21460
    }
21461
 
21462
    public void setFreebieItemIdIsSet(boolean value) {
21463
      __isset_bit_vector.set(__FREEBIEITEMID_ISSET_ID, value);
21464
    }
21465
 
21466
    public long getFreebieWarehouseId() {
21467
      return this.freebieWarehouseId;
21468
    }
21469
 
21470
    public void setFreebieWarehouseId(long freebieWarehouseId) {
21471
      this.freebieWarehouseId = freebieWarehouseId;
21472
      setFreebieWarehouseIdIsSet(true);
21473
    }
21474
 
21475
    public void unsetFreebieWarehouseId() {
21476
      __isset_bit_vector.clear(__FREEBIEWAREHOUSEID_ISSET_ID);
21477
    }
21478
 
21479
    /** Returns true if field freebieWarehouseId is set (has been assigned a value) and false otherwise */
21480
    public boolean isSetFreebieWarehouseId() {
21481
      return __isset_bit_vector.get(__FREEBIEWAREHOUSEID_ISSET_ID);
21482
    }
21483
 
21484
    public void setFreebieWarehouseIdIsSet(boolean value) {
21485
      __isset_bit_vector.set(__FREEBIEWAREHOUSEID_ISSET_ID, value);
21486
    }
21487
 
21488
    /**
21489
     * 
21490
     * @see ScanType
21491
     */
21492
    public ScanType getScanType() {
21493
      return this.scanType;
21494
    }
21495
 
21496
    /**
21497
     * 
21498
     * @see ScanType
21499
     */
21500
    public void setScanType(ScanType scanType) {
21501
      this.scanType = scanType;
21502
    }
21503
 
21504
    public void unsetScanType() {
21505
      this.scanType = null;
21506
    }
21507
 
21508
    /** Returns true if field scanType is set (has been assigned a value) and false otherwise */
21509
    public boolean isSetScanType() {
21510
      return this.scanType != null;
21511
    }
21512
 
21513
    public void setScanTypeIsSet(boolean value) {
21514
      if (!value) {
21515
        this.scanType = null;
21516
      }
21517
    }
21518
 
21519
    public void setFieldValue(_Fields field, Object value) {
21520
      switch (field) {
21521
      case ORDER_ID:
21522
        if (value == null) {
21523
          unsetOrderId();
21524
        } else {
21525
          setOrderId((Long)value);
21526
        }
21527
        break;
21528
 
21529
      case FREEBIE_ITEM_ID:
21530
        if (value == null) {
21531
          unsetFreebieItemId();
21532
        } else {
21533
          setFreebieItemId((Long)value);
21534
        }
21535
        break;
21536
 
21537
      case FREEBIE_WAREHOUSE_ID:
21538
        if (value == null) {
21539
          unsetFreebieWarehouseId();
21540
        } else {
21541
          setFreebieWarehouseId((Long)value);
21542
        }
21543
        break;
21544
 
21545
      case SCAN_TYPE:
21546
        if (value == null) {
21547
          unsetScanType();
21548
        } else {
21549
          setScanType((ScanType)value);
21550
        }
21551
        break;
21552
 
21553
      }
21554
    }
21555
 
21556
    public Object getFieldValue(_Fields field) {
21557
      switch (field) {
21558
      case ORDER_ID:
21559
        return Long.valueOf(getOrderId());
21560
 
21561
      case FREEBIE_ITEM_ID:
21562
        return Long.valueOf(getFreebieItemId());
21563
 
21564
      case FREEBIE_WAREHOUSE_ID:
21565
        return Long.valueOf(getFreebieWarehouseId());
21566
 
21567
      case SCAN_TYPE:
21568
        return getScanType();
21569
 
21570
      }
21571
      throw new IllegalStateException();
21572
    }
21573
 
21574
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
21575
    public boolean isSet(_Fields field) {
21576
      if (field == null) {
21577
        throw new IllegalArgumentException();
21578
      }
21579
 
21580
      switch (field) {
21581
      case ORDER_ID:
21582
        return isSetOrderId();
21583
      case FREEBIE_ITEM_ID:
21584
        return isSetFreebieItemId();
21585
      case FREEBIE_WAREHOUSE_ID:
21586
        return isSetFreebieWarehouseId();
21587
      case SCAN_TYPE:
21588
        return isSetScanType();
21589
      }
21590
      throw new IllegalStateException();
21591
    }
21592
 
21593
    @Override
21594
    public boolean equals(Object that) {
21595
      if (that == null)
21596
        return false;
21597
      if (that instanceof scanfreebie_args)
21598
        return this.equals((scanfreebie_args)that);
21599
      return false;
21600
    }
21601
 
21602
    public boolean equals(scanfreebie_args that) {
21603
      if (that == null)
21604
        return false;
21605
 
21606
      boolean this_present_orderId = true;
21607
      boolean that_present_orderId = true;
21608
      if (this_present_orderId || that_present_orderId) {
21609
        if (!(this_present_orderId && that_present_orderId))
21610
          return false;
21611
        if (this.orderId != that.orderId)
21612
          return false;
21613
      }
21614
 
21615
      boolean this_present_freebieItemId = true;
21616
      boolean that_present_freebieItemId = true;
21617
      if (this_present_freebieItemId || that_present_freebieItemId) {
21618
        if (!(this_present_freebieItemId && that_present_freebieItemId))
21619
          return false;
21620
        if (this.freebieItemId != that.freebieItemId)
21621
          return false;
21622
      }
21623
 
21624
      boolean this_present_freebieWarehouseId = true;
21625
      boolean that_present_freebieWarehouseId = true;
21626
      if (this_present_freebieWarehouseId || that_present_freebieWarehouseId) {
21627
        if (!(this_present_freebieWarehouseId && that_present_freebieWarehouseId))
21628
          return false;
21629
        if (this.freebieWarehouseId != that.freebieWarehouseId)
21630
          return false;
21631
      }
21632
 
21633
      boolean this_present_scanType = true && this.isSetScanType();
21634
      boolean that_present_scanType = true && that.isSetScanType();
21635
      if (this_present_scanType || that_present_scanType) {
21636
        if (!(this_present_scanType && that_present_scanType))
21637
          return false;
21638
        if (!this.scanType.equals(that.scanType))
21639
          return false;
21640
      }
21641
 
21642
      return true;
21643
    }
21644
 
21645
    @Override
21646
    public int hashCode() {
21647
      return 0;
21648
    }
21649
 
21650
    public int compareTo(scanfreebie_args other) {
21651
      if (!getClass().equals(other.getClass())) {
21652
        return getClass().getName().compareTo(other.getClass().getName());
21653
      }
21654
 
21655
      int lastComparison = 0;
21656
      scanfreebie_args typedOther = (scanfreebie_args)other;
21657
 
21658
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
21659
      if (lastComparison != 0) {
21660
        return lastComparison;
21661
      }
21662
      if (isSetOrderId()) {
21663
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
21664
        if (lastComparison != 0) {
21665
          return lastComparison;
21666
        }
21667
      }
21668
      lastComparison = Boolean.valueOf(isSetFreebieItemId()).compareTo(typedOther.isSetFreebieItemId());
21669
      if (lastComparison != 0) {
21670
        return lastComparison;
21671
      }
21672
      if (isSetFreebieItemId()) {
21673
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freebieItemId, typedOther.freebieItemId);
21674
        if (lastComparison != 0) {
21675
          return lastComparison;
21676
        }
21677
      }
21678
      lastComparison = Boolean.valueOf(isSetFreebieWarehouseId()).compareTo(typedOther.isSetFreebieWarehouseId());
21679
      if (lastComparison != 0) {
21680
        return lastComparison;
21681
      }
21682
      if (isSetFreebieWarehouseId()) {
21683
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freebieWarehouseId, typedOther.freebieWarehouseId);
21684
        if (lastComparison != 0) {
21685
          return lastComparison;
21686
        }
21687
      }
21688
      lastComparison = Boolean.valueOf(isSetScanType()).compareTo(typedOther.isSetScanType());
21689
      if (lastComparison != 0) {
21690
        return lastComparison;
21691
      }
21692
      if (isSetScanType()) {
21693
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scanType, typedOther.scanType);
21694
        if (lastComparison != 0) {
21695
          return lastComparison;
21696
        }
21697
      }
21698
      return 0;
21699
    }
21700
 
21701
    public _Fields fieldForId(int fieldId) {
21702
      return _Fields.findByThriftId(fieldId);
21703
    }
21704
 
21705
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
21706
      org.apache.thrift.protocol.TField field;
21707
      iprot.readStructBegin();
21708
      while (true)
21709
      {
21710
        field = iprot.readFieldBegin();
21711
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
21712
          break;
21713
        }
21714
        switch (field.id) {
21715
          case 1: // ORDER_ID
21716
            if (field.type == org.apache.thrift.protocol.TType.I64) {
21717
              this.orderId = iprot.readI64();
21718
              setOrderIdIsSet(true);
21719
            } else { 
21720
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21721
            }
21722
            break;
21723
          case 2: // FREEBIE_ITEM_ID
21724
            if (field.type == org.apache.thrift.protocol.TType.I64) {
21725
              this.freebieItemId = iprot.readI64();
21726
              setFreebieItemIdIsSet(true);
21727
            } else { 
21728
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21729
            }
21730
            break;
21731
          case 3: // FREEBIE_WAREHOUSE_ID
21732
            if (field.type == org.apache.thrift.protocol.TType.I64) {
21733
              this.freebieWarehouseId = iprot.readI64();
21734
              setFreebieWarehouseIdIsSet(true);
21735
            } else { 
21736
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21737
            }
21738
            break;
21739
          case 4: // SCAN_TYPE
21740
            if (field.type == org.apache.thrift.protocol.TType.I32) {
21741
              this.scanType = ScanType.findByValue(iprot.readI32());
21742
            } else { 
21743
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21744
            }
21745
            break;
21746
          default:
21747
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21748
        }
21749
        iprot.readFieldEnd();
21750
      }
21751
      iprot.readStructEnd();
21752
      validate();
21753
    }
21754
 
21755
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
21756
      validate();
21757
 
21758
      oprot.writeStructBegin(STRUCT_DESC);
21759
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
21760
      oprot.writeI64(this.orderId);
21761
      oprot.writeFieldEnd();
21762
      oprot.writeFieldBegin(FREEBIE_ITEM_ID_FIELD_DESC);
21763
      oprot.writeI64(this.freebieItemId);
21764
      oprot.writeFieldEnd();
21765
      oprot.writeFieldBegin(FREEBIE_WAREHOUSE_ID_FIELD_DESC);
21766
      oprot.writeI64(this.freebieWarehouseId);
21767
      oprot.writeFieldEnd();
21768
      if (this.scanType != null) {
21769
        oprot.writeFieldBegin(SCAN_TYPE_FIELD_DESC);
21770
        oprot.writeI32(this.scanType.getValue());
21771
        oprot.writeFieldEnd();
21772
      }
21773
      oprot.writeFieldStop();
21774
      oprot.writeStructEnd();
21775
    }
21776
 
21777
    @Override
21778
    public String toString() {
21779
      StringBuilder sb = new StringBuilder("scanfreebie_args(");
21780
      boolean first = true;
21781
 
21782
      sb.append("orderId:");
21783
      sb.append(this.orderId);
21784
      first = false;
21785
      if (!first) sb.append(", ");
21786
      sb.append("freebieItemId:");
21787
      sb.append(this.freebieItemId);
21788
      first = false;
21789
      if (!first) sb.append(", ");
21790
      sb.append("freebieWarehouseId:");
21791
      sb.append(this.freebieWarehouseId);
21792
      first = false;
21793
      if (!first) sb.append(", ");
21794
      sb.append("scanType:");
21795
      if (this.scanType == null) {
21796
        sb.append("null");
21797
      } else {
21798
        sb.append(this.scanType);
21799
      }
21800
      first = false;
21801
      sb.append(")");
21802
      return sb.toString();
21803
    }
21804
 
21805
    public void validate() throws org.apache.thrift.TException {
21806
      // check for required fields
21807
    }
21808
 
21809
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21810
      try {
21811
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
21812
      } catch (org.apache.thrift.TException te) {
21813
        throw new java.io.IOException(te);
21814
      }
21815
    }
21816
 
21817
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
21818
      try {
21819
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
21820
        __isset_bit_vector = new BitSet(1);
21821
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
21822
      } catch (org.apache.thrift.TException te) {
21823
        throw new java.io.IOException(te);
21824
      }
21825
    }
21826
 
21827
  }
21828
 
21829
  public static class scanfreebie_result implements org.apache.thrift.TBase<scanfreebie_result, scanfreebie_result._Fields>, java.io.Serializable, Cloneable   {
21830
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanfreebie_result");
21831
 
21832
    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);
21833
    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);
21834
 
21835
    private InventoryItem success; // required
21836
    private WarehouseServiceException wex; // required
21837
 
21838
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21839
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
21840
      SUCCESS((short)0, "success"),
21841
      WEX((short)1, "wex");
21842
 
21843
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21844
 
21845
      static {
21846
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21847
          byName.put(field.getFieldName(), field);
21848
        }
21849
      }
21850
 
21851
      /**
21852
       * Find the _Fields constant that matches fieldId, or null if its not found.
21853
       */
21854
      public static _Fields findByThriftId(int fieldId) {
21855
        switch(fieldId) {
21856
          case 0: // SUCCESS
21857
            return SUCCESS;
21858
          case 1: // WEX
21859
            return WEX;
21860
          default:
21861
            return null;
21862
        }
21863
      }
21864
 
21865
      /**
21866
       * Find the _Fields constant that matches fieldId, throwing an exception
21867
       * if it is not found.
21868
       */
21869
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21870
        _Fields fields = findByThriftId(fieldId);
21871
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21872
        return fields;
21873
      }
21874
 
21875
      /**
21876
       * Find the _Fields constant that matches name, or null if its not found.
21877
       */
21878
      public static _Fields findByName(String name) {
21879
        return byName.get(name);
21880
      }
21881
 
21882
      private final short _thriftId;
21883
      private final String _fieldName;
21884
 
21885
      _Fields(short thriftId, String fieldName) {
21886
        _thriftId = thriftId;
21887
        _fieldName = fieldName;
21888
      }
21889
 
21890
      public short getThriftFieldId() {
21891
        return _thriftId;
21892
      }
21893
 
21894
      public String getFieldName() {
21895
        return _fieldName;
21896
      }
21897
    }
21898
 
21899
    // isset id assignments
21900
 
21901
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
21902
    static {
21903
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
21904
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21905
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
21906
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21907
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
21908
      metaDataMap = Collections.unmodifiableMap(tmpMap);
21909
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanfreebie_result.class, metaDataMap);
21910
    }
21911
 
21912
    public scanfreebie_result() {
21913
    }
21914
 
21915
    public scanfreebie_result(
21916
      InventoryItem success,
21917
      WarehouseServiceException wex)
21918
    {
21919
      this();
21920
      this.success = success;
21921
      this.wex = wex;
21922
    }
21923
 
21924
    /**
21925
     * Performs a deep copy on <i>other</i>.
21926
     */
21927
    public scanfreebie_result(scanfreebie_result other) {
21928
      if (other.isSetSuccess()) {
21929
        this.success = new InventoryItem(other.success);
21930
      }
21931
      if (other.isSetWex()) {
21932
        this.wex = new WarehouseServiceException(other.wex);
21933
      }
21934
    }
21935
 
21936
    public scanfreebie_result deepCopy() {
21937
      return new scanfreebie_result(this);
21938
    }
21939
 
21940
    @Override
21941
    public void clear() {
21942
      this.success = null;
21943
      this.wex = null;
21944
    }
21945
 
21946
    public InventoryItem getSuccess() {
21947
      return this.success;
21948
    }
21949
 
21950
    public void setSuccess(InventoryItem success) {
21951
      this.success = success;
21952
    }
21953
 
21954
    public void unsetSuccess() {
21955
      this.success = null;
21956
    }
21957
 
21958
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
21959
    public boolean isSetSuccess() {
21960
      return this.success != null;
21961
    }
21962
 
21963
    public void setSuccessIsSet(boolean value) {
21964
      if (!value) {
21965
        this.success = null;
21966
      }
21967
    }
21968
 
21969
    public WarehouseServiceException getWex() {
21970
      return this.wex;
21971
    }
21972
 
21973
    public void setWex(WarehouseServiceException wex) {
21974
      this.wex = wex;
21975
    }
21976
 
21977
    public void unsetWex() {
21978
      this.wex = null;
21979
    }
21980
 
21981
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
21982
    public boolean isSetWex() {
21983
      return this.wex != null;
21984
    }
21985
 
21986
    public void setWexIsSet(boolean value) {
21987
      if (!value) {
21988
        this.wex = null;
21989
      }
21990
    }
21991
 
21992
    public void setFieldValue(_Fields field, Object value) {
21993
      switch (field) {
21994
      case SUCCESS:
21995
        if (value == null) {
21996
          unsetSuccess();
21997
        } else {
21998
          setSuccess((InventoryItem)value);
21999
        }
22000
        break;
22001
 
22002
      case WEX:
22003
        if (value == null) {
22004
          unsetWex();
22005
        } else {
22006
          setWex((WarehouseServiceException)value);
22007
        }
22008
        break;
22009
 
22010
      }
22011
    }
22012
 
22013
    public Object getFieldValue(_Fields field) {
22014
      switch (field) {
22015
      case SUCCESS:
22016
        return getSuccess();
22017
 
22018
      case WEX:
22019
        return getWex();
22020
 
22021
      }
22022
      throw new IllegalStateException();
22023
    }
22024
 
22025
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
22026
    public boolean isSet(_Fields field) {
22027
      if (field == null) {
22028
        throw new IllegalArgumentException();
22029
      }
22030
 
22031
      switch (field) {
22032
      case SUCCESS:
22033
        return isSetSuccess();
22034
      case WEX:
22035
        return isSetWex();
22036
      }
22037
      throw new IllegalStateException();
22038
    }
22039
 
22040
    @Override
22041
    public boolean equals(Object that) {
22042
      if (that == null)
22043
        return false;
22044
      if (that instanceof scanfreebie_result)
22045
        return this.equals((scanfreebie_result)that);
22046
      return false;
22047
    }
22048
 
22049
    public boolean equals(scanfreebie_result that) {
22050
      if (that == null)
22051
        return false;
22052
 
22053
      boolean this_present_success = true && this.isSetSuccess();
22054
      boolean that_present_success = true && that.isSetSuccess();
22055
      if (this_present_success || that_present_success) {
22056
        if (!(this_present_success && that_present_success))
22057
          return false;
22058
        if (!this.success.equals(that.success))
22059
          return false;
22060
      }
22061
 
22062
      boolean this_present_wex = true && this.isSetWex();
22063
      boolean that_present_wex = true && that.isSetWex();
22064
      if (this_present_wex || that_present_wex) {
22065
        if (!(this_present_wex && that_present_wex))
22066
          return false;
22067
        if (!this.wex.equals(that.wex))
22068
          return false;
22069
      }
22070
 
22071
      return true;
22072
    }
22073
 
22074
    @Override
22075
    public int hashCode() {
22076
      return 0;
22077
    }
22078
 
22079
    public int compareTo(scanfreebie_result other) {
22080
      if (!getClass().equals(other.getClass())) {
22081
        return getClass().getName().compareTo(other.getClass().getName());
22082
      }
22083
 
22084
      int lastComparison = 0;
22085
      scanfreebie_result typedOther = (scanfreebie_result)other;
22086
 
22087
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
22088
      if (lastComparison != 0) {
22089
        return lastComparison;
22090
      }
22091
      if (isSetSuccess()) {
22092
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
22093
        if (lastComparison != 0) {
22094
          return lastComparison;
22095
        }
22096
      }
22097
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
22098
      if (lastComparison != 0) {
22099
        return lastComparison;
22100
      }
22101
      if (isSetWex()) {
22102
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
22103
        if (lastComparison != 0) {
22104
          return lastComparison;
22105
        }
22106
      }
22107
      return 0;
22108
    }
22109
 
22110
    public _Fields fieldForId(int fieldId) {
22111
      return _Fields.findByThriftId(fieldId);
22112
    }
22113
 
22114
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
22115
      org.apache.thrift.protocol.TField field;
22116
      iprot.readStructBegin();
22117
      while (true)
22118
      {
22119
        field = iprot.readFieldBegin();
22120
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
22121
          break;
22122
        }
22123
        switch (field.id) {
22124
          case 0: // SUCCESS
22125
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
22126
              this.success = new InventoryItem();
22127
              this.success.read(iprot);
22128
            } else { 
22129
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22130
            }
22131
            break;
22132
          case 1: // WEX
22133
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
22134
              this.wex = new WarehouseServiceException();
22135
              this.wex.read(iprot);
22136
            } else { 
22137
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22138
            }
22139
            break;
22140
          default:
22141
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22142
        }
22143
        iprot.readFieldEnd();
22144
      }
22145
      iprot.readStructEnd();
22146
      validate();
22147
    }
22148
 
22149
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
22150
      oprot.writeStructBegin(STRUCT_DESC);
22151
 
22152
      if (this.isSetSuccess()) {
22153
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
22154
        this.success.write(oprot);
22155
        oprot.writeFieldEnd();
22156
      } else if (this.isSetWex()) {
22157
        oprot.writeFieldBegin(WEX_FIELD_DESC);
22158
        this.wex.write(oprot);
22159
        oprot.writeFieldEnd();
22160
      }
22161
      oprot.writeFieldStop();
22162
      oprot.writeStructEnd();
22163
    }
22164
 
22165
    @Override
22166
    public String toString() {
22167
      StringBuilder sb = new StringBuilder("scanfreebie_result(");
22168
      boolean first = true;
22169
 
22170
      sb.append("success:");
22171
      if (this.success == null) {
22172
        sb.append("null");
22173
      } else {
22174
        sb.append(this.success);
22175
      }
22176
      first = false;
22177
      if (!first) sb.append(", ");
22178
      sb.append("wex:");
22179
      if (this.wex == null) {
22180
        sb.append("null");
22181
      } else {
22182
        sb.append(this.wex);
22183
      }
22184
      first = false;
22185
      sb.append(")");
22186
      return sb.toString();
22187
    }
22188
 
22189
    public void validate() throws org.apache.thrift.TException {
22190
      // check for required fields
22191
    }
22192
 
22193
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
22194
      try {
22195
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
22196
      } catch (org.apache.thrift.TException te) {
22197
        throw new java.io.IOException(te);
22198
      }
22199
    }
22200
 
22201
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
22202
      try {
22203
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
22204
      } catch (org.apache.thrift.TException te) {
22205
        throw new java.io.IOException(te);
22206
      }
22207
    }
22208
 
22209
  }
22210
 
7199 amar.kumar 22211
  public static class reshipfreebie_args implements org.apache.thrift.TBase<reshipfreebie_args, reshipfreebie_args._Fields>, java.io.Serializable, Cloneable   {
22212
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("reshipfreebie_args");
22213
 
22214
    private static final org.apache.thrift.protocol.TField OLD_ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("oldOrderId", org.apache.thrift.protocol.TType.I64, (short)1);
22215
    private static final org.apache.thrift.protocol.TField NEW_ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("newOrderId", org.apache.thrift.protocol.TType.I64, (short)2);
22216
    private static final org.apache.thrift.protocol.TField FREEBIE_ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("freebieItemId", org.apache.thrift.protocol.TType.I64, (short)3);
22217
    private static final org.apache.thrift.protocol.TField SCAN_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("scanType", org.apache.thrift.protocol.TType.I32, (short)4);
22218
 
22219
    private long oldOrderId; // required
22220
    private long newOrderId; // required
22221
    private long freebieItemId; // required
22222
    private ScanType scanType; // required
22223
 
22224
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22225
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
22226
      OLD_ORDER_ID((short)1, "oldOrderId"),
22227
      NEW_ORDER_ID((short)2, "newOrderId"),
22228
      FREEBIE_ITEM_ID((short)3, "freebieItemId"),
22229
      /**
22230
       * 
22231
       * @see ScanType
22232
       */
22233
      SCAN_TYPE((short)4, "scanType");
22234
 
22235
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22236
 
22237
      static {
22238
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22239
          byName.put(field.getFieldName(), field);
22240
        }
22241
      }
22242
 
22243
      /**
22244
       * Find the _Fields constant that matches fieldId, or null if its not found.
22245
       */
22246
      public static _Fields findByThriftId(int fieldId) {
22247
        switch(fieldId) {
22248
          case 1: // OLD_ORDER_ID
22249
            return OLD_ORDER_ID;
22250
          case 2: // NEW_ORDER_ID
22251
            return NEW_ORDER_ID;
22252
          case 3: // FREEBIE_ITEM_ID
22253
            return FREEBIE_ITEM_ID;
22254
          case 4: // SCAN_TYPE
22255
            return SCAN_TYPE;
22256
          default:
22257
            return null;
22258
        }
22259
      }
22260
 
22261
      /**
22262
       * Find the _Fields constant that matches fieldId, throwing an exception
22263
       * if it is not found.
22264
       */
22265
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22266
        _Fields fields = findByThriftId(fieldId);
22267
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22268
        return fields;
22269
      }
22270
 
22271
      /**
22272
       * Find the _Fields constant that matches name, or null if its not found.
22273
       */
22274
      public static _Fields findByName(String name) {
22275
        return byName.get(name);
22276
      }
22277
 
22278
      private final short _thriftId;
22279
      private final String _fieldName;
22280
 
22281
      _Fields(short thriftId, String fieldName) {
22282
        _thriftId = thriftId;
22283
        _fieldName = fieldName;
22284
      }
22285
 
22286
      public short getThriftFieldId() {
22287
        return _thriftId;
22288
      }
22289
 
22290
      public String getFieldName() {
22291
        return _fieldName;
22292
      }
22293
    }
22294
 
22295
    // isset id assignments
22296
    private static final int __OLDORDERID_ISSET_ID = 0;
22297
    private static final int __NEWORDERID_ISSET_ID = 1;
22298
    private static final int __FREEBIEITEMID_ISSET_ID = 2;
22299
    private BitSet __isset_bit_vector = new BitSet(3);
22300
 
22301
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
22302
    static {
22303
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
22304
      tmpMap.put(_Fields.OLD_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("oldOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22305
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
22306
      tmpMap.put(_Fields.NEW_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("newOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22307
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
22308
      tmpMap.put(_Fields.FREEBIE_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("freebieItemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22309
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
22310
      tmpMap.put(_Fields.SCAN_TYPE, new org.apache.thrift.meta_data.FieldMetaData("scanType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22311
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
22312
      metaDataMap = Collections.unmodifiableMap(tmpMap);
22313
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(reshipfreebie_args.class, metaDataMap);
22314
    }
22315
 
22316
    public reshipfreebie_args() {
22317
    }
22318
 
22319
    public reshipfreebie_args(
22320
      long oldOrderId,
22321
      long newOrderId,
22322
      long freebieItemId,
22323
      ScanType scanType)
22324
    {
22325
      this();
22326
      this.oldOrderId = oldOrderId;
22327
      setOldOrderIdIsSet(true);
22328
      this.newOrderId = newOrderId;
22329
      setNewOrderIdIsSet(true);
22330
      this.freebieItemId = freebieItemId;
22331
      setFreebieItemIdIsSet(true);
22332
      this.scanType = scanType;
22333
    }
22334
 
22335
    /**
22336
     * Performs a deep copy on <i>other</i>.
22337
     */
22338
    public reshipfreebie_args(reshipfreebie_args other) {
22339
      __isset_bit_vector.clear();
22340
      __isset_bit_vector.or(other.__isset_bit_vector);
22341
      this.oldOrderId = other.oldOrderId;
22342
      this.newOrderId = other.newOrderId;
22343
      this.freebieItemId = other.freebieItemId;
22344
      if (other.isSetScanType()) {
22345
        this.scanType = other.scanType;
22346
      }
22347
    }
22348
 
22349
    public reshipfreebie_args deepCopy() {
22350
      return new reshipfreebie_args(this);
22351
    }
22352
 
22353
    @Override
22354
    public void clear() {
22355
      setOldOrderIdIsSet(false);
22356
      this.oldOrderId = 0;
22357
      setNewOrderIdIsSet(false);
22358
      this.newOrderId = 0;
22359
      setFreebieItemIdIsSet(false);
22360
      this.freebieItemId = 0;
22361
      this.scanType = null;
22362
    }
22363
 
22364
    public long getOldOrderId() {
22365
      return this.oldOrderId;
22366
    }
22367
 
22368
    public void setOldOrderId(long oldOrderId) {
22369
      this.oldOrderId = oldOrderId;
22370
      setOldOrderIdIsSet(true);
22371
    }
22372
 
22373
    public void unsetOldOrderId() {
22374
      __isset_bit_vector.clear(__OLDORDERID_ISSET_ID);
22375
    }
22376
 
22377
    /** Returns true if field oldOrderId is set (has been assigned a value) and false otherwise */
22378
    public boolean isSetOldOrderId() {
22379
      return __isset_bit_vector.get(__OLDORDERID_ISSET_ID);
22380
    }
22381
 
22382
    public void setOldOrderIdIsSet(boolean value) {
22383
      __isset_bit_vector.set(__OLDORDERID_ISSET_ID, value);
22384
    }
22385
 
22386
    public long getNewOrderId() {
22387
      return this.newOrderId;
22388
    }
22389
 
22390
    public void setNewOrderId(long newOrderId) {
22391
      this.newOrderId = newOrderId;
22392
      setNewOrderIdIsSet(true);
22393
    }
22394
 
22395
    public void unsetNewOrderId() {
22396
      __isset_bit_vector.clear(__NEWORDERID_ISSET_ID);
22397
    }
22398
 
22399
    /** Returns true if field newOrderId is set (has been assigned a value) and false otherwise */
22400
    public boolean isSetNewOrderId() {
22401
      return __isset_bit_vector.get(__NEWORDERID_ISSET_ID);
22402
    }
22403
 
22404
    public void setNewOrderIdIsSet(boolean value) {
22405
      __isset_bit_vector.set(__NEWORDERID_ISSET_ID, value);
22406
    }
22407
 
22408
    public long getFreebieItemId() {
22409
      return this.freebieItemId;
22410
    }
22411
 
22412
    public void setFreebieItemId(long freebieItemId) {
22413
      this.freebieItemId = freebieItemId;
22414
      setFreebieItemIdIsSet(true);
22415
    }
22416
 
22417
    public void unsetFreebieItemId() {
22418
      __isset_bit_vector.clear(__FREEBIEITEMID_ISSET_ID);
22419
    }
22420
 
22421
    /** Returns true if field freebieItemId is set (has been assigned a value) and false otherwise */
22422
    public boolean isSetFreebieItemId() {
22423
      return __isset_bit_vector.get(__FREEBIEITEMID_ISSET_ID);
22424
    }
22425
 
22426
    public void setFreebieItemIdIsSet(boolean value) {
22427
      __isset_bit_vector.set(__FREEBIEITEMID_ISSET_ID, value);
22428
    }
22429
 
22430
    /**
22431
     * 
22432
     * @see ScanType
22433
     */
22434
    public ScanType getScanType() {
22435
      return this.scanType;
22436
    }
22437
 
22438
    /**
22439
     * 
22440
     * @see ScanType
22441
     */
22442
    public void setScanType(ScanType scanType) {
22443
      this.scanType = scanType;
22444
    }
22445
 
22446
    public void unsetScanType() {
22447
      this.scanType = null;
22448
    }
22449
 
22450
    /** Returns true if field scanType is set (has been assigned a value) and false otherwise */
22451
    public boolean isSetScanType() {
22452
      return this.scanType != null;
22453
    }
22454
 
22455
    public void setScanTypeIsSet(boolean value) {
22456
      if (!value) {
22457
        this.scanType = null;
22458
      }
22459
    }
22460
 
22461
    public void setFieldValue(_Fields field, Object value) {
22462
      switch (field) {
22463
      case OLD_ORDER_ID:
22464
        if (value == null) {
22465
          unsetOldOrderId();
22466
        } else {
22467
          setOldOrderId((Long)value);
22468
        }
22469
        break;
22470
 
22471
      case NEW_ORDER_ID:
22472
        if (value == null) {
22473
          unsetNewOrderId();
22474
        } else {
22475
          setNewOrderId((Long)value);
22476
        }
22477
        break;
22478
 
22479
      case FREEBIE_ITEM_ID:
22480
        if (value == null) {
22481
          unsetFreebieItemId();
22482
        } else {
22483
          setFreebieItemId((Long)value);
22484
        }
22485
        break;
22486
 
22487
      case SCAN_TYPE:
22488
        if (value == null) {
22489
          unsetScanType();
22490
        } else {
22491
          setScanType((ScanType)value);
22492
        }
22493
        break;
22494
 
22495
      }
22496
    }
22497
 
22498
    public Object getFieldValue(_Fields field) {
22499
      switch (field) {
22500
      case OLD_ORDER_ID:
22501
        return Long.valueOf(getOldOrderId());
22502
 
22503
      case NEW_ORDER_ID:
22504
        return Long.valueOf(getNewOrderId());
22505
 
22506
      case FREEBIE_ITEM_ID:
22507
        return Long.valueOf(getFreebieItemId());
22508
 
22509
      case SCAN_TYPE:
22510
        return getScanType();
22511
 
22512
      }
22513
      throw new IllegalStateException();
22514
    }
22515
 
22516
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
22517
    public boolean isSet(_Fields field) {
22518
      if (field == null) {
22519
        throw new IllegalArgumentException();
22520
      }
22521
 
22522
      switch (field) {
22523
      case OLD_ORDER_ID:
22524
        return isSetOldOrderId();
22525
      case NEW_ORDER_ID:
22526
        return isSetNewOrderId();
22527
      case FREEBIE_ITEM_ID:
22528
        return isSetFreebieItemId();
22529
      case SCAN_TYPE:
22530
        return isSetScanType();
22531
      }
22532
      throw new IllegalStateException();
22533
    }
22534
 
22535
    @Override
22536
    public boolean equals(Object that) {
22537
      if (that == null)
22538
        return false;
22539
      if (that instanceof reshipfreebie_args)
22540
        return this.equals((reshipfreebie_args)that);
22541
      return false;
22542
    }
22543
 
22544
    public boolean equals(reshipfreebie_args that) {
22545
      if (that == null)
22546
        return false;
22547
 
22548
      boolean this_present_oldOrderId = true;
22549
      boolean that_present_oldOrderId = true;
22550
      if (this_present_oldOrderId || that_present_oldOrderId) {
22551
        if (!(this_present_oldOrderId && that_present_oldOrderId))
22552
          return false;
22553
        if (this.oldOrderId != that.oldOrderId)
22554
          return false;
22555
      }
22556
 
22557
      boolean this_present_newOrderId = true;
22558
      boolean that_present_newOrderId = true;
22559
      if (this_present_newOrderId || that_present_newOrderId) {
22560
        if (!(this_present_newOrderId && that_present_newOrderId))
22561
          return false;
22562
        if (this.newOrderId != that.newOrderId)
22563
          return false;
22564
      }
22565
 
22566
      boolean this_present_freebieItemId = true;
22567
      boolean that_present_freebieItemId = true;
22568
      if (this_present_freebieItemId || that_present_freebieItemId) {
22569
        if (!(this_present_freebieItemId && that_present_freebieItemId))
22570
          return false;
22571
        if (this.freebieItemId != that.freebieItemId)
22572
          return false;
22573
      }
22574
 
22575
      boolean this_present_scanType = true && this.isSetScanType();
22576
      boolean that_present_scanType = true && that.isSetScanType();
22577
      if (this_present_scanType || that_present_scanType) {
22578
        if (!(this_present_scanType && that_present_scanType))
22579
          return false;
22580
        if (!this.scanType.equals(that.scanType))
22581
          return false;
22582
      }
22583
 
22584
      return true;
22585
    }
22586
 
22587
    @Override
22588
    public int hashCode() {
22589
      return 0;
22590
    }
22591
 
22592
    public int compareTo(reshipfreebie_args other) {
22593
      if (!getClass().equals(other.getClass())) {
22594
        return getClass().getName().compareTo(other.getClass().getName());
22595
      }
22596
 
22597
      int lastComparison = 0;
22598
      reshipfreebie_args typedOther = (reshipfreebie_args)other;
22599
 
22600
      lastComparison = Boolean.valueOf(isSetOldOrderId()).compareTo(typedOther.isSetOldOrderId());
22601
      if (lastComparison != 0) {
22602
        return lastComparison;
22603
      }
22604
      if (isSetOldOrderId()) {
22605
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.oldOrderId, typedOther.oldOrderId);
22606
        if (lastComparison != 0) {
22607
          return lastComparison;
22608
        }
22609
      }
22610
      lastComparison = Boolean.valueOf(isSetNewOrderId()).compareTo(typedOther.isSetNewOrderId());
22611
      if (lastComparison != 0) {
22612
        return lastComparison;
22613
      }
22614
      if (isSetNewOrderId()) {
22615
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newOrderId, typedOther.newOrderId);
22616
        if (lastComparison != 0) {
22617
          return lastComparison;
22618
        }
22619
      }
22620
      lastComparison = Boolean.valueOf(isSetFreebieItemId()).compareTo(typedOther.isSetFreebieItemId());
22621
      if (lastComparison != 0) {
22622
        return lastComparison;
22623
      }
22624
      if (isSetFreebieItemId()) {
22625
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freebieItemId, typedOther.freebieItemId);
22626
        if (lastComparison != 0) {
22627
          return lastComparison;
22628
        }
22629
      }
22630
      lastComparison = Boolean.valueOf(isSetScanType()).compareTo(typedOther.isSetScanType());
22631
      if (lastComparison != 0) {
22632
        return lastComparison;
22633
      }
22634
      if (isSetScanType()) {
22635
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scanType, typedOther.scanType);
22636
        if (lastComparison != 0) {
22637
          return lastComparison;
22638
        }
22639
      }
22640
      return 0;
22641
    }
22642
 
22643
    public _Fields fieldForId(int fieldId) {
22644
      return _Fields.findByThriftId(fieldId);
22645
    }
22646
 
22647
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
22648
      org.apache.thrift.protocol.TField field;
22649
      iprot.readStructBegin();
22650
      while (true)
22651
      {
22652
        field = iprot.readFieldBegin();
22653
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
22654
          break;
22655
        }
22656
        switch (field.id) {
22657
          case 1: // OLD_ORDER_ID
22658
            if (field.type == org.apache.thrift.protocol.TType.I64) {
22659
              this.oldOrderId = iprot.readI64();
22660
              setOldOrderIdIsSet(true);
22661
            } else { 
22662
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22663
            }
22664
            break;
22665
          case 2: // NEW_ORDER_ID
22666
            if (field.type == org.apache.thrift.protocol.TType.I64) {
22667
              this.newOrderId = iprot.readI64();
22668
              setNewOrderIdIsSet(true);
22669
            } else { 
22670
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22671
            }
22672
            break;
22673
          case 3: // FREEBIE_ITEM_ID
22674
            if (field.type == org.apache.thrift.protocol.TType.I64) {
22675
              this.freebieItemId = iprot.readI64();
22676
              setFreebieItemIdIsSet(true);
22677
            } else { 
22678
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22679
            }
22680
            break;
22681
          case 4: // SCAN_TYPE
22682
            if (field.type == org.apache.thrift.protocol.TType.I32) {
22683
              this.scanType = ScanType.findByValue(iprot.readI32());
22684
            } else { 
22685
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22686
            }
22687
            break;
22688
          default:
22689
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22690
        }
22691
        iprot.readFieldEnd();
22692
      }
22693
      iprot.readStructEnd();
22694
      validate();
22695
    }
22696
 
22697
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
22698
      validate();
22699
 
22700
      oprot.writeStructBegin(STRUCT_DESC);
22701
      oprot.writeFieldBegin(OLD_ORDER_ID_FIELD_DESC);
22702
      oprot.writeI64(this.oldOrderId);
22703
      oprot.writeFieldEnd();
22704
      oprot.writeFieldBegin(NEW_ORDER_ID_FIELD_DESC);
22705
      oprot.writeI64(this.newOrderId);
22706
      oprot.writeFieldEnd();
22707
      oprot.writeFieldBegin(FREEBIE_ITEM_ID_FIELD_DESC);
22708
      oprot.writeI64(this.freebieItemId);
22709
      oprot.writeFieldEnd();
22710
      if (this.scanType != null) {
22711
        oprot.writeFieldBegin(SCAN_TYPE_FIELD_DESC);
22712
        oprot.writeI32(this.scanType.getValue());
22713
        oprot.writeFieldEnd();
22714
      }
22715
      oprot.writeFieldStop();
22716
      oprot.writeStructEnd();
22717
    }
22718
 
22719
    @Override
22720
    public String toString() {
22721
      StringBuilder sb = new StringBuilder("reshipfreebie_args(");
22722
      boolean first = true;
22723
 
22724
      sb.append("oldOrderId:");
22725
      sb.append(this.oldOrderId);
22726
      first = false;
22727
      if (!first) sb.append(", ");
22728
      sb.append("newOrderId:");
22729
      sb.append(this.newOrderId);
22730
      first = false;
22731
      if (!first) sb.append(", ");
22732
      sb.append("freebieItemId:");
22733
      sb.append(this.freebieItemId);
22734
      first = false;
22735
      if (!first) sb.append(", ");
22736
      sb.append("scanType:");
22737
      if (this.scanType == null) {
22738
        sb.append("null");
22739
      } else {
22740
        sb.append(this.scanType);
22741
      }
22742
      first = false;
22743
      sb.append(")");
22744
      return sb.toString();
22745
    }
22746
 
22747
    public void validate() throws org.apache.thrift.TException {
22748
      // check for required fields
22749
    }
22750
 
22751
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
22752
      try {
22753
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
22754
      } catch (org.apache.thrift.TException te) {
22755
        throw new java.io.IOException(te);
22756
      }
22757
    }
22758
 
22759
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
22760
      try {
22761
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
22762
        __isset_bit_vector = new BitSet(1);
22763
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
22764
      } catch (org.apache.thrift.TException te) {
22765
        throw new java.io.IOException(te);
22766
      }
22767
    }
22768
 
22769
  }
22770
 
22771
  public static class reshipfreebie_result implements org.apache.thrift.TBase<reshipfreebie_result, reshipfreebie_result._Fields>, java.io.Serializable, Cloneable   {
22772
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("reshipfreebie_result");
22773
 
22774
    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);
22775
 
22776
    private WarehouseServiceException wex; // required
22777
 
22778
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22779
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
22780
      WEX((short)1, "wex");
22781
 
22782
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22783
 
22784
      static {
22785
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22786
          byName.put(field.getFieldName(), field);
22787
        }
22788
      }
22789
 
22790
      /**
22791
       * Find the _Fields constant that matches fieldId, or null if its not found.
22792
       */
22793
      public static _Fields findByThriftId(int fieldId) {
22794
        switch(fieldId) {
22795
          case 1: // WEX
22796
            return WEX;
22797
          default:
22798
            return null;
22799
        }
22800
      }
22801
 
22802
      /**
22803
       * Find the _Fields constant that matches fieldId, throwing an exception
22804
       * if it is not found.
22805
       */
22806
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22807
        _Fields fields = findByThriftId(fieldId);
22808
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22809
        return fields;
22810
      }
22811
 
22812
      /**
22813
       * Find the _Fields constant that matches name, or null if its not found.
22814
       */
22815
      public static _Fields findByName(String name) {
22816
        return byName.get(name);
22817
      }
22818
 
22819
      private final short _thriftId;
22820
      private final String _fieldName;
22821
 
22822
      _Fields(short thriftId, String fieldName) {
22823
        _thriftId = thriftId;
22824
        _fieldName = fieldName;
22825
      }
22826
 
22827
      public short getThriftFieldId() {
22828
        return _thriftId;
22829
      }
22830
 
22831
      public String getFieldName() {
22832
        return _fieldName;
22833
      }
22834
    }
22835
 
22836
    // isset id assignments
22837
 
22838
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
22839
    static {
22840
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
22841
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22842
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
22843
      metaDataMap = Collections.unmodifiableMap(tmpMap);
22844
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(reshipfreebie_result.class, metaDataMap);
22845
    }
22846
 
22847
    public reshipfreebie_result() {
22848
    }
22849
 
22850
    public reshipfreebie_result(
22851
      WarehouseServiceException wex)
22852
    {
22853
      this();
22854
      this.wex = wex;
22855
    }
22856
 
22857
    /**
22858
     * Performs a deep copy on <i>other</i>.
22859
     */
22860
    public reshipfreebie_result(reshipfreebie_result other) {
22861
      if (other.isSetWex()) {
22862
        this.wex = new WarehouseServiceException(other.wex);
22863
      }
22864
    }
22865
 
22866
    public reshipfreebie_result deepCopy() {
22867
      return new reshipfreebie_result(this);
22868
    }
22869
 
22870
    @Override
22871
    public void clear() {
22872
      this.wex = null;
22873
    }
22874
 
22875
    public WarehouseServiceException getWex() {
22876
      return this.wex;
22877
    }
22878
 
22879
    public void setWex(WarehouseServiceException wex) {
22880
      this.wex = wex;
22881
    }
22882
 
22883
    public void unsetWex() {
22884
      this.wex = null;
22885
    }
22886
 
22887
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
22888
    public boolean isSetWex() {
22889
      return this.wex != null;
22890
    }
22891
 
22892
    public void setWexIsSet(boolean value) {
22893
      if (!value) {
22894
        this.wex = null;
22895
      }
22896
    }
22897
 
22898
    public void setFieldValue(_Fields field, Object value) {
22899
      switch (field) {
22900
      case WEX:
22901
        if (value == null) {
22902
          unsetWex();
22903
        } else {
22904
          setWex((WarehouseServiceException)value);
22905
        }
22906
        break;
22907
 
22908
      }
22909
    }
22910
 
22911
    public Object getFieldValue(_Fields field) {
22912
      switch (field) {
22913
      case WEX:
22914
        return getWex();
22915
 
22916
      }
22917
      throw new IllegalStateException();
22918
    }
22919
 
22920
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
22921
    public boolean isSet(_Fields field) {
22922
      if (field == null) {
22923
        throw new IllegalArgumentException();
22924
      }
22925
 
22926
      switch (field) {
22927
      case WEX:
22928
        return isSetWex();
22929
      }
22930
      throw new IllegalStateException();
22931
    }
22932
 
22933
    @Override
22934
    public boolean equals(Object that) {
22935
      if (that == null)
22936
        return false;
22937
      if (that instanceof reshipfreebie_result)
22938
        return this.equals((reshipfreebie_result)that);
22939
      return false;
22940
    }
22941
 
22942
    public boolean equals(reshipfreebie_result that) {
22943
      if (that == null)
22944
        return false;
22945
 
22946
      boolean this_present_wex = true && this.isSetWex();
22947
      boolean that_present_wex = true && that.isSetWex();
22948
      if (this_present_wex || that_present_wex) {
22949
        if (!(this_present_wex && that_present_wex))
22950
          return false;
22951
        if (!this.wex.equals(that.wex))
22952
          return false;
22953
      }
22954
 
22955
      return true;
22956
    }
22957
 
22958
    @Override
22959
    public int hashCode() {
22960
      return 0;
22961
    }
22962
 
22963
    public int compareTo(reshipfreebie_result other) {
22964
      if (!getClass().equals(other.getClass())) {
22965
        return getClass().getName().compareTo(other.getClass().getName());
22966
      }
22967
 
22968
      int lastComparison = 0;
22969
      reshipfreebie_result typedOther = (reshipfreebie_result)other;
22970
 
22971
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
22972
      if (lastComparison != 0) {
22973
        return lastComparison;
22974
      }
22975
      if (isSetWex()) {
22976
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
22977
        if (lastComparison != 0) {
22978
          return lastComparison;
22979
        }
22980
      }
22981
      return 0;
22982
    }
22983
 
22984
    public _Fields fieldForId(int fieldId) {
22985
      return _Fields.findByThriftId(fieldId);
22986
    }
22987
 
22988
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
22989
      org.apache.thrift.protocol.TField field;
22990
      iprot.readStructBegin();
22991
      while (true)
22992
      {
22993
        field = iprot.readFieldBegin();
22994
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
22995
          break;
22996
        }
22997
        switch (field.id) {
22998
          case 1: // WEX
22999
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
23000
              this.wex = new WarehouseServiceException();
23001
              this.wex.read(iprot);
23002
            } else { 
23003
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23004
            }
23005
            break;
23006
          default:
23007
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23008
        }
23009
        iprot.readFieldEnd();
23010
      }
23011
      iprot.readStructEnd();
23012
      validate();
23013
    }
23014
 
23015
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
23016
      oprot.writeStructBegin(STRUCT_DESC);
23017
 
23018
      if (this.isSetWex()) {
23019
        oprot.writeFieldBegin(WEX_FIELD_DESC);
23020
        this.wex.write(oprot);
23021
        oprot.writeFieldEnd();
23022
      }
23023
      oprot.writeFieldStop();
23024
      oprot.writeStructEnd();
23025
    }
23026
 
23027
    @Override
23028
    public String toString() {
23029
      StringBuilder sb = new StringBuilder("reshipfreebie_result(");
23030
      boolean first = true;
23031
 
23032
      sb.append("wex:");
23033
      if (this.wex == null) {
23034
        sb.append("null");
23035
      } else {
23036
        sb.append(this.wex);
23037
      }
23038
      first = false;
23039
      sb.append(")");
23040
      return sb.toString();
23041
    }
23042
 
23043
    public void validate() throws org.apache.thrift.TException {
23044
      // check for required fields
23045
    }
23046
 
23047
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
23048
      try {
23049
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
23050
      } catch (org.apache.thrift.TException te) {
23051
        throw new java.io.IOException(te);
23052
      }
23053
    }
23054
 
23055
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
23056
      try {
23057
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
23058
      } catch (org.apache.thrift.TException te) {
23059
        throw new java.io.IOException(te);
23060
      }
23061
    }
23062
 
23063
  }
23064
 
2820 chandransh 23065
}