Subversion Repositories SmartDukaan

Rev

Rev 7199 | Rev 7216 | 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
    /**
7210 amar.kumar 122
     * Returns the purchase scans between grn dates grouped by items for Purchase register reconciliation
123
     * 
124
     * @param startDate
125
     * @param endDate
126
     */
127
    public List<DetailedPurchaseScan> getPurchaseScansByGrnDate(long startDate, long endDate) throws org.apache.thrift.TException;
128
 
129
    /**
5496 mandeep.dh 130
     * Returns the invoices and the count of scans against on a given day.
131
     * 
132
     * @param date
133
     */
134
    public List<InvoiceScan> fetchScansPerInvoiceNumber(long date) throws org.apache.thrift.TException;
135
 
5620 mandeep.dh 136
    /**
137
     * Returns inventory item for a given order
138
     * 
139
     * @param orderId
140
     */
141
    public InventoryItem getInventoryItemFromOrder(long orderId) throws WarehouseServiceException, org.apache.thrift.TException;
142
 
5711 mandeep.dh 143
    /**
144
     * Fetches the stock inventory age week-wise
145
     */
146
    public List<InventoryAge> getInventoryAge() throws org.apache.thrift.TException;
147
 
6322 amar.kumar 148
    /**
149
     * Fetches the scanRecords for a given item for a given time interval
150
     * 
151
     * @param itemId
152
     * @param fromDate
153
     * @param toDate
154
     */
155
    public List<Scan> getInventoryScansForItem(long itemId, long fromDate, long toDate) throws org.apache.thrift.TException;
156
 
157
    /**
158
     * Fetches the scanRecords for a given serialNumber for a given time interval
159
     * 
160
     * @param serialNumber
161
     */
162
    public List<Scan> getScanRecordsForSerialNumber(long serialNumber) throws org.apache.thrift.TException;
163
 
6467 amar.kumar 164
    /**
6548 amar.kumar 165
     * Inserts outgoing scans for Returned Items and updates returnId in InventoryItems
6467 amar.kumar 166
     * 
167
     * @param saleReturnItems
168
     * @param vendorId
169
     */
170
    public void scanForPurchaseReturn(List<InventoryItem> saleReturnItems, long vendorId) throws WarehouseServiceException, org.apache.thrift.TException;
171
 
6548 amar.kumar 172
    /**
173
     * Inserts scans for lost Items and updates lastScanType in InventoryItems
174
     * 
175
     * @param lostItems
176
     * @param vendorId
177
     */
178
    public void scanForLostItem(List<InventoryItem> lostItems, long vendorId) throws WarehouseServiceException, org.apache.thrift.TException;
179
 
180
    /**
181
     * Get inventory count for available Serialized items in our warehouses using entries in ScanNew table
182
     */
183
    public List<InventoryAvailability> getCurrentSerializedInventoryByScans() throws org.apache.thrift.TException;
184
 
6630 amar.kumar 185
    /**
186
     * Get inventory count for available Serialized items in our warehouses using entries in ScanNew table
187
     */
188
    public List<InventoryAvailability> getCurrentNonSerializedInventoryByScans() throws org.apache.thrift.TException;
189
 
6762 amar.kumar 190
    /**
191
     * Get inventory for Serialized items in our warehouses at a given date using entries in ScanNew table
192
     * 
193
     * @param date
194
     */
195
    public List<InventoryAvailability> getHistoricSerializedInventoryByScans(long date) throws org.apache.thrift.TException;
196
 
197
    /**
198
     * Get inventory for Non Serialized items in our warehouses at a given date using entries in ScanNew table
199
     * 
200
     * @param date
201
     */
202
    public List<InventoryAvailability> getHistoricNonSerializedInventoryByScans(long date) throws org.apache.thrift.TException;
203
 
204
    /**
6880 amar.kumar 205
     * Insert Purchase/Sale Entries for product billed by Hotspot using OURS_EXTERNAL Billing
6762 amar.kumar 206
     * 
207
     * @param itemId
208
     * @param serialNumber
209
     * @param itemNumber
210
     * @param invoiceNumber
211
     * @param warehouseId
212
     * @param unitPrice
213
     * @param orderId
214
     */
215
    public InventoryItem scanForOursExternalSale(long itemId, String serialNumber, String itemNumber, String invoiceNumber, long warehouseId, double unitPrice, long orderId) throws WarehouseServiceException, org.apache.thrift.TException;
216
 
217
    /**
6880 amar.kumar 218
     * Insert Purchase_Ret/Sale_Ret Entries for product billed by Hotspot using OURS_EXTERNAL Billing
6762 amar.kumar 219
     * 
220
     * @param orderId
221
     * @param unitPrice
222
     */
223
    public void scanForOursExternalSaleReturn(long orderId, double unitPrice) throws org.apache.thrift.TException;
224
 
6880 amar.kumar 225
    public List<InventoryMovement> getMovementNonSerializedInventoryByScans(long startDate, long endDate) throws org.apache.thrift.TException;
226
 
227
    public List<InventoryMovement> getMovementSerializedInventoryByScans(long startDate, long endDate) throws org.apache.thrift.TException;
228
 
7190 amar.kumar 229
    public InventoryItem scanfreebie(long orderId, long freebieItemId, long freebieWarehouseId, ScanType scanType) throws WarehouseServiceException, org.apache.thrift.TException;
230
 
7199 amar.kumar 231
    public void reshipfreebie(long oldOrderId, long newOrderId, long freebieItemId, ScanType scanType) throws WarehouseServiceException, org.apache.thrift.TException;
232
 
2820 chandransh 233
  }
234
 
3430 rajveer 235
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
236
 
4496 mandeep.dh 237
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 238
 
5530 mandeep.dh 239
    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 240
 
5361 mandeep.dh 241
    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 242
 
5110 mandeep.dh 243
    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 244
 
5361 mandeep.dh 245
    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 246
 
247
    public void createItemNumberMapping(String itemNumber, long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createItemNumberMapping_call> resultHandler) throws org.apache.thrift.TException;
248
 
4622 amit.gupta 249
    public void getItemNumbers(long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemNumbers_call> resultHandler) throws org.apache.thrift.TException;
250
 
5110 mandeep.dh 251
    public void getItemIds(String itemNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemIds_call> resultHandler) throws org.apache.thrift.TException;
252
 
5185 mandeep.dh 253
    public void getInventoryItemsFromLastScanType(ScanType lastScanType, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemsFromLastScanType_call> resultHandler) throws org.apache.thrift.TException;
254
 
255
    public void getInventoryItemFromId(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemFromId_call> resultHandler) throws org.apache.thrift.TException;
256
 
5372 mandeep.dh 257
    public void getPurchaseScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseScans_call> resultHandler) throws org.apache.thrift.TException;
258
 
7210 amar.kumar 259
    public void getPurchaseScansByGrnDate(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseScansByGrnDate_call> resultHandler) throws org.apache.thrift.TException;
260
 
5496 mandeep.dh 261
    public void fetchScansPerInvoiceNumber(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fetchScansPerInvoiceNumber_call> resultHandler) throws org.apache.thrift.TException;
262
 
5620 mandeep.dh 263
    public void getInventoryItemFromOrder(long orderId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemFromOrder_call> resultHandler) throws org.apache.thrift.TException;
264
 
5711 mandeep.dh 265
    public void getInventoryAge(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryAge_call> resultHandler) throws org.apache.thrift.TException;
266
 
6322 amar.kumar 267
    public void getInventoryScansForItem(long itemId, long fromDate, long toDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryScansForItem_call> resultHandler) throws org.apache.thrift.TException;
268
 
269
    public void getScanRecordsForSerialNumber(long serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getScanRecordsForSerialNumber_call> resultHandler) throws org.apache.thrift.TException;
270
 
6467 amar.kumar 271
    public void scanForPurchaseReturn(List<InventoryItem> saleReturnItems, long vendorId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanForPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
272
 
6548 amar.kumar 273
    public void scanForLostItem(List<InventoryItem> lostItems, long vendorId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanForLostItem_call> resultHandler) throws org.apache.thrift.TException;
274
 
275
    public void getCurrentSerializedInventoryByScans(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCurrentSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException;
276
 
6630 amar.kumar 277
    public void getCurrentNonSerializedInventoryByScans(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCurrentNonSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException;
278
 
6762 amar.kumar 279
    public void getHistoricSerializedInventoryByScans(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getHistoricSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException;
280
 
281
    public void getHistoricNonSerializedInventoryByScans(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getHistoricNonSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException;
282
 
283
    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;
284
 
285
    public void scanForOursExternalSaleReturn(long orderId, double unitPrice, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanForOursExternalSaleReturn_call> resultHandler) throws org.apache.thrift.TException;
286
 
6880 amar.kumar 287
    public void getMovementNonSerializedInventoryByScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getMovementNonSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException;
288
 
289
    public void getMovementSerializedInventoryByScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getMovementSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException;
290
 
7190 amar.kumar 291
    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;
292
 
7199 amar.kumar 293
    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;
294
 
3430 rajveer 295
  }
296
 
3374 rajveer 297
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
3430 rajveer 298
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
299
      public Factory() {}
300
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
301
        return new Client(prot);
302
      }
303
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
304
        return new Client(iprot, oprot);
305
      }
306
    }
307
 
308
    public Client(org.apache.thrift.protocol.TProtocol prot)
2820 chandransh 309
    {
3430 rajveer 310
      super(prot, prot);
2820 chandransh 311
    }
312
 
3430 rajveer 313
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
3374 rajveer 314
      super(iprot, oprot);
2820 chandransh 315
    }
316
 
4541 mandeep.dh 317
    public InventoryItem getInventoryItem(String serialNumber) throws WarehouseServiceException, org.apache.thrift.TException
2832 chandransh 318
    {
4496 mandeep.dh 319
      send_getInventoryItem(serialNumber);
320
      return recv_getInventoryItem();
2832 chandransh 321
    }
322
 
4496 mandeep.dh 323
    public void send_getInventoryItem(String serialNumber) throws org.apache.thrift.TException
2832 chandransh 324
    {
4496 mandeep.dh 325
      getInventoryItem_args args = new getInventoryItem_args();
326
      args.setSerialNumber(serialNumber);
327
      sendBase("getInventoryItem", args);
2832 chandransh 328
    }
329
 
4541 mandeep.dh 330
    public InventoryItem recv_getInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException
2832 chandransh 331
    {
4496 mandeep.dh 332
      getInventoryItem_result result = new getInventoryItem_result();
333
      receiveBase(result, "getInventoryItem");
2832 chandransh 334
      if (result.isSetSuccess()) {
335
        return result.success;
336
      }
4541 mandeep.dh 337
      if (result.wex != null) {
338
        throw result.wex;
339
      }
4496 mandeep.dh 340
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItem failed: unknown result");
341
    }
342
 
5530 mandeep.dh 343
    public InventoryItem getNonSeralizedInventoryItem(String itemNumber, long itemId, long fulfilmentWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 344
    {
5530 mandeep.dh 345
      send_getNonSeralizedInventoryItem(itemNumber, itemId, fulfilmentWarehouseId);
5361 mandeep.dh 346
      return recv_getNonSeralizedInventoryItem();
4496 mandeep.dh 347
    }
348
 
5530 mandeep.dh 349
    public void send_getNonSeralizedInventoryItem(String itemNumber, long itemId, long fulfilmentWarehouseId) throws org.apache.thrift.TException
4496 mandeep.dh 350
    {
5361 mandeep.dh 351
      getNonSeralizedInventoryItem_args args = new getNonSeralizedInventoryItem_args();
5530 mandeep.dh 352
      args.setItemNumber(itemNumber);
4496 mandeep.dh 353
      args.setItemId(itemId);
5530 mandeep.dh 354
      args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
5361 mandeep.dh 355
      sendBase("getNonSeralizedInventoryItem", args);
4496 mandeep.dh 356
    }
357
 
5361 mandeep.dh 358
    public InventoryItem recv_getNonSeralizedInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 359
    {
5361 mandeep.dh 360
      getNonSeralizedInventoryItem_result result = new getNonSeralizedInventoryItem_result();
361
      receiveBase(result, "getNonSeralizedInventoryItem");
4496 mandeep.dh 362
      if (result.isSetSuccess()) {
363
        return result.success;
2832 chandransh 364
      }
5361 mandeep.dh 365
      if (result.wex != null) {
366
        throw result.wex;
2820 chandransh 367
      }
5361 mandeep.dh 368
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getNonSeralizedInventoryItem failed: unknown result");
4496 mandeep.dh 369
    }
370
 
5361 mandeep.dh 371
    public void scan(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 372
    {
5361 mandeep.dh 373
      send_scan(inventoryItem, type, quantity, billingWarehouseId);
4496 mandeep.dh 374
      recv_scan();
3383 chandransh 375
    }
376
 
5361 mandeep.dh 377
    public void send_scan(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId) throws org.apache.thrift.TException
3383 chandransh 378
    {
4496 mandeep.dh 379
      scan_args args = new scan_args();
5361 mandeep.dh 380
      args.setInventoryItem(inventoryItem);
4496 mandeep.dh 381
      args.setType(type);
382
      args.setQuantity(quantity);
5361 mandeep.dh 383
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 384
      sendBase("scan", args);
3383 chandransh 385
    }
386
 
4496 mandeep.dh 387
    public void recv_scan() throws WarehouseServiceException, org.apache.thrift.TException
3383 chandransh 388
    {
4496 mandeep.dh 389
      scan_result result = new scan_result();
390
      receiveBase(result, "scan");
391
      if (result.wex != null) {
392
        throw result.wex;
393
      }
394
      return;
395
    }
396
 
5110 mandeep.dh 397
    public InventoryItem scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 398
    {
5110 mandeep.dh 399
      send_scanSerializedItemForOrder(serialNumber, type, orderId, fulfilmentWarehouseId, quantity, billingWarehouseId);
4496 mandeep.dh 400
      return recv_scanSerializedItemForOrder();
401
    }
402
 
5110 mandeep.dh 403
    public void send_scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId) throws org.apache.thrift.TException
4496 mandeep.dh 404
    {
405
      scanSerializedItemForOrder_args args = new scanSerializedItemForOrder_args();
4555 mandeep.dh 406
      args.setSerialNumber(serialNumber);
4496 mandeep.dh 407
      args.setType(type);
408
      args.setOrderId(orderId);
5110 mandeep.dh 409
      args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
410
      args.setQuantity(quantity);
411
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 412
      sendBase("scanSerializedItemForOrder", args);
413
    }
414
 
4555 mandeep.dh 415
    public InventoryItem recv_scanSerializedItemForOrder() throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 416
    {
417
      scanSerializedItemForOrder_result result = new scanSerializedItemForOrder_result();
418
      receiveBase(result, "scanSerializedItemForOrder");
3383 chandransh 419
      if (result.isSetSuccess()) {
420
        return result.success;
421
      }
422
      if (result.wex != null) {
423
        throw result.wex;
424
      }
4496 mandeep.dh 425
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scanSerializedItemForOrder failed: unknown result");
3383 chandransh 426
    }
427
 
5361 mandeep.dh 428
    public InventoryItem scanForOrder(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
3383 chandransh 429
    {
5361 mandeep.dh 430
      send_scanForOrder(inventoryItem, type, quantity, orderId, fulfilmentWarehouseId, billingWarehouseId);
431
      return recv_scanForOrder();
2820 chandransh 432
    }
433
 
5361 mandeep.dh 434
    public void send_scanForOrder(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId) throws org.apache.thrift.TException
2820 chandransh 435
    {
4496 mandeep.dh 436
      scanForOrder_args args = new scanForOrder_args();
5361 mandeep.dh 437
      args.setInventoryItem(inventoryItem);
3430 rajveer 438
      args.setType(type);
4496 mandeep.dh 439
      args.setQuantity(quantity);
440
      args.setOrderId(orderId);
5110 mandeep.dh 441
      args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
5361 mandeep.dh 442
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 443
      sendBase("scanForOrder", args);
2820 chandransh 444
    }
445
 
5361 mandeep.dh 446
    public InventoryItem recv_scanForOrder() throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 447
    {
4496 mandeep.dh 448
      scanForOrder_result result = new scanForOrder_result();
449
      receiveBase(result, "scanForOrder");
5361 mandeep.dh 450
      if (result.isSetSuccess()) {
451
        return result.success;
452
      }
2820 chandransh 453
      if (result.wex != null) {
454
        throw result.wex;
455
      }
5361 mandeep.dh 456
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scanForOrder failed: unknown result");
2820 chandransh 457
    }
458
 
4496 mandeep.dh 459
    public void createItemNumberMapping(String itemNumber, long itemId) throws org.apache.thrift.TException
2820 chandransh 460
    {
4496 mandeep.dh 461
      send_createItemNumberMapping(itemNumber, itemId);
462
      recv_createItemNumberMapping();
2820 chandransh 463
    }
464
 
4496 mandeep.dh 465
    public void send_createItemNumberMapping(String itemNumber, long itemId) throws org.apache.thrift.TException
2820 chandransh 466
    {
4496 mandeep.dh 467
      createItemNumberMapping_args args = new createItemNumberMapping_args();
3430 rajveer 468
      args.setItemNumber(itemNumber);
4496 mandeep.dh 469
      args.setItemId(itemId);
470
      sendBase("createItemNumberMapping", args);
2820 chandransh 471
    }
472
 
4496 mandeep.dh 473
    public void recv_createItemNumberMapping() throws org.apache.thrift.TException
2820 chandransh 474
    {
4496 mandeep.dh 475
      createItemNumberMapping_result result = new createItemNumberMapping_result();
476
      receiveBase(result, "createItemNumberMapping");
2820 chandransh 477
      return;
478
    }
479
 
4622 amit.gupta 480
    public List<String> getItemNumbers(long itemId) throws org.apache.thrift.TException
481
    {
482
      send_getItemNumbers(itemId);
483
      return recv_getItemNumbers();
484
    }
485
 
486
    public void send_getItemNumbers(long itemId) throws org.apache.thrift.TException
487
    {
488
      getItemNumbers_args args = new getItemNumbers_args();
489
      args.setItemId(itemId);
490
      sendBase("getItemNumbers", args);
491
    }
492
 
493
    public List<String> recv_getItemNumbers() throws org.apache.thrift.TException
494
    {
495
      getItemNumbers_result result = new getItemNumbers_result();
496
      receiveBase(result, "getItemNumbers");
497
      if (result.isSetSuccess()) {
498
        return result.success;
499
      }
500
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemNumbers failed: unknown result");
501
    }
502
 
5110 mandeep.dh 503
    public List<Long> getItemIds(String itemNumber) throws org.apache.thrift.TException
504
    {
505
      send_getItemIds(itemNumber);
506
      return recv_getItemIds();
507
    }
508
 
509
    public void send_getItemIds(String itemNumber) throws org.apache.thrift.TException
510
    {
511
      getItemIds_args args = new getItemIds_args();
512
      args.setItemNumber(itemNumber);
513
      sendBase("getItemIds", args);
514
    }
515
 
516
    public List<Long> recv_getItemIds() throws org.apache.thrift.TException
517
    {
518
      getItemIds_result result = new getItemIds_result();
519
      receiveBase(result, "getItemIds");
520
      if (result.isSetSuccess()) {
521
        return result.success;
522
      }
523
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemIds failed: unknown result");
524
    }
525
 
5185 mandeep.dh 526
    public List<InventoryItem> getInventoryItemsFromLastScanType(ScanType lastScanType) throws WarehouseServiceException, org.apache.thrift.TException
527
    {
528
      send_getInventoryItemsFromLastScanType(lastScanType);
529
      return recv_getInventoryItemsFromLastScanType();
530
    }
531
 
532
    public void send_getInventoryItemsFromLastScanType(ScanType lastScanType) throws org.apache.thrift.TException
533
    {
534
      getInventoryItemsFromLastScanType_args args = new getInventoryItemsFromLastScanType_args();
535
      args.setLastScanType(lastScanType);
536
      sendBase("getInventoryItemsFromLastScanType", args);
537
    }
538
 
539
    public List<InventoryItem> recv_getInventoryItemsFromLastScanType() throws WarehouseServiceException, org.apache.thrift.TException
540
    {
541
      getInventoryItemsFromLastScanType_result result = new getInventoryItemsFromLastScanType_result();
542
      receiveBase(result, "getInventoryItemsFromLastScanType");
543
      if (result.isSetSuccess()) {
544
        return result.success;
545
      }
546
      if (result.wex != null) {
547
        throw result.wex;
548
      }
549
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItemsFromLastScanType failed: unknown result");
550
    }
551
 
552
    public InventoryItem getInventoryItemFromId(long inventoryItemId) throws WarehouseServiceException, org.apache.thrift.TException
553
    {
554
      send_getInventoryItemFromId(inventoryItemId);
555
      return recv_getInventoryItemFromId();
556
    }
557
 
558
    public void send_getInventoryItemFromId(long inventoryItemId) throws org.apache.thrift.TException
559
    {
560
      getInventoryItemFromId_args args = new getInventoryItemFromId_args();
561
      args.setInventoryItemId(inventoryItemId);
562
      sendBase("getInventoryItemFromId", args);
563
    }
564
 
565
    public InventoryItem recv_getInventoryItemFromId() throws WarehouseServiceException, org.apache.thrift.TException
566
    {
567
      getInventoryItemFromId_result result = new getInventoryItemFromId_result();
568
      receiveBase(result, "getInventoryItemFromId");
569
      if (result.isSetSuccess()) {
570
        return result.success;
571
      }
572
      if (result.wex != null) {
573
        throw result.wex;
574
      }
575
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItemFromId failed: unknown result");
576
    }
577
 
5372 mandeep.dh 578
    public List<DetailedPurchaseScan> getPurchaseScans(long startDate, long endDate) throws org.apache.thrift.TException
579
    {
580
      send_getPurchaseScans(startDate, endDate);
581
      return recv_getPurchaseScans();
582
    }
583
 
584
    public void send_getPurchaseScans(long startDate, long endDate) throws org.apache.thrift.TException
585
    {
586
      getPurchaseScans_args args = new getPurchaseScans_args();
587
      args.setStartDate(startDate);
588
      args.setEndDate(endDate);
589
      sendBase("getPurchaseScans", args);
590
    }
591
 
592
    public List<DetailedPurchaseScan> recv_getPurchaseScans() throws org.apache.thrift.TException
593
    {
594
      getPurchaseScans_result result = new getPurchaseScans_result();
595
      receiveBase(result, "getPurchaseScans");
596
      if (result.isSetSuccess()) {
597
        return result.success;
598
      }
599
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseScans failed: unknown result");
600
    }
601
 
7210 amar.kumar 602
    public List<DetailedPurchaseScan> getPurchaseScansByGrnDate(long startDate, long endDate) throws org.apache.thrift.TException
603
    {
604
      send_getPurchaseScansByGrnDate(startDate, endDate);
605
      return recv_getPurchaseScansByGrnDate();
606
    }
607
 
608
    public void send_getPurchaseScansByGrnDate(long startDate, long endDate) throws org.apache.thrift.TException
609
    {
610
      getPurchaseScansByGrnDate_args args = new getPurchaseScansByGrnDate_args();
611
      args.setStartDate(startDate);
612
      args.setEndDate(endDate);
613
      sendBase("getPurchaseScansByGrnDate", args);
614
    }
615
 
616
    public List<DetailedPurchaseScan> recv_getPurchaseScansByGrnDate() throws org.apache.thrift.TException
617
    {
618
      getPurchaseScansByGrnDate_result result = new getPurchaseScansByGrnDate_result();
619
      receiveBase(result, "getPurchaseScansByGrnDate");
620
      if (result.isSetSuccess()) {
621
        return result.success;
622
      }
623
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseScansByGrnDate failed: unknown result");
624
    }
625
 
5496 mandeep.dh 626
    public List<InvoiceScan> fetchScansPerInvoiceNumber(long date) throws org.apache.thrift.TException
627
    {
628
      send_fetchScansPerInvoiceNumber(date);
629
      return recv_fetchScansPerInvoiceNumber();
630
    }
631
 
632
    public void send_fetchScansPerInvoiceNumber(long date) throws org.apache.thrift.TException
633
    {
634
      fetchScansPerInvoiceNumber_args args = new fetchScansPerInvoiceNumber_args();
635
      args.setDate(date);
636
      sendBase("fetchScansPerInvoiceNumber", args);
637
    }
638
 
639
    public List<InvoiceScan> recv_fetchScansPerInvoiceNumber() throws org.apache.thrift.TException
640
    {
641
      fetchScansPerInvoiceNumber_result result = new fetchScansPerInvoiceNumber_result();
642
      receiveBase(result, "fetchScansPerInvoiceNumber");
643
      if (result.isSetSuccess()) {
644
        return result.success;
645
      }
646
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "fetchScansPerInvoiceNumber failed: unknown result");
647
    }
648
 
5620 mandeep.dh 649
    public InventoryItem getInventoryItemFromOrder(long orderId) throws WarehouseServiceException, org.apache.thrift.TException
650
    {
651
      send_getInventoryItemFromOrder(orderId);
652
      return recv_getInventoryItemFromOrder();
653
    }
654
 
655
    public void send_getInventoryItemFromOrder(long orderId) throws org.apache.thrift.TException
656
    {
657
      getInventoryItemFromOrder_args args = new getInventoryItemFromOrder_args();
658
      args.setOrderId(orderId);
659
      sendBase("getInventoryItemFromOrder", args);
660
    }
661
 
662
    public InventoryItem recv_getInventoryItemFromOrder() throws WarehouseServiceException, org.apache.thrift.TException
663
    {
664
      getInventoryItemFromOrder_result result = new getInventoryItemFromOrder_result();
665
      receiveBase(result, "getInventoryItemFromOrder");
666
      if (result.isSetSuccess()) {
667
        return result.success;
668
      }
669
      if (result.we != null) {
670
        throw result.we;
671
      }
672
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItemFromOrder failed: unknown result");
673
    }
674
 
5711 mandeep.dh 675
    public List<InventoryAge> getInventoryAge() throws org.apache.thrift.TException
676
    {
677
      send_getInventoryAge();
678
      return recv_getInventoryAge();
679
    }
680
 
681
    public void send_getInventoryAge() throws org.apache.thrift.TException
682
    {
683
      getInventoryAge_args args = new getInventoryAge_args();
684
      sendBase("getInventoryAge", args);
685
    }
686
 
687
    public List<InventoryAge> recv_getInventoryAge() throws org.apache.thrift.TException
688
    {
689
      getInventoryAge_result result = new getInventoryAge_result();
690
      receiveBase(result, "getInventoryAge");
691
      if (result.isSetSuccess()) {
692
        return result.success;
693
      }
694
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryAge failed: unknown result");
695
    }
696
 
6322 amar.kumar 697
    public List<Scan> getInventoryScansForItem(long itemId, long fromDate, long toDate) throws org.apache.thrift.TException
698
    {
699
      send_getInventoryScansForItem(itemId, fromDate, toDate);
700
      return recv_getInventoryScansForItem();
701
    }
702
 
703
    public void send_getInventoryScansForItem(long itemId, long fromDate, long toDate) throws org.apache.thrift.TException
704
    {
705
      getInventoryScansForItem_args args = new getInventoryScansForItem_args();
706
      args.setItemId(itemId);
707
      args.setFromDate(fromDate);
708
      args.setToDate(toDate);
709
      sendBase("getInventoryScansForItem", args);
710
    }
711
 
712
    public List<Scan> recv_getInventoryScansForItem() throws org.apache.thrift.TException
713
    {
714
      getInventoryScansForItem_result result = new getInventoryScansForItem_result();
715
      receiveBase(result, "getInventoryScansForItem");
716
      if (result.isSetSuccess()) {
717
        return result.success;
718
      }
719
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryScansForItem failed: unknown result");
720
    }
721
 
722
    public List<Scan> getScanRecordsForSerialNumber(long serialNumber) throws org.apache.thrift.TException
723
    {
724
      send_getScanRecordsForSerialNumber(serialNumber);
725
      return recv_getScanRecordsForSerialNumber();
726
    }
727
 
728
    public void send_getScanRecordsForSerialNumber(long serialNumber) throws org.apache.thrift.TException
729
    {
730
      getScanRecordsForSerialNumber_args args = new getScanRecordsForSerialNumber_args();
731
      args.setSerialNumber(serialNumber);
732
      sendBase("getScanRecordsForSerialNumber", args);
733
    }
734
 
735
    public List<Scan> recv_getScanRecordsForSerialNumber() throws org.apache.thrift.TException
736
    {
737
      getScanRecordsForSerialNumber_result result = new getScanRecordsForSerialNumber_result();
738
      receiveBase(result, "getScanRecordsForSerialNumber");
739
      if (result.isSetSuccess()) {
740
        return result.success;
741
      }
742
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getScanRecordsForSerialNumber failed: unknown result");
743
    }
744
 
6467 amar.kumar 745
    public void scanForPurchaseReturn(List<InventoryItem> saleReturnItems, long vendorId) throws WarehouseServiceException, org.apache.thrift.TException
746
    {
747
      send_scanForPurchaseReturn(saleReturnItems, vendorId);
748
      recv_scanForPurchaseReturn();
749
    }
750
 
751
    public void send_scanForPurchaseReturn(List<InventoryItem> saleReturnItems, long vendorId) throws org.apache.thrift.TException
752
    {
753
      scanForPurchaseReturn_args args = new scanForPurchaseReturn_args();
754
      args.setSaleReturnItems(saleReturnItems);
755
      args.setVendorId(vendorId);
756
      sendBase("scanForPurchaseReturn", args);
757
    }
758
 
759
    public void recv_scanForPurchaseReturn() throws WarehouseServiceException, org.apache.thrift.TException
760
    {
761
      scanForPurchaseReturn_result result = new scanForPurchaseReturn_result();
762
      receiveBase(result, "scanForPurchaseReturn");
763
      if (result.ex != null) {
764
        throw result.ex;
765
      }
766
      return;
767
    }
768
 
6548 amar.kumar 769
    public void scanForLostItem(List<InventoryItem> lostItems, long vendorId) throws WarehouseServiceException, org.apache.thrift.TException
770
    {
771
      send_scanForLostItem(lostItems, vendorId);
772
      recv_scanForLostItem();
773
    }
774
 
775
    public void send_scanForLostItem(List<InventoryItem> lostItems, long vendorId) throws org.apache.thrift.TException
776
    {
777
      scanForLostItem_args args = new scanForLostItem_args();
778
      args.setLostItems(lostItems);
779
      args.setVendorId(vendorId);
780
      sendBase("scanForLostItem", args);
781
    }
782
 
783
    public void recv_scanForLostItem() throws WarehouseServiceException, org.apache.thrift.TException
784
    {
785
      scanForLostItem_result result = new scanForLostItem_result();
786
      receiveBase(result, "scanForLostItem");
787
      if (result.ex != null) {
788
        throw result.ex;
789
      }
790
      return;
791
    }
792
 
793
    public List<InventoryAvailability> getCurrentSerializedInventoryByScans() throws org.apache.thrift.TException
794
    {
795
      send_getCurrentSerializedInventoryByScans();
796
      return recv_getCurrentSerializedInventoryByScans();
797
    }
798
 
799
    public void send_getCurrentSerializedInventoryByScans() throws org.apache.thrift.TException
800
    {
801
      getCurrentSerializedInventoryByScans_args args = new getCurrentSerializedInventoryByScans_args();
802
      sendBase("getCurrentSerializedInventoryByScans", args);
803
    }
804
 
805
    public List<InventoryAvailability> recv_getCurrentSerializedInventoryByScans() throws org.apache.thrift.TException
806
    {
807
      getCurrentSerializedInventoryByScans_result result = new getCurrentSerializedInventoryByScans_result();
808
      receiveBase(result, "getCurrentSerializedInventoryByScans");
809
      if (result.isSetSuccess()) {
810
        return result.success;
811
      }
812
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCurrentSerializedInventoryByScans failed: unknown result");
813
    }
814
 
6630 amar.kumar 815
    public List<InventoryAvailability> getCurrentNonSerializedInventoryByScans() throws org.apache.thrift.TException
816
    {
817
      send_getCurrentNonSerializedInventoryByScans();
818
      return recv_getCurrentNonSerializedInventoryByScans();
819
    }
820
 
821
    public void send_getCurrentNonSerializedInventoryByScans() throws org.apache.thrift.TException
822
    {
823
      getCurrentNonSerializedInventoryByScans_args args = new getCurrentNonSerializedInventoryByScans_args();
824
      sendBase("getCurrentNonSerializedInventoryByScans", args);
825
    }
826
 
827
    public List<InventoryAvailability> recv_getCurrentNonSerializedInventoryByScans() throws org.apache.thrift.TException
828
    {
829
      getCurrentNonSerializedInventoryByScans_result result = new getCurrentNonSerializedInventoryByScans_result();
830
      receiveBase(result, "getCurrentNonSerializedInventoryByScans");
831
      if (result.isSetSuccess()) {
832
        return result.success;
833
      }
834
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCurrentNonSerializedInventoryByScans failed: unknown result");
835
    }
836
 
6762 amar.kumar 837
    public List<InventoryAvailability> getHistoricSerializedInventoryByScans(long date) throws org.apache.thrift.TException
838
    {
839
      send_getHistoricSerializedInventoryByScans(date);
840
      return recv_getHistoricSerializedInventoryByScans();
841
    }
842
 
843
    public void send_getHistoricSerializedInventoryByScans(long date) throws org.apache.thrift.TException
844
    {
845
      getHistoricSerializedInventoryByScans_args args = new getHistoricSerializedInventoryByScans_args();
846
      args.setDate(date);
847
      sendBase("getHistoricSerializedInventoryByScans", args);
848
    }
849
 
850
    public List<InventoryAvailability> recv_getHistoricSerializedInventoryByScans() throws org.apache.thrift.TException
851
    {
852
      getHistoricSerializedInventoryByScans_result result = new getHistoricSerializedInventoryByScans_result();
853
      receiveBase(result, "getHistoricSerializedInventoryByScans");
854
      if (result.isSetSuccess()) {
855
        return result.success;
856
      }
857
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getHistoricSerializedInventoryByScans failed: unknown result");
858
    }
859
 
860
    public List<InventoryAvailability> getHistoricNonSerializedInventoryByScans(long date) throws org.apache.thrift.TException
861
    {
862
      send_getHistoricNonSerializedInventoryByScans(date);
863
      return recv_getHistoricNonSerializedInventoryByScans();
864
    }
865
 
866
    public void send_getHistoricNonSerializedInventoryByScans(long date) throws org.apache.thrift.TException
867
    {
868
      getHistoricNonSerializedInventoryByScans_args args = new getHistoricNonSerializedInventoryByScans_args();
869
      args.setDate(date);
870
      sendBase("getHistoricNonSerializedInventoryByScans", args);
871
    }
872
 
873
    public List<InventoryAvailability> recv_getHistoricNonSerializedInventoryByScans() throws org.apache.thrift.TException
874
    {
875
      getHistoricNonSerializedInventoryByScans_result result = new getHistoricNonSerializedInventoryByScans_result();
876
      receiveBase(result, "getHistoricNonSerializedInventoryByScans");
877
      if (result.isSetSuccess()) {
878
        return result.success;
879
      }
880
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getHistoricNonSerializedInventoryByScans failed: unknown result");
881
    }
882
 
883
    public InventoryItem scanForOursExternalSale(long itemId, String serialNumber, String itemNumber, String invoiceNumber, long warehouseId, double unitPrice, long orderId) throws WarehouseServiceException, org.apache.thrift.TException
884
    {
885
      send_scanForOursExternalSale(itemId, serialNumber, itemNumber, invoiceNumber, warehouseId, unitPrice, orderId);
886
      return recv_scanForOursExternalSale();
887
    }
888
 
889
    public void send_scanForOursExternalSale(long itemId, String serialNumber, String itemNumber, String invoiceNumber, long warehouseId, double unitPrice, long orderId) throws org.apache.thrift.TException
890
    {
891
      scanForOursExternalSale_args args = new scanForOursExternalSale_args();
892
      args.setItemId(itemId);
893
      args.setSerialNumber(serialNumber);
894
      args.setItemNumber(itemNumber);
895
      args.setInvoiceNumber(invoiceNumber);
896
      args.setWarehouseId(warehouseId);
897
      args.setUnitPrice(unitPrice);
898
      args.setOrderId(orderId);
899
      sendBase("scanForOursExternalSale", args);
900
    }
901
 
902
    public InventoryItem recv_scanForOursExternalSale() throws WarehouseServiceException, org.apache.thrift.TException
903
    {
904
      scanForOursExternalSale_result result = new scanForOursExternalSale_result();
905
      receiveBase(result, "scanForOursExternalSale");
906
      if (result.isSetSuccess()) {
907
        return result.success;
908
      }
909
      if (result.ex != null) {
910
        throw result.ex;
911
      }
912
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scanForOursExternalSale failed: unknown result");
913
    }
914
 
915
    public void scanForOursExternalSaleReturn(long orderId, double unitPrice) throws org.apache.thrift.TException
916
    {
917
      send_scanForOursExternalSaleReturn(orderId, unitPrice);
918
      recv_scanForOursExternalSaleReturn();
919
    }
920
 
921
    public void send_scanForOursExternalSaleReturn(long orderId, double unitPrice) throws org.apache.thrift.TException
922
    {
923
      scanForOursExternalSaleReturn_args args = new scanForOursExternalSaleReturn_args();
924
      args.setOrderId(orderId);
925
      args.setUnitPrice(unitPrice);
926
      sendBase("scanForOursExternalSaleReturn", args);
927
    }
928
 
929
    public void recv_scanForOursExternalSaleReturn() throws org.apache.thrift.TException
930
    {
931
      scanForOursExternalSaleReturn_result result = new scanForOursExternalSaleReturn_result();
932
      receiveBase(result, "scanForOursExternalSaleReturn");
933
      return;
934
    }
935
 
6880 amar.kumar 936
    public List<InventoryMovement> getMovementNonSerializedInventoryByScans(long startDate, long endDate) throws org.apache.thrift.TException
937
    {
938
      send_getMovementNonSerializedInventoryByScans(startDate, endDate);
939
      return recv_getMovementNonSerializedInventoryByScans();
940
    }
941
 
942
    public void send_getMovementNonSerializedInventoryByScans(long startDate, long endDate) throws org.apache.thrift.TException
943
    {
944
      getMovementNonSerializedInventoryByScans_args args = new getMovementNonSerializedInventoryByScans_args();
945
      args.setStartDate(startDate);
946
      args.setEndDate(endDate);
947
      sendBase("getMovementNonSerializedInventoryByScans", args);
948
    }
949
 
950
    public List<InventoryMovement> recv_getMovementNonSerializedInventoryByScans() throws org.apache.thrift.TException
951
    {
952
      getMovementNonSerializedInventoryByScans_result result = new getMovementNonSerializedInventoryByScans_result();
953
      receiveBase(result, "getMovementNonSerializedInventoryByScans");
954
      if (result.isSetSuccess()) {
955
        return result.success;
956
      }
957
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getMovementNonSerializedInventoryByScans failed: unknown result");
958
    }
959
 
960
    public List<InventoryMovement> getMovementSerializedInventoryByScans(long startDate, long endDate) throws org.apache.thrift.TException
961
    {
962
      send_getMovementSerializedInventoryByScans(startDate, endDate);
963
      return recv_getMovementSerializedInventoryByScans();
964
    }
965
 
966
    public void send_getMovementSerializedInventoryByScans(long startDate, long endDate) throws org.apache.thrift.TException
967
    {
968
      getMovementSerializedInventoryByScans_args args = new getMovementSerializedInventoryByScans_args();
969
      args.setStartDate(startDate);
970
      args.setEndDate(endDate);
971
      sendBase("getMovementSerializedInventoryByScans", args);
972
    }
973
 
974
    public List<InventoryMovement> recv_getMovementSerializedInventoryByScans() throws org.apache.thrift.TException
975
    {
976
      getMovementSerializedInventoryByScans_result result = new getMovementSerializedInventoryByScans_result();
977
      receiveBase(result, "getMovementSerializedInventoryByScans");
978
      if (result.isSetSuccess()) {
979
        return result.success;
980
      }
981
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getMovementSerializedInventoryByScans failed: unknown result");
982
    }
983
 
7190 amar.kumar 984
    public InventoryItem scanfreebie(long orderId, long freebieItemId, long freebieWarehouseId, ScanType scanType) throws WarehouseServiceException, org.apache.thrift.TException
985
    {
986
      send_scanfreebie(orderId, freebieItemId, freebieWarehouseId, scanType);
987
      return recv_scanfreebie();
988
    }
989
 
990
    public void send_scanfreebie(long orderId, long freebieItemId, long freebieWarehouseId, ScanType scanType) throws org.apache.thrift.TException
991
    {
992
      scanfreebie_args args = new scanfreebie_args();
993
      args.setOrderId(orderId);
994
      args.setFreebieItemId(freebieItemId);
995
      args.setFreebieWarehouseId(freebieWarehouseId);
996
      args.setScanType(scanType);
997
      sendBase("scanfreebie", args);
998
    }
999
 
1000
    public InventoryItem recv_scanfreebie() throws WarehouseServiceException, org.apache.thrift.TException
1001
    {
1002
      scanfreebie_result result = new scanfreebie_result();
1003
      receiveBase(result, "scanfreebie");
1004
      if (result.isSetSuccess()) {
1005
        return result.success;
1006
      }
1007
      if (result.wex != null) {
1008
        throw result.wex;
1009
      }
1010
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scanfreebie failed: unknown result");
1011
    }
1012
 
7199 amar.kumar 1013
    public void reshipfreebie(long oldOrderId, long newOrderId, long freebieItemId, ScanType scanType) throws WarehouseServiceException, org.apache.thrift.TException
1014
    {
1015
      send_reshipfreebie(oldOrderId, newOrderId, freebieItemId, scanType);
1016
      recv_reshipfreebie();
1017
    }
1018
 
1019
    public void send_reshipfreebie(long oldOrderId, long newOrderId, long freebieItemId, ScanType scanType) throws org.apache.thrift.TException
1020
    {
1021
      reshipfreebie_args args = new reshipfreebie_args();
1022
      args.setOldOrderId(oldOrderId);
1023
      args.setNewOrderId(newOrderId);
1024
      args.setFreebieItemId(freebieItemId);
1025
      args.setScanType(scanType);
1026
      sendBase("reshipfreebie", args);
1027
    }
1028
 
1029
    public void recv_reshipfreebie() throws WarehouseServiceException, org.apache.thrift.TException
1030
    {
1031
      reshipfreebie_result result = new reshipfreebie_result();
1032
      receiveBase(result, "reshipfreebie");
1033
      if (result.wex != null) {
1034
        throw result.wex;
1035
      }
1036
      return;
1037
    }
1038
 
2820 chandransh 1039
  }
3430 rajveer 1040
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
1041
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
1042
      private org.apache.thrift.async.TAsyncClientManager clientManager;
1043
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
1044
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
1045
        this.clientManager = clientManager;
1046
        this.protocolFactory = protocolFactory;
1047
      }
1048
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
1049
        return new AsyncClient(protocolFactory, clientManager, transport);
1050
      }
2820 chandransh 1051
    }
1052
 
3430 rajveer 1053
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
1054
      super(protocolFactory, clientManager, transport);
1055
    }
2820 chandransh 1056
 
4496 mandeep.dh 1057
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<getInventoryItem_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 1058
      checkReady();
4496 mandeep.dh 1059
      getInventoryItem_call method_call = new getInventoryItem_call(serialNumber, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 1060
      this.___currentMethod = method_call;
1061
      ___manager.call(method_call);
1062
    }
1063
 
4496 mandeep.dh 1064
    public static class getInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {
1065
      private String serialNumber;
1066
      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 1067
        super(client, protocolFactory, transport, resultHandler, false);
4496 mandeep.dh 1068
        this.serialNumber = serialNumber;
3430 rajveer 1069
      }
1070
 
1071
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 1072
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
1073
        getInventoryItem_args args = new getInventoryItem_args();
1074
        args.setSerialNumber(serialNumber);
3430 rajveer 1075
        args.write(prot);
1076
        prot.writeMessageEnd();
1077
      }
1078
 
4541 mandeep.dh 1079
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
3430 rajveer 1080
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1081
          throw new IllegalStateException("Method call not finished!");
1082
        }
1083
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1084
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 1085
        return (new Client(prot)).recv_getInventoryItem();
3430 rajveer 1086
      }
1087
    }
1088
 
5530 mandeep.dh 1089
    public void getNonSeralizedInventoryItem(String itemNumber, long itemId, long fulfilmentWarehouseId, org.apache.thrift.async.AsyncMethodCallback<getNonSeralizedInventoryItem_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 1090
      checkReady();
5530 mandeep.dh 1091
      getNonSeralizedInventoryItem_call method_call = new getNonSeralizedInventoryItem_call(itemNumber, itemId, fulfilmentWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 1092
      this.___currentMethod = method_call;
1093
      ___manager.call(method_call);
1094
    }
1095
 
5361 mandeep.dh 1096
    public static class getNonSeralizedInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {
5530 mandeep.dh 1097
      private String itemNumber;
4496 mandeep.dh 1098
      private long itemId;
5530 mandeep.dh 1099
      private long fulfilmentWarehouseId;
1100
      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 1101
        super(client, protocolFactory, transport, resultHandler, false);
5530 mandeep.dh 1102
        this.itemNumber = itemNumber;
4496 mandeep.dh 1103
        this.itemId = itemId;
5530 mandeep.dh 1104
        this.fulfilmentWarehouseId = fulfilmentWarehouseId;
3430 rajveer 1105
      }
1106
 
1107
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
5361 mandeep.dh 1108
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getNonSeralizedInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
1109
        getNonSeralizedInventoryItem_args args = new getNonSeralizedInventoryItem_args();
5530 mandeep.dh 1110
        args.setItemNumber(itemNumber);
4496 mandeep.dh 1111
        args.setItemId(itemId);
5530 mandeep.dh 1112
        args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
3430 rajveer 1113
        args.write(prot);
1114
        prot.writeMessageEnd();
1115
      }
1116
 
5361 mandeep.dh 1117
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
3430 rajveer 1118
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1119
          throw new IllegalStateException("Method call not finished!");
1120
        }
1121
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1122
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
5361 mandeep.dh 1123
        return (new Client(prot)).recv_getNonSeralizedInventoryItem();
3430 rajveer 1124
      }
1125
    }
1126
 
5361 mandeep.dh 1127
    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 1128
      checkReady();
5361 mandeep.dh 1129
      scan_call method_call = new scan_call(inventoryItem, type, quantity, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 1130
      this.___currentMethod = method_call;
1131
      ___manager.call(method_call);
1132
    }
1133
 
4496 mandeep.dh 1134
    public static class scan_call extends org.apache.thrift.async.TAsyncMethodCall {
5361 mandeep.dh 1135
      private InventoryItem inventoryItem;
3430 rajveer 1136
      private ScanType type;
4496 mandeep.dh 1137
      private long quantity;
5361 mandeep.dh 1138
      private long billingWarehouseId;
1139
      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 1140
        super(client, protocolFactory, transport, resultHandler, false);
5361 mandeep.dh 1141
        this.inventoryItem = inventoryItem;
3430 rajveer 1142
        this.type = type;
4496 mandeep.dh 1143
        this.quantity = quantity;
5361 mandeep.dh 1144
        this.billingWarehouseId = billingWarehouseId;
3430 rajveer 1145
      }
1146
 
1147
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 1148
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scan", org.apache.thrift.protocol.TMessageType.CALL, 0));
1149
        scan_args args = new scan_args();
5361 mandeep.dh 1150
        args.setInventoryItem(inventoryItem);
3430 rajveer 1151
        args.setType(type);
4496 mandeep.dh 1152
        args.setQuantity(quantity);
5361 mandeep.dh 1153
        args.setBillingWarehouseId(billingWarehouseId);
3430 rajveer 1154
        args.write(prot);
1155
        prot.writeMessageEnd();
1156
      }
1157
 
1158
      public void getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1159
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1160
          throw new IllegalStateException("Method call not finished!");
1161
        }
1162
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1163
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 1164
        (new Client(prot)).recv_scan();
3430 rajveer 1165
      }
1166
    }
1167
 
5110 mandeep.dh 1168
    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 1169
      checkReady();
5110 mandeep.dh 1170
      scanSerializedItemForOrder_call method_call = new scanSerializedItemForOrder_call(serialNumber, type, orderId, fulfilmentWarehouseId, quantity, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 1171
      this.___currentMethod = method_call;
1172
      ___manager.call(method_call);
1173
    }
1174
 
1175
    public static class scanSerializedItemForOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
4555 mandeep.dh 1176
      private String serialNumber;
4496 mandeep.dh 1177
      private ScanType type;
1178
      private long orderId;
5110 mandeep.dh 1179
      private long fulfilmentWarehouseId;
1180
      private double quantity;
1181
      private long billingWarehouseId;
1182
      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 1183
        super(client, protocolFactory, transport, resultHandler, false);
4555 mandeep.dh 1184
        this.serialNumber = serialNumber;
4496 mandeep.dh 1185
        this.type = type;
1186
        this.orderId = orderId;
5110 mandeep.dh 1187
        this.fulfilmentWarehouseId = fulfilmentWarehouseId;
1188
        this.quantity = quantity;
1189
        this.billingWarehouseId = billingWarehouseId;
4496 mandeep.dh 1190
      }
1191
 
1192
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1193
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanSerializedItemForOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1194
        scanSerializedItemForOrder_args args = new scanSerializedItemForOrder_args();
4555 mandeep.dh 1195
        args.setSerialNumber(serialNumber);
4496 mandeep.dh 1196
        args.setType(type);
1197
        args.setOrderId(orderId);
5110 mandeep.dh 1198
        args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
1199
        args.setQuantity(quantity);
1200
        args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 1201
        args.write(prot);
1202
        prot.writeMessageEnd();
1203
      }
1204
 
4555 mandeep.dh 1205
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
4496 mandeep.dh 1206
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1207
          throw new IllegalStateException("Method call not finished!");
1208
        }
1209
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1210
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1211
        return (new Client(prot)).recv_scanSerializedItemForOrder();
1212
      }
1213
    }
1214
 
5361 mandeep.dh 1215
    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 1216
      checkReady();
5361 mandeep.dh 1217
      scanForOrder_call method_call = new scanForOrder_call(inventoryItem, type, quantity, orderId, fulfilmentWarehouseId, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 1218
      this.___currentMethod = method_call;
1219
      ___manager.call(method_call);
1220
    }
1221
 
1222
    public static class scanForOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
5361 mandeep.dh 1223
      private InventoryItem inventoryItem;
4496 mandeep.dh 1224
      private ScanType type;
1225
      private long quantity;
1226
      private long orderId;
5110 mandeep.dh 1227
      private long fulfilmentWarehouseId;
5361 mandeep.dh 1228
      private long billingWarehouseId;
1229
      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 1230
        super(client, protocolFactory, transport, resultHandler, false);
5361 mandeep.dh 1231
        this.inventoryItem = inventoryItem;
4496 mandeep.dh 1232
        this.type = type;
1233
        this.quantity = quantity;
1234
        this.orderId = orderId;
5110 mandeep.dh 1235
        this.fulfilmentWarehouseId = fulfilmentWarehouseId;
5361 mandeep.dh 1236
        this.billingWarehouseId = billingWarehouseId;
4496 mandeep.dh 1237
      }
1238
 
1239
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1240
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanForOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1241
        scanForOrder_args args = new scanForOrder_args();
5361 mandeep.dh 1242
        args.setInventoryItem(inventoryItem);
4496 mandeep.dh 1243
        args.setType(type);
1244
        args.setQuantity(quantity);
1245
        args.setOrderId(orderId);
5110 mandeep.dh 1246
        args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
5361 mandeep.dh 1247
        args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 1248
        args.write(prot);
1249
        prot.writeMessageEnd();
1250
      }
1251
 
5361 mandeep.dh 1252
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
4496 mandeep.dh 1253
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1254
          throw new IllegalStateException("Method call not finished!");
1255
        }
1256
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1257
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
5361 mandeep.dh 1258
        return (new Client(prot)).recv_scanForOrder();
4496 mandeep.dh 1259
      }
1260
    }
1261
 
1262
    public void createItemNumberMapping(String itemNumber, long itemId, org.apache.thrift.async.AsyncMethodCallback<createItemNumberMapping_call> resultHandler) throws org.apache.thrift.TException {
1263
      checkReady();
1264
      createItemNumberMapping_call method_call = new createItemNumberMapping_call(itemNumber, itemId, resultHandler, this, ___protocolFactory, ___transport);
1265
      this.___currentMethod = method_call;
1266
      ___manager.call(method_call);
1267
    }
1268
 
1269
    public static class createItemNumberMapping_call extends org.apache.thrift.async.TAsyncMethodCall {
1270
      private String itemNumber;
1271
      private long itemId;
1272
      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 {
1273
        super(client, protocolFactory, transport, resultHandler, false);
1274
        this.itemNumber = itemNumber;
1275
        this.itemId = itemId;
1276
      }
1277
 
1278
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1279
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createItemNumberMapping", org.apache.thrift.protocol.TMessageType.CALL, 0));
1280
        createItemNumberMapping_args args = new createItemNumberMapping_args();
1281
        args.setItemNumber(itemNumber);
1282
        args.setItemId(itemId);
1283
        args.write(prot);
1284
        prot.writeMessageEnd();
1285
      }
1286
 
1287
      public void getResult() throws org.apache.thrift.TException {
1288
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1289
          throw new IllegalStateException("Method call not finished!");
1290
        }
1291
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1292
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1293
        (new Client(prot)).recv_createItemNumberMapping();
1294
      }
1295
    }
1296
 
4622 amit.gupta 1297
    public void getItemNumbers(long itemId, org.apache.thrift.async.AsyncMethodCallback<getItemNumbers_call> resultHandler) throws org.apache.thrift.TException {
1298
      checkReady();
1299
      getItemNumbers_call method_call = new getItemNumbers_call(itemId, resultHandler, this, ___protocolFactory, ___transport);
1300
      this.___currentMethod = method_call;
1301
      ___manager.call(method_call);
1302
    }
1303
 
1304
    public static class getItemNumbers_call extends org.apache.thrift.async.TAsyncMethodCall {
1305
      private long itemId;
1306
      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 {
1307
        super(client, protocolFactory, transport, resultHandler, false);
1308
        this.itemId = itemId;
1309
      }
1310
 
1311
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1312
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemNumbers", org.apache.thrift.protocol.TMessageType.CALL, 0));
1313
        getItemNumbers_args args = new getItemNumbers_args();
1314
        args.setItemId(itemId);
1315
        args.write(prot);
1316
        prot.writeMessageEnd();
1317
      }
1318
 
1319
      public List<String> getResult() throws org.apache.thrift.TException {
1320
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1321
          throw new IllegalStateException("Method call not finished!");
1322
        }
1323
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1324
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1325
        return (new Client(prot)).recv_getItemNumbers();
1326
      }
1327
    }
1328
 
5110 mandeep.dh 1329
    public void getItemIds(String itemNumber, org.apache.thrift.async.AsyncMethodCallback<getItemIds_call> resultHandler) throws org.apache.thrift.TException {
1330
      checkReady();
1331
      getItemIds_call method_call = new getItemIds_call(itemNumber, resultHandler, this, ___protocolFactory, ___transport);
1332
      this.___currentMethod = method_call;
1333
      ___manager.call(method_call);
1334
    }
1335
 
1336
    public static class getItemIds_call extends org.apache.thrift.async.TAsyncMethodCall {
1337
      private String itemNumber;
1338
      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 {
1339
        super(client, protocolFactory, transport, resultHandler, false);
1340
        this.itemNumber = itemNumber;
1341
      }
1342
 
1343
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1344
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemIds", org.apache.thrift.protocol.TMessageType.CALL, 0));
1345
        getItemIds_args args = new getItemIds_args();
1346
        args.setItemNumber(itemNumber);
1347
        args.write(prot);
1348
        prot.writeMessageEnd();
1349
      }
1350
 
1351
      public List<Long> getResult() throws org.apache.thrift.TException {
1352
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1353
          throw new IllegalStateException("Method call not finished!");
1354
        }
1355
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1356
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1357
        return (new Client(prot)).recv_getItemIds();
1358
      }
1359
    }
1360
 
5185 mandeep.dh 1361
    public void getInventoryItemsFromLastScanType(ScanType lastScanType, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemsFromLastScanType_call> resultHandler) throws org.apache.thrift.TException {
1362
      checkReady();
1363
      getInventoryItemsFromLastScanType_call method_call = new getInventoryItemsFromLastScanType_call(lastScanType, resultHandler, this, ___protocolFactory, ___transport);
1364
      this.___currentMethod = method_call;
1365
      ___manager.call(method_call);
1366
    }
1367
 
1368
    public static class getInventoryItemsFromLastScanType_call extends org.apache.thrift.async.TAsyncMethodCall {
1369
      private ScanType lastScanType;
1370
      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 {
1371
        super(client, protocolFactory, transport, resultHandler, false);
1372
        this.lastScanType = lastScanType;
1373
      }
1374
 
1375
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1376
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItemsFromLastScanType", org.apache.thrift.protocol.TMessageType.CALL, 0));
1377
        getInventoryItemsFromLastScanType_args args = new getInventoryItemsFromLastScanType_args();
1378
        args.setLastScanType(lastScanType);
1379
        args.write(prot);
1380
        prot.writeMessageEnd();
1381
      }
1382
 
1383
      public List<InventoryItem> getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1384
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1385
          throw new IllegalStateException("Method call not finished!");
1386
        }
1387
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1388
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1389
        return (new Client(prot)).recv_getInventoryItemsFromLastScanType();
1390
      }
1391
    }
1392
 
1393
    public void getInventoryItemFromId(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemFromId_call> resultHandler) throws org.apache.thrift.TException {
1394
      checkReady();
1395
      getInventoryItemFromId_call method_call = new getInventoryItemFromId_call(inventoryItemId, resultHandler, this, ___protocolFactory, ___transport);
1396
      this.___currentMethod = method_call;
1397
      ___manager.call(method_call);
1398
    }
1399
 
1400
    public static class getInventoryItemFromId_call extends org.apache.thrift.async.TAsyncMethodCall {
1401
      private long inventoryItemId;
1402
      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 {
1403
        super(client, protocolFactory, transport, resultHandler, false);
1404
        this.inventoryItemId = inventoryItemId;
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("getInventoryItemFromId", org.apache.thrift.protocol.TMessageType.CALL, 0));
1409
        getInventoryItemFromId_args args = new getInventoryItemFromId_args();
1410
        args.setInventoryItemId(inventoryItemId);
1411
        args.write(prot);
1412
        prot.writeMessageEnd();
1413
      }
1414
 
1415
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1416
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1417
          throw new IllegalStateException("Method call not finished!");
1418
        }
1419
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1420
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1421
        return (new Client(prot)).recv_getInventoryItemFromId();
1422
      }
1423
    }
1424
 
5372 mandeep.dh 1425
    public void getPurchaseScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getPurchaseScans_call> resultHandler) throws org.apache.thrift.TException {
1426
      checkReady();
1427
      getPurchaseScans_call method_call = new getPurchaseScans_call(startDate, endDate, resultHandler, this, ___protocolFactory, ___transport);
1428
      this.___currentMethod = method_call;
1429
      ___manager.call(method_call);
1430
    }
1431
 
1432
    public static class getPurchaseScans_call extends org.apache.thrift.async.TAsyncMethodCall {
1433
      private long startDate;
1434
      private long endDate;
1435
      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 {
1436
        super(client, protocolFactory, transport, resultHandler, false);
1437
        this.startDate = startDate;
1438
        this.endDate = endDate;
1439
      }
1440
 
1441
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1442
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseScans", org.apache.thrift.protocol.TMessageType.CALL, 0));
1443
        getPurchaseScans_args args = new getPurchaseScans_args();
1444
        args.setStartDate(startDate);
1445
        args.setEndDate(endDate);
1446
        args.write(prot);
1447
        prot.writeMessageEnd();
1448
      }
1449
 
1450
      public List<DetailedPurchaseScan> getResult() throws org.apache.thrift.TException {
1451
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1452
          throw new IllegalStateException("Method call not finished!");
1453
        }
1454
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1455
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1456
        return (new Client(prot)).recv_getPurchaseScans();
1457
      }
1458
    }
1459
 
7210 amar.kumar 1460
    public void getPurchaseScansByGrnDate(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getPurchaseScansByGrnDate_call> resultHandler) throws org.apache.thrift.TException {
1461
      checkReady();
1462
      getPurchaseScansByGrnDate_call method_call = new getPurchaseScansByGrnDate_call(startDate, endDate, resultHandler, this, ___protocolFactory, ___transport);
1463
      this.___currentMethod = method_call;
1464
      ___manager.call(method_call);
1465
    }
1466
 
1467
    public static class getPurchaseScansByGrnDate_call extends org.apache.thrift.async.TAsyncMethodCall {
1468
      private long startDate;
1469
      private long endDate;
1470
      public getPurchaseScansByGrnDate_call(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getPurchaseScansByGrnDate_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 {
1471
        super(client, protocolFactory, transport, resultHandler, false);
1472
        this.startDate = startDate;
1473
        this.endDate = endDate;
1474
      }
1475
 
1476
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1477
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseScansByGrnDate", org.apache.thrift.protocol.TMessageType.CALL, 0));
1478
        getPurchaseScansByGrnDate_args args = new getPurchaseScansByGrnDate_args();
1479
        args.setStartDate(startDate);
1480
        args.setEndDate(endDate);
1481
        args.write(prot);
1482
        prot.writeMessageEnd();
1483
      }
1484
 
1485
      public List<DetailedPurchaseScan> getResult() throws org.apache.thrift.TException {
1486
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1487
          throw new IllegalStateException("Method call not finished!");
1488
        }
1489
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1490
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1491
        return (new Client(prot)).recv_getPurchaseScansByGrnDate();
1492
      }
1493
    }
1494
 
5496 mandeep.dh 1495
    public void fetchScansPerInvoiceNumber(long date, org.apache.thrift.async.AsyncMethodCallback<fetchScansPerInvoiceNumber_call> resultHandler) throws org.apache.thrift.TException {
1496
      checkReady();
1497
      fetchScansPerInvoiceNumber_call method_call = new fetchScansPerInvoiceNumber_call(date, resultHandler, this, ___protocolFactory, ___transport);
1498
      this.___currentMethod = method_call;
1499
      ___manager.call(method_call);
1500
    }
1501
 
1502
    public static class fetchScansPerInvoiceNumber_call extends org.apache.thrift.async.TAsyncMethodCall {
1503
      private long date;
1504
      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 {
1505
        super(client, protocolFactory, transport, resultHandler, false);
1506
        this.date = date;
1507
      }
1508
 
1509
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1510
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fetchScansPerInvoiceNumber", org.apache.thrift.protocol.TMessageType.CALL, 0));
1511
        fetchScansPerInvoiceNumber_args args = new fetchScansPerInvoiceNumber_args();
1512
        args.setDate(date);
1513
        args.write(prot);
1514
        prot.writeMessageEnd();
1515
      }
1516
 
1517
      public List<InvoiceScan> getResult() throws org.apache.thrift.TException {
1518
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1519
          throw new IllegalStateException("Method call not finished!");
1520
        }
1521
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1522
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1523
        return (new Client(prot)).recv_fetchScansPerInvoiceNumber();
1524
      }
1525
    }
1526
 
5620 mandeep.dh 1527
    public void getInventoryItemFromOrder(long orderId, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemFromOrder_call> resultHandler) throws org.apache.thrift.TException {
1528
      checkReady();
1529
      getInventoryItemFromOrder_call method_call = new getInventoryItemFromOrder_call(orderId, resultHandler, this, ___protocolFactory, ___transport);
1530
      this.___currentMethod = method_call;
1531
      ___manager.call(method_call);
1532
    }
1533
 
1534
    public static class getInventoryItemFromOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1535
      private long orderId;
1536
      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 {
1537
        super(client, protocolFactory, transport, resultHandler, false);
1538
        this.orderId = orderId;
1539
      }
1540
 
1541
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1542
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItemFromOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1543
        getInventoryItemFromOrder_args args = new getInventoryItemFromOrder_args();
1544
        args.setOrderId(orderId);
1545
        args.write(prot);
1546
        prot.writeMessageEnd();
1547
      }
1548
 
1549
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1550
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1551
          throw new IllegalStateException("Method call not finished!");
1552
        }
1553
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1554
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1555
        return (new Client(prot)).recv_getInventoryItemFromOrder();
1556
      }
1557
    }
1558
 
5711 mandeep.dh 1559
    public void getInventoryAge(org.apache.thrift.async.AsyncMethodCallback<getInventoryAge_call> resultHandler) throws org.apache.thrift.TException {
1560
      checkReady();
1561
      getInventoryAge_call method_call = new getInventoryAge_call(resultHandler, this, ___protocolFactory, ___transport);
1562
      this.___currentMethod = method_call;
1563
      ___manager.call(method_call);
1564
    }
1565
 
1566
    public static class getInventoryAge_call extends org.apache.thrift.async.TAsyncMethodCall {
1567
      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 {
1568
        super(client, protocolFactory, transport, resultHandler, false);
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("getInventoryAge", org.apache.thrift.protocol.TMessageType.CALL, 0));
1573
        getInventoryAge_args args = new getInventoryAge_args();
1574
        args.write(prot);
1575
        prot.writeMessageEnd();
1576
      }
1577
 
1578
      public List<InventoryAge> getResult() throws org.apache.thrift.TException {
1579
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1580
          throw new IllegalStateException("Method call not finished!");
1581
        }
1582
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1583
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1584
        return (new Client(prot)).recv_getInventoryAge();
1585
      }
1586
    }
1587
 
6322 amar.kumar 1588
    public void getInventoryScansForItem(long itemId, long fromDate, long toDate, org.apache.thrift.async.AsyncMethodCallback<getInventoryScansForItem_call> resultHandler) throws org.apache.thrift.TException {
1589
      checkReady();
1590
      getInventoryScansForItem_call method_call = new getInventoryScansForItem_call(itemId, fromDate, toDate, resultHandler, this, ___protocolFactory, ___transport);
1591
      this.___currentMethod = method_call;
1592
      ___manager.call(method_call);
1593
    }
1594
 
1595
    public static class getInventoryScansForItem_call extends org.apache.thrift.async.TAsyncMethodCall {
1596
      private long itemId;
1597
      private long fromDate;
1598
      private long toDate;
1599
      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 {
1600
        super(client, protocolFactory, transport, resultHandler, false);
1601
        this.itemId = itemId;
1602
        this.fromDate = fromDate;
1603
        this.toDate = toDate;
1604
      }
1605
 
1606
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1607
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryScansForItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
1608
        getInventoryScansForItem_args args = new getInventoryScansForItem_args();
1609
        args.setItemId(itemId);
1610
        args.setFromDate(fromDate);
1611
        args.setToDate(toDate);
1612
        args.write(prot);
1613
        prot.writeMessageEnd();
1614
      }
1615
 
1616
      public List<Scan> getResult() throws org.apache.thrift.TException {
1617
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1618
          throw new IllegalStateException("Method call not finished!");
1619
        }
1620
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1621
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1622
        return (new Client(prot)).recv_getInventoryScansForItem();
1623
      }
1624
    }
1625
 
1626
    public void getScanRecordsForSerialNumber(long serialNumber, org.apache.thrift.async.AsyncMethodCallback<getScanRecordsForSerialNumber_call> resultHandler) throws org.apache.thrift.TException {
1627
      checkReady();
1628
      getScanRecordsForSerialNumber_call method_call = new getScanRecordsForSerialNumber_call(serialNumber, resultHandler, this, ___protocolFactory, ___transport);
1629
      this.___currentMethod = method_call;
1630
      ___manager.call(method_call);
1631
    }
1632
 
1633
    public static class getScanRecordsForSerialNumber_call extends org.apache.thrift.async.TAsyncMethodCall {
1634
      private long serialNumber;
1635
      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 {
1636
        super(client, protocolFactory, transport, resultHandler, false);
1637
        this.serialNumber = serialNumber;
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("getScanRecordsForSerialNumber", org.apache.thrift.protocol.TMessageType.CALL, 0));
1642
        getScanRecordsForSerialNumber_args args = new getScanRecordsForSerialNumber_args();
1643
        args.setSerialNumber(serialNumber);
1644
        args.write(prot);
1645
        prot.writeMessageEnd();
1646
      }
1647
 
1648
      public List<Scan> getResult() throws org.apache.thrift.TException {
1649
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1650
          throw new IllegalStateException("Method call not finished!");
1651
        }
1652
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1653
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1654
        return (new Client(prot)).recv_getScanRecordsForSerialNumber();
1655
      }
1656
    }
1657
 
6467 amar.kumar 1658
    public void scanForPurchaseReturn(List<InventoryItem> saleReturnItems, long vendorId, org.apache.thrift.async.AsyncMethodCallback<scanForPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1659
      checkReady();
1660
      scanForPurchaseReturn_call method_call = new scanForPurchaseReturn_call(saleReturnItems, vendorId, resultHandler, this, ___protocolFactory, ___transport);
1661
      this.___currentMethod = method_call;
1662
      ___manager.call(method_call);
1663
    }
1664
 
1665
    public static class scanForPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1666
      private List<InventoryItem> saleReturnItems;
1667
      private long vendorId;
1668
      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 {
1669
        super(client, protocolFactory, transport, resultHandler, false);
1670
        this.saleReturnItems = saleReturnItems;
1671
        this.vendorId = vendorId;
1672
      }
1673
 
1674
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1675
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanForPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1676
        scanForPurchaseReturn_args args = new scanForPurchaseReturn_args();
1677
        args.setSaleReturnItems(saleReturnItems);
1678
        args.setVendorId(vendorId);
1679
        args.write(prot);
1680
        prot.writeMessageEnd();
1681
      }
1682
 
1683
      public void getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1684
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1685
          throw new IllegalStateException("Method call not finished!");
1686
        }
1687
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1688
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1689
        (new Client(prot)).recv_scanForPurchaseReturn();
1690
      }
1691
    }
1692
 
6548 amar.kumar 1693
    public void scanForLostItem(List<InventoryItem> lostItems, long vendorId, org.apache.thrift.async.AsyncMethodCallback<scanForLostItem_call> resultHandler) throws org.apache.thrift.TException {
1694
      checkReady();
1695
      scanForLostItem_call method_call = new scanForLostItem_call(lostItems, vendorId, resultHandler, this, ___protocolFactory, ___transport);
1696
      this.___currentMethod = method_call;
1697
      ___manager.call(method_call);
1698
    }
1699
 
1700
    public static class scanForLostItem_call extends org.apache.thrift.async.TAsyncMethodCall {
1701
      private List<InventoryItem> lostItems;
1702
      private long vendorId;
1703
      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 {
1704
        super(client, protocolFactory, transport, resultHandler, false);
1705
        this.lostItems = lostItems;
1706
        this.vendorId = vendorId;
1707
      }
1708
 
1709
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1710
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanForLostItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
1711
        scanForLostItem_args args = new scanForLostItem_args();
1712
        args.setLostItems(lostItems);
1713
        args.setVendorId(vendorId);
1714
        args.write(prot);
1715
        prot.writeMessageEnd();
1716
      }
1717
 
1718
      public void getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1719
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1720
          throw new IllegalStateException("Method call not finished!");
1721
        }
1722
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1723
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1724
        (new Client(prot)).recv_scanForLostItem();
1725
      }
1726
    }
1727
 
1728
    public void getCurrentSerializedInventoryByScans(org.apache.thrift.async.AsyncMethodCallback<getCurrentSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException {
1729
      checkReady();
1730
      getCurrentSerializedInventoryByScans_call method_call = new getCurrentSerializedInventoryByScans_call(resultHandler, this, ___protocolFactory, ___transport);
1731
      this.___currentMethod = method_call;
1732
      ___manager.call(method_call);
1733
    }
1734
 
1735
    public static class getCurrentSerializedInventoryByScans_call extends org.apache.thrift.async.TAsyncMethodCall {
1736
      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 {
1737
        super(client, protocolFactory, transport, resultHandler, false);
1738
      }
1739
 
1740
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1741
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCurrentSerializedInventoryByScans", org.apache.thrift.protocol.TMessageType.CALL, 0));
1742
        getCurrentSerializedInventoryByScans_args args = new getCurrentSerializedInventoryByScans_args();
1743
        args.write(prot);
1744
        prot.writeMessageEnd();
1745
      }
1746
 
1747
      public List<InventoryAvailability> getResult() throws org.apache.thrift.TException {
1748
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1749
          throw new IllegalStateException("Method call not finished!");
1750
        }
1751
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1752
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1753
        return (new Client(prot)).recv_getCurrentSerializedInventoryByScans();
1754
      }
1755
    }
1756
 
6630 amar.kumar 1757
    public void getCurrentNonSerializedInventoryByScans(org.apache.thrift.async.AsyncMethodCallback<getCurrentNonSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException {
1758
      checkReady();
1759
      getCurrentNonSerializedInventoryByScans_call method_call = new getCurrentNonSerializedInventoryByScans_call(resultHandler, this, ___protocolFactory, ___transport);
1760
      this.___currentMethod = method_call;
1761
      ___manager.call(method_call);
1762
    }
1763
 
1764
    public static class getCurrentNonSerializedInventoryByScans_call extends org.apache.thrift.async.TAsyncMethodCall {
1765
      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 {
1766
        super(client, protocolFactory, transport, resultHandler, false);
1767
      }
1768
 
1769
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1770
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCurrentNonSerializedInventoryByScans", org.apache.thrift.protocol.TMessageType.CALL, 0));
1771
        getCurrentNonSerializedInventoryByScans_args args = new getCurrentNonSerializedInventoryByScans_args();
1772
        args.write(prot);
1773
        prot.writeMessageEnd();
1774
      }
1775
 
1776
      public List<InventoryAvailability> getResult() throws org.apache.thrift.TException {
1777
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1778
          throw new IllegalStateException("Method call not finished!");
1779
        }
1780
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1781
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1782
        return (new Client(prot)).recv_getCurrentNonSerializedInventoryByScans();
1783
      }
1784
    }
1785
 
6762 amar.kumar 1786
    public void getHistoricSerializedInventoryByScans(long date, org.apache.thrift.async.AsyncMethodCallback<getHistoricSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException {
1787
      checkReady();
1788
      getHistoricSerializedInventoryByScans_call method_call = new getHistoricSerializedInventoryByScans_call(date, resultHandler, this, ___protocolFactory, ___transport);
1789
      this.___currentMethod = method_call;
1790
      ___manager.call(method_call);
1791
    }
1792
 
1793
    public static class getHistoricSerializedInventoryByScans_call extends org.apache.thrift.async.TAsyncMethodCall {
1794
      private long date;
1795
      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 {
1796
        super(client, protocolFactory, transport, resultHandler, false);
1797
        this.date = date;
1798
      }
1799
 
1800
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1801
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getHistoricSerializedInventoryByScans", org.apache.thrift.protocol.TMessageType.CALL, 0));
1802
        getHistoricSerializedInventoryByScans_args args = new getHistoricSerializedInventoryByScans_args();
1803
        args.setDate(date);
1804
        args.write(prot);
1805
        prot.writeMessageEnd();
1806
      }
1807
 
1808
      public List<InventoryAvailability> getResult() throws org.apache.thrift.TException {
1809
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1810
          throw new IllegalStateException("Method call not finished!");
1811
        }
1812
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1813
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1814
        return (new Client(prot)).recv_getHistoricSerializedInventoryByScans();
1815
      }
1816
    }
1817
 
1818
    public void getHistoricNonSerializedInventoryByScans(long date, org.apache.thrift.async.AsyncMethodCallback<getHistoricNonSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException {
1819
      checkReady();
1820
      getHistoricNonSerializedInventoryByScans_call method_call = new getHistoricNonSerializedInventoryByScans_call(date, resultHandler, this, ___protocolFactory, ___transport);
1821
      this.___currentMethod = method_call;
1822
      ___manager.call(method_call);
1823
    }
1824
 
1825
    public static class getHistoricNonSerializedInventoryByScans_call extends org.apache.thrift.async.TAsyncMethodCall {
1826
      private long date;
1827
      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 {
1828
        super(client, protocolFactory, transport, resultHandler, false);
1829
        this.date = date;
1830
      }
1831
 
1832
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1833
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getHistoricNonSerializedInventoryByScans", org.apache.thrift.protocol.TMessageType.CALL, 0));
1834
        getHistoricNonSerializedInventoryByScans_args args = new getHistoricNonSerializedInventoryByScans_args();
1835
        args.setDate(date);
1836
        args.write(prot);
1837
        prot.writeMessageEnd();
1838
      }
1839
 
1840
      public List<InventoryAvailability> getResult() throws org.apache.thrift.TException {
1841
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1842
          throw new IllegalStateException("Method call not finished!");
1843
        }
1844
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1845
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1846
        return (new Client(prot)).recv_getHistoricNonSerializedInventoryByScans();
1847
      }
1848
    }
1849
 
1850
    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 {
1851
      checkReady();
1852
      scanForOursExternalSale_call method_call = new scanForOursExternalSale_call(itemId, serialNumber, itemNumber, invoiceNumber, warehouseId, unitPrice, orderId, resultHandler, this, ___protocolFactory, ___transport);
1853
      this.___currentMethod = method_call;
1854
      ___manager.call(method_call);
1855
    }
1856
 
1857
    public static class scanForOursExternalSale_call extends org.apache.thrift.async.TAsyncMethodCall {
1858
      private long itemId;
1859
      private String serialNumber;
1860
      private String itemNumber;
1861
      private String invoiceNumber;
1862
      private long warehouseId;
1863
      private double unitPrice;
1864
      private long orderId;
1865
      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 {
1866
        super(client, protocolFactory, transport, resultHandler, false);
1867
        this.itemId = itemId;
1868
        this.serialNumber = serialNumber;
1869
        this.itemNumber = itemNumber;
1870
        this.invoiceNumber = invoiceNumber;
1871
        this.warehouseId = warehouseId;
1872
        this.unitPrice = unitPrice;
1873
        this.orderId = orderId;
1874
      }
1875
 
1876
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1877
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanForOursExternalSale", org.apache.thrift.protocol.TMessageType.CALL, 0));
1878
        scanForOursExternalSale_args args = new scanForOursExternalSale_args();
1879
        args.setItemId(itemId);
1880
        args.setSerialNumber(serialNumber);
1881
        args.setItemNumber(itemNumber);
1882
        args.setInvoiceNumber(invoiceNumber);
1883
        args.setWarehouseId(warehouseId);
1884
        args.setUnitPrice(unitPrice);
1885
        args.setOrderId(orderId);
1886
        args.write(prot);
1887
        prot.writeMessageEnd();
1888
      }
1889
 
1890
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1891
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1892
          throw new IllegalStateException("Method call not finished!");
1893
        }
1894
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1895
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1896
        return (new Client(prot)).recv_scanForOursExternalSale();
1897
      }
1898
    }
1899
 
1900
    public void scanForOursExternalSaleReturn(long orderId, double unitPrice, org.apache.thrift.async.AsyncMethodCallback<scanForOursExternalSaleReturn_call> resultHandler) throws org.apache.thrift.TException {
1901
      checkReady();
1902
      scanForOursExternalSaleReturn_call method_call = new scanForOursExternalSaleReturn_call(orderId, unitPrice, resultHandler, this, ___protocolFactory, ___transport);
1903
      this.___currentMethod = method_call;
1904
      ___manager.call(method_call);
1905
    }
1906
 
1907
    public static class scanForOursExternalSaleReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1908
      private long orderId;
1909
      private double unitPrice;
1910
      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 {
1911
        super(client, protocolFactory, transport, resultHandler, false);
1912
        this.orderId = orderId;
1913
        this.unitPrice = unitPrice;
1914
      }
1915
 
1916
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1917
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanForOursExternalSaleReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1918
        scanForOursExternalSaleReturn_args args = new scanForOursExternalSaleReturn_args();
1919
        args.setOrderId(orderId);
1920
        args.setUnitPrice(unitPrice);
1921
        args.write(prot);
1922
        prot.writeMessageEnd();
1923
      }
1924
 
1925
      public void getResult() throws org.apache.thrift.TException {
1926
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1927
          throw new IllegalStateException("Method call not finished!");
1928
        }
1929
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1930
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1931
        (new Client(prot)).recv_scanForOursExternalSaleReturn();
1932
      }
1933
    }
1934
 
6880 amar.kumar 1935
    public void getMovementNonSerializedInventoryByScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getMovementNonSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException {
1936
      checkReady();
1937
      getMovementNonSerializedInventoryByScans_call method_call = new getMovementNonSerializedInventoryByScans_call(startDate, endDate, resultHandler, this, ___protocolFactory, ___transport);
1938
      this.___currentMethod = method_call;
1939
      ___manager.call(method_call);
1940
    }
1941
 
1942
    public static class getMovementNonSerializedInventoryByScans_call extends org.apache.thrift.async.TAsyncMethodCall {
1943
      private long startDate;
1944
      private long endDate;
1945
      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 {
1946
        super(client, protocolFactory, transport, resultHandler, false);
1947
        this.startDate = startDate;
1948
        this.endDate = endDate;
1949
      }
1950
 
1951
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1952
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getMovementNonSerializedInventoryByScans", org.apache.thrift.protocol.TMessageType.CALL, 0));
1953
        getMovementNonSerializedInventoryByScans_args args = new getMovementNonSerializedInventoryByScans_args();
1954
        args.setStartDate(startDate);
1955
        args.setEndDate(endDate);
1956
        args.write(prot);
1957
        prot.writeMessageEnd();
1958
      }
1959
 
1960
      public List<InventoryMovement> getResult() throws org.apache.thrift.TException {
1961
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1962
          throw new IllegalStateException("Method call not finished!");
1963
        }
1964
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1965
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1966
        return (new Client(prot)).recv_getMovementNonSerializedInventoryByScans();
1967
      }
1968
    }
1969
 
1970
    public void getMovementSerializedInventoryByScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getMovementSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException {
1971
      checkReady();
1972
      getMovementSerializedInventoryByScans_call method_call = new getMovementSerializedInventoryByScans_call(startDate, endDate, resultHandler, this, ___protocolFactory, ___transport);
1973
      this.___currentMethod = method_call;
1974
      ___manager.call(method_call);
1975
    }
1976
 
1977
    public static class getMovementSerializedInventoryByScans_call extends org.apache.thrift.async.TAsyncMethodCall {
1978
      private long startDate;
1979
      private long endDate;
1980
      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 {
1981
        super(client, protocolFactory, transport, resultHandler, false);
1982
        this.startDate = startDate;
1983
        this.endDate = endDate;
1984
      }
1985
 
1986
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1987
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getMovementSerializedInventoryByScans", org.apache.thrift.protocol.TMessageType.CALL, 0));
1988
        getMovementSerializedInventoryByScans_args args = new getMovementSerializedInventoryByScans_args();
1989
        args.setStartDate(startDate);
1990
        args.setEndDate(endDate);
1991
        args.write(prot);
1992
        prot.writeMessageEnd();
1993
      }
1994
 
1995
      public List<InventoryMovement> getResult() throws org.apache.thrift.TException {
1996
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1997
          throw new IllegalStateException("Method call not finished!");
1998
        }
1999
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2000
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2001
        return (new Client(prot)).recv_getMovementSerializedInventoryByScans();
2002
      }
2003
    }
2004
 
7190 amar.kumar 2005
    public void scanfreebie(long orderId, long freebieItemId, long freebieWarehouseId, ScanType scanType, org.apache.thrift.async.AsyncMethodCallback<scanfreebie_call> resultHandler) throws org.apache.thrift.TException {
2006
      checkReady();
2007
      scanfreebie_call method_call = new scanfreebie_call(orderId, freebieItemId, freebieWarehouseId, scanType, resultHandler, this, ___protocolFactory, ___transport);
2008
      this.___currentMethod = method_call;
2009
      ___manager.call(method_call);
2010
    }
2011
 
2012
    public static class scanfreebie_call extends org.apache.thrift.async.TAsyncMethodCall {
2013
      private long orderId;
2014
      private long freebieItemId;
2015
      private long freebieWarehouseId;
2016
      private ScanType scanType;
2017
      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 {
2018
        super(client, protocolFactory, transport, resultHandler, false);
2019
        this.orderId = orderId;
2020
        this.freebieItemId = freebieItemId;
2021
        this.freebieWarehouseId = freebieWarehouseId;
2022
        this.scanType = scanType;
2023
      }
2024
 
2025
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2026
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanfreebie", org.apache.thrift.protocol.TMessageType.CALL, 0));
2027
        scanfreebie_args args = new scanfreebie_args();
2028
        args.setOrderId(orderId);
2029
        args.setFreebieItemId(freebieItemId);
2030
        args.setFreebieWarehouseId(freebieWarehouseId);
2031
        args.setScanType(scanType);
2032
        args.write(prot);
2033
        prot.writeMessageEnd();
2034
      }
2035
 
2036
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
2037
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2038
          throw new IllegalStateException("Method call not finished!");
2039
        }
2040
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2041
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2042
        return (new Client(prot)).recv_scanfreebie();
2043
      }
2044
    }
2045
 
7199 amar.kumar 2046
    public void reshipfreebie(long oldOrderId, long newOrderId, long freebieItemId, ScanType scanType, org.apache.thrift.async.AsyncMethodCallback<reshipfreebie_call> resultHandler) throws org.apache.thrift.TException {
2047
      checkReady();
2048
      reshipfreebie_call method_call = new reshipfreebie_call(oldOrderId, newOrderId, freebieItemId, scanType, resultHandler, this, ___protocolFactory, ___transport);
2049
      this.___currentMethod = method_call;
2050
      ___manager.call(method_call);
2051
    }
2052
 
2053
    public static class reshipfreebie_call extends org.apache.thrift.async.TAsyncMethodCall {
2054
      private long oldOrderId;
2055
      private long newOrderId;
2056
      private long freebieItemId;
2057
      private ScanType scanType;
2058
      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 {
2059
        super(client, protocolFactory, transport, resultHandler, false);
2060
        this.oldOrderId = oldOrderId;
2061
        this.newOrderId = newOrderId;
2062
        this.freebieItemId = freebieItemId;
2063
        this.scanType = scanType;
2064
      }
2065
 
2066
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2067
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("reshipfreebie", org.apache.thrift.protocol.TMessageType.CALL, 0));
2068
        reshipfreebie_args args = new reshipfreebie_args();
2069
        args.setOldOrderId(oldOrderId);
2070
        args.setNewOrderId(newOrderId);
2071
        args.setFreebieItemId(freebieItemId);
2072
        args.setScanType(scanType);
2073
        args.write(prot);
2074
        prot.writeMessageEnd();
2075
      }
2076
 
2077
      public void getResult() throws WarehouseServiceException, org.apache.thrift.TException {
2078
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2079
          throw new IllegalStateException("Method call not finished!");
2080
        }
2081
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2082
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2083
        (new Client(prot)).recv_reshipfreebie();
2084
      }
2085
    }
2086
 
3430 rajveer 2087
  }
2088
 
2089
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
2090
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
2091
    public Processor(I iface) {
2092
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
2093
    }
2094
 
2095
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
2096
      super(iface, getProcessMap(processMap));
2097
    }
2098
 
2099
    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 2100
      processMap.put("getInventoryItem", new getInventoryItem());
5361 mandeep.dh 2101
      processMap.put("getNonSeralizedInventoryItem", new getNonSeralizedInventoryItem());
4496 mandeep.dh 2102
      processMap.put("scan", new scan());
2103
      processMap.put("scanSerializedItemForOrder", new scanSerializedItemForOrder());
2104
      processMap.put("scanForOrder", new scanForOrder());
2105
      processMap.put("createItemNumberMapping", new createItemNumberMapping());
4622 amit.gupta 2106
      processMap.put("getItemNumbers", new getItemNumbers());
5110 mandeep.dh 2107
      processMap.put("getItemIds", new getItemIds());
5185 mandeep.dh 2108
      processMap.put("getInventoryItemsFromLastScanType", new getInventoryItemsFromLastScanType());
2109
      processMap.put("getInventoryItemFromId", new getInventoryItemFromId());
5372 mandeep.dh 2110
      processMap.put("getPurchaseScans", new getPurchaseScans());
7210 amar.kumar 2111
      processMap.put("getPurchaseScansByGrnDate", new getPurchaseScansByGrnDate());
5496 mandeep.dh 2112
      processMap.put("fetchScansPerInvoiceNumber", new fetchScansPerInvoiceNumber());
5620 mandeep.dh 2113
      processMap.put("getInventoryItemFromOrder", new getInventoryItemFromOrder());
5711 mandeep.dh 2114
      processMap.put("getInventoryAge", new getInventoryAge());
6322 amar.kumar 2115
      processMap.put("getInventoryScansForItem", new getInventoryScansForItem());
2116
      processMap.put("getScanRecordsForSerialNumber", new getScanRecordsForSerialNumber());
6467 amar.kumar 2117
      processMap.put("scanForPurchaseReturn", new scanForPurchaseReturn());
6548 amar.kumar 2118
      processMap.put("scanForLostItem", new scanForLostItem());
2119
      processMap.put("getCurrentSerializedInventoryByScans", new getCurrentSerializedInventoryByScans());
6630 amar.kumar 2120
      processMap.put("getCurrentNonSerializedInventoryByScans", new getCurrentNonSerializedInventoryByScans());
6762 amar.kumar 2121
      processMap.put("getHistoricSerializedInventoryByScans", new getHistoricSerializedInventoryByScans());
2122
      processMap.put("getHistoricNonSerializedInventoryByScans", new getHistoricNonSerializedInventoryByScans());
2123
      processMap.put("scanForOursExternalSale", new scanForOursExternalSale());
2124
      processMap.put("scanForOursExternalSaleReturn", new scanForOursExternalSaleReturn());
6880 amar.kumar 2125
      processMap.put("getMovementNonSerializedInventoryByScans", new getMovementNonSerializedInventoryByScans());
2126
      processMap.put("getMovementSerializedInventoryByScans", new getMovementSerializedInventoryByScans());
7190 amar.kumar 2127
      processMap.put("scanfreebie", new scanfreebie());
7199 amar.kumar 2128
      processMap.put("reshipfreebie", new reshipfreebie());
3430 rajveer 2129
      return processMap;
2130
    }
2131
 
4496 mandeep.dh 2132
    private static class getInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItem_args> {
2133
      public getInventoryItem() {
2134
        super("getInventoryItem");
3430 rajveer 2135
      }
2136
 
4496 mandeep.dh 2137
      protected getInventoryItem_args getEmptyArgsInstance() {
2138
        return new getInventoryItem_args();
3430 rajveer 2139
      }
2140
 
4496 mandeep.dh 2141
      protected getInventoryItem_result getResult(I iface, getInventoryItem_args args) throws org.apache.thrift.TException {
2142
        getInventoryItem_result result = new getInventoryItem_result();
4541 mandeep.dh 2143
        try {
2144
          result.success = iface.getInventoryItem(args.serialNumber);
2145
        } catch (WarehouseServiceException wex) {
2146
          result.wex = wex;
2147
        }
3430 rajveer 2148
        return result;
2832 chandransh 2149
      }
2150
    }
2151
 
5361 mandeep.dh 2152
    private static class getNonSeralizedInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getNonSeralizedInventoryItem_args> {
2153
      public getNonSeralizedInventoryItem() {
2154
        super("getNonSeralizedInventoryItem");
3430 rajveer 2155
      }
2156
 
5361 mandeep.dh 2157
      protected getNonSeralizedInventoryItem_args getEmptyArgsInstance() {
2158
        return new getNonSeralizedInventoryItem_args();
3430 rajveer 2159
      }
2160
 
5361 mandeep.dh 2161
      protected getNonSeralizedInventoryItem_result getResult(I iface, getNonSeralizedInventoryItem_args args) throws org.apache.thrift.TException {
2162
        getNonSeralizedInventoryItem_result result = new getNonSeralizedInventoryItem_result();
2163
        try {
5530 mandeep.dh 2164
          result.success = iface.getNonSeralizedInventoryItem(args.itemNumber, args.itemId, args.fulfilmentWarehouseId);
5361 mandeep.dh 2165
        } catch (WarehouseServiceException wex) {
2166
          result.wex = wex;
2167
        }
3430 rajveer 2168
        return result;
2820 chandransh 2169
      }
2170
    }
2171
 
4496 mandeep.dh 2172
    private static class scan<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scan_args> {
2173
      public scan() {
2174
        super("scan");
3430 rajveer 2175
      }
2176
 
4496 mandeep.dh 2177
      protected scan_args getEmptyArgsInstance() {
2178
        return new scan_args();
3430 rajveer 2179
      }
2180
 
4496 mandeep.dh 2181
      protected scan_result getResult(I iface, scan_args args) throws org.apache.thrift.TException {
2182
        scan_result result = new scan_result();
3383 chandransh 2183
        try {
5361 mandeep.dh 2184
          iface.scan(args.inventoryItem, args.type, args.quantity, args.billingWarehouseId);
3383 chandransh 2185
        } catch (WarehouseServiceException wex) {
2186
          result.wex = wex;
2187
        }
3430 rajveer 2188
        return result;
3383 chandransh 2189
      }
2190
    }
2191
 
4496 mandeep.dh 2192
    private static class scanSerializedItemForOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanSerializedItemForOrder_args> {
2193
      public scanSerializedItemForOrder() {
2194
        super("scanSerializedItemForOrder");
3430 rajveer 2195
      }
2196
 
4496 mandeep.dh 2197
      protected scanSerializedItemForOrder_args getEmptyArgsInstance() {
2198
        return new scanSerializedItemForOrder_args();
3430 rajveer 2199
      }
2200
 
4496 mandeep.dh 2201
      protected scanSerializedItemForOrder_result getResult(I iface, scanSerializedItemForOrder_args args) throws org.apache.thrift.TException {
2202
        scanSerializedItemForOrder_result result = new scanSerializedItemForOrder_result();
2820 chandransh 2203
        try {
5110 mandeep.dh 2204
          result.success = iface.scanSerializedItemForOrder(args.serialNumber, args.type, args.orderId, args.fulfilmentWarehouseId, args.quantity, args.billingWarehouseId);
2820 chandransh 2205
        } catch (WarehouseServiceException wex) {
2206
          result.wex = wex;
2207
        }
3430 rajveer 2208
        return result;
2820 chandransh 2209
      }
2210
    }
2211
 
4496 mandeep.dh 2212
    private static class scanForOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanForOrder_args> {
2213
      public scanForOrder() {
2214
        super("scanForOrder");
3430 rajveer 2215
      }
2216
 
4496 mandeep.dh 2217
      protected scanForOrder_args getEmptyArgsInstance() {
2218
        return new scanForOrder_args();
3430 rajveer 2219
      }
2220
 
4496 mandeep.dh 2221
      protected scanForOrder_result getResult(I iface, scanForOrder_args args) throws org.apache.thrift.TException {
2222
        scanForOrder_result result = new scanForOrder_result();
2820 chandransh 2223
        try {
5361 mandeep.dh 2224
          result.success = iface.scanForOrder(args.inventoryItem, args.type, args.quantity, args.orderId, args.fulfilmentWarehouseId, args.billingWarehouseId);
2820 chandransh 2225
        } catch (WarehouseServiceException wex) {
2226
          result.wex = wex;
2227
        }
3430 rajveer 2228
        return result;
2820 chandransh 2229
      }
2230
    }
2231
 
4496 mandeep.dh 2232
    private static class createItemNumberMapping<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createItemNumberMapping_args> {
2233
      public createItemNumberMapping() {
2234
        super("createItemNumberMapping");
2235
      }
2236
 
2237
      protected createItemNumberMapping_args getEmptyArgsInstance() {
2238
        return new createItemNumberMapping_args();
2239
      }
2240
 
2241
      protected createItemNumberMapping_result getResult(I iface, createItemNumberMapping_args args) throws org.apache.thrift.TException {
2242
        createItemNumberMapping_result result = new createItemNumberMapping_result();
2243
        iface.createItemNumberMapping(args.itemNumber, args.itemId);
2244
        return result;
2245
      }
2246
    }
2247
 
4622 amit.gupta 2248
    private static class getItemNumbers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemNumbers_args> {
2249
      public getItemNumbers() {
2250
        super("getItemNumbers");
2251
      }
2252
 
2253
      protected getItemNumbers_args getEmptyArgsInstance() {
2254
        return new getItemNumbers_args();
2255
      }
2256
 
2257
      protected getItemNumbers_result getResult(I iface, getItemNumbers_args args) throws org.apache.thrift.TException {
2258
        getItemNumbers_result result = new getItemNumbers_result();
2259
        result.success = iface.getItemNumbers(args.itemId);
2260
        return result;
2261
      }
2262
    }
2263
 
5110 mandeep.dh 2264
    private static class getItemIds<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemIds_args> {
2265
      public getItemIds() {
2266
        super("getItemIds");
2267
      }
2268
 
2269
      protected getItemIds_args getEmptyArgsInstance() {
2270
        return new getItemIds_args();
2271
      }
2272
 
2273
      protected getItemIds_result getResult(I iface, getItemIds_args args) throws org.apache.thrift.TException {
2274
        getItemIds_result result = new getItemIds_result();
2275
        result.success = iface.getItemIds(args.itemNumber);
2276
        return result;
2277
      }
2278
    }
2279
 
5185 mandeep.dh 2280
    private static class getInventoryItemsFromLastScanType<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItemsFromLastScanType_args> {
2281
      public getInventoryItemsFromLastScanType() {
2282
        super("getInventoryItemsFromLastScanType");
2283
      }
2284
 
2285
      protected getInventoryItemsFromLastScanType_args getEmptyArgsInstance() {
2286
        return new getInventoryItemsFromLastScanType_args();
2287
      }
2288
 
2289
      protected getInventoryItemsFromLastScanType_result getResult(I iface, getInventoryItemsFromLastScanType_args args) throws org.apache.thrift.TException {
2290
        getInventoryItemsFromLastScanType_result result = new getInventoryItemsFromLastScanType_result();
2291
        try {
2292
          result.success = iface.getInventoryItemsFromLastScanType(args.lastScanType);
2293
        } catch (WarehouseServiceException wex) {
2294
          result.wex = wex;
2295
        }
2296
        return result;
2297
      }
2298
    }
2299
 
2300
    private static class getInventoryItemFromId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItemFromId_args> {
2301
      public getInventoryItemFromId() {
2302
        super("getInventoryItemFromId");
2303
      }
2304
 
2305
      protected getInventoryItemFromId_args getEmptyArgsInstance() {
2306
        return new getInventoryItemFromId_args();
2307
      }
2308
 
2309
      protected getInventoryItemFromId_result getResult(I iface, getInventoryItemFromId_args args) throws org.apache.thrift.TException {
2310
        getInventoryItemFromId_result result = new getInventoryItemFromId_result();
2311
        try {
2312
          result.success = iface.getInventoryItemFromId(args.inventoryItemId);
2313
        } catch (WarehouseServiceException wex) {
2314
          result.wex = wex;
2315
        }
2316
        return result;
2317
      }
2318
    }
2319
 
5372 mandeep.dh 2320
    private static class getPurchaseScans<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseScans_args> {
2321
      public getPurchaseScans() {
2322
        super("getPurchaseScans");
2323
      }
2324
 
2325
      protected getPurchaseScans_args getEmptyArgsInstance() {
2326
        return new getPurchaseScans_args();
2327
      }
2328
 
2329
      protected getPurchaseScans_result getResult(I iface, getPurchaseScans_args args) throws org.apache.thrift.TException {
2330
        getPurchaseScans_result result = new getPurchaseScans_result();
2331
        result.success = iface.getPurchaseScans(args.startDate, args.endDate);
2332
        return result;
2333
      }
2334
    }
2335
 
7210 amar.kumar 2336
    private static class getPurchaseScansByGrnDate<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseScansByGrnDate_args> {
2337
      public getPurchaseScansByGrnDate() {
2338
        super("getPurchaseScansByGrnDate");
2339
      }
2340
 
2341
      protected getPurchaseScansByGrnDate_args getEmptyArgsInstance() {
2342
        return new getPurchaseScansByGrnDate_args();
2343
      }
2344
 
2345
      protected getPurchaseScansByGrnDate_result getResult(I iface, getPurchaseScansByGrnDate_args args) throws org.apache.thrift.TException {
2346
        getPurchaseScansByGrnDate_result result = new getPurchaseScansByGrnDate_result();
2347
        result.success = iface.getPurchaseScansByGrnDate(args.startDate, args.endDate);
2348
        return result;
2349
      }
2350
    }
2351
 
5496 mandeep.dh 2352
    private static class fetchScansPerInvoiceNumber<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fetchScansPerInvoiceNumber_args> {
2353
      public fetchScansPerInvoiceNumber() {
2354
        super("fetchScansPerInvoiceNumber");
2355
      }
2356
 
2357
      protected fetchScansPerInvoiceNumber_args getEmptyArgsInstance() {
2358
        return new fetchScansPerInvoiceNumber_args();
2359
      }
2360
 
2361
      protected fetchScansPerInvoiceNumber_result getResult(I iface, fetchScansPerInvoiceNumber_args args) throws org.apache.thrift.TException {
2362
        fetchScansPerInvoiceNumber_result result = new fetchScansPerInvoiceNumber_result();
2363
        result.success = iface.fetchScansPerInvoiceNumber(args.date);
2364
        return result;
2365
      }
2366
    }
2367
 
5620 mandeep.dh 2368
    private static class getInventoryItemFromOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItemFromOrder_args> {
2369
      public getInventoryItemFromOrder() {
2370
        super("getInventoryItemFromOrder");
2371
      }
2372
 
2373
      protected getInventoryItemFromOrder_args getEmptyArgsInstance() {
2374
        return new getInventoryItemFromOrder_args();
2375
      }
2376
 
2377
      protected getInventoryItemFromOrder_result getResult(I iface, getInventoryItemFromOrder_args args) throws org.apache.thrift.TException {
2378
        getInventoryItemFromOrder_result result = new getInventoryItemFromOrder_result();
2379
        try {
2380
          result.success = iface.getInventoryItemFromOrder(args.orderId);
2381
        } catch (WarehouseServiceException we) {
2382
          result.we = we;
2383
        }
2384
        return result;
2385
      }
2386
    }
2387
 
5711 mandeep.dh 2388
    private static class getInventoryAge<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryAge_args> {
2389
      public getInventoryAge() {
2390
        super("getInventoryAge");
2391
      }
2392
 
2393
      protected getInventoryAge_args getEmptyArgsInstance() {
2394
        return new getInventoryAge_args();
2395
      }
2396
 
2397
      protected getInventoryAge_result getResult(I iface, getInventoryAge_args args) throws org.apache.thrift.TException {
2398
        getInventoryAge_result result = new getInventoryAge_result();
2399
        result.success = iface.getInventoryAge();
2400
        return result;
2401
      }
2402
    }
2403
 
6322 amar.kumar 2404
    private static class getInventoryScansForItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryScansForItem_args> {
2405
      public getInventoryScansForItem() {
2406
        super("getInventoryScansForItem");
2407
      }
2408
 
2409
      protected getInventoryScansForItem_args getEmptyArgsInstance() {
2410
        return new getInventoryScansForItem_args();
2411
      }
2412
 
2413
      protected getInventoryScansForItem_result getResult(I iface, getInventoryScansForItem_args args) throws org.apache.thrift.TException {
2414
        getInventoryScansForItem_result result = new getInventoryScansForItem_result();
2415
        result.success = iface.getInventoryScansForItem(args.itemId, args.fromDate, args.toDate);
2416
        return result;
2417
      }
2418
    }
2419
 
2420
    private static class getScanRecordsForSerialNumber<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getScanRecordsForSerialNumber_args> {
2421
      public getScanRecordsForSerialNumber() {
2422
        super("getScanRecordsForSerialNumber");
2423
      }
2424
 
2425
      protected getScanRecordsForSerialNumber_args getEmptyArgsInstance() {
2426
        return new getScanRecordsForSerialNumber_args();
2427
      }
2428
 
2429
      protected getScanRecordsForSerialNumber_result getResult(I iface, getScanRecordsForSerialNumber_args args) throws org.apache.thrift.TException {
2430
        getScanRecordsForSerialNumber_result result = new getScanRecordsForSerialNumber_result();
2431
        result.success = iface.getScanRecordsForSerialNumber(args.serialNumber);
2432
        return result;
2433
      }
2434
    }
2435
 
6467 amar.kumar 2436
    private static class scanForPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanForPurchaseReturn_args> {
2437
      public scanForPurchaseReturn() {
2438
        super("scanForPurchaseReturn");
2439
      }
2440
 
2441
      protected scanForPurchaseReturn_args getEmptyArgsInstance() {
2442
        return new scanForPurchaseReturn_args();
2443
      }
2444
 
2445
      protected scanForPurchaseReturn_result getResult(I iface, scanForPurchaseReturn_args args) throws org.apache.thrift.TException {
2446
        scanForPurchaseReturn_result result = new scanForPurchaseReturn_result();
2447
        try {
2448
          iface.scanForPurchaseReturn(args.saleReturnItems, args.vendorId);
2449
        } catch (WarehouseServiceException ex) {
2450
          result.ex = ex;
2451
        }
2452
        return result;
2453
      }
2454
    }
2455
 
6548 amar.kumar 2456
    private static class scanForLostItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanForLostItem_args> {
2457
      public scanForLostItem() {
2458
        super("scanForLostItem");
2459
      }
2460
 
2461
      protected scanForLostItem_args getEmptyArgsInstance() {
2462
        return new scanForLostItem_args();
2463
      }
2464
 
2465
      protected scanForLostItem_result getResult(I iface, scanForLostItem_args args) throws org.apache.thrift.TException {
2466
        scanForLostItem_result result = new scanForLostItem_result();
2467
        try {
2468
          iface.scanForLostItem(args.lostItems, args.vendorId);
2469
        } catch (WarehouseServiceException ex) {
2470
          result.ex = ex;
2471
        }
2472
        return result;
2473
      }
2474
    }
2475
 
2476
    private static class getCurrentSerializedInventoryByScans<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCurrentSerializedInventoryByScans_args> {
2477
      public getCurrentSerializedInventoryByScans() {
2478
        super("getCurrentSerializedInventoryByScans");
2479
      }
2480
 
2481
      protected getCurrentSerializedInventoryByScans_args getEmptyArgsInstance() {
2482
        return new getCurrentSerializedInventoryByScans_args();
2483
      }
2484
 
2485
      protected getCurrentSerializedInventoryByScans_result getResult(I iface, getCurrentSerializedInventoryByScans_args args) throws org.apache.thrift.TException {
2486
        getCurrentSerializedInventoryByScans_result result = new getCurrentSerializedInventoryByScans_result();
2487
        result.success = iface.getCurrentSerializedInventoryByScans();
2488
        return result;
2489
      }
2490
    }
2491
 
6630 amar.kumar 2492
    private static class getCurrentNonSerializedInventoryByScans<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCurrentNonSerializedInventoryByScans_args> {
2493
      public getCurrentNonSerializedInventoryByScans() {
2494
        super("getCurrentNonSerializedInventoryByScans");
2495
      }
2496
 
2497
      protected getCurrentNonSerializedInventoryByScans_args getEmptyArgsInstance() {
2498
        return new getCurrentNonSerializedInventoryByScans_args();
2499
      }
2500
 
2501
      protected getCurrentNonSerializedInventoryByScans_result getResult(I iface, getCurrentNonSerializedInventoryByScans_args args) throws org.apache.thrift.TException {
2502
        getCurrentNonSerializedInventoryByScans_result result = new getCurrentNonSerializedInventoryByScans_result();
2503
        result.success = iface.getCurrentNonSerializedInventoryByScans();
2504
        return result;
2505
      }
2506
    }
2507
 
6762 amar.kumar 2508
    private static class getHistoricSerializedInventoryByScans<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getHistoricSerializedInventoryByScans_args> {
2509
      public getHistoricSerializedInventoryByScans() {
2510
        super("getHistoricSerializedInventoryByScans");
2511
      }
2512
 
2513
      protected getHistoricSerializedInventoryByScans_args getEmptyArgsInstance() {
2514
        return new getHistoricSerializedInventoryByScans_args();
2515
      }
2516
 
2517
      protected getHistoricSerializedInventoryByScans_result getResult(I iface, getHistoricSerializedInventoryByScans_args args) throws org.apache.thrift.TException {
2518
        getHistoricSerializedInventoryByScans_result result = new getHistoricSerializedInventoryByScans_result();
2519
        result.success = iface.getHistoricSerializedInventoryByScans(args.date);
2520
        return result;
2521
      }
2522
    }
2523
 
2524
    private static class getHistoricNonSerializedInventoryByScans<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getHistoricNonSerializedInventoryByScans_args> {
2525
      public getHistoricNonSerializedInventoryByScans() {
2526
        super("getHistoricNonSerializedInventoryByScans");
2527
      }
2528
 
2529
      protected getHistoricNonSerializedInventoryByScans_args getEmptyArgsInstance() {
2530
        return new getHistoricNonSerializedInventoryByScans_args();
2531
      }
2532
 
2533
      protected getHistoricNonSerializedInventoryByScans_result getResult(I iface, getHistoricNonSerializedInventoryByScans_args args) throws org.apache.thrift.TException {
2534
        getHistoricNonSerializedInventoryByScans_result result = new getHistoricNonSerializedInventoryByScans_result();
2535
        result.success = iface.getHistoricNonSerializedInventoryByScans(args.date);
2536
        return result;
2537
      }
2538
    }
2539
 
2540
    private static class scanForOursExternalSale<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanForOursExternalSale_args> {
2541
      public scanForOursExternalSale() {
2542
        super("scanForOursExternalSale");
2543
      }
2544
 
2545
      protected scanForOursExternalSale_args getEmptyArgsInstance() {
2546
        return new scanForOursExternalSale_args();
2547
      }
2548
 
2549
      protected scanForOursExternalSale_result getResult(I iface, scanForOursExternalSale_args args) throws org.apache.thrift.TException {
2550
        scanForOursExternalSale_result result = new scanForOursExternalSale_result();
2551
        try {
2552
          result.success = iface.scanForOursExternalSale(args.itemId, args.serialNumber, args.itemNumber, args.invoiceNumber, args.warehouseId, args.unitPrice, args.orderId);
2553
        } catch (WarehouseServiceException ex) {
2554
          result.ex = ex;
2555
        }
2556
        return result;
2557
      }
2558
    }
2559
 
2560
    private static class scanForOursExternalSaleReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanForOursExternalSaleReturn_args> {
2561
      public scanForOursExternalSaleReturn() {
2562
        super("scanForOursExternalSaleReturn");
2563
      }
2564
 
2565
      protected scanForOursExternalSaleReturn_args getEmptyArgsInstance() {
2566
        return new scanForOursExternalSaleReturn_args();
2567
      }
2568
 
2569
      protected scanForOursExternalSaleReturn_result getResult(I iface, scanForOursExternalSaleReturn_args args) throws org.apache.thrift.TException {
2570
        scanForOursExternalSaleReturn_result result = new scanForOursExternalSaleReturn_result();
2571
        iface.scanForOursExternalSaleReturn(args.orderId, args.unitPrice);
2572
        return result;
2573
      }
2574
    }
2575
 
6880 amar.kumar 2576
    private static class getMovementNonSerializedInventoryByScans<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getMovementNonSerializedInventoryByScans_args> {
2577
      public getMovementNonSerializedInventoryByScans() {
2578
        super("getMovementNonSerializedInventoryByScans");
2579
      }
2580
 
2581
      protected getMovementNonSerializedInventoryByScans_args getEmptyArgsInstance() {
2582
        return new getMovementNonSerializedInventoryByScans_args();
2583
      }
2584
 
2585
      protected getMovementNonSerializedInventoryByScans_result getResult(I iface, getMovementNonSerializedInventoryByScans_args args) throws org.apache.thrift.TException {
2586
        getMovementNonSerializedInventoryByScans_result result = new getMovementNonSerializedInventoryByScans_result();
2587
        result.success = iface.getMovementNonSerializedInventoryByScans(args.startDate, args.endDate);
2588
        return result;
2589
      }
2590
    }
2591
 
2592
    private static class getMovementSerializedInventoryByScans<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getMovementSerializedInventoryByScans_args> {
2593
      public getMovementSerializedInventoryByScans() {
2594
        super("getMovementSerializedInventoryByScans");
2595
      }
2596
 
2597
      protected getMovementSerializedInventoryByScans_args getEmptyArgsInstance() {
2598
        return new getMovementSerializedInventoryByScans_args();
2599
      }
2600
 
2601
      protected getMovementSerializedInventoryByScans_result getResult(I iface, getMovementSerializedInventoryByScans_args args) throws org.apache.thrift.TException {
2602
        getMovementSerializedInventoryByScans_result result = new getMovementSerializedInventoryByScans_result();
2603
        result.success = iface.getMovementSerializedInventoryByScans(args.startDate, args.endDate);
2604
        return result;
2605
      }
2606
    }
2607
 
7190 amar.kumar 2608
    private static class scanfreebie<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanfreebie_args> {
2609
      public scanfreebie() {
2610
        super("scanfreebie");
2611
      }
2612
 
2613
      protected scanfreebie_args getEmptyArgsInstance() {
2614
        return new scanfreebie_args();
2615
      }
2616
 
2617
      protected scanfreebie_result getResult(I iface, scanfreebie_args args) throws org.apache.thrift.TException {
2618
        scanfreebie_result result = new scanfreebie_result();
2619
        try {
2620
          result.success = iface.scanfreebie(args.orderId, args.freebieItemId, args.freebieWarehouseId, args.scanType);
2621
        } catch (WarehouseServiceException wex) {
2622
          result.wex = wex;
2623
        }
2624
        return result;
2625
      }
2626
    }
2627
 
7199 amar.kumar 2628
    private static class reshipfreebie<I extends Iface> extends org.apache.thrift.ProcessFunction<I, reshipfreebie_args> {
2629
      public reshipfreebie() {
2630
        super("reshipfreebie");
2631
      }
2632
 
2633
      protected reshipfreebie_args getEmptyArgsInstance() {
2634
        return new reshipfreebie_args();
2635
      }
2636
 
2637
      protected reshipfreebie_result getResult(I iface, reshipfreebie_args args) throws org.apache.thrift.TException {
2638
        reshipfreebie_result result = new reshipfreebie_result();
2639
        try {
2640
          iface.reshipfreebie(args.oldOrderId, args.newOrderId, args.freebieItemId, args.scanType);
2641
        } catch (WarehouseServiceException wex) {
2642
          result.wex = wex;
2643
        }
2644
        return result;
2645
      }
2646
    }
2647
 
2820 chandransh 2648
  }
2649
 
4496 mandeep.dh 2650
  public static class getInventoryItem_args implements org.apache.thrift.TBase<getInventoryItem_args, getInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
2651
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_args");
2832 chandransh 2652
 
4496 mandeep.dh 2653
    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 2654
 
4496 mandeep.dh 2655
    private String serialNumber; // required
2832 chandransh 2656
 
2657
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2658
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 2659
      SERIAL_NUMBER((short)1, "serialNumber");
2832 chandransh 2660
 
2661
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2662
 
2663
      static {
2664
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2665
          byName.put(field.getFieldName(), field);
2666
        }
2667
      }
2668
 
2669
      /**
2670
       * Find the _Fields constant that matches fieldId, or null if its not found.
2671
       */
2672
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2673
        switch(fieldId) {
4496 mandeep.dh 2674
          case 1: // SERIAL_NUMBER
2675
            return SERIAL_NUMBER;
3430 rajveer 2676
          default:
2677
            return null;
2678
        }
2832 chandransh 2679
      }
2680
 
2681
      /**
2682
       * Find the _Fields constant that matches fieldId, throwing an exception
2683
       * if it is not found.
2684
       */
2685
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2686
        _Fields fields = findByThriftId(fieldId);
2687
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2688
        return fields;
2689
      }
2690
 
2691
      /**
2692
       * Find the _Fields constant that matches name, or null if its not found.
2693
       */
2694
      public static _Fields findByName(String name) {
2695
        return byName.get(name);
2696
      }
2697
 
2698
      private final short _thriftId;
2699
      private final String _fieldName;
2700
 
2701
      _Fields(short thriftId, String fieldName) {
2702
        _thriftId = thriftId;
2703
        _fieldName = fieldName;
2704
      }
2705
 
2706
      public short getThriftFieldId() {
2707
        return _thriftId;
2708
      }
2709
 
2710
      public String getFieldName() {
2711
        return _fieldName;
2712
      }
2713
    }
2714
 
2715
    // isset id assignments
2716
 
3430 rajveer 2717
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2832 chandransh 2718
    static {
3430 rajveer 2719
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 2720
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2721
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
3430 rajveer 2722
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 2723
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItem_args.class, metaDataMap);
2832 chandransh 2724
    }
2725
 
4496 mandeep.dh 2726
    public getInventoryItem_args() {
2832 chandransh 2727
    }
2728
 
4496 mandeep.dh 2729
    public getInventoryItem_args(
2730
      String serialNumber)
2832 chandransh 2731
    {
2732
      this();
4496 mandeep.dh 2733
      this.serialNumber = serialNumber;
2832 chandransh 2734
    }
2735
 
2736
    /**
2737
     * Performs a deep copy on <i>other</i>.
2738
     */
4496 mandeep.dh 2739
    public getInventoryItem_args(getInventoryItem_args other) {
2740
      if (other.isSetSerialNumber()) {
2741
        this.serialNumber = other.serialNumber;
2742
      }
2832 chandransh 2743
    }
2744
 
4496 mandeep.dh 2745
    public getInventoryItem_args deepCopy() {
2746
      return new getInventoryItem_args(this);
2832 chandransh 2747
    }
2748
 
3430 rajveer 2749
    @Override
2750
    public void clear() {
4496 mandeep.dh 2751
      this.serialNumber = null;
2832 chandransh 2752
    }
2753
 
4496 mandeep.dh 2754
    public String getSerialNumber() {
2755
      return this.serialNumber;
2832 chandransh 2756
    }
2757
 
4496 mandeep.dh 2758
    public void setSerialNumber(String serialNumber) {
2759
      this.serialNumber = serialNumber;
2832 chandransh 2760
    }
2761
 
4496 mandeep.dh 2762
    public void unsetSerialNumber() {
2763
      this.serialNumber = null;
2832 chandransh 2764
    }
2765
 
4496 mandeep.dh 2766
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
2767
    public boolean isSetSerialNumber() {
2768
      return this.serialNumber != null;
2832 chandransh 2769
    }
2770
 
4496 mandeep.dh 2771
    public void setSerialNumberIsSet(boolean value) {
2772
      if (!value) {
2773
        this.serialNumber = null;
2774
      }
2832 chandransh 2775
    }
2776
 
2777
    public void setFieldValue(_Fields field, Object value) {
2778
      switch (field) {
4496 mandeep.dh 2779
      case SERIAL_NUMBER:
2832 chandransh 2780
        if (value == null) {
4496 mandeep.dh 2781
          unsetSerialNumber();
2832 chandransh 2782
        } else {
4496 mandeep.dh 2783
          setSerialNumber((String)value);
2832 chandransh 2784
        }
2785
        break;
2786
 
2787
      }
2788
    }
2789
 
2790
    public Object getFieldValue(_Fields field) {
2791
      switch (field) {
4496 mandeep.dh 2792
      case SERIAL_NUMBER:
2793
        return getSerialNumber();
2832 chandransh 2794
 
2795
      }
2796
      throw new IllegalStateException();
2797
    }
2798
 
3430 rajveer 2799
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2800
    public boolean isSet(_Fields field) {
2801
      if (field == null) {
2802
        throw new IllegalArgumentException();
2803
      }
2832 chandransh 2804
 
2805
      switch (field) {
4496 mandeep.dh 2806
      case SERIAL_NUMBER:
2807
        return isSetSerialNumber();
2832 chandransh 2808
      }
2809
      throw new IllegalStateException();
2810
    }
2811
 
2812
    @Override
2813
    public boolean equals(Object that) {
2814
      if (that == null)
2815
        return false;
4496 mandeep.dh 2816
      if (that instanceof getInventoryItem_args)
2817
        return this.equals((getInventoryItem_args)that);
2832 chandransh 2818
      return false;
2819
    }
2820
 
4496 mandeep.dh 2821
    public boolean equals(getInventoryItem_args that) {
2832 chandransh 2822
      if (that == null)
2823
        return false;
2824
 
4496 mandeep.dh 2825
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
2826
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
2827
      if (this_present_serialNumber || that_present_serialNumber) {
2828
        if (!(this_present_serialNumber && that_present_serialNumber))
2832 chandransh 2829
          return false;
4496 mandeep.dh 2830
        if (!this.serialNumber.equals(that.serialNumber))
2832 chandransh 2831
          return false;
2832
      }
2833
 
2834
      return true;
2835
    }
2836
 
2837
    @Override
2838
    public int hashCode() {
2839
      return 0;
2840
    }
2841
 
4496 mandeep.dh 2842
    public int compareTo(getInventoryItem_args other) {
2832 chandransh 2843
      if (!getClass().equals(other.getClass())) {
2844
        return getClass().getName().compareTo(other.getClass().getName());
2845
      }
2846
 
2847
      int lastComparison = 0;
4496 mandeep.dh 2848
      getInventoryItem_args typedOther = (getInventoryItem_args)other;
2832 chandransh 2849
 
4496 mandeep.dh 2850
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
2832 chandransh 2851
      if (lastComparison != 0) {
2852
        return lastComparison;
2853
      }
4496 mandeep.dh 2854
      if (isSetSerialNumber()) {
2855
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
3430 rajveer 2856
        if (lastComparison != 0) {
2857
          return lastComparison;
2858
        }
2832 chandransh 2859
      }
2860
      return 0;
2861
    }
2862
 
3430 rajveer 2863
    public _Fields fieldForId(int fieldId) {
2864
      return _Fields.findByThriftId(fieldId);
2865
    }
2866
 
2867
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2868
      org.apache.thrift.protocol.TField field;
2832 chandransh 2869
      iprot.readStructBegin();
2870
      while (true)
2871
      {
2872
        field = iprot.readFieldBegin();
3430 rajveer 2873
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2832 chandransh 2874
          break;
2875
        }
3430 rajveer 2876
        switch (field.id) {
4496 mandeep.dh 2877
          case 1: // SERIAL_NUMBER
2878
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
2879
              this.serialNumber = iprot.readString();
3430 rajveer 2880
            } else { 
2881
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2882
            }
2883
            break;
2884
          default:
2885
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2832 chandransh 2886
        }
3430 rajveer 2887
        iprot.readFieldEnd();
2832 chandransh 2888
      }
2889
      iprot.readStructEnd();
2890
      validate();
2891
    }
2892
 
3430 rajveer 2893
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2832 chandransh 2894
      validate();
2895
 
2896
      oprot.writeStructBegin(STRUCT_DESC);
4496 mandeep.dh 2897
      if (this.serialNumber != null) {
2898
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
2899
        oprot.writeString(this.serialNumber);
2900
        oprot.writeFieldEnd();
2901
      }
2832 chandransh 2902
      oprot.writeFieldStop();
2903
      oprot.writeStructEnd();
2904
    }
2905
 
2906
    @Override
2907
    public String toString() {
4496 mandeep.dh 2908
      StringBuilder sb = new StringBuilder("getInventoryItem_args(");
2832 chandransh 2909
      boolean first = true;
2910
 
4496 mandeep.dh 2911
      sb.append("serialNumber:");
2912
      if (this.serialNumber == null) {
2913
        sb.append("null");
2914
      } else {
2915
        sb.append(this.serialNumber);
2916
      }
2832 chandransh 2917
      first = false;
2918
      sb.append(")");
2919
      return sb.toString();
2920
    }
2921
 
3430 rajveer 2922
    public void validate() throws org.apache.thrift.TException {
2832 chandransh 2923
      // check for required fields
2924
    }
2925
 
3430 rajveer 2926
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2927
      try {
2928
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2929
      } catch (org.apache.thrift.TException te) {
2930
        throw new java.io.IOException(te);
2931
      }
2932
    }
2933
 
2934
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2935
      try {
2936
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2937
      } catch (org.apache.thrift.TException te) {
2938
        throw new java.io.IOException(te);
2939
      }
2940
    }
2941
 
2832 chandransh 2942
  }
2943
 
4496 mandeep.dh 2944
  public static class getInventoryItem_result implements org.apache.thrift.TBase<getInventoryItem_result, getInventoryItem_result._Fields>, java.io.Serializable, Cloneable   {
2945
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_result");
2832 chandransh 2946
 
3430 rajveer 2947
    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 2948
    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 2949
 
4496 mandeep.dh 2950
    private InventoryItem success; // required
4541 mandeep.dh 2951
    private WarehouseServiceException wex; // required
2832 chandransh 2952
 
2953
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2954
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4541 mandeep.dh 2955
      SUCCESS((short)0, "success"),
2956
      WEX((short)1, "wex");
2832 chandransh 2957
 
2958
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2959
 
2960
      static {
2961
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2962
          byName.put(field.getFieldName(), field);
2963
        }
2964
      }
2965
 
2966
      /**
2967
       * Find the _Fields constant that matches fieldId, or null if its not found.
2968
       */
2969
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2970
        switch(fieldId) {
2971
          case 0: // SUCCESS
2972
            return SUCCESS;
4541 mandeep.dh 2973
          case 1: // WEX
2974
            return WEX;
3430 rajveer 2975
          default:
2976
            return null;
2977
        }
2832 chandransh 2978
      }
2979
 
2980
      /**
2981
       * Find the _Fields constant that matches fieldId, throwing an exception
2982
       * if it is not found.
2983
       */
2984
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2985
        _Fields fields = findByThriftId(fieldId);
2986
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2987
        return fields;
2988
      }
2989
 
2990
      /**
2991
       * Find the _Fields constant that matches name, or null if its not found.
2992
       */
2993
      public static _Fields findByName(String name) {
2994
        return byName.get(name);
2995
      }
2996
 
2997
      private final short _thriftId;
2998
      private final String _fieldName;
2999
 
3000
      _Fields(short thriftId, String fieldName) {
3001
        _thriftId = thriftId;
3002
        _fieldName = fieldName;
3003
      }
3004
 
3005
      public short getThriftFieldId() {
3006
        return _thriftId;
3007
      }
3008
 
3009
      public String getFieldName() {
3010
        return _fieldName;
3011
      }
3012
    }
3013
 
3014
    // isset id assignments
3015
 
3430 rajveer 3016
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2832 chandransh 3017
    static {
3430 rajveer 3018
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3019
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 3020
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
4541 mandeep.dh 3021
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3022
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3430 rajveer 3023
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 3024
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItem_result.class, metaDataMap);
2832 chandransh 3025
    }
3026
 
4496 mandeep.dh 3027
    public getInventoryItem_result() {
2832 chandransh 3028
    }
3029
 
4496 mandeep.dh 3030
    public getInventoryItem_result(
4541 mandeep.dh 3031
      InventoryItem success,
3032
      WarehouseServiceException wex)
2832 chandransh 3033
    {
3034
      this();
3035
      this.success = success;
4541 mandeep.dh 3036
      this.wex = wex;
2832 chandransh 3037
    }
3038
 
3039
    /**
3040
     * Performs a deep copy on <i>other</i>.
3041
     */
4496 mandeep.dh 3042
    public getInventoryItem_result(getInventoryItem_result other) {
2832 chandransh 3043
      if (other.isSetSuccess()) {
4496 mandeep.dh 3044
        this.success = new InventoryItem(other.success);
2832 chandransh 3045
      }
4541 mandeep.dh 3046
      if (other.isSetWex()) {
3047
        this.wex = new WarehouseServiceException(other.wex);
3048
      }
2832 chandransh 3049
    }
3050
 
4496 mandeep.dh 3051
    public getInventoryItem_result deepCopy() {
3052
      return new getInventoryItem_result(this);
2832 chandransh 3053
    }
3054
 
3430 rajveer 3055
    @Override
3056
    public void clear() {
3057
      this.success = null;
4541 mandeep.dh 3058
      this.wex = null;
2832 chandransh 3059
    }
3060
 
4496 mandeep.dh 3061
    public InventoryItem getSuccess() {
2832 chandransh 3062
      return this.success;
3063
    }
3064
 
4496 mandeep.dh 3065
    public void setSuccess(InventoryItem success) {
2832 chandransh 3066
      this.success = success;
3067
    }
3068
 
3069
    public void unsetSuccess() {
3070
      this.success = null;
3071
    }
3072
 
3430 rajveer 3073
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2832 chandransh 3074
    public boolean isSetSuccess() {
3075
      return this.success != null;
3076
    }
3077
 
3078
    public void setSuccessIsSet(boolean value) {
3079
      if (!value) {
3080
        this.success = null;
3081
      }
3082
    }
3083
 
4541 mandeep.dh 3084
    public WarehouseServiceException getWex() {
3085
      return this.wex;
3086
    }
3087
 
3088
    public void setWex(WarehouseServiceException wex) {
3089
      this.wex = wex;
3090
    }
3091
 
3092
    public void unsetWex() {
3093
      this.wex = null;
3094
    }
3095
 
3096
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
3097
    public boolean isSetWex() {
3098
      return this.wex != null;
3099
    }
3100
 
3101
    public void setWexIsSet(boolean value) {
3102
      if (!value) {
3103
        this.wex = null;
3104
      }
3105
    }
3106
 
2832 chandransh 3107
    public void setFieldValue(_Fields field, Object value) {
3108
      switch (field) {
3109
      case SUCCESS:
3110
        if (value == null) {
3111
          unsetSuccess();
3112
        } else {
4496 mandeep.dh 3113
          setSuccess((InventoryItem)value);
2832 chandransh 3114
        }
3115
        break;
3116
 
4541 mandeep.dh 3117
      case WEX:
3118
        if (value == null) {
3119
          unsetWex();
3120
        } else {
3121
          setWex((WarehouseServiceException)value);
3122
        }
3123
        break;
3124
 
2832 chandransh 3125
      }
3126
    }
3127
 
3128
    public Object getFieldValue(_Fields field) {
3129
      switch (field) {
3130
      case SUCCESS:
3131
        return getSuccess();
3132
 
4541 mandeep.dh 3133
      case WEX:
3134
        return getWex();
3135
 
2832 chandransh 3136
      }
3137
      throw new IllegalStateException();
3138
    }
3139
 
3430 rajveer 3140
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3141
    public boolean isSet(_Fields field) {
3142
      if (field == null) {
3143
        throw new IllegalArgumentException();
3144
      }
2832 chandransh 3145
 
3146
      switch (field) {
3147
      case SUCCESS:
3148
        return isSetSuccess();
4541 mandeep.dh 3149
      case WEX:
3150
        return isSetWex();
2832 chandransh 3151
      }
3152
      throw new IllegalStateException();
3153
    }
3154
 
3155
    @Override
3156
    public boolean equals(Object that) {
3157
      if (that == null)
3158
        return false;
4496 mandeep.dh 3159
      if (that instanceof getInventoryItem_result)
3160
        return this.equals((getInventoryItem_result)that);
2832 chandransh 3161
      return false;
3162
    }
3163
 
4496 mandeep.dh 3164
    public boolean equals(getInventoryItem_result that) {
2832 chandransh 3165
      if (that == null)
3166
        return false;
3167
 
3168
      boolean this_present_success = true && this.isSetSuccess();
3169
      boolean that_present_success = true && that.isSetSuccess();
3170
      if (this_present_success || that_present_success) {
3171
        if (!(this_present_success && that_present_success))
3172
          return false;
3173
        if (!this.success.equals(that.success))
3174
          return false;
3175
      }
3176
 
4541 mandeep.dh 3177
      boolean this_present_wex = true && this.isSetWex();
3178
      boolean that_present_wex = true && that.isSetWex();
3179
      if (this_present_wex || that_present_wex) {
3180
        if (!(this_present_wex && that_present_wex))
3181
          return false;
3182
        if (!this.wex.equals(that.wex))
3183
          return false;
3184
      }
3185
 
2832 chandransh 3186
      return true;
3187
    }
3188
 
3189
    @Override
3190
    public int hashCode() {
3191
      return 0;
3192
    }
3193
 
4496 mandeep.dh 3194
    public int compareTo(getInventoryItem_result other) {
2832 chandransh 3195
      if (!getClass().equals(other.getClass())) {
3196
        return getClass().getName().compareTo(other.getClass().getName());
3197
      }
3198
 
3199
      int lastComparison = 0;
4496 mandeep.dh 3200
      getInventoryItem_result typedOther = (getInventoryItem_result)other;
2832 chandransh 3201
 
3430 rajveer 3202
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2832 chandransh 3203
      if (lastComparison != 0) {
3204
        return lastComparison;
3205
      }
3430 rajveer 3206
      if (isSetSuccess()) {
3207
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3208
        if (lastComparison != 0) {
3209
          return lastComparison;
3210
        }
2832 chandransh 3211
      }
4541 mandeep.dh 3212
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
3213
      if (lastComparison != 0) {
3214
        return lastComparison;
3215
      }
3216
      if (isSetWex()) {
3217
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
3218
        if (lastComparison != 0) {
3219
          return lastComparison;
3220
        }
3221
      }
2832 chandransh 3222
      return 0;
3223
    }
3224
 
3430 rajveer 3225
    public _Fields fieldForId(int fieldId) {
3226
      return _Fields.findByThriftId(fieldId);
3227
    }
3228
 
3229
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3230
      org.apache.thrift.protocol.TField field;
2832 chandransh 3231
      iprot.readStructBegin();
3232
      while (true)
3233
      {
3234
        field = iprot.readFieldBegin();
3430 rajveer 3235
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2832 chandransh 3236
          break;
3237
        }
3430 rajveer 3238
        switch (field.id) {
3239
          case 0: // SUCCESS
3240
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4496 mandeep.dh 3241
              this.success = new InventoryItem();
3430 rajveer 3242
              this.success.read(iprot);
3243
            } else { 
3244
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3245
            }
3246
            break;
4541 mandeep.dh 3247
          case 1: // WEX
3248
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3249
              this.wex = new WarehouseServiceException();
3250
              this.wex.read(iprot);
3251
            } else { 
3252
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3253
            }
3254
            break;
3430 rajveer 3255
          default:
3256
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2832 chandransh 3257
        }
3430 rajveer 3258
        iprot.readFieldEnd();
2832 chandransh 3259
      }
3260
      iprot.readStructEnd();
3261
      validate();
3262
    }
3263
 
3430 rajveer 3264
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2832 chandransh 3265
      oprot.writeStructBegin(STRUCT_DESC);
3266
 
3267
      if (this.isSetSuccess()) {
3268
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3269
        this.success.write(oprot);
3270
        oprot.writeFieldEnd();
4541 mandeep.dh 3271
      } else if (this.isSetWex()) {
3272
        oprot.writeFieldBegin(WEX_FIELD_DESC);
3273
        this.wex.write(oprot);
3274
        oprot.writeFieldEnd();
2832 chandransh 3275
      }
3276
      oprot.writeFieldStop();
3277
      oprot.writeStructEnd();
3278
    }
3279
 
3280
    @Override
3281
    public String toString() {
4496 mandeep.dh 3282
      StringBuilder sb = new StringBuilder("getInventoryItem_result(");
2832 chandransh 3283
      boolean first = true;
3284
 
3285
      sb.append("success:");
3286
      if (this.success == null) {
3287
        sb.append("null");
3288
      } else {
3289
        sb.append(this.success);
3290
      }
3291
      first = false;
4541 mandeep.dh 3292
      if (!first) sb.append(", ");
3293
      sb.append("wex:");
3294
      if (this.wex == null) {
3295
        sb.append("null");
3296
      } else {
3297
        sb.append(this.wex);
3298
      }
3299
      first = false;
2832 chandransh 3300
      sb.append(")");
3301
      return sb.toString();
3302
    }
3303
 
3430 rajveer 3304
    public void validate() throws org.apache.thrift.TException {
2832 chandransh 3305
      // check for required fields
3306
    }
3307
 
3430 rajveer 3308
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3309
      try {
3310
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3311
      } catch (org.apache.thrift.TException te) {
3312
        throw new java.io.IOException(te);
3313
      }
3314
    }
3315
 
3316
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3317
      try {
3318
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3319
      } catch (org.apache.thrift.TException te) {
3320
        throw new java.io.IOException(te);
3321
      }
3322
    }
3323
 
2832 chandransh 3324
  }
3325
 
5361 mandeep.dh 3326
  public static class getNonSeralizedInventoryItem_args implements org.apache.thrift.TBase<getNonSeralizedInventoryItem_args, getNonSeralizedInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
3327
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNonSeralizedInventoryItem_args");
2820 chandransh 3328
 
5530 mandeep.dh 3329
    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);
3330
    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);
3331
    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 3332
 
5530 mandeep.dh 3333
    private String itemNumber; // required
4496 mandeep.dh 3334
    private long itemId; // required
5530 mandeep.dh 3335
    private long fulfilmentWarehouseId; // required
2820 chandransh 3336
 
3337
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 3338
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5530 mandeep.dh 3339
      ITEM_NUMBER((short)1, "itemNumber"),
3340
      ITEM_ID((short)2, "itemId"),
3341
      FULFILMENT_WAREHOUSE_ID((short)3, "fulfilmentWarehouseId");
2820 chandransh 3342
 
3343
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3344
 
3345
      static {
3346
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3347
          byName.put(field.getFieldName(), field);
3348
        }
3349
      }
3350
 
3351
      /**
3352
       * Find the _Fields constant that matches fieldId, or null if its not found.
3353
       */
3354
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 3355
        switch(fieldId) {
5530 mandeep.dh 3356
          case 1: // ITEM_NUMBER
3357
            return ITEM_NUMBER;
3358
          case 2: // ITEM_ID
4496 mandeep.dh 3359
            return ITEM_ID;
5530 mandeep.dh 3360
          case 3: // FULFILMENT_WAREHOUSE_ID
3361
            return FULFILMENT_WAREHOUSE_ID;
3430 rajveer 3362
          default:
3363
            return null;
3364
        }
2820 chandransh 3365
      }
3366
 
3367
      /**
3368
       * Find the _Fields constant that matches fieldId, throwing an exception
3369
       * if it is not found.
3370
       */
3371
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3372
        _Fields fields = findByThriftId(fieldId);
3373
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3374
        return fields;
3375
      }
3376
 
3377
      /**
3378
       * Find the _Fields constant that matches name, or null if its not found.
3379
       */
3380
      public static _Fields findByName(String name) {
3381
        return byName.get(name);
3382
      }
3383
 
3384
      private final short _thriftId;
3385
      private final String _fieldName;
3386
 
3387
      _Fields(short thriftId, String fieldName) {
3388
        _thriftId = thriftId;
3389
        _fieldName = fieldName;
3390
      }
3391
 
3392
      public short getThriftFieldId() {
3393
        return _thriftId;
3394
      }
3395
 
3396
      public String getFieldName() {
3397
        return _fieldName;
3398
      }
3399
    }
3400
 
3401
    // isset id assignments
4496 mandeep.dh 3402
    private static final int __ITEMID_ISSET_ID = 0;
5530 mandeep.dh 3403
    private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 1;
5361 mandeep.dh 3404
    private BitSet __isset_bit_vector = new BitSet(2);
2820 chandransh 3405
 
3430 rajveer 3406
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 3407
    static {
3430 rajveer 3408
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5530 mandeep.dh 3409
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3410
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
4496 mandeep.dh 3411
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3430 rajveer 3412
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5530 mandeep.dh 3413
      tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 3414
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 3415
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5361 mandeep.dh 3416
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNonSeralizedInventoryItem_args.class, metaDataMap);
2820 chandransh 3417
    }
3418
 
5361 mandeep.dh 3419
    public getNonSeralizedInventoryItem_args() {
2820 chandransh 3420
    }
3421
 
5361 mandeep.dh 3422
    public getNonSeralizedInventoryItem_args(
5530 mandeep.dh 3423
      String itemNumber,
4496 mandeep.dh 3424
      long itemId,
5530 mandeep.dh 3425
      long fulfilmentWarehouseId)
2820 chandransh 3426
    {
3427
      this();
5530 mandeep.dh 3428
      this.itemNumber = itemNumber;
4496 mandeep.dh 3429
      this.itemId = itemId;
3430
      setItemIdIsSet(true);
5530 mandeep.dh 3431
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
3432
      setFulfilmentWarehouseIdIsSet(true);
2820 chandransh 3433
    }
3434
 
3435
    /**
3436
     * Performs a deep copy on <i>other</i>.
3437
     */
5361 mandeep.dh 3438
    public getNonSeralizedInventoryItem_args(getNonSeralizedInventoryItem_args other) {
2820 chandransh 3439
      __isset_bit_vector.clear();
3440
      __isset_bit_vector.or(other.__isset_bit_vector);
5530 mandeep.dh 3441
      if (other.isSetItemNumber()) {
3442
        this.itemNumber = other.itemNumber;
3443
      }
4496 mandeep.dh 3444
      this.itemId = other.itemId;
5530 mandeep.dh 3445
      this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
2820 chandransh 3446
    }
3447
 
5361 mandeep.dh 3448
    public getNonSeralizedInventoryItem_args deepCopy() {
3449
      return new getNonSeralizedInventoryItem_args(this);
2820 chandransh 3450
    }
3451
 
3430 rajveer 3452
    @Override
3453
    public void clear() {
5530 mandeep.dh 3454
      this.itemNumber = null;
4496 mandeep.dh 3455
      setItemIdIsSet(false);
3456
      this.itemId = 0;
5530 mandeep.dh 3457
      setFulfilmentWarehouseIdIsSet(false);
3458
      this.fulfilmentWarehouseId = 0;
2820 chandransh 3459
    }
3460
 
5530 mandeep.dh 3461
    public String getItemNumber() {
3462
      return this.itemNumber;
3463
    }
3464
 
3465
    public void setItemNumber(String itemNumber) {
3466
      this.itemNumber = itemNumber;
3467
    }
3468
 
3469
    public void unsetItemNumber() {
3470
      this.itemNumber = null;
3471
    }
3472
 
3473
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
3474
    public boolean isSetItemNumber() {
3475
      return this.itemNumber != null;
3476
    }
3477
 
3478
    public void setItemNumberIsSet(boolean value) {
3479
      if (!value) {
3480
        this.itemNumber = null;
3481
      }
3482
    }
3483
 
4496 mandeep.dh 3484
    public long getItemId() {
3485
      return this.itemId;
2820 chandransh 3486
    }
3487
 
4496 mandeep.dh 3488
    public void setItemId(long itemId) {
3489
      this.itemId = itemId;
3490
      setItemIdIsSet(true);
2820 chandransh 3491
    }
3492
 
4496 mandeep.dh 3493
    public void unsetItemId() {
3494
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
2820 chandransh 3495
    }
3496
 
4496 mandeep.dh 3497
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
3498
    public boolean isSetItemId() {
3499
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
2820 chandransh 3500
    }
3501
 
4496 mandeep.dh 3502
    public void setItemIdIsSet(boolean value) {
3503
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
2820 chandransh 3504
    }
3505
 
5530 mandeep.dh 3506
    public long getFulfilmentWarehouseId() {
3507
      return this.fulfilmentWarehouseId;
2820 chandransh 3508
    }
3509
 
5530 mandeep.dh 3510
    public void setFulfilmentWarehouseId(long fulfilmentWarehouseId) {
3511
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
3512
      setFulfilmentWarehouseIdIsSet(true);
2820 chandransh 3513
    }
3514
 
5530 mandeep.dh 3515
    public void unsetFulfilmentWarehouseId() {
3516
      __isset_bit_vector.clear(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 3517
    }
3518
 
5530 mandeep.dh 3519
    /** Returns true if field fulfilmentWarehouseId is set (has been assigned a value) and false otherwise */
3520
    public boolean isSetFulfilmentWarehouseId() {
3521
      return __isset_bit_vector.get(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 3522
    }
3523
 
5530 mandeep.dh 3524
    public void setFulfilmentWarehouseIdIsSet(boolean value) {
3525
      __isset_bit_vector.set(__FULFILMENTWAREHOUSEID_ISSET_ID, value);
2820 chandransh 3526
    }
3527
 
3528
    public void setFieldValue(_Fields field, Object value) {
3529
      switch (field) {
5530 mandeep.dh 3530
      case ITEM_NUMBER:
3531
        if (value == null) {
3532
          unsetItemNumber();
3533
        } else {
3534
          setItemNumber((String)value);
3535
        }
3536
        break;
3537
 
4496 mandeep.dh 3538
      case ITEM_ID:
2820 chandransh 3539
        if (value == null) {
4496 mandeep.dh 3540
          unsetItemId();
2820 chandransh 3541
        } else {
4496 mandeep.dh 3542
          setItemId((Long)value);
2820 chandransh 3543
        }
3544
        break;
3545
 
5530 mandeep.dh 3546
      case FULFILMENT_WAREHOUSE_ID:
2820 chandransh 3547
        if (value == null) {
5530 mandeep.dh 3548
          unsetFulfilmentWarehouseId();
2820 chandransh 3549
        } else {
5530 mandeep.dh 3550
          setFulfilmentWarehouseId((Long)value);
2820 chandransh 3551
        }
3552
        break;
3553
 
3554
      }
3555
    }
3556
 
3557
    public Object getFieldValue(_Fields field) {
3558
      switch (field) {
5530 mandeep.dh 3559
      case ITEM_NUMBER:
3560
        return getItemNumber();
3561
 
4496 mandeep.dh 3562
      case ITEM_ID:
3563
        return Long.valueOf(getItemId());
2820 chandransh 3564
 
5530 mandeep.dh 3565
      case FULFILMENT_WAREHOUSE_ID:
3566
        return Long.valueOf(getFulfilmentWarehouseId());
2820 chandransh 3567
 
3568
      }
3569
      throw new IllegalStateException();
3570
    }
3571
 
3430 rajveer 3572
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3573
    public boolean isSet(_Fields field) {
3574
      if (field == null) {
3575
        throw new IllegalArgumentException();
3576
      }
2820 chandransh 3577
 
3578
      switch (field) {
5530 mandeep.dh 3579
      case ITEM_NUMBER:
3580
        return isSetItemNumber();
4496 mandeep.dh 3581
      case ITEM_ID:
3582
        return isSetItemId();
5530 mandeep.dh 3583
      case FULFILMENT_WAREHOUSE_ID:
3584
        return isSetFulfilmentWarehouseId();
2820 chandransh 3585
      }
3586
      throw new IllegalStateException();
3587
    }
3588
 
3589
    @Override
3590
    public boolean equals(Object that) {
3591
      if (that == null)
3592
        return false;
5361 mandeep.dh 3593
      if (that instanceof getNonSeralizedInventoryItem_args)
3594
        return this.equals((getNonSeralizedInventoryItem_args)that);
2820 chandransh 3595
      return false;
3596
    }
3597
 
5361 mandeep.dh 3598
    public boolean equals(getNonSeralizedInventoryItem_args that) {
2820 chandransh 3599
      if (that == null)
3600
        return false;
3601
 
5530 mandeep.dh 3602
      boolean this_present_itemNumber = true && this.isSetItemNumber();
3603
      boolean that_present_itemNumber = true && that.isSetItemNumber();
3604
      if (this_present_itemNumber || that_present_itemNumber) {
3605
        if (!(this_present_itemNumber && that_present_itemNumber))
3606
          return false;
3607
        if (!this.itemNumber.equals(that.itemNumber))
3608
          return false;
3609
      }
3610
 
4496 mandeep.dh 3611
      boolean this_present_itemId = true;
3612
      boolean that_present_itemId = true;
3613
      if (this_present_itemId || that_present_itemId) {
3614
        if (!(this_present_itemId && that_present_itemId))
2820 chandransh 3615
          return false;
4496 mandeep.dh 3616
        if (this.itemId != that.itemId)
2820 chandransh 3617
          return false;
3618
      }
3619
 
5530 mandeep.dh 3620
      boolean this_present_fulfilmentWarehouseId = true;
3621
      boolean that_present_fulfilmentWarehouseId = true;
3622
      if (this_present_fulfilmentWarehouseId || that_present_fulfilmentWarehouseId) {
3623
        if (!(this_present_fulfilmentWarehouseId && that_present_fulfilmentWarehouseId))
2820 chandransh 3624
          return false;
5530 mandeep.dh 3625
        if (this.fulfilmentWarehouseId != that.fulfilmentWarehouseId)
2820 chandransh 3626
          return false;
3627
      }
3628
 
3629
      return true;
3630
    }
3631
 
3632
    @Override
3633
    public int hashCode() {
3634
      return 0;
3635
    }
3636
 
5361 mandeep.dh 3637
    public int compareTo(getNonSeralizedInventoryItem_args other) {
2820 chandransh 3638
      if (!getClass().equals(other.getClass())) {
3639
        return getClass().getName().compareTo(other.getClass().getName());
3640
      }
3641
 
3642
      int lastComparison = 0;
5361 mandeep.dh 3643
      getNonSeralizedInventoryItem_args typedOther = (getNonSeralizedInventoryItem_args)other;
2820 chandransh 3644
 
5530 mandeep.dh 3645
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
3646
      if (lastComparison != 0) {
3647
        return lastComparison;
3648
      }
3649
      if (isSetItemNumber()) {
3650
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
3651
        if (lastComparison != 0) {
3652
          return lastComparison;
3653
        }
3654
      }
4496 mandeep.dh 3655
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
2820 chandransh 3656
      if (lastComparison != 0) {
3657
        return lastComparison;
3658
      }
4496 mandeep.dh 3659
      if (isSetItemId()) {
3660
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
3430 rajveer 3661
        if (lastComparison != 0) {
3662
          return lastComparison;
3663
        }
2820 chandransh 3664
      }
5530 mandeep.dh 3665
      lastComparison = Boolean.valueOf(isSetFulfilmentWarehouseId()).compareTo(typedOther.isSetFulfilmentWarehouseId());
2820 chandransh 3666
      if (lastComparison != 0) {
3667
        return lastComparison;
3668
      }
5530 mandeep.dh 3669
      if (isSetFulfilmentWarehouseId()) {
3670
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilmentWarehouseId, typedOther.fulfilmentWarehouseId);
3430 rajveer 3671
        if (lastComparison != 0) {
3672
          return lastComparison;
3673
        }
2820 chandransh 3674
      }
3675
      return 0;
3676
    }
3677
 
3430 rajveer 3678
    public _Fields fieldForId(int fieldId) {
3679
      return _Fields.findByThriftId(fieldId);
3680
    }
3681
 
3682
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3683
      org.apache.thrift.protocol.TField field;
2820 chandransh 3684
      iprot.readStructBegin();
3685
      while (true)
3686
      {
3687
        field = iprot.readFieldBegin();
3430 rajveer 3688
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 3689
          break;
3690
        }
3430 rajveer 3691
        switch (field.id) {
5530 mandeep.dh 3692
          case 1: // ITEM_NUMBER
3693
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
3694
              this.itemNumber = iprot.readString();
3695
            } else { 
3696
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3697
            }
3698
            break;
3699
          case 2: // ITEM_ID
3430 rajveer 3700
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4496 mandeep.dh 3701
              this.itemId = iprot.readI64();
3702
              setItemIdIsSet(true);
3430 rajveer 3703
            } else { 
3704
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3705
            }
3706
            break;
5530 mandeep.dh 3707
          case 3: // FULFILMENT_WAREHOUSE_ID
4496 mandeep.dh 3708
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5530 mandeep.dh 3709
              this.fulfilmentWarehouseId = iprot.readI64();
3710
              setFulfilmentWarehouseIdIsSet(true);
3430 rajveer 3711
            } else { 
3712
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3713
            }
3714
            break;
3715
          default:
3716
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 3717
        }
3430 rajveer 3718
        iprot.readFieldEnd();
2820 chandransh 3719
      }
3720
      iprot.readStructEnd();
3721
      validate();
3722
    }
3723
 
3430 rajveer 3724
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 3725
      validate();
3726
 
3727
      oprot.writeStructBegin(STRUCT_DESC);
5530 mandeep.dh 3728
      if (this.itemNumber != null) {
3729
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
3730
        oprot.writeString(this.itemNumber);
3731
        oprot.writeFieldEnd();
3732
      }
4496 mandeep.dh 3733
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
3734
      oprot.writeI64(this.itemId);
2820 chandransh 3735
      oprot.writeFieldEnd();
5530 mandeep.dh 3736
      oprot.writeFieldBegin(FULFILMENT_WAREHOUSE_ID_FIELD_DESC);
3737
      oprot.writeI64(this.fulfilmentWarehouseId);
2820 chandransh 3738
      oprot.writeFieldEnd();
3739
      oprot.writeFieldStop();
3740
      oprot.writeStructEnd();
3741
    }
3742
 
3743
    @Override
3744
    public String toString() {
5361 mandeep.dh 3745
      StringBuilder sb = new StringBuilder("getNonSeralizedInventoryItem_args(");
2820 chandransh 3746
      boolean first = true;
3747
 
5530 mandeep.dh 3748
      sb.append("itemNumber:");
3749
      if (this.itemNumber == null) {
3750
        sb.append("null");
3751
      } else {
3752
        sb.append(this.itemNumber);
3753
      }
3754
      first = false;
3755
      if (!first) sb.append(", ");
4496 mandeep.dh 3756
      sb.append("itemId:");
3757
      sb.append(this.itemId);
2820 chandransh 3758
      first = false;
3759
      if (!first) sb.append(", ");
5530 mandeep.dh 3760
      sb.append("fulfilmentWarehouseId:");
3761
      sb.append(this.fulfilmentWarehouseId);
2820 chandransh 3762
      first = false;
3763
      sb.append(")");
3764
      return sb.toString();
3765
    }
3766
 
3430 rajveer 3767
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 3768
      // check for required fields
3769
    }
3770
 
3430 rajveer 3771
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3772
      try {
3773
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3774
      } catch (org.apache.thrift.TException te) {
3775
        throw new java.io.IOException(te);
3776
      }
3777
    }
3778
 
3779
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3780
      try {
4496 mandeep.dh 3781
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
3782
        __isset_bit_vector = new BitSet(1);
3430 rajveer 3783
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3784
      } catch (org.apache.thrift.TException te) {
3785
        throw new java.io.IOException(te);
3786
      }
3787
    }
3788
 
2820 chandransh 3789
  }
3790
 
5361 mandeep.dh 3791
  public static class getNonSeralizedInventoryItem_result implements org.apache.thrift.TBase<getNonSeralizedInventoryItem_result, getNonSeralizedInventoryItem_result._Fields>, java.io.Serializable, Cloneable   {
3792
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNonSeralizedInventoryItem_result");
2820 chandransh 3793
 
5361 mandeep.dh 3794
    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);
3795
    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 3796
 
5361 mandeep.dh 3797
    private InventoryItem success; // required
3798
    private WarehouseServiceException wex; // required
2820 chandransh 3799
 
3800
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 3801
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 3802
      SUCCESS((short)0, "success"),
3803
      WEX((short)1, "wex");
2820 chandransh 3804
 
3805
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3806
 
3807
      static {
3808
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3809
          byName.put(field.getFieldName(), field);
3810
        }
3811
      }
3812
 
3813
      /**
3814
       * Find the _Fields constant that matches fieldId, or null if its not found.
3815
       */
3816
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 3817
        switch(fieldId) {
3818
          case 0: // SUCCESS
3819
            return SUCCESS;
5361 mandeep.dh 3820
          case 1: // WEX
3821
            return WEX;
3430 rajveer 3822
          default:
3823
            return null;
3824
        }
2820 chandransh 3825
      }
3826
 
3827
      /**
3828
       * Find the _Fields constant that matches fieldId, throwing an exception
3829
       * if it is not found.
3830
       */
3831
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3832
        _Fields fields = findByThriftId(fieldId);
3833
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3834
        return fields;
3835
      }
3836
 
3837
      /**
3838
       * Find the _Fields constant that matches name, or null if its not found.
3839
       */
3840
      public static _Fields findByName(String name) {
3841
        return byName.get(name);
3842
      }
3843
 
3844
      private final short _thriftId;
3845
      private final String _fieldName;
3846
 
3847
      _Fields(short thriftId, String fieldName) {
3848
        _thriftId = thriftId;
3849
        _fieldName = fieldName;
3850
      }
3851
 
3852
      public short getThriftFieldId() {
3853
        return _thriftId;
3854
      }
3855
 
3856
      public String getFieldName() {
3857
        return _fieldName;
3858
      }
3859
    }
3860
 
3861
    // isset id assignments
3862
 
3430 rajveer 3863
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 3864
    static {
3430 rajveer 3865
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3866
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5361 mandeep.dh 3867
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3868
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3869
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3430 rajveer 3870
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5361 mandeep.dh 3871
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNonSeralizedInventoryItem_result.class, metaDataMap);
2820 chandransh 3872
    }
3873
 
5361 mandeep.dh 3874
    public getNonSeralizedInventoryItem_result() {
2820 chandransh 3875
    }
3876
 
5361 mandeep.dh 3877
    public getNonSeralizedInventoryItem_result(
3878
      InventoryItem success,
3879
      WarehouseServiceException wex)
2820 chandransh 3880
    {
3881
      this();
3882
      this.success = success;
5361 mandeep.dh 3883
      this.wex = wex;
2820 chandransh 3884
    }
3885
 
3886
    /**
3887
     * Performs a deep copy on <i>other</i>.
3888
     */
5361 mandeep.dh 3889
    public getNonSeralizedInventoryItem_result(getNonSeralizedInventoryItem_result other) {
4496 mandeep.dh 3890
      if (other.isSetSuccess()) {
5361 mandeep.dh 3891
        this.success = new InventoryItem(other.success);
2820 chandransh 3892
      }
5361 mandeep.dh 3893
      if (other.isSetWex()) {
3894
        this.wex = new WarehouseServiceException(other.wex);
3895
      }
2820 chandransh 3896
    }
3897
 
5361 mandeep.dh 3898
    public getNonSeralizedInventoryItem_result deepCopy() {
3899
      return new getNonSeralizedInventoryItem_result(this);
2820 chandransh 3900
    }
3901
 
3430 rajveer 3902
    @Override
3903
    public void clear() {
4496 mandeep.dh 3904
      this.success = null;
5361 mandeep.dh 3905
      this.wex = null;
2820 chandransh 3906
    }
3907
 
5361 mandeep.dh 3908
    public InventoryItem getSuccess() {
2820 chandransh 3909
      return this.success;
3910
    }
3911
 
5361 mandeep.dh 3912
    public void setSuccess(InventoryItem success) {
2820 chandransh 3913
      this.success = success;
3914
    }
3915
 
3916
    public void unsetSuccess() {
4496 mandeep.dh 3917
      this.success = null;
2820 chandransh 3918
    }
3919
 
3430 rajveer 3920
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2820 chandransh 3921
    public boolean isSetSuccess() {
4496 mandeep.dh 3922
      return this.success != null;
2820 chandransh 3923
    }
3924
 
3925
    public void setSuccessIsSet(boolean value) {
4496 mandeep.dh 3926
      if (!value) {
3927
        this.success = null;
3928
      }
2820 chandransh 3929
    }
3930
 
5361 mandeep.dh 3931
    public WarehouseServiceException getWex() {
3932
      return this.wex;
2820 chandransh 3933
    }
3934
 
5361 mandeep.dh 3935
    public void setWex(WarehouseServiceException wex) {
3936
      this.wex = wex;
2820 chandransh 3937
    }
3938
 
5361 mandeep.dh 3939
    public void unsetWex() {
3940
      this.wex = null;
2820 chandransh 3941
    }
3942
 
5361 mandeep.dh 3943
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
3944
    public boolean isSetWex() {
3945
      return this.wex != null;
2820 chandransh 3946
    }
3947
 
5361 mandeep.dh 3948
    public void setWexIsSet(boolean value) {
3949
      if (!value) {
3950
        this.wex = null;
2820 chandransh 3951
      }
3952
    }
3953
 
3954
    public void setFieldValue(_Fields field, Object value) {
3955
      switch (field) {
5361 mandeep.dh 3956
      case SUCCESS:
2820 chandransh 3957
        if (value == null) {
5361 mandeep.dh 3958
          unsetSuccess();
2820 chandransh 3959
        } else {
5361 mandeep.dh 3960
          setSuccess((InventoryItem)value);
2820 chandransh 3961
        }
3962
        break;
3963
 
5361 mandeep.dh 3964
      case WEX:
2820 chandransh 3965
        if (value == null) {
5361 mandeep.dh 3966
          unsetWex();
2820 chandransh 3967
        } else {
5361 mandeep.dh 3968
          setWex((WarehouseServiceException)value);
2820 chandransh 3969
        }
3970
        break;
3971
 
3972
      }
3973
    }
3974
 
3975
    public Object getFieldValue(_Fields field) {
3976
      switch (field) {
3977
      case SUCCESS:
4496 mandeep.dh 3978
        return getSuccess();
2820 chandransh 3979
 
5361 mandeep.dh 3980
      case WEX:
3981
        return getWex();
3982
 
2820 chandransh 3983
      }
3984
      throw new IllegalStateException();
3985
    }
3986
 
3430 rajveer 3987
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3988
    public boolean isSet(_Fields field) {
3989
      if (field == null) {
3990
        throw new IllegalArgumentException();
3991
      }
2820 chandransh 3992
 
3993
      switch (field) {
3994
      case SUCCESS:
3995
        return isSetSuccess();
5361 mandeep.dh 3996
      case WEX:
3997
        return isSetWex();
2820 chandransh 3998
      }
3999
      throw new IllegalStateException();
4000
    }
4001
 
4002
    @Override
4003
    public boolean equals(Object that) {
4004
      if (that == null)
4005
        return false;
5361 mandeep.dh 4006
      if (that instanceof getNonSeralizedInventoryItem_result)
4007
        return this.equals((getNonSeralizedInventoryItem_result)that);
2820 chandransh 4008
      return false;
4009
    }
4010
 
5361 mandeep.dh 4011
    public boolean equals(getNonSeralizedInventoryItem_result that) {
2820 chandransh 4012
      if (that == null)
4013
        return false;
4014
 
4496 mandeep.dh 4015
      boolean this_present_success = true && this.isSetSuccess();
4016
      boolean that_present_success = true && that.isSetSuccess();
2820 chandransh 4017
      if (this_present_success || that_present_success) {
4018
        if (!(this_present_success && that_present_success))
4019
          return false;
4496 mandeep.dh 4020
        if (!this.success.equals(that.success))
2820 chandransh 4021
          return false;
4022
      }
4023
 
5361 mandeep.dh 4024
      boolean this_present_wex = true && this.isSetWex();
4025
      boolean that_present_wex = true && that.isSetWex();
4026
      if (this_present_wex || that_present_wex) {
4027
        if (!(this_present_wex && that_present_wex))
4496 mandeep.dh 4028
          return false;
5361 mandeep.dh 4029
        if (!this.wex.equals(that.wex))
4496 mandeep.dh 4030
          return false;
4031
      }
4032
 
4033
      return true;
4034
    }
4035
 
4036
    @Override
4037
    public int hashCode() {
4038
      return 0;
4039
    }
4040
 
5361 mandeep.dh 4041
    public int compareTo(getNonSeralizedInventoryItem_result other) {
4496 mandeep.dh 4042
      if (!getClass().equals(other.getClass())) {
4043
        return getClass().getName().compareTo(other.getClass().getName());
4044
      }
4045
 
4046
      int lastComparison = 0;
5361 mandeep.dh 4047
      getNonSeralizedInventoryItem_result typedOther = (getNonSeralizedInventoryItem_result)other;
4496 mandeep.dh 4048
 
4049
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
4050
      if (lastComparison != 0) {
4051
        return lastComparison;
4052
      }
4053
      if (isSetSuccess()) {
4054
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4055
        if (lastComparison != 0) {
4056
          return lastComparison;
4057
        }
4058
      }
5361 mandeep.dh 4059
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 4060
      if (lastComparison != 0) {
4061
        return lastComparison;
4062
      }
5361 mandeep.dh 4063
      if (isSetWex()) {
4064
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
3430 rajveer 4065
        if (lastComparison != 0) {
4066
          return lastComparison;
4067
        }
2820 chandransh 4068
      }
4069
      return 0;
4070
    }
4071
 
3430 rajveer 4072
    public _Fields fieldForId(int fieldId) {
4073
      return _Fields.findByThriftId(fieldId);
4074
    }
4075
 
4076
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4077
      org.apache.thrift.protocol.TField field;
2820 chandransh 4078
      iprot.readStructBegin();
4079
      while (true)
4080
      {
4081
        field = iprot.readFieldBegin();
3430 rajveer 4082
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 4083
          break;
4084
        }
3430 rajveer 4085
        switch (field.id) {
5361 mandeep.dh 4086
          case 0: // SUCCESS
4087
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4088
              this.success = new InventoryItem();
4089
              this.success.read(iprot);
3430 rajveer 4090
            } else { 
4091
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4092
            }
4093
            break;
5361 mandeep.dh 4094
          case 1: // WEX
4095
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4096
              this.wex = new WarehouseServiceException();
4097
              this.wex.read(iprot);
4496 mandeep.dh 4098
            } else { 
4099
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4100
            }
4101
            break;
4102
          default:
4103
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4104
        }
4105
        iprot.readFieldEnd();
4106
      }
4107
      iprot.readStructEnd();
4108
      validate();
4109
    }
4110
 
4111
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4112
      oprot.writeStructBegin(STRUCT_DESC);
4113
 
4114
      if (this.isSetSuccess()) {
4115
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5361 mandeep.dh 4116
        this.success.write(oprot);
4496 mandeep.dh 4117
        oprot.writeFieldEnd();
5361 mandeep.dh 4118
      } else if (this.isSetWex()) {
4119
        oprot.writeFieldBegin(WEX_FIELD_DESC);
4120
        this.wex.write(oprot);
4121
        oprot.writeFieldEnd();
4496 mandeep.dh 4122
      }
4123
      oprot.writeFieldStop();
4124
      oprot.writeStructEnd();
4125
    }
4126
 
4127
    @Override
4128
    public String toString() {
5361 mandeep.dh 4129
      StringBuilder sb = new StringBuilder("getNonSeralizedInventoryItem_result(");
4496 mandeep.dh 4130
      boolean first = true;
4131
 
4132
      sb.append("success:");
4133
      if (this.success == null) {
4134
        sb.append("null");
4135
      } else {
4136
        sb.append(this.success);
4137
      }
4138
      first = false;
5361 mandeep.dh 4139
      if (!first) sb.append(", ");
4140
      sb.append("wex:");
4141
      if (this.wex == null) {
4142
        sb.append("null");
4143
      } else {
4144
        sb.append(this.wex);
4145
      }
4146
      first = false;
4496 mandeep.dh 4147
      sb.append(")");
4148
      return sb.toString();
4149
    }
4150
 
4151
    public void validate() throws org.apache.thrift.TException {
4152
      // check for required fields
4153
    }
4154
 
4155
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4156
      try {
4157
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4158
      } catch (org.apache.thrift.TException te) {
4159
        throw new java.io.IOException(te);
4160
      }
4161
    }
4162
 
4163
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4164
      try {
4165
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4166
      } catch (org.apache.thrift.TException te) {
4167
        throw new java.io.IOException(te);
4168
      }
4169
    }
4170
 
4171
  }
4172
 
4173
  public static class scan_args implements org.apache.thrift.TBase<scan_args, scan_args._Fields>, java.io.Serializable, Cloneable   {
4174
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scan_args");
3383 chandransh 4175
 
5361 mandeep.dh 4176
    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 4177
    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);
4178
    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 4179
    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 4180
 
5361 mandeep.dh 4181
    private InventoryItem inventoryItem; // required
4496 mandeep.dh 4182
    private ScanType type; // required
4183
    private long quantity; // required
5361 mandeep.dh 4184
    private long billingWarehouseId; // required
3383 chandransh 4185
 
4186
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4187
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 4188
      INVENTORY_ITEM((short)1, "inventoryItem"),
4496 mandeep.dh 4189
      /**
4190
       * 
4191
       * @see ScanType
4192
       */
4193
      TYPE((short)2, "type"),
4194
      QUANTITY((short)3, "quantity"),
5361 mandeep.dh 4195
      BILLING_WAREHOUSE_ID((short)4, "billingWarehouseId");
3383 chandransh 4196
 
4197
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4198
 
4199
      static {
4200
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4201
          byName.put(field.getFieldName(), field);
4202
        }
4203
      }
4204
 
4205
      /**
4206
       * Find the _Fields constant that matches fieldId, or null if its not found.
4207
       */
4208
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4209
        switch(fieldId) {
5361 mandeep.dh 4210
          case 1: // INVENTORY_ITEM
4211
            return INVENTORY_ITEM;
4496 mandeep.dh 4212
          case 2: // TYPE
4213
            return TYPE;
4214
          case 3: // QUANTITY
4215
            return QUANTITY;
5361 mandeep.dh 4216
          case 4: // BILLING_WAREHOUSE_ID
4217
            return BILLING_WAREHOUSE_ID;
3430 rajveer 4218
          default:
4219
            return null;
4220
        }
3383 chandransh 4221
      }
4222
 
4223
      /**
4224
       * Find the _Fields constant that matches fieldId, throwing an exception
4225
       * if it is not found.
4226
       */
4227
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4228
        _Fields fields = findByThriftId(fieldId);
4229
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4230
        return fields;
4231
      }
4232
 
4233
      /**
4234
       * Find the _Fields constant that matches name, or null if its not found.
4235
       */
4236
      public static _Fields findByName(String name) {
4237
        return byName.get(name);
4238
      }
4239
 
4240
      private final short _thriftId;
4241
      private final String _fieldName;
4242
 
4243
      _Fields(short thriftId, String fieldName) {
4244
        _thriftId = thriftId;
4245
        _fieldName = fieldName;
4246
      }
4247
 
4248
      public short getThriftFieldId() {
4249
        return _thriftId;
4250
      }
4251
 
4252
      public String getFieldName() {
4253
        return _fieldName;
4254
      }
4255
    }
4256
 
4257
    // isset id assignments
5361 mandeep.dh 4258
    private static final int __QUANTITY_ISSET_ID = 0;
4259
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 1;
4260
    private BitSet __isset_bit_vector = new BitSet(2);
3383 chandransh 4261
 
3430 rajveer 4262
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3383 chandransh 4263
    static {
3430 rajveer 4264
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5361 mandeep.dh 4265
      tmpMap.put(_Fields.INVENTORY_ITEM, new org.apache.thrift.meta_data.FieldMetaData("inventoryItem", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4266
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
4496 mandeep.dh 4267
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4268
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
4269
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4270
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5361 mandeep.dh 4271
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 4272
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 4273
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 4274
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scan_args.class, metaDataMap);
3383 chandransh 4275
    }
4276
 
4496 mandeep.dh 4277
    public scan_args() {
3383 chandransh 4278
    }
4279
 
4496 mandeep.dh 4280
    public scan_args(
5361 mandeep.dh 4281
      InventoryItem inventoryItem,
4496 mandeep.dh 4282
      ScanType type,
4283
      long quantity,
5361 mandeep.dh 4284
      long billingWarehouseId)
3383 chandransh 4285
    {
4286
      this();
5361 mandeep.dh 4287
      this.inventoryItem = inventoryItem;
4496 mandeep.dh 4288
      this.type = type;
4289
      this.quantity = quantity;
4290
      setQuantityIsSet(true);
5361 mandeep.dh 4291
      this.billingWarehouseId = billingWarehouseId;
4292
      setBillingWarehouseIdIsSet(true);
3383 chandransh 4293
    }
4294
 
4295
    /**
4296
     * Performs a deep copy on <i>other</i>.
4297
     */
4496 mandeep.dh 4298
    public scan_args(scan_args other) {
3383 chandransh 4299
      __isset_bit_vector.clear();
4300
      __isset_bit_vector.or(other.__isset_bit_vector);
5361 mandeep.dh 4301
      if (other.isSetInventoryItem()) {
4302
        this.inventoryItem = new InventoryItem(other.inventoryItem);
4303
      }
4496 mandeep.dh 4304
      if (other.isSetType()) {
4305
        this.type = other.type;
4306
      }
4307
      this.quantity = other.quantity;
5361 mandeep.dh 4308
      this.billingWarehouseId = other.billingWarehouseId;
3383 chandransh 4309
    }
4310
 
4496 mandeep.dh 4311
    public scan_args deepCopy() {
4312
      return new scan_args(this);
3383 chandransh 4313
    }
4314
 
3430 rajveer 4315
    @Override
4316
    public void clear() {
5361 mandeep.dh 4317
      this.inventoryItem = null;
4496 mandeep.dh 4318
      this.type = null;
4319
      setQuantityIsSet(false);
4320
      this.quantity = 0;
5361 mandeep.dh 4321
      setBillingWarehouseIdIsSet(false);
4322
      this.billingWarehouseId = 0;
3383 chandransh 4323
    }
4324
 
5361 mandeep.dh 4325
    public InventoryItem getInventoryItem() {
4326
      return this.inventoryItem;
3383 chandransh 4327
    }
4328
 
5361 mandeep.dh 4329
    public void setInventoryItem(InventoryItem inventoryItem) {
4330
      this.inventoryItem = inventoryItem;
3383 chandransh 4331
    }
4332
 
5361 mandeep.dh 4333
    public void unsetInventoryItem() {
4334
      this.inventoryItem = null;
3383 chandransh 4335
    }
4336
 
5361 mandeep.dh 4337
    /** Returns true if field inventoryItem is set (has been assigned a value) and false otherwise */
4338
    public boolean isSetInventoryItem() {
4339
      return this.inventoryItem != null;
3383 chandransh 4340
    }
4341
 
5361 mandeep.dh 4342
    public void setInventoryItemIsSet(boolean value) {
4343
      if (!value) {
4344
        this.inventoryItem = null;
4345
      }
3383 chandransh 4346
    }
4347
 
4496 mandeep.dh 4348
    /**
4349
     * 
4350
     * @see ScanType
4351
     */
4352
    public ScanType getType() {
4353
      return this.type;
3383 chandransh 4354
    }
4355
 
4496 mandeep.dh 4356
    /**
4357
     * 
4358
     * @see ScanType
4359
     */
4360
    public void setType(ScanType type) {
4361
      this.type = type;
3383 chandransh 4362
    }
4363
 
4496 mandeep.dh 4364
    public void unsetType() {
4365
      this.type = null;
3383 chandransh 4366
    }
4367
 
4496 mandeep.dh 4368
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
4369
    public boolean isSetType() {
4370
      return this.type != null;
3383 chandransh 4371
    }
4372
 
4496 mandeep.dh 4373
    public void setTypeIsSet(boolean value) {
4374
      if (!value) {
4375
        this.type = null;
4376
      }
3383 chandransh 4377
    }
4378
 
4496 mandeep.dh 4379
    public long getQuantity() {
4380
      return this.quantity;
4381
    }
4382
 
4383
    public void setQuantity(long quantity) {
4384
      this.quantity = quantity;
4385
      setQuantityIsSet(true);
4386
    }
4387
 
4388
    public void unsetQuantity() {
4389
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
4390
    }
4391
 
4392
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
4393
    public boolean isSetQuantity() {
4394
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
4395
    }
4396
 
4397
    public void setQuantityIsSet(boolean value) {
4398
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
4399
    }
4400
 
5361 mandeep.dh 4401
    public long getBillingWarehouseId() {
4402
      return this.billingWarehouseId;
4496 mandeep.dh 4403
    }
4404
 
5361 mandeep.dh 4405
    public void setBillingWarehouseId(long billingWarehouseId) {
4406
      this.billingWarehouseId = billingWarehouseId;
4407
      setBillingWarehouseIdIsSet(true);
4496 mandeep.dh 4408
    }
4409
 
5361 mandeep.dh 4410
    public void unsetBillingWarehouseId() {
4411
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 4412
    }
4413
 
5361 mandeep.dh 4414
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
4415
    public boolean isSetBillingWarehouseId() {
4416
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 4417
    }
4418
 
5361 mandeep.dh 4419
    public void setBillingWarehouseIdIsSet(boolean value) {
4420
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
4496 mandeep.dh 4421
    }
4422
 
3383 chandransh 4423
    public void setFieldValue(_Fields field, Object value) {
4424
      switch (field) {
5361 mandeep.dh 4425
      case INVENTORY_ITEM:
3383 chandransh 4426
        if (value == null) {
5361 mandeep.dh 4427
          unsetInventoryItem();
3383 chandransh 4428
        } else {
5361 mandeep.dh 4429
          setInventoryItem((InventoryItem)value);
3383 chandransh 4430
        }
4431
        break;
4432
 
4496 mandeep.dh 4433
      case TYPE:
3383 chandransh 4434
        if (value == null) {
4496 mandeep.dh 4435
          unsetType();
3383 chandransh 4436
        } else {
4496 mandeep.dh 4437
          setType((ScanType)value);
3383 chandransh 4438
        }
4439
        break;
4440
 
4496 mandeep.dh 4441
      case QUANTITY:
4442
        if (value == null) {
4443
          unsetQuantity();
4444
        } else {
4445
          setQuantity((Long)value);
4446
        }
4447
        break;
4448
 
5361 mandeep.dh 4449
      case BILLING_WAREHOUSE_ID:
4496 mandeep.dh 4450
        if (value == null) {
5361 mandeep.dh 4451
          unsetBillingWarehouseId();
4496 mandeep.dh 4452
        } else {
5361 mandeep.dh 4453
          setBillingWarehouseId((Long)value);
4496 mandeep.dh 4454
        }
4455
        break;
4456
 
3383 chandransh 4457
      }
4458
    }
4459
 
4460
    public Object getFieldValue(_Fields field) {
4461
      switch (field) {
5361 mandeep.dh 4462
      case INVENTORY_ITEM:
4463
        return getInventoryItem();
3383 chandransh 4464
 
4496 mandeep.dh 4465
      case TYPE:
4466
        return getType();
3383 chandransh 4467
 
4496 mandeep.dh 4468
      case QUANTITY:
4469
        return Long.valueOf(getQuantity());
4470
 
5361 mandeep.dh 4471
      case BILLING_WAREHOUSE_ID:
4472
        return Long.valueOf(getBillingWarehouseId());
4496 mandeep.dh 4473
 
3383 chandransh 4474
      }
4475
      throw new IllegalStateException();
4476
    }
4477
 
3430 rajveer 4478
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4479
    public boolean isSet(_Fields field) {
4480
      if (field == null) {
4481
        throw new IllegalArgumentException();
4482
      }
3383 chandransh 4483
 
4484
      switch (field) {
5361 mandeep.dh 4485
      case INVENTORY_ITEM:
4486
        return isSetInventoryItem();
4496 mandeep.dh 4487
      case TYPE:
4488
        return isSetType();
4489
      case QUANTITY:
4490
        return isSetQuantity();
5361 mandeep.dh 4491
      case BILLING_WAREHOUSE_ID:
4492
        return isSetBillingWarehouseId();
3383 chandransh 4493
      }
4494
      throw new IllegalStateException();
4495
    }
4496
 
4497
    @Override
4498
    public boolean equals(Object that) {
4499
      if (that == null)
4500
        return false;
4496 mandeep.dh 4501
      if (that instanceof scan_args)
4502
        return this.equals((scan_args)that);
3383 chandransh 4503
      return false;
4504
    }
4505
 
4496 mandeep.dh 4506
    public boolean equals(scan_args that) {
3383 chandransh 4507
      if (that == null)
4508
        return false;
4509
 
5361 mandeep.dh 4510
      boolean this_present_inventoryItem = true && this.isSetInventoryItem();
4511
      boolean that_present_inventoryItem = true && that.isSetInventoryItem();
4512
      if (this_present_inventoryItem || that_present_inventoryItem) {
4513
        if (!(this_present_inventoryItem && that_present_inventoryItem))
3383 chandransh 4514
          return false;
5361 mandeep.dh 4515
        if (!this.inventoryItem.equals(that.inventoryItem))
3383 chandransh 4516
          return false;
4517
      }
4518
 
4496 mandeep.dh 4519
      boolean this_present_type = true && this.isSetType();
4520
      boolean that_present_type = true && that.isSetType();
4521
      if (this_present_type || that_present_type) {
4522
        if (!(this_present_type && that_present_type))
3383 chandransh 4523
          return false;
4496 mandeep.dh 4524
        if (!this.type.equals(that.type))
3383 chandransh 4525
          return false;
4526
      }
4527
 
4496 mandeep.dh 4528
      boolean this_present_quantity = true;
4529
      boolean that_present_quantity = true;
4530
      if (this_present_quantity || that_present_quantity) {
4531
        if (!(this_present_quantity && that_present_quantity))
4532
          return false;
4533
        if (this.quantity != that.quantity)
4534
          return false;
4535
      }
4536
 
5361 mandeep.dh 4537
      boolean this_present_billingWarehouseId = true;
4538
      boolean that_present_billingWarehouseId = true;
4539
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
4540
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
4496 mandeep.dh 4541
          return false;
5361 mandeep.dh 4542
        if (this.billingWarehouseId != that.billingWarehouseId)
4496 mandeep.dh 4543
          return false;
4544
      }
4545
 
3383 chandransh 4546
      return true;
4547
    }
4548
 
4549
    @Override
4550
    public int hashCode() {
4551
      return 0;
4552
    }
4553
 
4496 mandeep.dh 4554
    public int compareTo(scan_args other) {
3383 chandransh 4555
      if (!getClass().equals(other.getClass())) {
4556
        return getClass().getName().compareTo(other.getClass().getName());
4557
      }
4558
 
4559
      int lastComparison = 0;
4496 mandeep.dh 4560
      scan_args typedOther = (scan_args)other;
3383 chandransh 4561
 
5361 mandeep.dh 4562
      lastComparison = Boolean.valueOf(isSetInventoryItem()).compareTo(typedOther.isSetInventoryItem());
3383 chandransh 4563
      if (lastComparison != 0) {
4564
        return lastComparison;
4565
      }
5361 mandeep.dh 4566
      if (isSetInventoryItem()) {
4567
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItem, typedOther.inventoryItem);
3430 rajveer 4568
        if (lastComparison != 0) {
4569
          return lastComparison;
4570
        }
3383 chandransh 4571
      }
4496 mandeep.dh 4572
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
3383 chandransh 4573
      if (lastComparison != 0) {
4574
        return lastComparison;
4575
      }
4496 mandeep.dh 4576
      if (isSetType()) {
4577
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 4578
        if (lastComparison != 0) {
4579
          return lastComparison;
4580
        }
3383 chandransh 4581
      }
4496 mandeep.dh 4582
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
4583
      if (lastComparison != 0) {
4584
        return lastComparison;
4585
      }
4586
      if (isSetQuantity()) {
4587
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
4588
        if (lastComparison != 0) {
4589
          return lastComparison;
4590
        }
4591
      }
5361 mandeep.dh 4592
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
4496 mandeep.dh 4593
      if (lastComparison != 0) {
4594
        return lastComparison;
4595
      }
5361 mandeep.dh 4596
      if (isSetBillingWarehouseId()) {
4597
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
4496 mandeep.dh 4598
        if (lastComparison != 0) {
4599
          return lastComparison;
4600
        }
4601
      }
3383 chandransh 4602
      return 0;
4603
    }
4604
 
3430 rajveer 4605
    public _Fields fieldForId(int fieldId) {
4606
      return _Fields.findByThriftId(fieldId);
4607
    }
4608
 
4609
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4610
      org.apache.thrift.protocol.TField field;
3383 chandransh 4611
      iprot.readStructBegin();
4612
      while (true)
4613
      {
4614
        field = iprot.readFieldBegin();
3430 rajveer 4615
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3383 chandransh 4616
          break;
4617
        }
3430 rajveer 4618
        switch (field.id) {
5361 mandeep.dh 4619
          case 1: // INVENTORY_ITEM
4620
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4621
              this.inventoryItem = new InventoryItem();
4622
              this.inventoryItem.read(iprot);
3430 rajveer 4623
            } else { 
4624
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4625
            }
4626
            break;
4496 mandeep.dh 4627
          case 2: // TYPE
4628
            if (field.type == org.apache.thrift.protocol.TType.I32) {
4629
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 4630
            } else { 
4631
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4632
            }
4633
            break;
4496 mandeep.dh 4634
          case 3: // QUANTITY
4635
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4636
              this.quantity = iprot.readI64();
4637
              setQuantityIsSet(true);
4638
            } else { 
4639
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4640
            }
4641
            break;
5361 mandeep.dh 4642
          case 4: // BILLING_WAREHOUSE_ID
4496 mandeep.dh 4643
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5361 mandeep.dh 4644
              this.billingWarehouseId = iprot.readI64();
4645
              setBillingWarehouseIdIsSet(true);
4496 mandeep.dh 4646
            } else { 
4647
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4648
            }
4649
            break;
3430 rajveer 4650
          default:
4651
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3383 chandransh 4652
        }
3430 rajveer 4653
        iprot.readFieldEnd();
3383 chandransh 4654
      }
4655
      iprot.readStructEnd();
4656
      validate();
4657
    }
4658
 
3430 rajveer 4659
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3383 chandransh 4660
      validate();
4661
 
4662
      oprot.writeStructBegin(STRUCT_DESC);
5361 mandeep.dh 4663
      if (this.inventoryItem != null) {
4664
        oprot.writeFieldBegin(INVENTORY_ITEM_FIELD_DESC);
4665
        this.inventoryItem.write(oprot);
4666
        oprot.writeFieldEnd();
4667
      }
4496 mandeep.dh 4668
      if (this.type != null) {
4669
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
4670
        oprot.writeI32(this.type.getValue());
4671
        oprot.writeFieldEnd();
4672
      }
4673
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
4674
      oprot.writeI64(this.quantity);
3383 chandransh 4675
      oprot.writeFieldEnd();
5361 mandeep.dh 4676
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
4677
      oprot.writeI64(this.billingWarehouseId);
4496 mandeep.dh 4678
      oprot.writeFieldEnd();
3383 chandransh 4679
      oprot.writeFieldStop();
4680
      oprot.writeStructEnd();
4681
    }
4682
 
4683
    @Override
4684
    public String toString() {
4496 mandeep.dh 4685
      StringBuilder sb = new StringBuilder("scan_args(");
3383 chandransh 4686
      boolean first = true;
4687
 
5361 mandeep.dh 4688
      sb.append("inventoryItem:");
4689
      if (this.inventoryItem == null) {
4690
        sb.append("null");
4691
      } else {
4692
        sb.append(this.inventoryItem);
4693
      }
3383 chandransh 4694
      first = false;
4695
      if (!first) sb.append(", ");
4496 mandeep.dh 4696
      sb.append("type:");
4697
      if (this.type == null) {
4698
        sb.append("null");
4699
      } else {
4700
        sb.append(this.type);
4701
      }
3383 chandransh 4702
      first = false;
4496 mandeep.dh 4703
      if (!first) sb.append(", ");
4704
      sb.append("quantity:");
4705
      sb.append(this.quantity);
4706
      first = false;
4707
      if (!first) sb.append(", ");
5361 mandeep.dh 4708
      sb.append("billingWarehouseId:");
4709
      sb.append(this.billingWarehouseId);
4496 mandeep.dh 4710
      first = false;
3383 chandransh 4711
      sb.append(")");
4712
      return sb.toString();
4713
    }
4714
 
3430 rajveer 4715
    public void validate() throws org.apache.thrift.TException {
3383 chandransh 4716
      // check for required fields
4717
    }
4718
 
3430 rajveer 4719
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4720
      try {
4721
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4722
      } catch (org.apache.thrift.TException te) {
4723
        throw new java.io.IOException(te);
4724
      }
4725
    }
4726
 
4727
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4728
      try {
4496 mandeep.dh 4729
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
4730
        __isset_bit_vector = new BitSet(1);
3430 rajveer 4731
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4732
      } catch (org.apache.thrift.TException te) {
4733
        throw new java.io.IOException(te);
4734
      }
4735
    }
4736
 
3383 chandransh 4737
  }
4738
 
4496 mandeep.dh 4739
  public static class scan_result implements org.apache.thrift.TBase<scan_result, scan_result._Fields>, java.io.Serializable, Cloneable   {
4740
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scan_result");
3383 chandransh 4741
 
3430 rajveer 4742
    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 4743
 
3430 rajveer 4744
    private WarehouseServiceException wex; // required
3383 chandransh 4745
 
4746
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4747
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3383 chandransh 4748
      WEX((short)1, "wex");
4749
 
4750
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4751
 
4752
      static {
4753
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4754
          byName.put(field.getFieldName(), field);
4755
        }
4756
      }
4757
 
4758
      /**
4759
       * Find the _Fields constant that matches fieldId, or null if its not found.
4760
       */
4761
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4762
        switch(fieldId) {
4763
          case 1: // WEX
4764
            return WEX;
4765
          default:
4766
            return null;
4767
        }
3383 chandransh 4768
      }
4769
 
4770
      /**
4771
       * Find the _Fields constant that matches fieldId, throwing an exception
4772
       * if it is not found.
4773
       */
4774
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4775
        _Fields fields = findByThriftId(fieldId);
4776
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4777
        return fields;
4778
      }
4779
 
4780
      /**
4781
       * Find the _Fields constant that matches name, or null if its not found.
4782
       */
4783
      public static _Fields findByName(String name) {
4784
        return byName.get(name);
4785
      }
4786
 
4787
      private final short _thriftId;
4788
      private final String _fieldName;
4789
 
4790
      _Fields(short thriftId, String fieldName) {
4791
        _thriftId = thriftId;
4792
        _fieldName = fieldName;
4793
      }
4794
 
4795
      public short getThriftFieldId() {
4796
        return _thriftId;
4797
      }
4798
 
4799
      public String getFieldName() {
4800
        return _fieldName;
4801
      }
4802
    }
4803
 
4804
    // isset id assignments
4805
 
3430 rajveer 4806
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3383 chandransh 4807
    static {
3430 rajveer 4808
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4809
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4810
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4811
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 4812
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scan_result.class, metaDataMap);
3383 chandransh 4813
    }
4814
 
4496 mandeep.dh 4815
    public scan_result() {
3383 chandransh 4816
    }
4817
 
4496 mandeep.dh 4818
    public scan_result(
3383 chandransh 4819
      WarehouseServiceException wex)
4820
    {
4821
      this();
4822
      this.wex = wex;
4823
    }
4824
 
4825
    /**
4826
     * Performs a deep copy on <i>other</i>.
4827
     */
4496 mandeep.dh 4828
    public scan_result(scan_result other) {
3383 chandransh 4829
      if (other.isSetWex()) {
4830
        this.wex = new WarehouseServiceException(other.wex);
4831
      }
4832
    }
4833
 
4496 mandeep.dh 4834
    public scan_result deepCopy() {
4835
      return new scan_result(this);
3383 chandransh 4836
    }
4837
 
3430 rajveer 4838
    @Override
4839
    public void clear() {
4840
      this.wex = null;
3383 chandransh 4841
    }
4842
 
4843
    public WarehouseServiceException getWex() {
4844
      return this.wex;
4845
    }
4846
 
3430 rajveer 4847
    public void setWex(WarehouseServiceException wex) {
3383 chandransh 4848
      this.wex = wex;
4849
    }
4850
 
4851
    public void unsetWex() {
4852
      this.wex = null;
4853
    }
4854
 
3430 rajveer 4855
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
3383 chandransh 4856
    public boolean isSetWex() {
4857
      return this.wex != null;
4858
    }
4859
 
4860
    public void setWexIsSet(boolean value) {
4861
      if (!value) {
4862
        this.wex = null;
4863
      }
4864
    }
4865
 
4866
    public void setFieldValue(_Fields field, Object value) {
4867
      switch (field) {
4868
      case WEX:
4869
        if (value == null) {
4870
          unsetWex();
4871
        } else {
4872
          setWex((WarehouseServiceException)value);
4873
        }
4874
        break;
4875
 
4876
      }
4877
    }
4878
 
4879
    public Object getFieldValue(_Fields field) {
4880
      switch (field) {
4881
      case WEX:
4882
        return getWex();
4883
 
4884
      }
4885
      throw new IllegalStateException();
4886
    }
4887
 
3430 rajveer 4888
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4889
    public boolean isSet(_Fields field) {
4890
      if (field == null) {
4891
        throw new IllegalArgumentException();
4892
      }
3383 chandransh 4893
 
4894
      switch (field) {
4895
      case WEX:
4896
        return isSetWex();
4897
      }
4898
      throw new IllegalStateException();
4899
    }
4900
 
4901
    @Override
4902
    public boolean equals(Object that) {
4903
      if (that == null)
4904
        return false;
4496 mandeep.dh 4905
      if (that instanceof scan_result)
4906
        return this.equals((scan_result)that);
3383 chandransh 4907
      return false;
4908
    }
4909
 
4496 mandeep.dh 4910
    public boolean equals(scan_result that) {
3383 chandransh 4911
      if (that == null)
4912
        return false;
4913
 
4914
      boolean this_present_wex = true && this.isSetWex();
4915
      boolean that_present_wex = true && that.isSetWex();
4916
      if (this_present_wex || that_present_wex) {
4917
        if (!(this_present_wex && that_present_wex))
4918
          return false;
4919
        if (!this.wex.equals(that.wex))
4920
          return false;
4921
      }
4922
 
4923
      return true;
4924
    }
4925
 
4926
    @Override
4927
    public int hashCode() {
4928
      return 0;
4929
    }
4930
 
4496 mandeep.dh 4931
    public int compareTo(scan_result other) {
3383 chandransh 4932
      if (!getClass().equals(other.getClass())) {
4933
        return getClass().getName().compareTo(other.getClass().getName());
4934
      }
4935
 
4936
      int lastComparison = 0;
4496 mandeep.dh 4937
      scan_result typedOther = (scan_result)other;
3383 chandransh 4938
 
3430 rajveer 4939
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
3383 chandransh 4940
      if (lastComparison != 0) {
4941
        return lastComparison;
4942
      }
3430 rajveer 4943
      if (isSetWex()) {
4944
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
4945
        if (lastComparison != 0) {
4946
          return lastComparison;
4947
        }
3383 chandransh 4948
      }
4949
      return 0;
4950
    }
4951
 
3430 rajveer 4952
    public _Fields fieldForId(int fieldId) {
4953
      return _Fields.findByThriftId(fieldId);
4954
    }
4955
 
4956
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4957
      org.apache.thrift.protocol.TField field;
3383 chandransh 4958
      iprot.readStructBegin();
4959
      while (true)
4960
      {
4961
        field = iprot.readFieldBegin();
3430 rajveer 4962
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3383 chandransh 4963
          break;
4964
        }
3430 rajveer 4965
        switch (field.id) {
4966
          case 1: // WEX
4967
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4968
              this.wex = new WarehouseServiceException();
4969
              this.wex.read(iprot);
4970
            } else { 
4971
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4972
            }
4973
            break;
4974
          default:
4975
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3383 chandransh 4976
        }
3430 rajveer 4977
        iprot.readFieldEnd();
3383 chandransh 4978
      }
4979
      iprot.readStructEnd();
4980
      validate();
4981
    }
4982
 
3430 rajveer 4983
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3383 chandransh 4984
      oprot.writeStructBegin(STRUCT_DESC);
4985
 
4496 mandeep.dh 4986
      if (this.isSetWex()) {
3383 chandransh 4987
        oprot.writeFieldBegin(WEX_FIELD_DESC);
4988
        this.wex.write(oprot);
4989
        oprot.writeFieldEnd();
4990
      }
4991
      oprot.writeFieldStop();
4992
      oprot.writeStructEnd();
4993
    }
4994
 
4995
    @Override
4996
    public String toString() {
4496 mandeep.dh 4997
      StringBuilder sb = new StringBuilder("scan_result(");
3383 chandransh 4998
      boolean first = true;
4999
 
5000
      sb.append("wex:");
5001
      if (this.wex == null) {
5002
        sb.append("null");
5003
      } else {
5004
        sb.append(this.wex);
5005
      }
5006
      first = false;
5007
      sb.append(")");
5008
      return sb.toString();
5009
    }
5010
 
3430 rajveer 5011
    public void validate() throws org.apache.thrift.TException {
3383 chandransh 5012
      // check for required fields
5013
    }
5014
 
3430 rajveer 5015
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5016
      try {
5017
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5018
      } catch (org.apache.thrift.TException te) {
5019
        throw new java.io.IOException(te);
5020
      }
5021
    }
5022
 
5023
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5024
      try {
5025
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5026
      } catch (org.apache.thrift.TException te) {
5027
        throw new java.io.IOException(te);
5028
      }
5029
    }
5030
 
3383 chandransh 5031
  }
5032
 
4496 mandeep.dh 5033
  public static class scanSerializedItemForOrder_args implements org.apache.thrift.TBase<scanSerializedItemForOrder_args, scanSerializedItemForOrder_args._Fields>, java.io.Serializable, Cloneable   {
5034
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItemForOrder_args");
2820 chandransh 5035
 
4555 mandeep.dh 5036
    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 5037
    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);
5038
    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 5039
    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);
5040
    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);
5041
    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 5042
 
4555 mandeep.dh 5043
    private String serialNumber; // required
3430 rajveer 5044
    private ScanType type; // required
4496 mandeep.dh 5045
    private long orderId; // required
5110 mandeep.dh 5046
    private long fulfilmentWarehouseId; // required
5047
    private double quantity; // required
5048
    private long billingWarehouseId; // required
2820 chandransh 5049
 
5050
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 5051
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4555 mandeep.dh 5052
      SERIAL_NUMBER((short)1, "serialNumber"),
2820 chandransh 5053
      /**
5054
       * 
5055
       * @see ScanType
5056
       */
4496 mandeep.dh 5057
      TYPE((short)2, "type"),
5058
      ORDER_ID((short)3, "orderId"),
5110 mandeep.dh 5059
      FULFILMENT_WAREHOUSE_ID((short)4, "fulfilmentWarehouseId"),
5060
      QUANTITY((short)5, "quantity"),
5061
      BILLING_WAREHOUSE_ID((short)6, "billingWarehouseId");
2820 chandransh 5062
 
5063
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5064
 
5065
      static {
5066
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5067
          byName.put(field.getFieldName(), field);
5068
        }
5069
      }
5070
 
5071
      /**
5072
       * Find the _Fields constant that matches fieldId, or null if its not found.
5073
       */
5074
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 5075
        switch(fieldId) {
4555 mandeep.dh 5076
          case 1: // SERIAL_NUMBER
5077
            return SERIAL_NUMBER;
4496 mandeep.dh 5078
          case 2: // TYPE
3430 rajveer 5079
            return TYPE;
4496 mandeep.dh 5080
          case 3: // ORDER_ID
5081
            return ORDER_ID;
5110 mandeep.dh 5082
          case 4: // FULFILMENT_WAREHOUSE_ID
5083
            return FULFILMENT_WAREHOUSE_ID;
5084
          case 5: // QUANTITY
5085
            return QUANTITY;
5086
          case 6: // BILLING_WAREHOUSE_ID
5087
            return BILLING_WAREHOUSE_ID;
3430 rajveer 5088
          default:
5089
            return null;
5090
        }
2820 chandransh 5091
      }
5092
 
5093
      /**
5094
       * Find the _Fields constant that matches fieldId, throwing an exception
5095
       * if it is not found.
5096
       */
5097
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5098
        _Fields fields = findByThriftId(fieldId);
5099
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5100
        return fields;
5101
      }
5102
 
5103
      /**
5104
       * Find the _Fields constant that matches name, or null if its not found.
5105
       */
5106
      public static _Fields findByName(String name) {
5107
        return byName.get(name);
5108
      }
5109
 
5110
      private final short _thriftId;
5111
      private final String _fieldName;
5112
 
5113
      _Fields(short thriftId, String fieldName) {
5114
        _thriftId = thriftId;
5115
        _fieldName = fieldName;
5116
      }
5117
 
5118
      public short getThriftFieldId() {
5119
        return _thriftId;
5120
      }
5121
 
5122
      public String getFieldName() {
5123
        return _fieldName;
5124
      }
5125
    }
5126
 
5127
    // isset id assignments
4555 mandeep.dh 5128
    private static final int __ORDERID_ISSET_ID = 0;
5110 mandeep.dh 5129
    private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 1;
5130
    private static final int __QUANTITY_ISSET_ID = 2;
5131
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 3;
5132
    private BitSet __isset_bit_vector = new BitSet(4);
2820 chandransh 5133
 
3430 rajveer 5134
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 5135
    static {
3430 rajveer 5136
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4555 mandeep.dh 5137
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5138
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
3430 rajveer 5139
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5140
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
4496 mandeep.dh 5141
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5142
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 5143
      tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 5144
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 5145
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5146
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
5147
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5148
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 5149
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 5150
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanSerializedItemForOrder_args.class, metaDataMap);
2820 chandransh 5151
    }
5152
 
4496 mandeep.dh 5153
    public scanSerializedItemForOrder_args() {
2820 chandransh 5154
    }
5155
 
4496 mandeep.dh 5156
    public scanSerializedItemForOrder_args(
4555 mandeep.dh 5157
      String serialNumber,
4496 mandeep.dh 5158
      ScanType type,
5159
      long orderId,
5110 mandeep.dh 5160
      long fulfilmentWarehouseId,
5161
      double quantity,
5162
      long billingWarehouseId)
2820 chandransh 5163
    {
5164
      this();
4555 mandeep.dh 5165
      this.serialNumber = serialNumber;
2820 chandransh 5166
      this.type = type;
4496 mandeep.dh 5167
      this.orderId = orderId;
5168
      setOrderIdIsSet(true);
5110 mandeep.dh 5169
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
5170
      setFulfilmentWarehouseIdIsSet(true);
5171
      this.quantity = quantity;
5172
      setQuantityIsSet(true);
5173
      this.billingWarehouseId = billingWarehouseId;
5174
      setBillingWarehouseIdIsSet(true);
2820 chandransh 5175
    }
5176
 
5177
    /**
5178
     * Performs a deep copy on <i>other</i>.
5179
     */
4496 mandeep.dh 5180
    public scanSerializedItemForOrder_args(scanSerializedItemForOrder_args other) {
2820 chandransh 5181
      __isset_bit_vector.clear();
5182
      __isset_bit_vector.or(other.__isset_bit_vector);
4555 mandeep.dh 5183
      if (other.isSetSerialNumber()) {
5184
        this.serialNumber = other.serialNumber;
5185
      }
2820 chandransh 5186
      if (other.isSetType()) {
5187
        this.type = other.type;
5188
      }
4496 mandeep.dh 5189
      this.orderId = other.orderId;
5110 mandeep.dh 5190
      this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
5191
      this.quantity = other.quantity;
5192
      this.billingWarehouseId = other.billingWarehouseId;
2820 chandransh 5193
    }
5194
 
4496 mandeep.dh 5195
    public scanSerializedItemForOrder_args deepCopy() {
5196
      return new scanSerializedItemForOrder_args(this);
2820 chandransh 5197
    }
5198
 
3430 rajveer 5199
    @Override
5200
    public void clear() {
4555 mandeep.dh 5201
      this.serialNumber = null;
3430 rajveer 5202
      this.type = null;
4496 mandeep.dh 5203
      setOrderIdIsSet(false);
5204
      this.orderId = 0;
5110 mandeep.dh 5205
      setFulfilmentWarehouseIdIsSet(false);
5206
      this.fulfilmentWarehouseId = 0;
5207
      setQuantityIsSet(false);
5208
      this.quantity = 0.0;
5209
      setBillingWarehouseIdIsSet(false);
5210
      this.billingWarehouseId = 0;
2820 chandransh 5211
    }
5212
 
4555 mandeep.dh 5213
    public String getSerialNumber() {
5214
      return this.serialNumber;
2820 chandransh 5215
    }
5216
 
4555 mandeep.dh 5217
    public void setSerialNumber(String serialNumber) {
5218
      this.serialNumber = serialNumber;
2820 chandransh 5219
    }
5220
 
4555 mandeep.dh 5221
    public void unsetSerialNumber() {
5222
      this.serialNumber = null;
2820 chandransh 5223
    }
5224
 
4555 mandeep.dh 5225
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
5226
    public boolean isSetSerialNumber() {
5227
      return this.serialNumber != null;
2820 chandransh 5228
    }
5229
 
4555 mandeep.dh 5230
    public void setSerialNumberIsSet(boolean value) {
5231
      if (!value) {
5232
        this.serialNumber = null;
5233
      }
2820 chandransh 5234
    }
5235
 
4496 mandeep.dh 5236
    /**
5237
     * 
5238
     * @see ScanType
5239
     */
5240
    public ScanType getType() {
5241
      return this.type;
2820 chandransh 5242
    }
5243
 
4496 mandeep.dh 5244
    /**
5245
     * 
5246
     * @see ScanType
5247
     */
5248
    public void setType(ScanType type) {
5249
      this.type = type;
2820 chandransh 5250
    }
5251
 
4496 mandeep.dh 5252
    public void unsetType() {
5253
      this.type = null;
2820 chandransh 5254
    }
5255
 
4496 mandeep.dh 5256
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
5257
    public boolean isSetType() {
5258
      return this.type != null;
2820 chandransh 5259
    }
5260
 
4496 mandeep.dh 5261
    public void setTypeIsSet(boolean value) {
2820 chandransh 5262
      if (!value) {
4496 mandeep.dh 5263
        this.type = null;
2820 chandransh 5264
      }
5265
    }
5266
 
4496 mandeep.dh 5267
    public long getOrderId() {
5268
      return this.orderId;
2820 chandransh 5269
    }
5270
 
4496 mandeep.dh 5271
    public void setOrderId(long orderId) {
5272
      this.orderId = orderId;
5273
      setOrderIdIsSet(true);
2820 chandransh 5274
    }
5275
 
4496 mandeep.dh 5276
    public void unsetOrderId() {
5277
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
2820 chandransh 5278
    }
5279
 
4496 mandeep.dh 5280
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
5281
    public boolean isSetOrderId() {
5282
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
2820 chandransh 5283
    }
5284
 
4496 mandeep.dh 5285
    public void setOrderIdIsSet(boolean value) {
5286
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
2820 chandransh 5287
    }
5288
 
5110 mandeep.dh 5289
    public long getFulfilmentWarehouseId() {
5290
      return this.fulfilmentWarehouseId;
2820 chandransh 5291
    }
5292
 
5110 mandeep.dh 5293
    public void setFulfilmentWarehouseId(long fulfilmentWarehouseId) {
5294
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
5295
      setFulfilmentWarehouseIdIsSet(true);
2820 chandransh 5296
    }
5297
 
5110 mandeep.dh 5298
    public void unsetFulfilmentWarehouseId() {
5299
      __isset_bit_vector.clear(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 5300
    }
5301
 
5110 mandeep.dh 5302
    /** Returns true if field fulfilmentWarehouseId is set (has been assigned a value) and false otherwise */
5303
    public boolean isSetFulfilmentWarehouseId() {
5304
      return __isset_bit_vector.get(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 5305
    }
5306
 
5110 mandeep.dh 5307
    public void setFulfilmentWarehouseIdIsSet(boolean value) {
5308
      __isset_bit_vector.set(__FULFILMENTWAREHOUSEID_ISSET_ID, value);
2820 chandransh 5309
    }
5310
 
5110 mandeep.dh 5311
    public double getQuantity() {
5312
      return this.quantity;
5313
    }
5314
 
5315
    public void setQuantity(double quantity) {
5316
      this.quantity = quantity;
5317
      setQuantityIsSet(true);
5318
    }
5319
 
5320
    public void unsetQuantity() {
5321
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
5322
    }
5323
 
5324
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
5325
    public boolean isSetQuantity() {
5326
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
5327
    }
5328
 
5329
    public void setQuantityIsSet(boolean value) {
5330
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
5331
    }
5332
 
5333
    public long getBillingWarehouseId() {
5334
      return this.billingWarehouseId;
5335
    }
5336
 
5337
    public void setBillingWarehouseId(long billingWarehouseId) {
5338
      this.billingWarehouseId = billingWarehouseId;
5339
      setBillingWarehouseIdIsSet(true);
5340
    }
5341
 
5342
    public void unsetBillingWarehouseId() {
5343
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
5344
    }
5345
 
5346
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
5347
    public boolean isSetBillingWarehouseId() {
5348
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
5349
    }
5350
 
5351
    public void setBillingWarehouseIdIsSet(boolean value) {
5352
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
5353
    }
5354
 
2820 chandransh 5355
    public void setFieldValue(_Fields field, Object value) {
5356
      switch (field) {
4555 mandeep.dh 5357
      case SERIAL_NUMBER:
2820 chandransh 5358
        if (value == null) {
4555 mandeep.dh 5359
          unsetSerialNumber();
2820 chandransh 5360
        } else {
4555 mandeep.dh 5361
          setSerialNumber((String)value);
2820 chandransh 5362
        }
5363
        break;
5364
 
4496 mandeep.dh 5365
      case TYPE:
2820 chandransh 5366
        if (value == null) {
4496 mandeep.dh 5367
          unsetType();
2820 chandransh 5368
        } else {
4496 mandeep.dh 5369
          setType((ScanType)value);
2820 chandransh 5370
        }
5371
        break;
5372
 
4496 mandeep.dh 5373
      case ORDER_ID:
2820 chandransh 5374
        if (value == null) {
4496 mandeep.dh 5375
          unsetOrderId();
2820 chandransh 5376
        } else {
4496 mandeep.dh 5377
          setOrderId((Long)value);
2820 chandransh 5378
        }
5379
        break;
5380
 
5110 mandeep.dh 5381
      case FULFILMENT_WAREHOUSE_ID:
2820 chandransh 5382
        if (value == null) {
5110 mandeep.dh 5383
          unsetFulfilmentWarehouseId();
2820 chandransh 5384
        } else {
5110 mandeep.dh 5385
          setFulfilmentWarehouseId((Long)value);
2820 chandransh 5386
        }
5387
        break;
5388
 
5110 mandeep.dh 5389
      case QUANTITY:
5390
        if (value == null) {
5391
          unsetQuantity();
5392
        } else {
5393
          setQuantity((Double)value);
5394
        }
5395
        break;
5396
 
5397
      case BILLING_WAREHOUSE_ID:
5398
        if (value == null) {
5399
          unsetBillingWarehouseId();
5400
        } else {
5401
          setBillingWarehouseId((Long)value);
5402
        }
5403
        break;
5404
 
2820 chandransh 5405
      }
5406
    }
5407
 
5408
    public Object getFieldValue(_Fields field) {
5409
      switch (field) {
4555 mandeep.dh 5410
      case SERIAL_NUMBER:
5411
        return getSerialNumber();
2820 chandransh 5412
 
5413
      case TYPE:
5414
        return getType();
5415
 
4496 mandeep.dh 5416
      case ORDER_ID:
5417
        return Long.valueOf(getOrderId());
5418
 
5110 mandeep.dh 5419
      case FULFILMENT_WAREHOUSE_ID:
5420
        return Long.valueOf(getFulfilmentWarehouseId());
4496 mandeep.dh 5421
 
5110 mandeep.dh 5422
      case QUANTITY:
5423
        return Double.valueOf(getQuantity());
5424
 
5425
      case BILLING_WAREHOUSE_ID:
5426
        return Long.valueOf(getBillingWarehouseId());
5427
 
2820 chandransh 5428
      }
5429
      throw new IllegalStateException();
5430
    }
5431
 
3430 rajveer 5432
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5433
    public boolean isSet(_Fields field) {
5434
      if (field == null) {
5435
        throw new IllegalArgumentException();
5436
      }
2820 chandransh 5437
 
5438
      switch (field) {
4555 mandeep.dh 5439
      case SERIAL_NUMBER:
5440
        return isSetSerialNumber();
2820 chandransh 5441
      case TYPE:
5442
        return isSetType();
4496 mandeep.dh 5443
      case ORDER_ID:
5444
        return isSetOrderId();
5110 mandeep.dh 5445
      case FULFILMENT_WAREHOUSE_ID:
5446
        return isSetFulfilmentWarehouseId();
5447
      case QUANTITY:
5448
        return isSetQuantity();
5449
      case BILLING_WAREHOUSE_ID:
5450
        return isSetBillingWarehouseId();
2820 chandransh 5451
      }
5452
      throw new IllegalStateException();
5453
    }
5454
 
5455
    @Override
5456
    public boolean equals(Object that) {
5457
      if (that == null)
5458
        return false;
4496 mandeep.dh 5459
      if (that instanceof scanSerializedItemForOrder_args)
5460
        return this.equals((scanSerializedItemForOrder_args)that);
2820 chandransh 5461
      return false;
5462
    }
5463
 
4496 mandeep.dh 5464
    public boolean equals(scanSerializedItemForOrder_args that) {
2820 chandransh 5465
      if (that == null)
5466
        return false;
5467
 
4555 mandeep.dh 5468
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
5469
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
5470
      if (this_present_serialNumber || that_present_serialNumber) {
5471
        if (!(this_present_serialNumber && that_present_serialNumber))
2820 chandransh 5472
          return false;
4555 mandeep.dh 5473
        if (!this.serialNumber.equals(that.serialNumber))
2820 chandransh 5474
          return false;
5475
      }
5476
 
4496 mandeep.dh 5477
      boolean this_present_type = true && this.isSetType();
5478
      boolean that_present_type = true && that.isSetType();
5479
      if (this_present_type || that_present_type) {
5480
        if (!(this_present_type && that_present_type))
2820 chandransh 5481
          return false;
4496 mandeep.dh 5482
        if (!this.type.equals(that.type))
2820 chandransh 5483
          return false;
5484
      }
5485
 
4496 mandeep.dh 5486
      boolean this_present_orderId = true;
5487
      boolean that_present_orderId = true;
5488
      if (this_present_orderId || that_present_orderId) {
5489
        if (!(this_present_orderId && that_present_orderId))
2820 chandransh 5490
          return false;
4496 mandeep.dh 5491
        if (this.orderId != that.orderId)
2820 chandransh 5492
          return false;
5493
      }
5494
 
5110 mandeep.dh 5495
      boolean this_present_fulfilmentWarehouseId = true;
5496
      boolean that_present_fulfilmentWarehouseId = true;
5497
      if (this_present_fulfilmentWarehouseId || that_present_fulfilmentWarehouseId) {
5498
        if (!(this_present_fulfilmentWarehouseId && that_present_fulfilmentWarehouseId))
2820 chandransh 5499
          return false;
5110 mandeep.dh 5500
        if (this.fulfilmentWarehouseId != that.fulfilmentWarehouseId)
2820 chandransh 5501
          return false;
5502
      }
5503
 
5110 mandeep.dh 5504
      boolean this_present_quantity = true;
5505
      boolean that_present_quantity = true;
5506
      if (this_present_quantity || that_present_quantity) {
5507
        if (!(this_present_quantity && that_present_quantity))
5508
          return false;
5509
        if (this.quantity != that.quantity)
5510
          return false;
5511
      }
5512
 
5513
      boolean this_present_billingWarehouseId = true;
5514
      boolean that_present_billingWarehouseId = true;
5515
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
5516
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
5517
          return false;
5518
        if (this.billingWarehouseId != that.billingWarehouseId)
5519
          return false;
5520
      }
5521
 
2820 chandransh 5522
      return true;
5523
    }
5524
 
5525
    @Override
5526
    public int hashCode() {
5527
      return 0;
5528
    }
5529
 
4496 mandeep.dh 5530
    public int compareTo(scanSerializedItemForOrder_args other) {
2820 chandransh 5531
      if (!getClass().equals(other.getClass())) {
5532
        return getClass().getName().compareTo(other.getClass().getName());
5533
      }
5534
 
5535
      int lastComparison = 0;
4496 mandeep.dh 5536
      scanSerializedItemForOrder_args typedOther = (scanSerializedItemForOrder_args)other;
2820 chandransh 5537
 
4555 mandeep.dh 5538
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
2820 chandransh 5539
      if (lastComparison != 0) {
5540
        return lastComparison;
5541
      }
4555 mandeep.dh 5542
      if (isSetSerialNumber()) {
5543
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
3430 rajveer 5544
        if (lastComparison != 0) {
5545
          return lastComparison;
5546
        }
2820 chandransh 5547
      }
4496 mandeep.dh 5548
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
2820 chandransh 5549
      if (lastComparison != 0) {
5550
        return lastComparison;
5551
      }
4496 mandeep.dh 5552
      if (isSetType()) {
5553
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 5554
        if (lastComparison != 0) {
5555
          return lastComparison;
5556
        }
2820 chandransh 5557
      }
4496 mandeep.dh 5558
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
2820 chandransh 5559
      if (lastComparison != 0) {
5560
        return lastComparison;
5561
      }
4496 mandeep.dh 5562
      if (isSetOrderId()) {
5563
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
3430 rajveer 5564
        if (lastComparison != 0) {
5565
          return lastComparison;
5566
        }
2820 chandransh 5567
      }
5110 mandeep.dh 5568
      lastComparison = Boolean.valueOf(isSetFulfilmentWarehouseId()).compareTo(typedOther.isSetFulfilmentWarehouseId());
2820 chandransh 5569
      if (lastComparison != 0) {
5570
        return lastComparison;
5571
      }
5110 mandeep.dh 5572
      if (isSetFulfilmentWarehouseId()) {
5573
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilmentWarehouseId, typedOther.fulfilmentWarehouseId);
3430 rajveer 5574
        if (lastComparison != 0) {
5575
          return lastComparison;
5576
        }
2820 chandransh 5577
      }
5110 mandeep.dh 5578
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
5579
      if (lastComparison != 0) {
5580
        return lastComparison;
5581
      }
5582
      if (isSetQuantity()) {
5583
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
5584
        if (lastComparison != 0) {
5585
          return lastComparison;
5586
        }
5587
      }
5588
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
5589
      if (lastComparison != 0) {
5590
        return lastComparison;
5591
      }
5592
      if (isSetBillingWarehouseId()) {
5593
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
5594
        if (lastComparison != 0) {
5595
          return lastComparison;
5596
        }
5597
      }
2820 chandransh 5598
      return 0;
5599
    }
5600
 
3430 rajveer 5601
    public _Fields fieldForId(int fieldId) {
5602
      return _Fields.findByThriftId(fieldId);
5603
    }
5604
 
5605
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5606
      org.apache.thrift.protocol.TField field;
2820 chandransh 5607
      iprot.readStructBegin();
5608
      while (true)
5609
      {
5610
        field = iprot.readFieldBegin();
3430 rajveer 5611
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 5612
          break;
5613
        }
3430 rajveer 5614
        switch (field.id) {
4555 mandeep.dh 5615
          case 1: // SERIAL_NUMBER
5616
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
5617
              this.serialNumber = iprot.readString();
3430 rajveer 5618
            } else { 
5619
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5620
            }
5621
            break;
4496 mandeep.dh 5622
          case 2: // TYPE
5623
            if (field.type == org.apache.thrift.protocol.TType.I32) {
5624
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 5625
            } else { 
5626
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5627
            }
5628
            break;
4496 mandeep.dh 5629
          case 3: // ORDER_ID
5630
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5631
              this.orderId = iprot.readI64();
5632
              setOrderIdIsSet(true);
3430 rajveer 5633
            } else { 
5634
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5635
            }
5636
            break;
5110 mandeep.dh 5637
          case 4: // FULFILMENT_WAREHOUSE_ID
4496 mandeep.dh 5638
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5110 mandeep.dh 5639
              this.fulfilmentWarehouseId = iprot.readI64();
5640
              setFulfilmentWarehouseIdIsSet(true);
3430 rajveer 5641
            } else { 
5642
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5643
            }
5644
            break;
5110 mandeep.dh 5645
          case 5: // QUANTITY
5646
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
5647
              this.quantity = iprot.readDouble();
5648
              setQuantityIsSet(true);
5649
            } else { 
5650
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5651
            }
5652
            break;
5653
          case 6: // BILLING_WAREHOUSE_ID
5654
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5655
              this.billingWarehouseId = iprot.readI64();
5656
              setBillingWarehouseIdIsSet(true);
5657
            } else { 
5658
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5659
            }
5660
            break;
3430 rajveer 5661
          default:
5662
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 5663
        }
3430 rajveer 5664
        iprot.readFieldEnd();
2820 chandransh 5665
      }
5666
      iprot.readStructEnd();
5667
      validate();
5668
    }
5669
 
3430 rajveer 5670
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 5671
      validate();
5672
 
5673
      oprot.writeStructBegin(STRUCT_DESC);
4555 mandeep.dh 5674
      if (this.serialNumber != null) {
5675
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
5676
        oprot.writeString(this.serialNumber);
5677
        oprot.writeFieldEnd();
5678
      }
2820 chandransh 5679
      if (this.type != null) {
5680
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
5681
        oprot.writeI32(this.type.getValue());
5682
        oprot.writeFieldEnd();
5683
      }
4496 mandeep.dh 5684
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
5685
      oprot.writeI64(this.orderId);
5686
      oprot.writeFieldEnd();
5110 mandeep.dh 5687
      oprot.writeFieldBegin(FULFILMENT_WAREHOUSE_ID_FIELD_DESC);
5688
      oprot.writeI64(this.fulfilmentWarehouseId);
4496 mandeep.dh 5689
      oprot.writeFieldEnd();
5110 mandeep.dh 5690
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
5691
      oprot.writeDouble(this.quantity);
5692
      oprot.writeFieldEnd();
5693
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
5694
      oprot.writeI64(this.billingWarehouseId);
5695
      oprot.writeFieldEnd();
2820 chandransh 5696
      oprot.writeFieldStop();
5697
      oprot.writeStructEnd();
5698
    }
5699
 
5700
    @Override
5701
    public String toString() {
4496 mandeep.dh 5702
      StringBuilder sb = new StringBuilder("scanSerializedItemForOrder_args(");
2820 chandransh 5703
      boolean first = true;
5704
 
4555 mandeep.dh 5705
      sb.append("serialNumber:");
5706
      if (this.serialNumber == null) {
5707
        sb.append("null");
5708
      } else {
5709
        sb.append(this.serialNumber);
5710
      }
2820 chandransh 5711
      first = false;
5712
      if (!first) sb.append(", ");
4496 mandeep.dh 5713
      sb.append("type:");
5714
      if (this.type == null) {
2820 chandransh 5715
        sb.append("null");
5716
      } else {
4496 mandeep.dh 5717
        sb.append(this.type);
2820 chandransh 5718
      }
5719
      first = false;
5720
      if (!first) sb.append(", ");
4496 mandeep.dh 5721
      sb.append("orderId:");
5722
      sb.append(this.orderId);
2820 chandransh 5723
      first = false;
5724
      if (!first) sb.append(", ");
5110 mandeep.dh 5725
      sb.append("fulfilmentWarehouseId:");
5726
      sb.append(this.fulfilmentWarehouseId);
2820 chandransh 5727
      first = false;
5110 mandeep.dh 5728
      if (!first) sb.append(", ");
5729
      sb.append("quantity:");
5730
      sb.append(this.quantity);
5731
      first = false;
5732
      if (!first) sb.append(", ");
5733
      sb.append("billingWarehouseId:");
5734
      sb.append(this.billingWarehouseId);
5735
      first = false;
2820 chandransh 5736
      sb.append(")");
5737
      return sb.toString();
5738
    }
5739
 
3430 rajveer 5740
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 5741
      // check for required fields
5742
    }
5743
 
3430 rajveer 5744
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5745
      try {
5746
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5747
      } catch (org.apache.thrift.TException te) {
5748
        throw new java.io.IOException(te);
5749
      }
5750
    }
5751
 
5752
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5753
      try {
5754
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5755
      } catch (org.apache.thrift.TException te) {
5756
        throw new java.io.IOException(te);
5757
      }
5758
    }
5759
 
2820 chandransh 5760
  }
5761
 
4496 mandeep.dh 5762
  public static class scanSerializedItemForOrder_result implements org.apache.thrift.TBase<scanSerializedItemForOrder_result, scanSerializedItemForOrder_result._Fields>, java.io.Serializable, Cloneable   {
5763
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItemForOrder_result");
2820 chandransh 5764
 
4555 mandeep.dh 5765
    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 5766
    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 5767
 
4555 mandeep.dh 5768
    private InventoryItem success; // required
3430 rajveer 5769
    private WarehouseServiceException wex; // required
2820 chandransh 5770
 
5771
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 5772
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 5773
      SUCCESS((short)0, "success"),
2820 chandransh 5774
      WEX((short)1, "wex");
5775
 
5776
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5777
 
5778
      static {
5779
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5780
          byName.put(field.getFieldName(), field);
5781
        }
5782
      }
5783
 
5784
      /**
5785
       * Find the _Fields constant that matches fieldId, or null if its not found.
5786
       */
5787
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 5788
        switch(fieldId) {
4496 mandeep.dh 5789
          case 0: // SUCCESS
5790
            return SUCCESS;
3430 rajveer 5791
          case 1: // WEX
5792
            return WEX;
5793
          default:
5794
            return null;
5795
        }
2820 chandransh 5796
      }
5797
 
5798
      /**
5799
       * Find the _Fields constant that matches fieldId, throwing an exception
5800
       * if it is not found.
5801
       */
5802
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5803
        _Fields fields = findByThriftId(fieldId);
5804
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5805
        return fields;
5806
      }
5807
 
5808
      /**
5809
       * Find the _Fields constant that matches name, or null if its not found.
5810
       */
5811
      public static _Fields findByName(String name) {
5812
        return byName.get(name);
5813
      }
5814
 
5815
      private final short _thriftId;
5816
      private final String _fieldName;
5817
 
5818
      _Fields(short thriftId, String fieldName) {
5819
        _thriftId = thriftId;
5820
        _fieldName = fieldName;
5821
      }
5822
 
5823
      public short getThriftFieldId() {
5824
        return _thriftId;
5825
      }
5826
 
5827
      public String getFieldName() {
5828
        return _fieldName;
5829
      }
5830
    }
5831
 
5832
    // isset id assignments
5833
 
3430 rajveer 5834
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 5835
    static {
3430 rajveer 5836
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 5837
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 5838
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 5839
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5840
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5841
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 5842
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanSerializedItemForOrder_result.class, metaDataMap);
2820 chandransh 5843
    }
5844
 
4496 mandeep.dh 5845
    public scanSerializedItemForOrder_result() {
2820 chandransh 5846
    }
5847
 
4496 mandeep.dh 5848
    public scanSerializedItemForOrder_result(
4555 mandeep.dh 5849
      InventoryItem success,
2820 chandransh 5850
      WarehouseServiceException wex)
5851
    {
5852
      this();
4496 mandeep.dh 5853
      this.success = success;
2820 chandransh 5854
      this.wex = wex;
5855
    }
5856
 
5857
    /**
5858
     * Performs a deep copy on <i>other</i>.
5859
     */
4496 mandeep.dh 5860
    public scanSerializedItemForOrder_result(scanSerializedItemForOrder_result other) {
4555 mandeep.dh 5861
      if (other.isSetSuccess()) {
5862
        this.success = new InventoryItem(other.success);
5863
      }
2820 chandransh 5864
      if (other.isSetWex()) {
5865
        this.wex = new WarehouseServiceException(other.wex);
5866
      }
5867
    }
5868
 
4496 mandeep.dh 5869
    public scanSerializedItemForOrder_result deepCopy() {
5870
      return new scanSerializedItemForOrder_result(this);
2820 chandransh 5871
    }
5872
 
3430 rajveer 5873
    @Override
5874
    public void clear() {
4555 mandeep.dh 5875
      this.success = null;
3430 rajveer 5876
      this.wex = null;
2820 chandransh 5877
    }
5878
 
4555 mandeep.dh 5879
    public InventoryItem getSuccess() {
4496 mandeep.dh 5880
      return this.success;
5881
    }
5882
 
4555 mandeep.dh 5883
    public void setSuccess(InventoryItem success) {
4496 mandeep.dh 5884
      this.success = success;
5885
    }
5886
 
5887
    public void unsetSuccess() {
4555 mandeep.dh 5888
      this.success = null;
4496 mandeep.dh 5889
    }
5890
 
5891
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5892
    public boolean isSetSuccess() {
4555 mandeep.dh 5893
      return this.success != null;
4496 mandeep.dh 5894
    }
5895
 
5896
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 5897
      if (!value) {
5898
        this.success = null;
5899
      }
4496 mandeep.dh 5900
    }
5901
 
2820 chandransh 5902
    public WarehouseServiceException getWex() {
5903
      return this.wex;
5904
    }
5905
 
3430 rajveer 5906
    public void setWex(WarehouseServiceException wex) {
2820 chandransh 5907
      this.wex = wex;
5908
    }
5909
 
5910
    public void unsetWex() {
5911
      this.wex = null;
5912
    }
5913
 
3430 rajveer 5914
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2820 chandransh 5915
    public boolean isSetWex() {
5916
      return this.wex != null;
5917
    }
5918
 
5919
    public void setWexIsSet(boolean value) {
5920
      if (!value) {
5921
        this.wex = null;
5922
      }
5923
    }
5924
 
5925
    public void setFieldValue(_Fields field, Object value) {
5926
      switch (field) {
4496 mandeep.dh 5927
      case SUCCESS:
5928
        if (value == null) {
5929
          unsetSuccess();
5930
        } else {
4555 mandeep.dh 5931
          setSuccess((InventoryItem)value);
4496 mandeep.dh 5932
        }
5933
        break;
5934
 
2820 chandransh 5935
      case WEX:
5936
        if (value == null) {
5937
          unsetWex();
5938
        } else {
5939
          setWex((WarehouseServiceException)value);
5940
        }
5941
        break;
5942
 
5943
      }
5944
    }
5945
 
5946
    public Object getFieldValue(_Fields field) {
5947
      switch (field) {
4496 mandeep.dh 5948
      case SUCCESS:
4555 mandeep.dh 5949
        return getSuccess();
4496 mandeep.dh 5950
 
2820 chandransh 5951
      case WEX:
5952
        return getWex();
5953
 
5954
      }
5955
      throw new IllegalStateException();
5956
    }
5957
 
3430 rajveer 5958
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5959
    public boolean isSet(_Fields field) {
5960
      if (field == null) {
5961
        throw new IllegalArgumentException();
5962
      }
2820 chandransh 5963
 
5964
      switch (field) {
4496 mandeep.dh 5965
      case SUCCESS:
5966
        return isSetSuccess();
2820 chandransh 5967
      case WEX:
5968
        return isSetWex();
5969
      }
5970
      throw new IllegalStateException();
5971
    }
5972
 
5973
    @Override
5974
    public boolean equals(Object that) {
5975
      if (that == null)
5976
        return false;
4496 mandeep.dh 5977
      if (that instanceof scanSerializedItemForOrder_result)
5978
        return this.equals((scanSerializedItemForOrder_result)that);
2820 chandransh 5979
      return false;
5980
    }
5981
 
4496 mandeep.dh 5982
    public boolean equals(scanSerializedItemForOrder_result that) {
2820 chandransh 5983
      if (that == null)
5984
        return false;
5985
 
4555 mandeep.dh 5986
      boolean this_present_success = true && this.isSetSuccess();
5987
      boolean that_present_success = true && that.isSetSuccess();
4496 mandeep.dh 5988
      if (this_present_success || that_present_success) {
5989
        if (!(this_present_success && that_present_success))
5990
          return false;
4555 mandeep.dh 5991
        if (!this.success.equals(that.success))
4496 mandeep.dh 5992
          return false;
5993
      }
5994
 
2820 chandransh 5995
      boolean this_present_wex = true && this.isSetWex();
5996
      boolean that_present_wex = true && that.isSetWex();
5997
      if (this_present_wex || that_present_wex) {
5998
        if (!(this_present_wex && that_present_wex))
5999
          return false;
6000
        if (!this.wex.equals(that.wex))
6001
          return false;
6002
      }
6003
 
6004
      return true;
6005
    }
6006
 
6007
    @Override
6008
    public int hashCode() {
6009
      return 0;
6010
    }
6011
 
4496 mandeep.dh 6012
    public int compareTo(scanSerializedItemForOrder_result other) {
2820 chandransh 6013
      if (!getClass().equals(other.getClass())) {
6014
        return getClass().getName().compareTo(other.getClass().getName());
6015
      }
6016
 
6017
      int lastComparison = 0;
4496 mandeep.dh 6018
      scanSerializedItemForOrder_result typedOther = (scanSerializedItemForOrder_result)other;
2820 chandransh 6019
 
4496 mandeep.dh 6020
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
6021
      if (lastComparison != 0) {
6022
        return lastComparison;
6023
      }
6024
      if (isSetSuccess()) {
6025
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6026
        if (lastComparison != 0) {
6027
          return lastComparison;
6028
        }
6029
      }
3430 rajveer 6030
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 6031
      if (lastComparison != 0) {
6032
        return lastComparison;
6033
      }
3430 rajveer 6034
      if (isSetWex()) {
6035
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
6036
        if (lastComparison != 0) {
6037
          return lastComparison;
6038
        }
2820 chandransh 6039
      }
6040
      return 0;
6041
    }
6042
 
3430 rajveer 6043
    public _Fields fieldForId(int fieldId) {
6044
      return _Fields.findByThriftId(fieldId);
6045
    }
6046
 
6047
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6048
      org.apache.thrift.protocol.TField field;
2820 chandransh 6049
      iprot.readStructBegin();
6050
      while (true)
6051
      {
6052
        field = iprot.readFieldBegin();
3430 rajveer 6053
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 6054
          break;
6055
        }
3430 rajveer 6056
        switch (field.id) {
4496 mandeep.dh 6057
          case 0: // SUCCESS
4555 mandeep.dh 6058
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6059
              this.success = new InventoryItem();
6060
              this.success.read(iprot);
4496 mandeep.dh 6061
            } else { 
6062
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6063
            }
6064
            break;
3430 rajveer 6065
          case 1: // WEX
6066
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6067
              this.wex = new WarehouseServiceException();
6068
              this.wex.read(iprot);
6069
            } else { 
6070
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6071
            }
6072
            break;
6073
          default:
6074
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 6075
        }
3430 rajveer 6076
        iprot.readFieldEnd();
2820 chandransh 6077
      }
6078
      iprot.readStructEnd();
6079
      validate();
6080
    }
6081
 
3430 rajveer 6082
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 6083
      oprot.writeStructBegin(STRUCT_DESC);
6084
 
4496 mandeep.dh 6085
      if (this.isSetSuccess()) {
6086
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 6087
        this.success.write(oprot);
4496 mandeep.dh 6088
        oprot.writeFieldEnd();
6089
      } else if (this.isSetWex()) {
2820 chandransh 6090
        oprot.writeFieldBegin(WEX_FIELD_DESC);
6091
        this.wex.write(oprot);
6092
        oprot.writeFieldEnd();
6093
      }
6094
      oprot.writeFieldStop();
6095
      oprot.writeStructEnd();
6096
    }
6097
 
6098
    @Override
6099
    public String toString() {
4496 mandeep.dh 6100
      StringBuilder sb = new StringBuilder("scanSerializedItemForOrder_result(");
2820 chandransh 6101
      boolean first = true;
6102
 
4496 mandeep.dh 6103
      sb.append("success:");
4555 mandeep.dh 6104
      if (this.success == null) {
6105
        sb.append("null");
6106
      } else {
6107
        sb.append(this.success);
6108
      }
4496 mandeep.dh 6109
      first = false;
6110
      if (!first) sb.append(", ");
2820 chandransh 6111
      sb.append("wex:");
6112
      if (this.wex == null) {
6113
        sb.append("null");
6114
      } else {
6115
        sb.append(this.wex);
6116
      }
6117
      first = false;
6118
      sb.append(")");
6119
      return sb.toString();
6120
    }
6121
 
3430 rajveer 6122
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 6123
      // check for required fields
6124
    }
6125
 
3430 rajveer 6126
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6127
      try {
6128
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6129
      } catch (org.apache.thrift.TException te) {
6130
        throw new java.io.IOException(te);
6131
      }
6132
    }
6133
 
6134
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6135
      try {
6136
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6137
      } catch (org.apache.thrift.TException te) {
6138
        throw new java.io.IOException(te);
6139
      }
6140
    }
6141
 
2820 chandransh 6142
  }
6143
 
4496 mandeep.dh 6144
  public static class scanForOrder_args implements org.apache.thrift.TBase<scanForOrder_args, scanForOrder_args._Fields>, java.io.Serializable, Cloneable   {
6145
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOrder_args");
2820 chandransh 6146
 
5361 mandeep.dh 6147
    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 6148
    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);
6149
    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);
6150
    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 6151
    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 6152
    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 6153
 
5361 mandeep.dh 6154
    private InventoryItem inventoryItem; // required
3430 rajveer 6155
    private ScanType type; // required
4496 mandeep.dh 6156
    private long quantity; // required
6157
    private long orderId; // required
5110 mandeep.dh 6158
    private long fulfilmentWarehouseId; // required
5361 mandeep.dh 6159
    private long billingWarehouseId; // required
2820 chandransh 6160
 
6161
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 6162
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 6163
      INVENTORY_ITEM((short)1, "inventoryItem"),
2820 chandransh 6164
      /**
6165
       * 
6166
       * @see ScanType
6167
       */
4496 mandeep.dh 6168
      TYPE((short)2, "type"),
6169
      QUANTITY((short)3, "quantity"),
6170
      ORDER_ID((short)4, "orderId"),
5361 mandeep.dh 6171
      FULFILMENT_WAREHOUSE_ID((short)5, "fulfilmentWarehouseId"),
6172
      BILLING_WAREHOUSE_ID((short)6, "billingWarehouseId");
2820 chandransh 6173
 
6174
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6175
 
6176
      static {
6177
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6178
          byName.put(field.getFieldName(), field);
6179
        }
6180
      }
6181
 
6182
      /**
6183
       * Find the _Fields constant that matches fieldId, or null if its not found.
6184
       */
6185
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 6186
        switch(fieldId) {
5361 mandeep.dh 6187
          case 1: // INVENTORY_ITEM
6188
            return INVENTORY_ITEM;
4496 mandeep.dh 6189
          case 2: // TYPE
3430 rajveer 6190
            return TYPE;
4496 mandeep.dh 6191
          case 3: // QUANTITY
6192
            return QUANTITY;
6193
          case 4: // ORDER_ID
6194
            return ORDER_ID;
5110 mandeep.dh 6195
          case 5: // FULFILMENT_WAREHOUSE_ID
6196
            return FULFILMENT_WAREHOUSE_ID;
5361 mandeep.dh 6197
          case 6: // BILLING_WAREHOUSE_ID
6198
            return BILLING_WAREHOUSE_ID;
3430 rajveer 6199
          default:
6200
            return null;
6201
        }
2820 chandransh 6202
      }
6203
 
6204
      /**
6205
       * Find the _Fields constant that matches fieldId, throwing an exception
6206
       * if it is not found.
6207
       */
6208
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6209
        _Fields fields = findByThriftId(fieldId);
6210
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6211
        return fields;
6212
      }
6213
 
6214
      /**
6215
       * Find the _Fields constant that matches name, or null if its not found.
6216
       */
6217
      public static _Fields findByName(String name) {
6218
        return byName.get(name);
6219
      }
6220
 
6221
      private final short _thriftId;
6222
      private final String _fieldName;
6223
 
6224
      _Fields(short thriftId, String fieldName) {
6225
        _thriftId = thriftId;
6226
        _fieldName = fieldName;
6227
      }
6228
 
6229
      public short getThriftFieldId() {
6230
        return _thriftId;
6231
      }
6232
 
6233
      public String getFieldName() {
6234
        return _fieldName;
6235
      }
6236
    }
6237
 
6238
    // isset id assignments
5361 mandeep.dh 6239
    private static final int __QUANTITY_ISSET_ID = 0;
6240
    private static final int __ORDERID_ISSET_ID = 1;
6241
    private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 2;
6242
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 3;
4496 mandeep.dh 6243
    private BitSet __isset_bit_vector = new BitSet(4);
2820 chandransh 6244
 
3430 rajveer 6245
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 6246
    static {
3430 rajveer 6247
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5361 mandeep.dh 6248
      tmpMap.put(_Fields.INVENTORY_ITEM, new org.apache.thrift.meta_data.FieldMetaData("inventoryItem", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6249
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 6250
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6251
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
4496 mandeep.dh 6252
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6253
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6254
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6255
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 6256
      tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 6257
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5361 mandeep.dh 6258
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6259
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 6260
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 6261
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOrder_args.class, metaDataMap);
2820 chandransh 6262
    }
6263
 
4496 mandeep.dh 6264
    public scanForOrder_args() {
2820 chandransh 6265
    }
6266
 
4496 mandeep.dh 6267
    public scanForOrder_args(
5361 mandeep.dh 6268
      InventoryItem inventoryItem,
4496 mandeep.dh 6269
      ScanType type,
6270
      long quantity,
6271
      long orderId,
5361 mandeep.dh 6272
      long fulfilmentWarehouseId,
6273
      long billingWarehouseId)
2820 chandransh 6274
    {
6275
      this();
5361 mandeep.dh 6276
      this.inventoryItem = inventoryItem;
2820 chandransh 6277
      this.type = type;
4496 mandeep.dh 6278
      this.quantity = quantity;
6279
      setQuantityIsSet(true);
6280
      this.orderId = orderId;
6281
      setOrderIdIsSet(true);
5110 mandeep.dh 6282
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
6283
      setFulfilmentWarehouseIdIsSet(true);
5361 mandeep.dh 6284
      this.billingWarehouseId = billingWarehouseId;
6285
      setBillingWarehouseIdIsSet(true);
2820 chandransh 6286
    }
6287
 
6288
    /**
6289
     * Performs a deep copy on <i>other</i>.
6290
     */
4496 mandeep.dh 6291
    public scanForOrder_args(scanForOrder_args other) {
6292
      __isset_bit_vector.clear();
6293
      __isset_bit_vector.or(other.__isset_bit_vector);
5361 mandeep.dh 6294
      if (other.isSetInventoryItem()) {
6295
        this.inventoryItem = new InventoryItem(other.inventoryItem);
6296
      }
2820 chandransh 6297
      if (other.isSetType()) {
6298
        this.type = other.type;
6299
      }
4496 mandeep.dh 6300
      this.quantity = other.quantity;
6301
      this.orderId = other.orderId;
5110 mandeep.dh 6302
      this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
5361 mandeep.dh 6303
      this.billingWarehouseId = other.billingWarehouseId;
2820 chandransh 6304
    }
6305
 
4496 mandeep.dh 6306
    public scanForOrder_args deepCopy() {
6307
      return new scanForOrder_args(this);
2820 chandransh 6308
    }
6309
 
3430 rajveer 6310
    @Override
6311
    public void clear() {
5361 mandeep.dh 6312
      this.inventoryItem = null;
3430 rajveer 6313
      this.type = null;
4496 mandeep.dh 6314
      setQuantityIsSet(false);
6315
      this.quantity = 0;
6316
      setOrderIdIsSet(false);
6317
      this.orderId = 0;
5110 mandeep.dh 6318
      setFulfilmentWarehouseIdIsSet(false);
6319
      this.fulfilmentWarehouseId = 0;
5361 mandeep.dh 6320
      setBillingWarehouseIdIsSet(false);
6321
      this.billingWarehouseId = 0;
2820 chandransh 6322
    }
6323
 
5361 mandeep.dh 6324
    public InventoryItem getInventoryItem() {
6325
      return this.inventoryItem;
2820 chandransh 6326
    }
6327
 
5361 mandeep.dh 6328
    public void setInventoryItem(InventoryItem inventoryItem) {
6329
      this.inventoryItem = inventoryItem;
2820 chandransh 6330
    }
6331
 
5361 mandeep.dh 6332
    public void unsetInventoryItem() {
6333
      this.inventoryItem = null;
2820 chandransh 6334
    }
6335
 
5361 mandeep.dh 6336
    /** Returns true if field inventoryItem is set (has been assigned a value) and false otherwise */
6337
    public boolean isSetInventoryItem() {
6338
      return this.inventoryItem != null;
2820 chandransh 6339
    }
6340
 
5361 mandeep.dh 6341
    public void setInventoryItemIsSet(boolean value) {
6342
      if (!value) {
6343
        this.inventoryItem = null;
6344
      }
2820 chandransh 6345
    }
6346
 
6347
    /**
6348
     * 
6349
     * @see ScanType
6350
     */
6351
    public ScanType getType() {
6352
      return this.type;
6353
    }
6354
 
6355
    /**
6356
     * 
6357
     * @see ScanType
6358
     */
3430 rajveer 6359
    public void setType(ScanType type) {
2820 chandransh 6360
      this.type = type;
6361
    }
6362
 
6363
    public void unsetType() {
6364
      this.type = null;
6365
    }
6366
 
3430 rajveer 6367
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
2820 chandransh 6368
    public boolean isSetType() {
6369
      return this.type != null;
6370
    }
6371
 
6372
    public void setTypeIsSet(boolean value) {
6373
      if (!value) {
6374
        this.type = null;
6375
      }
6376
    }
6377
 
4496 mandeep.dh 6378
    public long getQuantity() {
6379
      return this.quantity;
6380
    }
6381
 
6382
    public void setQuantity(long quantity) {
6383
      this.quantity = quantity;
6384
      setQuantityIsSet(true);
6385
    }
6386
 
6387
    public void unsetQuantity() {
6388
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
6389
    }
6390
 
6391
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
6392
    public boolean isSetQuantity() {
6393
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
6394
    }
6395
 
6396
    public void setQuantityIsSet(boolean value) {
6397
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
6398
    }
6399
 
6400
    public long getOrderId() {
6401
      return this.orderId;
6402
    }
6403
 
6404
    public void setOrderId(long orderId) {
6405
      this.orderId = orderId;
6406
      setOrderIdIsSet(true);
6407
    }
6408
 
6409
    public void unsetOrderId() {
6410
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
6411
    }
6412
 
6413
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
6414
    public boolean isSetOrderId() {
6415
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
6416
    }
6417
 
6418
    public void setOrderIdIsSet(boolean value) {
6419
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
6420
    }
6421
 
5110 mandeep.dh 6422
    public long getFulfilmentWarehouseId() {
6423
      return this.fulfilmentWarehouseId;
4496 mandeep.dh 6424
    }
6425
 
5110 mandeep.dh 6426
    public void setFulfilmentWarehouseId(long fulfilmentWarehouseId) {
6427
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
6428
      setFulfilmentWarehouseIdIsSet(true);
4496 mandeep.dh 6429
    }
6430
 
5110 mandeep.dh 6431
    public void unsetFulfilmentWarehouseId() {
6432
      __isset_bit_vector.clear(__FULFILMENTWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 6433
    }
6434
 
5110 mandeep.dh 6435
    /** Returns true if field fulfilmentWarehouseId is set (has been assigned a value) and false otherwise */
6436
    public boolean isSetFulfilmentWarehouseId() {
6437
      return __isset_bit_vector.get(__FULFILMENTWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 6438
    }
6439
 
5110 mandeep.dh 6440
    public void setFulfilmentWarehouseIdIsSet(boolean value) {
6441
      __isset_bit_vector.set(__FULFILMENTWAREHOUSEID_ISSET_ID, value);
4496 mandeep.dh 6442
    }
6443
 
5361 mandeep.dh 6444
    public long getBillingWarehouseId() {
6445
      return this.billingWarehouseId;
6446
    }
6447
 
6448
    public void setBillingWarehouseId(long billingWarehouseId) {
6449
      this.billingWarehouseId = billingWarehouseId;
6450
      setBillingWarehouseIdIsSet(true);
6451
    }
6452
 
6453
    public void unsetBillingWarehouseId() {
6454
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
6455
    }
6456
 
6457
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
6458
    public boolean isSetBillingWarehouseId() {
6459
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
6460
    }
6461
 
6462
    public void setBillingWarehouseIdIsSet(boolean value) {
6463
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
6464
    }
6465
 
2820 chandransh 6466
    public void setFieldValue(_Fields field, Object value) {
6467
      switch (field) {
5361 mandeep.dh 6468
      case INVENTORY_ITEM:
2820 chandransh 6469
        if (value == null) {
5361 mandeep.dh 6470
          unsetInventoryItem();
2820 chandransh 6471
        } else {
5361 mandeep.dh 6472
          setInventoryItem((InventoryItem)value);
2820 chandransh 6473
        }
6474
        break;
6475
 
4496 mandeep.dh 6476
      case TYPE:
2820 chandransh 6477
        if (value == null) {
4496 mandeep.dh 6478
          unsetType();
2820 chandransh 6479
        } else {
4496 mandeep.dh 6480
          setType((ScanType)value);
2820 chandransh 6481
        }
6482
        break;
6483
 
4496 mandeep.dh 6484
      case QUANTITY:
2820 chandransh 6485
        if (value == null) {
4496 mandeep.dh 6486
          unsetQuantity();
2820 chandransh 6487
        } else {
4496 mandeep.dh 6488
          setQuantity((Long)value);
2820 chandransh 6489
        }
6490
        break;
6491
 
4496 mandeep.dh 6492
      case ORDER_ID:
6493
        if (value == null) {
6494
          unsetOrderId();
6495
        } else {
6496
          setOrderId((Long)value);
6497
        }
6498
        break;
6499
 
5110 mandeep.dh 6500
      case FULFILMENT_WAREHOUSE_ID:
4496 mandeep.dh 6501
        if (value == null) {
5110 mandeep.dh 6502
          unsetFulfilmentWarehouseId();
4496 mandeep.dh 6503
        } else {
5110 mandeep.dh 6504
          setFulfilmentWarehouseId((Long)value);
4496 mandeep.dh 6505
        }
6506
        break;
6507
 
5361 mandeep.dh 6508
      case BILLING_WAREHOUSE_ID:
6509
        if (value == null) {
6510
          unsetBillingWarehouseId();
6511
        } else {
6512
          setBillingWarehouseId((Long)value);
6513
        }
6514
        break;
6515
 
2820 chandransh 6516
      }
6517
    }
6518
 
6519
    public Object getFieldValue(_Fields field) {
6520
      switch (field) {
5361 mandeep.dh 6521
      case INVENTORY_ITEM:
6522
        return getInventoryItem();
2820 chandransh 6523
 
6524
      case TYPE:
6525
        return getType();
6526
 
4496 mandeep.dh 6527
      case QUANTITY:
6528
        return Long.valueOf(getQuantity());
6529
 
6530
      case ORDER_ID:
6531
        return Long.valueOf(getOrderId());
6532
 
5110 mandeep.dh 6533
      case FULFILMENT_WAREHOUSE_ID:
6534
        return Long.valueOf(getFulfilmentWarehouseId());
4496 mandeep.dh 6535
 
5361 mandeep.dh 6536
      case BILLING_WAREHOUSE_ID:
6537
        return Long.valueOf(getBillingWarehouseId());
6538
 
2820 chandransh 6539
      }
6540
      throw new IllegalStateException();
6541
    }
6542
 
3430 rajveer 6543
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6544
    public boolean isSet(_Fields field) {
6545
      if (field == null) {
6546
        throw new IllegalArgumentException();
6547
      }
2820 chandransh 6548
 
6549
      switch (field) {
5361 mandeep.dh 6550
      case INVENTORY_ITEM:
6551
        return isSetInventoryItem();
2820 chandransh 6552
      case TYPE:
6553
        return isSetType();
4496 mandeep.dh 6554
      case QUANTITY:
6555
        return isSetQuantity();
6556
      case ORDER_ID:
6557
        return isSetOrderId();
5110 mandeep.dh 6558
      case FULFILMENT_WAREHOUSE_ID:
6559
        return isSetFulfilmentWarehouseId();
5361 mandeep.dh 6560
      case BILLING_WAREHOUSE_ID:
6561
        return isSetBillingWarehouseId();
2820 chandransh 6562
      }
6563
      throw new IllegalStateException();
6564
    }
6565
 
6566
    @Override
6567
    public boolean equals(Object that) {
6568
      if (that == null)
6569
        return false;
4496 mandeep.dh 6570
      if (that instanceof scanForOrder_args)
6571
        return this.equals((scanForOrder_args)that);
2820 chandransh 6572
      return false;
6573
    }
6574
 
4496 mandeep.dh 6575
    public boolean equals(scanForOrder_args that) {
2820 chandransh 6576
      if (that == null)
6577
        return false;
6578
 
5361 mandeep.dh 6579
      boolean this_present_inventoryItem = true && this.isSetInventoryItem();
6580
      boolean that_present_inventoryItem = true && that.isSetInventoryItem();
6581
      if (this_present_inventoryItem || that_present_inventoryItem) {
6582
        if (!(this_present_inventoryItem && that_present_inventoryItem))
2820 chandransh 6583
          return false;
5361 mandeep.dh 6584
        if (!this.inventoryItem.equals(that.inventoryItem))
2820 chandransh 6585
          return false;
6586
      }
6587
 
6588
      boolean this_present_type = true && this.isSetType();
6589
      boolean that_present_type = true && that.isSetType();
6590
      if (this_present_type || that_present_type) {
6591
        if (!(this_present_type && that_present_type))
6592
          return false;
6593
        if (!this.type.equals(that.type))
6594
          return false;
6595
      }
6596
 
4496 mandeep.dh 6597
      boolean this_present_quantity = true;
6598
      boolean that_present_quantity = true;
6599
      if (this_present_quantity || that_present_quantity) {
6600
        if (!(this_present_quantity && that_present_quantity))
6601
          return false;
6602
        if (this.quantity != that.quantity)
6603
          return false;
6604
      }
6605
 
6606
      boolean this_present_orderId = true;
6607
      boolean that_present_orderId = true;
6608
      if (this_present_orderId || that_present_orderId) {
6609
        if (!(this_present_orderId && that_present_orderId))
6610
          return false;
6611
        if (this.orderId != that.orderId)
6612
          return false;
6613
      }
6614
 
5110 mandeep.dh 6615
      boolean this_present_fulfilmentWarehouseId = true;
6616
      boolean that_present_fulfilmentWarehouseId = true;
6617
      if (this_present_fulfilmentWarehouseId || that_present_fulfilmentWarehouseId) {
6618
        if (!(this_present_fulfilmentWarehouseId && that_present_fulfilmentWarehouseId))
4496 mandeep.dh 6619
          return false;
5110 mandeep.dh 6620
        if (this.fulfilmentWarehouseId != that.fulfilmentWarehouseId)
4496 mandeep.dh 6621
          return false;
6622
      }
6623
 
5361 mandeep.dh 6624
      boolean this_present_billingWarehouseId = true;
6625
      boolean that_present_billingWarehouseId = true;
6626
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
6627
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
6628
          return false;
6629
        if (this.billingWarehouseId != that.billingWarehouseId)
6630
          return false;
6631
      }
6632
 
2820 chandransh 6633
      return true;
6634
    }
6635
 
6636
    @Override
6637
    public int hashCode() {
6638
      return 0;
6639
    }
6640
 
4496 mandeep.dh 6641
    public int compareTo(scanForOrder_args other) {
2820 chandransh 6642
      if (!getClass().equals(other.getClass())) {
6643
        return getClass().getName().compareTo(other.getClass().getName());
6644
      }
6645
 
6646
      int lastComparison = 0;
4496 mandeep.dh 6647
      scanForOrder_args typedOther = (scanForOrder_args)other;
2820 chandransh 6648
 
5361 mandeep.dh 6649
      lastComparison = Boolean.valueOf(isSetInventoryItem()).compareTo(typedOther.isSetInventoryItem());
2820 chandransh 6650
      if (lastComparison != 0) {
6651
        return lastComparison;
6652
      }
5361 mandeep.dh 6653
      if (isSetInventoryItem()) {
6654
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItem, typedOther.inventoryItem);
3430 rajveer 6655
        if (lastComparison != 0) {
6656
          return lastComparison;
6657
        }
2820 chandransh 6658
      }
4496 mandeep.dh 6659
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
2820 chandransh 6660
      if (lastComparison != 0) {
6661
        return lastComparison;
6662
      }
4496 mandeep.dh 6663
      if (isSetType()) {
6664
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 6665
        if (lastComparison != 0) {
6666
          return lastComparison;
6667
        }
2820 chandransh 6668
      }
4496 mandeep.dh 6669
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
2820 chandransh 6670
      if (lastComparison != 0) {
6671
        return lastComparison;
6672
      }
4496 mandeep.dh 6673
      if (isSetQuantity()) {
6674
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
3430 rajveer 6675
        if (lastComparison != 0) {
6676
          return lastComparison;
6677
        }
2820 chandransh 6678
      }
4496 mandeep.dh 6679
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
6680
      if (lastComparison != 0) {
6681
        return lastComparison;
6682
      }
6683
      if (isSetOrderId()) {
6684
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
6685
        if (lastComparison != 0) {
6686
          return lastComparison;
6687
        }
6688
      }
5110 mandeep.dh 6689
      lastComparison = Boolean.valueOf(isSetFulfilmentWarehouseId()).compareTo(typedOther.isSetFulfilmentWarehouseId());
4496 mandeep.dh 6690
      if (lastComparison != 0) {
6691
        return lastComparison;
6692
      }
5110 mandeep.dh 6693
      if (isSetFulfilmentWarehouseId()) {
6694
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilmentWarehouseId, typedOther.fulfilmentWarehouseId);
4496 mandeep.dh 6695
        if (lastComparison != 0) {
6696
          return lastComparison;
6697
        }
6698
      }
5361 mandeep.dh 6699
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
6700
      if (lastComparison != 0) {
6701
        return lastComparison;
6702
      }
6703
      if (isSetBillingWarehouseId()) {
6704
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
6705
        if (lastComparison != 0) {
6706
          return lastComparison;
6707
        }
6708
      }
2820 chandransh 6709
      return 0;
6710
    }
6711
 
3430 rajveer 6712
    public _Fields fieldForId(int fieldId) {
6713
      return _Fields.findByThriftId(fieldId);
6714
    }
6715
 
6716
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6717
      org.apache.thrift.protocol.TField field;
2820 chandransh 6718
      iprot.readStructBegin();
6719
      while (true)
6720
      {
6721
        field = iprot.readFieldBegin();
3430 rajveer 6722
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 6723
          break;
6724
        }
3430 rajveer 6725
        switch (field.id) {
5361 mandeep.dh 6726
          case 1: // INVENTORY_ITEM
6727
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6728
              this.inventoryItem = new InventoryItem();
6729
              this.inventoryItem.read(iprot);
3430 rajveer 6730
            } else { 
6731
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6732
            }
6733
            break;
4496 mandeep.dh 6734
          case 2: // TYPE
6735
            if (field.type == org.apache.thrift.protocol.TType.I32) {
6736
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 6737
            } else { 
6738
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6739
            }
6740
            break;
4496 mandeep.dh 6741
          case 3: // QUANTITY
6742
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6743
              this.quantity = iprot.readI64();
6744
              setQuantityIsSet(true);
3430 rajveer 6745
            } else { 
6746
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6747
            }
6748
            break;
4496 mandeep.dh 6749
          case 4: // ORDER_ID
6750
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6751
              this.orderId = iprot.readI64();
6752
              setOrderIdIsSet(true);
6753
            } else { 
6754
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6755
            }
6756
            break;
5110 mandeep.dh 6757
          case 5: // FULFILMENT_WAREHOUSE_ID
4496 mandeep.dh 6758
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5110 mandeep.dh 6759
              this.fulfilmentWarehouseId = iprot.readI64();
6760
              setFulfilmentWarehouseIdIsSet(true);
4496 mandeep.dh 6761
            } else { 
6762
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6763
            }
6764
            break;
5361 mandeep.dh 6765
          case 6: // BILLING_WAREHOUSE_ID
6766
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6767
              this.billingWarehouseId = iprot.readI64();
6768
              setBillingWarehouseIdIsSet(true);
6769
            } else { 
6770
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6771
            }
6772
            break;
3430 rajveer 6773
          default:
6774
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 6775
        }
3430 rajveer 6776
        iprot.readFieldEnd();
2820 chandransh 6777
      }
6778
      iprot.readStructEnd();
6779
      validate();
6780
    }
6781
 
3430 rajveer 6782
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 6783
      validate();
6784
 
6785
      oprot.writeStructBegin(STRUCT_DESC);
5361 mandeep.dh 6786
      if (this.inventoryItem != null) {
6787
        oprot.writeFieldBegin(INVENTORY_ITEM_FIELD_DESC);
6788
        this.inventoryItem.write(oprot);
6789
        oprot.writeFieldEnd();
6790
      }
2820 chandransh 6791
      if (this.type != null) {
6792
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
6793
        oprot.writeI32(this.type.getValue());
6794
        oprot.writeFieldEnd();
6795
      }
4496 mandeep.dh 6796
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
6797
      oprot.writeI64(this.quantity);
6798
      oprot.writeFieldEnd();
6799
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
6800
      oprot.writeI64(this.orderId);
6801
      oprot.writeFieldEnd();
5110 mandeep.dh 6802
      oprot.writeFieldBegin(FULFILMENT_WAREHOUSE_ID_FIELD_DESC);
6803
      oprot.writeI64(this.fulfilmentWarehouseId);
4496 mandeep.dh 6804
      oprot.writeFieldEnd();
5361 mandeep.dh 6805
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
6806
      oprot.writeI64(this.billingWarehouseId);
6807
      oprot.writeFieldEnd();
2820 chandransh 6808
      oprot.writeFieldStop();
6809
      oprot.writeStructEnd();
6810
    }
6811
 
6812
    @Override
6813
    public String toString() {
4496 mandeep.dh 6814
      StringBuilder sb = new StringBuilder("scanForOrder_args(");
2820 chandransh 6815
      boolean first = true;
6816
 
5361 mandeep.dh 6817
      sb.append("inventoryItem:");
6818
      if (this.inventoryItem == null) {
6819
        sb.append("null");
6820
      } else {
6821
        sb.append(this.inventoryItem);
6822
      }
2820 chandransh 6823
      first = false;
6824
      if (!first) sb.append(", ");
6825
      sb.append("type:");
6826
      if (this.type == null) {
6827
        sb.append("null");
6828
      } else {
6829
        sb.append(this.type);
6830
      }
6831
      first = false;
4496 mandeep.dh 6832
      if (!first) sb.append(", ");
6833
      sb.append("quantity:");
6834
      sb.append(this.quantity);
6835
      first = false;
6836
      if (!first) sb.append(", ");
6837
      sb.append("orderId:");
6838
      sb.append(this.orderId);
6839
      first = false;
6840
      if (!first) sb.append(", ");
5110 mandeep.dh 6841
      sb.append("fulfilmentWarehouseId:");
6842
      sb.append(this.fulfilmentWarehouseId);
4496 mandeep.dh 6843
      first = false;
5361 mandeep.dh 6844
      if (!first) sb.append(", ");
6845
      sb.append("billingWarehouseId:");
6846
      sb.append(this.billingWarehouseId);
6847
      first = false;
2820 chandransh 6848
      sb.append(")");
6849
      return sb.toString();
6850
    }
6851
 
3430 rajveer 6852
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 6853
      // check for required fields
6854
    }
6855
 
3430 rajveer 6856
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6857
      try {
6858
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6859
      } catch (org.apache.thrift.TException te) {
6860
        throw new java.io.IOException(te);
6861
      }
6862
    }
6863
 
6864
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6865
      try {
4496 mandeep.dh 6866
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
6867
        __isset_bit_vector = new BitSet(1);
3430 rajveer 6868
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6869
      } catch (org.apache.thrift.TException te) {
6870
        throw new java.io.IOException(te);
6871
      }
6872
    }
6873
 
2820 chandransh 6874
  }
6875
 
4496 mandeep.dh 6876
  public static class scanForOrder_result implements org.apache.thrift.TBase<scanForOrder_result, scanForOrder_result._Fields>, java.io.Serializable, Cloneable   {
6877
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOrder_result");
2820 chandransh 6878
 
5361 mandeep.dh 6879
    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 6880
    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 6881
 
5361 mandeep.dh 6882
    private InventoryItem success; // required
3430 rajveer 6883
    private WarehouseServiceException wex; // required
2820 chandransh 6884
 
6885
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 6886
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 6887
      SUCCESS((short)0, "success"),
2820 chandransh 6888
      WEX((short)1, "wex");
6889
 
6890
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6891
 
6892
      static {
6893
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6894
          byName.put(field.getFieldName(), field);
6895
        }
6896
      }
6897
 
6898
      /**
6899
       * Find the _Fields constant that matches fieldId, or null if its not found.
6900
       */
6901
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 6902
        switch(fieldId) {
5361 mandeep.dh 6903
          case 0: // SUCCESS
6904
            return SUCCESS;
3430 rajveer 6905
          case 1: // WEX
6906
            return WEX;
6907
          default:
6908
            return null;
6909
        }
2820 chandransh 6910
      }
6911
 
6912
      /**
6913
       * Find the _Fields constant that matches fieldId, throwing an exception
6914
       * if it is not found.
6915
       */
6916
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6917
        _Fields fields = findByThriftId(fieldId);
6918
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6919
        return fields;
6920
      }
6921
 
6922
      /**
6923
       * Find the _Fields constant that matches name, or null if its not found.
6924
       */
6925
      public static _Fields findByName(String name) {
6926
        return byName.get(name);
6927
      }
6928
 
6929
      private final short _thriftId;
6930
      private final String _fieldName;
6931
 
6932
      _Fields(short thriftId, String fieldName) {
6933
        _thriftId = thriftId;
6934
        _fieldName = fieldName;
6935
      }
6936
 
6937
      public short getThriftFieldId() {
6938
        return _thriftId;
6939
      }
6940
 
6941
      public String getFieldName() {
6942
        return _fieldName;
6943
      }
6944
    }
6945
 
6946
    // isset id assignments
6947
 
3430 rajveer 6948
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 6949
    static {
3430 rajveer 6950
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5361 mandeep.dh 6951
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6952
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 6953
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6954
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
6955
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 6956
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOrder_result.class, metaDataMap);
2820 chandransh 6957
    }
6958
 
4496 mandeep.dh 6959
    public scanForOrder_result() {
2820 chandransh 6960
    }
6961
 
4496 mandeep.dh 6962
    public scanForOrder_result(
5361 mandeep.dh 6963
      InventoryItem success,
2820 chandransh 6964
      WarehouseServiceException wex)
6965
    {
6966
      this();
5361 mandeep.dh 6967
      this.success = success;
2820 chandransh 6968
      this.wex = wex;
6969
    }
6970
 
6971
    /**
6972
     * Performs a deep copy on <i>other</i>.
6973
     */
4496 mandeep.dh 6974
    public scanForOrder_result(scanForOrder_result other) {
5361 mandeep.dh 6975
      if (other.isSetSuccess()) {
6976
        this.success = new InventoryItem(other.success);
6977
      }
2820 chandransh 6978
      if (other.isSetWex()) {
6979
        this.wex = new WarehouseServiceException(other.wex);
6980
      }
6981
    }
6982
 
4496 mandeep.dh 6983
    public scanForOrder_result deepCopy() {
6984
      return new scanForOrder_result(this);
2820 chandransh 6985
    }
6986
 
3430 rajveer 6987
    @Override
6988
    public void clear() {
5361 mandeep.dh 6989
      this.success = null;
3430 rajveer 6990
      this.wex = null;
2820 chandransh 6991
    }
6992
 
5361 mandeep.dh 6993
    public InventoryItem getSuccess() {
6994
      return this.success;
6995
    }
6996
 
6997
    public void setSuccess(InventoryItem success) {
6998
      this.success = success;
6999
    }
7000
 
7001
    public void unsetSuccess() {
7002
      this.success = null;
7003
    }
7004
 
7005
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7006
    public boolean isSetSuccess() {
7007
      return this.success != null;
7008
    }
7009
 
7010
    public void setSuccessIsSet(boolean value) {
7011
      if (!value) {
7012
        this.success = null;
7013
      }
7014
    }
7015
 
2820 chandransh 7016
    public WarehouseServiceException getWex() {
7017
      return this.wex;
7018
    }
7019
 
3430 rajveer 7020
    public void setWex(WarehouseServiceException wex) {
2820 chandransh 7021
      this.wex = wex;
7022
    }
7023
 
7024
    public void unsetWex() {
7025
      this.wex = null;
7026
    }
7027
 
3430 rajveer 7028
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2820 chandransh 7029
    public boolean isSetWex() {
7030
      return this.wex != null;
7031
    }
7032
 
7033
    public void setWexIsSet(boolean value) {
7034
      if (!value) {
7035
        this.wex = null;
7036
      }
7037
    }
7038
 
7039
    public void setFieldValue(_Fields field, Object value) {
7040
      switch (field) {
5361 mandeep.dh 7041
      case SUCCESS:
7042
        if (value == null) {
7043
          unsetSuccess();
7044
        } else {
7045
          setSuccess((InventoryItem)value);
7046
        }
7047
        break;
7048
 
2820 chandransh 7049
      case WEX:
7050
        if (value == null) {
7051
          unsetWex();
7052
        } else {
7053
          setWex((WarehouseServiceException)value);
7054
        }
7055
        break;
7056
 
7057
      }
7058
    }
7059
 
7060
    public Object getFieldValue(_Fields field) {
7061
      switch (field) {
5361 mandeep.dh 7062
      case SUCCESS:
7063
        return getSuccess();
7064
 
2820 chandransh 7065
      case WEX:
7066
        return getWex();
7067
 
7068
      }
7069
      throw new IllegalStateException();
7070
    }
7071
 
3430 rajveer 7072
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7073
    public boolean isSet(_Fields field) {
7074
      if (field == null) {
7075
        throw new IllegalArgumentException();
7076
      }
2820 chandransh 7077
 
7078
      switch (field) {
5361 mandeep.dh 7079
      case SUCCESS:
7080
        return isSetSuccess();
2820 chandransh 7081
      case WEX:
7082
        return isSetWex();
7083
      }
7084
      throw new IllegalStateException();
7085
    }
7086
 
7087
    @Override
7088
    public boolean equals(Object that) {
7089
      if (that == null)
7090
        return false;
4496 mandeep.dh 7091
      if (that instanceof scanForOrder_result)
7092
        return this.equals((scanForOrder_result)that);
2820 chandransh 7093
      return false;
7094
    }
7095
 
4496 mandeep.dh 7096
    public boolean equals(scanForOrder_result that) {
2820 chandransh 7097
      if (that == null)
7098
        return false;
7099
 
5361 mandeep.dh 7100
      boolean this_present_success = true && this.isSetSuccess();
7101
      boolean that_present_success = true && that.isSetSuccess();
7102
      if (this_present_success || that_present_success) {
7103
        if (!(this_present_success && that_present_success))
7104
          return false;
7105
        if (!this.success.equals(that.success))
7106
          return false;
7107
      }
7108
 
2820 chandransh 7109
      boolean this_present_wex = true && this.isSetWex();
7110
      boolean that_present_wex = true && that.isSetWex();
7111
      if (this_present_wex || that_present_wex) {
7112
        if (!(this_present_wex && that_present_wex))
7113
          return false;
7114
        if (!this.wex.equals(that.wex))
7115
          return false;
7116
      }
7117
 
7118
      return true;
7119
    }
7120
 
7121
    @Override
7122
    public int hashCode() {
7123
      return 0;
7124
    }
7125
 
4496 mandeep.dh 7126
    public int compareTo(scanForOrder_result other) {
2820 chandransh 7127
      if (!getClass().equals(other.getClass())) {
7128
        return getClass().getName().compareTo(other.getClass().getName());
7129
      }
7130
 
7131
      int lastComparison = 0;
4496 mandeep.dh 7132
      scanForOrder_result typedOther = (scanForOrder_result)other;
2820 chandransh 7133
 
5361 mandeep.dh 7134
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7135
      if (lastComparison != 0) {
7136
        return lastComparison;
7137
      }
7138
      if (isSetSuccess()) {
7139
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7140
        if (lastComparison != 0) {
7141
          return lastComparison;
7142
        }
7143
      }
3430 rajveer 7144
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 7145
      if (lastComparison != 0) {
7146
        return lastComparison;
7147
      }
3430 rajveer 7148
      if (isSetWex()) {
7149
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
7150
        if (lastComparison != 0) {
7151
          return lastComparison;
7152
        }
2820 chandransh 7153
      }
7154
      return 0;
7155
    }
7156
 
3430 rajveer 7157
    public _Fields fieldForId(int fieldId) {
7158
      return _Fields.findByThriftId(fieldId);
7159
    }
7160
 
7161
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7162
      org.apache.thrift.protocol.TField field;
2820 chandransh 7163
      iprot.readStructBegin();
7164
      while (true)
7165
      {
7166
        field = iprot.readFieldBegin();
3430 rajveer 7167
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 7168
          break;
7169
        }
3430 rajveer 7170
        switch (field.id) {
5361 mandeep.dh 7171
          case 0: // SUCCESS
7172
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7173
              this.success = new InventoryItem();
7174
              this.success.read(iprot);
7175
            } else { 
7176
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7177
            }
7178
            break;
3430 rajveer 7179
          case 1: // WEX
7180
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7181
              this.wex = new WarehouseServiceException();
7182
              this.wex.read(iprot);
7183
            } else { 
7184
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7185
            }
7186
            break;
7187
          default:
7188
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 7189
        }
3430 rajveer 7190
        iprot.readFieldEnd();
2820 chandransh 7191
      }
7192
      iprot.readStructEnd();
7193
      validate();
7194
    }
7195
 
3430 rajveer 7196
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 7197
      oprot.writeStructBegin(STRUCT_DESC);
7198
 
5361 mandeep.dh 7199
      if (this.isSetSuccess()) {
7200
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7201
        this.success.write(oprot);
7202
        oprot.writeFieldEnd();
7203
      } else if (this.isSetWex()) {
2820 chandransh 7204
        oprot.writeFieldBegin(WEX_FIELD_DESC);
7205
        this.wex.write(oprot);
7206
        oprot.writeFieldEnd();
7207
      }
7208
      oprot.writeFieldStop();
7209
      oprot.writeStructEnd();
7210
    }
7211
 
7212
    @Override
7213
    public String toString() {
4496 mandeep.dh 7214
      StringBuilder sb = new StringBuilder("scanForOrder_result(");
2820 chandransh 7215
      boolean first = true;
7216
 
5361 mandeep.dh 7217
      sb.append("success:");
7218
      if (this.success == null) {
7219
        sb.append("null");
7220
      } else {
7221
        sb.append(this.success);
7222
      }
7223
      first = false;
7224
      if (!first) sb.append(", ");
2820 chandransh 7225
      sb.append("wex:");
7226
      if (this.wex == null) {
7227
        sb.append("null");
7228
      } else {
7229
        sb.append(this.wex);
7230
      }
7231
      first = false;
7232
      sb.append(")");
7233
      return sb.toString();
7234
    }
7235
 
3430 rajveer 7236
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 7237
      // check for required fields
7238
    }
7239
 
3430 rajveer 7240
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7241
      try {
7242
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7243
      } catch (org.apache.thrift.TException te) {
7244
        throw new java.io.IOException(te);
7245
      }
7246
    }
7247
 
7248
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7249
      try {
7250
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7251
      } catch (org.apache.thrift.TException te) {
7252
        throw new java.io.IOException(te);
7253
      }
7254
    }
7255
 
2820 chandransh 7256
  }
7257
 
4496 mandeep.dh 7258
  public static class createItemNumberMapping_args implements org.apache.thrift.TBase<createItemNumberMapping_args, createItemNumberMapping_args._Fields>, java.io.Serializable, Cloneable   {
7259
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createItemNumberMapping_args");
7260
 
7261
    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);
7262
    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);
7263
 
7264
    private String itemNumber; // required
7265
    private long itemId; // required
7266
 
7267
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7268
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7269
      ITEM_NUMBER((short)1, "itemNumber"),
7270
      ITEM_ID((short)2, "itemId");
7271
 
7272
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7273
 
7274
      static {
7275
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7276
          byName.put(field.getFieldName(), field);
7277
        }
7278
      }
7279
 
7280
      /**
7281
       * Find the _Fields constant that matches fieldId, or null if its not found.
7282
       */
7283
      public static _Fields findByThriftId(int fieldId) {
7284
        switch(fieldId) {
7285
          case 1: // ITEM_NUMBER
7286
            return ITEM_NUMBER;
7287
          case 2: // ITEM_ID
7288
            return ITEM_ID;
7289
          default:
7290
            return null;
7291
        }
7292
      }
7293
 
7294
      /**
7295
       * Find the _Fields constant that matches fieldId, throwing an exception
7296
       * if it is not found.
7297
       */
7298
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7299
        _Fields fields = findByThriftId(fieldId);
7300
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7301
        return fields;
7302
      }
7303
 
7304
      /**
7305
       * Find the _Fields constant that matches name, or null if its not found.
7306
       */
7307
      public static _Fields findByName(String name) {
7308
        return byName.get(name);
7309
      }
7310
 
7311
      private final short _thriftId;
7312
      private final String _fieldName;
7313
 
7314
      _Fields(short thriftId, String fieldName) {
7315
        _thriftId = thriftId;
7316
        _fieldName = fieldName;
7317
      }
7318
 
7319
      public short getThriftFieldId() {
7320
        return _thriftId;
7321
      }
7322
 
7323
      public String getFieldName() {
7324
        return _fieldName;
7325
      }
7326
    }
7327
 
7328
    // isset id assignments
7329
    private static final int __ITEMID_ISSET_ID = 0;
7330
    private BitSet __isset_bit_vector = new BitSet(1);
7331
 
7332
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7333
    static {
7334
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7335
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7336
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
7337
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7338
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7339
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7340
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createItemNumberMapping_args.class, metaDataMap);
7341
    }
7342
 
7343
    public createItemNumberMapping_args() {
7344
    }
7345
 
7346
    public createItemNumberMapping_args(
7347
      String itemNumber,
7348
      long itemId)
7349
    {
7350
      this();
7351
      this.itemNumber = itemNumber;
7352
      this.itemId = itemId;
7353
      setItemIdIsSet(true);
7354
    }
7355
 
7356
    /**
7357
     * Performs a deep copy on <i>other</i>.
7358
     */
7359
    public createItemNumberMapping_args(createItemNumberMapping_args other) {
7360
      __isset_bit_vector.clear();
7361
      __isset_bit_vector.or(other.__isset_bit_vector);
7362
      if (other.isSetItemNumber()) {
7363
        this.itemNumber = other.itemNumber;
7364
      }
7365
      this.itemId = other.itemId;
7366
    }
7367
 
7368
    public createItemNumberMapping_args deepCopy() {
7369
      return new createItemNumberMapping_args(this);
7370
    }
7371
 
7372
    @Override
7373
    public void clear() {
7374
      this.itemNumber = null;
7375
      setItemIdIsSet(false);
7376
      this.itemId = 0;
7377
    }
7378
 
7379
    public String getItemNumber() {
7380
      return this.itemNumber;
7381
    }
7382
 
7383
    public void setItemNumber(String itemNumber) {
7384
      this.itemNumber = itemNumber;
7385
    }
7386
 
7387
    public void unsetItemNumber() {
7388
      this.itemNumber = null;
7389
    }
7390
 
7391
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
7392
    public boolean isSetItemNumber() {
7393
      return this.itemNumber != null;
7394
    }
7395
 
7396
    public void setItemNumberIsSet(boolean value) {
7397
      if (!value) {
7398
        this.itemNumber = null;
7399
      }
7400
    }
7401
 
7402
    public long getItemId() {
7403
      return this.itemId;
7404
    }
7405
 
7406
    public void setItemId(long itemId) {
7407
      this.itemId = itemId;
7408
      setItemIdIsSet(true);
7409
    }
7410
 
7411
    public void unsetItemId() {
7412
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
7413
    }
7414
 
7415
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
7416
    public boolean isSetItemId() {
7417
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
7418
    }
7419
 
7420
    public void setItemIdIsSet(boolean value) {
7421
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
7422
    }
7423
 
7424
    public void setFieldValue(_Fields field, Object value) {
7425
      switch (field) {
7426
      case ITEM_NUMBER:
7427
        if (value == null) {
7428
          unsetItemNumber();
7429
        } else {
7430
          setItemNumber((String)value);
7431
        }
7432
        break;
7433
 
7434
      case ITEM_ID:
7435
        if (value == null) {
7436
          unsetItemId();
7437
        } else {
7438
          setItemId((Long)value);
7439
        }
7440
        break;
7441
 
7442
      }
7443
    }
7444
 
7445
    public Object getFieldValue(_Fields field) {
7446
      switch (field) {
7447
      case ITEM_NUMBER:
7448
        return getItemNumber();
7449
 
7450
      case ITEM_ID:
7451
        return Long.valueOf(getItemId());
7452
 
7453
      }
7454
      throw new IllegalStateException();
7455
    }
7456
 
7457
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7458
    public boolean isSet(_Fields field) {
7459
      if (field == null) {
7460
        throw new IllegalArgumentException();
7461
      }
7462
 
7463
      switch (field) {
7464
      case ITEM_NUMBER:
7465
        return isSetItemNumber();
7466
      case ITEM_ID:
7467
        return isSetItemId();
7468
      }
7469
      throw new IllegalStateException();
7470
    }
7471
 
7472
    @Override
7473
    public boolean equals(Object that) {
7474
      if (that == null)
7475
        return false;
7476
      if (that instanceof createItemNumberMapping_args)
7477
        return this.equals((createItemNumberMapping_args)that);
7478
      return false;
7479
    }
7480
 
7481
    public boolean equals(createItemNumberMapping_args that) {
7482
      if (that == null)
7483
        return false;
7484
 
7485
      boolean this_present_itemNumber = true && this.isSetItemNumber();
7486
      boolean that_present_itemNumber = true && that.isSetItemNumber();
7487
      if (this_present_itemNumber || that_present_itemNumber) {
7488
        if (!(this_present_itemNumber && that_present_itemNumber))
7489
          return false;
7490
        if (!this.itemNumber.equals(that.itemNumber))
7491
          return false;
7492
      }
7493
 
7494
      boolean this_present_itemId = true;
7495
      boolean that_present_itemId = true;
7496
      if (this_present_itemId || that_present_itemId) {
7497
        if (!(this_present_itemId && that_present_itemId))
7498
          return false;
7499
        if (this.itemId != that.itemId)
7500
          return false;
7501
      }
7502
 
7503
      return true;
7504
    }
7505
 
7506
    @Override
7507
    public int hashCode() {
7508
      return 0;
7509
    }
7510
 
7511
    public int compareTo(createItemNumberMapping_args other) {
7512
      if (!getClass().equals(other.getClass())) {
7513
        return getClass().getName().compareTo(other.getClass().getName());
7514
      }
7515
 
7516
      int lastComparison = 0;
7517
      createItemNumberMapping_args typedOther = (createItemNumberMapping_args)other;
7518
 
7519
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
7520
      if (lastComparison != 0) {
7521
        return lastComparison;
7522
      }
7523
      if (isSetItemNumber()) {
7524
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
7525
        if (lastComparison != 0) {
7526
          return lastComparison;
7527
        }
7528
      }
7529
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
7530
      if (lastComparison != 0) {
7531
        return lastComparison;
7532
      }
7533
      if (isSetItemId()) {
7534
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
7535
        if (lastComparison != 0) {
7536
          return lastComparison;
7537
        }
7538
      }
7539
      return 0;
7540
    }
7541
 
7542
    public _Fields fieldForId(int fieldId) {
7543
      return _Fields.findByThriftId(fieldId);
7544
    }
7545
 
7546
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7547
      org.apache.thrift.protocol.TField field;
7548
      iprot.readStructBegin();
7549
      while (true)
7550
      {
7551
        field = iprot.readFieldBegin();
7552
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7553
          break;
7554
        }
7555
        switch (field.id) {
7556
          case 1: // ITEM_NUMBER
7557
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
7558
              this.itemNumber = iprot.readString();
7559
            } else { 
7560
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7561
            }
7562
            break;
7563
          case 2: // ITEM_ID
7564
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7565
              this.itemId = iprot.readI64();
7566
              setItemIdIsSet(true);
7567
            } else { 
7568
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7569
            }
7570
            break;
7571
          default:
7572
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7573
        }
7574
        iprot.readFieldEnd();
7575
      }
7576
      iprot.readStructEnd();
7577
      validate();
7578
    }
7579
 
7580
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7581
      validate();
7582
 
7583
      oprot.writeStructBegin(STRUCT_DESC);
7584
      if (this.itemNumber != null) {
7585
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
7586
        oprot.writeString(this.itemNumber);
7587
        oprot.writeFieldEnd();
7588
      }
7589
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
7590
      oprot.writeI64(this.itemId);
7591
      oprot.writeFieldEnd();
7592
      oprot.writeFieldStop();
7593
      oprot.writeStructEnd();
7594
    }
7595
 
7596
    @Override
7597
    public String toString() {
7598
      StringBuilder sb = new StringBuilder("createItemNumberMapping_args(");
7599
      boolean first = true;
7600
 
7601
      sb.append("itemNumber:");
7602
      if (this.itemNumber == null) {
7603
        sb.append("null");
7604
      } else {
7605
        sb.append(this.itemNumber);
7606
      }
7607
      first = false;
7608
      if (!first) sb.append(", ");
7609
      sb.append("itemId:");
7610
      sb.append(this.itemId);
7611
      first = false;
7612
      sb.append(")");
7613
      return sb.toString();
7614
    }
7615
 
7616
    public void validate() throws org.apache.thrift.TException {
7617
      // check for required fields
7618
    }
7619
 
7620
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7621
      try {
7622
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7623
      } catch (org.apache.thrift.TException te) {
7624
        throw new java.io.IOException(te);
7625
      }
7626
    }
7627
 
7628
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7629
      try {
7630
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
7631
        __isset_bit_vector = new BitSet(1);
7632
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7633
      } catch (org.apache.thrift.TException te) {
7634
        throw new java.io.IOException(te);
7635
      }
7636
    }
7637
 
7638
  }
7639
 
7640
  public static class createItemNumberMapping_result implements org.apache.thrift.TBase<createItemNumberMapping_result, createItemNumberMapping_result._Fields>, java.io.Serializable, Cloneable   {
7641
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createItemNumberMapping_result");
7642
 
7643
 
7644
 
7645
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7646
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7647
;
7648
 
7649
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7650
 
7651
      static {
7652
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7653
          byName.put(field.getFieldName(), field);
7654
        }
7655
      }
7656
 
7657
      /**
7658
       * Find the _Fields constant that matches fieldId, or null if its not found.
7659
       */
7660
      public static _Fields findByThriftId(int fieldId) {
7661
        switch(fieldId) {
7662
          default:
7663
            return null;
7664
        }
7665
      }
7666
 
7667
      /**
7668
       * Find the _Fields constant that matches fieldId, throwing an exception
7669
       * if it is not found.
7670
       */
7671
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7672
        _Fields fields = findByThriftId(fieldId);
7673
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7674
        return fields;
7675
      }
7676
 
7677
      /**
7678
       * Find the _Fields constant that matches name, or null if its not found.
7679
       */
7680
      public static _Fields findByName(String name) {
7681
        return byName.get(name);
7682
      }
7683
 
7684
      private final short _thriftId;
7685
      private final String _fieldName;
7686
 
7687
      _Fields(short thriftId, String fieldName) {
7688
        _thriftId = thriftId;
7689
        _fieldName = fieldName;
7690
      }
7691
 
7692
      public short getThriftFieldId() {
7693
        return _thriftId;
7694
      }
7695
 
7696
      public String getFieldName() {
7697
        return _fieldName;
7698
      }
7699
    }
7700
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7701
    static {
7702
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7703
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7704
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createItemNumberMapping_result.class, metaDataMap);
7705
    }
7706
 
7707
    public createItemNumberMapping_result() {
7708
    }
7709
 
7710
    /**
7711
     * Performs a deep copy on <i>other</i>.
7712
     */
7713
    public createItemNumberMapping_result(createItemNumberMapping_result other) {
7714
    }
7715
 
7716
    public createItemNumberMapping_result deepCopy() {
7717
      return new createItemNumberMapping_result(this);
7718
    }
7719
 
7720
    @Override
7721
    public void clear() {
7722
    }
7723
 
7724
    public void setFieldValue(_Fields field, Object value) {
7725
      switch (field) {
7726
      }
7727
    }
7728
 
7729
    public Object getFieldValue(_Fields field) {
7730
      switch (field) {
7731
      }
7732
      throw new IllegalStateException();
7733
    }
7734
 
7735
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7736
    public boolean isSet(_Fields field) {
7737
      if (field == null) {
7738
        throw new IllegalArgumentException();
7739
      }
7740
 
7741
      switch (field) {
7742
      }
7743
      throw new IllegalStateException();
7744
    }
7745
 
7746
    @Override
7747
    public boolean equals(Object that) {
7748
      if (that == null)
7749
        return false;
7750
      if (that instanceof createItemNumberMapping_result)
7751
        return this.equals((createItemNumberMapping_result)that);
7752
      return false;
7753
    }
7754
 
7755
    public boolean equals(createItemNumberMapping_result that) {
7756
      if (that == null)
7757
        return false;
7758
 
7759
      return true;
7760
    }
7761
 
7762
    @Override
7763
    public int hashCode() {
7764
      return 0;
7765
    }
7766
 
7767
    public int compareTo(createItemNumberMapping_result other) {
7768
      if (!getClass().equals(other.getClass())) {
7769
        return getClass().getName().compareTo(other.getClass().getName());
7770
      }
7771
 
7772
      int lastComparison = 0;
7773
      createItemNumberMapping_result typedOther = (createItemNumberMapping_result)other;
7774
 
7775
      return 0;
7776
    }
7777
 
7778
    public _Fields fieldForId(int fieldId) {
7779
      return _Fields.findByThriftId(fieldId);
7780
    }
7781
 
7782
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7783
      org.apache.thrift.protocol.TField field;
7784
      iprot.readStructBegin();
7785
      while (true)
7786
      {
7787
        field = iprot.readFieldBegin();
7788
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7789
          break;
7790
        }
7791
        switch (field.id) {
7792
          default:
7793
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7794
        }
7795
        iprot.readFieldEnd();
7796
      }
7797
      iprot.readStructEnd();
7798
      validate();
7799
    }
7800
 
7801
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7802
      oprot.writeStructBegin(STRUCT_DESC);
7803
 
7804
      oprot.writeFieldStop();
7805
      oprot.writeStructEnd();
7806
    }
7807
 
7808
    @Override
7809
    public String toString() {
7810
      StringBuilder sb = new StringBuilder("createItemNumberMapping_result(");
7811
      boolean first = true;
7812
 
7813
      sb.append(")");
7814
      return sb.toString();
7815
    }
7816
 
7817
    public void validate() throws org.apache.thrift.TException {
7818
      // check for required fields
7819
    }
7820
 
7821
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7822
      try {
7823
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7824
      } catch (org.apache.thrift.TException te) {
7825
        throw new java.io.IOException(te);
7826
      }
7827
    }
7828
 
7829
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7830
      try {
7831
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7832
      } catch (org.apache.thrift.TException te) {
7833
        throw new java.io.IOException(te);
7834
      }
7835
    }
7836
 
7837
  }
7838
 
4622 amit.gupta 7839
  public static class getItemNumbers_args implements org.apache.thrift.TBase<getItemNumbers_args, getItemNumbers_args._Fields>, java.io.Serializable, Cloneable   {
7840
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemNumbers_args");
7841
 
7842
    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);
7843
 
7844
    private long itemId; // required
7845
 
7846
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7847
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7848
      ITEM_ID((short)1, "itemId");
7849
 
7850
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7851
 
7852
      static {
7853
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7854
          byName.put(field.getFieldName(), field);
7855
        }
7856
      }
7857
 
7858
      /**
7859
       * Find the _Fields constant that matches fieldId, or null if its not found.
7860
       */
7861
      public static _Fields findByThriftId(int fieldId) {
7862
        switch(fieldId) {
7863
          case 1: // ITEM_ID
7864
            return ITEM_ID;
7865
          default:
7866
            return null;
7867
        }
7868
      }
7869
 
7870
      /**
7871
       * Find the _Fields constant that matches fieldId, throwing an exception
7872
       * if it is not found.
7873
       */
7874
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7875
        _Fields fields = findByThriftId(fieldId);
7876
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7877
        return fields;
7878
      }
7879
 
7880
      /**
7881
       * Find the _Fields constant that matches name, or null if its not found.
7882
       */
7883
      public static _Fields findByName(String name) {
7884
        return byName.get(name);
7885
      }
7886
 
7887
      private final short _thriftId;
7888
      private final String _fieldName;
7889
 
7890
      _Fields(short thriftId, String fieldName) {
7891
        _thriftId = thriftId;
7892
        _fieldName = fieldName;
7893
      }
7894
 
7895
      public short getThriftFieldId() {
7896
        return _thriftId;
7897
      }
7898
 
7899
      public String getFieldName() {
7900
        return _fieldName;
7901
      }
7902
    }
7903
 
7904
    // isset id assignments
7905
    private static final int __ITEMID_ISSET_ID = 0;
7906
    private BitSet __isset_bit_vector = new BitSet(1);
7907
 
7908
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7909
    static {
7910
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7911
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7912
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7913
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7914
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemNumbers_args.class, metaDataMap);
7915
    }
7916
 
7917
    public getItemNumbers_args() {
7918
    }
7919
 
7920
    public getItemNumbers_args(
7921
      long itemId)
7922
    {
7923
      this();
7924
      this.itemId = itemId;
7925
      setItemIdIsSet(true);
7926
    }
7927
 
7928
    /**
7929
     * Performs a deep copy on <i>other</i>.
7930
     */
7931
    public getItemNumbers_args(getItemNumbers_args other) {
7932
      __isset_bit_vector.clear();
7933
      __isset_bit_vector.or(other.__isset_bit_vector);
7934
      this.itemId = other.itemId;
7935
    }
7936
 
7937
    public getItemNumbers_args deepCopy() {
7938
      return new getItemNumbers_args(this);
7939
    }
7940
 
7941
    @Override
7942
    public void clear() {
7943
      setItemIdIsSet(false);
7944
      this.itemId = 0;
7945
    }
7946
 
7947
    public long getItemId() {
7948
      return this.itemId;
7949
    }
7950
 
7951
    public void setItemId(long itemId) {
7952
      this.itemId = itemId;
7953
      setItemIdIsSet(true);
7954
    }
7955
 
7956
    public void unsetItemId() {
7957
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
7958
    }
7959
 
7960
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
7961
    public boolean isSetItemId() {
7962
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
7963
    }
7964
 
7965
    public void setItemIdIsSet(boolean value) {
7966
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
7967
    }
7968
 
7969
    public void setFieldValue(_Fields field, Object value) {
7970
      switch (field) {
7971
      case ITEM_ID:
7972
        if (value == null) {
7973
          unsetItemId();
7974
        } else {
7975
          setItemId((Long)value);
7976
        }
7977
        break;
7978
 
7979
      }
7980
    }
7981
 
7982
    public Object getFieldValue(_Fields field) {
7983
      switch (field) {
7984
      case ITEM_ID:
7985
        return Long.valueOf(getItemId());
7986
 
7987
      }
7988
      throw new IllegalStateException();
7989
    }
7990
 
7991
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7992
    public boolean isSet(_Fields field) {
7993
      if (field == null) {
7994
        throw new IllegalArgumentException();
7995
      }
7996
 
7997
      switch (field) {
7998
      case ITEM_ID:
7999
        return isSetItemId();
8000
      }
8001
      throw new IllegalStateException();
8002
    }
8003
 
8004
    @Override
8005
    public boolean equals(Object that) {
8006
      if (that == null)
8007
        return false;
8008
      if (that instanceof getItemNumbers_args)
8009
        return this.equals((getItemNumbers_args)that);
8010
      return false;
8011
    }
8012
 
8013
    public boolean equals(getItemNumbers_args that) {
8014
      if (that == null)
8015
        return false;
8016
 
8017
      boolean this_present_itemId = true;
8018
      boolean that_present_itemId = true;
8019
      if (this_present_itemId || that_present_itemId) {
8020
        if (!(this_present_itemId && that_present_itemId))
8021
          return false;
8022
        if (this.itemId != that.itemId)
8023
          return false;
8024
      }
8025
 
8026
      return true;
8027
    }
8028
 
8029
    @Override
8030
    public int hashCode() {
8031
      return 0;
8032
    }
8033
 
8034
    public int compareTo(getItemNumbers_args other) {
8035
      if (!getClass().equals(other.getClass())) {
8036
        return getClass().getName().compareTo(other.getClass().getName());
8037
      }
8038
 
8039
      int lastComparison = 0;
8040
      getItemNumbers_args typedOther = (getItemNumbers_args)other;
8041
 
8042
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
8043
      if (lastComparison != 0) {
8044
        return lastComparison;
8045
      }
8046
      if (isSetItemId()) {
8047
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
8048
        if (lastComparison != 0) {
8049
          return lastComparison;
8050
        }
8051
      }
8052
      return 0;
8053
    }
8054
 
8055
    public _Fields fieldForId(int fieldId) {
8056
      return _Fields.findByThriftId(fieldId);
8057
    }
8058
 
8059
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8060
      org.apache.thrift.protocol.TField field;
8061
      iprot.readStructBegin();
8062
      while (true)
8063
      {
8064
        field = iprot.readFieldBegin();
8065
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8066
          break;
8067
        }
8068
        switch (field.id) {
8069
          case 1: // ITEM_ID
8070
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8071
              this.itemId = iprot.readI64();
8072
              setItemIdIsSet(true);
8073
            } else { 
8074
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8075
            }
8076
            break;
8077
          default:
8078
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8079
        }
8080
        iprot.readFieldEnd();
8081
      }
8082
      iprot.readStructEnd();
8083
      validate();
8084
    }
8085
 
8086
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8087
      validate();
8088
 
8089
      oprot.writeStructBegin(STRUCT_DESC);
8090
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
8091
      oprot.writeI64(this.itemId);
8092
      oprot.writeFieldEnd();
8093
      oprot.writeFieldStop();
8094
      oprot.writeStructEnd();
8095
    }
8096
 
8097
    @Override
8098
    public String toString() {
8099
      StringBuilder sb = new StringBuilder("getItemNumbers_args(");
8100
      boolean first = true;
8101
 
8102
      sb.append("itemId:");
8103
      sb.append(this.itemId);
8104
      first = false;
8105
      sb.append(")");
8106
      return sb.toString();
8107
    }
8108
 
8109
    public void validate() throws org.apache.thrift.TException {
8110
      // check for required fields
8111
    }
8112
 
8113
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8114
      try {
8115
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8116
      } catch (org.apache.thrift.TException te) {
8117
        throw new java.io.IOException(te);
8118
      }
8119
    }
8120
 
8121
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8122
      try {
8123
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8124
        __isset_bit_vector = new BitSet(1);
8125
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8126
      } catch (org.apache.thrift.TException te) {
8127
        throw new java.io.IOException(te);
8128
      }
8129
    }
8130
 
8131
  }
8132
 
8133
  public static class getItemNumbers_result implements org.apache.thrift.TBase<getItemNumbers_result, getItemNumbers_result._Fields>, java.io.Serializable, Cloneable   {
8134
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemNumbers_result");
8135
 
8136
    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);
8137
 
8138
    private List<String> success; // required
8139
 
8140
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8141
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8142
      SUCCESS((short)0, "success");
8143
 
8144
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8145
 
8146
      static {
8147
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8148
          byName.put(field.getFieldName(), field);
8149
        }
8150
      }
8151
 
8152
      /**
8153
       * Find the _Fields constant that matches fieldId, or null if its not found.
8154
       */
8155
      public static _Fields findByThriftId(int fieldId) {
8156
        switch(fieldId) {
8157
          case 0: // SUCCESS
8158
            return SUCCESS;
8159
          default:
8160
            return null;
8161
        }
8162
      }
8163
 
8164
      /**
8165
       * Find the _Fields constant that matches fieldId, throwing an exception
8166
       * if it is not found.
8167
       */
8168
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8169
        _Fields fields = findByThriftId(fieldId);
8170
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8171
        return fields;
8172
      }
8173
 
8174
      /**
8175
       * Find the _Fields constant that matches name, or null if its not found.
8176
       */
8177
      public static _Fields findByName(String name) {
8178
        return byName.get(name);
8179
      }
8180
 
8181
      private final short _thriftId;
8182
      private final String _fieldName;
8183
 
8184
      _Fields(short thriftId, String fieldName) {
8185
        _thriftId = thriftId;
8186
        _fieldName = fieldName;
8187
      }
8188
 
8189
      public short getThriftFieldId() {
8190
        return _thriftId;
8191
      }
8192
 
8193
      public String getFieldName() {
8194
        return _fieldName;
8195
      }
8196
    }
8197
 
8198
    // isset id assignments
8199
 
8200
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8201
    static {
8202
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8203
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8204
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
8205
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
8206
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8207
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemNumbers_result.class, metaDataMap);
8208
    }
8209
 
8210
    public getItemNumbers_result() {
8211
    }
8212
 
8213
    public getItemNumbers_result(
8214
      List<String> success)
8215
    {
8216
      this();
8217
      this.success = success;
8218
    }
8219
 
8220
    /**
8221
     * Performs a deep copy on <i>other</i>.
8222
     */
8223
    public getItemNumbers_result(getItemNumbers_result other) {
8224
      if (other.isSetSuccess()) {
8225
        List<String> __this__success = new ArrayList<String>();
8226
        for (String other_element : other.success) {
8227
          __this__success.add(other_element);
8228
        }
8229
        this.success = __this__success;
8230
      }
8231
    }
8232
 
8233
    public getItemNumbers_result deepCopy() {
8234
      return new getItemNumbers_result(this);
8235
    }
8236
 
8237
    @Override
8238
    public void clear() {
8239
      this.success = null;
8240
    }
8241
 
8242
    public int getSuccessSize() {
8243
      return (this.success == null) ? 0 : this.success.size();
8244
    }
8245
 
8246
    public java.util.Iterator<String> getSuccessIterator() {
8247
      return (this.success == null) ? null : this.success.iterator();
8248
    }
8249
 
8250
    public void addToSuccess(String elem) {
8251
      if (this.success == null) {
8252
        this.success = new ArrayList<String>();
8253
      }
8254
      this.success.add(elem);
8255
    }
8256
 
8257
    public List<String> getSuccess() {
8258
      return this.success;
8259
    }
8260
 
8261
    public void setSuccess(List<String> success) {
8262
      this.success = success;
8263
    }
8264
 
8265
    public void unsetSuccess() {
8266
      this.success = null;
8267
    }
8268
 
8269
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8270
    public boolean isSetSuccess() {
8271
      return this.success != null;
8272
    }
8273
 
8274
    public void setSuccessIsSet(boolean value) {
8275
      if (!value) {
8276
        this.success = null;
8277
      }
8278
    }
8279
 
8280
    public void setFieldValue(_Fields field, Object value) {
8281
      switch (field) {
8282
      case SUCCESS:
8283
        if (value == null) {
8284
          unsetSuccess();
8285
        } else {
8286
          setSuccess((List<String>)value);
8287
        }
8288
        break;
8289
 
8290
      }
8291
    }
8292
 
8293
    public Object getFieldValue(_Fields field) {
8294
      switch (field) {
8295
      case SUCCESS:
8296
        return getSuccess();
8297
 
8298
      }
8299
      throw new IllegalStateException();
8300
    }
8301
 
8302
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8303
    public boolean isSet(_Fields field) {
8304
      if (field == null) {
8305
        throw new IllegalArgumentException();
8306
      }
8307
 
8308
      switch (field) {
8309
      case SUCCESS:
8310
        return isSetSuccess();
8311
      }
8312
      throw new IllegalStateException();
8313
    }
8314
 
8315
    @Override
8316
    public boolean equals(Object that) {
8317
      if (that == null)
8318
        return false;
8319
      if (that instanceof getItemNumbers_result)
8320
        return this.equals((getItemNumbers_result)that);
8321
      return false;
8322
    }
8323
 
8324
    public boolean equals(getItemNumbers_result that) {
8325
      if (that == null)
8326
        return false;
8327
 
8328
      boolean this_present_success = true && this.isSetSuccess();
8329
      boolean that_present_success = true && that.isSetSuccess();
8330
      if (this_present_success || that_present_success) {
8331
        if (!(this_present_success && that_present_success))
8332
          return false;
8333
        if (!this.success.equals(that.success))
8334
          return false;
8335
      }
8336
 
8337
      return true;
8338
    }
8339
 
8340
    @Override
8341
    public int hashCode() {
8342
      return 0;
8343
    }
8344
 
8345
    public int compareTo(getItemNumbers_result other) {
8346
      if (!getClass().equals(other.getClass())) {
8347
        return getClass().getName().compareTo(other.getClass().getName());
8348
      }
8349
 
8350
      int lastComparison = 0;
8351
      getItemNumbers_result typedOther = (getItemNumbers_result)other;
8352
 
8353
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8354
      if (lastComparison != 0) {
8355
        return lastComparison;
8356
      }
8357
      if (isSetSuccess()) {
8358
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8359
        if (lastComparison != 0) {
8360
          return lastComparison;
8361
        }
8362
      }
8363
      return 0;
8364
    }
8365
 
8366
    public _Fields fieldForId(int fieldId) {
8367
      return _Fields.findByThriftId(fieldId);
8368
    }
8369
 
8370
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8371
      org.apache.thrift.protocol.TField field;
8372
      iprot.readStructBegin();
8373
      while (true)
8374
      {
8375
        field = iprot.readFieldBegin();
8376
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8377
          break;
8378
        }
8379
        switch (field.id) {
8380
          case 0: // SUCCESS
8381
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8382
              {
5361 mandeep.dh 8383
                org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
8384
                this.success = new ArrayList<String>(_list0.size);
8385
                for (int _i1 = 0; _i1 < _list0.size; ++_i1)
4622 amit.gupta 8386
                {
5361 mandeep.dh 8387
                  String _elem2; // required
8388
                  _elem2 = iprot.readString();
8389
                  this.success.add(_elem2);
4622 amit.gupta 8390
                }
8391
                iprot.readListEnd();
8392
              }
8393
            } else { 
8394
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8395
            }
8396
            break;
8397
          default:
8398
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8399
        }
8400
        iprot.readFieldEnd();
8401
      }
8402
      iprot.readStructEnd();
8403
      validate();
8404
    }
8405
 
8406
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8407
      oprot.writeStructBegin(STRUCT_DESC);
8408
 
8409
      if (this.isSetSuccess()) {
8410
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8411
        {
8412
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size()));
5361 mandeep.dh 8413
          for (String _iter3 : this.success)
4622 amit.gupta 8414
          {
5361 mandeep.dh 8415
            oprot.writeString(_iter3);
4622 amit.gupta 8416
          }
8417
          oprot.writeListEnd();
8418
        }
8419
        oprot.writeFieldEnd();
8420
      }
8421
      oprot.writeFieldStop();
8422
      oprot.writeStructEnd();
8423
    }
8424
 
8425
    @Override
8426
    public String toString() {
8427
      StringBuilder sb = new StringBuilder("getItemNumbers_result(");
8428
      boolean first = true;
8429
 
8430
      sb.append("success:");
8431
      if (this.success == null) {
8432
        sb.append("null");
8433
      } else {
8434
        sb.append(this.success);
8435
      }
8436
      first = false;
8437
      sb.append(")");
8438
      return sb.toString();
8439
    }
8440
 
8441
    public void validate() throws org.apache.thrift.TException {
8442
      // check for required fields
8443
    }
8444
 
8445
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8446
      try {
8447
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8448
      } catch (org.apache.thrift.TException te) {
8449
        throw new java.io.IOException(te);
8450
      }
8451
    }
8452
 
8453
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8454
      try {
8455
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8456
      } catch (org.apache.thrift.TException te) {
8457
        throw new java.io.IOException(te);
8458
      }
8459
    }
8460
 
8461
  }
8462
 
5110 mandeep.dh 8463
  public static class getItemIds_args implements org.apache.thrift.TBase<getItemIds_args, getItemIds_args._Fields>, java.io.Serializable, Cloneable   {
8464
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemIds_args");
8465
 
8466
    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);
8467
 
8468
    private String itemNumber; // required
8469
 
8470
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8471
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8472
      ITEM_NUMBER((short)1, "itemNumber");
8473
 
8474
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8475
 
8476
      static {
8477
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8478
          byName.put(field.getFieldName(), field);
8479
        }
8480
      }
8481
 
8482
      /**
8483
       * Find the _Fields constant that matches fieldId, or null if its not found.
8484
       */
8485
      public static _Fields findByThriftId(int fieldId) {
8486
        switch(fieldId) {
8487
          case 1: // ITEM_NUMBER
8488
            return ITEM_NUMBER;
8489
          default:
8490
            return null;
8491
        }
8492
      }
8493
 
8494
      /**
8495
       * Find the _Fields constant that matches fieldId, throwing an exception
8496
       * if it is not found.
8497
       */
8498
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8499
        _Fields fields = findByThriftId(fieldId);
8500
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8501
        return fields;
8502
      }
8503
 
8504
      /**
8505
       * Find the _Fields constant that matches name, or null if its not found.
8506
       */
8507
      public static _Fields findByName(String name) {
8508
        return byName.get(name);
8509
      }
8510
 
8511
      private final short _thriftId;
8512
      private final String _fieldName;
8513
 
8514
      _Fields(short thriftId, String fieldName) {
8515
        _thriftId = thriftId;
8516
        _fieldName = fieldName;
8517
      }
8518
 
8519
      public short getThriftFieldId() {
8520
        return _thriftId;
8521
      }
8522
 
8523
      public String getFieldName() {
8524
        return _fieldName;
8525
      }
8526
    }
8527
 
8528
    // isset id assignments
8529
 
8530
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8531
    static {
8532
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8533
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8534
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
8535
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8536
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemIds_args.class, metaDataMap);
8537
    }
8538
 
8539
    public getItemIds_args() {
8540
    }
8541
 
8542
    public getItemIds_args(
8543
      String itemNumber)
8544
    {
8545
      this();
8546
      this.itemNumber = itemNumber;
8547
    }
8548
 
8549
    /**
8550
     * Performs a deep copy on <i>other</i>.
8551
     */
8552
    public getItemIds_args(getItemIds_args other) {
8553
      if (other.isSetItemNumber()) {
8554
        this.itemNumber = other.itemNumber;
8555
      }
8556
    }
8557
 
8558
    public getItemIds_args deepCopy() {
8559
      return new getItemIds_args(this);
8560
    }
8561
 
8562
    @Override
8563
    public void clear() {
8564
      this.itemNumber = null;
8565
    }
8566
 
8567
    public String getItemNumber() {
8568
      return this.itemNumber;
8569
    }
8570
 
8571
    public void setItemNumber(String itemNumber) {
8572
      this.itemNumber = itemNumber;
8573
    }
8574
 
8575
    public void unsetItemNumber() {
8576
      this.itemNumber = null;
8577
    }
8578
 
8579
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
8580
    public boolean isSetItemNumber() {
8581
      return this.itemNumber != null;
8582
    }
8583
 
8584
    public void setItemNumberIsSet(boolean value) {
8585
      if (!value) {
8586
        this.itemNumber = null;
8587
      }
8588
    }
8589
 
8590
    public void setFieldValue(_Fields field, Object value) {
8591
      switch (field) {
8592
      case ITEM_NUMBER:
8593
        if (value == null) {
8594
          unsetItemNumber();
8595
        } else {
8596
          setItemNumber((String)value);
8597
        }
8598
        break;
8599
 
8600
      }
8601
    }
8602
 
8603
    public Object getFieldValue(_Fields field) {
8604
      switch (field) {
8605
      case ITEM_NUMBER:
8606
        return getItemNumber();
8607
 
8608
      }
8609
      throw new IllegalStateException();
8610
    }
8611
 
8612
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8613
    public boolean isSet(_Fields field) {
8614
      if (field == null) {
8615
        throw new IllegalArgumentException();
8616
      }
8617
 
8618
      switch (field) {
8619
      case ITEM_NUMBER:
8620
        return isSetItemNumber();
8621
      }
8622
      throw new IllegalStateException();
8623
    }
8624
 
8625
    @Override
8626
    public boolean equals(Object that) {
8627
      if (that == null)
8628
        return false;
8629
      if (that instanceof getItemIds_args)
8630
        return this.equals((getItemIds_args)that);
8631
      return false;
8632
    }
8633
 
8634
    public boolean equals(getItemIds_args that) {
8635
      if (that == null)
8636
        return false;
8637
 
8638
      boolean this_present_itemNumber = true && this.isSetItemNumber();
8639
      boolean that_present_itemNumber = true && that.isSetItemNumber();
8640
      if (this_present_itemNumber || that_present_itemNumber) {
8641
        if (!(this_present_itemNumber && that_present_itemNumber))
8642
          return false;
8643
        if (!this.itemNumber.equals(that.itemNumber))
8644
          return false;
8645
      }
8646
 
8647
      return true;
8648
    }
8649
 
8650
    @Override
8651
    public int hashCode() {
8652
      return 0;
8653
    }
8654
 
8655
    public int compareTo(getItemIds_args other) {
8656
      if (!getClass().equals(other.getClass())) {
8657
        return getClass().getName().compareTo(other.getClass().getName());
8658
      }
8659
 
8660
      int lastComparison = 0;
8661
      getItemIds_args typedOther = (getItemIds_args)other;
8662
 
8663
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
8664
      if (lastComparison != 0) {
8665
        return lastComparison;
8666
      }
8667
      if (isSetItemNumber()) {
8668
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
8669
        if (lastComparison != 0) {
8670
          return lastComparison;
8671
        }
8672
      }
8673
      return 0;
8674
    }
8675
 
8676
    public _Fields fieldForId(int fieldId) {
8677
      return _Fields.findByThriftId(fieldId);
8678
    }
8679
 
8680
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8681
      org.apache.thrift.protocol.TField field;
8682
      iprot.readStructBegin();
8683
      while (true)
8684
      {
8685
        field = iprot.readFieldBegin();
8686
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8687
          break;
8688
        }
8689
        switch (field.id) {
8690
          case 1: // ITEM_NUMBER
8691
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
8692
              this.itemNumber = iprot.readString();
8693
            } else { 
8694
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8695
            }
8696
            break;
8697
          default:
8698
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8699
        }
8700
        iprot.readFieldEnd();
8701
      }
8702
      iprot.readStructEnd();
8703
      validate();
8704
    }
8705
 
8706
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8707
      validate();
8708
 
8709
      oprot.writeStructBegin(STRUCT_DESC);
8710
      if (this.itemNumber != null) {
8711
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
8712
        oprot.writeString(this.itemNumber);
8713
        oprot.writeFieldEnd();
8714
      }
8715
      oprot.writeFieldStop();
8716
      oprot.writeStructEnd();
8717
    }
8718
 
8719
    @Override
8720
    public String toString() {
8721
      StringBuilder sb = new StringBuilder("getItemIds_args(");
8722
      boolean first = true;
8723
 
8724
      sb.append("itemNumber:");
8725
      if (this.itemNumber == null) {
8726
        sb.append("null");
8727
      } else {
8728
        sb.append(this.itemNumber);
8729
      }
8730
      first = false;
8731
      sb.append(")");
8732
      return sb.toString();
8733
    }
8734
 
8735
    public void validate() throws org.apache.thrift.TException {
8736
      // check for required fields
8737
    }
8738
 
8739
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8740
      try {
8741
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8742
      } catch (org.apache.thrift.TException te) {
8743
        throw new java.io.IOException(te);
8744
      }
8745
    }
8746
 
8747
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8748
      try {
8749
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8750
      } catch (org.apache.thrift.TException te) {
8751
        throw new java.io.IOException(te);
8752
      }
8753
    }
8754
 
8755
  }
8756
 
8757
  public static class getItemIds_result implements org.apache.thrift.TBase<getItemIds_result, getItemIds_result._Fields>, java.io.Serializable, Cloneable   {
8758
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemIds_result");
8759
 
8760
    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);
8761
 
8762
    private List<Long> success; // required
8763
 
8764
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8765
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8766
      SUCCESS((short)0, "success");
8767
 
8768
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8769
 
8770
      static {
8771
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8772
          byName.put(field.getFieldName(), field);
8773
        }
8774
      }
8775
 
8776
      /**
8777
       * Find the _Fields constant that matches fieldId, or null if its not found.
8778
       */
8779
      public static _Fields findByThriftId(int fieldId) {
8780
        switch(fieldId) {
8781
          case 0: // SUCCESS
8782
            return SUCCESS;
8783
          default:
8784
            return null;
8785
        }
8786
      }
8787
 
8788
      /**
8789
       * Find the _Fields constant that matches fieldId, throwing an exception
8790
       * if it is not found.
8791
       */
8792
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8793
        _Fields fields = findByThriftId(fieldId);
8794
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8795
        return fields;
8796
      }
8797
 
8798
      /**
8799
       * Find the _Fields constant that matches name, or null if its not found.
8800
       */
8801
      public static _Fields findByName(String name) {
8802
        return byName.get(name);
8803
      }
8804
 
8805
      private final short _thriftId;
8806
      private final String _fieldName;
8807
 
8808
      _Fields(short thriftId, String fieldName) {
8809
        _thriftId = thriftId;
8810
        _fieldName = fieldName;
8811
      }
8812
 
8813
      public short getThriftFieldId() {
8814
        return _thriftId;
8815
      }
8816
 
8817
      public String getFieldName() {
8818
        return _fieldName;
8819
      }
8820
    }
8821
 
8822
    // isset id assignments
8823
 
8824
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8825
    static {
8826
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8827
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8828
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
8829
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
8830
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8831
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemIds_result.class, metaDataMap);
8832
    }
8833
 
8834
    public getItemIds_result() {
8835
    }
8836
 
8837
    public getItemIds_result(
8838
      List<Long> success)
8839
    {
8840
      this();
8841
      this.success = success;
8842
    }
8843
 
8844
    /**
8845
     * Performs a deep copy on <i>other</i>.
8846
     */
8847
    public getItemIds_result(getItemIds_result other) {
8848
      if (other.isSetSuccess()) {
8849
        List<Long> __this__success = new ArrayList<Long>();
8850
        for (Long other_element : other.success) {
8851
          __this__success.add(other_element);
8852
        }
8853
        this.success = __this__success;
8854
      }
8855
    }
8856
 
8857
    public getItemIds_result deepCopy() {
8858
      return new getItemIds_result(this);
8859
    }
8860
 
8861
    @Override
8862
    public void clear() {
8863
      this.success = null;
8864
    }
8865
 
8866
    public int getSuccessSize() {
8867
      return (this.success == null) ? 0 : this.success.size();
8868
    }
8869
 
8870
    public java.util.Iterator<Long> getSuccessIterator() {
8871
      return (this.success == null) ? null : this.success.iterator();
8872
    }
8873
 
8874
    public void addToSuccess(long elem) {
8875
      if (this.success == null) {
8876
        this.success = new ArrayList<Long>();
8877
      }
8878
      this.success.add(elem);
8879
    }
8880
 
8881
    public List<Long> getSuccess() {
8882
      return this.success;
8883
    }
8884
 
8885
    public void setSuccess(List<Long> success) {
8886
      this.success = success;
8887
    }
8888
 
8889
    public void unsetSuccess() {
8890
      this.success = null;
8891
    }
8892
 
8893
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8894
    public boolean isSetSuccess() {
8895
      return this.success != null;
8896
    }
8897
 
8898
    public void setSuccessIsSet(boolean value) {
8899
      if (!value) {
8900
        this.success = null;
8901
      }
8902
    }
8903
 
8904
    public void setFieldValue(_Fields field, Object value) {
8905
      switch (field) {
8906
      case SUCCESS:
8907
        if (value == null) {
8908
          unsetSuccess();
8909
        } else {
8910
          setSuccess((List<Long>)value);
8911
        }
8912
        break;
8913
 
8914
      }
8915
    }
8916
 
8917
    public Object getFieldValue(_Fields field) {
8918
      switch (field) {
8919
      case SUCCESS:
8920
        return getSuccess();
8921
 
8922
      }
8923
      throw new IllegalStateException();
8924
    }
8925
 
8926
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8927
    public boolean isSet(_Fields field) {
8928
      if (field == null) {
8929
        throw new IllegalArgumentException();
8930
      }
8931
 
8932
      switch (field) {
8933
      case SUCCESS:
8934
        return isSetSuccess();
8935
      }
8936
      throw new IllegalStateException();
8937
    }
8938
 
8939
    @Override
8940
    public boolean equals(Object that) {
8941
      if (that == null)
8942
        return false;
8943
      if (that instanceof getItemIds_result)
8944
        return this.equals((getItemIds_result)that);
8945
      return false;
8946
    }
8947
 
8948
    public boolean equals(getItemIds_result that) {
8949
      if (that == null)
8950
        return false;
8951
 
8952
      boolean this_present_success = true && this.isSetSuccess();
8953
      boolean that_present_success = true && that.isSetSuccess();
8954
      if (this_present_success || that_present_success) {
8955
        if (!(this_present_success && that_present_success))
8956
          return false;
8957
        if (!this.success.equals(that.success))
8958
          return false;
8959
      }
8960
 
8961
      return true;
8962
    }
8963
 
8964
    @Override
8965
    public int hashCode() {
8966
      return 0;
8967
    }
8968
 
8969
    public int compareTo(getItemIds_result other) {
8970
      if (!getClass().equals(other.getClass())) {
8971
        return getClass().getName().compareTo(other.getClass().getName());
8972
      }
8973
 
8974
      int lastComparison = 0;
8975
      getItemIds_result typedOther = (getItemIds_result)other;
8976
 
8977
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8978
      if (lastComparison != 0) {
8979
        return lastComparison;
8980
      }
8981
      if (isSetSuccess()) {
8982
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8983
        if (lastComparison != 0) {
8984
          return lastComparison;
8985
        }
8986
      }
8987
      return 0;
8988
    }
8989
 
8990
    public _Fields fieldForId(int fieldId) {
8991
      return _Fields.findByThriftId(fieldId);
8992
    }
8993
 
8994
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8995
      org.apache.thrift.protocol.TField field;
8996
      iprot.readStructBegin();
8997
      while (true)
8998
      {
8999
        field = iprot.readFieldBegin();
9000
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9001
          break;
9002
        }
9003
        switch (field.id) {
9004
          case 0: // SUCCESS
9005
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
9006
              {
5361 mandeep.dh 9007
                org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
9008
                this.success = new ArrayList<Long>(_list4.size);
9009
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
5110 mandeep.dh 9010
                {
5361 mandeep.dh 9011
                  long _elem6; // required
9012
                  _elem6 = iprot.readI64();
9013
                  this.success.add(_elem6);
5110 mandeep.dh 9014
                }
9015
                iprot.readListEnd();
9016
              }
9017
            } else { 
9018
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9019
            }
9020
            break;
9021
          default:
9022
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9023
        }
9024
        iprot.readFieldEnd();
9025
      }
9026
      iprot.readStructEnd();
9027
      validate();
9028
    }
9029
 
9030
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9031
      oprot.writeStructBegin(STRUCT_DESC);
9032
 
9033
      if (this.isSetSuccess()) {
9034
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9035
        {
9036
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.success.size()));
5361 mandeep.dh 9037
          for (long _iter7 : this.success)
5110 mandeep.dh 9038
          {
5361 mandeep.dh 9039
            oprot.writeI64(_iter7);
5110 mandeep.dh 9040
          }
9041
          oprot.writeListEnd();
9042
        }
9043
        oprot.writeFieldEnd();
9044
      }
9045
      oprot.writeFieldStop();
9046
      oprot.writeStructEnd();
9047
    }
9048
 
9049
    @Override
9050
    public String toString() {
9051
      StringBuilder sb = new StringBuilder("getItemIds_result(");
9052
      boolean first = true;
9053
 
9054
      sb.append("success:");
9055
      if (this.success == null) {
9056
        sb.append("null");
9057
      } else {
9058
        sb.append(this.success);
9059
      }
9060
      first = false;
9061
      sb.append(")");
9062
      return sb.toString();
9063
    }
9064
 
9065
    public void validate() throws org.apache.thrift.TException {
9066
      // check for required fields
9067
    }
9068
 
9069
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9070
      try {
9071
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9072
      } catch (org.apache.thrift.TException te) {
9073
        throw new java.io.IOException(te);
9074
      }
9075
    }
9076
 
9077
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9078
      try {
9079
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9080
      } catch (org.apache.thrift.TException te) {
9081
        throw new java.io.IOException(te);
9082
      }
9083
    }
9084
 
9085
  }
9086
 
5185 mandeep.dh 9087
  public static class getInventoryItemsFromLastScanType_args implements org.apache.thrift.TBase<getInventoryItemsFromLastScanType_args, getInventoryItemsFromLastScanType_args._Fields>, java.io.Serializable, Cloneable   {
9088
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemsFromLastScanType_args");
9089
 
9090
    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);
9091
 
9092
    private ScanType lastScanType; // required
9093
 
9094
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9095
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9096
      /**
9097
       * 
9098
       * @see ScanType
9099
       */
9100
      LAST_SCAN_TYPE((short)1, "lastScanType");
9101
 
9102
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9103
 
9104
      static {
9105
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9106
          byName.put(field.getFieldName(), field);
9107
        }
9108
      }
9109
 
9110
      /**
9111
       * Find the _Fields constant that matches fieldId, or null if its not found.
9112
       */
9113
      public static _Fields findByThriftId(int fieldId) {
9114
        switch(fieldId) {
9115
          case 1: // LAST_SCAN_TYPE
9116
            return LAST_SCAN_TYPE;
9117
          default:
9118
            return null;
9119
        }
9120
      }
9121
 
9122
      /**
9123
       * Find the _Fields constant that matches fieldId, throwing an exception
9124
       * if it is not found.
9125
       */
9126
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9127
        _Fields fields = findByThriftId(fieldId);
9128
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9129
        return fields;
9130
      }
9131
 
9132
      /**
9133
       * Find the _Fields constant that matches name, or null if its not found.
9134
       */
9135
      public static _Fields findByName(String name) {
9136
        return byName.get(name);
9137
      }
9138
 
9139
      private final short _thriftId;
9140
      private final String _fieldName;
9141
 
9142
      _Fields(short thriftId, String fieldName) {
9143
        _thriftId = thriftId;
9144
        _fieldName = fieldName;
9145
      }
9146
 
9147
      public short getThriftFieldId() {
9148
        return _thriftId;
9149
      }
9150
 
9151
      public String getFieldName() {
9152
        return _fieldName;
9153
      }
9154
    }
9155
 
9156
    // isset id assignments
9157
 
9158
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9159
    static {
9160
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9161
      tmpMap.put(_Fields.LAST_SCAN_TYPE, new org.apache.thrift.meta_data.FieldMetaData("lastScanType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9162
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
9163
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9164
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemsFromLastScanType_args.class, metaDataMap);
9165
    }
9166
 
9167
    public getInventoryItemsFromLastScanType_args() {
9168
    }
9169
 
9170
    public getInventoryItemsFromLastScanType_args(
9171
      ScanType lastScanType)
9172
    {
9173
      this();
9174
      this.lastScanType = lastScanType;
9175
    }
9176
 
9177
    /**
9178
     * Performs a deep copy on <i>other</i>.
9179
     */
9180
    public getInventoryItemsFromLastScanType_args(getInventoryItemsFromLastScanType_args other) {
9181
      if (other.isSetLastScanType()) {
9182
        this.lastScanType = other.lastScanType;
9183
      }
9184
    }
9185
 
9186
    public getInventoryItemsFromLastScanType_args deepCopy() {
9187
      return new getInventoryItemsFromLastScanType_args(this);
9188
    }
9189
 
9190
    @Override
9191
    public void clear() {
9192
      this.lastScanType = null;
9193
    }
9194
 
9195
    /**
9196
     * 
9197
     * @see ScanType
9198
     */
9199
    public ScanType getLastScanType() {
9200
      return this.lastScanType;
9201
    }
9202
 
9203
    /**
9204
     * 
9205
     * @see ScanType
9206
     */
9207
    public void setLastScanType(ScanType lastScanType) {
9208
      this.lastScanType = lastScanType;
9209
    }
9210
 
9211
    public void unsetLastScanType() {
9212
      this.lastScanType = null;
9213
    }
9214
 
9215
    /** Returns true if field lastScanType is set (has been assigned a value) and false otherwise */
9216
    public boolean isSetLastScanType() {
9217
      return this.lastScanType != null;
9218
    }
9219
 
9220
    public void setLastScanTypeIsSet(boolean value) {
9221
      if (!value) {
9222
        this.lastScanType = null;
9223
      }
9224
    }
9225
 
9226
    public void setFieldValue(_Fields field, Object value) {
9227
      switch (field) {
9228
      case LAST_SCAN_TYPE:
9229
        if (value == null) {
9230
          unsetLastScanType();
9231
        } else {
9232
          setLastScanType((ScanType)value);
9233
        }
9234
        break;
9235
 
9236
      }
9237
    }
9238
 
9239
    public Object getFieldValue(_Fields field) {
9240
      switch (field) {
9241
      case LAST_SCAN_TYPE:
9242
        return getLastScanType();
9243
 
9244
      }
9245
      throw new IllegalStateException();
9246
    }
9247
 
9248
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9249
    public boolean isSet(_Fields field) {
9250
      if (field == null) {
9251
        throw new IllegalArgumentException();
9252
      }
9253
 
9254
      switch (field) {
9255
      case LAST_SCAN_TYPE:
9256
        return isSetLastScanType();
9257
      }
9258
      throw new IllegalStateException();
9259
    }
9260
 
9261
    @Override
9262
    public boolean equals(Object that) {
9263
      if (that == null)
9264
        return false;
9265
      if (that instanceof getInventoryItemsFromLastScanType_args)
9266
        return this.equals((getInventoryItemsFromLastScanType_args)that);
9267
      return false;
9268
    }
9269
 
9270
    public boolean equals(getInventoryItemsFromLastScanType_args that) {
9271
      if (that == null)
9272
        return false;
9273
 
9274
      boolean this_present_lastScanType = true && this.isSetLastScanType();
9275
      boolean that_present_lastScanType = true && that.isSetLastScanType();
9276
      if (this_present_lastScanType || that_present_lastScanType) {
9277
        if (!(this_present_lastScanType && that_present_lastScanType))
9278
          return false;
9279
        if (!this.lastScanType.equals(that.lastScanType))
9280
          return false;
9281
      }
9282
 
9283
      return true;
9284
    }
9285
 
9286
    @Override
9287
    public int hashCode() {
9288
      return 0;
9289
    }
9290
 
9291
    public int compareTo(getInventoryItemsFromLastScanType_args other) {
9292
      if (!getClass().equals(other.getClass())) {
9293
        return getClass().getName().compareTo(other.getClass().getName());
9294
      }
9295
 
9296
      int lastComparison = 0;
9297
      getInventoryItemsFromLastScanType_args typedOther = (getInventoryItemsFromLastScanType_args)other;
9298
 
9299
      lastComparison = Boolean.valueOf(isSetLastScanType()).compareTo(typedOther.isSetLastScanType());
9300
      if (lastComparison != 0) {
9301
        return lastComparison;
9302
      }
9303
      if (isSetLastScanType()) {
9304
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastScanType, typedOther.lastScanType);
9305
        if (lastComparison != 0) {
9306
          return lastComparison;
9307
        }
9308
      }
9309
      return 0;
9310
    }
9311
 
9312
    public _Fields fieldForId(int fieldId) {
9313
      return _Fields.findByThriftId(fieldId);
9314
    }
9315
 
9316
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9317
      org.apache.thrift.protocol.TField field;
9318
      iprot.readStructBegin();
9319
      while (true)
9320
      {
9321
        field = iprot.readFieldBegin();
9322
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9323
          break;
9324
        }
9325
        switch (field.id) {
9326
          case 1: // LAST_SCAN_TYPE
9327
            if (field.type == org.apache.thrift.protocol.TType.I32) {
9328
              this.lastScanType = ScanType.findByValue(iprot.readI32());
9329
            } else { 
9330
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9331
            }
9332
            break;
9333
          default:
9334
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9335
        }
9336
        iprot.readFieldEnd();
9337
      }
9338
      iprot.readStructEnd();
9339
      validate();
9340
    }
9341
 
9342
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9343
      validate();
9344
 
9345
      oprot.writeStructBegin(STRUCT_DESC);
9346
      if (this.lastScanType != null) {
9347
        oprot.writeFieldBegin(LAST_SCAN_TYPE_FIELD_DESC);
9348
        oprot.writeI32(this.lastScanType.getValue());
9349
        oprot.writeFieldEnd();
9350
      }
9351
      oprot.writeFieldStop();
9352
      oprot.writeStructEnd();
9353
    }
9354
 
9355
    @Override
9356
    public String toString() {
9357
      StringBuilder sb = new StringBuilder("getInventoryItemsFromLastScanType_args(");
9358
      boolean first = true;
9359
 
9360
      sb.append("lastScanType:");
9361
      if (this.lastScanType == null) {
9362
        sb.append("null");
9363
      } else {
9364
        sb.append(this.lastScanType);
9365
      }
9366
      first = false;
9367
      sb.append(")");
9368
      return sb.toString();
9369
    }
9370
 
9371
    public void validate() throws org.apache.thrift.TException {
9372
      // check for required fields
9373
    }
9374
 
9375
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9376
      try {
9377
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9378
      } catch (org.apache.thrift.TException te) {
9379
        throw new java.io.IOException(te);
9380
      }
9381
    }
9382
 
9383
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9384
      try {
9385
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9386
      } catch (org.apache.thrift.TException te) {
9387
        throw new java.io.IOException(te);
9388
      }
9389
    }
9390
 
9391
  }
9392
 
9393
  public static class getInventoryItemsFromLastScanType_result implements org.apache.thrift.TBase<getInventoryItemsFromLastScanType_result, getInventoryItemsFromLastScanType_result._Fields>, java.io.Serializable, Cloneable   {
9394
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemsFromLastScanType_result");
9395
 
9396
    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);
9397
    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);
9398
 
9399
    private List<InventoryItem> success; // required
9400
    private WarehouseServiceException wex; // required
9401
 
9402
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9403
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9404
      SUCCESS((short)0, "success"),
9405
      WEX((short)1, "wex");
9406
 
9407
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9408
 
9409
      static {
9410
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9411
          byName.put(field.getFieldName(), field);
9412
        }
9413
      }
9414
 
9415
      /**
9416
       * Find the _Fields constant that matches fieldId, or null if its not found.
9417
       */
9418
      public static _Fields findByThriftId(int fieldId) {
9419
        switch(fieldId) {
9420
          case 0: // SUCCESS
9421
            return SUCCESS;
9422
          case 1: // WEX
9423
            return WEX;
9424
          default:
9425
            return null;
9426
        }
9427
      }
9428
 
9429
      /**
9430
       * Find the _Fields constant that matches fieldId, throwing an exception
9431
       * if it is not found.
9432
       */
9433
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9434
        _Fields fields = findByThriftId(fieldId);
9435
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9436
        return fields;
9437
      }
9438
 
9439
      /**
9440
       * Find the _Fields constant that matches name, or null if its not found.
9441
       */
9442
      public static _Fields findByName(String name) {
9443
        return byName.get(name);
9444
      }
9445
 
9446
      private final short _thriftId;
9447
      private final String _fieldName;
9448
 
9449
      _Fields(short thriftId, String fieldName) {
9450
        _thriftId = thriftId;
9451
        _fieldName = fieldName;
9452
      }
9453
 
9454
      public short getThriftFieldId() {
9455
        return _thriftId;
9456
      }
9457
 
9458
      public String getFieldName() {
9459
        return _fieldName;
9460
      }
9461
    }
9462
 
9463
    // isset id assignments
9464
 
9465
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9466
    static {
9467
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9468
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9469
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
9470
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class))));
9471
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9472
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9473
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9474
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemsFromLastScanType_result.class, metaDataMap);
9475
    }
9476
 
9477
    public getInventoryItemsFromLastScanType_result() {
9478
    }
9479
 
9480
    public getInventoryItemsFromLastScanType_result(
9481
      List<InventoryItem> success,
9482
      WarehouseServiceException wex)
9483
    {
9484
      this();
9485
      this.success = success;
9486
      this.wex = wex;
9487
    }
9488
 
9489
    /**
9490
     * Performs a deep copy on <i>other</i>.
9491
     */
9492
    public getInventoryItemsFromLastScanType_result(getInventoryItemsFromLastScanType_result other) {
9493
      if (other.isSetSuccess()) {
9494
        List<InventoryItem> __this__success = new ArrayList<InventoryItem>();
9495
        for (InventoryItem other_element : other.success) {
9496
          __this__success.add(new InventoryItem(other_element));
9497
        }
9498
        this.success = __this__success;
9499
      }
9500
      if (other.isSetWex()) {
9501
        this.wex = new WarehouseServiceException(other.wex);
9502
      }
9503
    }
9504
 
9505
    public getInventoryItemsFromLastScanType_result deepCopy() {
9506
      return new getInventoryItemsFromLastScanType_result(this);
9507
    }
9508
 
9509
    @Override
9510
    public void clear() {
9511
      this.success = null;
9512
      this.wex = null;
9513
    }
9514
 
9515
    public int getSuccessSize() {
9516
      return (this.success == null) ? 0 : this.success.size();
9517
    }
9518
 
9519
    public java.util.Iterator<InventoryItem> getSuccessIterator() {
9520
      return (this.success == null) ? null : this.success.iterator();
9521
    }
9522
 
9523
    public void addToSuccess(InventoryItem elem) {
9524
      if (this.success == null) {
9525
        this.success = new ArrayList<InventoryItem>();
9526
      }
9527
      this.success.add(elem);
9528
    }
9529
 
9530
    public List<InventoryItem> getSuccess() {
9531
      return this.success;
9532
    }
9533
 
9534
    public void setSuccess(List<InventoryItem> success) {
9535
      this.success = success;
9536
    }
9537
 
9538
    public void unsetSuccess() {
9539
      this.success = null;
9540
    }
9541
 
9542
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9543
    public boolean isSetSuccess() {
9544
      return this.success != null;
9545
    }
9546
 
9547
    public void setSuccessIsSet(boolean value) {
9548
      if (!value) {
9549
        this.success = null;
9550
      }
9551
    }
9552
 
9553
    public WarehouseServiceException getWex() {
9554
      return this.wex;
9555
    }
9556
 
9557
    public void setWex(WarehouseServiceException wex) {
9558
      this.wex = wex;
9559
    }
9560
 
9561
    public void unsetWex() {
9562
      this.wex = null;
9563
    }
9564
 
9565
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
9566
    public boolean isSetWex() {
9567
      return this.wex != null;
9568
    }
9569
 
9570
    public void setWexIsSet(boolean value) {
9571
      if (!value) {
9572
        this.wex = null;
9573
      }
9574
    }
9575
 
9576
    public void setFieldValue(_Fields field, Object value) {
9577
      switch (field) {
9578
      case SUCCESS:
9579
        if (value == null) {
9580
          unsetSuccess();
9581
        } else {
9582
          setSuccess((List<InventoryItem>)value);
9583
        }
9584
        break;
9585
 
9586
      case WEX:
9587
        if (value == null) {
9588
          unsetWex();
9589
        } else {
9590
          setWex((WarehouseServiceException)value);
9591
        }
9592
        break;
9593
 
9594
      }
9595
    }
9596
 
9597
    public Object getFieldValue(_Fields field) {
9598
      switch (field) {
9599
      case SUCCESS:
9600
        return getSuccess();
9601
 
9602
      case WEX:
9603
        return getWex();
9604
 
9605
      }
9606
      throw new IllegalStateException();
9607
    }
9608
 
9609
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9610
    public boolean isSet(_Fields field) {
9611
      if (field == null) {
9612
        throw new IllegalArgumentException();
9613
      }
9614
 
9615
      switch (field) {
9616
      case SUCCESS:
9617
        return isSetSuccess();
9618
      case WEX:
9619
        return isSetWex();
9620
      }
9621
      throw new IllegalStateException();
9622
    }
9623
 
9624
    @Override
9625
    public boolean equals(Object that) {
9626
      if (that == null)
9627
        return false;
9628
      if (that instanceof getInventoryItemsFromLastScanType_result)
9629
        return this.equals((getInventoryItemsFromLastScanType_result)that);
9630
      return false;
9631
    }
9632
 
9633
    public boolean equals(getInventoryItemsFromLastScanType_result that) {
9634
      if (that == null)
9635
        return false;
9636
 
9637
      boolean this_present_success = true && this.isSetSuccess();
9638
      boolean that_present_success = true && that.isSetSuccess();
9639
      if (this_present_success || that_present_success) {
9640
        if (!(this_present_success && that_present_success))
9641
          return false;
9642
        if (!this.success.equals(that.success))
9643
          return false;
9644
      }
9645
 
9646
      boolean this_present_wex = true && this.isSetWex();
9647
      boolean that_present_wex = true && that.isSetWex();
9648
      if (this_present_wex || that_present_wex) {
9649
        if (!(this_present_wex && that_present_wex))
9650
          return false;
9651
        if (!this.wex.equals(that.wex))
9652
          return false;
9653
      }
9654
 
9655
      return true;
9656
    }
9657
 
9658
    @Override
9659
    public int hashCode() {
9660
      return 0;
9661
    }
9662
 
9663
    public int compareTo(getInventoryItemsFromLastScanType_result other) {
9664
      if (!getClass().equals(other.getClass())) {
9665
        return getClass().getName().compareTo(other.getClass().getName());
9666
      }
9667
 
9668
      int lastComparison = 0;
9669
      getInventoryItemsFromLastScanType_result typedOther = (getInventoryItemsFromLastScanType_result)other;
9670
 
9671
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9672
      if (lastComparison != 0) {
9673
        return lastComparison;
9674
      }
9675
      if (isSetSuccess()) {
9676
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9677
        if (lastComparison != 0) {
9678
          return lastComparison;
9679
        }
9680
      }
9681
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
9682
      if (lastComparison != 0) {
9683
        return lastComparison;
9684
      }
9685
      if (isSetWex()) {
9686
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
9687
        if (lastComparison != 0) {
9688
          return lastComparison;
9689
        }
9690
      }
9691
      return 0;
9692
    }
9693
 
9694
    public _Fields fieldForId(int fieldId) {
9695
      return _Fields.findByThriftId(fieldId);
9696
    }
9697
 
9698
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9699
      org.apache.thrift.protocol.TField field;
9700
      iprot.readStructBegin();
9701
      while (true)
9702
      {
9703
        field = iprot.readFieldBegin();
9704
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9705
          break;
9706
        }
9707
        switch (field.id) {
9708
          case 0: // SUCCESS
9709
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
9710
              {
5361 mandeep.dh 9711
                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
9712
                this.success = new ArrayList<InventoryItem>(_list8.size);
9713
                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
5185 mandeep.dh 9714
                {
5361 mandeep.dh 9715
                  InventoryItem _elem10; // required
9716
                  _elem10 = new InventoryItem();
9717
                  _elem10.read(iprot);
9718
                  this.success.add(_elem10);
5185 mandeep.dh 9719
                }
9720
                iprot.readListEnd();
9721
              }
9722
            } else { 
9723
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9724
            }
9725
            break;
9726
          case 1: // WEX
9727
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9728
              this.wex = new WarehouseServiceException();
9729
              this.wex.read(iprot);
9730
            } else { 
9731
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9732
            }
9733
            break;
9734
          default:
9735
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9736
        }
9737
        iprot.readFieldEnd();
9738
      }
9739
      iprot.readStructEnd();
9740
      validate();
9741
    }
9742
 
9743
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9744
      oprot.writeStructBegin(STRUCT_DESC);
9745
 
9746
      if (this.isSetSuccess()) {
9747
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9748
        {
9749
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
5361 mandeep.dh 9750
          for (InventoryItem _iter11 : this.success)
5185 mandeep.dh 9751
          {
5361 mandeep.dh 9752
            _iter11.write(oprot);
5185 mandeep.dh 9753
          }
9754
          oprot.writeListEnd();
9755
        }
9756
        oprot.writeFieldEnd();
9757
      } else if (this.isSetWex()) {
9758
        oprot.writeFieldBegin(WEX_FIELD_DESC);
9759
        this.wex.write(oprot);
9760
        oprot.writeFieldEnd();
9761
      }
9762
      oprot.writeFieldStop();
9763
      oprot.writeStructEnd();
9764
    }
9765
 
9766
    @Override
9767
    public String toString() {
9768
      StringBuilder sb = new StringBuilder("getInventoryItemsFromLastScanType_result(");
9769
      boolean first = true;
9770
 
9771
      sb.append("success:");
9772
      if (this.success == null) {
9773
        sb.append("null");
9774
      } else {
9775
        sb.append(this.success);
9776
      }
9777
      first = false;
9778
      if (!first) sb.append(", ");
9779
      sb.append("wex:");
9780
      if (this.wex == null) {
9781
        sb.append("null");
9782
      } else {
9783
        sb.append(this.wex);
9784
      }
9785
      first = false;
9786
      sb.append(")");
9787
      return sb.toString();
9788
    }
9789
 
9790
    public void validate() throws org.apache.thrift.TException {
9791
      // check for required fields
9792
    }
9793
 
9794
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9795
      try {
9796
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9797
      } catch (org.apache.thrift.TException te) {
9798
        throw new java.io.IOException(te);
9799
      }
9800
    }
9801
 
9802
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9803
      try {
9804
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9805
      } catch (org.apache.thrift.TException te) {
9806
        throw new java.io.IOException(te);
9807
      }
9808
    }
9809
 
9810
  }
9811
 
9812
  public static class getInventoryItemFromId_args implements org.apache.thrift.TBase<getInventoryItemFromId_args, getInventoryItemFromId_args._Fields>, java.io.Serializable, Cloneable   {
9813
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromId_args");
9814
 
9815
    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);
9816
 
9817
    private long inventoryItemId; // required
9818
 
9819
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9820
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9821
      INVENTORY_ITEM_ID((short)1, "inventoryItemId");
9822
 
9823
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9824
 
9825
      static {
9826
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9827
          byName.put(field.getFieldName(), field);
9828
        }
9829
      }
9830
 
9831
      /**
9832
       * Find the _Fields constant that matches fieldId, or null if its not found.
9833
       */
9834
      public static _Fields findByThriftId(int fieldId) {
9835
        switch(fieldId) {
9836
          case 1: // INVENTORY_ITEM_ID
9837
            return INVENTORY_ITEM_ID;
9838
          default:
9839
            return null;
9840
        }
9841
      }
9842
 
9843
      /**
9844
       * Find the _Fields constant that matches fieldId, throwing an exception
9845
       * if it is not found.
9846
       */
9847
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9848
        _Fields fields = findByThriftId(fieldId);
9849
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9850
        return fields;
9851
      }
9852
 
9853
      /**
9854
       * Find the _Fields constant that matches name, or null if its not found.
9855
       */
9856
      public static _Fields findByName(String name) {
9857
        return byName.get(name);
9858
      }
9859
 
9860
      private final short _thriftId;
9861
      private final String _fieldName;
9862
 
9863
      _Fields(short thriftId, String fieldName) {
9864
        _thriftId = thriftId;
9865
        _fieldName = fieldName;
9866
      }
9867
 
9868
      public short getThriftFieldId() {
9869
        return _thriftId;
9870
      }
9871
 
9872
      public String getFieldName() {
9873
        return _fieldName;
9874
      }
9875
    }
9876
 
9877
    // isset id assignments
9878
    private static final int __INVENTORYITEMID_ISSET_ID = 0;
9879
    private BitSet __isset_bit_vector = new BitSet(1);
9880
 
9881
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9882
    static {
9883
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9884
      tmpMap.put(_Fields.INVENTORY_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("inventoryItemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9885
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9886
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9887
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromId_args.class, metaDataMap);
9888
    }
9889
 
9890
    public getInventoryItemFromId_args() {
9891
    }
9892
 
9893
    public getInventoryItemFromId_args(
9894
      long inventoryItemId)
9895
    {
9896
      this();
9897
      this.inventoryItemId = inventoryItemId;
9898
      setInventoryItemIdIsSet(true);
9899
    }
9900
 
9901
    /**
9902
     * Performs a deep copy on <i>other</i>.
9903
     */
9904
    public getInventoryItemFromId_args(getInventoryItemFromId_args other) {
9905
      __isset_bit_vector.clear();
9906
      __isset_bit_vector.or(other.__isset_bit_vector);
9907
      this.inventoryItemId = other.inventoryItemId;
9908
    }
9909
 
9910
    public getInventoryItemFromId_args deepCopy() {
9911
      return new getInventoryItemFromId_args(this);
9912
    }
9913
 
9914
    @Override
9915
    public void clear() {
9916
      setInventoryItemIdIsSet(false);
9917
      this.inventoryItemId = 0;
9918
    }
9919
 
9920
    public long getInventoryItemId() {
9921
      return this.inventoryItemId;
9922
    }
9923
 
9924
    public void setInventoryItemId(long inventoryItemId) {
9925
      this.inventoryItemId = inventoryItemId;
9926
      setInventoryItemIdIsSet(true);
9927
    }
9928
 
9929
    public void unsetInventoryItemId() {
9930
      __isset_bit_vector.clear(__INVENTORYITEMID_ISSET_ID);
9931
    }
9932
 
9933
    /** Returns true if field inventoryItemId is set (has been assigned a value) and false otherwise */
9934
    public boolean isSetInventoryItemId() {
9935
      return __isset_bit_vector.get(__INVENTORYITEMID_ISSET_ID);
9936
    }
9937
 
9938
    public void setInventoryItemIdIsSet(boolean value) {
9939
      __isset_bit_vector.set(__INVENTORYITEMID_ISSET_ID, value);
9940
    }
9941
 
9942
    public void setFieldValue(_Fields field, Object value) {
9943
      switch (field) {
9944
      case INVENTORY_ITEM_ID:
9945
        if (value == null) {
9946
          unsetInventoryItemId();
9947
        } else {
9948
          setInventoryItemId((Long)value);
9949
        }
9950
        break;
9951
 
9952
      }
9953
    }
9954
 
9955
    public Object getFieldValue(_Fields field) {
9956
      switch (field) {
9957
      case INVENTORY_ITEM_ID:
9958
        return Long.valueOf(getInventoryItemId());
9959
 
9960
      }
9961
      throw new IllegalStateException();
9962
    }
9963
 
9964
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9965
    public boolean isSet(_Fields field) {
9966
      if (field == null) {
9967
        throw new IllegalArgumentException();
9968
      }
9969
 
9970
      switch (field) {
9971
      case INVENTORY_ITEM_ID:
9972
        return isSetInventoryItemId();
9973
      }
9974
      throw new IllegalStateException();
9975
    }
9976
 
9977
    @Override
9978
    public boolean equals(Object that) {
9979
      if (that == null)
9980
        return false;
9981
      if (that instanceof getInventoryItemFromId_args)
9982
        return this.equals((getInventoryItemFromId_args)that);
9983
      return false;
9984
    }
9985
 
9986
    public boolean equals(getInventoryItemFromId_args that) {
9987
      if (that == null)
9988
        return false;
9989
 
9990
      boolean this_present_inventoryItemId = true;
9991
      boolean that_present_inventoryItemId = true;
9992
      if (this_present_inventoryItemId || that_present_inventoryItemId) {
9993
        if (!(this_present_inventoryItemId && that_present_inventoryItemId))
9994
          return false;
9995
        if (this.inventoryItemId != that.inventoryItemId)
9996
          return false;
9997
      }
9998
 
9999
      return true;
10000
    }
10001
 
10002
    @Override
10003
    public int hashCode() {
10004
      return 0;
10005
    }
10006
 
10007
    public int compareTo(getInventoryItemFromId_args other) {
10008
      if (!getClass().equals(other.getClass())) {
10009
        return getClass().getName().compareTo(other.getClass().getName());
10010
      }
10011
 
10012
      int lastComparison = 0;
10013
      getInventoryItemFromId_args typedOther = (getInventoryItemFromId_args)other;
10014
 
10015
      lastComparison = Boolean.valueOf(isSetInventoryItemId()).compareTo(typedOther.isSetInventoryItemId());
10016
      if (lastComparison != 0) {
10017
        return lastComparison;
10018
      }
10019
      if (isSetInventoryItemId()) {
10020
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItemId, typedOther.inventoryItemId);
10021
        if (lastComparison != 0) {
10022
          return lastComparison;
10023
        }
10024
      }
10025
      return 0;
10026
    }
10027
 
10028
    public _Fields fieldForId(int fieldId) {
10029
      return _Fields.findByThriftId(fieldId);
10030
    }
10031
 
10032
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10033
      org.apache.thrift.protocol.TField field;
10034
      iprot.readStructBegin();
10035
      while (true)
10036
      {
10037
        field = iprot.readFieldBegin();
10038
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10039
          break;
10040
        }
10041
        switch (field.id) {
10042
          case 1: // INVENTORY_ITEM_ID
10043
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10044
              this.inventoryItemId = iprot.readI64();
10045
              setInventoryItemIdIsSet(true);
10046
            } else { 
10047
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10048
            }
10049
            break;
10050
          default:
10051
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10052
        }
10053
        iprot.readFieldEnd();
10054
      }
10055
      iprot.readStructEnd();
10056
      validate();
10057
    }
10058
 
10059
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10060
      validate();
10061
 
10062
      oprot.writeStructBegin(STRUCT_DESC);
10063
      oprot.writeFieldBegin(INVENTORY_ITEM_ID_FIELD_DESC);
10064
      oprot.writeI64(this.inventoryItemId);
10065
      oprot.writeFieldEnd();
10066
      oprot.writeFieldStop();
10067
      oprot.writeStructEnd();
10068
    }
10069
 
10070
    @Override
10071
    public String toString() {
10072
      StringBuilder sb = new StringBuilder("getInventoryItemFromId_args(");
10073
      boolean first = true;
10074
 
10075
      sb.append("inventoryItemId:");
10076
      sb.append(this.inventoryItemId);
10077
      first = false;
10078
      sb.append(")");
10079
      return sb.toString();
10080
    }
10081
 
10082
    public void validate() throws org.apache.thrift.TException {
10083
      // check for required fields
10084
    }
10085
 
10086
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10087
      try {
10088
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10089
      } catch (org.apache.thrift.TException te) {
10090
        throw new java.io.IOException(te);
10091
      }
10092
    }
10093
 
10094
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10095
      try {
5372 mandeep.dh 10096
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
10097
        __isset_bit_vector = new BitSet(1);
5185 mandeep.dh 10098
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10099
      } catch (org.apache.thrift.TException te) {
10100
        throw new java.io.IOException(te);
10101
      }
10102
    }
10103
 
10104
  }
10105
 
10106
  public static class getInventoryItemFromId_result implements org.apache.thrift.TBase<getInventoryItemFromId_result, getInventoryItemFromId_result._Fields>, java.io.Serializable, Cloneable   {
10107
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromId_result");
10108
 
10109
    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);
10110
    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);
10111
 
10112
    private InventoryItem success; // required
10113
    private WarehouseServiceException wex; // required
10114
 
10115
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10116
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10117
      SUCCESS((short)0, "success"),
10118
      WEX((short)1, "wex");
10119
 
10120
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10121
 
10122
      static {
10123
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10124
          byName.put(field.getFieldName(), field);
10125
        }
10126
      }
10127
 
10128
      /**
10129
       * Find the _Fields constant that matches fieldId, or null if its not found.
10130
       */
10131
      public static _Fields findByThriftId(int fieldId) {
10132
        switch(fieldId) {
10133
          case 0: // SUCCESS
10134
            return SUCCESS;
10135
          case 1: // WEX
10136
            return WEX;
10137
          default:
10138
            return null;
10139
        }
10140
      }
10141
 
10142
      /**
10143
       * Find the _Fields constant that matches fieldId, throwing an exception
10144
       * if it is not found.
10145
       */
10146
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10147
        _Fields fields = findByThriftId(fieldId);
10148
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10149
        return fields;
10150
      }
10151
 
10152
      /**
10153
       * Find the _Fields constant that matches name, or null if its not found.
10154
       */
10155
      public static _Fields findByName(String name) {
10156
        return byName.get(name);
10157
      }
10158
 
10159
      private final short _thriftId;
10160
      private final String _fieldName;
10161
 
10162
      _Fields(short thriftId, String fieldName) {
10163
        _thriftId = thriftId;
10164
        _fieldName = fieldName;
10165
      }
10166
 
10167
      public short getThriftFieldId() {
10168
        return _thriftId;
10169
      }
10170
 
10171
      public String getFieldName() {
10172
        return _fieldName;
10173
      }
10174
    }
10175
 
10176
    // isset id assignments
10177
 
10178
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10179
    static {
10180
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10181
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10182
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
10183
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10184
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
10185
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10186
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromId_result.class, metaDataMap);
10187
    }
10188
 
10189
    public getInventoryItemFromId_result() {
10190
    }
10191
 
10192
    public getInventoryItemFromId_result(
10193
      InventoryItem success,
10194
      WarehouseServiceException wex)
10195
    {
10196
      this();
10197
      this.success = success;
10198
      this.wex = wex;
10199
    }
10200
 
10201
    /**
10202
     * Performs a deep copy on <i>other</i>.
10203
     */
10204
    public getInventoryItemFromId_result(getInventoryItemFromId_result other) {
10205
      if (other.isSetSuccess()) {
10206
        this.success = new InventoryItem(other.success);
10207
      }
10208
      if (other.isSetWex()) {
10209
        this.wex = new WarehouseServiceException(other.wex);
10210
      }
10211
    }
10212
 
10213
    public getInventoryItemFromId_result deepCopy() {
10214
      return new getInventoryItemFromId_result(this);
10215
    }
10216
 
10217
    @Override
10218
    public void clear() {
10219
      this.success = null;
10220
      this.wex = null;
10221
    }
10222
 
10223
    public InventoryItem getSuccess() {
10224
      return this.success;
10225
    }
10226
 
10227
    public void setSuccess(InventoryItem success) {
10228
      this.success = success;
10229
    }
10230
 
10231
    public void unsetSuccess() {
10232
      this.success = null;
10233
    }
10234
 
10235
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
10236
    public boolean isSetSuccess() {
10237
      return this.success != null;
10238
    }
10239
 
10240
    public void setSuccessIsSet(boolean value) {
10241
      if (!value) {
10242
        this.success = null;
10243
      }
10244
    }
10245
 
10246
    public WarehouseServiceException getWex() {
10247
      return this.wex;
10248
    }
10249
 
10250
    public void setWex(WarehouseServiceException wex) {
10251
      this.wex = wex;
10252
    }
10253
 
10254
    public void unsetWex() {
10255
      this.wex = null;
10256
    }
10257
 
10258
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
10259
    public boolean isSetWex() {
10260
      return this.wex != null;
10261
    }
10262
 
10263
    public void setWexIsSet(boolean value) {
10264
      if (!value) {
10265
        this.wex = null;
10266
      }
10267
    }
10268
 
10269
    public void setFieldValue(_Fields field, Object value) {
10270
      switch (field) {
10271
      case SUCCESS:
10272
        if (value == null) {
10273
          unsetSuccess();
10274
        } else {
10275
          setSuccess((InventoryItem)value);
10276
        }
10277
        break;
10278
 
10279
      case WEX:
10280
        if (value == null) {
10281
          unsetWex();
10282
        } else {
10283
          setWex((WarehouseServiceException)value);
10284
        }
10285
        break;
10286
 
10287
      }
10288
    }
10289
 
10290
    public Object getFieldValue(_Fields field) {
10291
      switch (field) {
10292
      case SUCCESS:
10293
        return getSuccess();
10294
 
10295
      case WEX:
10296
        return getWex();
10297
 
10298
      }
10299
      throw new IllegalStateException();
10300
    }
10301
 
10302
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10303
    public boolean isSet(_Fields field) {
10304
      if (field == null) {
10305
        throw new IllegalArgumentException();
10306
      }
10307
 
10308
      switch (field) {
10309
      case SUCCESS:
10310
        return isSetSuccess();
10311
      case WEX:
10312
        return isSetWex();
10313
      }
10314
      throw new IllegalStateException();
10315
    }
10316
 
10317
    @Override
10318
    public boolean equals(Object that) {
10319
      if (that == null)
10320
        return false;
10321
      if (that instanceof getInventoryItemFromId_result)
10322
        return this.equals((getInventoryItemFromId_result)that);
10323
      return false;
10324
    }
10325
 
10326
    public boolean equals(getInventoryItemFromId_result that) {
10327
      if (that == null)
10328
        return false;
10329
 
10330
      boolean this_present_success = true && this.isSetSuccess();
10331
      boolean that_present_success = true && that.isSetSuccess();
10332
      if (this_present_success || that_present_success) {
10333
        if (!(this_present_success && that_present_success))
10334
          return false;
10335
        if (!this.success.equals(that.success))
10336
          return false;
10337
      }
10338
 
10339
      boolean this_present_wex = true && this.isSetWex();
10340
      boolean that_present_wex = true && that.isSetWex();
10341
      if (this_present_wex || that_present_wex) {
10342
        if (!(this_present_wex && that_present_wex))
10343
          return false;
10344
        if (!this.wex.equals(that.wex))
10345
          return false;
10346
      }
10347
 
10348
      return true;
10349
    }
10350
 
10351
    @Override
10352
    public int hashCode() {
10353
      return 0;
10354
    }
10355
 
10356
    public int compareTo(getInventoryItemFromId_result other) {
10357
      if (!getClass().equals(other.getClass())) {
10358
        return getClass().getName().compareTo(other.getClass().getName());
10359
      }
10360
 
10361
      int lastComparison = 0;
10362
      getInventoryItemFromId_result typedOther = (getInventoryItemFromId_result)other;
10363
 
10364
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
10365
      if (lastComparison != 0) {
10366
        return lastComparison;
10367
      }
10368
      if (isSetSuccess()) {
10369
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
10370
        if (lastComparison != 0) {
10371
          return lastComparison;
10372
        }
10373
      }
10374
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
10375
      if (lastComparison != 0) {
10376
        return lastComparison;
10377
      }
10378
      if (isSetWex()) {
10379
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
10380
        if (lastComparison != 0) {
10381
          return lastComparison;
10382
        }
10383
      }
10384
      return 0;
10385
    }
10386
 
10387
    public _Fields fieldForId(int fieldId) {
10388
      return _Fields.findByThriftId(fieldId);
10389
    }
10390
 
10391
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10392
      org.apache.thrift.protocol.TField field;
10393
      iprot.readStructBegin();
10394
      while (true)
10395
      {
10396
        field = iprot.readFieldBegin();
10397
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10398
          break;
10399
        }
10400
        switch (field.id) {
10401
          case 0: // SUCCESS
10402
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10403
              this.success = new InventoryItem();
10404
              this.success.read(iprot);
10405
            } else { 
10406
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10407
            }
10408
            break;
10409
          case 1: // WEX
10410
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10411
              this.wex = new WarehouseServiceException();
10412
              this.wex.read(iprot);
10413
            } else { 
10414
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10415
            }
10416
            break;
10417
          default:
10418
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10419
        }
10420
        iprot.readFieldEnd();
10421
      }
10422
      iprot.readStructEnd();
10423
      validate();
10424
    }
10425
 
10426
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10427
      oprot.writeStructBegin(STRUCT_DESC);
10428
 
10429
      if (this.isSetSuccess()) {
10430
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10431
        this.success.write(oprot);
10432
        oprot.writeFieldEnd();
10433
      } else if (this.isSetWex()) {
10434
        oprot.writeFieldBegin(WEX_FIELD_DESC);
10435
        this.wex.write(oprot);
10436
        oprot.writeFieldEnd();
10437
      }
10438
      oprot.writeFieldStop();
10439
      oprot.writeStructEnd();
10440
    }
10441
 
10442
    @Override
10443
    public String toString() {
10444
      StringBuilder sb = new StringBuilder("getInventoryItemFromId_result(");
10445
      boolean first = true;
10446
 
10447
      sb.append("success:");
10448
      if (this.success == null) {
10449
        sb.append("null");
10450
      } else {
10451
        sb.append(this.success);
10452
      }
10453
      first = false;
10454
      if (!first) sb.append(", ");
10455
      sb.append("wex:");
10456
      if (this.wex == null) {
10457
        sb.append("null");
10458
      } else {
10459
        sb.append(this.wex);
10460
      }
10461
      first = false;
10462
      sb.append(")");
10463
      return sb.toString();
10464
    }
10465
 
10466
    public void validate() throws org.apache.thrift.TException {
10467
      // check for required fields
10468
    }
10469
 
10470
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10471
      try {
10472
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10473
      } catch (org.apache.thrift.TException te) {
10474
        throw new java.io.IOException(te);
10475
      }
10476
    }
10477
 
10478
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10479
      try {
10480
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10481
      } catch (org.apache.thrift.TException te) {
10482
        throw new java.io.IOException(te);
10483
      }
10484
    }
10485
 
10486
  }
10487
 
5372 mandeep.dh 10488
  public static class getPurchaseScans_args implements org.apache.thrift.TBase<getPurchaseScans_args, getPurchaseScans_args._Fields>, java.io.Serializable, Cloneable   {
10489
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseScans_args");
10490
 
10491
    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);
10492
    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);
10493
 
10494
    private long startDate; // required
10495
    private long endDate; // required
10496
 
10497
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10498
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10499
      START_DATE((short)1, "startDate"),
10500
      END_DATE((short)2, "endDate");
10501
 
10502
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10503
 
10504
      static {
10505
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10506
          byName.put(field.getFieldName(), field);
10507
        }
10508
      }
10509
 
10510
      /**
10511
       * Find the _Fields constant that matches fieldId, or null if its not found.
10512
       */
10513
      public static _Fields findByThriftId(int fieldId) {
10514
        switch(fieldId) {
10515
          case 1: // START_DATE
10516
            return START_DATE;
10517
          case 2: // END_DATE
10518
            return END_DATE;
10519
          default:
10520
            return null;
10521
        }
10522
      }
10523
 
10524
      /**
10525
       * Find the _Fields constant that matches fieldId, throwing an exception
10526
       * if it is not found.
10527
       */
10528
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10529
        _Fields fields = findByThriftId(fieldId);
10530
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10531
        return fields;
10532
      }
10533
 
10534
      /**
10535
       * Find the _Fields constant that matches name, or null if its not found.
10536
       */
10537
      public static _Fields findByName(String name) {
10538
        return byName.get(name);
10539
      }
10540
 
10541
      private final short _thriftId;
10542
      private final String _fieldName;
10543
 
10544
      _Fields(short thriftId, String fieldName) {
10545
        _thriftId = thriftId;
10546
        _fieldName = fieldName;
10547
      }
10548
 
10549
      public short getThriftFieldId() {
10550
        return _thriftId;
10551
      }
10552
 
10553
      public String getFieldName() {
10554
        return _fieldName;
10555
      }
10556
    }
10557
 
10558
    // isset id assignments
10559
    private static final int __STARTDATE_ISSET_ID = 0;
10560
    private static final int __ENDDATE_ISSET_ID = 1;
10561
    private BitSet __isset_bit_vector = new BitSet(2);
10562
 
10563
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10564
    static {
10565
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10566
      tmpMap.put(_Fields.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10567
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10568
      tmpMap.put(_Fields.END_DATE, new org.apache.thrift.meta_data.FieldMetaData("endDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10569
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10570
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10571
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseScans_args.class, metaDataMap);
10572
    }
10573
 
10574
    public getPurchaseScans_args() {
10575
    }
10576
 
10577
    public getPurchaseScans_args(
10578
      long startDate,
10579
      long endDate)
10580
    {
10581
      this();
10582
      this.startDate = startDate;
10583
      setStartDateIsSet(true);
10584
      this.endDate = endDate;
10585
      setEndDateIsSet(true);
10586
    }
10587
 
10588
    /**
10589
     * Performs a deep copy on <i>other</i>.
10590
     */
10591
    public getPurchaseScans_args(getPurchaseScans_args other) {
10592
      __isset_bit_vector.clear();
10593
      __isset_bit_vector.or(other.__isset_bit_vector);
10594
      this.startDate = other.startDate;
10595
      this.endDate = other.endDate;
10596
    }
10597
 
10598
    public getPurchaseScans_args deepCopy() {
10599
      return new getPurchaseScans_args(this);
10600
    }
10601
 
10602
    @Override
10603
    public void clear() {
10604
      setStartDateIsSet(false);
10605
      this.startDate = 0;
10606
      setEndDateIsSet(false);
10607
      this.endDate = 0;
10608
    }
10609
 
10610
    public long getStartDate() {
10611
      return this.startDate;
10612
    }
10613
 
10614
    public void setStartDate(long startDate) {
10615
      this.startDate = startDate;
10616
      setStartDateIsSet(true);
10617
    }
10618
 
10619
    public void unsetStartDate() {
10620
      __isset_bit_vector.clear(__STARTDATE_ISSET_ID);
10621
    }
10622
 
10623
    /** Returns true if field startDate is set (has been assigned a value) and false otherwise */
10624
    public boolean isSetStartDate() {
10625
      return __isset_bit_vector.get(__STARTDATE_ISSET_ID);
10626
    }
10627
 
10628
    public void setStartDateIsSet(boolean value) {
10629
      __isset_bit_vector.set(__STARTDATE_ISSET_ID, value);
10630
    }
10631
 
10632
    public long getEndDate() {
10633
      return this.endDate;
10634
    }
10635
 
10636
    public void setEndDate(long endDate) {
10637
      this.endDate = endDate;
10638
      setEndDateIsSet(true);
10639
    }
10640
 
10641
    public void unsetEndDate() {
10642
      __isset_bit_vector.clear(__ENDDATE_ISSET_ID);
10643
    }
10644
 
10645
    /** Returns true if field endDate is set (has been assigned a value) and false otherwise */
10646
    public boolean isSetEndDate() {
10647
      return __isset_bit_vector.get(__ENDDATE_ISSET_ID);
10648
    }
10649
 
10650
    public void setEndDateIsSet(boolean value) {
10651
      __isset_bit_vector.set(__ENDDATE_ISSET_ID, value);
10652
    }
10653
 
10654
    public void setFieldValue(_Fields field, Object value) {
10655
      switch (field) {
10656
      case START_DATE:
10657
        if (value == null) {
10658
          unsetStartDate();
10659
        } else {
10660
          setStartDate((Long)value);
10661
        }
10662
        break;
10663
 
10664
      case END_DATE:
10665
        if (value == null) {
10666
          unsetEndDate();
10667
        } else {
10668
          setEndDate((Long)value);
10669
        }
10670
        break;
10671
 
10672
      }
10673
    }
10674
 
10675
    public Object getFieldValue(_Fields field) {
10676
      switch (field) {
10677
      case START_DATE:
10678
        return Long.valueOf(getStartDate());
10679
 
10680
      case END_DATE:
10681
        return Long.valueOf(getEndDate());
10682
 
10683
      }
10684
      throw new IllegalStateException();
10685
    }
10686
 
10687
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10688
    public boolean isSet(_Fields field) {
10689
      if (field == null) {
10690
        throw new IllegalArgumentException();
10691
      }
10692
 
10693
      switch (field) {
10694
      case START_DATE:
10695
        return isSetStartDate();
10696
      case END_DATE:
10697
        return isSetEndDate();
10698
      }
10699
      throw new IllegalStateException();
10700
    }
10701
 
10702
    @Override
10703
    public boolean equals(Object that) {
10704
      if (that == null)
10705
        return false;
10706
      if (that instanceof getPurchaseScans_args)
10707
        return this.equals((getPurchaseScans_args)that);
10708
      return false;
10709
    }
10710
 
10711
    public boolean equals(getPurchaseScans_args that) {
10712
      if (that == null)
10713
        return false;
10714
 
10715
      boolean this_present_startDate = true;
10716
      boolean that_present_startDate = true;
10717
      if (this_present_startDate || that_present_startDate) {
10718
        if (!(this_present_startDate && that_present_startDate))
10719
          return false;
10720
        if (this.startDate != that.startDate)
10721
          return false;
10722
      }
10723
 
10724
      boolean this_present_endDate = true;
10725
      boolean that_present_endDate = true;
10726
      if (this_present_endDate || that_present_endDate) {
10727
        if (!(this_present_endDate && that_present_endDate))
10728
          return false;
10729
        if (this.endDate != that.endDate)
10730
          return false;
10731
      }
10732
 
10733
      return true;
10734
    }
10735
 
10736
    @Override
10737
    public int hashCode() {
10738
      return 0;
10739
    }
10740
 
10741
    public int compareTo(getPurchaseScans_args other) {
10742
      if (!getClass().equals(other.getClass())) {
10743
        return getClass().getName().compareTo(other.getClass().getName());
10744
      }
10745
 
10746
      int lastComparison = 0;
10747
      getPurchaseScans_args typedOther = (getPurchaseScans_args)other;
10748
 
10749
      lastComparison = Boolean.valueOf(isSetStartDate()).compareTo(typedOther.isSetStartDate());
10750
      if (lastComparison != 0) {
10751
        return lastComparison;
10752
      }
10753
      if (isSetStartDate()) {
10754
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startDate, typedOther.startDate);
10755
        if (lastComparison != 0) {
10756
          return lastComparison;
10757
        }
10758
      }
10759
      lastComparison = Boolean.valueOf(isSetEndDate()).compareTo(typedOther.isSetEndDate());
10760
      if (lastComparison != 0) {
10761
        return lastComparison;
10762
      }
10763
      if (isSetEndDate()) {
10764
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endDate, typedOther.endDate);
10765
        if (lastComparison != 0) {
10766
          return lastComparison;
10767
        }
10768
      }
10769
      return 0;
10770
    }
10771
 
10772
    public _Fields fieldForId(int fieldId) {
10773
      return _Fields.findByThriftId(fieldId);
10774
    }
10775
 
10776
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10777
      org.apache.thrift.protocol.TField field;
10778
      iprot.readStructBegin();
10779
      while (true)
10780
      {
10781
        field = iprot.readFieldBegin();
10782
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10783
          break;
10784
        }
10785
        switch (field.id) {
10786
          case 1: // START_DATE
10787
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10788
              this.startDate = iprot.readI64();
10789
              setStartDateIsSet(true);
10790
            } else { 
10791
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10792
            }
10793
            break;
10794
          case 2: // END_DATE
10795
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10796
              this.endDate = iprot.readI64();
10797
              setEndDateIsSet(true);
10798
            } else { 
10799
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10800
            }
10801
            break;
10802
          default:
10803
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10804
        }
10805
        iprot.readFieldEnd();
10806
      }
10807
      iprot.readStructEnd();
10808
      validate();
10809
    }
10810
 
10811
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10812
      validate();
10813
 
10814
      oprot.writeStructBegin(STRUCT_DESC);
10815
      oprot.writeFieldBegin(START_DATE_FIELD_DESC);
10816
      oprot.writeI64(this.startDate);
10817
      oprot.writeFieldEnd();
10818
      oprot.writeFieldBegin(END_DATE_FIELD_DESC);
10819
      oprot.writeI64(this.endDate);
10820
      oprot.writeFieldEnd();
10821
      oprot.writeFieldStop();
10822
      oprot.writeStructEnd();
10823
    }
10824
 
10825
    @Override
10826
    public String toString() {
10827
      StringBuilder sb = new StringBuilder("getPurchaseScans_args(");
10828
      boolean first = true;
10829
 
10830
      sb.append("startDate:");
10831
      sb.append(this.startDate);
10832
      first = false;
10833
      if (!first) sb.append(", ");
10834
      sb.append("endDate:");
10835
      sb.append(this.endDate);
10836
      first = false;
10837
      sb.append(")");
10838
      return sb.toString();
10839
    }
10840
 
10841
    public void validate() throws org.apache.thrift.TException {
10842
      // check for required fields
10843
    }
10844
 
10845
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10846
      try {
10847
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10848
      } catch (org.apache.thrift.TException te) {
10849
        throw new java.io.IOException(te);
10850
      }
10851
    }
10852
 
10853
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10854
      try {
10855
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
10856
        __isset_bit_vector = new BitSet(1);
10857
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10858
      } catch (org.apache.thrift.TException te) {
10859
        throw new java.io.IOException(te);
10860
      }
10861
    }
10862
 
10863
  }
10864
 
10865
  public static class getPurchaseScans_result implements org.apache.thrift.TBase<getPurchaseScans_result, getPurchaseScans_result._Fields>, java.io.Serializable, Cloneable   {
10866
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseScans_result");
10867
 
10868
    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);
10869
 
10870
    private List<DetailedPurchaseScan> success; // required
10871
 
10872
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10873
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10874
      SUCCESS((short)0, "success");
10875
 
10876
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10877
 
10878
      static {
10879
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10880
          byName.put(field.getFieldName(), field);
10881
        }
10882
      }
10883
 
10884
      /**
10885
       * Find the _Fields constant that matches fieldId, or null if its not found.
10886
       */
10887
      public static _Fields findByThriftId(int fieldId) {
10888
        switch(fieldId) {
10889
          case 0: // SUCCESS
10890
            return SUCCESS;
10891
          default:
10892
            return null;
10893
        }
10894
      }
10895
 
10896
      /**
10897
       * Find the _Fields constant that matches fieldId, throwing an exception
10898
       * if it is not found.
10899
       */
10900
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10901
        _Fields fields = findByThriftId(fieldId);
10902
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10903
        return fields;
10904
      }
10905
 
10906
      /**
10907
       * Find the _Fields constant that matches name, or null if its not found.
10908
       */
10909
      public static _Fields findByName(String name) {
10910
        return byName.get(name);
10911
      }
10912
 
10913
      private final short _thriftId;
10914
      private final String _fieldName;
10915
 
10916
      _Fields(short thriftId, String fieldName) {
10917
        _thriftId = thriftId;
10918
        _fieldName = fieldName;
10919
      }
10920
 
10921
      public short getThriftFieldId() {
10922
        return _thriftId;
10923
      }
10924
 
10925
      public String getFieldName() {
10926
        return _fieldName;
10927
      }
10928
    }
10929
 
10930
    // isset id assignments
10931
 
10932
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10933
    static {
10934
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10935
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10936
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
10937
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DetailedPurchaseScan.class))));
10938
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10939
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseScans_result.class, metaDataMap);
10940
    }
10941
 
10942
    public getPurchaseScans_result() {
10943
    }
10944
 
10945
    public getPurchaseScans_result(
10946
      List<DetailedPurchaseScan> success)
10947
    {
10948
      this();
10949
      this.success = success;
10950
    }
10951
 
10952
    /**
10953
     * Performs a deep copy on <i>other</i>.
10954
     */
10955
    public getPurchaseScans_result(getPurchaseScans_result other) {
10956
      if (other.isSetSuccess()) {
10957
        List<DetailedPurchaseScan> __this__success = new ArrayList<DetailedPurchaseScan>();
10958
        for (DetailedPurchaseScan other_element : other.success) {
10959
          __this__success.add(new DetailedPurchaseScan(other_element));
10960
        }
10961
        this.success = __this__success;
10962
      }
10963
    }
10964
 
10965
    public getPurchaseScans_result deepCopy() {
10966
      return new getPurchaseScans_result(this);
10967
    }
10968
 
10969
    @Override
10970
    public void clear() {
10971
      this.success = null;
10972
    }
10973
 
10974
    public int getSuccessSize() {
10975
      return (this.success == null) ? 0 : this.success.size();
10976
    }
10977
 
10978
    public java.util.Iterator<DetailedPurchaseScan> getSuccessIterator() {
10979
      return (this.success == null) ? null : this.success.iterator();
10980
    }
10981
 
10982
    public void addToSuccess(DetailedPurchaseScan elem) {
10983
      if (this.success == null) {
10984
        this.success = new ArrayList<DetailedPurchaseScan>();
10985
      }
10986
      this.success.add(elem);
10987
    }
10988
 
10989
    public List<DetailedPurchaseScan> getSuccess() {
10990
      return this.success;
10991
    }
10992
 
10993
    public void setSuccess(List<DetailedPurchaseScan> success) {
10994
      this.success = success;
10995
    }
10996
 
10997
    public void unsetSuccess() {
10998
      this.success = null;
10999
    }
11000
 
11001
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
11002
    public boolean isSetSuccess() {
11003
      return this.success != null;
11004
    }
11005
 
11006
    public void setSuccessIsSet(boolean value) {
11007
      if (!value) {
11008
        this.success = null;
11009
      }
11010
    }
11011
 
11012
    public void setFieldValue(_Fields field, Object value) {
11013
      switch (field) {
11014
      case SUCCESS:
11015
        if (value == null) {
11016
          unsetSuccess();
11017
        } else {
11018
          setSuccess((List<DetailedPurchaseScan>)value);
11019
        }
11020
        break;
11021
 
11022
      }
11023
    }
11024
 
11025
    public Object getFieldValue(_Fields field) {
11026
      switch (field) {
11027
      case SUCCESS:
11028
        return getSuccess();
11029
 
11030
      }
11031
      throw new IllegalStateException();
11032
    }
11033
 
11034
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11035
    public boolean isSet(_Fields field) {
11036
      if (field == null) {
11037
        throw new IllegalArgumentException();
11038
      }
11039
 
11040
      switch (field) {
11041
      case SUCCESS:
11042
        return isSetSuccess();
11043
      }
11044
      throw new IllegalStateException();
11045
    }
11046
 
11047
    @Override
11048
    public boolean equals(Object that) {
11049
      if (that == null)
11050
        return false;
11051
      if (that instanceof getPurchaseScans_result)
11052
        return this.equals((getPurchaseScans_result)that);
11053
      return false;
11054
    }
11055
 
11056
    public boolean equals(getPurchaseScans_result that) {
11057
      if (that == null)
11058
        return false;
11059
 
11060
      boolean this_present_success = true && this.isSetSuccess();
11061
      boolean that_present_success = true && that.isSetSuccess();
11062
      if (this_present_success || that_present_success) {
11063
        if (!(this_present_success && that_present_success))
11064
          return false;
11065
        if (!this.success.equals(that.success))
11066
          return false;
11067
      }
11068
 
11069
      return true;
11070
    }
11071
 
11072
    @Override
11073
    public int hashCode() {
11074
      return 0;
11075
    }
11076
 
11077
    public int compareTo(getPurchaseScans_result other) {
11078
      if (!getClass().equals(other.getClass())) {
11079
        return getClass().getName().compareTo(other.getClass().getName());
11080
      }
11081
 
11082
      int lastComparison = 0;
11083
      getPurchaseScans_result typedOther = (getPurchaseScans_result)other;
11084
 
11085
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
11086
      if (lastComparison != 0) {
11087
        return lastComparison;
11088
      }
11089
      if (isSetSuccess()) {
11090
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
11091
        if (lastComparison != 0) {
11092
          return lastComparison;
11093
        }
11094
      }
11095
      return 0;
11096
    }
11097
 
11098
    public _Fields fieldForId(int fieldId) {
11099
      return _Fields.findByThriftId(fieldId);
11100
    }
11101
 
11102
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11103
      org.apache.thrift.protocol.TField field;
11104
      iprot.readStructBegin();
11105
      while (true)
11106
      {
11107
        field = iprot.readFieldBegin();
11108
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11109
          break;
11110
        }
11111
        switch (field.id) {
11112
          case 0: // SUCCESS
11113
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
11114
              {
11115
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
11116
                this.success = new ArrayList<DetailedPurchaseScan>(_list12.size);
11117
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
11118
                {
11119
                  DetailedPurchaseScan _elem14; // required
11120
                  _elem14 = new DetailedPurchaseScan();
11121
                  _elem14.read(iprot);
11122
                  this.success.add(_elem14);
11123
                }
11124
                iprot.readListEnd();
11125
              }
11126
            } else { 
11127
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11128
            }
11129
            break;
11130
          default:
11131
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11132
        }
11133
        iprot.readFieldEnd();
11134
      }
11135
      iprot.readStructEnd();
11136
      validate();
11137
    }
11138
 
11139
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11140
      oprot.writeStructBegin(STRUCT_DESC);
11141
 
11142
      if (this.isSetSuccess()) {
11143
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11144
        {
11145
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
11146
          for (DetailedPurchaseScan _iter15 : this.success)
11147
          {
11148
            _iter15.write(oprot);
11149
          }
11150
          oprot.writeListEnd();
11151
        }
11152
        oprot.writeFieldEnd();
11153
      }
11154
      oprot.writeFieldStop();
11155
      oprot.writeStructEnd();
11156
    }
11157
 
11158
    @Override
11159
    public String toString() {
11160
      StringBuilder sb = new StringBuilder("getPurchaseScans_result(");
11161
      boolean first = true;
11162
 
11163
      sb.append("success:");
11164
      if (this.success == null) {
11165
        sb.append("null");
11166
      } else {
11167
        sb.append(this.success);
11168
      }
11169
      first = false;
11170
      sb.append(")");
11171
      return sb.toString();
11172
    }
11173
 
11174
    public void validate() throws org.apache.thrift.TException {
11175
      // check for required fields
11176
    }
11177
 
11178
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11179
      try {
11180
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11181
      } catch (org.apache.thrift.TException te) {
11182
        throw new java.io.IOException(te);
11183
      }
11184
    }
11185
 
11186
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11187
      try {
11188
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11189
      } catch (org.apache.thrift.TException te) {
11190
        throw new java.io.IOException(te);
11191
      }
11192
    }
11193
 
11194
  }
11195
 
7210 amar.kumar 11196
  public static class getPurchaseScansByGrnDate_args implements org.apache.thrift.TBase<getPurchaseScansByGrnDate_args, getPurchaseScansByGrnDate_args._Fields>, java.io.Serializable, Cloneable   {
11197
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseScansByGrnDate_args");
11198
 
11199
    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);
11200
    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);
11201
 
11202
    private long startDate; // required
11203
    private long endDate; // required
11204
 
11205
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11206
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11207
      START_DATE((short)1, "startDate"),
11208
      END_DATE((short)2, "endDate");
11209
 
11210
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11211
 
11212
      static {
11213
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11214
          byName.put(field.getFieldName(), field);
11215
        }
11216
      }
11217
 
11218
      /**
11219
       * Find the _Fields constant that matches fieldId, or null if its not found.
11220
       */
11221
      public static _Fields findByThriftId(int fieldId) {
11222
        switch(fieldId) {
11223
          case 1: // START_DATE
11224
            return START_DATE;
11225
          case 2: // END_DATE
11226
            return END_DATE;
11227
          default:
11228
            return null;
11229
        }
11230
      }
11231
 
11232
      /**
11233
       * Find the _Fields constant that matches fieldId, throwing an exception
11234
       * if it is not found.
11235
       */
11236
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11237
        _Fields fields = findByThriftId(fieldId);
11238
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11239
        return fields;
11240
      }
11241
 
11242
      /**
11243
       * Find the _Fields constant that matches name, or null if its not found.
11244
       */
11245
      public static _Fields findByName(String name) {
11246
        return byName.get(name);
11247
      }
11248
 
11249
      private final short _thriftId;
11250
      private final String _fieldName;
11251
 
11252
      _Fields(short thriftId, String fieldName) {
11253
        _thriftId = thriftId;
11254
        _fieldName = fieldName;
11255
      }
11256
 
11257
      public short getThriftFieldId() {
11258
        return _thriftId;
11259
      }
11260
 
11261
      public String getFieldName() {
11262
        return _fieldName;
11263
      }
11264
    }
11265
 
11266
    // isset id assignments
11267
    private static final int __STARTDATE_ISSET_ID = 0;
11268
    private static final int __ENDDATE_ISSET_ID = 1;
11269
    private BitSet __isset_bit_vector = new BitSet(2);
11270
 
11271
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11272
    static {
11273
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11274
      tmpMap.put(_Fields.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11275
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11276
      tmpMap.put(_Fields.END_DATE, new org.apache.thrift.meta_data.FieldMetaData("endDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11277
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11278
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11279
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseScansByGrnDate_args.class, metaDataMap);
11280
    }
11281
 
11282
    public getPurchaseScansByGrnDate_args() {
11283
    }
11284
 
11285
    public getPurchaseScansByGrnDate_args(
11286
      long startDate,
11287
      long endDate)
11288
    {
11289
      this();
11290
      this.startDate = startDate;
11291
      setStartDateIsSet(true);
11292
      this.endDate = endDate;
11293
      setEndDateIsSet(true);
11294
    }
11295
 
11296
    /**
11297
     * Performs a deep copy on <i>other</i>.
11298
     */
11299
    public getPurchaseScansByGrnDate_args(getPurchaseScansByGrnDate_args other) {
11300
      __isset_bit_vector.clear();
11301
      __isset_bit_vector.or(other.__isset_bit_vector);
11302
      this.startDate = other.startDate;
11303
      this.endDate = other.endDate;
11304
    }
11305
 
11306
    public getPurchaseScansByGrnDate_args deepCopy() {
11307
      return new getPurchaseScansByGrnDate_args(this);
11308
    }
11309
 
11310
    @Override
11311
    public void clear() {
11312
      setStartDateIsSet(false);
11313
      this.startDate = 0;
11314
      setEndDateIsSet(false);
11315
      this.endDate = 0;
11316
    }
11317
 
11318
    public long getStartDate() {
11319
      return this.startDate;
11320
    }
11321
 
11322
    public void setStartDate(long startDate) {
11323
      this.startDate = startDate;
11324
      setStartDateIsSet(true);
11325
    }
11326
 
11327
    public void unsetStartDate() {
11328
      __isset_bit_vector.clear(__STARTDATE_ISSET_ID);
11329
    }
11330
 
11331
    /** Returns true if field startDate is set (has been assigned a value) and false otherwise */
11332
    public boolean isSetStartDate() {
11333
      return __isset_bit_vector.get(__STARTDATE_ISSET_ID);
11334
    }
11335
 
11336
    public void setStartDateIsSet(boolean value) {
11337
      __isset_bit_vector.set(__STARTDATE_ISSET_ID, value);
11338
    }
11339
 
11340
    public long getEndDate() {
11341
      return this.endDate;
11342
    }
11343
 
11344
    public void setEndDate(long endDate) {
11345
      this.endDate = endDate;
11346
      setEndDateIsSet(true);
11347
    }
11348
 
11349
    public void unsetEndDate() {
11350
      __isset_bit_vector.clear(__ENDDATE_ISSET_ID);
11351
    }
11352
 
11353
    /** Returns true if field endDate is set (has been assigned a value) and false otherwise */
11354
    public boolean isSetEndDate() {
11355
      return __isset_bit_vector.get(__ENDDATE_ISSET_ID);
11356
    }
11357
 
11358
    public void setEndDateIsSet(boolean value) {
11359
      __isset_bit_vector.set(__ENDDATE_ISSET_ID, value);
11360
    }
11361
 
11362
    public void setFieldValue(_Fields field, Object value) {
11363
      switch (field) {
11364
      case START_DATE:
11365
        if (value == null) {
11366
          unsetStartDate();
11367
        } else {
11368
          setStartDate((Long)value);
11369
        }
11370
        break;
11371
 
11372
      case END_DATE:
11373
        if (value == null) {
11374
          unsetEndDate();
11375
        } else {
11376
          setEndDate((Long)value);
11377
        }
11378
        break;
11379
 
11380
      }
11381
    }
11382
 
11383
    public Object getFieldValue(_Fields field) {
11384
      switch (field) {
11385
      case START_DATE:
11386
        return Long.valueOf(getStartDate());
11387
 
11388
      case END_DATE:
11389
        return Long.valueOf(getEndDate());
11390
 
11391
      }
11392
      throw new IllegalStateException();
11393
    }
11394
 
11395
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11396
    public boolean isSet(_Fields field) {
11397
      if (field == null) {
11398
        throw new IllegalArgumentException();
11399
      }
11400
 
11401
      switch (field) {
11402
      case START_DATE:
11403
        return isSetStartDate();
11404
      case END_DATE:
11405
        return isSetEndDate();
11406
      }
11407
      throw new IllegalStateException();
11408
    }
11409
 
11410
    @Override
11411
    public boolean equals(Object that) {
11412
      if (that == null)
11413
        return false;
11414
      if (that instanceof getPurchaseScansByGrnDate_args)
11415
        return this.equals((getPurchaseScansByGrnDate_args)that);
11416
      return false;
11417
    }
11418
 
11419
    public boolean equals(getPurchaseScansByGrnDate_args that) {
11420
      if (that == null)
11421
        return false;
11422
 
11423
      boolean this_present_startDate = true;
11424
      boolean that_present_startDate = true;
11425
      if (this_present_startDate || that_present_startDate) {
11426
        if (!(this_present_startDate && that_present_startDate))
11427
          return false;
11428
        if (this.startDate != that.startDate)
11429
          return false;
11430
      }
11431
 
11432
      boolean this_present_endDate = true;
11433
      boolean that_present_endDate = true;
11434
      if (this_present_endDate || that_present_endDate) {
11435
        if (!(this_present_endDate && that_present_endDate))
11436
          return false;
11437
        if (this.endDate != that.endDate)
11438
          return false;
11439
      }
11440
 
11441
      return true;
11442
    }
11443
 
11444
    @Override
11445
    public int hashCode() {
11446
      return 0;
11447
    }
11448
 
11449
    public int compareTo(getPurchaseScansByGrnDate_args other) {
11450
      if (!getClass().equals(other.getClass())) {
11451
        return getClass().getName().compareTo(other.getClass().getName());
11452
      }
11453
 
11454
      int lastComparison = 0;
11455
      getPurchaseScansByGrnDate_args typedOther = (getPurchaseScansByGrnDate_args)other;
11456
 
11457
      lastComparison = Boolean.valueOf(isSetStartDate()).compareTo(typedOther.isSetStartDate());
11458
      if (lastComparison != 0) {
11459
        return lastComparison;
11460
      }
11461
      if (isSetStartDate()) {
11462
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startDate, typedOther.startDate);
11463
        if (lastComparison != 0) {
11464
          return lastComparison;
11465
        }
11466
      }
11467
      lastComparison = Boolean.valueOf(isSetEndDate()).compareTo(typedOther.isSetEndDate());
11468
      if (lastComparison != 0) {
11469
        return lastComparison;
11470
      }
11471
      if (isSetEndDate()) {
11472
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endDate, typedOther.endDate);
11473
        if (lastComparison != 0) {
11474
          return lastComparison;
11475
        }
11476
      }
11477
      return 0;
11478
    }
11479
 
11480
    public _Fields fieldForId(int fieldId) {
11481
      return _Fields.findByThriftId(fieldId);
11482
    }
11483
 
11484
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11485
      org.apache.thrift.protocol.TField field;
11486
      iprot.readStructBegin();
11487
      while (true)
11488
      {
11489
        field = iprot.readFieldBegin();
11490
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11491
          break;
11492
        }
11493
        switch (field.id) {
11494
          case 1: // START_DATE
11495
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11496
              this.startDate = iprot.readI64();
11497
              setStartDateIsSet(true);
11498
            } else { 
11499
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11500
            }
11501
            break;
11502
          case 2: // END_DATE
11503
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11504
              this.endDate = iprot.readI64();
11505
              setEndDateIsSet(true);
11506
            } else { 
11507
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11508
            }
11509
            break;
11510
          default:
11511
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11512
        }
11513
        iprot.readFieldEnd();
11514
      }
11515
      iprot.readStructEnd();
11516
      validate();
11517
    }
11518
 
11519
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11520
      validate();
11521
 
11522
      oprot.writeStructBegin(STRUCT_DESC);
11523
      oprot.writeFieldBegin(START_DATE_FIELD_DESC);
11524
      oprot.writeI64(this.startDate);
11525
      oprot.writeFieldEnd();
11526
      oprot.writeFieldBegin(END_DATE_FIELD_DESC);
11527
      oprot.writeI64(this.endDate);
11528
      oprot.writeFieldEnd();
11529
      oprot.writeFieldStop();
11530
      oprot.writeStructEnd();
11531
    }
11532
 
11533
    @Override
11534
    public String toString() {
11535
      StringBuilder sb = new StringBuilder("getPurchaseScansByGrnDate_args(");
11536
      boolean first = true;
11537
 
11538
      sb.append("startDate:");
11539
      sb.append(this.startDate);
11540
      first = false;
11541
      if (!first) sb.append(", ");
11542
      sb.append("endDate:");
11543
      sb.append(this.endDate);
11544
      first = false;
11545
      sb.append(")");
11546
      return sb.toString();
11547
    }
11548
 
11549
    public void validate() throws org.apache.thrift.TException {
11550
      // check for required fields
11551
    }
11552
 
11553
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11554
      try {
11555
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11556
      } catch (org.apache.thrift.TException te) {
11557
        throw new java.io.IOException(te);
11558
      }
11559
    }
11560
 
11561
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11562
      try {
11563
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
11564
        __isset_bit_vector = new BitSet(1);
11565
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11566
      } catch (org.apache.thrift.TException te) {
11567
        throw new java.io.IOException(te);
11568
      }
11569
    }
11570
 
11571
  }
11572
 
11573
  public static class getPurchaseScansByGrnDate_result implements org.apache.thrift.TBase<getPurchaseScansByGrnDate_result, getPurchaseScansByGrnDate_result._Fields>, java.io.Serializable, Cloneable   {
11574
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseScansByGrnDate_result");
11575
 
11576
    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);
11577
 
11578
    private List<DetailedPurchaseScan> success; // required
11579
 
11580
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11581
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11582
      SUCCESS((short)0, "success");
11583
 
11584
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11585
 
11586
      static {
11587
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11588
          byName.put(field.getFieldName(), field);
11589
        }
11590
      }
11591
 
11592
      /**
11593
       * Find the _Fields constant that matches fieldId, or null if its not found.
11594
       */
11595
      public static _Fields findByThriftId(int fieldId) {
11596
        switch(fieldId) {
11597
          case 0: // SUCCESS
11598
            return SUCCESS;
11599
          default:
11600
            return null;
11601
        }
11602
      }
11603
 
11604
      /**
11605
       * Find the _Fields constant that matches fieldId, throwing an exception
11606
       * if it is not found.
11607
       */
11608
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11609
        _Fields fields = findByThriftId(fieldId);
11610
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11611
        return fields;
11612
      }
11613
 
11614
      /**
11615
       * Find the _Fields constant that matches name, or null if its not found.
11616
       */
11617
      public static _Fields findByName(String name) {
11618
        return byName.get(name);
11619
      }
11620
 
11621
      private final short _thriftId;
11622
      private final String _fieldName;
11623
 
11624
      _Fields(short thriftId, String fieldName) {
11625
        _thriftId = thriftId;
11626
        _fieldName = fieldName;
11627
      }
11628
 
11629
      public short getThriftFieldId() {
11630
        return _thriftId;
11631
      }
11632
 
11633
      public String getFieldName() {
11634
        return _fieldName;
11635
      }
11636
    }
11637
 
11638
    // isset id assignments
11639
 
11640
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11641
    static {
11642
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11643
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11644
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
11645
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DetailedPurchaseScan.class))));
11646
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11647
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseScansByGrnDate_result.class, metaDataMap);
11648
    }
11649
 
11650
    public getPurchaseScansByGrnDate_result() {
11651
    }
11652
 
11653
    public getPurchaseScansByGrnDate_result(
11654
      List<DetailedPurchaseScan> success)
11655
    {
11656
      this();
11657
      this.success = success;
11658
    }
11659
 
11660
    /**
11661
     * Performs a deep copy on <i>other</i>.
11662
     */
11663
    public getPurchaseScansByGrnDate_result(getPurchaseScansByGrnDate_result other) {
11664
      if (other.isSetSuccess()) {
11665
        List<DetailedPurchaseScan> __this__success = new ArrayList<DetailedPurchaseScan>();
11666
        for (DetailedPurchaseScan other_element : other.success) {
11667
          __this__success.add(new DetailedPurchaseScan(other_element));
11668
        }
11669
        this.success = __this__success;
11670
      }
11671
    }
11672
 
11673
    public getPurchaseScansByGrnDate_result deepCopy() {
11674
      return new getPurchaseScansByGrnDate_result(this);
11675
    }
11676
 
11677
    @Override
11678
    public void clear() {
11679
      this.success = null;
11680
    }
11681
 
11682
    public int getSuccessSize() {
11683
      return (this.success == null) ? 0 : this.success.size();
11684
    }
11685
 
11686
    public java.util.Iterator<DetailedPurchaseScan> getSuccessIterator() {
11687
      return (this.success == null) ? null : this.success.iterator();
11688
    }
11689
 
11690
    public void addToSuccess(DetailedPurchaseScan elem) {
11691
      if (this.success == null) {
11692
        this.success = new ArrayList<DetailedPurchaseScan>();
11693
      }
11694
      this.success.add(elem);
11695
    }
11696
 
11697
    public List<DetailedPurchaseScan> getSuccess() {
11698
      return this.success;
11699
    }
11700
 
11701
    public void setSuccess(List<DetailedPurchaseScan> success) {
11702
      this.success = success;
11703
    }
11704
 
11705
    public void unsetSuccess() {
11706
      this.success = null;
11707
    }
11708
 
11709
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
11710
    public boolean isSetSuccess() {
11711
      return this.success != null;
11712
    }
11713
 
11714
    public void setSuccessIsSet(boolean value) {
11715
      if (!value) {
11716
        this.success = null;
11717
      }
11718
    }
11719
 
11720
    public void setFieldValue(_Fields field, Object value) {
11721
      switch (field) {
11722
      case SUCCESS:
11723
        if (value == null) {
11724
          unsetSuccess();
11725
        } else {
11726
          setSuccess((List<DetailedPurchaseScan>)value);
11727
        }
11728
        break;
11729
 
11730
      }
11731
    }
11732
 
11733
    public Object getFieldValue(_Fields field) {
11734
      switch (field) {
11735
      case SUCCESS:
11736
        return getSuccess();
11737
 
11738
      }
11739
      throw new IllegalStateException();
11740
    }
11741
 
11742
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11743
    public boolean isSet(_Fields field) {
11744
      if (field == null) {
11745
        throw new IllegalArgumentException();
11746
      }
11747
 
11748
      switch (field) {
11749
      case SUCCESS:
11750
        return isSetSuccess();
11751
      }
11752
      throw new IllegalStateException();
11753
    }
11754
 
11755
    @Override
11756
    public boolean equals(Object that) {
11757
      if (that == null)
11758
        return false;
11759
      if (that instanceof getPurchaseScansByGrnDate_result)
11760
        return this.equals((getPurchaseScansByGrnDate_result)that);
11761
      return false;
11762
    }
11763
 
11764
    public boolean equals(getPurchaseScansByGrnDate_result that) {
11765
      if (that == null)
11766
        return false;
11767
 
11768
      boolean this_present_success = true && this.isSetSuccess();
11769
      boolean that_present_success = true && that.isSetSuccess();
11770
      if (this_present_success || that_present_success) {
11771
        if (!(this_present_success && that_present_success))
11772
          return false;
11773
        if (!this.success.equals(that.success))
11774
          return false;
11775
      }
11776
 
11777
      return true;
11778
    }
11779
 
11780
    @Override
11781
    public int hashCode() {
11782
      return 0;
11783
    }
11784
 
11785
    public int compareTo(getPurchaseScansByGrnDate_result other) {
11786
      if (!getClass().equals(other.getClass())) {
11787
        return getClass().getName().compareTo(other.getClass().getName());
11788
      }
11789
 
11790
      int lastComparison = 0;
11791
      getPurchaseScansByGrnDate_result typedOther = (getPurchaseScansByGrnDate_result)other;
11792
 
11793
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
11794
      if (lastComparison != 0) {
11795
        return lastComparison;
11796
      }
11797
      if (isSetSuccess()) {
11798
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
11799
        if (lastComparison != 0) {
11800
          return lastComparison;
11801
        }
11802
      }
11803
      return 0;
11804
    }
11805
 
11806
    public _Fields fieldForId(int fieldId) {
11807
      return _Fields.findByThriftId(fieldId);
11808
    }
11809
 
11810
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11811
      org.apache.thrift.protocol.TField field;
11812
      iprot.readStructBegin();
11813
      while (true)
11814
      {
11815
        field = iprot.readFieldBegin();
11816
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11817
          break;
11818
        }
11819
        switch (field.id) {
11820
          case 0: // SUCCESS
11821
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
11822
              {
11823
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
11824
                this.success = new ArrayList<DetailedPurchaseScan>(_list16.size);
11825
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
11826
                {
11827
                  DetailedPurchaseScan _elem18; // required
11828
                  _elem18 = new DetailedPurchaseScan();
11829
                  _elem18.read(iprot);
11830
                  this.success.add(_elem18);
11831
                }
11832
                iprot.readListEnd();
11833
              }
11834
            } else { 
11835
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11836
            }
11837
            break;
11838
          default:
11839
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11840
        }
11841
        iprot.readFieldEnd();
11842
      }
11843
      iprot.readStructEnd();
11844
      validate();
11845
    }
11846
 
11847
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11848
      oprot.writeStructBegin(STRUCT_DESC);
11849
 
11850
      if (this.isSetSuccess()) {
11851
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11852
        {
11853
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
11854
          for (DetailedPurchaseScan _iter19 : this.success)
11855
          {
11856
            _iter19.write(oprot);
11857
          }
11858
          oprot.writeListEnd();
11859
        }
11860
        oprot.writeFieldEnd();
11861
      }
11862
      oprot.writeFieldStop();
11863
      oprot.writeStructEnd();
11864
    }
11865
 
11866
    @Override
11867
    public String toString() {
11868
      StringBuilder sb = new StringBuilder("getPurchaseScansByGrnDate_result(");
11869
      boolean first = true;
11870
 
11871
      sb.append("success:");
11872
      if (this.success == null) {
11873
        sb.append("null");
11874
      } else {
11875
        sb.append(this.success);
11876
      }
11877
      first = false;
11878
      sb.append(")");
11879
      return sb.toString();
11880
    }
11881
 
11882
    public void validate() throws org.apache.thrift.TException {
11883
      // check for required fields
11884
    }
11885
 
11886
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11887
      try {
11888
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11889
      } catch (org.apache.thrift.TException te) {
11890
        throw new java.io.IOException(te);
11891
      }
11892
    }
11893
 
11894
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11895
      try {
11896
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11897
      } catch (org.apache.thrift.TException te) {
11898
        throw new java.io.IOException(te);
11899
      }
11900
    }
11901
 
11902
  }
11903
 
5496 mandeep.dh 11904
  public static class fetchScansPerInvoiceNumber_args implements org.apache.thrift.TBase<fetchScansPerInvoiceNumber_args, fetchScansPerInvoiceNumber_args._Fields>, java.io.Serializable, Cloneable   {
11905
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchScansPerInvoiceNumber_args");
11906
 
11907
    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);
11908
 
11909
    private long date; // required
11910
 
11911
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11912
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11913
      DATE((short)1, "date");
11914
 
11915
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11916
 
11917
      static {
11918
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11919
          byName.put(field.getFieldName(), field);
11920
        }
11921
      }
11922
 
11923
      /**
11924
       * Find the _Fields constant that matches fieldId, or null if its not found.
11925
       */
11926
      public static _Fields findByThriftId(int fieldId) {
11927
        switch(fieldId) {
11928
          case 1: // DATE
11929
            return DATE;
11930
          default:
11931
            return null;
11932
        }
11933
      }
11934
 
11935
      /**
11936
       * Find the _Fields constant that matches fieldId, throwing an exception
11937
       * if it is not found.
11938
       */
11939
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11940
        _Fields fields = findByThriftId(fieldId);
11941
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11942
        return fields;
11943
      }
11944
 
11945
      /**
11946
       * Find the _Fields constant that matches name, or null if its not found.
11947
       */
11948
      public static _Fields findByName(String name) {
11949
        return byName.get(name);
11950
      }
11951
 
11952
      private final short _thriftId;
11953
      private final String _fieldName;
11954
 
11955
      _Fields(short thriftId, String fieldName) {
11956
        _thriftId = thriftId;
11957
        _fieldName = fieldName;
11958
      }
11959
 
11960
      public short getThriftFieldId() {
11961
        return _thriftId;
11962
      }
11963
 
11964
      public String getFieldName() {
11965
        return _fieldName;
11966
      }
11967
    }
11968
 
11969
    // isset id assignments
11970
    private static final int __DATE_ISSET_ID = 0;
11971
    private BitSet __isset_bit_vector = new BitSet(1);
11972
 
11973
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11974
    static {
11975
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11976
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11977
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11978
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11979
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchScansPerInvoiceNumber_args.class, metaDataMap);
11980
    }
11981
 
11982
    public fetchScansPerInvoiceNumber_args() {
11983
    }
11984
 
11985
    public fetchScansPerInvoiceNumber_args(
11986
      long date)
11987
    {
11988
      this();
11989
      this.date = date;
11990
      setDateIsSet(true);
11991
    }
11992
 
11993
    /**
11994
     * Performs a deep copy on <i>other</i>.
11995
     */
11996
    public fetchScansPerInvoiceNumber_args(fetchScansPerInvoiceNumber_args other) {
11997
      __isset_bit_vector.clear();
11998
      __isset_bit_vector.or(other.__isset_bit_vector);
11999
      this.date = other.date;
12000
    }
12001
 
12002
    public fetchScansPerInvoiceNumber_args deepCopy() {
12003
      return new fetchScansPerInvoiceNumber_args(this);
12004
    }
12005
 
12006
    @Override
12007
    public void clear() {
12008
      setDateIsSet(false);
12009
      this.date = 0;
12010
    }
12011
 
12012
    public long getDate() {
12013
      return this.date;
12014
    }
12015
 
12016
    public void setDate(long date) {
12017
      this.date = date;
12018
      setDateIsSet(true);
12019
    }
12020
 
12021
    public void unsetDate() {
12022
      __isset_bit_vector.clear(__DATE_ISSET_ID);
12023
    }
12024
 
12025
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
12026
    public boolean isSetDate() {
12027
      return __isset_bit_vector.get(__DATE_ISSET_ID);
12028
    }
12029
 
12030
    public void setDateIsSet(boolean value) {
12031
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
12032
    }
12033
 
12034
    public void setFieldValue(_Fields field, Object value) {
12035
      switch (field) {
12036
      case DATE:
12037
        if (value == null) {
12038
          unsetDate();
12039
        } else {
12040
          setDate((Long)value);
12041
        }
12042
        break;
12043
 
12044
      }
12045
    }
12046
 
12047
    public Object getFieldValue(_Fields field) {
12048
      switch (field) {
12049
      case DATE:
12050
        return Long.valueOf(getDate());
12051
 
12052
      }
12053
      throw new IllegalStateException();
12054
    }
12055
 
12056
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12057
    public boolean isSet(_Fields field) {
12058
      if (field == null) {
12059
        throw new IllegalArgumentException();
12060
      }
12061
 
12062
      switch (field) {
12063
      case DATE:
12064
        return isSetDate();
12065
      }
12066
      throw new IllegalStateException();
12067
    }
12068
 
12069
    @Override
12070
    public boolean equals(Object that) {
12071
      if (that == null)
12072
        return false;
12073
      if (that instanceof fetchScansPerInvoiceNumber_args)
12074
        return this.equals((fetchScansPerInvoiceNumber_args)that);
12075
      return false;
12076
    }
12077
 
12078
    public boolean equals(fetchScansPerInvoiceNumber_args that) {
12079
      if (that == null)
12080
        return false;
12081
 
12082
      boolean this_present_date = true;
12083
      boolean that_present_date = true;
12084
      if (this_present_date || that_present_date) {
12085
        if (!(this_present_date && that_present_date))
12086
          return false;
12087
        if (this.date != that.date)
12088
          return false;
12089
      }
12090
 
12091
      return true;
12092
    }
12093
 
12094
    @Override
12095
    public int hashCode() {
12096
      return 0;
12097
    }
12098
 
12099
    public int compareTo(fetchScansPerInvoiceNumber_args other) {
12100
      if (!getClass().equals(other.getClass())) {
12101
        return getClass().getName().compareTo(other.getClass().getName());
12102
      }
12103
 
12104
      int lastComparison = 0;
12105
      fetchScansPerInvoiceNumber_args typedOther = (fetchScansPerInvoiceNumber_args)other;
12106
 
12107
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
12108
      if (lastComparison != 0) {
12109
        return lastComparison;
12110
      }
12111
      if (isSetDate()) {
12112
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
12113
        if (lastComparison != 0) {
12114
          return lastComparison;
12115
        }
12116
      }
12117
      return 0;
12118
    }
12119
 
12120
    public _Fields fieldForId(int fieldId) {
12121
      return _Fields.findByThriftId(fieldId);
12122
    }
12123
 
12124
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12125
      org.apache.thrift.protocol.TField field;
12126
      iprot.readStructBegin();
12127
      while (true)
12128
      {
12129
        field = iprot.readFieldBegin();
12130
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12131
          break;
12132
        }
12133
        switch (field.id) {
12134
          case 1: // DATE
12135
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12136
              this.date = iprot.readI64();
12137
              setDateIsSet(true);
12138
            } else { 
12139
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12140
            }
12141
            break;
12142
          default:
12143
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12144
        }
12145
        iprot.readFieldEnd();
12146
      }
12147
      iprot.readStructEnd();
12148
      validate();
12149
    }
12150
 
12151
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12152
      validate();
12153
 
12154
      oprot.writeStructBegin(STRUCT_DESC);
12155
      oprot.writeFieldBegin(DATE_FIELD_DESC);
12156
      oprot.writeI64(this.date);
12157
      oprot.writeFieldEnd();
12158
      oprot.writeFieldStop();
12159
      oprot.writeStructEnd();
12160
    }
12161
 
12162
    @Override
12163
    public String toString() {
12164
      StringBuilder sb = new StringBuilder("fetchScansPerInvoiceNumber_args(");
12165
      boolean first = true;
12166
 
12167
      sb.append("date:");
12168
      sb.append(this.date);
12169
      first = false;
12170
      sb.append(")");
12171
      return sb.toString();
12172
    }
12173
 
12174
    public void validate() throws org.apache.thrift.TException {
12175
      // check for required fields
12176
    }
12177
 
12178
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12179
      try {
12180
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12181
      } catch (org.apache.thrift.TException te) {
12182
        throw new java.io.IOException(te);
12183
      }
12184
    }
12185
 
12186
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12187
      try {
5711 mandeep.dh 12188
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
12189
        __isset_bit_vector = new BitSet(1);
5496 mandeep.dh 12190
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12191
      } catch (org.apache.thrift.TException te) {
12192
        throw new java.io.IOException(te);
12193
      }
12194
    }
12195
 
12196
  }
12197
 
12198
  public static class fetchScansPerInvoiceNumber_result implements org.apache.thrift.TBase<fetchScansPerInvoiceNumber_result, fetchScansPerInvoiceNumber_result._Fields>, java.io.Serializable, Cloneable   {
12199
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchScansPerInvoiceNumber_result");
12200
 
12201
    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);
12202
 
12203
    private List<InvoiceScan> success; // required
12204
 
12205
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12206
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12207
      SUCCESS((short)0, "success");
12208
 
12209
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12210
 
12211
      static {
12212
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12213
          byName.put(field.getFieldName(), field);
12214
        }
12215
      }
12216
 
12217
      /**
12218
       * Find the _Fields constant that matches fieldId, or null if its not found.
12219
       */
12220
      public static _Fields findByThriftId(int fieldId) {
12221
        switch(fieldId) {
12222
          case 0: // SUCCESS
12223
            return SUCCESS;
12224
          default:
12225
            return null;
12226
        }
12227
      }
12228
 
12229
      /**
12230
       * Find the _Fields constant that matches fieldId, throwing an exception
12231
       * if it is not found.
12232
       */
12233
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12234
        _Fields fields = findByThriftId(fieldId);
12235
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12236
        return fields;
12237
      }
12238
 
12239
      /**
12240
       * Find the _Fields constant that matches name, or null if its not found.
12241
       */
12242
      public static _Fields findByName(String name) {
12243
        return byName.get(name);
12244
      }
12245
 
12246
      private final short _thriftId;
12247
      private final String _fieldName;
12248
 
12249
      _Fields(short thriftId, String fieldName) {
12250
        _thriftId = thriftId;
12251
        _fieldName = fieldName;
12252
      }
12253
 
12254
      public short getThriftFieldId() {
12255
        return _thriftId;
12256
      }
12257
 
12258
      public String getFieldName() {
12259
        return _fieldName;
12260
      }
12261
    }
12262
 
12263
    // isset id assignments
12264
 
12265
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12266
    static {
12267
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12268
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12269
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
12270
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InvoiceScan.class))));
12271
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12272
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchScansPerInvoiceNumber_result.class, metaDataMap);
12273
    }
12274
 
12275
    public fetchScansPerInvoiceNumber_result() {
12276
    }
12277
 
12278
    public fetchScansPerInvoiceNumber_result(
12279
      List<InvoiceScan> success)
12280
    {
12281
      this();
12282
      this.success = success;
12283
    }
12284
 
12285
    /**
12286
     * Performs a deep copy on <i>other</i>.
12287
     */
12288
    public fetchScansPerInvoiceNumber_result(fetchScansPerInvoiceNumber_result other) {
12289
      if (other.isSetSuccess()) {
12290
        List<InvoiceScan> __this__success = new ArrayList<InvoiceScan>();
12291
        for (InvoiceScan other_element : other.success) {
12292
          __this__success.add(new InvoiceScan(other_element));
12293
        }
12294
        this.success = __this__success;
12295
      }
12296
    }
12297
 
12298
    public fetchScansPerInvoiceNumber_result deepCopy() {
12299
      return new fetchScansPerInvoiceNumber_result(this);
12300
    }
12301
 
12302
    @Override
12303
    public void clear() {
12304
      this.success = null;
12305
    }
12306
 
12307
    public int getSuccessSize() {
12308
      return (this.success == null) ? 0 : this.success.size();
12309
    }
12310
 
12311
    public java.util.Iterator<InvoiceScan> getSuccessIterator() {
12312
      return (this.success == null) ? null : this.success.iterator();
12313
    }
12314
 
12315
    public void addToSuccess(InvoiceScan elem) {
12316
      if (this.success == null) {
12317
        this.success = new ArrayList<InvoiceScan>();
12318
      }
12319
      this.success.add(elem);
12320
    }
12321
 
12322
    public List<InvoiceScan> getSuccess() {
12323
      return this.success;
12324
    }
12325
 
12326
    public void setSuccess(List<InvoiceScan> success) {
12327
      this.success = success;
12328
    }
12329
 
12330
    public void unsetSuccess() {
12331
      this.success = null;
12332
    }
12333
 
12334
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
12335
    public boolean isSetSuccess() {
12336
      return this.success != null;
12337
    }
12338
 
12339
    public void setSuccessIsSet(boolean value) {
12340
      if (!value) {
12341
        this.success = null;
12342
      }
12343
    }
12344
 
12345
    public void setFieldValue(_Fields field, Object value) {
12346
      switch (field) {
12347
      case SUCCESS:
12348
        if (value == null) {
12349
          unsetSuccess();
12350
        } else {
12351
          setSuccess((List<InvoiceScan>)value);
12352
        }
12353
        break;
12354
 
12355
      }
12356
    }
12357
 
12358
    public Object getFieldValue(_Fields field) {
12359
      switch (field) {
12360
      case SUCCESS:
12361
        return getSuccess();
12362
 
12363
      }
12364
      throw new IllegalStateException();
12365
    }
12366
 
12367
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12368
    public boolean isSet(_Fields field) {
12369
      if (field == null) {
12370
        throw new IllegalArgumentException();
12371
      }
12372
 
12373
      switch (field) {
12374
      case SUCCESS:
12375
        return isSetSuccess();
12376
      }
12377
      throw new IllegalStateException();
12378
    }
12379
 
12380
    @Override
12381
    public boolean equals(Object that) {
12382
      if (that == null)
12383
        return false;
12384
      if (that instanceof fetchScansPerInvoiceNumber_result)
12385
        return this.equals((fetchScansPerInvoiceNumber_result)that);
12386
      return false;
12387
    }
12388
 
12389
    public boolean equals(fetchScansPerInvoiceNumber_result that) {
12390
      if (that == null)
12391
        return false;
12392
 
12393
      boolean this_present_success = true && this.isSetSuccess();
12394
      boolean that_present_success = true && that.isSetSuccess();
12395
      if (this_present_success || that_present_success) {
12396
        if (!(this_present_success && that_present_success))
12397
          return false;
12398
        if (!this.success.equals(that.success))
12399
          return false;
12400
      }
12401
 
12402
      return true;
12403
    }
12404
 
12405
    @Override
12406
    public int hashCode() {
12407
      return 0;
12408
    }
12409
 
12410
    public int compareTo(fetchScansPerInvoiceNumber_result other) {
12411
      if (!getClass().equals(other.getClass())) {
12412
        return getClass().getName().compareTo(other.getClass().getName());
12413
      }
12414
 
12415
      int lastComparison = 0;
12416
      fetchScansPerInvoiceNumber_result typedOther = (fetchScansPerInvoiceNumber_result)other;
12417
 
12418
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
12419
      if (lastComparison != 0) {
12420
        return lastComparison;
12421
      }
12422
      if (isSetSuccess()) {
12423
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
12424
        if (lastComparison != 0) {
12425
          return lastComparison;
12426
        }
12427
      }
12428
      return 0;
12429
    }
12430
 
12431
    public _Fields fieldForId(int fieldId) {
12432
      return _Fields.findByThriftId(fieldId);
12433
    }
12434
 
12435
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12436
      org.apache.thrift.protocol.TField field;
12437
      iprot.readStructBegin();
12438
      while (true)
12439
      {
12440
        field = iprot.readFieldBegin();
12441
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12442
          break;
12443
        }
12444
        switch (field.id) {
12445
          case 0: // SUCCESS
12446
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
12447
              {
7210 amar.kumar 12448
                org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
12449
                this.success = new ArrayList<InvoiceScan>(_list20.size);
12450
                for (int _i21 = 0; _i21 < _list20.size; ++_i21)
5496 mandeep.dh 12451
                {
7210 amar.kumar 12452
                  InvoiceScan _elem22; // required
12453
                  _elem22 = new InvoiceScan();
12454
                  _elem22.read(iprot);
12455
                  this.success.add(_elem22);
5496 mandeep.dh 12456
                }
12457
                iprot.readListEnd();
12458
              }
12459
            } else { 
12460
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12461
            }
12462
            break;
12463
          default:
12464
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12465
        }
12466
        iprot.readFieldEnd();
12467
      }
12468
      iprot.readStructEnd();
12469
      validate();
12470
    }
12471
 
12472
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12473
      oprot.writeStructBegin(STRUCT_DESC);
12474
 
12475
      if (this.isSetSuccess()) {
12476
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12477
        {
12478
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7210 amar.kumar 12479
          for (InvoiceScan _iter23 : this.success)
5496 mandeep.dh 12480
          {
7210 amar.kumar 12481
            _iter23.write(oprot);
5496 mandeep.dh 12482
          }
12483
          oprot.writeListEnd();
12484
        }
12485
        oprot.writeFieldEnd();
12486
      }
12487
      oprot.writeFieldStop();
12488
      oprot.writeStructEnd();
12489
    }
12490
 
12491
    @Override
12492
    public String toString() {
12493
      StringBuilder sb = new StringBuilder("fetchScansPerInvoiceNumber_result(");
12494
      boolean first = true;
12495
 
12496
      sb.append("success:");
12497
      if (this.success == null) {
12498
        sb.append("null");
12499
      } else {
12500
        sb.append(this.success);
12501
      }
12502
      first = false;
12503
      sb.append(")");
12504
      return sb.toString();
12505
    }
12506
 
12507
    public void validate() throws org.apache.thrift.TException {
12508
      // check for required fields
12509
    }
12510
 
12511
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12512
      try {
12513
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12514
      } catch (org.apache.thrift.TException te) {
12515
        throw new java.io.IOException(te);
12516
      }
12517
    }
12518
 
12519
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12520
      try {
12521
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12522
      } catch (org.apache.thrift.TException te) {
12523
        throw new java.io.IOException(te);
12524
      }
12525
    }
12526
 
12527
  }
12528
 
5620 mandeep.dh 12529
  public static class getInventoryItemFromOrder_args implements org.apache.thrift.TBase<getInventoryItemFromOrder_args, getInventoryItemFromOrder_args._Fields>, java.io.Serializable, Cloneable   {
12530
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromOrder_args");
12531
 
12532
    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);
12533
 
12534
    private long orderId; // required
12535
 
12536
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12537
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12538
      ORDER_ID((short)1, "orderId");
12539
 
12540
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12541
 
12542
      static {
12543
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12544
          byName.put(field.getFieldName(), field);
12545
        }
12546
      }
12547
 
12548
      /**
12549
       * Find the _Fields constant that matches fieldId, or null if its not found.
12550
       */
12551
      public static _Fields findByThriftId(int fieldId) {
12552
        switch(fieldId) {
12553
          case 1: // ORDER_ID
12554
            return ORDER_ID;
12555
          default:
12556
            return null;
12557
        }
12558
      }
12559
 
12560
      /**
12561
       * Find the _Fields constant that matches fieldId, throwing an exception
12562
       * if it is not found.
12563
       */
12564
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12565
        _Fields fields = findByThriftId(fieldId);
12566
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12567
        return fields;
12568
      }
12569
 
12570
      /**
12571
       * Find the _Fields constant that matches name, or null if its not found.
12572
       */
12573
      public static _Fields findByName(String name) {
12574
        return byName.get(name);
12575
      }
12576
 
12577
      private final short _thriftId;
12578
      private final String _fieldName;
12579
 
12580
      _Fields(short thriftId, String fieldName) {
12581
        _thriftId = thriftId;
12582
        _fieldName = fieldName;
12583
      }
12584
 
12585
      public short getThriftFieldId() {
12586
        return _thriftId;
12587
      }
12588
 
12589
      public String getFieldName() {
12590
        return _fieldName;
12591
      }
12592
    }
12593
 
12594
    // isset id assignments
12595
    private static final int __ORDERID_ISSET_ID = 0;
12596
    private BitSet __isset_bit_vector = new BitSet(1);
12597
 
12598
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12599
    static {
12600
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12601
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12602
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12603
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12604
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromOrder_args.class, metaDataMap);
12605
    }
12606
 
12607
    public getInventoryItemFromOrder_args() {
12608
    }
12609
 
12610
    public getInventoryItemFromOrder_args(
12611
      long orderId)
12612
    {
12613
      this();
12614
      this.orderId = orderId;
12615
      setOrderIdIsSet(true);
12616
    }
12617
 
12618
    /**
12619
     * Performs a deep copy on <i>other</i>.
12620
     */
12621
    public getInventoryItemFromOrder_args(getInventoryItemFromOrder_args other) {
12622
      __isset_bit_vector.clear();
12623
      __isset_bit_vector.or(other.__isset_bit_vector);
12624
      this.orderId = other.orderId;
12625
    }
12626
 
12627
    public getInventoryItemFromOrder_args deepCopy() {
12628
      return new getInventoryItemFromOrder_args(this);
12629
    }
12630
 
12631
    @Override
12632
    public void clear() {
12633
      setOrderIdIsSet(false);
12634
      this.orderId = 0;
12635
    }
12636
 
12637
    public long getOrderId() {
12638
      return this.orderId;
12639
    }
12640
 
12641
    public void setOrderId(long orderId) {
12642
      this.orderId = orderId;
12643
      setOrderIdIsSet(true);
12644
    }
12645
 
12646
    public void unsetOrderId() {
12647
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
12648
    }
12649
 
12650
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
12651
    public boolean isSetOrderId() {
12652
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
12653
    }
12654
 
12655
    public void setOrderIdIsSet(boolean value) {
12656
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
12657
    }
12658
 
12659
    public void setFieldValue(_Fields field, Object value) {
12660
      switch (field) {
12661
      case ORDER_ID:
12662
        if (value == null) {
12663
          unsetOrderId();
12664
        } else {
12665
          setOrderId((Long)value);
12666
        }
12667
        break;
12668
 
12669
      }
12670
    }
12671
 
12672
    public Object getFieldValue(_Fields field) {
12673
      switch (field) {
12674
      case ORDER_ID:
12675
        return Long.valueOf(getOrderId());
12676
 
12677
      }
12678
      throw new IllegalStateException();
12679
    }
12680
 
12681
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12682
    public boolean isSet(_Fields field) {
12683
      if (field == null) {
12684
        throw new IllegalArgumentException();
12685
      }
12686
 
12687
      switch (field) {
12688
      case ORDER_ID:
12689
        return isSetOrderId();
12690
      }
12691
      throw new IllegalStateException();
12692
    }
12693
 
12694
    @Override
12695
    public boolean equals(Object that) {
12696
      if (that == null)
12697
        return false;
12698
      if (that instanceof getInventoryItemFromOrder_args)
12699
        return this.equals((getInventoryItemFromOrder_args)that);
12700
      return false;
12701
    }
12702
 
12703
    public boolean equals(getInventoryItemFromOrder_args that) {
12704
      if (that == null)
12705
        return false;
12706
 
12707
      boolean this_present_orderId = true;
12708
      boolean that_present_orderId = true;
12709
      if (this_present_orderId || that_present_orderId) {
12710
        if (!(this_present_orderId && that_present_orderId))
12711
          return false;
12712
        if (this.orderId != that.orderId)
12713
          return false;
12714
      }
12715
 
12716
      return true;
12717
    }
12718
 
12719
    @Override
12720
    public int hashCode() {
12721
      return 0;
12722
    }
12723
 
12724
    public int compareTo(getInventoryItemFromOrder_args other) {
12725
      if (!getClass().equals(other.getClass())) {
12726
        return getClass().getName().compareTo(other.getClass().getName());
12727
      }
12728
 
12729
      int lastComparison = 0;
12730
      getInventoryItemFromOrder_args typedOther = (getInventoryItemFromOrder_args)other;
12731
 
12732
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
12733
      if (lastComparison != 0) {
12734
        return lastComparison;
12735
      }
12736
      if (isSetOrderId()) {
12737
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
12738
        if (lastComparison != 0) {
12739
          return lastComparison;
12740
        }
12741
      }
12742
      return 0;
12743
    }
12744
 
12745
    public _Fields fieldForId(int fieldId) {
12746
      return _Fields.findByThriftId(fieldId);
12747
    }
12748
 
12749
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12750
      org.apache.thrift.protocol.TField field;
12751
      iprot.readStructBegin();
12752
      while (true)
12753
      {
12754
        field = iprot.readFieldBegin();
12755
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12756
          break;
12757
        }
12758
        switch (field.id) {
12759
          case 1: // ORDER_ID
12760
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12761
              this.orderId = iprot.readI64();
12762
              setOrderIdIsSet(true);
12763
            } else { 
12764
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12765
            }
12766
            break;
12767
          default:
12768
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12769
        }
12770
        iprot.readFieldEnd();
12771
      }
12772
      iprot.readStructEnd();
12773
      validate();
12774
    }
12775
 
12776
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12777
      validate();
12778
 
12779
      oprot.writeStructBegin(STRUCT_DESC);
12780
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
12781
      oprot.writeI64(this.orderId);
12782
      oprot.writeFieldEnd();
12783
      oprot.writeFieldStop();
12784
      oprot.writeStructEnd();
12785
    }
12786
 
12787
    @Override
12788
    public String toString() {
12789
      StringBuilder sb = new StringBuilder("getInventoryItemFromOrder_args(");
12790
      boolean first = true;
12791
 
12792
      sb.append("orderId:");
12793
      sb.append(this.orderId);
12794
      first = false;
12795
      sb.append(")");
12796
      return sb.toString();
12797
    }
12798
 
12799
    public void validate() throws org.apache.thrift.TException {
12800
      // check for required fields
12801
    }
12802
 
12803
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12804
      try {
12805
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12806
      } catch (org.apache.thrift.TException te) {
12807
        throw new java.io.IOException(te);
12808
      }
12809
    }
12810
 
12811
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12812
      try {
12813
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
12814
        __isset_bit_vector = new BitSet(1);
12815
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12816
      } catch (org.apache.thrift.TException te) {
12817
        throw new java.io.IOException(te);
12818
      }
12819
    }
12820
 
12821
  }
12822
 
12823
  public static class getInventoryItemFromOrder_result implements org.apache.thrift.TBase<getInventoryItemFromOrder_result, getInventoryItemFromOrder_result._Fields>, java.io.Serializable, Cloneable   {
12824
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromOrder_result");
12825
 
12826
    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);
12827
    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);
12828
 
12829
    private InventoryItem success; // required
12830
    private WarehouseServiceException we; // required
12831
 
12832
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12833
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12834
      SUCCESS((short)0, "success"),
12835
      WE((short)1, "we");
12836
 
12837
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12838
 
12839
      static {
12840
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12841
          byName.put(field.getFieldName(), field);
12842
        }
12843
      }
12844
 
12845
      /**
12846
       * Find the _Fields constant that matches fieldId, or null if its not found.
12847
       */
12848
      public static _Fields findByThriftId(int fieldId) {
12849
        switch(fieldId) {
12850
          case 0: // SUCCESS
12851
            return SUCCESS;
12852
          case 1: // WE
12853
            return WE;
12854
          default:
12855
            return null;
12856
        }
12857
      }
12858
 
12859
      /**
12860
       * Find the _Fields constant that matches fieldId, throwing an exception
12861
       * if it is not found.
12862
       */
12863
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12864
        _Fields fields = findByThriftId(fieldId);
12865
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12866
        return fields;
12867
      }
12868
 
12869
      /**
12870
       * Find the _Fields constant that matches name, or null if its not found.
12871
       */
12872
      public static _Fields findByName(String name) {
12873
        return byName.get(name);
12874
      }
12875
 
12876
      private final short _thriftId;
12877
      private final String _fieldName;
12878
 
12879
      _Fields(short thriftId, String fieldName) {
12880
        _thriftId = thriftId;
12881
        _fieldName = fieldName;
12882
      }
12883
 
12884
      public short getThriftFieldId() {
12885
        return _thriftId;
12886
      }
12887
 
12888
      public String getFieldName() {
12889
        return _fieldName;
12890
      }
12891
    }
12892
 
12893
    // isset id assignments
12894
 
12895
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12896
    static {
12897
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12898
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12899
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
12900
      tmpMap.put(_Fields.WE, new org.apache.thrift.meta_data.FieldMetaData("we", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12901
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
12902
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12903
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromOrder_result.class, metaDataMap);
12904
    }
12905
 
12906
    public getInventoryItemFromOrder_result() {
12907
    }
12908
 
12909
    public getInventoryItemFromOrder_result(
12910
      InventoryItem success,
12911
      WarehouseServiceException we)
12912
    {
12913
      this();
12914
      this.success = success;
12915
      this.we = we;
12916
    }
12917
 
12918
    /**
12919
     * Performs a deep copy on <i>other</i>.
12920
     */
12921
    public getInventoryItemFromOrder_result(getInventoryItemFromOrder_result other) {
12922
      if (other.isSetSuccess()) {
12923
        this.success = new InventoryItem(other.success);
12924
      }
12925
      if (other.isSetWe()) {
12926
        this.we = new WarehouseServiceException(other.we);
12927
      }
12928
    }
12929
 
12930
    public getInventoryItemFromOrder_result deepCopy() {
12931
      return new getInventoryItemFromOrder_result(this);
12932
    }
12933
 
12934
    @Override
12935
    public void clear() {
12936
      this.success = null;
12937
      this.we = null;
12938
    }
12939
 
12940
    public InventoryItem getSuccess() {
12941
      return this.success;
12942
    }
12943
 
12944
    public void setSuccess(InventoryItem success) {
12945
      this.success = success;
12946
    }
12947
 
12948
    public void unsetSuccess() {
12949
      this.success = null;
12950
    }
12951
 
12952
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
12953
    public boolean isSetSuccess() {
12954
      return this.success != null;
12955
    }
12956
 
12957
    public void setSuccessIsSet(boolean value) {
12958
      if (!value) {
12959
        this.success = null;
12960
      }
12961
    }
12962
 
12963
    public WarehouseServiceException getWe() {
12964
      return this.we;
12965
    }
12966
 
12967
    public void setWe(WarehouseServiceException we) {
12968
      this.we = we;
12969
    }
12970
 
12971
    public void unsetWe() {
12972
      this.we = null;
12973
    }
12974
 
12975
    /** Returns true if field we is set (has been assigned a value) and false otherwise */
12976
    public boolean isSetWe() {
12977
      return this.we != null;
12978
    }
12979
 
12980
    public void setWeIsSet(boolean value) {
12981
      if (!value) {
12982
        this.we = null;
12983
      }
12984
    }
12985
 
12986
    public void setFieldValue(_Fields field, Object value) {
12987
      switch (field) {
12988
      case SUCCESS:
12989
        if (value == null) {
12990
          unsetSuccess();
12991
        } else {
12992
          setSuccess((InventoryItem)value);
12993
        }
12994
        break;
12995
 
12996
      case WE:
12997
        if (value == null) {
12998
          unsetWe();
12999
        } else {
13000
          setWe((WarehouseServiceException)value);
13001
        }
13002
        break;
13003
 
13004
      }
13005
    }
13006
 
13007
    public Object getFieldValue(_Fields field) {
13008
      switch (field) {
13009
      case SUCCESS:
13010
        return getSuccess();
13011
 
13012
      case WE:
13013
        return getWe();
13014
 
13015
      }
13016
      throw new IllegalStateException();
13017
    }
13018
 
13019
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13020
    public boolean isSet(_Fields field) {
13021
      if (field == null) {
13022
        throw new IllegalArgumentException();
13023
      }
13024
 
13025
      switch (field) {
13026
      case SUCCESS:
13027
        return isSetSuccess();
13028
      case WE:
13029
        return isSetWe();
13030
      }
13031
      throw new IllegalStateException();
13032
    }
13033
 
13034
    @Override
13035
    public boolean equals(Object that) {
13036
      if (that == null)
13037
        return false;
13038
      if (that instanceof getInventoryItemFromOrder_result)
13039
        return this.equals((getInventoryItemFromOrder_result)that);
13040
      return false;
13041
    }
13042
 
13043
    public boolean equals(getInventoryItemFromOrder_result that) {
13044
      if (that == null)
13045
        return false;
13046
 
13047
      boolean this_present_success = true && this.isSetSuccess();
13048
      boolean that_present_success = true && that.isSetSuccess();
13049
      if (this_present_success || that_present_success) {
13050
        if (!(this_present_success && that_present_success))
13051
          return false;
13052
        if (!this.success.equals(that.success))
13053
          return false;
13054
      }
13055
 
13056
      boolean this_present_we = true && this.isSetWe();
13057
      boolean that_present_we = true && that.isSetWe();
13058
      if (this_present_we || that_present_we) {
13059
        if (!(this_present_we && that_present_we))
13060
          return false;
13061
        if (!this.we.equals(that.we))
13062
          return false;
13063
      }
13064
 
13065
      return true;
13066
    }
13067
 
13068
    @Override
13069
    public int hashCode() {
13070
      return 0;
13071
    }
13072
 
13073
    public int compareTo(getInventoryItemFromOrder_result other) {
13074
      if (!getClass().equals(other.getClass())) {
13075
        return getClass().getName().compareTo(other.getClass().getName());
13076
      }
13077
 
13078
      int lastComparison = 0;
13079
      getInventoryItemFromOrder_result typedOther = (getInventoryItemFromOrder_result)other;
13080
 
13081
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
13082
      if (lastComparison != 0) {
13083
        return lastComparison;
13084
      }
13085
      if (isSetSuccess()) {
13086
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
13087
        if (lastComparison != 0) {
13088
          return lastComparison;
13089
        }
13090
      }
13091
      lastComparison = Boolean.valueOf(isSetWe()).compareTo(typedOther.isSetWe());
13092
      if (lastComparison != 0) {
13093
        return lastComparison;
13094
      }
13095
      if (isSetWe()) {
13096
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.we, typedOther.we);
13097
        if (lastComparison != 0) {
13098
          return lastComparison;
13099
        }
13100
      }
13101
      return 0;
13102
    }
13103
 
13104
    public _Fields fieldForId(int fieldId) {
13105
      return _Fields.findByThriftId(fieldId);
13106
    }
13107
 
13108
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13109
      org.apache.thrift.protocol.TField field;
13110
      iprot.readStructBegin();
13111
      while (true)
13112
      {
13113
        field = iprot.readFieldBegin();
13114
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13115
          break;
13116
        }
13117
        switch (field.id) {
13118
          case 0: // SUCCESS
13119
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
13120
              this.success = new InventoryItem();
13121
              this.success.read(iprot);
13122
            } else { 
13123
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13124
            }
13125
            break;
13126
          case 1: // WE
13127
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
13128
              this.we = new WarehouseServiceException();
13129
              this.we.read(iprot);
13130
            } else { 
13131
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13132
            }
13133
            break;
13134
          default:
13135
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13136
        }
13137
        iprot.readFieldEnd();
13138
      }
13139
      iprot.readStructEnd();
13140
      validate();
13141
    }
13142
 
13143
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13144
      oprot.writeStructBegin(STRUCT_DESC);
13145
 
13146
      if (this.isSetSuccess()) {
13147
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13148
        this.success.write(oprot);
13149
        oprot.writeFieldEnd();
13150
      } else if (this.isSetWe()) {
13151
        oprot.writeFieldBegin(WE_FIELD_DESC);
13152
        this.we.write(oprot);
13153
        oprot.writeFieldEnd();
13154
      }
13155
      oprot.writeFieldStop();
13156
      oprot.writeStructEnd();
13157
    }
13158
 
13159
    @Override
13160
    public String toString() {
13161
      StringBuilder sb = new StringBuilder("getInventoryItemFromOrder_result(");
13162
      boolean first = true;
13163
 
13164
      sb.append("success:");
13165
      if (this.success == null) {
13166
        sb.append("null");
13167
      } else {
13168
        sb.append(this.success);
13169
      }
13170
      first = false;
13171
      if (!first) sb.append(", ");
13172
      sb.append("we:");
13173
      if (this.we == null) {
13174
        sb.append("null");
13175
      } else {
13176
        sb.append(this.we);
13177
      }
13178
      first = false;
13179
      sb.append(")");
13180
      return sb.toString();
13181
    }
13182
 
13183
    public void validate() throws org.apache.thrift.TException {
13184
      // check for required fields
13185
    }
13186
 
13187
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13188
      try {
13189
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13190
      } catch (org.apache.thrift.TException te) {
13191
        throw new java.io.IOException(te);
13192
      }
13193
    }
13194
 
13195
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13196
      try {
13197
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13198
      } catch (org.apache.thrift.TException te) {
13199
        throw new java.io.IOException(te);
13200
      }
13201
    }
13202
 
13203
  }
13204
 
5711 mandeep.dh 13205
  public static class getInventoryAge_args implements org.apache.thrift.TBase<getInventoryAge_args, getInventoryAge_args._Fields>, java.io.Serializable, Cloneable   {
13206
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryAge_args");
13207
 
13208
 
13209
 
13210
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13211
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13212
;
13213
 
13214
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13215
 
13216
      static {
13217
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13218
          byName.put(field.getFieldName(), field);
13219
        }
13220
      }
13221
 
13222
      /**
13223
       * Find the _Fields constant that matches fieldId, or null if its not found.
13224
       */
13225
      public static _Fields findByThriftId(int fieldId) {
13226
        switch(fieldId) {
13227
          default:
13228
            return null;
13229
        }
13230
      }
13231
 
13232
      /**
13233
       * Find the _Fields constant that matches fieldId, throwing an exception
13234
       * if it is not found.
13235
       */
13236
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13237
        _Fields fields = findByThriftId(fieldId);
13238
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13239
        return fields;
13240
      }
13241
 
13242
      /**
13243
       * Find the _Fields constant that matches name, or null if its not found.
13244
       */
13245
      public static _Fields findByName(String name) {
13246
        return byName.get(name);
13247
      }
13248
 
13249
      private final short _thriftId;
13250
      private final String _fieldName;
13251
 
13252
      _Fields(short thriftId, String fieldName) {
13253
        _thriftId = thriftId;
13254
        _fieldName = fieldName;
13255
      }
13256
 
13257
      public short getThriftFieldId() {
13258
        return _thriftId;
13259
      }
13260
 
13261
      public String getFieldName() {
13262
        return _fieldName;
13263
      }
13264
    }
13265
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13266
    static {
13267
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13268
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13269
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryAge_args.class, metaDataMap);
13270
    }
13271
 
13272
    public getInventoryAge_args() {
13273
    }
13274
 
13275
    /**
13276
     * Performs a deep copy on <i>other</i>.
13277
     */
13278
    public getInventoryAge_args(getInventoryAge_args other) {
13279
    }
13280
 
13281
    public getInventoryAge_args deepCopy() {
13282
      return new getInventoryAge_args(this);
13283
    }
13284
 
13285
    @Override
13286
    public void clear() {
13287
    }
13288
 
13289
    public void setFieldValue(_Fields field, Object value) {
13290
      switch (field) {
13291
      }
13292
    }
13293
 
13294
    public Object getFieldValue(_Fields field) {
13295
      switch (field) {
13296
      }
13297
      throw new IllegalStateException();
13298
    }
13299
 
13300
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13301
    public boolean isSet(_Fields field) {
13302
      if (field == null) {
13303
        throw new IllegalArgumentException();
13304
      }
13305
 
13306
      switch (field) {
13307
      }
13308
      throw new IllegalStateException();
13309
    }
13310
 
13311
    @Override
13312
    public boolean equals(Object that) {
13313
      if (that == null)
13314
        return false;
13315
      if (that instanceof getInventoryAge_args)
13316
        return this.equals((getInventoryAge_args)that);
13317
      return false;
13318
    }
13319
 
13320
    public boolean equals(getInventoryAge_args that) {
13321
      if (that == null)
13322
        return false;
13323
 
13324
      return true;
13325
    }
13326
 
13327
    @Override
13328
    public int hashCode() {
13329
      return 0;
13330
    }
13331
 
13332
    public int compareTo(getInventoryAge_args other) {
13333
      if (!getClass().equals(other.getClass())) {
13334
        return getClass().getName().compareTo(other.getClass().getName());
13335
      }
13336
 
13337
      int lastComparison = 0;
13338
      getInventoryAge_args typedOther = (getInventoryAge_args)other;
13339
 
13340
      return 0;
13341
    }
13342
 
13343
    public _Fields fieldForId(int fieldId) {
13344
      return _Fields.findByThriftId(fieldId);
13345
    }
13346
 
13347
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13348
      org.apache.thrift.protocol.TField field;
13349
      iprot.readStructBegin();
13350
      while (true)
13351
      {
13352
        field = iprot.readFieldBegin();
13353
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13354
          break;
13355
        }
13356
        switch (field.id) {
13357
          default:
13358
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13359
        }
13360
        iprot.readFieldEnd();
13361
      }
13362
      iprot.readStructEnd();
13363
      validate();
13364
    }
13365
 
13366
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13367
      validate();
13368
 
13369
      oprot.writeStructBegin(STRUCT_DESC);
13370
      oprot.writeFieldStop();
13371
      oprot.writeStructEnd();
13372
    }
13373
 
13374
    @Override
13375
    public String toString() {
13376
      StringBuilder sb = new StringBuilder("getInventoryAge_args(");
13377
      boolean first = true;
13378
 
13379
      sb.append(")");
13380
      return sb.toString();
13381
    }
13382
 
13383
    public void validate() throws org.apache.thrift.TException {
13384
      // check for required fields
13385
    }
13386
 
13387
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13388
      try {
13389
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13390
      } catch (org.apache.thrift.TException te) {
13391
        throw new java.io.IOException(te);
13392
      }
13393
    }
13394
 
13395
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13396
      try {
13397
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13398
      } catch (org.apache.thrift.TException te) {
13399
        throw new java.io.IOException(te);
13400
      }
13401
    }
13402
 
13403
  }
13404
 
13405
  public static class getInventoryAge_result implements org.apache.thrift.TBase<getInventoryAge_result, getInventoryAge_result._Fields>, java.io.Serializable, Cloneable   {
13406
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryAge_result");
13407
 
13408
    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);
13409
 
13410
    private List<InventoryAge> success; // required
13411
 
13412
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13413
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13414
      SUCCESS((short)0, "success");
13415
 
13416
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13417
 
13418
      static {
13419
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13420
          byName.put(field.getFieldName(), field);
13421
        }
13422
      }
13423
 
13424
      /**
13425
       * Find the _Fields constant that matches fieldId, or null if its not found.
13426
       */
13427
      public static _Fields findByThriftId(int fieldId) {
13428
        switch(fieldId) {
13429
          case 0: // SUCCESS
13430
            return SUCCESS;
13431
          default:
13432
            return null;
13433
        }
13434
      }
13435
 
13436
      /**
13437
       * Find the _Fields constant that matches fieldId, throwing an exception
13438
       * if it is not found.
13439
       */
13440
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13441
        _Fields fields = findByThriftId(fieldId);
13442
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13443
        return fields;
13444
      }
13445
 
13446
      /**
13447
       * Find the _Fields constant that matches name, or null if its not found.
13448
       */
13449
      public static _Fields findByName(String name) {
13450
        return byName.get(name);
13451
      }
13452
 
13453
      private final short _thriftId;
13454
      private final String _fieldName;
13455
 
13456
      _Fields(short thriftId, String fieldName) {
13457
        _thriftId = thriftId;
13458
        _fieldName = fieldName;
13459
      }
13460
 
13461
      public short getThriftFieldId() {
13462
        return _thriftId;
13463
      }
13464
 
13465
      public String getFieldName() {
13466
        return _fieldName;
13467
      }
13468
    }
13469
 
13470
    // isset id assignments
13471
 
13472
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13473
    static {
13474
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13475
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13476
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
13477
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryAge.class))));
13478
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13479
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryAge_result.class, metaDataMap);
13480
    }
13481
 
13482
    public getInventoryAge_result() {
13483
    }
13484
 
13485
    public getInventoryAge_result(
13486
      List<InventoryAge> success)
13487
    {
13488
      this();
13489
      this.success = success;
13490
    }
13491
 
13492
    /**
13493
     * Performs a deep copy on <i>other</i>.
13494
     */
13495
    public getInventoryAge_result(getInventoryAge_result other) {
13496
      if (other.isSetSuccess()) {
13497
        List<InventoryAge> __this__success = new ArrayList<InventoryAge>();
13498
        for (InventoryAge other_element : other.success) {
13499
          __this__success.add(new InventoryAge(other_element));
13500
        }
13501
        this.success = __this__success;
13502
      }
13503
    }
13504
 
13505
    public getInventoryAge_result deepCopy() {
13506
      return new getInventoryAge_result(this);
13507
    }
13508
 
13509
    @Override
13510
    public void clear() {
13511
      this.success = null;
13512
    }
13513
 
13514
    public int getSuccessSize() {
13515
      return (this.success == null) ? 0 : this.success.size();
13516
    }
13517
 
13518
    public java.util.Iterator<InventoryAge> getSuccessIterator() {
13519
      return (this.success == null) ? null : this.success.iterator();
13520
    }
13521
 
13522
    public void addToSuccess(InventoryAge elem) {
13523
      if (this.success == null) {
13524
        this.success = new ArrayList<InventoryAge>();
13525
      }
13526
      this.success.add(elem);
13527
    }
13528
 
13529
    public List<InventoryAge> getSuccess() {
13530
      return this.success;
13531
    }
13532
 
13533
    public void setSuccess(List<InventoryAge> success) {
13534
      this.success = success;
13535
    }
13536
 
13537
    public void unsetSuccess() {
13538
      this.success = null;
13539
    }
13540
 
13541
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
13542
    public boolean isSetSuccess() {
13543
      return this.success != null;
13544
    }
13545
 
13546
    public void setSuccessIsSet(boolean value) {
13547
      if (!value) {
13548
        this.success = null;
13549
      }
13550
    }
13551
 
13552
    public void setFieldValue(_Fields field, Object value) {
13553
      switch (field) {
13554
      case SUCCESS:
13555
        if (value == null) {
13556
          unsetSuccess();
13557
        } else {
13558
          setSuccess((List<InventoryAge>)value);
13559
        }
13560
        break;
13561
 
13562
      }
13563
    }
13564
 
13565
    public Object getFieldValue(_Fields field) {
13566
      switch (field) {
13567
      case SUCCESS:
13568
        return getSuccess();
13569
 
13570
      }
13571
      throw new IllegalStateException();
13572
    }
13573
 
13574
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13575
    public boolean isSet(_Fields field) {
13576
      if (field == null) {
13577
        throw new IllegalArgumentException();
13578
      }
13579
 
13580
      switch (field) {
13581
      case SUCCESS:
13582
        return isSetSuccess();
13583
      }
13584
      throw new IllegalStateException();
13585
    }
13586
 
13587
    @Override
13588
    public boolean equals(Object that) {
13589
      if (that == null)
13590
        return false;
13591
      if (that instanceof getInventoryAge_result)
13592
        return this.equals((getInventoryAge_result)that);
13593
      return false;
13594
    }
13595
 
13596
    public boolean equals(getInventoryAge_result that) {
13597
      if (that == null)
13598
        return false;
13599
 
13600
      boolean this_present_success = true && this.isSetSuccess();
13601
      boolean that_present_success = true && that.isSetSuccess();
13602
      if (this_present_success || that_present_success) {
13603
        if (!(this_present_success && that_present_success))
13604
          return false;
13605
        if (!this.success.equals(that.success))
13606
          return false;
13607
      }
13608
 
13609
      return true;
13610
    }
13611
 
13612
    @Override
13613
    public int hashCode() {
13614
      return 0;
13615
    }
13616
 
13617
    public int compareTo(getInventoryAge_result other) {
13618
      if (!getClass().equals(other.getClass())) {
13619
        return getClass().getName().compareTo(other.getClass().getName());
13620
      }
13621
 
13622
      int lastComparison = 0;
13623
      getInventoryAge_result typedOther = (getInventoryAge_result)other;
13624
 
13625
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
13626
      if (lastComparison != 0) {
13627
        return lastComparison;
13628
      }
13629
      if (isSetSuccess()) {
13630
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
13631
        if (lastComparison != 0) {
13632
          return lastComparison;
13633
        }
13634
      }
13635
      return 0;
13636
    }
13637
 
13638
    public _Fields fieldForId(int fieldId) {
13639
      return _Fields.findByThriftId(fieldId);
13640
    }
13641
 
13642
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13643
      org.apache.thrift.protocol.TField field;
13644
      iprot.readStructBegin();
13645
      while (true)
13646
      {
13647
        field = iprot.readFieldBegin();
13648
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13649
          break;
13650
        }
13651
        switch (field.id) {
13652
          case 0: // SUCCESS
13653
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
13654
              {
7210 amar.kumar 13655
                org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
13656
                this.success = new ArrayList<InventoryAge>(_list24.size);
13657
                for (int _i25 = 0; _i25 < _list24.size; ++_i25)
5711 mandeep.dh 13658
                {
7210 amar.kumar 13659
                  InventoryAge _elem26; // required
13660
                  _elem26 = new InventoryAge();
13661
                  _elem26.read(iprot);
13662
                  this.success.add(_elem26);
5711 mandeep.dh 13663
                }
13664
                iprot.readListEnd();
13665
              }
13666
            } else { 
13667
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13668
            }
13669
            break;
13670
          default:
13671
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13672
        }
13673
        iprot.readFieldEnd();
13674
      }
13675
      iprot.readStructEnd();
13676
      validate();
13677
    }
13678
 
13679
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13680
      oprot.writeStructBegin(STRUCT_DESC);
13681
 
13682
      if (this.isSetSuccess()) {
13683
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13684
        {
13685
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7210 amar.kumar 13686
          for (InventoryAge _iter27 : this.success)
5711 mandeep.dh 13687
          {
7210 amar.kumar 13688
            _iter27.write(oprot);
5711 mandeep.dh 13689
          }
13690
          oprot.writeListEnd();
13691
        }
13692
        oprot.writeFieldEnd();
13693
      }
13694
      oprot.writeFieldStop();
13695
      oprot.writeStructEnd();
13696
    }
13697
 
13698
    @Override
13699
    public String toString() {
13700
      StringBuilder sb = new StringBuilder("getInventoryAge_result(");
13701
      boolean first = true;
13702
 
13703
      sb.append("success:");
13704
      if (this.success == null) {
13705
        sb.append("null");
13706
      } else {
13707
        sb.append(this.success);
13708
      }
13709
      first = false;
13710
      sb.append(")");
13711
      return sb.toString();
13712
    }
13713
 
13714
    public void validate() throws org.apache.thrift.TException {
13715
      // check for required fields
13716
    }
13717
 
13718
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13719
      try {
13720
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13721
      } catch (org.apache.thrift.TException te) {
13722
        throw new java.io.IOException(te);
13723
      }
13724
    }
13725
 
13726
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13727
      try {
13728
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13729
      } catch (org.apache.thrift.TException te) {
13730
        throw new java.io.IOException(te);
13731
      }
13732
    }
13733
 
13734
  }
13735
 
6322 amar.kumar 13736
  public static class getInventoryScansForItem_args implements org.apache.thrift.TBase<getInventoryScansForItem_args, getInventoryScansForItem_args._Fields>, java.io.Serializable, Cloneable   {
13737
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryScansForItem_args");
13738
 
13739
    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);
13740
    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);
13741
    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);
13742
 
13743
    private long itemId; // required
13744
    private long fromDate; // required
13745
    private long toDate; // required
13746
 
13747
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13748
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13749
      ITEM_ID((short)1, "itemId"),
13750
      FROM_DATE((short)2, "fromDate"),
13751
      TO_DATE((short)3, "toDate");
13752
 
13753
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13754
 
13755
      static {
13756
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13757
          byName.put(field.getFieldName(), field);
13758
        }
13759
      }
13760
 
13761
      /**
13762
       * Find the _Fields constant that matches fieldId, or null if its not found.
13763
       */
13764
      public static _Fields findByThriftId(int fieldId) {
13765
        switch(fieldId) {
13766
          case 1: // ITEM_ID
13767
            return ITEM_ID;
13768
          case 2: // FROM_DATE
13769
            return FROM_DATE;
13770
          case 3: // TO_DATE
13771
            return TO_DATE;
13772
          default:
13773
            return null;
13774
        }
13775
      }
13776
 
13777
      /**
13778
       * Find the _Fields constant that matches fieldId, throwing an exception
13779
       * if it is not found.
13780
       */
13781
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13782
        _Fields fields = findByThriftId(fieldId);
13783
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13784
        return fields;
13785
      }
13786
 
13787
      /**
13788
       * Find the _Fields constant that matches name, or null if its not found.
13789
       */
13790
      public static _Fields findByName(String name) {
13791
        return byName.get(name);
13792
      }
13793
 
13794
      private final short _thriftId;
13795
      private final String _fieldName;
13796
 
13797
      _Fields(short thriftId, String fieldName) {
13798
        _thriftId = thriftId;
13799
        _fieldName = fieldName;
13800
      }
13801
 
13802
      public short getThriftFieldId() {
13803
        return _thriftId;
13804
      }
13805
 
13806
      public String getFieldName() {
13807
        return _fieldName;
13808
      }
13809
    }
13810
 
13811
    // isset id assignments
13812
    private static final int __ITEMID_ISSET_ID = 0;
13813
    private static final int __FROMDATE_ISSET_ID = 1;
13814
    private static final int __TODATE_ISSET_ID = 2;
13815
    private BitSet __isset_bit_vector = new BitSet(3);
13816
 
13817
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13818
    static {
13819
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13820
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13821
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13822
      tmpMap.put(_Fields.FROM_DATE, new org.apache.thrift.meta_data.FieldMetaData("fromDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13823
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13824
      tmpMap.put(_Fields.TO_DATE, new org.apache.thrift.meta_data.FieldMetaData("toDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13825
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13826
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13827
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryScansForItem_args.class, metaDataMap);
13828
    }
13829
 
13830
    public getInventoryScansForItem_args() {
13831
    }
13832
 
13833
    public getInventoryScansForItem_args(
13834
      long itemId,
13835
      long fromDate,
13836
      long toDate)
13837
    {
13838
      this();
13839
      this.itemId = itemId;
13840
      setItemIdIsSet(true);
13841
      this.fromDate = fromDate;
13842
      setFromDateIsSet(true);
13843
      this.toDate = toDate;
13844
      setToDateIsSet(true);
13845
    }
13846
 
13847
    /**
13848
     * Performs a deep copy on <i>other</i>.
13849
     */
13850
    public getInventoryScansForItem_args(getInventoryScansForItem_args other) {
13851
      __isset_bit_vector.clear();
13852
      __isset_bit_vector.or(other.__isset_bit_vector);
13853
      this.itemId = other.itemId;
13854
      this.fromDate = other.fromDate;
13855
      this.toDate = other.toDate;
13856
    }
13857
 
13858
    public getInventoryScansForItem_args deepCopy() {
13859
      return new getInventoryScansForItem_args(this);
13860
    }
13861
 
13862
    @Override
13863
    public void clear() {
13864
      setItemIdIsSet(false);
13865
      this.itemId = 0;
13866
      setFromDateIsSet(false);
13867
      this.fromDate = 0;
13868
      setToDateIsSet(false);
13869
      this.toDate = 0;
13870
    }
13871
 
13872
    public long getItemId() {
13873
      return this.itemId;
13874
    }
13875
 
13876
    public void setItemId(long itemId) {
13877
      this.itemId = itemId;
13878
      setItemIdIsSet(true);
13879
    }
13880
 
13881
    public void unsetItemId() {
13882
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
13883
    }
13884
 
13885
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
13886
    public boolean isSetItemId() {
13887
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
13888
    }
13889
 
13890
    public void setItemIdIsSet(boolean value) {
13891
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
13892
    }
13893
 
13894
    public long getFromDate() {
13895
      return this.fromDate;
13896
    }
13897
 
13898
    public void setFromDate(long fromDate) {
13899
      this.fromDate = fromDate;
13900
      setFromDateIsSet(true);
13901
    }
13902
 
13903
    public void unsetFromDate() {
13904
      __isset_bit_vector.clear(__FROMDATE_ISSET_ID);
13905
    }
13906
 
13907
    /** Returns true if field fromDate is set (has been assigned a value) and false otherwise */
13908
    public boolean isSetFromDate() {
13909
      return __isset_bit_vector.get(__FROMDATE_ISSET_ID);
13910
    }
13911
 
13912
    public void setFromDateIsSet(boolean value) {
13913
      __isset_bit_vector.set(__FROMDATE_ISSET_ID, value);
13914
    }
13915
 
13916
    public long getToDate() {
13917
      return this.toDate;
13918
    }
13919
 
13920
    public void setToDate(long toDate) {
13921
      this.toDate = toDate;
13922
      setToDateIsSet(true);
13923
    }
13924
 
13925
    public void unsetToDate() {
13926
      __isset_bit_vector.clear(__TODATE_ISSET_ID);
13927
    }
13928
 
13929
    /** Returns true if field toDate is set (has been assigned a value) and false otherwise */
13930
    public boolean isSetToDate() {
13931
      return __isset_bit_vector.get(__TODATE_ISSET_ID);
13932
    }
13933
 
13934
    public void setToDateIsSet(boolean value) {
13935
      __isset_bit_vector.set(__TODATE_ISSET_ID, value);
13936
    }
13937
 
13938
    public void setFieldValue(_Fields field, Object value) {
13939
      switch (field) {
13940
      case ITEM_ID:
13941
        if (value == null) {
13942
          unsetItemId();
13943
        } else {
13944
          setItemId((Long)value);
13945
        }
13946
        break;
13947
 
13948
      case FROM_DATE:
13949
        if (value == null) {
13950
          unsetFromDate();
13951
        } else {
13952
          setFromDate((Long)value);
13953
        }
13954
        break;
13955
 
13956
      case TO_DATE:
13957
        if (value == null) {
13958
          unsetToDate();
13959
        } else {
13960
          setToDate((Long)value);
13961
        }
13962
        break;
13963
 
13964
      }
13965
    }
13966
 
13967
    public Object getFieldValue(_Fields field) {
13968
      switch (field) {
13969
      case ITEM_ID:
13970
        return Long.valueOf(getItemId());
13971
 
13972
      case FROM_DATE:
13973
        return Long.valueOf(getFromDate());
13974
 
13975
      case TO_DATE:
13976
        return Long.valueOf(getToDate());
13977
 
13978
      }
13979
      throw new IllegalStateException();
13980
    }
13981
 
13982
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13983
    public boolean isSet(_Fields field) {
13984
      if (field == null) {
13985
        throw new IllegalArgumentException();
13986
      }
13987
 
13988
      switch (field) {
13989
      case ITEM_ID:
13990
        return isSetItemId();
13991
      case FROM_DATE:
13992
        return isSetFromDate();
13993
      case TO_DATE:
13994
        return isSetToDate();
13995
      }
13996
      throw new IllegalStateException();
13997
    }
13998
 
13999
    @Override
14000
    public boolean equals(Object that) {
14001
      if (that == null)
14002
        return false;
14003
      if (that instanceof getInventoryScansForItem_args)
14004
        return this.equals((getInventoryScansForItem_args)that);
14005
      return false;
14006
    }
14007
 
14008
    public boolean equals(getInventoryScansForItem_args that) {
14009
      if (that == null)
14010
        return false;
14011
 
14012
      boolean this_present_itemId = true;
14013
      boolean that_present_itemId = true;
14014
      if (this_present_itemId || that_present_itemId) {
14015
        if (!(this_present_itemId && that_present_itemId))
14016
          return false;
14017
        if (this.itemId != that.itemId)
14018
          return false;
14019
      }
14020
 
14021
      boolean this_present_fromDate = true;
14022
      boolean that_present_fromDate = true;
14023
      if (this_present_fromDate || that_present_fromDate) {
14024
        if (!(this_present_fromDate && that_present_fromDate))
14025
          return false;
14026
        if (this.fromDate != that.fromDate)
14027
          return false;
14028
      }
14029
 
14030
      boolean this_present_toDate = true;
14031
      boolean that_present_toDate = true;
14032
      if (this_present_toDate || that_present_toDate) {
14033
        if (!(this_present_toDate && that_present_toDate))
14034
          return false;
14035
        if (this.toDate != that.toDate)
14036
          return false;
14037
      }
14038
 
14039
      return true;
14040
    }
14041
 
14042
    @Override
14043
    public int hashCode() {
14044
      return 0;
14045
    }
14046
 
14047
    public int compareTo(getInventoryScansForItem_args other) {
14048
      if (!getClass().equals(other.getClass())) {
14049
        return getClass().getName().compareTo(other.getClass().getName());
14050
      }
14051
 
14052
      int lastComparison = 0;
14053
      getInventoryScansForItem_args typedOther = (getInventoryScansForItem_args)other;
14054
 
14055
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
14056
      if (lastComparison != 0) {
14057
        return lastComparison;
14058
      }
14059
      if (isSetItemId()) {
14060
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
14061
        if (lastComparison != 0) {
14062
          return lastComparison;
14063
        }
14064
      }
14065
      lastComparison = Boolean.valueOf(isSetFromDate()).compareTo(typedOther.isSetFromDate());
14066
      if (lastComparison != 0) {
14067
        return lastComparison;
14068
      }
14069
      if (isSetFromDate()) {
14070
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fromDate, typedOther.fromDate);
14071
        if (lastComparison != 0) {
14072
          return lastComparison;
14073
        }
14074
      }
14075
      lastComparison = Boolean.valueOf(isSetToDate()).compareTo(typedOther.isSetToDate());
14076
      if (lastComparison != 0) {
14077
        return lastComparison;
14078
      }
14079
      if (isSetToDate()) {
14080
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.toDate, typedOther.toDate);
14081
        if (lastComparison != 0) {
14082
          return lastComparison;
14083
        }
14084
      }
14085
      return 0;
14086
    }
14087
 
14088
    public _Fields fieldForId(int fieldId) {
14089
      return _Fields.findByThriftId(fieldId);
14090
    }
14091
 
14092
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14093
      org.apache.thrift.protocol.TField field;
14094
      iprot.readStructBegin();
14095
      while (true)
14096
      {
14097
        field = iprot.readFieldBegin();
14098
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14099
          break;
14100
        }
14101
        switch (field.id) {
14102
          case 1: // ITEM_ID
14103
            if (field.type == org.apache.thrift.protocol.TType.I64) {
14104
              this.itemId = iprot.readI64();
14105
              setItemIdIsSet(true);
14106
            } else { 
14107
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14108
            }
14109
            break;
14110
          case 2: // FROM_DATE
14111
            if (field.type == org.apache.thrift.protocol.TType.I64) {
14112
              this.fromDate = iprot.readI64();
14113
              setFromDateIsSet(true);
14114
            } else { 
14115
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14116
            }
14117
            break;
14118
          case 3: // TO_DATE
14119
            if (field.type == org.apache.thrift.protocol.TType.I64) {
14120
              this.toDate = iprot.readI64();
14121
              setToDateIsSet(true);
14122
            } else { 
14123
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14124
            }
14125
            break;
14126
          default:
14127
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14128
        }
14129
        iprot.readFieldEnd();
14130
      }
14131
      iprot.readStructEnd();
14132
      validate();
14133
    }
14134
 
14135
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14136
      validate();
14137
 
14138
      oprot.writeStructBegin(STRUCT_DESC);
14139
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
14140
      oprot.writeI64(this.itemId);
14141
      oprot.writeFieldEnd();
14142
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
14143
      oprot.writeI64(this.fromDate);
14144
      oprot.writeFieldEnd();
14145
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
14146
      oprot.writeI64(this.toDate);
14147
      oprot.writeFieldEnd();
14148
      oprot.writeFieldStop();
14149
      oprot.writeStructEnd();
14150
    }
14151
 
14152
    @Override
14153
    public String toString() {
14154
      StringBuilder sb = new StringBuilder("getInventoryScansForItem_args(");
14155
      boolean first = true;
14156
 
14157
      sb.append("itemId:");
14158
      sb.append(this.itemId);
14159
      first = false;
14160
      if (!first) sb.append(", ");
14161
      sb.append("fromDate:");
14162
      sb.append(this.fromDate);
14163
      first = false;
14164
      if (!first) sb.append(", ");
14165
      sb.append("toDate:");
14166
      sb.append(this.toDate);
14167
      first = false;
14168
      sb.append(")");
14169
      return sb.toString();
14170
    }
14171
 
14172
    public void validate() throws org.apache.thrift.TException {
14173
      // check for required fields
14174
    }
14175
 
14176
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14177
      try {
14178
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14179
      } catch (org.apache.thrift.TException te) {
14180
        throw new java.io.IOException(te);
14181
      }
14182
    }
14183
 
14184
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14185
      try {
14186
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14187
      } catch (org.apache.thrift.TException te) {
14188
        throw new java.io.IOException(te);
14189
      }
14190
    }
14191
 
14192
  }
14193
 
14194
  public static class getInventoryScansForItem_result implements org.apache.thrift.TBase<getInventoryScansForItem_result, getInventoryScansForItem_result._Fields>, java.io.Serializable, Cloneable   {
14195
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryScansForItem_result");
14196
 
14197
    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);
14198
 
14199
    private List<Scan> success; // required
14200
 
14201
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14202
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14203
      SUCCESS((short)0, "success");
14204
 
14205
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14206
 
14207
      static {
14208
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14209
          byName.put(field.getFieldName(), field);
14210
        }
14211
      }
14212
 
14213
      /**
14214
       * Find the _Fields constant that matches fieldId, or null if its not found.
14215
       */
14216
      public static _Fields findByThriftId(int fieldId) {
14217
        switch(fieldId) {
14218
          case 0: // SUCCESS
14219
            return SUCCESS;
14220
          default:
14221
            return null;
14222
        }
14223
      }
14224
 
14225
      /**
14226
       * Find the _Fields constant that matches fieldId, throwing an exception
14227
       * if it is not found.
14228
       */
14229
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14230
        _Fields fields = findByThriftId(fieldId);
14231
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14232
        return fields;
14233
      }
14234
 
14235
      /**
14236
       * Find the _Fields constant that matches name, or null if its not found.
14237
       */
14238
      public static _Fields findByName(String name) {
14239
        return byName.get(name);
14240
      }
14241
 
14242
      private final short _thriftId;
14243
      private final String _fieldName;
14244
 
14245
      _Fields(short thriftId, String fieldName) {
14246
        _thriftId = thriftId;
14247
        _fieldName = fieldName;
14248
      }
14249
 
14250
      public short getThriftFieldId() {
14251
        return _thriftId;
14252
      }
14253
 
14254
      public String getFieldName() {
14255
        return _fieldName;
14256
      }
14257
    }
14258
 
14259
    // isset id assignments
14260
 
14261
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14262
    static {
14263
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14264
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14265
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
14266
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Scan.class))));
14267
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14268
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryScansForItem_result.class, metaDataMap);
14269
    }
14270
 
14271
    public getInventoryScansForItem_result() {
14272
    }
14273
 
14274
    public getInventoryScansForItem_result(
14275
      List<Scan> success)
14276
    {
14277
      this();
14278
      this.success = success;
14279
    }
14280
 
14281
    /**
14282
     * Performs a deep copy on <i>other</i>.
14283
     */
14284
    public getInventoryScansForItem_result(getInventoryScansForItem_result other) {
14285
      if (other.isSetSuccess()) {
14286
        List<Scan> __this__success = new ArrayList<Scan>();
14287
        for (Scan other_element : other.success) {
14288
          __this__success.add(new Scan(other_element));
14289
        }
14290
        this.success = __this__success;
14291
      }
14292
    }
14293
 
14294
    public getInventoryScansForItem_result deepCopy() {
14295
      return new getInventoryScansForItem_result(this);
14296
    }
14297
 
14298
    @Override
14299
    public void clear() {
14300
      this.success = null;
14301
    }
14302
 
14303
    public int getSuccessSize() {
14304
      return (this.success == null) ? 0 : this.success.size();
14305
    }
14306
 
14307
    public java.util.Iterator<Scan> getSuccessIterator() {
14308
      return (this.success == null) ? null : this.success.iterator();
14309
    }
14310
 
14311
    public void addToSuccess(Scan elem) {
14312
      if (this.success == null) {
14313
        this.success = new ArrayList<Scan>();
14314
      }
14315
      this.success.add(elem);
14316
    }
14317
 
14318
    public List<Scan> getSuccess() {
14319
      return this.success;
14320
    }
14321
 
14322
    public void setSuccess(List<Scan> success) {
14323
      this.success = success;
14324
    }
14325
 
14326
    public void unsetSuccess() {
14327
      this.success = null;
14328
    }
14329
 
14330
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
14331
    public boolean isSetSuccess() {
14332
      return this.success != null;
14333
    }
14334
 
14335
    public void setSuccessIsSet(boolean value) {
14336
      if (!value) {
14337
        this.success = null;
14338
      }
14339
    }
14340
 
14341
    public void setFieldValue(_Fields field, Object value) {
14342
      switch (field) {
14343
      case SUCCESS:
14344
        if (value == null) {
14345
          unsetSuccess();
14346
        } else {
14347
          setSuccess((List<Scan>)value);
14348
        }
14349
        break;
14350
 
14351
      }
14352
    }
14353
 
14354
    public Object getFieldValue(_Fields field) {
14355
      switch (field) {
14356
      case SUCCESS:
14357
        return getSuccess();
14358
 
14359
      }
14360
      throw new IllegalStateException();
14361
    }
14362
 
14363
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14364
    public boolean isSet(_Fields field) {
14365
      if (field == null) {
14366
        throw new IllegalArgumentException();
14367
      }
14368
 
14369
      switch (field) {
14370
      case SUCCESS:
14371
        return isSetSuccess();
14372
      }
14373
      throw new IllegalStateException();
14374
    }
14375
 
14376
    @Override
14377
    public boolean equals(Object that) {
14378
      if (that == null)
14379
        return false;
14380
      if (that instanceof getInventoryScansForItem_result)
14381
        return this.equals((getInventoryScansForItem_result)that);
14382
      return false;
14383
    }
14384
 
14385
    public boolean equals(getInventoryScansForItem_result that) {
14386
      if (that == null)
14387
        return false;
14388
 
14389
      boolean this_present_success = true && this.isSetSuccess();
14390
      boolean that_present_success = true && that.isSetSuccess();
14391
      if (this_present_success || that_present_success) {
14392
        if (!(this_present_success && that_present_success))
14393
          return false;
14394
        if (!this.success.equals(that.success))
14395
          return false;
14396
      }
14397
 
14398
      return true;
14399
    }
14400
 
14401
    @Override
14402
    public int hashCode() {
14403
      return 0;
14404
    }
14405
 
14406
    public int compareTo(getInventoryScansForItem_result other) {
14407
      if (!getClass().equals(other.getClass())) {
14408
        return getClass().getName().compareTo(other.getClass().getName());
14409
      }
14410
 
14411
      int lastComparison = 0;
14412
      getInventoryScansForItem_result typedOther = (getInventoryScansForItem_result)other;
14413
 
14414
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
14415
      if (lastComparison != 0) {
14416
        return lastComparison;
14417
      }
14418
      if (isSetSuccess()) {
14419
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
14420
        if (lastComparison != 0) {
14421
          return lastComparison;
14422
        }
14423
      }
14424
      return 0;
14425
    }
14426
 
14427
    public _Fields fieldForId(int fieldId) {
14428
      return _Fields.findByThriftId(fieldId);
14429
    }
14430
 
14431
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14432
      org.apache.thrift.protocol.TField field;
14433
      iprot.readStructBegin();
14434
      while (true)
14435
      {
14436
        field = iprot.readFieldBegin();
14437
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14438
          break;
14439
        }
14440
        switch (field.id) {
14441
          case 0: // SUCCESS
14442
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
14443
              {
7210 amar.kumar 14444
                org.apache.thrift.protocol.TList _list28 = iprot.readListBegin();
14445
                this.success = new ArrayList<Scan>(_list28.size);
14446
                for (int _i29 = 0; _i29 < _list28.size; ++_i29)
6322 amar.kumar 14447
                {
7210 amar.kumar 14448
                  Scan _elem30; // required
14449
                  _elem30 = new Scan();
14450
                  _elem30.read(iprot);
14451
                  this.success.add(_elem30);
6322 amar.kumar 14452
                }
14453
                iprot.readListEnd();
14454
              }
14455
            } else { 
14456
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14457
            }
14458
            break;
14459
          default:
14460
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14461
        }
14462
        iprot.readFieldEnd();
14463
      }
14464
      iprot.readStructEnd();
14465
      validate();
14466
    }
14467
 
14468
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14469
      oprot.writeStructBegin(STRUCT_DESC);
14470
 
14471
      if (this.isSetSuccess()) {
14472
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14473
        {
14474
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7210 amar.kumar 14475
          for (Scan _iter31 : this.success)
6322 amar.kumar 14476
          {
7210 amar.kumar 14477
            _iter31.write(oprot);
6322 amar.kumar 14478
          }
14479
          oprot.writeListEnd();
14480
        }
14481
        oprot.writeFieldEnd();
14482
      }
14483
      oprot.writeFieldStop();
14484
      oprot.writeStructEnd();
14485
    }
14486
 
14487
    @Override
14488
    public String toString() {
14489
      StringBuilder sb = new StringBuilder("getInventoryScansForItem_result(");
14490
      boolean first = true;
14491
 
14492
      sb.append("success:");
14493
      if (this.success == null) {
14494
        sb.append("null");
14495
      } else {
14496
        sb.append(this.success);
14497
      }
14498
      first = false;
14499
      sb.append(")");
14500
      return sb.toString();
14501
    }
14502
 
14503
    public void validate() throws org.apache.thrift.TException {
14504
      // check for required fields
14505
    }
14506
 
14507
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14508
      try {
14509
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14510
      } catch (org.apache.thrift.TException te) {
14511
        throw new java.io.IOException(te);
14512
      }
14513
    }
14514
 
14515
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14516
      try {
14517
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14518
      } catch (org.apache.thrift.TException te) {
14519
        throw new java.io.IOException(te);
14520
      }
14521
    }
14522
 
14523
  }
14524
 
14525
  public static class getScanRecordsForSerialNumber_args implements org.apache.thrift.TBase<getScanRecordsForSerialNumber_args, getScanRecordsForSerialNumber_args._Fields>, java.io.Serializable, Cloneable   {
14526
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScanRecordsForSerialNumber_args");
14527
 
14528
    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);
14529
 
14530
    private long serialNumber; // required
14531
 
14532
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14533
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14534
      SERIAL_NUMBER((short)1, "serialNumber");
14535
 
14536
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14537
 
14538
      static {
14539
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14540
          byName.put(field.getFieldName(), field);
14541
        }
14542
      }
14543
 
14544
      /**
14545
       * Find the _Fields constant that matches fieldId, or null if its not found.
14546
       */
14547
      public static _Fields findByThriftId(int fieldId) {
14548
        switch(fieldId) {
14549
          case 1: // SERIAL_NUMBER
14550
            return SERIAL_NUMBER;
14551
          default:
14552
            return null;
14553
        }
14554
      }
14555
 
14556
      /**
14557
       * Find the _Fields constant that matches fieldId, throwing an exception
14558
       * if it is not found.
14559
       */
14560
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14561
        _Fields fields = findByThriftId(fieldId);
14562
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14563
        return fields;
14564
      }
14565
 
14566
      /**
14567
       * Find the _Fields constant that matches name, or null if its not found.
14568
       */
14569
      public static _Fields findByName(String name) {
14570
        return byName.get(name);
14571
      }
14572
 
14573
      private final short _thriftId;
14574
      private final String _fieldName;
14575
 
14576
      _Fields(short thriftId, String fieldName) {
14577
        _thriftId = thriftId;
14578
        _fieldName = fieldName;
14579
      }
14580
 
14581
      public short getThriftFieldId() {
14582
        return _thriftId;
14583
      }
14584
 
14585
      public String getFieldName() {
14586
        return _fieldName;
14587
      }
14588
    }
14589
 
14590
    // isset id assignments
14591
    private static final int __SERIALNUMBER_ISSET_ID = 0;
14592
    private BitSet __isset_bit_vector = new BitSet(1);
14593
 
14594
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14595
    static {
14596
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14597
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14598
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
14599
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14600
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScanRecordsForSerialNumber_args.class, metaDataMap);
14601
    }
14602
 
14603
    public getScanRecordsForSerialNumber_args() {
14604
    }
14605
 
14606
    public getScanRecordsForSerialNumber_args(
14607
      long serialNumber)
14608
    {
14609
      this();
14610
      this.serialNumber = serialNumber;
14611
      setSerialNumberIsSet(true);
14612
    }
14613
 
14614
    /**
14615
     * Performs a deep copy on <i>other</i>.
14616
     */
14617
    public getScanRecordsForSerialNumber_args(getScanRecordsForSerialNumber_args other) {
14618
      __isset_bit_vector.clear();
14619
      __isset_bit_vector.or(other.__isset_bit_vector);
14620
      this.serialNumber = other.serialNumber;
14621
    }
14622
 
14623
    public getScanRecordsForSerialNumber_args deepCopy() {
14624
      return new getScanRecordsForSerialNumber_args(this);
14625
    }
14626
 
14627
    @Override
14628
    public void clear() {
14629
      setSerialNumberIsSet(false);
14630
      this.serialNumber = 0;
14631
    }
14632
 
14633
    public long getSerialNumber() {
14634
      return this.serialNumber;
14635
    }
14636
 
14637
    public void setSerialNumber(long serialNumber) {
14638
      this.serialNumber = serialNumber;
14639
      setSerialNumberIsSet(true);
14640
    }
14641
 
14642
    public void unsetSerialNumber() {
14643
      __isset_bit_vector.clear(__SERIALNUMBER_ISSET_ID);
14644
    }
14645
 
14646
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
14647
    public boolean isSetSerialNumber() {
14648
      return __isset_bit_vector.get(__SERIALNUMBER_ISSET_ID);
14649
    }
14650
 
14651
    public void setSerialNumberIsSet(boolean value) {
14652
      __isset_bit_vector.set(__SERIALNUMBER_ISSET_ID, value);
14653
    }
14654
 
14655
    public void setFieldValue(_Fields field, Object value) {
14656
      switch (field) {
14657
      case SERIAL_NUMBER:
14658
        if (value == null) {
14659
          unsetSerialNumber();
14660
        } else {
14661
          setSerialNumber((Long)value);
14662
        }
14663
        break;
14664
 
14665
      }
14666
    }
14667
 
14668
    public Object getFieldValue(_Fields field) {
14669
      switch (field) {
14670
      case SERIAL_NUMBER:
14671
        return Long.valueOf(getSerialNumber());
14672
 
14673
      }
14674
      throw new IllegalStateException();
14675
    }
14676
 
14677
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14678
    public boolean isSet(_Fields field) {
14679
      if (field == null) {
14680
        throw new IllegalArgumentException();
14681
      }
14682
 
14683
      switch (field) {
14684
      case SERIAL_NUMBER:
14685
        return isSetSerialNumber();
14686
      }
14687
      throw new IllegalStateException();
14688
    }
14689
 
14690
    @Override
14691
    public boolean equals(Object that) {
14692
      if (that == null)
14693
        return false;
14694
      if (that instanceof getScanRecordsForSerialNumber_args)
14695
        return this.equals((getScanRecordsForSerialNumber_args)that);
14696
      return false;
14697
    }
14698
 
14699
    public boolean equals(getScanRecordsForSerialNumber_args that) {
14700
      if (that == null)
14701
        return false;
14702
 
14703
      boolean this_present_serialNumber = true;
14704
      boolean that_present_serialNumber = true;
14705
      if (this_present_serialNumber || that_present_serialNumber) {
14706
        if (!(this_present_serialNumber && that_present_serialNumber))
14707
          return false;
14708
        if (this.serialNumber != that.serialNumber)
14709
          return false;
14710
      }
14711
 
14712
      return true;
14713
    }
14714
 
14715
    @Override
14716
    public int hashCode() {
14717
      return 0;
14718
    }
14719
 
14720
    public int compareTo(getScanRecordsForSerialNumber_args other) {
14721
      if (!getClass().equals(other.getClass())) {
14722
        return getClass().getName().compareTo(other.getClass().getName());
14723
      }
14724
 
14725
      int lastComparison = 0;
14726
      getScanRecordsForSerialNumber_args typedOther = (getScanRecordsForSerialNumber_args)other;
14727
 
14728
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
14729
      if (lastComparison != 0) {
14730
        return lastComparison;
14731
      }
14732
      if (isSetSerialNumber()) {
14733
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
14734
        if (lastComparison != 0) {
14735
          return lastComparison;
14736
        }
14737
      }
14738
      return 0;
14739
    }
14740
 
14741
    public _Fields fieldForId(int fieldId) {
14742
      return _Fields.findByThriftId(fieldId);
14743
    }
14744
 
14745
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14746
      org.apache.thrift.protocol.TField field;
14747
      iprot.readStructBegin();
14748
      while (true)
14749
      {
14750
        field = iprot.readFieldBegin();
14751
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14752
          break;
14753
        }
14754
        switch (field.id) {
14755
          case 1: // SERIAL_NUMBER
14756
            if (field.type == org.apache.thrift.protocol.TType.I64) {
14757
              this.serialNumber = iprot.readI64();
14758
              setSerialNumberIsSet(true);
14759
            } else { 
14760
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14761
            }
14762
            break;
14763
          default:
14764
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14765
        }
14766
        iprot.readFieldEnd();
14767
      }
14768
      iprot.readStructEnd();
14769
      validate();
14770
    }
14771
 
14772
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14773
      validate();
14774
 
14775
      oprot.writeStructBegin(STRUCT_DESC);
14776
      oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
14777
      oprot.writeI64(this.serialNumber);
14778
      oprot.writeFieldEnd();
14779
      oprot.writeFieldStop();
14780
      oprot.writeStructEnd();
14781
    }
14782
 
14783
    @Override
14784
    public String toString() {
14785
      StringBuilder sb = new StringBuilder("getScanRecordsForSerialNumber_args(");
14786
      boolean first = true;
14787
 
14788
      sb.append("serialNumber:");
14789
      sb.append(this.serialNumber);
14790
      first = false;
14791
      sb.append(")");
14792
      return sb.toString();
14793
    }
14794
 
14795
    public void validate() throws org.apache.thrift.TException {
14796
      // check for required fields
14797
    }
14798
 
14799
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14800
      try {
14801
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14802
      } catch (org.apache.thrift.TException te) {
14803
        throw new java.io.IOException(te);
14804
      }
14805
    }
14806
 
14807
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14808
      try {
14809
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
14810
        __isset_bit_vector = new BitSet(1);
14811
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14812
      } catch (org.apache.thrift.TException te) {
14813
        throw new java.io.IOException(te);
14814
      }
14815
    }
14816
 
14817
  }
14818
 
14819
  public static class getScanRecordsForSerialNumber_result implements org.apache.thrift.TBase<getScanRecordsForSerialNumber_result, getScanRecordsForSerialNumber_result._Fields>, java.io.Serializable, Cloneable   {
14820
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScanRecordsForSerialNumber_result");
14821
 
14822
    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);
14823
 
14824
    private List<Scan> success; // required
14825
 
14826
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14827
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14828
      SUCCESS((short)0, "success");
14829
 
14830
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14831
 
14832
      static {
14833
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14834
          byName.put(field.getFieldName(), field);
14835
        }
14836
      }
14837
 
14838
      /**
14839
       * Find the _Fields constant that matches fieldId, or null if its not found.
14840
       */
14841
      public static _Fields findByThriftId(int fieldId) {
14842
        switch(fieldId) {
14843
          case 0: // SUCCESS
14844
            return SUCCESS;
14845
          default:
14846
            return null;
14847
        }
14848
      }
14849
 
14850
      /**
14851
       * Find the _Fields constant that matches fieldId, throwing an exception
14852
       * if it is not found.
14853
       */
14854
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14855
        _Fields fields = findByThriftId(fieldId);
14856
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14857
        return fields;
14858
      }
14859
 
14860
      /**
14861
       * Find the _Fields constant that matches name, or null if its not found.
14862
       */
14863
      public static _Fields findByName(String name) {
14864
        return byName.get(name);
14865
      }
14866
 
14867
      private final short _thriftId;
14868
      private final String _fieldName;
14869
 
14870
      _Fields(short thriftId, String fieldName) {
14871
        _thriftId = thriftId;
14872
        _fieldName = fieldName;
14873
      }
14874
 
14875
      public short getThriftFieldId() {
14876
        return _thriftId;
14877
      }
14878
 
14879
      public String getFieldName() {
14880
        return _fieldName;
14881
      }
14882
    }
14883
 
14884
    // isset id assignments
14885
 
14886
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14887
    static {
14888
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14889
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14890
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
14891
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Scan.class))));
14892
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14893
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScanRecordsForSerialNumber_result.class, metaDataMap);
14894
    }
14895
 
14896
    public getScanRecordsForSerialNumber_result() {
14897
    }
14898
 
14899
    public getScanRecordsForSerialNumber_result(
14900
      List<Scan> success)
14901
    {
14902
      this();
14903
      this.success = success;
14904
    }
14905
 
14906
    /**
14907
     * Performs a deep copy on <i>other</i>.
14908
     */
14909
    public getScanRecordsForSerialNumber_result(getScanRecordsForSerialNumber_result other) {
14910
      if (other.isSetSuccess()) {
14911
        List<Scan> __this__success = new ArrayList<Scan>();
14912
        for (Scan other_element : other.success) {
14913
          __this__success.add(new Scan(other_element));
14914
        }
14915
        this.success = __this__success;
14916
      }
14917
    }
14918
 
14919
    public getScanRecordsForSerialNumber_result deepCopy() {
14920
      return new getScanRecordsForSerialNumber_result(this);
14921
    }
14922
 
14923
    @Override
14924
    public void clear() {
14925
      this.success = null;
14926
    }
14927
 
14928
    public int getSuccessSize() {
14929
      return (this.success == null) ? 0 : this.success.size();
14930
    }
14931
 
14932
    public java.util.Iterator<Scan> getSuccessIterator() {
14933
      return (this.success == null) ? null : this.success.iterator();
14934
    }
14935
 
14936
    public void addToSuccess(Scan elem) {
14937
      if (this.success == null) {
14938
        this.success = new ArrayList<Scan>();
14939
      }
14940
      this.success.add(elem);
14941
    }
14942
 
14943
    public List<Scan> getSuccess() {
14944
      return this.success;
14945
    }
14946
 
14947
    public void setSuccess(List<Scan> success) {
14948
      this.success = success;
14949
    }
14950
 
14951
    public void unsetSuccess() {
14952
      this.success = null;
14953
    }
14954
 
14955
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
14956
    public boolean isSetSuccess() {
14957
      return this.success != null;
14958
    }
14959
 
14960
    public void setSuccessIsSet(boolean value) {
14961
      if (!value) {
14962
        this.success = null;
14963
      }
14964
    }
14965
 
14966
    public void setFieldValue(_Fields field, Object value) {
14967
      switch (field) {
14968
      case SUCCESS:
14969
        if (value == null) {
14970
          unsetSuccess();
14971
        } else {
14972
          setSuccess((List<Scan>)value);
14973
        }
14974
        break;
14975
 
14976
      }
14977
    }
14978
 
14979
    public Object getFieldValue(_Fields field) {
14980
      switch (field) {
14981
      case SUCCESS:
14982
        return getSuccess();
14983
 
14984
      }
14985
      throw new IllegalStateException();
14986
    }
14987
 
14988
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14989
    public boolean isSet(_Fields field) {
14990
      if (field == null) {
14991
        throw new IllegalArgumentException();
14992
      }
14993
 
14994
      switch (field) {
14995
      case SUCCESS:
14996
        return isSetSuccess();
14997
      }
14998
      throw new IllegalStateException();
14999
    }
15000
 
15001
    @Override
15002
    public boolean equals(Object that) {
15003
      if (that == null)
15004
        return false;
15005
      if (that instanceof getScanRecordsForSerialNumber_result)
15006
        return this.equals((getScanRecordsForSerialNumber_result)that);
15007
      return false;
15008
    }
15009
 
15010
    public boolean equals(getScanRecordsForSerialNumber_result that) {
15011
      if (that == null)
15012
        return false;
15013
 
15014
      boolean this_present_success = true && this.isSetSuccess();
15015
      boolean that_present_success = true && that.isSetSuccess();
15016
      if (this_present_success || that_present_success) {
15017
        if (!(this_present_success && that_present_success))
15018
          return false;
15019
        if (!this.success.equals(that.success))
15020
          return false;
15021
      }
15022
 
15023
      return true;
15024
    }
15025
 
15026
    @Override
15027
    public int hashCode() {
15028
      return 0;
15029
    }
15030
 
15031
    public int compareTo(getScanRecordsForSerialNumber_result other) {
15032
      if (!getClass().equals(other.getClass())) {
15033
        return getClass().getName().compareTo(other.getClass().getName());
15034
      }
15035
 
15036
      int lastComparison = 0;
15037
      getScanRecordsForSerialNumber_result typedOther = (getScanRecordsForSerialNumber_result)other;
15038
 
15039
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
15040
      if (lastComparison != 0) {
15041
        return lastComparison;
15042
      }
15043
      if (isSetSuccess()) {
15044
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
15045
        if (lastComparison != 0) {
15046
          return lastComparison;
15047
        }
15048
      }
15049
      return 0;
15050
    }
15051
 
15052
    public _Fields fieldForId(int fieldId) {
15053
      return _Fields.findByThriftId(fieldId);
15054
    }
15055
 
15056
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15057
      org.apache.thrift.protocol.TField field;
15058
      iprot.readStructBegin();
15059
      while (true)
15060
      {
15061
        field = iprot.readFieldBegin();
15062
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15063
          break;
15064
        }
15065
        switch (field.id) {
15066
          case 0: // SUCCESS
15067
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
15068
              {
7210 amar.kumar 15069
                org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
15070
                this.success = new ArrayList<Scan>(_list32.size);
15071
                for (int _i33 = 0; _i33 < _list32.size; ++_i33)
6322 amar.kumar 15072
                {
7210 amar.kumar 15073
                  Scan _elem34; // required
15074
                  _elem34 = new Scan();
15075
                  _elem34.read(iprot);
15076
                  this.success.add(_elem34);
6322 amar.kumar 15077
                }
15078
                iprot.readListEnd();
15079
              }
15080
            } else { 
15081
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15082
            }
15083
            break;
15084
          default:
15085
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15086
        }
15087
        iprot.readFieldEnd();
15088
      }
15089
      iprot.readStructEnd();
15090
      validate();
15091
    }
15092
 
15093
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15094
      oprot.writeStructBegin(STRUCT_DESC);
15095
 
15096
      if (this.isSetSuccess()) {
15097
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15098
        {
15099
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7210 amar.kumar 15100
          for (Scan _iter35 : this.success)
6322 amar.kumar 15101
          {
7210 amar.kumar 15102
            _iter35.write(oprot);
6322 amar.kumar 15103
          }
15104
          oprot.writeListEnd();
15105
        }
15106
        oprot.writeFieldEnd();
15107
      }
15108
      oprot.writeFieldStop();
15109
      oprot.writeStructEnd();
15110
    }
15111
 
15112
    @Override
15113
    public String toString() {
15114
      StringBuilder sb = new StringBuilder("getScanRecordsForSerialNumber_result(");
15115
      boolean first = true;
15116
 
15117
      sb.append("success:");
15118
      if (this.success == null) {
15119
        sb.append("null");
15120
      } else {
15121
        sb.append(this.success);
15122
      }
15123
      first = false;
15124
      sb.append(")");
15125
      return sb.toString();
15126
    }
15127
 
15128
    public void validate() throws org.apache.thrift.TException {
15129
      // check for required fields
15130
    }
15131
 
15132
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15133
      try {
15134
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15135
      } catch (org.apache.thrift.TException te) {
15136
        throw new java.io.IOException(te);
15137
      }
15138
    }
15139
 
15140
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15141
      try {
15142
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15143
      } catch (org.apache.thrift.TException te) {
15144
        throw new java.io.IOException(te);
15145
      }
15146
    }
15147
 
15148
  }
15149
 
6467 amar.kumar 15150
  public static class scanForPurchaseReturn_args implements org.apache.thrift.TBase<scanForPurchaseReturn_args, scanForPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
15151
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForPurchaseReturn_args");
15152
 
15153
    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);
15154
    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);
15155
 
15156
    private List<InventoryItem> saleReturnItems; // required
15157
    private long vendorId; // required
15158
 
15159
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15160
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15161
      SALE_RETURN_ITEMS((short)1, "saleReturnItems"),
15162
      VENDOR_ID((short)2, "vendorId");
15163
 
15164
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15165
 
15166
      static {
15167
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15168
          byName.put(field.getFieldName(), field);
15169
        }
15170
      }
15171
 
15172
      /**
15173
       * Find the _Fields constant that matches fieldId, or null if its not found.
15174
       */
15175
      public static _Fields findByThriftId(int fieldId) {
15176
        switch(fieldId) {
15177
          case 1: // SALE_RETURN_ITEMS
15178
            return SALE_RETURN_ITEMS;
15179
          case 2: // VENDOR_ID
15180
            return VENDOR_ID;
15181
          default:
15182
            return null;
15183
        }
15184
      }
15185
 
15186
      /**
15187
       * Find the _Fields constant that matches fieldId, throwing an exception
15188
       * if it is not found.
15189
       */
15190
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15191
        _Fields fields = findByThriftId(fieldId);
15192
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15193
        return fields;
15194
      }
15195
 
15196
      /**
15197
       * Find the _Fields constant that matches name, or null if its not found.
15198
       */
15199
      public static _Fields findByName(String name) {
15200
        return byName.get(name);
15201
      }
15202
 
15203
      private final short _thriftId;
15204
      private final String _fieldName;
15205
 
15206
      _Fields(short thriftId, String fieldName) {
15207
        _thriftId = thriftId;
15208
        _fieldName = fieldName;
15209
      }
15210
 
15211
      public short getThriftFieldId() {
15212
        return _thriftId;
15213
      }
15214
 
15215
      public String getFieldName() {
15216
        return _fieldName;
15217
      }
15218
    }
15219
 
15220
    // isset id assignments
15221
    private static final int __VENDORID_ISSET_ID = 0;
15222
    private BitSet __isset_bit_vector = new BitSet(1);
15223
 
15224
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15225
    static {
15226
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15227
      tmpMap.put(_Fields.SALE_RETURN_ITEMS, new org.apache.thrift.meta_data.FieldMetaData("saleReturnItems", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15228
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
15229
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class))));
15230
      tmpMap.put(_Fields.VENDOR_ID, new org.apache.thrift.meta_data.FieldMetaData("vendorId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15231
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
15232
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15233
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForPurchaseReturn_args.class, metaDataMap);
15234
    }
15235
 
15236
    public scanForPurchaseReturn_args() {
15237
    }
15238
 
15239
    public scanForPurchaseReturn_args(
15240
      List<InventoryItem> saleReturnItems,
15241
      long vendorId)
15242
    {
15243
      this();
15244
      this.saleReturnItems = saleReturnItems;
15245
      this.vendorId = vendorId;
15246
      setVendorIdIsSet(true);
15247
    }
15248
 
15249
    /**
15250
     * Performs a deep copy on <i>other</i>.
15251
     */
15252
    public scanForPurchaseReturn_args(scanForPurchaseReturn_args other) {
15253
      __isset_bit_vector.clear();
15254
      __isset_bit_vector.or(other.__isset_bit_vector);
15255
      if (other.isSetSaleReturnItems()) {
15256
        List<InventoryItem> __this__saleReturnItems = new ArrayList<InventoryItem>();
15257
        for (InventoryItem other_element : other.saleReturnItems) {
15258
          __this__saleReturnItems.add(new InventoryItem(other_element));
15259
        }
15260
        this.saleReturnItems = __this__saleReturnItems;
15261
      }
15262
      this.vendorId = other.vendorId;
15263
    }
15264
 
15265
    public scanForPurchaseReturn_args deepCopy() {
15266
      return new scanForPurchaseReturn_args(this);
15267
    }
15268
 
15269
    @Override
15270
    public void clear() {
15271
      this.saleReturnItems = null;
15272
      setVendorIdIsSet(false);
15273
      this.vendorId = 0;
15274
    }
15275
 
15276
    public int getSaleReturnItemsSize() {
15277
      return (this.saleReturnItems == null) ? 0 : this.saleReturnItems.size();
15278
    }
15279
 
15280
    public java.util.Iterator<InventoryItem> getSaleReturnItemsIterator() {
15281
      return (this.saleReturnItems == null) ? null : this.saleReturnItems.iterator();
15282
    }
15283
 
15284
    public void addToSaleReturnItems(InventoryItem elem) {
15285
      if (this.saleReturnItems == null) {
15286
        this.saleReturnItems = new ArrayList<InventoryItem>();
15287
      }
15288
      this.saleReturnItems.add(elem);
15289
    }
15290
 
15291
    public List<InventoryItem> getSaleReturnItems() {
15292
      return this.saleReturnItems;
15293
    }
15294
 
15295
    public void setSaleReturnItems(List<InventoryItem> saleReturnItems) {
15296
      this.saleReturnItems = saleReturnItems;
15297
    }
15298
 
15299
    public void unsetSaleReturnItems() {
15300
      this.saleReturnItems = null;
15301
    }
15302
 
15303
    /** Returns true if field saleReturnItems is set (has been assigned a value) and false otherwise */
15304
    public boolean isSetSaleReturnItems() {
15305
      return this.saleReturnItems != null;
15306
    }
15307
 
15308
    public void setSaleReturnItemsIsSet(boolean value) {
15309
      if (!value) {
15310
        this.saleReturnItems = null;
15311
      }
15312
    }
15313
 
15314
    public long getVendorId() {
15315
      return this.vendorId;
15316
    }
15317
 
15318
    public void setVendorId(long vendorId) {
15319
      this.vendorId = vendorId;
15320
      setVendorIdIsSet(true);
15321
    }
15322
 
15323
    public void unsetVendorId() {
15324
      __isset_bit_vector.clear(__VENDORID_ISSET_ID);
15325
    }
15326
 
15327
    /** Returns true if field vendorId is set (has been assigned a value) and false otherwise */
15328
    public boolean isSetVendorId() {
15329
      return __isset_bit_vector.get(__VENDORID_ISSET_ID);
15330
    }
15331
 
15332
    public void setVendorIdIsSet(boolean value) {
15333
      __isset_bit_vector.set(__VENDORID_ISSET_ID, value);
15334
    }
15335
 
15336
    public void setFieldValue(_Fields field, Object value) {
15337
      switch (field) {
15338
      case SALE_RETURN_ITEMS:
15339
        if (value == null) {
15340
          unsetSaleReturnItems();
15341
        } else {
15342
          setSaleReturnItems((List<InventoryItem>)value);
15343
        }
15344
        break;
15345
 
15346
      case VENDOR_ID:
15347
        if (value == null) {
15348
          unsetVendorId();
15349
        } else {
15350
          setVendorId((Long)value);
15351
        }
15352
        break;
15353
 
15354
      }
15355
    }
15356
 
15357
    public Object getFieldValue(_Fields field) {
15358
      switch (field) {
15359
      case SALE_RETURN_ITEMS:
15360
        return getSaleReturnItems();
15361
 
15362
      case VENDOR_ID:
15363
        return Long.valueOf(getVendorId());
15364
 
15365
      }
15366
      throw new IllegalStateException();
15367
    }
15368
 
15369
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15370
    public boolean isSet(_Fields field) {
15371
      if (field == null) {
15372
        throw new IllegalArgumentException();
15373
      }
15374
 
15375
      switch (field) {
15376
      case SALE_RETURN_ITEMS:
15377
        return isSetSaleReturnItems();
15378
      case VENDOR_ID:
15379
        return isSetVendorId();
15380
      }
15381
      throw new IllegalStateException();
15382
    }
15383
 
15384
    @Override
15385
    public boolean equals(Object that) {
15386
      if (that == null)
15387
        return false;
15388
      if (that instanceof scanForPurchaseReturn_args)
15389
        return this.equals((scanForPurchaseReturn_args)that);
15390
      return false;
15391
    }
15392
 
15393
    public boolean equals(scanForPurchaseReturn_args that) {
15394
      if (that == null)
15395
        return false;
15396
 
15397
      boolean this_present_saleReturnItems = true && this.isSetSaleReturnItems();
15398
      boolean that_present_saleReturnItems = true && that.isSetSaleReturnItems();
15399
      if (this_present_saleReturnItems || that_present_saleReturnItems) {
15400
        if (!(this_present_saleReturnItems && that_present_saleReturnItems))
15401
          return false;
15402
        if (!this.saleReturnItems.equals(that.saleReturnItems))
15403
          return false;
15404
      }
15405
 
15406
      boolean this_present_vendorId = true;
15407
      boolean that_present_vendorId = true;
15408
      if (this_present_vendorId || that_present_vendorId) {
15409
        if (!(this_present_vendorId && that_present_vendorId))
15410
          return false;
15411
        if (this.vendorId != that.vendorId)
15412
          return false;
15413
      }
15414
 
15415
      return true;
15416
    }
15417
 
15418
    @Override
15419
    public int hashCode() {
15420
      return 0;
15421
    }
15422
 
15423
    public int compareTo(scanForPurchaseReturn_args other) {
15424
      if (!getClass().equals(other.getClass())) {
15425
        return getClass().getName().compareTo(other.getClass().getName());
15426
      }
15427
 
15428
      int lastComparison = 0;
15429
      scanForPurchaseReturn_args typedOther = (scanForPurchaseReturn_args)other;
15430
 
15431
      lastComparison = Boolean.valueOf(isSetSaleReturnItems()).compareTo(typedOther.isSetSaleReturnItems());
15432
      if (lastComparison != 0) {
15433
        return lastComparison;
15434
      }
15435
      if (isSetSaleReturnItems()) {
15436
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.saleReturnItems, typedOther.saleReturnItems);
15437
        if (lastComparison != 0) {
15438
          return lastComparison;
15439
        }
15440
      }
15441
      lastComparison = Boolean.valueOf(isSetVendorId()).compareTo(typedOther.isSetVendorId());
15442
      if (lastComparison != 0) {
15443
        return lastComparison;
15444
      }
15445
      if (isSetVendorId()) {
15446
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vendorId, typedOther.vendorId);
15447
        if (lastComparison != 0) {
15448
          return lastComparison;
15449
        }
15450
      }
15451
      return 0;
15452
    }
15453
 
15454
    public _Fields fieldForId(int fieldId) {
15455
      return _Fields.findByThriftId(fieldId);
15456
    }
15457
 
15458
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15459
      org.apache.thrift.protocol.TField field;
15460
      iprot.readStructBegin();
15461
      while (true)
15462
      {
15463
        field = iprot.readFieldBegin();
15464
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15465
          break;
15466
        }
15467
        switch (field.id) {
15468
          case 1: // SALE_RETURN_ITEMS
15469
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
15470
              {
7210 amar.kumar 15471
                org.apache.thrift.protocol.TList _list36 = iprot.readListBegin();
15472
                this.saleReturnItems = new ArrayList<InventoryItem>(_list36.size);
15473
                for (int _i37 = 0; _i37 < _list36.size; ++_i37)
6467 amar.kumar 15474
                {
7210 amar.kumar 15475
                  InventoryItem _elem38; // required
15476
                  _elem38 = new InventoryItem();
15477
                  _elem38.read(iprot);
15478
                  this.saleReturnItems.add(_elem38);
6467 amar.kumar 15479
                }
15480
                iprot.readListEnd();
15481
              }
15482
            } else { 
15483
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15484
            }
15485
            break;
15486
          case 2: // VENDOR_ID
15487
            if (field.type == org.apache.thrift.protocol.TType.I64) {
15488
              this.vendorId = iprot.readI64();
15489
              setVendorIdIsSet(true);
15490
            } else { 
15491
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15492
            }
15493
            break;
15494
          default:
15495
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15496
        }
15497
        iprot.readFieldEnd();
15498
      }
15499
      iprot.readStructEnd();
15500
      validate();
15501
    }
15502
 
15503
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15504
      validate();
15505
 
15506
      oprot.writeStructBegin(STRUCT_DESC);
15507
      if (this.saleReturnItems != null) {
15508
        oprot.writeFieldBegin(SALE_RETURN_ITEMS_FIELD_DESC);
15509
        {
15510
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.saleReturnItems.size()));
7210 amar.kumar 15511
          for (InventoryItem _iter39 : this.saleReturnItems)
6467 amar.kumar 15512
          {
7210 amar.kumar 15513
            _iter39.write(oprot);
6467 amar.kumar 15514
          }
15515
          oprot.writeListEnd();
15516
        }
15517
        oprot.writeFieldEnd();
15518
      }
15519
      oprot.writeFieldBegin(VENDOR_ID_FIELD_DESC);
15520
      oprot.writeI64(this.vendorId);
15521
      oprot.writeFieldEnd();
15522
      oprot.writeFieldStop();
15523
      oprot.writeStructEnd();
15524
    }
15525
 
15526
    @Override
15527
    public String toString() {
15528
      StringBuilder sb = new StringBuilder("scanForPurchaseReturn_args(");
15529
      boolean first = true;
15530
 
15531
      sb.append("saleReturnItems:");
15532
      if (this.saleReturnItems == null) {
15533
        sb.append("null");
15534
      } else {
15535
        sb.append(this.saleReturnItems);
15536
      }
15537
      first = false;
15538
      if (!first) sb.append(", ");
15539
      sb.append("vendorId:");
15540
      sb.append(this.vendorId);
15541
      first = false;
15542
      sb.append(")");
15543
      return sb.toString();
15544
    }
15545
 
15546
    public void validate() throws org.apache.thrift.TException {
15547
      // check for required fields
15548
    }
15549
 
15550
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15551
      try {
15552
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15553
      } catch (org.apache.thrift.TException te) {
15554
        throw new java.io.IOException(te);
15555
      }
15556
    }
15557
 
15558
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15559
      try {
15560
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15561
      } catch (org.apache.thrift.TException te) {
15562
        throw new java.io.IOException(te);
15563
      }
15564
    }
15565
 
15566
  }
15567
 
15568
  public static class scanForPurchaseReturn_result implements org.apache.thrift.TBase<scanForPurchaseReturn_result, scanForPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
15569
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForPurchaseReturn_result");
15570
 
15571
    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);
15572
 
15573
    private WarehouseServiceException ex; // required
15574
 
15575
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15576
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15577
      EX((short)1, "ex");
15578
 
15579
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15580
 
15581
      static {
15582
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15583
          byName.put(field.getFieldName(), field);
15584
        }
15585
      }
15586
 
15587
      /**
15588
       * Find the _Fields constant that matches fieldId, or null if its not found.
15589
       */
15590
      public static _Fields findByThriftId(int fieldId) {
15591
        switch(fieldId) {
15592
          case 1: // EX
15593
            return EX;
15594
          default:
15595
            return null;
15596
        }
15597
      }
15598
 
15599
      /**
15600
       * Find the _Fields constant that matches fieldId, throwing an exception
15601
       * if it is not found.
15602
       */
15603
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15604
        _Fields fields = findByThriftId(fieldId);
15605
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15606
        return fields;
15607
      }
15608
 
15609
      /**
15610
       * Find the _Fields constant that matches name, or null if its not found.
15611
       */
15612
      public static _Fields findByName(String name) {
15613
        return byName.get(name);
15614
      }
15615
 
15616
      private final short _thriftId;
15617
      private final String _fieldName;
15618
 
15619
      _Fields(short thriftId, String fieldName) {
15620
        _thriftId = thriftId;
15621
        _fieldName = fieldName;
15622
      }
15623
 
15624
      public short getThriftFieldId() {
15625
        return _thriftId;
15626
      }
15627
 
15628
      public String getFieldName() {
15629
        return _fieldName;
15630
      }
15631
    }
15632
 
15633
    // isset id assignments
15634
 
15635
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15636
    static {
15637
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15638
      tmpMap.put(_Fields.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15639
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
15640
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15641
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForPurchaseReturn_result.class, metaDataMap);
15642
    }
15643
 
15644
    public scanForPurchaseReturn_result() {
15645
    }
15646
 
15647
    public scanForPurchaseReturn_result(
15648
      WarehouseServiceException ex)
15649
    {
15650
      this();
15651
      this.ex = ex;
15652
    }
15653
 
15654
    /**
15655
     * Performs a deep copy on <i>other</i>.
15656
     */
15657
    public scanForPurchaseReturn_result(scanForPurchaseReturn_result other) {
15658
      if (other.isSetEx()) {
15659
        this.ex = new WarehouseServiceException(other.ex);
15660
      }
15661
    }
15662
 
15663
    public scanForPurchaseReturn_result deepCopy() {
15664
      return new scanForPurchaseReturn_result(this);
15665
    }
15666
 
15667
    @Override
15668
    public void clear() {
15669
      this.ex = null;
15670
    }
15671
 
15672
    public WarehouseServiceException getEx() {
15673
      return this.ex;
15674
    }
15675
 
15676
    public void setEx(WarehouseServiceException ex) {
15677
      this.ex = ex;
15678
    }
15679
 
15680
    public void unsetEx() {
15681
      this.ex = null;
15682
    }
15683
 
15684
    /** Returns true if field ex is set (has been assigned a value) and false otherwise */
15685
    public boolean isSetEx() {
15686
      return this.ex != null;
15687
    }
15688
 
15689
    public void setExIsSet(boolean value) {
15690
      if (!value) {
15691
        this.ex = null;
15692
      }
15693
    }
15694
 
15695
    public void setFieldValue(_Fields field, Object value) {
15696
      switch (field) {
15697
      case EX:
15698
        if (value == null) {
15699
          unsetEx();
15700
        } else {
15701
          setEx((WarehouseServiceException)value);
15702
        }
15703
        break;
15704
 
15705
      }
15706
    }
15707
 
15708
    public Object getFieldValue(_Fields field) {
15709
      switch (field) {
15710
      case EX:
15711
        return getEx();
15712
 
15713
      }
15714
      throw new IllegalStateException();
15715
    }
15716
 
15717
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15718
    public boolean isSet(_Fields field) {
15719
      if (field == null) {
15720
        throw new IllegalArgumentException();
15721
      }
15722
 
15723
      switch (field) {
15724
      case EX:
15725
        return isSetEx();
15726
      }
15727
      throw new IllegalStateException();
15728
    }
15729
 
15730
    @Override
15731
    public boolean equals(Object that) {
15732
      if (that == null)
15733
        return false;
15734
      if (that instanceof scanForPurchaseReturn_result)
15735
        return this.equals((scanForPurchaseReturn_result)that);
15736
      return false;
15737
    }
15738
 
15739
    public boolean equals(scanForPurchaseReturn_result that) {
15740
      if (that == null)
15741
        return false;
15742
 
15743
      boolean this_present_ex = true && this.isSetEx();
15744
      boolean that_present_ex = true && that.isSetEx();
15745
      if (this_present_ex || that_present_ex) {
15746
        if (!(this_present_ex && that_present_ex))
15747
          return false;
15748
        if (!this.ex.equals(that.ex))
15749
          return false;
15750
      }
15751
 
15752
      return true;
15753
    }
15754
 
15755
    @Override
15756
    public int hashCode() {
15757
      return 0;
15758
    }
15759
 
15760
    public int compareTo(scanForPurchaseReturn_result other) {
15761
      if (!getClass().equals(other.getClass())) {
15762
        return getClass().getName().compareTo(other.getClass().getName());
15763
      }
15764
 
15765
      int lastComparison = 0;
15766
      scanForPurchaseReturn_result typedOther = (scanForPurchaseReturn_result)other;
15767
 
15768
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx());
15769
      if (lastComparison != 0) {
15770
        return lastComparison;
15771
      }
15772
      if (isSetEx()) {
15773
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, typedOther.ex);
15774
        if (lastComparison != 0) {
15775
          return lastComparison;
15776
        }
15777
      }
15778
      return 0;
15779
    }
15780
 
15781
    public _Fields fieldForId(int fieldId) {
15782
      return _Fields.findByThriftId(fieldId);
15783
    }
15784
 
15785
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15786
      org.apache.thrift.protocol.TField field;
15787
      iprot.readStructBegin();
15788
      while (true)
15789
      {
15790
        field = iprot.readFieldBegin();
15791
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15792
          break;
15793
        }
15794
        switch (field.id) {
15795
          case 1: // EX
15796
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15797
              this.ex = new WarehouseServiceException();
15798
              this.ex.read(iprot);
15799
            } else { 
15800
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15801
            }
15802
            break;
15803
          default:
15804
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15805
        }
15806
        iprot.readFieldEnd();
15807
      }
15808
      iprot.readStructEnd();
15809
      validate();
15810
    }
15811
 
15812
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15813
      oprot.writeStructBegin(STRUCT_DESC);
15814
 
15815
      if (this.isSetEx()) {
15816
        oprot.writeFieldBegin(EX_FIELD_DESC);
15817
        this.ex.write(oprot);
15818
        oprot.writeFieldEnd();
15819
      }
15820
      oprot.writeFieldStop();
15821
      oprot.writeStructEnd();
15822
    }
15823
 
15824
    @Override
15825
    public String toString() {
15826
      StringBuilder sb = new StringBuilder("scanForPurchaseReturn_result(");
15827
      boolean first = true;
15828
 
15829
      sb.append("ex:");
15830
      if (this.ex == null) {
15831
        sb.append("null");
15832
      } else {
15833
        sb.append(this.ex);
15834
      }
15835
      first = false;
15836
      sb.append(")");
15837
      return sb.toString();
15838
    }
15839
 
15840
    public void validate() throws org.apache.thrift.TException {
15841
      // check for required fields
15842
    }
15843
 
15844
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15845
      try {
15846
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15847
      } catch (org.apache.thrift.TException te) {
15848
        throw new java.io.IOException(te);
15849
      }
15850
    }
15851
 
15852
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15853
      try {
15854
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15855
      } catch (org.apache.thrift.TException te) {
15856
        throw new java.io.IOException(te);
15857
      }
15858
    }
15859
 
15860
  }
15861
 
6548 amar.kumar 15862
  public static class scanForLostItem_args implements org.apache.thrift.TBase<scanForLostItem_args, scanForLostItem_args._Fields>, java.io.Serializable, Cloneable   {
15863
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForLostItem_args");
15864
 
15865
    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);
15866
    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);
15867
 
15868
    private List<InventoryItem> lostItems; // required
15869
    private long vendorId; // required
15870
 
15871
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15872
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15873
      LOST_ITEMS((short)1, "lostItems"),
15874
      VENDOR_ID((short)2, "vendorId");
15875
 
15876
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15877
 
15878
      static {
15879
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15880
          byName.put(field.getFieldName(), field);
15881
        }
15882
      }
15883
 
15884
      /**
15885
       * Find the _Fields constant that matches fieldId, or null if its not found.
15886
       */
15887
      public static _Fields findByThriftId(int fieldId) {
15888
        switch(fieldId) {
15889
          case 1: // LOST_ITEMS
15890
            return LOST_ITEMS;
15891
          case 2: // VENDOR_ID
15892
            return VENDOR_ID;
15893
          default:
15894
            return null;
15895
        }
15896
      }
15897
 
15898
      /**
15899
       * Find the _Fields constant that matches fieldId, throwing an exception
15900
       * if it is not found.
15901
       */
15902
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15903
        _Fields fields = findByThriftId(fieldId);
15904
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15905
        return fields;
15906
      }
15907
 
15908
      /**
15909
       * Find the _Fields constant that matches name, or null if its not found.
15910
       */
15911
      public static _Fields findByName(String name) {
15912
        return byName.get(name);
15913
      }
15914
 
15915
      private final short _thriftId;
15916
      private final String _fieldName;
15917
 
15918
      _Fields(short thriftId, String fieldName) {
15919
        _thriftId = thriftId;
15920
        _fieldName = fieldName;
15921
      }
15922
 
15923
      public short getThriftFieldId() {
15924
        return _thriftId;
15925
      }
15926
 
15927
      public String getFieldName() {
15928
        return _fieldName;
15929
      }
15930
    }
15931
 
15932
    // isset id assignments
15933
    private static final int __VENDORID_ISSET_ID = 0;
15934
    private BitSet __isset_bit_vector = new BitSet(1);
15935
 
15936
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15937
    static {
15938
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15939
      tmpMap.put(_Fields.LOST_ITEMS, new org.apache.thrift.meta_data.FieldMetaData("lostItems", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15940
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
15941
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class))));
15942
      tmpMap.put(_Fields.VENDOR_ID, new org.apache.thrift.meta_data.FieldMetaData("vendorId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15943
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
15944
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15945
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForLostItem_args.class, metaDataMap);
15946
    }
15947
 
15948
    public scanForLostItem_args() {
15949
    }
15950
 
15951
    public scanForLostItem_args(
15952
      List<InventoryItem> lostItems,
15953
      long vendorId)
15954
    {
15955
      this();
15956
      this.lostItems = lostItems;
15957
      this.vendorId = vendorId;
15958
      setVendorIdIsSet(true);
15959
    }
15960
 
15961
    /**
15962
     * Performs a deep copy on <i>other</i>.
15963
     */
15964
    public scanForLostItem_args(scanForLostItem_args other) {
15965
      __isset_bit_vector.clear();
15966
      __isset_bit_vector.or(other.__isset_bit_vector);
15967
      if (other.isSetLostItems()) {
15968
        List<InventoryItem> __this__lostItems = new ArrayList<InventoryItem>();
15969
        for (InventoryItem other_element : other.lostItems) {
15970
          __this__lostItems.add(new InventoryItem(other_element));
15971
        }
15972
        this.lostItems = __this__lostItems;
15973
      }
15974
      this.vendorId = other.vendorId;
15975
    }
15976
 
15977
    public scanForLostItem_args deepCopy() {
15978
      return new scanForLostItem_args(this);
15979
    }
15980
 
15981
    @Override
15982
    public void clear() {
15983
      this.lostItems = null;
15984
      setVendorIdIsSet(false);
15985
      this.vendorId = 0;
15986
    }
15987
 
15988
    public int getLostItemsSize() {
15989
      return (this.lostItems == null) ? 0 : this.lostItems.size();
15990
    }
15991
 
15992
    public java.util.Iterator<InventoryItem> getLostItemsIterator() {
15993
      return (this.lostItems == null) ? null : this.lostItems.iterator();
15994
    }
15995
 
15996
    public void addToLostItems(InventoryItem elem) {
15997
      if (this.lostItems == null) {
15998
        this.lostItems = new ArrayList<InventoryItem>();
15999
      }
16000
      this.lostItems.add(elem);
16001
    }
16002
 
16003
    public List<InventoryItem> getLostItems() {
16004
      return this.lostItems;
16005
    }
16006
 
16007
    public void setLostItems(List<InventoryItem> lostItems) {
16008
      this.lostItems = lostItems;
16009
    }
16010
 
16011
    public void unsetLostItems() {
16012
      this.lostItems = null;
16013
    }
16014
 
16015
    /** Returns true if field lostItems is set (has been assigned a value) and false otherwise */
16016
    public boolean isSetLostItems() {
16017
      return this.lostItems != null;
16018
    }
16019
 
16020
    public void setLostItemsIsSet(boolean value) {
16021
      if (!value) {
16022
        this.lostItems = null;
16023
      }
16024
    }
16025
 
16026
    public long getVendorId() {
16027
      return this.vendorId;
16028
    }
16029
 
16030
    public void setVendorId(long vendorId) {
16031
      this.vendorId = vendorId;
16032
      setVendorIdIsSet(true);
16033
    }
16034
 
16035
    public void unsetVendorId() {
16036
      __isset_bit_vector.clear(__VENDORID_ISSET_ID);
16037
    }
16038
 
16039
    /** Returns true if field vendorId is set (has been assigned a value) and false otherwise */
16040
    public boolean isSetVendorId() {
16041
      return __isset_bit_vector.get(__VENDORID_ISSET_ID);
16042
    }
16043
 
16044
    public void setVendorIdIsSet(boolean value) {
16045
      __isset_bit_vector.set(__VENDORID_ISSET_ID, value);
16046
    }
16047
 
16048
    public void setFieldValue(_Fields field, Object value) {
16049
      switch (field) {
16050
      case LOST_ITEMS:
16051
        if (value == null) {
16052
          unsetLostItems();
16053
        } else {
16054
          setLostItems((List<InventoryItem>)value);
16055
        }
16056
        break;
16057
 
16058
      case VENDOR_ID:
16059
        if (value == null) {
16060
          unsetVendorId();
16061
        } else {
16062
          setVendorId((Long)value);
16063
        }
16064
        break;
16065
 
16066
      }
16067
    }
16068
 
16069
    public Object getFieldValue(_Fields field) {
16070
      switch (field) {
16071
      case LOST_ITEMS:
16072
        return getLostItems();
16073
 
16074
      case VENDOR_ID:
16075
        return Long.valueOf(getVendorId());
16076
 
16077
      }
16078
      throw new IllegalStateException();
16079
    }
16080
 
16081
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16082
    public boolean isSet(_Fields field) {
16083
      if (field == null) {
16084
        throw new IllegalArgumentException();
16085
      }
16086
 
16087
      switch (field) {
16088
      case LOST_ITEMS:
16089
        return isSetLostItems();
16090
      case VENDOR_ID:
16091
        return isSetVendorId();
16092
      }
16093
      throw new IllegalStateException();
16094
    }
16095
 
16096
    @Override
16097
    public boolean equals(Object that) {
16098
      if (that == null)
16099
        return false;
16100
      if (that instanceof scanForLostItem_args)
16101
        return this.equals((scanForLostItem_args)that);
16102
      return false;
16103
    }
16104
 
16105
    public boolean equals(scanForLostItem_args that) {
16106
      if (that == null)
16107
        return false;
16108
 
16109
      boolean this_present_lostItems = true && this.isSetLostItems();
16110
      boolean that_present_lostItems = true && that.isSetLostItems();
16111
      if (this_present_lostItems || that_present_lostItems) {
16112
        if (!(this_present_lostItems && that_present_lostItems))
16113
          return false;
16114
        if (!this.lostItems.equals(that.lostItems))
16115
          return false;
16116
      }
16117
 
16118
      boolean this_present_vendorId = true;
16119
      boolean that_present_vendorId = true;
16120
      if (this_present_vendorId || that_present_vendorId) {
16121
        if (!(this_present_vendorId && that_present_vendorId))
16122
          return false;
16123
        if (this.vendorId != that.vendorId)
16124
          return false;
16125
      }
16126
 
16127
      return true;
16128
    }
16129
 
16130
    @Override
16131
    public int hashCode() {
16132
      return 0;
16133
    }
16134
 
16135
    public int compareTo(scanForLostItem_args other) {
16136
      if (!getClass().equals(other.getClass())) {
16137
        return getClass().getName().compareTo(other.getClass().getName());
16138
      }
16139
 
16140
      int lastComparison = 0;
16141
      scanForLostItem_args typedOther = (scanForLostItem_args)other;
16142
 
16143
      lastComparison = Boolean.valueOf(isSetLostItems()).compareTo(typedOther.isSetLostItems());
16144
      if (lastComparison != 0) {
16145
        return lastComparison;
16146
      }
16147
      if (isSetLostItems()) {
16148
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lostItems, typedOther.lostItems);
16149
        if (lastComparison != 0) {
16150
          return lastComparison;
16151
        }
16152
      }
16153
      lastComparison = Boolean.valueOf(isSetVendorId()).compareTo(typedOther.isSetVendorId());
16154
      if (lastComparison != 0) {
16155
        return lastComparison;
16156
      }
16157
      if (isSetVendorId()) {
16158
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vendorId, typedOther.vendorId);
16159
        if (lastComparison != 0) {
16160
          return lastComparison;
16161
        }
16162
      }
16163
      return 0;
16164
    }
16165
 
16166
    public _Fields fieldForId(int fieldId) {
16167
      return _Fields.findByThriftId(fieldId);
16168
    }
16169
 
16170
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16171
      org.apache.thrift.protocol.TField field;
16172
      iprot.readStructBegin();
16173
      while (true)
16174
      {
16175
        field = iprot.readFieldBegin();
16176
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16177
          break;
16178
        }
16179
        switch (field.id) {
16180
          case 1: // LOST_ITEMS
16181
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
16182
              {
7210 amar.kumar 16183
                org.apache.thrift.protocol.TList _list40 = iprot.readListBegin();
16184
                this.lostItems = new ArrayList<InventoryItem>(_list40.size);
16185
                for (int _i41 = 0; _i41 < _list40.size; ++_i41)
6548 amar.kumar 16186
                {
7210 amar.kumar 16187
                  InventoryItem _elem42; // required
16188
                  _elem42 = new InventoryItem();
16189
                  _elem42.read(iprot);
16190
                  this.lostItems.add(_elem42);
6548 amar.kumar 16191
                }
16192
                iprot.readListEnd();
16193
              }
16194
            } else { 
16195
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16196
            }
16197
            break;
16198
          case 2: // VENDOR_ID
16199
            if (field.type == org.apache.thrift.protocol.TType.I64) {
16200
              this.vendorId = iprot.readI64();
16201
              setVendorIdIsSet(true);
16202
            } else { 
16203
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16204
            }
16205
            break;
16206
          default:
16207
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16208
        }
16209
        iprot.readFieldEnd();
16210
      }
16211
      iprot.readStructEnd();
16212
      validate();
16213
    }
16214
 
16215
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16216
      validate();
16217
 
16218
      oprot.writeStructBegin(STRUCT_DESC);
16219
      if (this.lostItems != null) {
16220
        oprot.writeFieldBegin(LOST_ITEMS_FIELD_DESC);
16221
        {
16222
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.lostItems.size()));
7210 amar.kumar 16223
          for (InventoryItem _iter43 : this.lostItems)
6548 amar.kumar 16224
          {
7210 amar.kumar 16225
            _iter43.write(oprot);
6548 amar.kumar 16226
          }
16227
          oprot.writeListEnd();
16228
        }
16229
        oprot.writeFieldEnd();
16230
      }
16231
      oprot.writeFieldBegin(VENDOR_ID_FIELD_DESC);
16232
      oprot.writeI64(this.vendorId);
16233
      oprot.writeFieldEnd();
16234
      oprot.writeFieldStop();
16235
      oprot.writeStructEnd();
16236
    }
16237
 
16238
    @Override
16239
    public String toString() {
16240
      StringBuilder sb = new StringBuilder("scanForLostItem_args(");
16241
      boolean first = true;
16242
 
16243
      sb.append("lostItems:");
16244
      if (this.lostItems == null) {
16245
        sb.append("null");
16246
      } else {
16247
        sb.append(this.lostItems);
16248
      }
16249
      first = false;
16250
      if (!first) sb.append(", ");
16251
      sb.append("vendorId:");
16252
      sb.append(this.vendorId);
16253
      first = false;
16254
      sb.append(")");
16255
      return sb.toString();
16256
    }
16257
 
16258
    public void validate() throws org.apache.thrift.TException {
16259
      // check for required fields
16260
    }
16261
 
16262
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16263
      try {
16264
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16265
      } catch (org.apache.thrift.TException te) {
16266
        throw new java.io.IOException(te);
16267
      }
16268
    }
16269
 
16270
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16271
      try {
16272
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16273
      } catch (org.apache.thrift.TException te) {
16274
        throw new java.io.IOException(te);
16275
      }
16276
    }
16277
 
16278
  }
16279
 
16280
  public static class scanForLostItem_result implements org.apache.thrift.TBase<scanForLostItem_result, scanForLostItem_result._Fields>, java.io.Serializable, Cloneable   {
16281
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForLostItem_result");
16282
 
16283
    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);
16284
 
16285
    private WarehouseServiceException ex; // required
16286
 
16287
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16288
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16289
      EX((short)1, "ex");
16290
 
16291
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16292
 
16293
      static {
16294
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16295
          byName.put(field.getFieldName(), field);
16296
        }
16297
      }
16298
 
16299
      /**
16300
       * Find the _Fields constant that matches fieldId, or null if its not found.
16301
       */
16302
      public static _Fields findByThriftId(int fieldId) {
16303
        switch(fieldId) {
16304
          case 1: // EX
16305
            return EX;
16306
          default:
16307
            return null;
16308
        }
16309
      }
16310
 
16311
      /**
16312
       * Find the _Fields constant that matches fieldId, throwing an exception
16313
       * if it is not found.
16314
       */
16315
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16316
        _Fields fields = findByThriftId(fieldId);
16317
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16318
        return fields;
16319
      }
16320
 
16321
      /**
16322
       * Find the _Fields constant that matches name, or null if its not found.
16323
       */
16324
      public static _Fields findByName(String name) {
16325
        return byName.get(name);
16326
      }
16327
 
16328
      private final short _thriftId;
16329
      private final String _fieldName;
16330
 
16331
      _Fields(short thriftId, String fieldName) {
16332
        _thriftId = thriftId;
16333
        _fieldName = fieldName;
16334
      }
16335
 
16336
      public short getThriftFieldId() {
16337
        return _thriftId;
16338
      }
16339
 
16340
      public String getFieldName() {
16341
        return _fieldName;
16342
      }
16343
    }
16344
 
16345
    // isset id assignments
16346
 
16347
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16348
    static {
16349
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16350
      tmpMap.put(_Fields.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16351
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
16352
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16353
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForLostItem_result.class, metaDataMap);
16354
    }
16355
 
16356
    public scanForLostItem_result() {
16357
    }
16358
 
16359
    public scanForLostItem_result(
16360
      WarehouseServiceException ex)
16361
    {
16362
      this();
16363
      this.ex = ex;
16364
    }
16365
 
16366
    /**
16367
     * Performs a deep copy on <i>other</i>.
16368
     */
16369
    public scanForLostItem_result(scanForLostItem_result other) {
16370
      if (other.isSetEx()) {
16371
        this.ex = new WarehouseServiceException(other.ex);
16372
      }
16373
    }
16374
 
16375
    public scanForLostItem_result deepCopy() {
16376
      return new scanForLostItem_result(this);
16377
    }
16378
 
16379
    @Override
16380
    public void clear() {
16381
      this.ex = null;
16382
    }
16383
 
16384
    public WarehouseServiceException getEx() {
16385
      return this.ex;
16386
    }
16387
 
16388
    public void setEx(WarehouseServiceException ex) {
16389
      this.ex = ex;
16390
    }
16391
 
16392
    public void unsetEx() {
16393
      this.ex = null;
16394
    }
16395
 
16396
    /** Returns true if field ex is set (has been assigned a value) and false otherwise */
16397
    public boolean isSetEx() {
16398
      return this.ex != null;
16399
    }
16400
 
16401
    public void setExIsSet(boolean value) {
16402
      if (!value) {
16403
        this.ex = null;
16404
      }
16405
    }
16406
 
16407
    public void setFieldValue(_Fields field, Object value) {
16408
      switch (field) {
16409
      case EX:
16410
        if (value == null) {
16411
          unsetEx();
16412
        } else {
16413
          setEx((WarehouseServiceException)value);
16414
        }
16415
        break;
16416
 
16417
      }
16418
    }
16419
 
16420
    public Object getFieldValue(_Fields field) {
16421
      switch (field) {
16422
      case EX:
16423
        return getEx();
16424
 
16425
      }
16426
      throw new IllegalStateException();
16427
    }
16428
 
16429
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16430
    public boolean isSet(_Fields field) {
16431
      if (field == null) {
16432
        throw new IllegalArgumentException();
16433
      }
16434
 
16435
      switch (field) {
16436
      case EX:
16437
        return isSetEx();
16438
      }
16439
      throw new IllegalStateException();
16440
    }
16441
 
16442
    @Override
16443
    public boolean equals(Object that) {
16444
      if (that == null)
16445
        return false;
16446
      if (that instanceof scanForLostItem_result)
16447
        return this.equals((scanForLostItem_result)that);
16448
      return false;
16449
    }
16450
 
16451
    public boolean equals(scanForLostItem_result that) {
16452
      if (that == null)
16453
        return false;
16454
 
16455
      boolean this_present_ex = true && this.isSetEx();
16456
      boolean that_present_ex = true && that.isSetEx();
16457
      if (this_present_ex || that_present_ex) {
16458
        if (!(this_present_ex && that_present_ex))
16459
          return false;
16460
        if (!this.ex.equals(that.ex))
16461
          return false;
16462
      }
16463
 
16464
      return true;
16465
    }
16466
 
16467
    @Override
16468
    public int hashCode() {
16469
      return 0;
16470
    }
16471
 
16472
    public int compareTo(scanForLostItem_result other) {
16473
      if (!getClass().equals(other.getClass())) {
16474
        return getClass().getName().compareTo(other.getClass().getName());
16475
      }
16476
 
16477
      int lastComparison = 0;
16478
      scanForLostItem_result typedOther = (scanForLostItem_result)other;
16479
 
16480
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx());
16481
      if (lastComparison != 0) {
16482
        return lastComparison;
16483
      }
16484
      if (isSetEx()) {
16485
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, typedOther.ex);
16486
        if (lastComparison != 0) {
16487
          return lastComparison;
16488
        }
16489
      }
16490
      return 0;
16491
    }
16492
 
16493
    public _Fields fieldForId(int fieldId) {
16494
      return _Fields.findByThriftId(fieldId);
16495
    }
16496
 
16497
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16498
      org.apache.thrift.protocol.TField field;
16499
      iprot.readStructBegin();
16500
      while (true)
16501
      {
16502
        field = iprot.readFieldBegin();
16503
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16504
          break;
16505
        }
16506
        switch (field.id) {
16507
          case 1: // EX
16508
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
16509
              this.ex = new WarehouseServiceException();
16510
              this.ex.read(iprot);
16511
            } else { 
16512
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16513
            }
16514
            break;
16515
          default:
16516
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16517
        }
16518
        iprot.readFieldEnd();
16519
      }
16520
      iprot.readStructEnd();
16521
      validate();
16522
    }
16523
 
16524
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16525
      oprot.writeStructBegin(STRUCT_DESC);
16526
 
16527
      if (this.isSetEx()) {
16528
        oprot.writeFieldBegin(EX_FIELD_DESC);
16529
        this.ex.write(oprot);
16530
        oprot.writeFieldEnd();
16531
      }
16532
      oprot.writeFieldStop();
16533
      oprot.writeStructEnd();
16534
    }
16535
 
16536
    @Override
16537
    public String toString() {
16538
      StringBuilder sb = new StringBuilder("scanForLostItem_result(");
16539
      boolean first = true;
16540
 
16541
      sb.append("ex:");
16542
      if (this.ex == null) {
16543
        sb.append("null");
16544
      } else {
16545
        sb.append(this.ex);
16546
      }
16547
      first = false;
16548
      sb.append(")");
16549
      return sb.toString();
16550
    }
16551
 
16552
    public void validate() throws org.apache.thrift.TException {
16553
      // check for required fields
16554
    }
16555
 
16556
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16557
      try {
16558
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16559
      } catch (org.apache.thrift.TException te) {
16560
        throw new java.io.IOException(te);
16561
      }
16562
    }
16563
 
16564
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16565
      try {
16566
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16567
      } catch (org.apache.thrift.TException te) {
16568
        throw new java.io.IOException(te);
16569
      }
16570
    }
16571
 
16572
  }
16573
 
16574
  public static class getCurrentSerializedInventoryByScans_args implements org.apache.thrift.TBase<getCurrentSerializedInventoryByScans_args, getCurrentSerializedInventoryByScans_args._Fields>, java.io.Serializable, Cloneable   {
16575
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCurrentSerializedInventoryByScans_args");
16576
 
16577
 
16578
 
16579
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16580
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16581
;
16582
 
16583
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16584
 
16585
      static {
16586
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16587
          byName.put(field.getFieldName(), field);
16588
        }
16589
      }
16590
 
16591
      /**
16592
       * Find the _Fields constant that matches fieldId, or null if its not found.
16593
       */
16594
      public static _Fields findByThriftId(int fieldId) {
16595
        switch(fieldId) {
16596
          default:
16597
            return null;
16598
        }
16599
      }
16600
 
16601
      /**
16602
       * Find the _Fields constant that matches fieldId, throwing an exception
16603
       * if it is not found.
16604
       */
16605
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16606
        _Fields fields = findByThriftId(fieldId);
16607
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16608
        return fields;
16609
      }
16610
 
16611
      /**
16612
       * Find the _Fields constant that matches name, or null if its not found.
16613
       */
16614
      public static _Fields findByName(String name) {
16615
        return byName.get(name);
16616
      }
16617
 
16618
      private final short _thriftId;
16619
      private final String _fieldName;
16620
 
16621
      _Fields(short thriftId, String fieldName) {
16622
        _thriftId = thriftId;
16623
        _fieldName = fieldName;
16624
      }
16625
 
16626
      public short getThriftFieldId() {
16627
        return _thriftId;
16628
      }
16629
 
16630
      public String getFieldName() {
16631
        return _fieldName;
16632
      }
16633
    }
16634
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16635
    static {
16636
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16637
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16638
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCurrentSerializedInventoryByScans_args.class, metaDataMap);
16639
    }
16640
 
16641
    public getCurrentSerializedInventoryByScans_args() {
16642
    }
16643
 
16644
    /**
16645
     * Performs a deep copy on <i>other</i>.
16646
     */
16647
    public getCurrentSerializedInventoryByScans_args(getCurrentSerializedInventoryByScans_args other) {
16648
    }
16649
 
16650
    public getCurrentSerializedInventoryByScans_args deepCopy() {
16651
      return new getCurrentSerializedInventoryByScans_args(this);
16652
    }
16653
 
16654
    @Override
16655
    public void clear() {
16656
    }
16657
 
16658
    public void setFieldValue(_Fields field, Object value) {
16659
      switch (field) {
16660
      }
16661
    }
16662
 
16663
    public Object getFieldValue(_Fields field) {
16664
      switch (field) {
16665
      }
16666
      throw new IllegalStateException();
16667
    }
16668
 
16669
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16670
    public boolean isSet(_Fields field) {
16671
      if (field == null) {
16672
        throw new IllegalArgumentException();
16673
      }
16674
 
16675
      switch (field) {
16676
      }
16677
      throw new IllegalStateException();
16678
    }
16679
 
16680
    @Override
16681
    public boolean equals(Object that) {
16682
      if (that == null)
16683
        return false;
16684
      if (that instanceof getCurrentSerializedInventoryByScans_args)
16685
        return this.equals((getCurrentSerializedInventoryByScans_args)that);
16686
      return false;
16687
    }
16688
 
16689
    public boolean equals(getCurrentSerializedInventoryByScans_args that) {
16690
      if (that == null)
16691
        return false;
16692
 
16693
      return true;
16694
    }
16695
 
16696
    @Override
16697
    public int hashCode() {
16698
      return 0;
16699
    }
16700
 
16701
    public int compareTo(getCurrentSerializedInventoryByScans_args other) {
16702
      if (!getClass().equals(other.getClass())) {
16703
        return getClass().getName().compareTo(other.getClass().getName());
16704
      }
16705
 
16706
      int lastComparison = 0;
16707
      getCurrentSerializedInventoryByScans_args typedOther = (getCurrentSerializedInventoryByScans_args)other;
16708
 
16709
      return 0;
16710
    }
16711
 
16712
    public _Fields fieldForId(int fieldId) {
16713
      return _Fields.findByThriftId(fieldId);
16714
    }
16715
 
16716
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16717
      org.apache.thrift.protocol.TField field;
16718
      iprot.readStructBegin();
16719
      while (true)
16720
      {
16721
        field = iprot.readFieldBegin();
16722
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16723
          break;
16724
        }
16725
        switch (field.id) {
16726
          default:
16727
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16728
        }
16729
        iprot.readFieldEnd();
16730
      }
16731
      iprot.readStructEnd();
16732
      validate();
16733
    }
16734
 
16735
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16736
      validate();
16737
 
16738
      oprot.writeStructBegin(STRUCT_DESC);
16739
      oprot.writeFieldStop();
16740
      oprot.writeStructEnd();
16741
    }
16742
 
16743
    @Override
16744
    public String toString() {
16745
      StringBuilder sb = new StringBuilder("getCurrentSerializedInventoryByScans_args(");
16746
      boolean first = true;
16747
 
16748
      sb.append(")");
16749
      return sb.toString();
16750
    }
16751
 
16752
    public void validate() throws org.apache.thrift.TException {
16753
      // check for required fields
16754
    }
16755
 
16756
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16757
      try {
16758
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16759
      } catch (org.apache.thrift.TException te) {
16760
        throw new java.io.IOException(te);
16761
      }
16762
    }
16763
 
16764
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16765
      try {
16766
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16767
      } catch (org.apache.thrift.TException te) {
16768
        throw new java.io.IOException(te);
16769
      }
16770
    }
16771
 
16772
  }
16773
 
16774
  public static class getCurrentSerializedInventoryByScans_result implements org.apache.thrift.TBase<getCurrentSerializedInventoryByScans_result, getCurrentSerializedInventoryByScans_result._Fields>, java.io.Serializable, Cloneable   {
16775
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCurrentSerializedInventoryByScans_result");
16776
 
16777
    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);
16778
 
16779
    private List<InventoryAvailability> success; // required
16780
 
16781
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16782
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16783
      SUCCESS((short)0, "success");
16784
 
16785
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16786
 
16787
      static {
16788
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16789
          byName.put(field.getFieldName(), field);
16790
        }
16791
      }
16792
 
16793
      /**
16794
       * Find the _Fields constant that matches fieldId, or null if its not found.
16795
       */
16796
      public static _Fields findByThriftId(int fieldId) {
16797
        switch(fieldId) {
16798
          case 0: // SUCCESS
16799
            return SUCCESS;
16800
          default:
16801
            return null;
16802
        }
16803
      }
16804
 
16805
      /**
16806
       * Find the _Fields constant that matches fieldId, throwing an exception
16807
       * if it is not found.
16808
       */
16809
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16810
        _Fields fields = findByThriftId(fieldId);
16811
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16812
        return fields;
16813
      }
16814
 
16815
      /**
16816
       * Find the _Fields constant that matches name, or null if its not found.
16817
       */
16818
      public static _Fields findByName(String name) {
16819
        return byName.get(name);
16820
      }
16821
 
16822
      private final short _thriftId;
16823
      private final String _fieldName;
16824
 
16825
      _Fields(short thriftId, String fieldName) {
16826
        _thriftId = thriftId;
16827
        _fieldName = fieldName;
16828
      }
16829
 
16830
      public short getThriftFieldId() {
16831
        return _thriftId;
16832
      }
16833
 
16834
      public String getFieldName() {
16835
        return _fieldName;
16836
      }
16837
    }
16838
 
16839
    // isset id assignments
16840
 
16841
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16842
    static {
16843
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16844
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16845
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
16846
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryAvailability.class))));
16847
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16848
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCurrentSerializedInventoryByScans_result.class, metaDataMap);
16849
    }
16850
 
16851
    public getCurrentSerializedInventoryByScans_result() {
16852
    }
16853
 
16854
    public getCurrentSerializedInventoryByScans_result(
16855
      List<InventoryAvailability> success)
16856
    {
16857
      this();
16858
      this.success = success;
16859
    }
16860
 
16861
    /**
16862
     * Performs a deep copy on <i>other</i>.
16863
     */
16864
    public getCurrentSerializedInventoryByScans_result(getCurrentSerializedInventoryByScans_result other) {
16865
      if (other.isSetSuccess()) {
16866
        List<InventoryAvailability> __this__success = new ArrayList<InventoryAvailability>();
16867
        for (InventoryAvailability other_element : other.success) {
16868
          __this__success.add(new InventoryAvailability(other_element));
16869
        }
16870
        this.success = __this__success;
16871
      }
16872
    }
16873
 
16874
    public getCurrentSerializedInventoryByScans_result deepCopy() {
16875
      return new getCurrentSerializedInventoryByScans_result(this);
16876
    }
16877
 
16878
    @Override
16879
    public void clear() {
16880
      this.success = null;
16881
    }
16882
 
16883
    public int getSuccessSize() {
16884
      return (this.success == null) ? 0 : this.success.size();
16885
    }
16886
 
16887
    public java.util.Iterator<InventoryAvailability> getSuccessIterator() {
16888
      return (this.success == null) ? null : this.success.iterator();
16889
    }
16890
 
16891
    public void addToSuccess(InventoryAvailability elem) {
16892
      if (this.success == null) {
16893
        this.success = new ArrayList<InventoryAvailability>();
16894
      }
16895
      this.success.add(elem);
16896
    }
16897
 
16898
    public List<InventoryAvailability> getSuccess() {
16899
      return this.success;
16900
    }
16901
 
16902
    public void setSuccess(List<InventoryAvailability> success) {
16903
      this.success = success;
16904
    }
16905
 
16906
    public void unsetSuccess() {
16907
      this.success = null;
16908
    }
16909
 
16910
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
16911
    public boolean isSetSuccess() {
16912
      return this.success != null;
16913
    }
16914
 
16915
    public void setSuccessIsSet(boolean value) {
16916
      if (!value) {
16917
        this.success = null;
16918
      }
16919
    }
16920
 
16921
    public void setFieldValue(_Fields field, Object value) {
16922
      switch (field) {
16923
      case SUCCESS:
16924
        if (value == null) {
16925
          unsetSuccess();
16926
        } else {
16927
          setSuccess((List<InventoryAvailability>)value);
16928
        }
16929
        break;
16930
 
16931
      }
16932
    }
16933
 
16934
    public Object getFieldValue(_Fields field) {
16935
      switch (field) {
16936
      case SUCCESS:
16937
        return getSuccess();
16938
 
16939
      }
16940
      throw new IllegalStateException();
16941
    }
16942
 
16943
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16944
    public boolean isSet(_Fields field) {
16945
      if (field == null) {
16946
        throw new IllegalArgumentException();
16947
      }
16948
 
16949
      switch (field) {
16950
      case SUCCESS:
16951
        return isSetSuccess();
16952
      }
16953
      throw new IllegalStateException();
16954
    }
16955
 
16956
    @Override
16957
    public boolean equals(Object that) {
16958
      if (that == null)
16959
        return false;
16960
      if (that instanceof getCurrentSerializedInventoryByScans_result)
16961
        return this.equals((getCurrentSerializedInventoryByScans_result)that);
16962
      return false;
16963
    }
16964
 
16965
    public boolean equals(getCurrentSerializedInventoryByScans_result that) {
16966
      if (that == null)
16967
        return false;
16968
 
16969
      boolean this_present_success = true && this.isSetSuccess();
16970
      boolean that_present_success = true && that.isSetSuccess();
16971
      if (this_present_success || that_present_success) {
16972
        if (!(this_present_success && that_present_success))
16973
          return false;
16974
        if (!this.success.equals(that.success))
16975
          return false;
16976
      }
16977
 
16978
      return true;
16979
    }
16980
 
16981
    @Override
16982
    public int hashCode() {
16983
      return 0;
16984
    }
16985
 
16986
    public int compareTo(getCurrentSerializedInventoryByScans_result other) {
16987
      if (!getClass().equals(other.getClass())) {
16988
        return getClass().getName().compareTo(other.getClass().getName());
16989
      }
16990
 
16991
      int lastComparison = 0;
16992
      getCurrentSerializedInventoryByScans_result typedOther = (getCurrentSerializedInventoryByScans_result)other;
16993
 
16994
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
16995
      if (lastComparison != 0) {
16996
        return lastComparison;
16997
      }
16998
      if (isSetSuccess()) {
16999
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
17000
        if (lastComparison != 0) {
17001
          return lastComparison;
17002
        }
17003
      }
17004
      return 0;
17005
    }
17006
 
17007
    public _Fields fieldForId(int fieldId) {
17008
      return _Fields.findByThriftId(fieldId);
17009
    }
17010
 
17011
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17012
      org.apache.thrift.protocol.TField field;
17013
      iprot.readStructBegin();
17014
      while (true)
17015
      {
17016
        field = iprot.readFieldBegin();
17017
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17018
          break;
17019
        }
17020
        switch (field.id) {
17021
          case 0: // SUCCESS
17022
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
17023
              {
7210 amar.kumar 17024
                org.apache.thrift.protocol.TList _list44 = iprot.readListBegin();
17025
                this.success = new ArrayList<InventoryAvailability>(_list44.size);
17026
                for (int _i45 = 0; _i45 < _list44.size; ++_i45)
6548 amar.kumar 17027
                {
7210 amar.kumar 17028
                  InventoryAvailability _elem46; // required
17029
                  _elem46 = new InventoryAvailability();
17030
                  _elem46.read(iprot);
17031
                  this.success.add(_elem46);
6548 amar.kumar 17032
                }
17033
                iprot.readListEnd();
17034
              }
17035
            } else { 
17036
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17037
            }
17038
            break;
17039
          default:
17040
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17041
        }
17042
        iprot.readFieldEnd();
17043
      }
17044
      iprot.readStructEnd();
17045
      validate();
17046
    }
17047
 
17048
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17049
      oprot.writeStructBegin(STRUCT_DESC);
17050
 
17051
      if (this.isSetSuccess()) {
17052
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17053
        {
17054
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7210 amar.kumar 17055
          for (InventoryAvailability _iter47 : this.success)
6548 amar.kumar 17056
          {
7210 amar.kumar 17057
            _iter47.write(oprot);
6548 amar.kumar 17058
          }
17059
          oprot.writeListEnd();
17060
        }
17061
        oprot.writeFieldEnd();
17062
      }
17063
      oprot.writeFieldStop();
17064
      oprot.writeStructEnd();
17065
    }
17066
 
17067
    @Override
17068
    public String toString() {
17069
      StringBuilder sb = new StringBuilder("getCurrentSerializedInventoryByScans_result(");
17070
      boolean first = true;
17071
 
17072
      sb.append("success:");
17073
      if (this.success == null) {
17074
        sb.append("null");
17075
      } else {
17076
        sb.append(this.success);
17077
      }
17078
      first = false;
17079
      sb.append(")");
17080
      return sb.toString();
17081
    }
17082
 
17083
    public void validate() throws org.apache.thrift.TException {
17084
      // check for required fields
17085
    }
17086
 
17087
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17088
      try {
17089
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17090
      } catch (org.apache.thrift.TException te) {
17091
        throw new java.io.IOException(te);
17092
      }
17093
    }
17094
 
17095
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17096
      try {
17097
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17098
      } catch (org.apache.thrift.TException te) {
17099
        throw new java.io.IOException(te);
17100
      }
17101
    }
17102
 
17103
  }
17104
 
6630 amar.kumar 17105
  public static class getCurrentNonSerializedInventoryByScans_args implements org.apache.thrift.TBase<getCurrentNonSerializedInventoryByScans_args, getCurrentNonSerializedInventoryByScans_args._Fields>, java.io.Serializable, Cloneable   {
17106
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCurrentNonSerializedInventoryByScans_args");
17107
 
17108
 
17109
 
17110
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17111
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17112
;
17113
 
17114
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17115
 
17116
      static {
17117
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17118
          byName.put(field.getFieldName(), field);
17119
        }
17120
      }
17121
 
17122
      /**
17123
       * Find the _Fields constant that matches fieldId, or null if its not found.
17124
       */
17125
      public static _Fields findByThriftId(int fieldId) {
17126
        switch(fieldId) {
17127
          default:
17128
            return null;
17129
        }
17130
      }
17131
 
17132
      /**
17133
       * Find the _Fields constant that matches fieldId, throwing an exception
17134
       * if it is not found.
17135
       */
17136
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17137
        _Fields fields = findByThriftId(fieldId);
17138
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17139
        return fields;
17140
      }
17141
 
17142
      /**
17143
       * Find the _Fields constant that matches name, or null if its not found.
17144
       */
17145
      public static _Fields findByName(String name) {
17146
        return byName.get(name);
17147
      }
17148
 
17149
      private final short _thriftId;
17150
      private final String _fieldName;
17151
 
17152
      _Fields(short thriftId, String fieldName) {
17153
        _thriftId = thriftId;
17154
        _fieldName = fieldName;
17155
      }
17156
 
17157
      public short getThriftFieldId() {
17158
        return _thriftId;
17159
      }
17160
 
17161
      public String getFieldName() {
17162
        return _fieldName;
17163
      }
17164
    }
17165
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17166
    static {
17167
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17168
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17169
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCurrentNonSerializedInventoryByScans_args.class, metaDataMap);
17170
    }
17171
 
17172
    public getCurrentNonSerializedInventoryByScans_args() {
17173
    }
17174
 
17175
    /**
17176
     * Performs a deep copy on <i>other</i>.
17177
     */
17178
    public getCurrentNonSerializedInventoryByScans_args(getCurrentNonSerializedInventoryByScans_args other) {
17179
    }
17180
 
17181
    public getCurrentNonSerializedInventoryByScans_args deepCopy() {
17182
      return new getCurrentNonSerializedInventoryByScans_args(this);
17183
    }
17184
 
17185
    @Override
17186
    public void clear() {
17187
    }
17188
 
17189
    public void setFieldValue(_Fields field, Object value) {
17190
      switch (field) {
17191
      }
17192
    }
17193
 
17194
    public Object getFieldValue(_Fields field) {
17195
      switch (field) {
17196
      }
17197
      throw new IllegalStateException();
17198
    }
17199
 
17200
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17201
    public boolean isSet(_Fields field) {
17202
      if (field == null) {
17203
        throw new IllegalArgumentException();
17204
      }
17205
 
17206
      switch (field) {
17207
      }
17208
      throw new IllegalStateException();
17209
    }
17210
 
17211
    @Override
17212
    public boolean equals(Object that) {
17213
      if (that == null)
17214
        return false;
17215
      if (that instanceof getCurrentNonSerializedInventoryByScans_args)
17216
        return this.equals((getCurrentNonSerializedInventoryByScans_args)that);
17217
      return false;
17218
    }
17219
 
17220
    public boolean equals(getCurrentNonSerializedInventoryByScans_args that) {
17221
      if (that == null)
17222
        return false;
17223
 
17224
      return true;
17225
    }
17226
 
17227
    @Override
17228
    public int hashCode() {
17229
      return 0;
17230
    }
17231
 
17232
    public int compareTo(getCurrentNonSerializedInventoryByScans_args other) {
17233
      if (!getClass().equals(other.getClass())) {
17234
        return getClass().getName().compareTo(other.getClass().getName());
17235
      }
17236
 
17237
      int lastComparison = 0;
17238
      getCurrentNonSerializedInventoryByScans_args typedOther = (getCurrentNonSerializedInventoryByScans_args)other;
17239
 
17240
      return 0;
17241
    }
17242
 
17243
    public _Fields fieldForId(int fieldId) {
17244
      return _Fields.findByThriftId(fieldId);
17245
    }
17246
 
17247
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17248
      org.apache.thrift.protocol.TField field;
17249
      iprot.readStructBegin();
17250
      while (true)
17251
      {
17252
        field = iprot.readFieldBegin();
17253
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17254
          break;
17255
        }
17256
        switch (field.id) {
17257
          default:
17258
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17259
        }
17260
        iprot.readFieldEnd();
17261
      }
17262
      iprot.readStructEnd();
17263
      validate();
17264
    }
17265
 
17266
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17267
      validate();
17268
 
17269
      oprot.writeStructBegin(STRUCT_DESC);
17270
      oprot.writeFieldStop();
17271
      oprot.writeStructEnd();
17272
    }
17273
 
17274
    @Override
17275
    public String toString() {
17276
      StringBuilder sb = new StringBuilder("getCurrentNonSerializedInventoryByScans_args(");
17277
      boolean first = true;
17278
 
17279
      sb.append(")");
17280
      return sb.toString();
17281
    }
17282
 
17283
    public void validate() throws org.apache.thrift.TException {
17284
      // check for required fields
17285
    }
17286
 
17287
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17288
      try {
17289
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17290
      } catch (org.apache.thrift.TException te) {
17291
        throw new java.io.IOException(te);
17292
      }
17293
    }
17294
 
17295
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17296
      try {
17297
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17298
      } catch (org.apache.thrift.TException te) {
17299
        throw new java.io.IOException(te);
17300
      }
17301
    }
17302
 
17303
  }
17304
 
17305
  public static class getCurrentNonSerializedInventoryByScans_result implements org.apache.thrift.TBase<getCurrentNonSerializedInventoryByScans_result, getCurrentNonSerializedInventoryByScans_result._Fields>, java.io.Serializable, Cloneable   {
17306
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCurrentNonSerializedInventoryByScans_result");
17307
 
17308
    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);
17309
 
17310
    private List<InventoryAvailability> success; // required
17311
 
17312
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17313
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17314
      SUCCESS((short)0, "success");
17315
 
17316
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17317
 
17318
      static {
17319
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17320
          byName.put(field.getFieldName(), field);
17321
        }
17322
      }
17323
 
17324
      /**
17325
       * Find the _Fields constant that matches fieldId, or null if its not found.
17326
       */
17327
      public static _Fields findByThriftId(int fieldId) {
17328
        switch(fieldId) {
17329
          case 0: // SUCCESS
17330
            return SUCCESS;
17331
          default:
17332
            return null;
17333
        }
17334
      }
17335
 
17336
      /**
17337
       * Find the _Fields constant that matches fieldId, throwing an exception
17338
       * if it is not found.
17339
       */
17340
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17341
        _Fields fields = findByThriftId(fieldId);
17342
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17343
        return fields;
17344
      }
17345
 
17346
      /**
17347
       * Find the _Fields constant that matches name, or null if its not found.
17348
       */
17349
      public static _Fields findByName(String name) {
17350
        return byName.get(name);
17351
      }
17352
 
17353
      private final short _thriftId;
17354
      private final String _fieldName;
17355
 
17356
      _Fields(short thriftId, String fieldName) {
17357
        _thriftId = thriftId;
17358
        _fieldName = fieldName;
17359
      }
17360
 
17361
      public short getThriftFieldId() {
17362
        return _thriftId;
17363
      }
17364
 
17365
      public String getFieldName() {
17366
        return _fieldName;
17367
      }
17368
    }
17369
 
17370
    // isset id assignments
17371
 
17372
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17373
    static {
17374
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17375
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17376
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
17377
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryAvailability.class))));
17378
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17379
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCurrentNonSerializedInventoryByScans_result.class, metaDataMap);
17380
    }
17381
 
17382
    public getCurrentNonSerializedInventoryByScans_result() {
17383
    }
17384
 
17385
    public getCurrentNonSerializedInventoryByScans_result(
17386
      List<InventoryAvailability> success)
17387
    {
17388
      this();
17389
      this.success = success;
17390
    }
17391
 
17392
    /**
17393
     * Performs a deep copy on <i>other</i>.
17394
     */
17395
    public getCurrentNonSerializedInventoryByScans_result(getCurrentNonSerializedInventoryByScans_result other) {
17396
      if (other.isSetSuccess()) {
17397
        List<InventoryAvailability> __this__success = new ArrayList<InventoryAvailability>();
17398
        for (InventoryAvailability other_element : other.success) {
17399
          __this__success.add(new InventoryAvailability(other_element));
17400
        }
17401
        this.success = __this__success;
17402
      }
17403
    }
17404
 
17405
    public getCurrentNonSerializedInventoryByScans_result deepCopy() {
17406
      return new getCurrentNonSerializedInventoryByScans_result(this);
17407
    }
17408
 
17409
    @Override
17410
    public void clear() {
17411
      this.success = null;
17412
    }
17413
 
17414
    public int getSuccessSize() {
17415
      return (this.success == null) ? 0 : this.success.size();
17416
    }
17417
 
17418
    public java.util.Iterator<InventoryAvailability> getSuccessIterator() {
17419
      return (this.success == null) ? null : this.success.iterator();
17420
    }
17421
 
17422
    public void addToSuccess(InventoryAvailability elem) {
17423
      if (this.success == null) {
17424
        this.success = new ArrayList<InventoryAvailability>();
17425
      }
17426
      this.success.add(elem);
17427
    }
17428
 
17429
    public List<InventoryAvailability> getSuccess() {
17430
      return this.success;
17431
    }
17432
 
17433
    public void setSuccess(List<InventoryAvailability> success) {
17434
      this.success = success;
17435
    }
17436
 
17437
    public void unsetSuccess() {
17438
      this.success = null;
17439
    }
17440
 
17441
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
17442
    public boolean isSetSuccess() {
17443
      return this.success != null;
17444
    }
17445
 
17446
    public void setSuccessIsSet(boolean value) {
17447
      if (!value) {
17448
        this.success = null;
17449
      }
17450
    }
17451
 
17452
    public void setFieldValue(_Fields field, Object value) {
17453
      switch (field) {
17454
      case SUCCESS:
17455
        if (value == null) {
17456
          unsetSuccess();
17457
        } else {
17458
          setSuccess((List<InventoryAvailability>)value);
17459
        }
17460
        break;
17461
 
17462
      }
17463
    }
17464
 
17465
    public Object getFieldValue(_Fields field) {
17466
      switch (field) {
17467
      case SUCCESS:
17468
        return getSuccess();
17469
 
17470
      }
17471
      throw new IllegalStateException();
17472
    }
17473
 
17474
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17475
    public boolean isSet(_Fields field) {
17476
      if (field == null) {
17477
        throw new IllegalArgumentException();
17478
      }
17479
 
17480
      switch (field) {
17481
      case SUCCESS:
17482
        return isSetSuccess();
17483
      }
17484
      throw new IllegalStateException();
17485
    }
17486
 
17487
    @Override
17488
    public boolean equals(Object that) {
17489
      if (that == null)
17490
        return false;
17491
      if (that instanceof getCurrentNonSerializedInventoryByScans_result)
17492
        return this.equals((getCurrentNonSerializedInventoryByScans_result)that);
17493
      return false;
17494
    }
17495
 
17496
    public boolean equals(getCurrentNonSerializedInventoryByScans_result that) {
17497
      if (that == null)
17498
        return false;
17499
 
17500
      boolean this_present_success = true && this.isSetSuccess();
17501
      boolean that_present_success = true && that.isSetSuccess();
17502
      if (this_present_success || that_present_success) {
17503
        if (!(this_present_success && that_present_success))
17504
          return false;
17505
        if (!this.success.equals(that.success))
17506
          return false;
17507
      }
17508
 
17509
      return true;
17510
    }
17511
 
17512
    @Override
17513
    public int hashCode() {
17514
      return 0;
17515
    }
17516
 
17517
    public int compareTo(getCurrentNonSerializedInventoryByScans_result other) {
17518
      if (!getClass().equals(other.getClass())) {
17519
        return getClass().getName().compareTo(other.getClass().getName());
17520
      }
17521
 
17522
      int lastComparison = 0;
17523
      getCurrentNonSerializedInventoryByScans_result typedOther = (getCurrentNonSerializedInventoryByScans_result)other;
17524
 
17525
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
17526
      if (lastComparison != 0) {
17527
        return lastComparison;
17528
      }
17529
      if (isSetSuccess()) {
17530
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
17531
        if (lastComparison != 0) {
17532
          return lastComparison;
17533
        }
17534
      }
17535
      return 0;
17536
    }
17537
 
17538
    public _Fields fieldForId(int fieldId) {
17539
      return _Fields.findByThriftId(fieldId);
17540
    }
17541
 
17542
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17543
      org.apache.thrift.protocol.TField field;
17544
      iprot.readStructBegin();
17545
      while (true)
17546
      {
17547
        field = iprot.readFieldBegin();
17548
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17549
          break;
17550
        }
17551
        switch (field.id) {
17552
          case 0: // SUCCESS
17553
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
17554
              {
7210 amar.kumar 17555
                org.apache.thrift.protocol.TList _list48 = iprot.readListBegin();
17556
                this.success = new ArrayList<InventoryAvailability>(_list48.size);
17557
                for (int _i49 = 0; _i49 < _list48.size; ++_i49)
6630 amar.kumar 17558
                {
7210 amar.kumar 17559
                  InventoryAvailability _elem50; // required
17560
                  _elem50 = new InventoryAvailability();
17561
                  _elem50.read(iprot);
17562
                  this.success.add(_elem50);
6630 amar.kumar 17563
                }
17564
                iprot.readListEnd();
17565
              }
17566
            } else { 
17567
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17568
            }
17569
            break;
17570
          default:
17571
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17572
        }
17573
        iprot.readFieldEnd();
17574
      }
17575
      iprot.readStructEnd();
17576
      validate();
17577
    }
17578
 
17579
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17580
      oprot.writeStructBegin(STRUCT_DESC);
17581
 
17582
      if (this.isSetSuccess()) {
17583
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17584
        {
17585
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7210 amar.kumar 17586
          for (InventoryAvailability _iter51 : this.success)
6630 amar.kumar 17587
          {
7210 amar.kumar 17588
            _iter51.write(oprot);
6630 amar.kumar 17589
          }
17590
          oprot.writeListEnd();
17591
        }
17592
        oprot.writeFieldEnd();
17593
      }
17594
      oprot.writeFieldStop();
17595
      oprot.writeStructEnd();
17596
    }
17597
 
17598
    @Override
17599
    public String toString() {
17600
      StringBuilder sb = new StringBuilder("getCurrentNonSerializedInventoryByScans_result(");
17601
      boolean first = true;
17602
 
17603
      sb.append("success:");
17604
      if (this.success == null) {
17605
        sb.append("null");
17606
      } else {
17607
        sb.append(this.success);
17608
      }
17609
      first = false;
17610
      sb.append(")");
17611
      return sb.toString();
17612
    }
17613
 
17614
    public void validate() throws org.apache.thrift.TException {
17615
      // check for required fields
17616
    }
17617
 
17618
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17619
      try {
17620
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17621
      } catch (org.apache.thrift.TException te) {
17622
        throw new java.io.IOException(te);
17623
      }
17624
    }
17625
 
17626
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17627
      try {
17628
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17629
      } catch (org.apache.thrift.TException te) {
17630
        throw new java.io.IOException(te);
17631
      }
17632
    }
17633
 
17634
  }
17635
 
6762 amar.kumar 17636
  public static class getHistoricSerializedInventoryByScans_args implements org.apache.thrift.TBase<getHistoricSerializedInventoryByScans_args, getHistoricSerializedInventoryByScans_args._Fields>, java.io.Serializable, Cloneable   {
17637
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getHistoricSerializedInventoryByScans_args");
17638
 
17639
    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);
17640
 
17641
    private long date; // required
17642
 
17643
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17644
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17645
      DATE((short)1, "date");
17646
 
17647
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17648
 
17649
      static {
17650
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17651
          byName.put(field.getFieldName(), field);
17652
        }
17653
      }
17654
 
17655
      /**
17656
       * Find the _Fields constant that matches fieldId, or null if its not found.
17657
       */
17658
      public static _Fields findByThriftId(int fieldId) {
17659
        switch(fieldId) {
17660
          case 1: // DATE
17661
            return DATE;
17662
          default:
17663
            return null;
17664
        }
17665
      }
17666
 
17667
      /**
17668
       * Find the _Fields constant that matches fieldId, throwing an exception
17669
       * if it is not found.
17670
       */
17671
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17672
        _Fields fields = findByThriftId(fieldId);
17673
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17674
        return fields;
17675
      }
17676
 
17677
      /**
17678
       * Find the _Fields constant that matches name, or null if its not found.
17679
       */
17680
      public static _Fields findByName(String name) {
17681
        return byName.get(name);
17682
      }
17683
 
17684
      private final short _thriftId;
17685
      private final String _fieldName;
17686
 
17687
      _Fields(short thriftId, String fieldName) {
17688
        _thriftId = thriftId;
17689
        _fieldName = fieldName;
17690
      }
17691
 
17692
      public short getThriftFieldId() {
17693
        return _thriftId;
17694
      }
17695
 
17696
      public String getFieldName() {
17697
        return _fieldName;
17698
      }
17699
    }
17700
 
17701
    // isset id assignments
17702
    private static final int __DATE_ISSET_ID = 0;
17703
    private BitSet __isset_bit_vector = new BitSet(1);
17704
 
17705
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17706
    static {
17707
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17708
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17709
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
17710
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17711
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getHistoricSerializedInventoryByScans_args.class, metaDataMap);
17712
    }
17713
 
17714
    public getHistoricSerializedInventoryByScans_args() {
17715
    }
17716
 
17717
    public getHistoricSerializedInventoryByScans_args(
17718
      long date)
17719
    {
17720
      this();
17721
      this.date = date;
17722
      setDateIsSet(true);
17723
    }
17724
 
17725
    /**
17726
     * Performs a deep copy on <i>other</i>.
17727
     */
17728
    public getHistoricSerializedInventoryByScans_args(getHistoricSerializedInventoryByScans_args other) {
17729
      __isset_bit_vector.clear();
17730
      __isset_bit_vector.or(other.__isset_bit_vector);
17731
      this.date = other.date;
17732
    }
17733
 
17734
    public getHistoricSerializedInventoryByScans_args deepCopy() {
17735
      return new getHistoricSerializedInventoryByScans_args(this);
17736
    }
17737
 
17738
    @Override
17739
    public void clear() {
17740
      setDateIsSet(false);
17741
      this.date = 0;
17742
    }
17743
 
17744
    public long getDate() {
17745
      return this.date;
17746
    }
17747
 
17748
    public void setDate(long date) {
17749
      this.date = date;
17750
      setDateIsSet(true);
17751
    }
17752
 
17753
    public void unsetDate() {
17754
      __isset_bit_vector.clear(__DATE_ISSET_ID);
17755
    }
17756
 
17757
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
17758
    public boolean isSetDate() {
17759
      return __isset_bit_vector.get(__DATE_ISSET_ID);
17760
    }
17761
 
17762
    public void setDateIsSet(boolean value) {
17763
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
17764
    }
17765
 
17766
    public void setFieldValue(_Fields field, Object value) {
17767
      switch (field) {
17768
      case DATE:
17769
        if (value == null) {
17770
          unsetDate();
17771
        } else {
17772
          setDate((Long)value);
17773
        }
17774
        break;
17775
 
17776
      }
17777
    }
17778
 
17779
    public Object getFieldValue(_Fields field) {
17780
      switch (field) {
17781
      case DATE:
17782
        return Long.valueOf(getDate());
17783
 
17784
      }
17785
      throw new IllegalStateException();
17786
    }
17787
 
17788
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17789
    public boolean isSet(_Fields field) {
17790
      if (field == null) {
17791
        throw new IllegalArgumentException();
17792
      }
17793
 
17794
      switch (field) {
17795
      case DATE:
17796
        return isSetDate();
17797
      }
17798
      throw new IllegalStateException();
17799
    }
17800
 
17801
    @Override
17802
    public boolean equals(Object that) {
17803
      if (that == null)
17804
        return false;
17805
      if (that instanceof getHistoricSerializedInventoryByScans_args)
17806
        return this.equals((getHistoricSerializedInventoryByScans_args)that);
17807
      return false;
17808
    }
17809
 
17810
    public boolean equals(getHistoricSerializedInventoryByScans_args that) {
17811
      if (that == null)
17812
        return false;
17813
 
17814
      boolean this_present_date = true;
17815
      boolean that_present_date = true;
17816
      if (this_present_date || that_present_date) {
17817
        if (!(this_present_date && that_present_date))
17818
          return false;
17819
        if (this.date != that.date)
17820
          return false;
17821
      }
17822
 
17823
      return true;
17824
    }
17825
 
17826
    @Override
17827
    public int hashCode() {
17828
      return 0;
17829
    }
17830
 
17831
    public int compareTo(getHistoricSerializedInventoryByScans_args other) {
17832
      if (!getClass().equals(other.getClass())) {
17833
        return getClass().getName().compareTo(other.getClass().getName());
17834
      }
17835
 
17836
      int lastComparison = 0;
17837
      getHistoricSerializedInventoryByScans_args typedOther = (getHistoricSerializedInventoryByScans_args)other;
17838
 
17839
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
17840
      if (lastComparison != 0) {
17841
        return lastComparison;
17842
      }
17843
      if (isSetDate()) {
17844
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
17845
        if (lastComparison != 0) {
17846
          return lastComparison;
17847
        }
17848
      }
17849
      return 0;
17850
    }
17851
 
17852
    public _Fields fieldForId(int fieldId) {
17853
      return _Fields.findByThriftId(fieldId);
17854
    }
17855
 
17856
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17857
      org.apache.thrift.protocol.TField field;
17858
      iprot.readStructBegin();
17859
      while (true)
17860
      {
17861
        field = iprot.readFieldBegin();
17862
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17863
          break;
17864
        }
17865
        switch (field.id) {
17866
          case 1: // DATE
17867
            if (field.type == org.apache.thrift.protocol.TType.I64) {
17868
              this.date = iprot.readI64();
17869
              setDateIsSet(true);
17870
            } else { 
17871
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17872
            }
17873
            break;
17874
          default:
17875
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17876
        }
17877
        iprot.readFieldEnd();
17878
      }
17879
      iprot.readStructEnd();
17880
      validate();
17881
    }
17882
 
17883
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17884
      validate();
17885
 
17886
      oprot.writeStructBegin(STRUCT_DESC);
17887
      oprot.writeFieldBegin(DATE_FIELD_DESC);
17888
      oprot.writeI64(this.date);
17889
      oprot.writeFieldEnd();
17890
      oprot.writeFieldStop();
17891
      oprot.writeStructEnd();
17892
    }
17893
 
17894
    @Override
17895
    public String toString() {
17896
      StringBuilder sb = new StringBuilder("getHistoricSerializedInventoryByScans_args(");
17897
      boolean first = true;
17898
 
17899
      sb.append("date:");
17900
      sb.append(this.date);
17901
      first = false;
17902
      sb.append(")");
17903
      return sb.toString();
17904
    }
17905
 
17906
    public void validate() throws org.apache.thrift.TException {
17907
      // check for required fields
17908
    }
17909
 
17910
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17911
      try {
17912
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17913
      } catch (org.apache.thrift.TException te) {
17914
        throw new java.io.IOException(te);
17915
      }
17916
    }
17917
 
17918
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17919
      try {
17920
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17921
      } catch (org.apache.thrift.TException te) {
17922
        throw new java.io.IOException(te);
17923
      }
17924
    }
17925
 
17926
  }
17927
 
17928
  public static class getHistoricSerializedInventoryByScans_result implements org.apache.thrift.TBase<getHistoricSerializedInventoryByScans_result, getHistoricSerializedInventoryByScans_result._Fields>, java.io.Serializable, Cloneable   {
17929
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getHistoricSerializedInventoryByScans_result");
17930
 
17931
    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);
17932
 
17933
    private List<InventoryAvailability> success; // required
17934
 
17935
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17936
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17937
      SUCCESS((short)0, "success");
17938
 
17939
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17940
 
17941
      static {
17942
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17943
          byName.put(field.getFieldName(), field);
17944
        }
17945
      }
17946
 
17947
      /**
17948
       * Find the _Fields constant that matches fieldId, or null if its not found.
17949
       */
17950
      public static _Fields findByThriftId(int fieldId) {
17951
        switch(fieldId) {
17952
          case 0: // SUCCESS
17953
            return SUCCESS;
17954
          default:
17955
            return null;
17956
        }
17957
      }
17958
 
17959
      /**
17960
       * Find the _Fields constant that matches fieldId, throwing an exception
17961
       * if it is not found.
17962
       */
17963
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17964
        _Fields fields = findByThriftId(fieldId);
17965
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17966
        return fields;
17967
      }
17968
 
17969
      /**
17970
       * Find the _Fields constant that matches name, or null if its not found.
17971
       */
17972
      public static _Fields findByName(String name) {
17973
        return byName.get(name);
17974
      }
17975
 
17976
      private final short _thriftId;
17977
      private final String _fieldName;
17978
 
17979
      _Fields(short thriftId, String fieldName) {
17980
        _thriftId = thriftId;
17981
        _fieldName = fieldName;
17982
      }
17983
 
17984
      public short getThriftFieldId() {
17985
        return _thriftId;
17986
      }
17987
 
17988
      public String getFieldName() {
17989
        return _fieldName;
17990
      }
17991
    }
17992
 
17993
    // isset id assignments
17994
 
17995
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17996
    static {
17997
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17998
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17999
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
18000
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryAvailability.class))));
18001
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18002
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getHistoricSerializedInventoryByScans_result.class, metaDataMap);
18003
    }
18004
 
18005
    public getHistoricSerializedInventoryByScans_result() {
18006
    }
18007
 
18008
    public getHistoricSerializedInventoryByScans_result(
18009
      List<InventoryAvailability> success)
18010
    {
18011
      this();
18012
      this.success = success;
18013
    }
18014
 
18015
    /**
18016
     * Performs a deep copy on <i>other</i>.
18017
     */
18018
    public getHistoricSerializedInventoryByScans_result(getHistoricSerializedInventoryByScans_result other) {
18019
      if (other.isSetSuccess()) {
18020
        List<InventoryAvailability> __this__success = new ArrayList<InventoryAvailability>();
18021
        for (InventoryAvailability other_element : other.success) {
18022
          __this__success.add(new InventoryAvailability(other_element));
18023
        }
18024
        this.success = __this__success;
18025
      }
18026
    }
18027
 
18028
    public getHistoricSerializedInventoryByScans_result deepCopy() {
18029
      return new getHistoricSerializedInventoryByScans_result(this);
18030
    }
18031
 
18032
    @Override
18033
    public void clear() {
18034
      this.success = null;
18035
    }
18036
 
18037
    public int getSuccessSize() {
18038
      return (this.success == null) ? 0 : this.success.size();
18039
    }
18040
 
18041
    public java.util.Iterator<InventoryAvailability> getSuccessIterator() {
18042
      return (this.success == null) ? null : this.success.iterator();
18043
    }
18044
 
18045
    public void addToSuccess(InventoryAvailability elem) {
18046
      if (this.success == null) {
18047
        this.success = new ArrayList<InventoryAvailability>();
18048
      }
18049
      this.success.add(elem);
18050
    }
18051
 
18052
    public List<InventoryAvailability> getSuccess() {
18053
      return this.success;
18054
    }
18055
 
18056
    public void setSuccess(List<InventoryAvailability> success) {
18057
      this.success = success;
18058
    }
18059
 
18060
    public void unsetSuccess() {
18061
      this.success = null;
18062
    }
18063
 
18064
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
18065
    public boolean isSetSuccess() {
18066
      return this.success != null;
18067
    }
18068
 
18069
    public void setSuccessIsSet(boolean value) {
18070
      if (!value) {
18071
        this.success = null;
18072
      }
18073
    }
18074
 
18075
    public void setFieldValue(_Fields field, Object value) {
18076
      switch (field) {
18077
      case SUCCESS:
18078
        if (value == null) {
18079
          unsetSuccess();
18080
        } else {
18081
          setSuccess((List<InventoryAvailability>)value);
18082
        }
18083
        break;
18084
 
18085
      }
18086
    }
18087
 
18088
    public Object getFieldValue(_Fields field) {
18089
      switch (field) {
18090
      case SUCCESS:
18091
        return getSuccess();
18092
 
18093
      }
18094
      throw new IllegalStateException();
18095
    }
18096
 
18097
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18098
    public boolean isSet(_Fields field) {
18099
      if (field == null) {
18100
        throw new IllegalArgumentException();
18101
      }
18102
 
18103
      switch (field) {
18104
      case SUCCESS:
18105
        return isSetSuccess();
18106
      }
18107
      throw new IllegalStateException();
18108
    }
18109
 
18110
    @Override
18111
    public boolean equals(Object that) {
18112
      if (that == null)
18113
        return false;
18114
      if (that instanceof getHistoricSerializedInventoryByScans_result)
18115
        return this.equals((getHistoricSerializedInventoryByScans_result)that);
18116
      return false;
18117
    }
18118
 
18119
    public boolean equals(getHistoricSerializedInventoryByScans_result that) {
18120
      if (that == null)
18121
        return false;
18122
 
18123
      boolean this_present_success = true && this.isSetSuccess();
18124
      boolean that_present_success = true && that.isSetSuccess();
18125
      if (this_present_success || that_present_success) {
18126
        if (!(this_present_success && that_present_success))
18127
          return false;
18128
        if (!this.success.equals(that.success))
18129
          return false;
18130
      }
18131
 
18132
      return true;
18133
    }
18134
 
18135
    @Override
18136
    public int hashCode() {
18137
      return 0;
18138
    }
18139
 
18140
    public int compareTo(getHistoricSerializedInventoryByScans_result other) {
18141
      if (!getClass().equals(other.getClass())) {
18142
        return getClass().getName().compareTo(other.getClass().getName());
18143
      }
18144
 
18145
      int lastComparison = 0;
18146
      getHistoricSerializedInventoryByScans_result typedOther = (getHistoricSerializedInventoryByScans_result)other;
18147
 
18148
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
18149
      if (lastComparison != 0) {
18150
        return lastComparison;
18151
      }
18152
      if (isSetSuccess()) {
18153
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
18154
        if (lastComparison != 0) {
18155
          return lastComparison;
18156
        }
18157
      }
18158
      return 0;
18159
    }
18160
 
18161
    public _Fields fieldForId(int fieldId) {
18162
      return _Fields.findByThriftId(fieldId);
18163
    }
18164
 
18165
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18166
      org.apache.thrift.protocol.TField field;
18167
      iprot.readStructBegin();
18168
      while (true)
18169
      {
18170
        field = iprot.readFieldBegin();
18171
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18172
          break;
18173
        }
18174
        switch (field.id) {
18175
          case 0: // SUCCESS
18176
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
18177
              {
7210 amar.kumar 18178
                org.apache.thrift.protocol.TList _list52 = iprot.readListBegin();
18179
                this.success = new ArrayList<InventoryAvailability>(_list52.size);
18180
                for (int _i53 = 0; _i53 < _list52.size; ++_i53)
6762 amar.kumar 18181
                {
7210 amar.kumar 18182
                  InventoryAvailability _elem54; // required
18183
                  _elem54 = new InventoryAvailability();
18184
                  _elem54.read(iprot);
18185
                  this.success.add(_elem54);
6762 amar.kumar 18186
                }
18187
                iprot.readListEnd();
18188
              }
18189
            } else { 
18190
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18191
            }
18192
            break;
18193
          default:
18194
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18195
        }
18196
        iprot.readFieldEnd();
18197
      }
18198
      iprot.readStructEnd();
18199
      validate();
18200
    }
18201
 
18202
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18203
      oprot.writeStructBegin(STRUCT_DESC);
18204
 
18205
      if (this.isSetSuccess()) {
18206
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18207
        {
18208
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7210 amar.kumar 18209
          for (InventoryAvailability _iter55 : this.success)
6762 amar.kumar 18210
          {
7210 amar.kumar 18211
            _iter55.write(oprot);
6762 amar.kumar 18212
          }
18213
          oprot.writeListEnd();
18214
        }
18215
        oprot.writeFieldEnd();
18216
      }
18217
      oprot.writeFieldStop();
18218
      oprot.writeStructEnd();
18219
    }
18220
 
18221
    @Override
18222
    public String toString() {
18223
      StringBuilder sb = new StringBuilder("getHistoricSerializedInventoryByScans_result(");
18224
      boolean first = true;
18225
 
18226
      sb.append("success:");
18227
      if (this.success == null) {
18228
        sb.append("null");
18229
      } else {
18230
        sb.append(this.success);
18231
      }
18232
      first = false;
18233
      sb.append(")");
18234
      return sb.toString();
18235
    }
18236
 
18237
    public void validate() throws org.apache.thrift.TException {
18238
      // check for required fields
18239
    }
18240
 
18241
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18242
      try {
18243
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18244
      } catch (org.apache.thrift.TException te) {
18245
        throw new java.io.IOException(te);
18246
      }
18247
    }
18248
 
18249
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18250
      try {
18251
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18252
      } catch (org.apache.thrift.TException te) {
18253
        throw new java.io.IOException(te);
18254
      }
18255
    }
18256
 
18257
  }
18258
 
18259
  public static class getHistoricNonSerializedInventoryByScans_args implements org.apache.thrift.TBase<getHistoricNonSerializedInventoryByScans_args, getHistoricNonSerializedInventoryByScans_args._Fields>, java.io.Serializable, Cloneable   {
18260
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getHistoricNonSerializedInventoryByScans_args");
18261
 
18262
    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);
18263
 
18264
    private long date; // required
18265
 
18266
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18267
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18268
      DATE((short)1, "date");
18269
 
18270
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18271
 
18272
      static {
18273
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18274
          byName.put(field.getFieldName(), field);
18275
        }
18276
      }
18277
 
18278
      /**
18279
       * Find the _Fields constant that matches fieldId, or null if its not found.
18280
       */
18281
      public static _Fields findByThriftId(int fieldId) {
18282
        switch(fieldId) {
18283
          case 1: // DATE
18284
            return DATE;
18285
          default:
18286
            return null;
18287
        }
18288
      }
18289
 
18290
      /**
18291
       * Find the _Fields constant that matches fieldId, throwing an exception
18292
       * if it is not found.
18293
       */
18294
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18295
        _Fields fields = findByThriftId(fieldId);
18296
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18297
        return fields;
18298
      }
18299
 
18300
      /**
18301
       * Find the _Fields constant that matches name, or null if its not found.
18302
       */
18303
      public static _Fields findByName(String name) {
18304
        return byName.get(name);
18305
      }
18306
 
18307
      private final short _thriftId;
18308
      private final String _fieldName;
18309
 
18310
      _Fields(short thriftId, String fieldName) {
18311
        _thriftId = thriftId;
18312
        _fieldName = fieldName;
18313
      }
18314
 
18315
      public short getThriftFieldId() {
18316
        return _thriftId;
18317
      }
18318
 
18319
      public String getFieldName() {
18320
        return _fieldName;
18321
      }
18322
    }
18323
 
18324
    // isset id assignments
18325
    private static final int __DATE_ISSET_ID = 0;
18326
    private BitSet __isset_bit_vector = new BitSet(1);
18327
 
18328
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18329
    static {
18330
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18331
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18332
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18333
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18334
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getHistoricNonSerializedInventoryByScans_args.class, metaDataMap);
18335
    }
18336
 
18337
    public getHistoricNonSerializedInventoryByScans_args() {
18338
    }
18339
 
18340
    public getHistoricNonSerializedInventoryByScans_args(
18341
      long date)
18342
    {
18343
      this();
18344
      this.date = date;
18345
      setDateIsSet(true);
18346
    }
18347
 
18348
    /**
18349
     * Performs a deep copy on <i>other</i>.
18350
     */
18351
    public getHistoricNonSerializedInventoryByScans_args(getHistoricNonSerializedInventoryByScans_args other) {
18352
      __isset_bit_vector.clear();
18353
      __isset_bit_vector.or(other.__isset_bit_vector);
18354
      this.date = other.date;
18355
    }
18356
 
18357
    public getHistoricNonSerializedInventoryByScans_args deepCopy() {
18358
      return new getHistoricNonSerializedInventoryByScans_args(this);
18359
    }
18360
 
18361
    @Override
18362
    public void clear() {
18363
      setDateIsSet(false);
18364
      this.date = 0;
18365
    }
18366
 
18367
    public long getDate() {
18368
      return this.date;
18369
    }
18370
 
18371
    public void setDate(long date) {
18372
      this.date = date;
18373
      setDateIsSet(true);
18374
    }
18375
 
18376
    public void unsetDate() {
18377
      __isset_bit_vector.clear(__DATE_ISSET_ID);
18378
    }
18379
 
18380
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
18381
    public boolean isSetDate() {
18382
      return __isset_bit_vector.get(__DATE_ISSET_ID);
18383
    }
18384
 
18385
    public void setDateIsSet(boolean value) {
18386
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
18387
    }
18388
 
18389
    public void setFieldValue(_Fields field, Object value) {
18390
      switch (field) {
18391
      case DATE:
18392
        if (value == null) {
18393
          unsetDate();
18394
        } else {
18395
          setDate((Long)value);
18396
        }
18397
        break;
18398
 
18399
      }
18400
    }
18401
 
18402
    public Object getFieldValue(_Fields field) {
18403
      switch (field) {
18404
      case DATE:
18405
        return Long.valueOf(getDate());
18406
 
18407
      }
18408
      throw new IllegalStateException();
18409
    }
18410
 
18411
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18412
    public boolean isSet(_Fields field) {
18413
      if (field == null) {
18414
        throw new IllegalArgumentException();
18415
      }
18416
 
18417
      switch (field) {
18418
      case DATE:
18419
        return isSetDate();
18420
      }
18421
      throw new IllegalStateException();
18422
    }
18423
 
18424
    @Override
18425
    public boolean equals(Object that) {
18426
      if (that == null)
18427
        return false;
18428
      if (that instanceof getHistoricNonSerializedInventoryByScans_args)
18429
        return this.equals((getHistoricNonSerializedInventoryByScans_args)that);
18430
      return false;
18431
    }
18432
 
18433
    public boolean equals(getHistoricNonSerializedInventoryByScans_args that) {
18434
      if (that == null)
18435
        return false;
18436
 
18437
      boolean this_present_date = true;
18438
      boolean that_present_date = true;
18439
      if (this_present_date || that_present_date) {
18440
        if (!(this_present_date && that_present_date))
18441
          return false;
18442
        if (this.date != that.date)
18443
          return false;
18444
      }
18445
 
18446
      return true;
18447
    }
18448
 
18449
    @Override
18450
    public int hashCode() {
18451
      return 0;
18452
    }
18453
 
18454
    public int compareTo(getHistoricNonSerializedInventoryByScans_args other) {
18455
      if (!getClass().equals(other.getClass())) {
18456
        return getClass().getName().compareTo(other.getClass().getName());
18457
      }
18458
 
18459
      int lastComparison = 0;
18460
      getHistoricNonSerializedInventoryByScans_args typedOther = (getHistoricNonSerializedInventoryByScans_args)other;
18461
 
18462
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
18463
      if (lastComparison != 0) {
18464
        return lastComparison;
18465
      }
18466
      if (isSetDate()) {
18467
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
18468
        if (lastComparison != 0) {
18469
          return lastComparison;
18470
        }
18471
      }
18472
      return 0;
18473
    }
18474
 
18475
    public _Fields fieldForId(int fieldId) {
18476
      return _Fields.findByThriftId(fieldId);
18477
    }
18478
 
18479
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18480
      org.apache.thrift.protocol.TField field;
18481
      iprot.readStructBegin();
18482
      while (true)
18483
      {
18484
        field = iprot.readFieldBegin();
18485
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18486
          break;
18487
        }
18488
        switch (field.id) {
18489
          case 1: // DATE
18490
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18491
              this.date = iprot.readI64();
18492
              setDateIsSet(true);
18493
            } else { 
18494
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18495
            }
18496
            break;
18497
          default:
18498
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18499
        }
18500
        iprot.readFieldEnd();
18501
      }
18502
      iprot.readStructEnd();
18503
      validate();
18504
    }
18505
 
18506
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18507
      validate();
18508
 
18509
      oprot.writeStructBegin(STRUCT_DESC);
18510
      oprot.writeFieldBegin(DATE_FIELD_DESC);
18511
      oprot.writeI64(this.date);
18512
      oprot.writeFieldEnd();
18513
      oprot.writeFieldStop();
18514
      oprot.writeStructEnd();
18515
    }
18516
 
18517
    @Override
18518
    public String toString() {
18519
      StringBuilder sb = new StringBuilder("getHistoricNonSerializedInventoryByScans_args(");
18520
      boolean first = true;
18521
 
18522
      sb.append("date:");
18523
      sb.append(this.date);
18524
      first = false;
18525
      sb.append(")");
18526
      return sb.toString();
18527
    }
18528
 
18529
    public void validate() throws org.apache.thrift.TException {
18530
      // check for required fields
18531
    }
18532
 
18533
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18534
      try {
18535
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18536
      } catch (org.apache.thrift.TException te) {
18537
        throw new java.io.IOException(te);
18538
      }
18539
    }
18540
 
18541
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18542
      try {
18543
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
18544
        __isset_bit_vector = new BitSet(1);
18545
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18546
      } catch (org.apache.thrift.TException te) {
18547
        throw new java.io.IOException(te);
18548
      }
18549
    }
18550
 
18551
  }
18552
 
18553
  public static class getHistoricNonSerializedInventoryByScans_result implements org.apache.thrift.TBase<getHistoricNonSerializedInventoryByScans_result, getHistoricNonSerializedInventoryByScans_result._Fields>, java.io.Serializable, Cloneable   {
18554
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getHistoricNonSerializedInventoryByScans_result");
18555
 
18556
    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);
18557
 
18558
    private List<InventoryAvailability> success; // required
18559
 
18560
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18561
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18562
      SUCCESS((short)0, "success");
18563
 
18564
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18565
 
18566
      static {
18567
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18568
          byName.put(field.getFieldName(), field);
18569
        }
18570
      }
18571
 
18572
      /**
18573
       * Find the _Fields constant that matches fieldId, or null if its not found.
18574
       */
18575
      public static _Fields findByThriftId(int fieldId) {
18576
        switch(fieldId) {
18577
          case 0: // SUCCESS
18578
            return SUCCESS;
18579
          default:
18580
            return null;
18581
        }
18582
      }
18583
 
18584
      /**
18585
       * Find the _Fields constant that matches fieldId, throwing an exception
18586
       * if it is not found.
18587
       */
18588
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18589
        _Fields fields = findByThriftId(fieldId);
18590
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18591
        return fields;
18592
      }
18593
 
18594
      /**
18595
       * Find the _Fields constant that matches name, or null if its not found.
18596
       */
18597
      public static _Fields findByName(String name) {
18598
        return byName.get(name);
18599
      }
18600
 
18601
      private final short _thriftId;
18602
      private final String _fieldName;
18603
 
18604
      _Fields(short thriftId, String fieldName) {
18605
        _thriftId = thriftId;
18606
        _fieldName = fieldName;
18607
      }
18608
 
18609
      public short getThriftFieldId() {
18610
        return _thriftId;
18611
      }
18612
 
18613
      public String getFieldName() {
18614
        return _fieldName;
18615
      }
18616
    }
18617
 
18618
    // isset id assignments
18619
 
18620
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18621
    static {
18622
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18623
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18624
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
18625
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryAvailability.class))));
18626
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18627
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getHistoricNonSerializedInventoryByScans_result.class, metaDataMap);
18628
    }
18629
 
18630
    public getHistoricNonSerializedInventoryByScans_result() {
18631
    }
18632
 
18633
    public getHistoricNonSerializedInventoryByScans_result(
18634
      List<InventoryAvailability> success)
18635
    {
18636
      this();
18637
      this.success = success;
18638
    }
18639
 
18640
    /**
18641
     * Performs a deep copy on <i>other</i>.
18642
     */
18643
    public getHistoricNonSerializedInventoryByScans_result(getHistoricNonSerializedInventoryByScans_result other) {
18644
      if (other.isSetSuccess()) {
18645
        List<InventoryAvailability> __this__success = new ArrayList<InventoryAvailability>();
18646
        for (InventoryAvailability other_element : other.success) {
18647
          __this__success.add(new InventoryAvailability(other_element));
18648
        }
18649
        this.success = __this__success;
18650
      }
18651
    }
18652
 
18653
    public getHistoricNonSerializedInventoryByScans_result deepCopy() {
18654
      return new getHistoricNonSerializedInventoryByScans_result(this);
18655
    }
18656
 
18657
    @Override
18658
    public void clear() {
18659
      this.success = null;
18660
    }
18661
 
18662
    public int getSuccessSize() {
18663
      return (this.success == null) ? 0 : this.success.size();
18664
    }
18665
 
18666
    public java.util.Iterator<InventoryAvailability> getSuccessIterator() {
18667
      return (this.success == null) ? null : this.success.iterator();
18668
    }
18669
 
18670
    public void addToSuccess(InventoryAvailability elem) {
18671
      if (this.success == null) {
18672
        this.success = new ArrayList<InventoryAvailability>();
18673
      }
18674
      this.success.add(elem);
18675
    }
18676
 
18677
    public List<InventoryAvailability> getSuccess() {
18678
      return this.success;
18679
    }
18680
 
18681
    public void setSuccess(List<InventoryAvailability> success) {
18682
      this.success = success;
18683
    }
18684
 
18685
    public void unsetSuccess() {
18686
      this.success = null;
18687
    }
18688
 
18689
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
18690
    public boolean isSetSuccess() {
18691
      return this.success != null;
18692
    }
18693
 
18694
    public void setSuccessIsSet(boolean value) {
18695
      if (!value) {
18696
        this.success = null;
18697
      }
18698
    }
18699
 
18700
    public void setFieldValue(_Fields field, Object value) {
18701
      switch (field) {
18702
      case SUCCESS:
18703
        if (value == null) {
18704
          unsetSuccess();
18705
        } else {
18706
          setSuccess((List<InventoryAvailability>)value);
18707
        }
18708
        break;
18709
 
18710
      }
18711
    }
18712
 
18713
    public Object getFieldValue(_Fields field) {
18714
      switch (field) {
18715
      case SUCCESS:
18716
        return getSuccess();
18717
 
18718
      }
18719
      throw new IllegalStateException();
18720
    }
18721
 
18722
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18723
    public boolean isSet(_Fields field) {
18724
      if (field == null) {
18725
        throw new IllegalArgumentException();
18726
      }
18727
 
18728
      switch (field) {
18729
      case SUCCESS:
18730
        return isSetSuccess();
18731
      }
18732
      throw new IllegalStateException();
18733
    }
18734
 
18735
    @Override
18736
    public boolean equals(Object that) {
18737
      if (that == null)
18738
        return false;
18739
      if (that instanceof getHistoricNonSerializedInventoryByScans_result)
18740
        return this.equals((getHistoricNonSerializedInventoryByScans_result)that);
18741
      return false;
18742
    }
18743
 
18744
    public boolean equals(getHistoricNonSerializedInventoryByScans_result that) {
18745
      if (that == null)
18746
        return false;
18747
 
18748
      boolean this_present_success = true && this.isSetSuccess();
18749
      boolean that_present_success = true && that.isSetSuccess();
18750
      if (this_present_success || that_present_success) {
18751
        if (!(this_present_success && that_present_success))
18752
          return false;
18753
        if (!this.success.equals(that.success))
18754
          return false;
18755
      }
18756
 
18757
      return true;
18758
    }
18759
 
18760
    @Override
18761
    public int hashCode() {
18762
      return 0;
18763
    }
18764
 
18765
    public int compareTo(getHistoricNonSerializedInventoryByScans_result other) {
18766
      if (!getClass().equals(other.getClass())) {
18767
        return getClass().getName().compareTo(other.getClass().getName());
18768
      }
18769
 
18770
      int lastComparison = 0;
18771
      getHistoricNonSerializedInventoryByScans_result typedOther = (getHistoricNonSerializedInventoryByScans_result)other;
18772
 
18773
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
18774
      if (lastComparison != 0) {
18775
        return lastComparison;
18776
      }
18777
      if (isSetSuccess()) {
18778
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
18779
        if (lastComparison != 0) {
18780
          return lastComparison;
18781
        }
18782
      }
18783
      return 0;
18784
    }
18785
 
18786
    public _Fields fieldForId(int fieldId) {
18787
      return _Fields.findByThriftId(fieldId);
18788
    }
18789
 
18790
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18791
      org.apache.thrift.protocol.TField field;
18792
      iprot.readStructBegin();
18793
      while (true)
18794
      {
18795
        field = iprot.readFieldBegin();
18796
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18797
          break;
18798
        }
18799
        switch (field.id) {
18800
          case 0: // SUCCESS
18801
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
18802
              {
7210 amar.kumar 18803
                org.apache.thrift.protocol.TList _list56 = iprot.readListBegin();
18804
                this.success = new ArrayList<InventoryAvailability>(_list56.size);
18805
                for (int _i57 = 0; _i57 < _list56.size; ++_i57)
6762 amar.kumar 18806
                {
7210 amar.kumar 18807
                  InventoryAvailability _elem58; // required
18808
                  _elem58 = new InventoryAvailability();
18809
                  _elem58.read(iprot);
18810
                  this.success.add(_elem58);
6762 amar.kumar 18811
                }
18812
                iprot.readListEnd();
18813
              }
18814
            } else { 
18815
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18816
            }
18817
            break;
18818
          default:
18819
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18820
        }
18821
        iprot.readFieldEnd();
18822
      }
18823
      iprot.readStructEnd();
18824
      validate();
18825
    }
18826
 
18827
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18828
      oprot.writeStructBegin(STRUCT_DESC);
18829
 
18830
      if (this.isSetSuccess()) {
18831
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18832
        {
18833
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7210 amar.kumar 18834
          for (InventoryAvailability _iter59 : this.success)
6762 amar.kumar 18835
          {
7210 amar.kumar 18836
            _iter59.write(oprot);
6762 amar.kumar 18837
          }
18838
          oprot.writeListEnd();
18839
        }
18840
        oprot.writeFieldEnd();
18841
      }
18842
      oprot.writeFieldStop();
18843
      oprot.writeStructEnd();
18844
    }
18845
 
18846
    @Override
18847
    public String toString() {
18848
      StringBuilder sb = new StringBuilder("getHistoricNonSerializedInventoryByScans_result(");
18849
      boolean first = true;
18850
 
18851
      sb.append("success:");
18852
      if (this.success == null) {
18853
        sb.append("null");
18854
      } else {
18855
        sb.append(this.success);
18856
      }
18857
      first = false;
18858
      sb.append(")");
18859
      return sb.toString();
18860
    }
18861
 
18862
    public void validate() throws org.apache.thrift.TException {
18863
      // check for required fields
18864
    }
18865
 
18866
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18867
      try {
18868
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18869
      } catch (org.apache.thrift.TException te) {
18870
        throw new java.io.IOException(te);
18871
      }
18872
    }
18873
 
18874
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18875
      try {
18876
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18877
      } catch (org.apache.thrift.TException te) {
18878
        throw new java.io.IOException(te);
18879
      }
18880
    }
18881
 
18882
  }
18883
 
18884
  public static class scanForOursExternalSale_args implements org.apache.thrift.TBase<scanForOursExternalSale_args, scanForOursExternalSale_args._Fields>, java.io.Serializable, Cloneable   {
18885
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOursExternalSale_args");
18886
 
18887
    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);
18888
    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);
18889
    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);
18890
    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);
18891
    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);
18892
    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);
18893
    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);
18894
 
18895
    private long itemId; // required
18896
    private String serialNumber; // required
18897
    private String itemNumber; // required
18898
    private String invoiceNumber; // required
18899
    private long warehouseId; // required
18900
    private double unitPrice; // required
18901
    private long orderId; // required
18902
 
18903
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18904
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18905
      ITEM_ID((short)1, "itemId"),
18906
      SERIAL_NUMBER((short)2, "serialNumber"),
18907
      ITEM_NUMBER((short)3, "itemNumber"),
18908
      INVOICE_NUMBER((short)4, "invoiceNumber"),
18909
      WAREHOUSE_ID((short)5, "warehouseId"),
18910
      UNIT_PRICE((short)6, "unitPrice"),
18911
      ORDER_ID((short)7, "orderId");
18912
 
18913
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18914
 
18915
      static {
18916
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18917
          byName.put(field.getFieldName(), field);
18918
        }
18919
      }
18920
 
18921
      /**
18922
       * Find the _Fields constant that matches fieldId, or null if its not found.
18923
       */
18924
      public static _Fields findByThriftId(int fieldId) {
18925
        switch(fieldId) {
18926
          case 1: // ITEM_ID
18927
            return ITEM_ID;
18928
          case 2: // SERIAL_NUMBER
18929
            return SERIAL_NUMBER;
18930
          case 3: // ITEM_NUMBER
18931
            return ITEM_NUMBER;
18932
          case 4: // INVOICE_NUMBER
18933
            return INVOICE_NUMBER;
18934
          case 5: // WAREHOUSE_ID
18935
            return WAREHOUSE_ID;
18936
          case 6: // UNIT_PRICE
18937
            return UNIT_PRICE;
18938
          case 7: // ORDER_ID
18939
            return ORDER_ID;
18940
          default:
18941
            return null;
18942
        }
18943
      }
18944
 
18945
      /**
18946
       * Find the _Fields constant that matches fieldId, throwing an exception
18947
       * if it is not found.
18948
       */
18949
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18950
        _Fields fields = findByThriftId(fieldId);
18951
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18952
        return fields;
18953
      }
18954
 
18955
      /**
18956
       * Find the _Fields constant that matches name, or null if its not found.
18957
       */
18958
      public static _Fields findByName(String name) {
18959
        return byName.get(name);
18960
      }
18961
 
18962
      private final short _thriftId;
18963
      private final String _fieldName;
18964
 
18965
      _Fields(short thriftId, String fieldName) {
18966
        _thriftId = thriftId;
18967
        _fieldName = fieldName;
18968
      }
18969
 
18970
      public short getThriftFieldId() {
18971
        return _thriftId;
18972
      }
18973
 
18974
      public String getFieldName() {
18975
        return _fieldName;
18976
      }
18977
    }
18978
 
18979
    // isset id assignments
18980
    private static final int __ITEMID_ISSET_ID = 0;
18981
    private static final int __WAREHOUSEID_ISSET_ID = 1;
18982
    private static final int __UNITPRICE_ISSET_ID = 2;
18983
    private static final int __ORDERID_ISSET_ID = 3;
18984
    private BitSet __isset_bit_vector = new BitSet(4);
18985
 
18986
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18987
    static {
18988
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18989
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18990
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18991
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18992
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
18993
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18994
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
18995
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18996
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
18997
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18998
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18999
      tmpMap.put(_Fields.UNIT_PRICE, new org.apache.thrift.meta_data.FieldMetaData("unitPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19000
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
19001
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19002
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19003
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19004
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOursExternalSale_args.class, metaDataMap);
19005
    }
19006
 
19007
    public scanForOursExternalSale_args() {
19008
    }
19009
 
19010
    public scanForOursExternalSale_args(
19011
      long itemId,
19012
      String serialNumber,
19013
      String itemNumber,
19014
      String invoiceNumber,
19015
      long warehouseId,
19016
      double unitPrice,
19017
      long orderId)
19018
    {
19019
      this();
19020
      this.itemId = itemId;
19021
      setItemIdIsSet(true);
19022
      this.serialNumber = serialNumber;
19023
      this.itemNumber = itemNumber;
19024
      this.invoiceNumber = invoiceNumber;
19025
      this.warehouseId = warehouseId;
19026
      setWarehouseIdIsSet(true);
19027
      this.unitPrice = unitPrice;
19028
      setUnitPriceIsSet(true);
19029
      this.orderId = orderId;
19030
      setOrderIdIsSet(true);
19031
    }
19032
 
19033
    /**
19034
     * Performs a deep copy on <i>other</i>.
19035
     */
19036
    public scanForOursExternalSale_args(scanForOursExternalSale_args other) {
19037
      __isset_bit_vector.clear();
19038
      __isset_bit_vector.or(other.__isset_bit_vector);
19039
      this.itemId = other.itemId;
19040
      if (other.isSetSerialNumber()) {
19041
        this.serialNumber = other.serialNumber;
19042
      }
19043
      if (other.isSetItemNumber()) {
19044
        this.itemNumber = other.itemNumber;
19045
      }
19046
      if (other.isSetInvoiceNumber()) {
19047
        this.invoiceNumber = other.invoiceNumber;
19048
      }
19049
      this.warehouseId = other.warehouseId;
19050
      this.unitPrice = other.unitPrice;
19051
      this.orderId = other.orderId;
19052
    }
19053
 
19054
    public scanForOursExternalSale_args deepCopy() {
19055
      return new scanForOursExternalSale_args(this);
19056
    }
19057
 
19058
    @Override
19059
    public void clear() {
19060
      setItemIdIsSet(false);
19061
      this.itemId = 0;
19062
      this.serialNumber = null;
19063
      this.itemNumber = null;
19064
      this.invoiceNumber = null;
19065
      setWarehouseIdIsSet(false);
19066
      this.warehouseId = 0;
19067
      setUnitPriceIsSet(false);
19068
      this.unitPrice = 0.0;
19069
      setOrderIdIsSet(false);
19070
      this.orderId = 0;
19071
    }
19072
 
19073
    public long getItemId() {
19074
      return this.itemId;
19075
    }
19076
 
19077
    public void setItemId(long itemId) {
19078
      this.itemId = itemId;
19079
      setItemIdIsSet(true);
19080
    }
19081
 
19082
    public void unsetItemId() {
19083
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
19084
    }
19085
 
19086
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
19087
    public boolean isSetItemId() {
19088
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
19089
    }
19090
 
19091
    public void setItemIdIsSet(boolean value) {
19092
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
19093
    }
19094
 
19095
    public String getSerialNumber() {
19096
      return this.serialNumber;
19097
    }
19098
 
19099
    public void setSerialNumber(String serialNumber) {
19100
      this.serialNumber = serialNumber;
19101
    }
19102
 
19103
    public void unsetSerialNumber() {
19104
      this.serialNumber = null;
19105
    }
19106
 
19107
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
19108
    public boolean isSetSerialNumber() {
19109
      return this.serialNumber != null;
19110
    }
19111
 
19112
    public void setSerialNumberIsSet(boolean value) {
19113
      if (!value) {
19114
        this.serialNumber = null;
19115
      }
19116
    }
19117
 
19118
    public String getItemNumber() {
19119
      return this.itemNumber;
19120
    }
19121
 
19122
    public void setItemNumber(String itemNumber) {
19123
      this.itemNumber = itemNumber;
19124
    }
19125
 
19126
    public void unsetItemNumber() {
19127
      this.itemNumber = null;
19128
    }
19129
 
19130
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
19131
    public boolean isSetItemNumber() {
19132
      return this.itemNumber != null;
19133
    }
19134
 
19135
    public void setItemNumberIsSet(boolean value) {
19136
      if (!value) {
19137
        this.itemNumber = null;
19138
      }
19139
    }
19140
 
19141
    public String getInvoiceNumber() {
19142
      return this.invoiceNumber;
19143
    }
19144
 
19145
    public void setInvoiceNumber(String invoiceNumber) {
19146
      this.invoiceNumber = invoiceNumber;
19147
    }
19148
 
19149
    public void unsetInvoiceNumber() {
19150
      this.invoiceNumber = null;
19151
    }
19152
 
19153
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
19154
    public boolean isSetInvoiceNumber() {
19155
      return this.invoiceNumber != null;
19156
    }
19157
 
19158
    public void setInvoiceNumberIsSet(boolean value) {
19159
      if (!value) {
19160
        this.invoiceNumber = null;
19161
      }
19162
    }
19163
 
19164
    public long getWarehouseId() {
19165
      return this.warehouseId;
19166
    }
19167
 
19168
    public void setWarehouseId(long warehouseId) {
19169
      this.warehouseId = warehouseId;
19170
      setWarehouseIdIsSet(true);
19171
    }
19172
 
19173
    public void unsetWarehouseId() {
19174
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
19175
    }
19176
 
19177
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
19178
    public boolean isSetWarehouseId() {
19179
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
19180
    }
19181
 
19182
    public void setWarehouseIdIsSet(boolean value) {
19183
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
19184
    }
19185
 
19186
    public double getUnitPrice() {
19187
      return this.unitPrice;
19188
    }
19189
 
19190
    public void setUnitPrice(double unitPrice) {
19191
      this.unitPrice = unitPrice;
19192
      setUnitPriceIsSet(true);
19193
    }
19194
 
19195
    public void unsetUnitPrice() {
19196
      __isset_bit_vector.clear(__UNITPRICE_ISSET_ID);
19197
    }
19198
 
19199
    /** Returns true if field unitPrice is set (has been assigned a value) and false otherwise */
19200
    public boolean isSetUnitPrice() {
19201
      return __isset_bit_vector.get(__UNITPRICE_ISSET_ID);
19202
    }
19203
 
19204
    public void setUnitPriceIsSet(boolean value) {
19205
      __isset_bit_vector.set(__UNITPRICE_ISSET_ID, value);
19206
    }
19207
 
19208
    public long getOrderId() {
19209
      return this.orderId;
19210
    }
19211
 
19212
    public void setOrderId(long orderId) {
19213
      this.orderId = orderId;
19214
      setOrderIdIsSet(true);
19215
    }
19216
 
19217
    public void unsetOrderId() {
19218
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
19219
    }
19220
 
19221
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
19222
    public boolean isSetOrderId() {
19223
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
19224
    }
19225
 
19226
    public void setOrderIdIsSet(boolean value) {
19227
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
19228
    }
19229
 
19230
    public void setFieldValue(_Fields field, Object value) {
19231
      switch (field) {
19232
      case ITEM_ID:
19233
        if (value == null) {
19234
          unsetItemId();
19235
        } else {
19236
          setItemId((Long)value);
19237
        }
19238
        break;
19239
 
19240
      case SERIAL_NUMBER:
19241
        if (value == null) {
19242
          unsetSerialNumber();
19243
        } else {
19244
          setSerialNumber((String)value);
19245
        }
19246
        break;
19247
 
19248
      case ITEM_NUMBER:
19249
        if (value == null) {
19250
          unsetItemNumber();
19251
        } else {
19252
          setItemNumber((String)value);
19253
        }
19254
        break;
19255
 
19256
      case INVOICE_NUMBER:
19257
        if (value == null) {
19258
          unsetInvoiceNumber();
19259
        } else {
19260
          setInvoiceNumber((String)value);
19261
        }
19262
        break;
19263
 
19264
      case WAREHOUSE_ID:
19265
        if (value == null) {
19266
          unsetWarehouseId();
19267
        } else {
19268
          setWarehouseId((Long)value);
19269
        }
19270
        break;
19271
 
19272
      case UNIT_PRICE:
19273
        if (value == null) {
19274
          unsetUnitPrice();
19275
        } else {
19276
          setUnitPrice((Double)value);
19277
        }
19278
        break;
19279
 
19280
      case ORDER_ID:
19281
        if (value == null) {
19282
          unsetOrderId();
19283
        } else {
19284
          setOrderId((Long)value);
19285
        }
19286
        break;
19287
 
19288
      }
19289
    }
19290
 
19291
    public Object getFieldValue(_Fields field) {
19292
      switch (field) {
19293
      case ITEM_ID:
19294
        return Long.valueOf(getItemId());
19295
 
19296
      case SERIAL_NUMBER:
19297
        return getSerialNumber();
19298
 
19299
      case ITEM_NUMBER:
19300
        return getItemNumber();
19301
 
19302
      case INVOICE_NUMBER:
19303
        return getInvoiceNumber();
19304
 
19305
      case WAREHOUSE_ID:
19306
        return Long.valueOf(getWarehouseId());
19307
 
19308
      case UNIT_PRICE:
19309
        return Double.valueOf(getUnitPrice());
19310
 
19311
      case ORDER_ID:
19312
        return Long.valueOf(getOrderId());
19313
 
19314
      }
19315
      throw new IllegalStateException();
19316
    }
19317
 
19318
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19319
    public boolean isSet(_Fields field) {
19320
      if (field == null) {
19321
        throw new IllegalArgumentException();
19322
      }
19323
 
19324
      switch (field) {
19325
      case ITEM_ID:
19326
        return isSetItemId();
19327
      case SERIAL_NUMBER:
19328
        return isSetSerialNumber();
19329
      case ITEM_NUMBER:
19330
        return isSetItemNumber();
19331
      case INVOICE_NUMBER:
19332
        return isSetInvoiceNumber();
19333
      case WAREHOUSE_ID:
19334
        return isSetWarehouseId();
19335
      case UNIT_PRICE:
19336
        return isSetUnitPrice();
19337
      case ORDER_ID:
19338
        return isSetOrderId();
19339
      }
19340
      throw new IllegalStateException();
19341
    }
19342
 
19343
    @Override
19344
    public boolean equals(Object that) {
19345
      if (that == null)
19346
        return false;
19347
      if (that instanceof scanForOursExternalSale_args)
19348
        return this.equals((scanForOursExternalSale_args)that);
19349
      return false;
19350
    }
19351
 
19352
    public boolean equals(scanForOursExternalSale_args that) {
19353
      if (that == null)
19354
        return false;
19355
 
19356
      boolean this_present_itemId = true;
19357
      boolean that_present_itemId = true;
19358
      if (this_present_itemId || that_present_itemId) {
19359
        if (!(this_present_itemId && that_present_itemId))
19360
          return false;
19361
        if (this.itemId != that.itemId)
19362
          return false;
19363
      }
19364
 
19365
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
19366
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
19367
      if (this_present_serialNumber || that_present_serialNumber) {
19368
        if (!(this_present_serialNumber && that_present_serialNumber))
19369
          return false;
19370
        if (!this.serialNumber.equals(that.serialNumber))
19371
          return false;
19372
      }
19373
 
19374
      boolean this_present_itemNumber = true && this.isSetItemNumber();
19375
      boolean that_present_itemNumber = true && that.isSetItemNumber();
19376
      if (this_present_itemNumber || that_present_itemNumber) {
19377
        if (!(this_present_itemNumber && that_present_itemNumber))
19378
          return false;
19379
        if (!this.itemNumber.equals(that.itemNumber))
19380
          return false;
19381
      }
19382
 
19383
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
19384
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
19385
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
19386
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
19387
          return false;
19388
        if (!this.invoiceNumber.equals(that.invoiceNumber))
19389
          return false;
19390
      }
19391
 
19392
      boolean this_present_warehouseId = true;
19393
      boolean that_present_warehouseId = true;
19394
      if (this_present_warehouseId || that_present_warehouseId) {
19395
        if (!(this_present_warehouseId && that_present_warehouseId))
19396
          return false;
19397
        if (this.warehouseId != that.warehouseId)
19398
          return false;
19399
      }
19400
 
19401
      boolean this_present_unitPrice = true;
19402
      boolean that_present_unitPrice = true;
19403
      if (this_present_unitPrice || that_present_unitPrice) {
19404
        if (!(this_present_unitPrice && that_present_unitPrice))
19405
          return false;
19406
        if (this.unitPrice != that.unitPrice)
19407
          return false;
19408
      }
19409
 
19410
      boolean this_present_orderId = true;
19411
      boolean that_present_orderId = true;
19412
      if (this_present_orderId || that_present_orderId) {
19413
        if (!(this_present_orderId && that_present_orderId))
19414
          return false;
19415
        if (this.orderId != that.orderId)
19416
          return false;
19417
      }
19418
 
19419
      return true;
19420
    }
19421
 
19422
    @Override
19423
    public int hashCode() {
19424
      return 0;
19425
    }
19426
 
19427
    public int compareTo(scanForOursExternalSale_args other) {
19428
      if (!getClass().equals(other.getClass())) {
19429
        return getClass().getName().compareTo(other.getClass().getName());
19430
      }
19431
 
19432
      int lastComparison = 0;
19433
      scanForOursExternalSale_args typedOther = (scanForOursExternalSale_args)other;
19434
 
19435
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
19436
      if (lastComparison != 0) {
19437
        return lastComparison;
19438
      }
19439
      if (isSetItemId()) {
19440
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
19441
        if (lastComparison != 0) {
19442
          return lastComparison;
19443
        }
19444
      }
19445
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
19446
      if (lastComparison != 0) {
19447
        return lastComparison;
19448
      }
19449
      if (isSetSerialNumber()) {
19450
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
19451
        if (lastComparison != 0) {
19452
          return lastComparison;
19453
        }
19454
      }
19455
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
19456
      if (lastComparison != 0) {
19457
        return lastComparison;
19458
      }
19459
      if (isSetItemNumber()) {
19460
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
19461
        if (lastComparison != 0) {
19462
          return lastComparison;
19463
        }
19464
      }
19465
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
19466
      if (lastComparison != 0) {
19467
        return lastComparison;
19468
      }
19469
      if (isSetInvoiceNumber()) {
19470
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
19471
        if (lastComparison != 0) {
19472
          return lastComparison;
19473
        }
19474
      }
19475
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
19476
      if (lastComparison != 0) {
19477
        return lastComparison;
19478
      }
19479
      if (isSetWarehouseId()) {
19480
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
19481
        if (lastComparison != 0) {
19482
          return lastComparison;
19483
        }
19484
      }
19485
      lastComparison = Boolean.valueOf(isSetUnitPrice()).compareTo(typedOther.isSetUnitPrice());
19486
      if (lastComparison != 0) {
19487
        return lastComparison;
19488
      }
19489
      if (isSetUnitPrice()) {
19490
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unitPrice, typedOther.unitPrice);
19491
        if (lastComparison != 0) {
19492
          return lastComparison;
19493
        }
19494
      }
19495
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
19496
      if (lastComparison != 0) {
19497
        return lastComparison;
19498
      }
19499
      if (isSetOrderId()) {
19500
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
19501
        if (lastComparison != 0) {
19502
          return lastComparison;
19503
        }
19504
      }
19505
      return 0;
19506
    }
19507
 
19508
    public _Fields fieldForId(int fieldId) {
19509
      return _Fields.findByThriftId(fieldId);
19510
    }
19511
 
19512
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19513
      org.apache.thrift.protocol.TField field;
19514
      iprot.readStructBegin();
19515
      while (true)
19516
      {
19517
        field = iprot.readFieldBegin();
19518
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19519
          break;
19520
        }
19521
        switch (field.id) {
19522
          case 1: // ITEM_ID
19523
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19524
              this.itemId = iprot.readI64();
19525
              setItemIdIsSet(true);
19526
            } else { 
19527
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19528
            }
19529
            break;
19530
          case 2: // SERIAL_NUMBER
19531
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
19532
              this.serialNumber = iprot.readString();
19533
            } else { 
19534
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19535
            }
19536
            break;
19537
          case 3: // ITEM_NUMBER
19538
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
19539
              this.itemNumber = iprot.readString();
19540
            } else { 
19541
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19542
            }
19543
            break;
19544
          case 4: // INVOICE_NUMBER
19545
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
19546
              this.invoiceNumber = iprot.readString();
19547
            } else { 
19548
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19549
            }
19550
            break;
19551
          case 5: // WAREHOUSE_ID
19552
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19553
              this.warehouseId = iprot.readI64();
19554
              setWarehouseIdIsSet(true);
19555
            } else { 
19556
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19557
            }
19558
            break;
19559
          case 6: // UNIT_PRICE
19560
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
19561
              this.unitPrice = iprot.readDouble();
19562
              setUnitPriceIsSet(true);
19563
            } else { 
19564
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19565
            }
19566
            break;
19567
          case 7: // ORDER_ID
19568
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19569
              this.orderId = iprot.readI64();
19570
              setOrderIdIsSet(true);
19571
            } else { 
19572
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19573
            }
19574
            break;
19575
          default:
19576
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19577
        }
19578
        iprot.readFieldEnd();
19579
      }
19580
      iprot.readStructEnd();
19581
      validate();
19582
    }
19583
 
19584
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19585
      validate();
19586
 
19587
      oprot.writeStructBegin(STRUCT_DESC);
19588
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
19589
      oprot.writeI64(this.itemId);
19590
      oprot.writeFieldEnd();
19591
      if (this.serialNumber != null) {
19592
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
19593
        oprot.writeString(this.serialNumber);
19594
        oprot.writeFieldEnd();
19595
      }
19596
      if (this.itemNumber != null) {
19597
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
19598
        oprot.writeString(this.itemNumber);
19599
        oprot.writeFieldEnd();
19600
      }
19601
      if (this.invoiceNumber != null) {
19602
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
19603
        oprot.writeString(this.invoiceNumber);
19604
        oprot.writeFieldEnd();
19605
      }
19606
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
19607
      oprot.writeI64(this.warehouseId);
19608
      oprot.writeFieldEnd();
19609
      oprot.writeFieldBegin(UNIT_PRICE_FIELD_DESC);
19610
      oprot.writeDouble(this.unitPrice);
19611
      oprot.writeFieldEnd();
19612
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
19613
      oprot.writeI64(this.orderId);
19614
      oprot.writeFieldEnd();
19615
      oprot.writeFieldStop();
19616
      oprot.writeStructEnd();
19617
    }
19618
 
19619
    @Override
19620
    public String toString() {
19621
      StringBuilder sb = new StringBuilder("scanForOursExternalSale_args(");
19622
      boolean first = true;
19623
 
19624
      sb.append("itemId:");
19625
      sb.append(this.itemId);
19626
      first = false;
19627
      if (!first) sb.append(", ");
19628
      sb.append("serialNumber:");
19629
      if (this.serialNumber == null) {
19630
        sb.append("null");
19631
      } else {
19632
        sb.append(this.serialNumber);
19633
      }
19634
      first = false;
19635
      if (!first) sb.append(", ");
19636
      sb.append("itemNumber:");
19637
      if (this.itemNumber == null) {
19638
        sb.append("null");
19639
      } else {
19640
        sb.append(this.itemNumber);
19641
      }
19642
      first = false;
19643
      if (!first) sb.append(", ");
19644
      sb.append("invoiceNumber:");
19645
      if (this.invoiceNumber == null) {
19646
        sb.append("null");
19647
      } else {
19648
        sb.append(this.invoiceNumber);
19649
      }
19650
      first = false;
19651
      if (!first) sb.append(", ");
19652
      sb.append("warehouseId:");
19653
      sb.append(this.warehouseId);
19654
      first = false;
19655
      if (!first) sb.append(", ");
19656
      sb.append("unitPrice:");
19657
      sb.append(this.unitPrice);
19658
      first = false;
19659
      if (!first) sb.append(", ");
19660
      sb.append("orderId:");
19661
      sb.append(this.orderId);
19662
      first = false;
19663
      sb.append(")");
19664
      return sb.toString();
19665
    }
19666
 
19667
    public void validate() throws org.apache.thrift.TException {
19668
      // check for required fields
19669
    }
19670
 
19671
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19672
      try {
19673
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19674
      } catch (org.apache.thrift.TException te) {
19675
        throw new java.io.IOException(te);
19676
      }
19677
    }
19678
 
19679
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19680
      try {
19681
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
19682
        __isset_bit_vector = new BitSet(1);
19683
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19684
      } catch (org.apache.thrift.TException te) {
19685
        throw new java.io.IOException(te);
19686
      }
19687
    }
19688
 
19689
  }
19690
 
19691
  public static class scanForOursExternalSale_result implements org.apache.thrift.TBase<scanForOursExternalSale_result, scanForOursExternalSale_result._Fields>, java.io.Serializable, Cloneable   {
19692
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOursExternalSale_result");
19693
 
19694
    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);
19695
    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);
19696
 
19697
    private InventoryItem success; // required
19698
    private WarehouseServiceException ex; // required
19699
 
19700
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19701
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19702
      SUCCESS((short)0, "success"),
19703
      EX((short)1, "ex");
19704
 
19705
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19706
 
19707
      static {
19708
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19709
          byName.put(field.getFieldName(), field);
19710
        }
19711
      }
19712
 
19713
      /**
19714
       * Find the _Fields constant that matches fieldId, or null if its not found.
19715
       */
19716
      public static _Fields findByThriftId(int fieldId) {
19717
        switch(fieldId) {
19718
          case 0: // SUCCESS
19719
            return SUCCESS;
19720
          case 1: // EX
19721
            return EX;
19722
          default:
19723
            return null;
19724
        }
19725
      }
19726
 
19727
      /**
19728
       * Find the _Fields constant that matches fieldId, throwing an exception
19729
       * if it is not found.
19730
       */
19731
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19732
        _Fields fields = findByThriftId(fieldId);
19733
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19734
        return fields;
19735
      }
19736
 
19737
      /**
19738
       * Find the _Fields constant that matches name, or null if its not found.
19739
       */
19740
      public static _Fields findByName(String name) {
19741
        return byName.get(name);
19742
      }
19743
 
19744
      private final short _thriftId;
19745
      private final String _fieldName;
19746
 
19747
      _Fields(short thriftId, String fieldName) {
19748
        _thriftId = thriftId;
19749
        _fieldName = fieldName;
19750
      }
19751
 
19752
      public short getThriftFieldId() {
19753
        return _thriftId;
19754
      }
19755
 
19756
      public String getFieldName() {
19757
        return _fieldName;
19758
      }
19759
    }
19760
 
19761
    // isset id assignments
19762
 
19763
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19764
    static {
19765
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19766
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19767
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
19768
      tmpMap.put(_Fields.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19769
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
19770
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19771
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOursExternalSale_result.class, metaDataMap);
19772
    }
19773
 
19774
    public scanForOursExternalSale_result() {
19775
    }
19776
 
19777
    public scanForOursExternalSale_result(
19778
      InventoryItem success,
19779
      WarehouseServiceException ex)
19780
    {
19781
      this();
19782
      this.success = success;
19783
      this.ex = ex;
19784
    }
19785
 
19786
    /**
19787
     * Performs a deep copy on <i>other</i>.
19788
     */
19789
    public scanForOursExternalSale_result(scanForOursExternalSale_result other) {
19790
      if (other.isSetSuccess()) {
19791
        this.success = new InventoryItem(other.success);
19792
      }
19793
      if (other.isSetEx()) {
19794
        this.ex = new WarehouseServiceException(other.ex);
19795
      }
19796
    }
19797
 
19798
    public scanForOursExternalSale_result deepCopy() {
19799
      return new scanForOursExternalSale_result(this);
19800
    }
19801
 
19802
    @Override
19803
    public void clear() {
19804
      this.success = null;
19805
      this.ex = null;
19806
    }
19807
 
19808
    public InventoryItem getSuccess() {
19809
      return this.success;
19810
    }
19811
 
19812
    public void setSuccess(InventoryItem success) {
19813
      this.success = success;
19814
    }
19815
 
19816
    public void unsetSuccess() {
19817
      this.success = null;
19818
    }
19819
 
19820
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
19821
    public boolean isSetSuccess() {
19822
      return this.success != null;
19823
    }
19824
 
19825
    public void setSuccessIsSet(boolean value) {
19826
      if (!value) {
19827
        this.success = null;
19828
      }
19829
    }
19830
 
19831
    public WarehouseServiceException getEx() {
19832
      return this.ex;
19833
    }
19834
 
19835
    public void setEx(WarehouseServiceException ex) {
19836
      this.ex = ex;
19837
    }
19838
 
19839
    public void unsetEx() {
19840
      this.ex = null;
19841
    }
19842
 
19843
    /** Returns true if field ex is set (has been assigned a value) and false otherwise */
19844
    public boolean isSetEx() {
19845
      return this.ex != null;
19846
    }
19847
 
19848
    public void setExIsSet(boolean value) {
19849
      if (!value) {
19850
        this.ex = null;
19851
      }
19852
    }
19853
 
19854
    public void setFieldValue(_Fields field, Object value) {
19855
      switch (field) {
19856
      case SUCCESS:
19857
        if (value == null) {
19858
          unsetSuccess();
19859
        } else {
19860
          setSuccess((InventoryItem)value);
19861
        }
19862
        break;
19863
 
19864
      case EX:
19865
        if (value == null) {
19866
          unsetEx();
19867
        } else {
19868
          setEx((WarehouseServiceException)value);
19869
        }
19870
        break;
19871
 
19872
      }
19873
    }
19874
 
19875
    public Object getFieldValue(_Fields field) {
19876
      switch (field) {
19877
      case SUCCESS:
19878
        return getSuccess();
19879
 
19880
      case EX:
19881
        return getEx();
19882
 
19883
      }
19884
      throw new IllegalStateException();
19885
    }
19886
 
19887
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19888
    public boolean isSet(_Fields field) {
19889
      if (field == null) {
19890
        throw new IllegalArgumentException();
19891
      }
19892
 
19893
      switch (field) {
19894
      case SUCCESS:
19895
        return isSetSuccess();
19896
      case EX:
19897
        return isSetEx();
19898
      }
19899
      throw new IllegalStateException();
19900
    }
19901
 
19902
    @Override
19903
    public boolean equals(Object that) {
19904
      if (that == null)
19905
        return false;
19906
      if (that instanceof scanForOursExternalSale_result)
19907
        return this.equals((scanForOursExternalSale_result)that);
19908
      return false;
19909
    }
19910
 
19911
    public boolean equals(scanForOursExternalSale_result that) {
19912
      if (that == null)
19913
        return false;
19914
 
19915
      boolean this_present_success = true && this.isSetSuccess();
19916
      boolean that_present_success = true && that.isSetSuccess();
19917
      if (this_present_success || that_present_success) {
19918
        if (!(this_present_success && that_present_success))
19919
          return false;
19920
        if (!this.success.equals(that.success))
19921
          return false;
19922
      }
19923
 
19924
      boolean this_present_ex = true && this.isSetEx();
19925
      boolean that_present_ex = true && that.isSetEx();
19926
      if (this_present_ex || that_present_ex) {
19927
        if (!(this_present_ex && that_present_ex))
19928
          return false;
19929
        if (!this.ex.equals(that.ex))
19930
          return false;
19931
      }
19932
 
19933
      return true;
19934
    }
19935
 
19936
    @Override
19937
    public int hashCode() {
19938
      return 0;
19939
    }
19940
 
19941
    public int compareTo(scanForOursExternalSale_result other) {
19942
      if (!getClass().equals(other.getClass())) {
19943
        return getClass().getName().compareTo(other.getClass().getName());
19944
      }
19945
 
19946
      int lastComparison = 0;
19947
      scanForOursExternalSale_result typedOther = (scanForOursExternalSale_result)other;
19948
 
19949
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
19950
      if (lastComparison != 0) {
19951
        return lastComparison;
19952
      }
19953
      if (isSetSuccess()) {
19954
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
19955
        if (lastComparison != 0) {
19956
          return lastComparison;
19957
        }
19958
      }
19959
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx());
19960
      if (lastComparison != 0) {
19961
        return lastComparison;
19962
      }
19963
      if (isSetEx()) {
19964
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, typedOther.ex);
19965
        if (lastComparison != 0) {
19966
          return lastComparison;
19967
        }
19968
      }
19969
      return 0;
19970
    }
19971
 
19972
    public _Fields fieldForId(int fieldId) {
19973
      return _Fields.findByThriftId(fieldId);
19974
    }
19975
 
19976
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19977
      org.apache.thrift.protocol.TField field;
19978
      iprot.readStructBegin();
19979
      while (true)
19980
      {
19981
        field = iprot.readFieldBegin();
19982
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19983
          break;
19984
        }
19985
        switch (field.id) {
19986
          case 0: // SUCCESS
19987
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
19988
              this.success = new InventoryItem();
19989
              this.success.read(iprot);
19990
            } else { 
19991
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19992
            }
19993
            break;
19994
          case 1: // EX
19995
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
19996
              this.ex = new WarehouseServiceException();
19997
              this.ex.read(iprot);
19998
            } else { 
19999
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20000
            }
20001
            break;
20002
          default:
20003
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20004
        }
20005
        iprot.readFieldEnd();
20006
      }
20007
      iprot.readStructEnd();
20008
      validate();
20009
    }
20010
 
20011
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20012
      oprot.writeStructBegin(STRUCT_DESC);
20013
 
20014
      if (this.isSetSuccess()) {
20015
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20016
        this.success.write(oprot);
20017
        oprot.writeFieldEnd();
20018
      } else if (this.isSetEx()) {
20019
        oprot.writeFieldBegin(EX_FIELD_DESC);
20020
        this.ex.write(oprot);
20021
        oprot.writeFieldEnd();
20022
      }
20023
      oprot.writeFieldStop();
20024
      oprot.writeStructEnd();
20025
    }
20026
 
20027
    @Override
20028
    public String toString() {
20029
      StringBuilder sb = new StringBuilder("scanForOursExternalSale_result(");
20030
      boolean first = true;
20031
 
20032
      sb.append("success:");
20033
      if (this.success == null) {
20034
        sb.append("null");
20035
      } else {
20036
        sb.append(this.success);
20037
      }
20038
      first = false;
20039
      if (!first) sb.append(", ");
20040
      sb.append("ex:");
20041
      if (this.ex == null) {
20042
        sb.append("null");
20043
      } else {
20044
        sb.append(this.ex);
20045
      }
20046
      first = false;
20047
      sb.append(")");
20048
      return sb.toString();
20049
    }
20050
 
20051
    public void validate() throws org.apache.thrift.TException {
20052
      // check for required fields
20053
    }
20054
 
20055
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20056
      try {
20057
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20058
      } catch (org.apache.thrift.TException te) {
20059
        throw new java.io.IOException(te);
20060
      }
20061
    }
20062
 
20063
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20064
      try {
20065
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20066
      } catch (org.apache.thrift.TException te) {
20067
        throw new java.io.IOException(te);
20068
      }
20069
    }
20070
 
20071
  }
20072
 
20073
  public static class scanForOursExternalSaleReturn_args implements org.apache.thrift.TBase<scanForOursExternalSaleReturn_args, scanForOursExternalSaleReturn_args._Fields>, java.io.Serializable, Cloneable   {
20074
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOursExternalSaleReturn_args");
20075
 
20076
    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);
20077
    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);
20078
 
20079
    private long orderId; // required
20080
    private double unitPrice; // required
20081
 
20082
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20083
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20084
      ORDER_ID((short)1, "orderId"),
20085
      UNIT_PRICE((short)2, "unitPrice");
20086
 
20087
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20088
 
20089
      static {
20090
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20091
          byName.put(field.getFieldName(), field);
20092
        }
20093
      }
20094
 
20095
      /**
20096
       * Find the _Fields constant that matches fieldId, or null if its not found.
20097
       */
20098
      public static _Fields findByThriftId(int fieldId) {
20099
        switch(fieldId) {
20100
          case 1: // ORDER_ID
20101
            return ORDER_ID;
20102
          case 2: // UNIT_PRICE
20103
            return UNIT_PRICE;
20104
          default:
20105
            return null;
20106
        }
20107
      }
20108
 
20109
      /**
20110
       * Find the _Fields constant that matches fieldId, throwing an exception
20111
       * if it is not found.
20112
       */
20113
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20114
        _Fields fields = findByThriftId(fieldId);
20115
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20116
        return fields;
20117
      }
20118
 
20119
      /**
20120
       * Find the _Fields constant that matches name, or null if its not found.
20121
       */
20122
      public static _Fields findByName(String name) {
20123
        return byName.get(name);
20124
      }
20125
 
20126
      private final short _thriftId;
20127
      private final String _fieldName;
20128
 
20129
      _Fields(short thriftId, String fieldName) {
20130
        _thriftId = thriftId;
20131
        _fieldName = fieldName;
20132
      }
20133
 
20134
      public short getThriftFieldId() {
20135
        return _thriftId;
20136
      }
20137
 
20138
      public String getFieldName() {
20139
        return _fieldName;
20140
      }
20141
    }
20142
 
20143
    // isset id assignments
20144
    private static final int __ORDERID_ISSET_ID = 0;
20145
    private static final int __UNITPRICE_ISSET_ID = 1;
20146
    private BitSet __isset_bit_vector = new BitSet(2);
20147
 
20148
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20149
    static {
20150
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20151
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20152
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
20153
      tmpMap.put(_Fields.UNIT_PRICE, new org.apache.thrift.meta_data.FieldMetaData("unitPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20154
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
20155
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20156
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOursExternalSaleReturn_args.class, metaDataMap);
20157
    }
20158
 
20159
    public scanForOursExternalSaleReturn_args() {
20160
    }
20161
 
20162
    public scanForOursExternalSaleReturn_args(
20163
      long orderId,
20164
      double unitPrice)
20165
    {
20166
      this();
20167
      this.orderId = orderId;
20168
      setOrderIdIsSet(true);
20169
      this.unitPrice = unitPrice;
20170
      setUnitPriceIsSet(true);
20171
    }
20172
 
20173
    /**
20174
     * Performs a deep copy on <i>other</i>.
20175
     */
20176
    public scanForOursExternalSaleReturn_args(scanForOursExternalSaleReturn_args other) {
20177
      __isset_bit_vector.clear();
20178
      __isset_bit_vector.or(other.__isset_bit_vector);
20179
      this.orderId = other.orderId;
20180
      this.unitPrice = other.unitPrice;
20181
    }
20182
 
20183
    public scanForOursExternalSaleReturn_args deepCopy() {
20184
      return new scanForOursExternalSaleReturn_args(this);
20185
    }
20186
 
20187
    @Override
20188
    public void clear() {
20189
      setOrderIdIsSet(false);
20190
      this.orderId = 0;
20191
      setUnitPriceIsSet(false);
20192
      this.unitPrice = 0.0;
20193
    }
20194
 
20195
    public long getOrderId() {
20196
      return this.orderId;
20197
    }
20198
 
20199
    public void setOrderId(long orderId) {
20200
      this.orderId = orderId;
20201
      setOrderIdIsSet(true);
20202
    }
20203
 
20204
    public void unsetOrderId() {
20205
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
20206
    }
20207
 
20208
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
20209
    public boolean isSetOrderId() {
20210
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
20211
    }
20212
 
20213
    public void setOrderIdIsSet(boolean value) {
20214
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
20215
    }
20216
 
20217
    public double getUnitPrice() {
20218
      return this.unitPrice;
20219
    }
20220
 
20221
    public void setUnitPrice(double unitPrice) {
20222
      this.unitPrice = unitPrice;
20223
      setUnitPriceIsSet(true);
20224
    }
20225
 
20226
    public void unsetUnitPrice() {
20227
      __isset_bit_vector.clear(__UNITPRICE_ISSET_ID);
20228
    }
20229
 
20230
    /** Returns true if field unitPrice is set (has been assigned a value) and false otherwise */
20231
    public boolean isSetUnitPrice() {
20232
      return __isset_bit_vector.get(__UNITPRICE_ISSET_ID);
20233
    }
20234
 
20235
    public void setUnitPriceIsSet(boolean value) {
20236
      __isset_bit_vector.set(__UNITPRICE_ISSET_ID, value);
20237
    }
20238
 
20239
    public void setFieldValue(_Fields field, Object value) {
20240
      switch (field) {
20241
      case ORDER_ID:
20242
        if (value == null) {
20243
          unsetOrderId();
20244
        } else {
20245
          setOrderId((Long)value);
20246
        }
20247
        break;
20248
 
20249
      case UNIT_PRICE:
20250
        if (value == null) {
20251
          unsetUnitPrice();
20252
        } else {
20253
          setUnitPrice((Double)value);
20254
        }
20255
        break;
20256
 
20257
      }
20258
    }
20259
 
20260
    public Object getFieldValue(_Fields field) {
20261
      switch (field) {
20262
      case ORDER_ID:
20263
        return Long.valueOf(getOrderId());
20264
 
20265
      case UNIT_PRICE:
20266
        return Double.valueOf(getUnitPrice());
20267
 
20268
      }
20269
      throw new IllegalStateException();
20270
    }
20271
 
20272
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20273
    public boolean isSet(_Fields field) {
20274
      if (field == null) {
20275
        throw new IllegalArgumentException();
20276
      }
20277
 
20278
      switch (field) {
20279
      case ORDER_ID:
20280
        return isSetOrderId();
20281
      case UNIT_PRICE:
20282
        return isSetUnitPrice();
20283
      }
20284
      throw new IllegalStateException();
20285
    }
20286
 
20287
    @Override
20288
    public boolean equals(Object that) {
20289
      if (that == null)
20290
        return false;
20291
      if (that instanceof scanForOursExternalSaleReturn_args)
20292
        return this.equals((scanForOursExternalSaleReturn_args)that);
20293
      return false;
20294
    }
20295
 
20296
    public boolean equals(scanForOursExternalSaleReturn_args that) {
20297
      if (that == null)
20298
        return false;
20299
 
20300
      boolean this_present_orderId = true;
20301
      boolean that_present_orderId = true;
20302
      if (this_present_orderId || that_present_orderId) {
20303
        if (!(this_present_orderId && that_present_orderId))
20304
          return false;
20305
        if (this.orderId != that.orderId)
20306
          return false;
20307
      }
20308
 
20309
      boolean this_present_unitPrice = true;
20310
      boolean that_present_unitPrice = true;
20311
      if (this_present_unitPrice || that_present_unitPrice) {
20312
        if (!(this_present_unitPrice && that_present_unitPrice))
20313
          return false;
20314
        if (this.unitPrice != that.unitPrice)
20315
          return false;
20316
      }
20317
 
20318
      return true;
20319
    }
20320
 
20321
    @Override
20322
    public int hashCode() {
20323
      return 0;
20324
    }
20325
 
20326
    public int compareTo(scanForOursExternalSaleReturn_args other) {
20327
      if (!getClass().equals(other.getClass())) {
20328
        return getClass().getName().compareTo(other.getClass().getName());
20329
      }
20330
 
20331
      int lastComparison = 0;
20332
      scanForOursExternalSaleReturn_args typedOther = (scanForOursExternalSaleReturn_args)other;
20333
 
20334
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
20335
      if (lastComparison != 0) {
20336
        return lastComparison;
20337
      }
20338
      if (isSetOrderId()) {
20339
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
20340
        if (lastComparison != 0) {
20341
          return lastComparison;
20342
        }
20343
      }
20344
      lastComparison = Boolean.valueOf(isSetUnitPrice()).compareTo(typedOther.isSetUnitPrice());
20345
      if (lastComparison != 0) {
20346
        return lastComparison;
20347
      }
20348
      if (isSetUnitPrice()) {
20349
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unitPrice, typedOther.unitPrice);
20350
        if (lastComparison != 0) {
20351
          return lastComparison;
20352
        }
20353
      }
20354
      return 0;
20355
    }
20356
 
20357
    public _Fields fieldForId(int fieldId) {
20358
      return _Fields.findByThriftId(fieldId);
20359
    }
20360
 
20361
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20362
      org.apache.thrift.protocol.TField field;
20363
      iprot.readStructBegin();
20364
      while (true)
20365
      {
20366
        field = iprot.readFieldBegin();
20367
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20368
          break;
20369
        }
20370
        switch (field.id) {
20371
          case 1: // ORDER_ID
20372
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20373
              this.orderId = iprot.readI64();
20374
              setOrderIdIsSet(true);
20375
            } else { 
20376
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20377
            }
20378
            break;
20379
          case 2: // UNIT_PRICE
20380
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
20381
              this.unitPrice = iprot.readDouble();
20382
              setUnitPriceIsSet(true);
20383
            } else { 
20384
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20385
            }
20386
            break;
20387
          default:
20388
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20389
        }
20390
        iprot.readFieldEnd();
20391
      }
20392
      iprot.readStructEnd();
20393
      validate();
20394
    }
20395
 
20396
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20397
      validate();
20398
 
20399
      oprot.writeStructBegin(STRUCT_DESC);
20400
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
20401
      oprot.writeI64(this.orderId);
20402
      oprot.writeFieldEnd();
20403
      oprot.writeFieldBegin(UNIT_PRICE_FIELD_DESC);
20404
      oprot.writeDouble(this.unitPrice);
20405
      oprot.writeFieldEnd();
20406
      oprot.writeFieldStop();
20407
      oprot.writeStructEnd();
20408
    }
20409
 
20410
    @Override
20411
    public String toString() {
20412
      StringBuilder sb = new StringBuilder("scanForOursExternalSaleReturn_args(");
20413
      boolean first = true;
20414
 
20415
      sb.append("orderId:");
20416
      sb.append(this.orderId);
20417
      first = false;
20418
      if (!first) sb.append(", ");
20419
      sb.append("unitPrice:");
20420
      sb.append(this.unitPrice);
20421
      first = false;
20422
      sb.append(")");
20423
      return sb.toString();
20424
    }
20425
 
20426
    public void validate() throws org.apache.thrift.TException {
20427
      // check for required fields
20428
    }
20429
 
20430
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20431
      try {
20432
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20433
      } catch (org.apache.thrift.TException te) {
20434
        throw new java.io.IOException(te);
20435
      }
20436
    }
20437
 
20438
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20439
      try {
20440
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20441
      } catch (org.apache.thrift.TException te) {
20442
        throw new java.io.IOException(te);
20443
      }
20444
    }
20445
 
20446
  }
20447
 
20448
  public static class scanForOursExternalSaleReturn_result implements org.apache.thrift.TBase<scanForOursExternalSaleReturn_result, scanForOursExternalSaleReturn_result._Fields>, java.io.Serializable, Cloneable   {
20449
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOursExternalSaleReturn_result");
20450
 
20451
 
20452
 
20453
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20454
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20455
;
20456
 
20457
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20458
 
20459
      static {
20460
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20461
          byName.put(field.getFieldName(), field);
20462
        }
20463
      }
20464
 
20465
      /**
20466
       * Find the _Fields constant that matches fieldId, or null if its not found.
20467
       */
20468
      public static _Fields findByThriftId(int fieldId) {
20469
        switch(fieldId) {
20470
          default:
20471
            return null;
20472
        }
20473
      }
20474
 
20475
      /**
20476
       * Find the _Fields constant that matches fieldId, throwing an exception
20477
       * if it is not found.
20478
       */
20479
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20480
        _Fields fields = findByThriftId(fieldId);
20481
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20482
        return fields;
20483
      }
20484
 
20485
      /**
20486
       * Find the _Fields constant that matches name, or null if its not found.
20487
       */
20488
      public static _Fields findByName(String name) {
20489
        return byName.get(name);
20490
      }
20491
 
20492
      private final short _thriftId;
20493
      private final String _fieldName;
20494
 
20495
      _Fields(short thriftId, String fieldName) {
20496
        _thriftId = thriftId;
20497
        _fieldName = fieldName;
20498
      }
20499
 
20500
      public short getThriftFieldId() {
20501
        return _thriftId;
20502
      }
20503
 
20504
      public String getFieldName() {
20505
        return _fieldName;
20506
      }
20507
    }
20508
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20509
    static {
20510
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20511
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20512
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOursExternalSaleReturn_result.class, metaDataMap);
20513
    }
20514
 
20515
    public scanForOursExternalSaleReturn_result() {
20516
    }
20517
 
20518
    /**
20519
     * Performs a deep copy on <i>other</i>.
20520
     */
20521
    public scanForOursExternalSaleReturn_result(scanForOursExternalSaleReturn_result other) {
20522
    }
20523
 
20524
    public scanForOursExternalSaleReturn_result deepCopy() {
20525
      return new scanForOursExternalSaleReturn_result(this);
20526
    }
20527
 
20528
    @Override
20529
    public void clear() {
20530
    }
20531
 
20532
    public void setFieldValue(_Fields field, Object value) {
20533
      switch (field) {
20534
      }
20535
    }
20536
 
20537
    public Object getFieldValue(_Fields field) {
20538
      switch (field) {
20539
      }
20540
      throw new IllegalStateException();
20541
    }
20542
 
20543
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20544
    public boolean isSet(_Fields field) {
20545
      if (field == null) {
20546
        throw new IllegalArgumentException();
20547
      }
20548
 
20549
      switch (field) {
20550
      }
20551
      throw new IllegalStateException();
20552
    }
20553
 
20554
    @Override
20555
    public boolean equals(Object that) {
20556
      if (that == null)
20557
        return false;
20558
      if (that instanceof scanForOursExternalSaleReturn_result)
20559
        return this.equals((scanForOursExternalSaleReturn_result)that);
20560
      return false;
20561
    }
20562
 
20563
    public boolean equals(scanForOursExternalSaleReturn_result that) {
20564
      if (that == null)
20565
        return false;
20566
 
20567
      return true;
20568
    }
20569
 
20570
    @Override
20571
    public int hashCode() {
20572
      return 0;
20573
    }
20574
 
20575
    public int compareTo(scanForOursExternalSaleReturn_result other) {
20576
      if (!getClass().equals(other.getClass())) {
20577
        return getClass().getName().compareTo(other.getClass().getName());
20578
      }
20579
 
20580
      int lastComparison = 0;
20581
      scanForOursExternalSaleReturn_result typedOther = (scanForOursExternalSaleReturn_result)other;
20582
 
20583
      return 0;
20584
    }
20585
 
20586
    public _Fields fieldForId(int fieldId) {
20587
      return _Fields.findByThriftId(fieldId);
20588
    }
20589
 
20590
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20591
      org.apache.thrift.protocol.TField field;
20592
      iprot.readStructBegin();
20593
      while (true)
20594
      {
20595
        field = iprot.readFieldBegin();
20596
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20597
          break;
20598
        }
20599
        switch (field.id) {
20600
          default:
20601
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20602
        }
20603
        iprot.readFieldEnd();
20604
      }
20605
      iprot.readStructEnd();
20606
      validate();
20607
    }
20608
 
20609
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20610
      oprot.writeStructBegin(STRUCT_DESC);
20611
 
20612
      oprot.writeFieldStop();
20613
      oprot.writeStructEnd();
20614
    }
20615
 
20616
    @Override
20617
    public String toString() {
20618
      StringBuilder sb = new StringBuilder("scanForOursExternalSaleReturn_result(");
20619
      boolean first = true;
20620
 
20621
      sb.append(")");
20622
      return sb.toString();
20623
    }
20624
 
20625
    public void validate() throws org.apache.thrift.TException {
20626
      // check for required fields
20627
    }
20628
 
20629
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20630
      try {
20631
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20632
      } catch (org.apache.thrift.TException te) {
20633
        throw new java.io.IOException(te);
20634
      }
20635
    }
20636
 
20637
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20638
      try {
20639
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20640
      } catch (org.apache.thrift.TException te) {
20641
        throw new java.io.IOException(te);
20642
      }
20643
    }
20644
 
20645
  }
20646
 
6880 amar.kumar 20647
  public static class getMovementNonSerializedInventoryByScans_args implements org.apache.thrift.TBase<getMovementNonSerializedInventoryByScans_args, getMovementNonSerializedInventoryByScans_args._Fields>, java.io.Serializable, Cloneable   {
20648
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMovementNonSerializedInventoryByScans_args");
20649
 
20650
    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);
20651
    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);
20652
 
20653
    private long startDate; // required
20654
    private long endDate; // required
20655
 
20656
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20657
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20658
      START_DATE((short)1, "startDate"),
20659
      END_DATE((short)2, "endDate");
20660
 
20661
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20662
 
20663
      static {
20664
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20665
          byName.put(field.getFieldName(), field);
20666
        }
20667
      }
20668
 
20669
      /**
20670
       * Find the _Fields constant that matches fieldId, or null if its not found.
20671
       */
20672
      public static _Fields findByThriftId(int fieldId) {
20673
        switch(fieldId) {
20674
          case 1: // START_DATE
20675
            return START_DATE;
20676
          case 2: // END_DATE
20677
            return END_DATE;
20678
          default:
20679
            return null;
20680
        }
20681
      }
20682
 
20683
      /**
20684
       * Find the _Fields constant that matches fieldId, throwing an exception
20685
       * if it is not found.
20686
       */
20687
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20688
        _Fields fields = findByThriftId(fieldId);
20689
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20690
        return fields;
20691
      }
20692
 
20693
      /**
20694
       * Find the _Fields constant that matches name, or null if its not found.
20695
       */
20696
      public static _Fields findByName(String name) {
20697
        return byName.get(name);
20698
      }
20699
 
20700
      private final short _thriftId;
20701
      private final String _fieldName;
20702
 
20703
      _Fields(short thriftId, String fieldName) {
20704
        _thriftId = thriftId;
20705
        _fieldName = fieldName;
20706
      }
20707
 
20708
      public short getThriftFieldId() {
20709
        return _thriftId;
20710
      }
20711
 
20712
      public String getFieldName() {
20713
        return _fieldName;
20714
      }
20715
    }
20716
 
20717
    // isset id assignments
20718
    private static final int __STARTDATE_ISSET_ID = 0;
20719
    private static final int __ENDDATE_ISSET_ID = 1;
20720
    private BitSet __isset_bit_vector = new BitSet(2);
20721
 
20722
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20723
    static {
20724
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20725
      tmpMap.put(_Fields.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20726
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
20727
      tmpMap.put(_Fields.END_DATE, new org.apache.thrift.meta_data.FieldMetaData("endDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20728
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
20729
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20730
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMovementNonSerializedInventoryByScans_args.class, metaDataMap);
20731
    }
20732
 
20733
    public getMovementNonSerializedInventoryByScans_args() {
20734
    }
20735
 
20736
    public getMovementNonSerializedInventoryByScans_args(
20737
      long startDate,
20738
      long endDate)
20739
    {
20740
      this();
20741
      this.startDate = startDate;
20742
      setStartDateIsSet(true);
20743
      this.endDate = endDate;
20744
      setEndDateIsSet(true);
20745
    }
20746
 
20747
    /**
20748
     * Performs a deep copy on <i>other</i>.
20749
     */
20750
    public getMovementNonSerializedInventoryByScans_args(getMovementNonSerializedInventoryByScans_args other) {
20751
      __isset_bit_vector.clear();
20752
      __isset_bit_vector.or(other.__isset_bit_vector);
20753
      this.startDate = other.startDate;
20754
      this.endDate = other.endDate;
20755
    }
20756
 
20757
    public getMovementNonSerializedInventoryByScans_args deepCopy() {
20758
      return new getMovementNonSerializedInventoryByScans_args(this);
20759
    }
20760
 
20761
    @Override
20762
    public void clear() {
20763
      setStartDateIsSet(false);
20764
      this.startDate = 0;
20765
      setEndDateIsSet(false);
20766
      this.endDate = 0;
20767
    }
20768
 
20769
    public long getStartDate() {
20770
      return this.startDate;
20771
    }
20772
 
20773
    public void setStartDate(long startDate) {
20774
      this.startDate = startDate;
20775
      setStartDateIsSet(true);
20776
    }
20777
 
20778
    public void unsetStartDate() {
20779
      __isset_bit_vector.clear(__STARTDATE_ISSET_ID);
20780
    }
20781
 
20782
    /** Returns true if field startDate is set (has been assigned a value) and false otherwise */
20783
    public boolean isSetStartDate() {
20784
      return __isset_bit_vector.get(__STARTDATE_ISSET_ID);
20785
    }
20786
 
20787
    public void setStartDateIsSet(boolean value) {
20788
      __isset_bit_vector.set(__STARTDATE_ISSET_ID, value);
20789
    }
20790
 
20791
    public long getEndDate() {
20792
      return this.endDate;
20793
    }
20794
 
20795
    public void setEndDate(long endDate) {
20796
      this.endDate = endDate;
20797
      setEndDateIsSet(true);
20798
    }
20799
 
20800
    public void unsetEndDate() {
20801
      __isset_bit_vector.clear(__ENDDATE_ISSET_ID);
20802
    }
20803
 
20804
    /** Returns true if field endDate is set (has been assigned a value) and false otherwise */
20805
    public boolean isSetEndDate() {
20806
      return __isset_bit_vector.get(__ENDDATE_ISSET_ID);
20807
    }
20808
 
20809
    public void setEndDateIsSet(boolean value) {
20810
      __isset_bit_vector.set(__ENDDATE_ISSET_ID, value);
20811
    }
20812
 
20813
    public void setFieldValue(_Fields field, Object value) {
20814
      switch (field) {
20815
      case START_DATE:
20816
        if (value == null) {
20817
          unsetStartDate();
20818
        } else {
20819
          setStartDate((Long)value);
20820
        }
20821
        break;
20822
 
20823
      case END_DATE:
20824
        if (value == null) {
20825
          unsetEndDate();
20826
        } else {
20827
          setEndDate((Long)value);
20828
        }
20829
        break;
20830
 
20831
      }
20832
    }
20833
 
20834
    public Object getFieldValue(_Fields field) {
20835
      switch (field) {
20836
      case START_DATE:
20837
        return Long.valueOf(getStartDate());
20838
 
20839
      case END_DATE:
20840
        return Long.valueOf(getEndDate());
20841
 
20842
      }
20843
      throw new IllegalStateException();
20844
    }
20845
 
20846
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20847
    public boolean isSet(_Fields field) {
20848
      if (field == null) {
20849
        throw new IllegalArgumentException();
20850
      }
20851
 
20852
      switch (field) {
20853
      case START_DATE:
20854
        return isSetStartDate();
20855
      case END_DATE:
20856
        return isSetEndDate();
20857
      }
20858
      throw new IllegalStateException();
20859
    }
20860
 
20861
    @Override
20862
    public boolean equals(Object that) {
20863
      if (that == null)
20864
        return false;
20865
      if (that instanceof getMovementNonSerializedInventoryByScans_args)
20866
        return this.equals((getMovementNonSerializedInventoryByScans_args)that);
20867
      return false;
20868
    }
20869
 
20870
    public boolean equals(getMovementNonSerializedInventoryByScans_args that) {
20871
      if (that == null)
20872
        return false;
20873
 
20874
      boolean this_present_startDate = true;
20875
      boolean that_present_startDate = true;
20876
      if (this_present_startDate || that_present_startDate) {
20877
        if (!(this_present_startDate && that_present_startDate))
20878
          return false;
20879
        if (this.startDate != that.startDate)
20880
          return false;
20881
      }
20882
 
20883
      boolean this_present_endDate = true;
20884
      boolean that_present_endDate = true;
20885
      if (this_present_endDate || that_present_endDate) {
20886
        if (!(this_present_endDate && that_present_endDate))
20887
          return false;
20888
        if (this.endDate != that.endDate)
20889
          return false;
20890
      }
20891
 
20892
      return true;
20893
    }
20894
 
20895
    @Override
20896
    public int hashCode() {
20897
      return 0;
20898
    }
20899
 
20900
    public int compareTo(getMovementNonSerializedInventoryByScans_args other) {
20901
      if (!getClass().equals(other.getClass())) {
20902
        return getClass().getName().compareTo(other.getClass().getName());
20903
      }
20904
 
20905
      int lastComparison = 0;
20906
      getMovementNonSerializedInventoryByScans_args typedOther = (getMovementNonSerializedInventoryByScans_args)other;
20907
 
20908
      lastComparison = Boolean.valueOf(isSetStartDate()).compareTo(typedOther.isSetStartDate());
20909
      if (lastComparison != 0) {
20910
        return lastComparison;
20911
      }
20912
      if (isSetStartDate()) {
20913
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startDate, typedOther.startDate);
20914
        if (lastComparison != 0) {
20915
          return lastComparison;
20916
        }
20917
      }
20918
      lastComparison = Boolean.valueOf(isSetEndDate()).compareTo(typedOther.isSetEndDate());
20919
      if (lastComparison != 0) {
20920
        return lastComparison;
20921
      }
20922
      if (isSetEndDate()) {
20923
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endDate, typedOther.endDate);
20924
        if (lastComparison != 0) {
20925
          return lastComparison;
20926
        }
20927
      }
20928
      return 0;
20929
    }
20930
 
20931
    public _Fields fieldForId(int fieldId) {
20932
      return _Fields.findByThriftId(fieldId);
20933
    }
20934
 
20935
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20936
      org.apache.thrift.protocol.TField field;
20937
      iprot.readStructBegin();
20938
      while (true)
20939
      {
20940
        field = iprot.readFieldBegin();
20941
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20942
          break;
20943
        }
20944
        switch (field.id) {
20945
          case 1: // START_DATE
20946
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20947
              this.startDate = iprot.readI64();
20948
              setStartDateIsSet(true);
20949
            } else { 
20950
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20951
            }
20952
            break;
20953
          case 2: // END_DATE
20954
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20955
              this.endDate = iprot.readI64();
20956
              setEndDateIsSet(true);
20957
            } else { 
20958
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20959
            }
20960
            break;
20961
          default:
20962
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20963
        }
20964
        iprot.readFieldEnd();
20965
      }
20966
      iprot.readStructEnd();
20967
      validate();
20968
    }
20969
 
20970
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20971
      validate();
20972
 
20973
      oprot.writeStructBegin(STRUCT_DESC);
20974
      oprot.writeFieldBegin(START_DATE_FIELD_DESC);
20975
      oprot.writeI64(this.startDate);
20976
      oprot.writeFieldEnd();
20977
      oprot.writeFieldBegin(END_DATE_FIELD_DESC);
20978
      oprot.writeI64(this.endDate);
20979
      oprot.writeFieldEnd();
20980
      oprot.writeFieldStop();
20981
      oprot.writeStructEnd();
20982
    }
20983
 
20984
    @Override
20985
    public String toString() {
20986
      StringBuilder sb = new StringBuilder("getMovementNonSerializedInventoryByScans_args(");
20987
      boolean first = true;
20988
 
20989
      sb.append("startDate:");
20990
      sb.append(this.startDate);
20991
      first = false;
20992
      if (!first) sb.append(", ");
20993
      sb.append("endDate:");
20994
      sb.append(this.endDate);
20995
      first = false;
20996
      sb.append(")");
20997
      return sb.toString();
20998
    }
20999
 
21000
    public void validate() throws org.apache.thrift.TException {
21001
      // check for required fields
21002
    }
21003
 
21004
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21005
      try {
21006
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
21007
      } catch (org.apache.thrift.TException te) {
21008
        throw new java.io.IOException(te);
21009
      }
21010
    }
21011
 
21012
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
21013
      try {
21014
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
21015
        __isset_bit_vector = new BitSet(1);
21016
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
21017
      } catch (org.apache.thrift.TException te) {
21018
        throw new java.io.IOException(te);
21019
      }
21020
    }
21021
 
21022
  }
21023
 
21024
  public static class getMovementNonSerializedInventoryByScans_result implements org.apache.thrift.TBase<getMovementNonSerializedInventoryByScans_result, getMovementNonSerializedInventoryByScans_result._Fields>, java.io.Serializable, Cloneable   {
21025
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMovementNonSerializedInventoryByScans_result");
21026
 
21027
    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);
21028
 
21029
    private List<InventoryMovement> success; // required
21030
 
21031
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21032
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
21033
      SUCCESS((short)0, "success");
21034
 
21035
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21036
 
21037
      static {
21038
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21039
          byName.put(field.getFieldName(), field);
21040
        }
21041
      }
21042
 
21043
      /**
21044
       * Find the _Fields constant that matches fieldId, or null if its not found.
21045
       */
21046
      public static _Fields findByThriftId(int fieldId) {
21047
        switch(fieldId) {
21048
          case 0: // SUCCESS
21049
            return SUCCESS;
21050
          default:
21051
            return null;
21052
        }
21053
      }
21054
 
21055
      /**
21056
       * Find the _Fields constant that matches fieldId, throwing an exception
21057
       * if it is not found.
21058
       */
21059
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21060
        _Fields fields = findByThriftId(fieldId);
21061
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21062
        return fields;
21063
      }
21064
 
21065
      /**
21066
       * Find the _Fields constant that matches name, or null if its not found.
21067
       */
21068
      public static _Fields findByName(String name) {
21069
        return byName.get(name);
21070
      }
21071
 
21072
      private final short _thriftId;
21073
      private final String _fieldName;
21074
 
21075
      _Fields(short thriftId, String fieldName) {
21076
        _thriftId = thriftId;
21077
        _fieldName = fieldName;
21078
      }
21079
 
21080
      public short getThriftFieldId() {
21081
        return _thriftId;
21082
      }
21083
 
21084
      public String getFieldName() {
21085
        return _fieldName;
21086
      }
21087
    }
21088
 
21089
    // isset id assignments
21090
 
21091
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
21092
    static {
21093
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
21094
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21095
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
21096
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryMovement.class))));
21097
      metaDataMap = Collections.unmodifiableMap(tmpMap);
21098
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMovementNonSerializedInventoryByScans_result.class, metaDataMap);
21099
    }
21100
 
21101
    public getMovementNonSerializedInventoryByScans_result() {
21102
    }
21103
 
21104
    public getMovementNonSerializedInventoryByScans_result(
21105
      List<InventoryMovement> success)
21106
    {
21107
      this();
21108
      this.success = success;
21109
    }
21110
 
21111
    /**
21112
     * Performs a deep copy on <i>other</i>.
21113
     */
21114
    public getMovementNonSerializedInventoryByScans_result(getMovementNonSerializedInventoryByScans_result other) {
21115
      if (other.isSetSuccess()) {
21116
        List<InventoryMovement> __this__success = new ArrayList<InventoryMovement>();
21117
        for (InventoryMovement other_element : other.success) {
21118
          __this__success.add(new InventoryMovement(other_element));
21119
        }
21120
        this.success = __this__success;
21121
      }
21122
    }
21123
 
21124
    public getMovementNonSerializedInventoryByScans_result deepCopy() {
21125
      return new getMovementNonSerializedInventoryByScans_result(this);
21126
    }
21127
 
21128
    @Override
21129
    public void clear() {
21130
      this.success = null;
21131
    }
21132
 
21133
    public int getSuccessSize() {
21134
      return (this.success == null) ? 0 : this.success.size();
21135
    }
21136
 
21137
    public java.util.Iterator<InventoryMovement> getSuccessIterator() {
21138
      return (this.success == null) ? null : this.success.iterator();
21139
    }
21140
 
21141
    public void addToSuccess(InventoryMovement elem) {
21142
      if (this.success == null) {
21143
        this.success = new ArrayList<InventoryMovement>();
21144
      }
21145
      this.success.add(elem);
21146
    }
21147
 
21148
    public List<InventoryMovement> getSuccess() {
21149
      return this.success;
21150
    }
21151
 
21152
    public void setSuccess(List<InventoryMovement> success) {
21153
      this.success = success;
21154
    }
21155
 
21156
    public void unsetSuccess() {
21157
      this.success = null;
21158
    }
21159
 
21160
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
21161
    public boolean isSetSuccess() {
21162
      return this.success != null;
21163
    }
21164
 
21165
    public void setSuccessIsSet(boolean value) {
21166
      if (!value) {
21167
        this.success = null;
21168
      }
21169
    }
21170
 
21171
    public void setFieldValue(_Fields field, Object value) {
21172
      switch (field) {
21173
      case SUCCESS:
21174
        if (value == null) {
21175
          unsetSuccess();
21176
        } else {
21177
          setSuccess((List<InventoryMovement>)value);
21178
        }
21179
        break;
21180
 
21181
      }
21182
    }
21183
 
21184
    public Object getFieldValue(_Fields field) {
21185
      switch (field) {
21186
      case SUCCESS:
21187
        return getSuccess();
21188
 
21189
      }
21190
      throw new IllegalStateException();
21191
    }
21192
 
21193
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
21194
    public boolean isSet(_Fields field) {
21195
      if (field == null) {
21196
        throw new IllegalArgumentException();
21197
      }
21198
 
21199
      switch (field) {
21200
      case SUCCESS:
21201
        return isSetSuccess();
21202
      }
21203
      throw new IllegalStateException();
21204
    }
21205
 
21206
    @Override
21207
    public boolean equals(Object that) {
21208
      if (that == null)
21209
        return false;
21210
      if (that instanceof getMovementNonSerializedInventoryByScans_result)
21211
        return this.equals((getMovementNonSerializedInventoryByScans_result)that);
21212
      return false;
21213
    }
21214
 
21215
    public boolean equals(getMovementNonSerializedInventoryByScans_result that) {
21216
      if (that == null)
21217
        return false;
21218
 
21219
      boolean this_present_success = true && this.isSetSuccess();
21220
      boolean that_present_success = true && that.isSetSuccess();
21221
      if (this_present_success || that_present_success) {
21222
        if (!(this_present_success && that_present_success))
21223
          return false;
21224
        if (!this.success.equals(that.success))
21225
          return false;
21226
      }
21227
 
21228
      return true;
21229
    }
21230
 
21231
    @Override
21232
    public int hashCode() {
21233
      return 0;
21234
    }
21235
 
21236
    public int compareTo(getMovementNonSerializedInventoryByScans_result other) {
21237
      if (!getClass().equals(other.getClass())) {
21238
        return getClass().getName().compareTo(other.getClass().getName());
21239
      }
21240
 
21241
      int lastComparison = 0;
21242
      getMovementNonSerializedInventoryByScans_result typedOther = (getMovementNonSerializedInventoryByScans_result)other;
21243
 
21244
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
21245
      if (lastComparison != 0) {
21246
        return lastComparison;
21247
      }
21248
      if (isSetSuccess()) {
21249
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
21250
        if (lastComparison != 0) {
21251
          return lastComparison;
21252
        }
21253
      }
21254
      return 0;
21255
    }
21256
 
21257
    public _Fields fieldForId(int fieldId) {
21258
      return _Fields.findByThriftId(fieldId);
21259
    }
21260
 
21261
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
21262
      org.apache.thrift.protocol.TField field;
21263
      iprot.readStructBegin();
21264
      while (true)
21265
      {
21266
        field = iprot.readFieldBegin();
21267
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
21268
          break;
21269
        }
21270
        switch (field.id) {
21271
          case 0: // SUCCESS
21272
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
21273
              {
7210 amar.kumar 21274
                org.apache.thrift.protocol.TList _list60 = iprot.readListBegin();
21275
                this.success = new ArrayList<InventoryMovement>(_list60.size);
21276
                for (int _i61 = 0; _i61 < _list60.size; ++_i61)
6880 amar.kumar 21277
                {
7210 amar.kumar 21278
                  InventoryMovement _elem62; // required
21279
                  _elem62 = new InventoryMovement();
21280
                  _elem62.read(iprot);
21281
                  this.success.add(_elem62);
6880 amar.kumar 21282
                }
21283
                iprot.readListEnd();
21284
              }
21285
            } else { 
21286
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21287
            }
21288
            break;
21289
          default:
21290
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21291
        }
21292
        iprot.readFieldEnd();
21293
      }
21294
      iprot.readStructEnd();
21295
      validate();
21296
    }
21297
 
21298
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
21299
      oprot.writeStructBegin(STRUCT_DESC);
21300
 
21301
      if (this.isSetSuccess()) {
21302
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21303
        {
21304
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7210 amar.kumar 21305
          for (InventoryMovement _iter63 : this.success)
6880 amar.kumar 21306
          {
7210 amar.kumar 21307
            _iter63.write(oprot);
6880 amar.kumar 21308
          }
21309
          oprot.writeListEnd();
21310
        }
21311
        oprot.writeFieldEnd();
21312
      }
21313
      oprot.writeFieldStop();
21314
      oprot.writeStructEnd();
21315
    }
21316
 
21317
    @Override
21318
    public String toString() {
21319
      StringBuilder sb = new StringBuilder("getMovementNonSerializedInventoryByScans_result(");
21320
      boolean first = true;
21321
 
21322
      sb.append("success:");
21323
      if (this.success == null) {
21324
        sb.append("null");
21325
      } else {
21326
        sb.append(this.success);
21327
      }
21328
      first = false;
21329
      sb.append(")");
21330
      return sb.toString();
21331
    }
21332
 
21333
    public void validate() throws org.apache.thrift.TException {
21334
      // check for required fields
21335
    }
21336
 
21337
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21338
      try {
21339
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
21340
      } catch (org.apache.thrift.TException te) {
21341
        throw new java.io.IOException(te);
21342
      }
21343
    }
21344
 
21345
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
21346
      try {
21347
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
21348
      } catch (org.apache.thrift.TException te) {
21349
        throw new java.io.IOException(te);
21350
      }
21351
    }
21352
 
21353
  }
21354
 
21355
  public static class getMovementSerializedInventoryByScans_args implements org.apache.thrift.TBase<getMovementSerializedInventoryByScans_args, getMovementSerializedInventoryByScans_args._Fields>, java.io.Serializable, Cloneable   {
21356
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMovementSerializedInventoryByScans_args");
21357
 
21358
    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);
21359
    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);
21360
 
21361
    private long startDate; // required
21362
    private long endDate; // required
21363
 
21364
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21365
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
21366
      START_DATE((short)1, "startDate"),
21367
      END_DATE((short)2, "endDate");
21368
 
21369
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21370
 
21371
      static {
21372
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21373
          byName.put(field.getFieldName(), field);
21374
        }
21375
      }
21376
 
21377
      /**
21378
       * Find the _Fields constant that matches fieldId, or null if its not found.
21379
       */
21380
      public static _Fields findByThriftId(int fieldId) {
21381
        switch(fieldId) {
21382
          case 1: // START_DATE
21383
            return START_DATE;
21384
          case 2: // END_DATE
21385
            return END_DATE;
21386
          default:
21387
            return null;
21388
        }
21389
      }
21390
 
21391
      /**
21392
       * Find the _Fields constant that matches fieldId, throwing an exception
21393
       * if it is not found.
21394
       */
21395
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21396
        _Fields fields = findByThriftId(fieldId);
21397
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21398
        return fields;
21399
      }
21400
 
21401
      /**
21402
       * Find the _Fields constant that matches name, or null if its not found.
21403
       */
21404
      public static _Fields findByName(String name) {
21405
        return byName.get(name);
21406
      }
21407
 
21408
      private final short _thriftId;
21409
      private final String _fieldName;
21410
 
21411
      _Fields(short thriftId, String fieldName) {
21412
        _thriftId = thriftId;
21413
        _fieldName = fieldName;
21414
      }
21415
 
21416
      public short getThriftFieldId() {
21417
        return _thriftId;
21418
      }
21419
 
21420
      public String getFieldName() {
21421
        return _fieldName;
21422
      }
21423
    }
21424
 
21425
    // isset id assignments
21426
    private static final int __STARTDATE_ISSET_ID = 0;
21427
    private static final int __ENDDATE_ISSET_ID = 1;
21428
    private BitSet __isset_bit_vector = new BitSet(2);
21429
 
21430
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
21431
    static {
21432
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
21433
      tmpMap.put(_Fields.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21434
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
21435
      tmpMap.put(_Fields.END_DATE, new org.apache.thrift.meta_data.FieldMetaData("endDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21436
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
21437
      metaDataMap = Collections.unmodifiableMap(tmpMap);
21438
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMovementSerializedInventoryByScans_args.class, metaDataMap);
21439
    }
21440
 
21441
    public getMovementSerializedInventoryByScans_args() {
21442
    }
21443
 
21444
    public getMovementSerializedInventoryByScans_args(
21445
      long startDate,
21446
      long endDate)
21447
    {
21448
      this();
21449
      this.startDate = startDate;
21450
      setStartDateIsSet(true);
21451
      this.endDate = endDate;
21452
      setEndDateIsSet(true);
21453
    }
21454
 
21455
    /**
21456
     * Performs a deep copy on <i>other</i>.
21457
     */
21458
    public getMovementSerializedInventoryByScans_args(getMovementSerializedInventoryByScans_args other) {
21459
      __isset_bit_vector.clear();
21460
      __isset_bit_vector.or(other.__isset_bit_vector);
21461
      this.startDate = other.startDate;
21462
      this.endDate = other.endDate;
21463
    }
21464
 
21465
    public getMovementSerializedInventoryByScans_args deepCopy() {
21466
      return new getMovementSerializedInventoryByScans_args(this);
21467
    }
21468
 
21469
    @Override
21470
    public void clear() {
21471
      setStartDateIsSet(false);
21472
      this.startDate = 0;
21473
      setEndDateIsSet(false);
21474
      this.endDate = 0;
21475
    }
21476
 
21477
    public long getStartDate() {
21478
      return this.startDate;
21479
    }
21480
 
21481
    public void setStartDate(long startDate) {
21482
      this.startDate = startDate;
21483
      setStartDateIsSet(true);
21484
    }
21485
 
21486
    public void unsetStartDate() {
21487
      __isset_bit_vector.clear(__STARTDATE_ISSET_ID);
21488
    }
21489
 
21490
    /** Returns true if field startDate is set (has been assigned a value) and false otherwise */
21491
    public boolean isSetStartDate() {
21492
      return __isset_bit_vector.get(__STARTDATE_ISSET_ID);
21493
    }
21494
 
21495
    public void setStartDateIsSet(boolean value) {
21496
      __isset_bit_vector.set(__STARTDATE_ISSET_ID, value);
21497
    }
21498
 
21499
    public long getEndDate() {
21500
      return this.endDate;
21501
    }
21502
 
21503
    public void setEndDate(long endDate) {
21504
      this.endDate = endDate;
21505
      setEndDateIsSet(true);
21506
    }
21507
 
21508
    public void unsetEndDate() {
21509
      __isset_bit_vector.clear(__ENDDATE_ISSET_ID);
21510
    }
21511
 
21512
    /** Returns true if field endDate is set (has been assigned a value) and false otherwise */
21513
    public boolean isSetEndDate() {
21514
      return __isset_bit_vector.get(__ENDDATE_ISSET_ID);
21515
    }
21516
 
21517
    public void setEndDateIsSet(boolean value) {
21518
      __isset_bit_vector.set(__ENDDATE_ISSET_ID, value);
21519
    }
21520
 
21521
    public void setFieldValue(_Fields field, Object value) {
21522
      switch (field) {
21523
      case START_DATE:
21524
        if (value == null) {
21525
          unsetStartDate();
21526
        } else {
21527
          setStartDate((Long)value);
21528
        }
21529
        break;
21530
 
21531
      case END_DATE:
21532
        if (value == null) {
21533
          unsetEndDate();
21534
        } else {
21535
          setEndDate((Long)value);
21536
        }
21537
        break;
21538
 
21539
      }
21540
    }
21541
 
21542
    public Object getFieldValue(_Fields field) {
21543
      switch (field) {
21544
      case START_DATE:
21545
        return Long.valueOf(getStartDate());
21546
 
21547
      case END_DATE:
21548
        return Long.valueOf(getEndDate());
21549
 
21550
      }
21551
      throw new IllegalStateException();
21552
    }
21553
 
21554
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
21555
    public boolean isSet(_Fields field) {
21556
      if (field == null) {
21557
        throw new IllegalArgumentException();
21558
      }
21559
 
21560
      switch (field) {
21561
      case START_DATE:
21562
        return isSetStartDate();
21563
      case END_DATE:
21564
        return isSetEndDate();
21565
      }
21566
      throw new IllegalStateException();
21567
    }
21568
 
21569
    @Override
21570
    public boolean equals(Object that) {
21571
      if (that == null)
21572
        return false;
21573
      if (that instanceof getMovementSerializedInventoryByScans_args)
21574
        return this.equals((getMovementSerializedInventoryByScans_args)that);
21575
      return false;
21576
    }
21577
 
21578
    public boolean equals(getMovementSerializedInventoryByScans_args that) {
21579
      if (that == null)
21580
        return false;
21581
 
21582
      boolean this_present_startDate = true;
21583
      boolean that_present_startDate = true;
21584
      if (this_present_startDate || that_present_startDate) {
21585
        if (!(this_present_startDate && that_present_startDate))
21586
          return false;
21587
        if (this.startDate != that.startDate)
21588
          return false;
21589
      }
21590
 
21591
      boolean this_present_endDate = true;
21592
      boolean that_present_endDate = true;
21593
      if (this_present_endDate || that_present_endDate) {
21594
        if (!(this_present_endDate && that_present_endDate))
21595
          return false;
21596
        if (this.endDate != that.endDate)
21597
          return false;
21598
      }
21599
 
21600
      return true;
21601
    }
21602
 
21603
    @Override
21604
    public int hashCode() {
21605
      return 0;
21606
    }
21607
 
21608
    public int compareTo(getMovementSerializedInventoryByScans_args other) {
21609
      if (!getClass().equals(other.getClass())) {
21610
        return getClass().getName().compareTo(other.getClass().getName());
21611
      }
21612
 
21613
      int lastComparison = 0;
21614
      getMovementSerializedInventoryByScans_args typedOther = (getMovementSerializedInventoryByScans_args)other;
21615
 
21616
      lastComparison = Boolean.valueOf(isSetStartDate()).compareTo(typedOther.isSetStartDate());
21617
      if (lastComparison != 0) {
21618
        return lastComparison;
21619
      }
21620
      if (isSetStartDate()) {
21621
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startDate, typedOther.startDate);
21622
        if (lastComparison != 0) {
21623
          return lastComparison;
21624
        }
21625
      }
21626
      lastComparison = Boolean.valueOf(isSetEndDate()).compareTo(typedOther.isSetEndDate());
21627
      if (lastComparison != 0) {
21628
        return lastComparison;
21629
      }
21630
      if (isSetEndDate()) {
21631
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endDate, typedOther.endDate);
21632
        if (lastComparison != 0) {
21633
          return lastComparison;
21634
        }
21635
      }
21636
      return 0;
21637
    }
21638
 
21639
    public _Fields fieldForId(int fieldId) {
21640
      return _Fields.findByThriftId(fieldId);
21641
    }
21642
 
21643
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
21644
      org.apache.thrift.protocol.TField field;
21645
      iprot.readStructBegin();
21646
      while (true)
21647
      {
21648
        field = iprot.readFieldBegin();
21649
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
21650
          break;
21651
        }
21652
        switch (field.id) {
21653
          case 1: // START_DATE
21654
            if (field.type == org.apache.thrift.protocol.TType.I64) {
21655
              this.startDate = iprot.readI64();
21656
              setStartDateIsSet(true);
21657
            } else { 
21658
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21659
            }
21660
            break;
21661
          case 2: // END_DATE
21662
            if (field.type == org.apache.thrift.protocol.TType.I64) {
21663
              this.endDate = iprot.readI64();
21664
              setEndDateIsSet(true);
21665
            } else { 
21666
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21667
            }
21668
            break;
21669
          default:
21670
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21671
        }
21672
        iprot.readFieldEnd();
21673
      }
21674
      iprot.readStructEnd();
21675
      validate();
21676
    }
21677
 
21678
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
21679
      validate();
21680
 
21681
      oprot.writeStructBegin(STRUCT_DESC);
21682
      oprot.writeFieldBegin(START_DATE_FIELD_DESC);
21683
      oprot.writeI64(this.startDate);
21684
      oprot.writeFieldEnd();
21685
      oprot.writeFieldBegin(END_DATE_FIELD_DESC);
21686
      oprot.writeI64(this.endDate);
21687
      oprot.writeFieldEnd();
21688
      oprot.writeFieldStop();
21689
      oprot.writeStructEnd();
21690
    }
21691
 
21692
    @Override
21693
    public String toString() {
21694
      StringBuilder sb = new StringBuilder("getMovementSerializedInventoryByScans_args(");
21695
      boolean first = true;
21696
 
21697
      sb.append("startDate:");
21698
      sb.append(this.startDate);
21699
      first = false;
21700
      if (!first) sb.append(", ");
21701
      sb.append("endDate:");
21702
      sb.append(this.endDate);
21703
      first = false;
21704
      sb.append(")");
21705
      return sb.toString();
21706
    }
21707
 
21708
    public void validate() throws org.apache.thrift.TException {
21709
      // check for required fields
21710
    }
21711
 
21712
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21713
      try {
21714
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
21715
      } catch (org.apache.thrift.TException te) {
21716
        throw new java.io.IOException(te);
21717
      }
21718
    }
21719
 
21720
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
21721
      try {
21722
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
21723
        __isset_bit_vector = new BitSet(1);
21724
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
21725
      } catch (org.apache.thrift.TException te) {
21726
        throw new java.io.IOException(te);
21727
      }
21728
    }
21729
 
21730
  }
21731
 
21732
  public static class getMovementSerializedInventoryByScans_result implements org.apache.thrift.TBase<getMovementSerializedInventoryByScans_result, getMovementSerializedInventoryByScans_result._Fields>, java.io.Serializable, Cloneable   {
21733
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMovementSerializedInventoryByScans_result");
21734
 
21735
    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);
21736
 
21737
    private List<InventoryMovement> success; // required
21738
 
21739
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21740
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
21741
      SUCCESS((short)0, "success");
21742
 
21743
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21744
 
21745
      static {
21746
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21747
          byName.put(field.getFieldName(), field);
21748
        }
21749
      }
21750
 
21751
      /**
21752
       * Find the _Fields constant that matches fieldId, or null if its not found.
21753
       */
21754
      public static _Fields findByThriftId(int fieldId) {
21755
        switch(fieldId) {
21756
          case 0: // SUCCESS
21757
            return SUCCESS;
21758
          default:
21759
            return null;
21760
        }
21761
      }
21762
 
21763
      /**
21764
       * Find the _Fields constant that matches fieldId, throwing an exception
21765
       * if it is not found.
21766
       */
21767
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21768
        _Fields fields = findByThriftId(fieldId);
21769
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21770
        return fields;
21771
      }
21772
 
21773
      /**
21774
       * Find the _Fields constant that matches name, or null if its not found.
21775
       */
21776
      public static _Fields findByName(String name) {
21777
        return byName.get(name);
21778
      }
21779
 
21780
      private final short _thriftId;
21781
      private final String _fieldName;
21782
 
21783
      _Fields(short thriftId, String fieldName) {
21784
        _thriftId = thriftId;
21785
        _fieldName = fieldName;
21786
      }
21787
 
21788
      public short getThriftFieldId() {
21789
        return _thriftId;
21790
      }
21791
 
21792
      public String getFieldName() {
21793
        return _fieldName;
21794
      }
21795
    }
21796
 
21797
    // isset id assignments
21798
 
21799
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
21800
    static {
21801
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
21802
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21803
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
21804
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryMovement.class))));
21805
      metaDataMap = Collections.unmodifiableMap(tmpMap);
21806
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMovementSerializedInventoryByScans_result.class, metaDataMap);
21807
    }
21808
 
21809
    public getMovementSerializedInventoryByScans_result() {
21810
    }
21811
 
21812
    public getMovementSerializedInventoryByScans_result(
21813
      List<InventoryMovement> success)
21814
    {
21815
      this();
21816
      this.success = success;
21817
    }
21818
 
21819
    /**
21820
     * Performs a deep copy on <i>other</i>.
21821
     */
21822
    public getMovementSerializedInventoryByScans_result(getMovementSerializedInventoryByScans_result other) {
21823
      if (other.isSetSuccess()) {
21824
        List<InventoryMovement> __this__success = new ArrayList<InventoryMovement>();
21825
        for (InventoryMovement other_element : other.success) {
21826
          __this__success.add(new InventoryMovement(other_element));
21827
        }
21828
        this.success = __this__success;
21829
      }
21830
    }
21831
 
21832
    public getMovementSerializedInventoryByScans_result deepCopy() {
21833
      return new getMovementSerializedInventoryByScans_result(this);
21834
    }
21835
 
21836
    @Override
21837
    public void clear() {
21838
      this.success = null;
21839
    }
21840
 
21841
    public int getSuccessSize() {
21842
      return (this.success == null) ? 0 : this.success.size();
21843
    }
21844
 
21845
    public java.util.Iterator<InventoryMovement> getSuccessIterator() {
21846
      return (this.success == null) ? null : this.success.iterator();
21847
    }
21848
 
21849
    public void addToSuccess(InventoryMovement elem) {
21850
      if (this.success == null) {
21851
        this.success = new ArrayList<InventoryMovement>();
21852
      }
21853
      this.success.add(elem);
21854
    }
21855
 
21856
    public List<InventoryMovement> getSuccess() {
21857
      return this.success;
21858
    }
21859
 
21860
    public void setSuccess(List<InventoryMovement> success) {
21861
      this.success = success;
21862
    }
21863
 
21864
    public void unsetSuccess() {
21865
      this.success = null;
21866
    }
21867
 
21868
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
21869
    public boolean isSetSuccess() {
21870
      return this.success != null;
21871
    }
21872
 
21873
    public void setSuccessIsSet(boolean value) {
21874
      if (!value) {
21875
        this.success = null;
21876
      }
21877
    }
21878
 
21879
    public void setFieldValue(_Fields field, Object value) {
21880
      switch (field) {
21881
      case SUCCESS:
21882
        if (value == null) {
21883
          unsetSuccess();
21884
        } else {
21885
          setSuccess((List<InventoryMovement>)value);
21886
        }
21887
        break;
21888
 
21889
      }
21890
    }
21891
 
21892
    public Object getFieldValue(_Fields field) {
21893
      switch (field) {
21894
      case SUCCESS:
21895
        return getSuccess();
21896
 
21897
      }
21898
      throw new IllegalStateException();
21899
    }
21900
 
21901
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
21902
    public boolean isSet(_Fields field) {
21903
      if (field == null) {
21904
        throw new IllegalArgumentException();
21905
      }
21906
 
21907
      switch (field) {
21908
      case SUCCESS:
21909
        return isSetSuccess();
21910
      }
21911
      throw new IllegalStateException();
21912
    }
21913
 
21914
    @Override
21915
    public boolean equals(Object that) {
21916
      if (that == null)
21917
        return false;
21918
      if (that instanceof getMovementSerializedInventoryByScans_result)
21919
        return this.equals((getMovementSerializedInventoryByScans_result)that);
21920
      return false;
21921
    }
21922
 
21923
    public boolean equals(getMovementSerializedInventoryByScans_result that) {
21924
      if (that == null)
21925
        return false;
21926
 
21927
      boolean this_present_success = true && this.isSetSuccess();
21928
      boolean that_present_success = true && that.isSetSuccess();
21929
      if (this_present_success || that_present_success) {
21930
        if (!(this_present_success && that_present_success))
21931
          return false;
21932
        if (!this.success.equals(that.success))
21933
          return false;
21934
      }
21935
 
21936
      return true;
21937
    }
21938
 
21939
    @Override
21940
    public int hashCode() {
21941
      return 0;
21942
    }
21943
 
21944
    public int compareTo(getMovementSerializedInventoryByScans_result other) {
21945
      if (!getClass().equals(other.getClass())) {
21946
        return getClass().getName().compareTo(other.getClass().getName());
21947
      }
21948
 
21949
      int lastComparison = 0;
21950
      getMovementSerializedInventoryByScans_result typedOther = (getMovementSerializedInventoryByScans_result)other;
21951
 
21952
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
21953
      if (lastComparison != 0) {
21954
        return lastComparison;
21955
      }
21956
      if (isSetSuccess()) {
21957
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
21958
        if (lastComparison != 0) {
21959
          return lastComparison;
21960
        }
21961
      }
21962
      return 0;
21963
    }
21964
 
21965
    public _Fields fieldForId(int fieldId) {
21966
      return _Fields.findByThriftId(fieldId);
21967
    }
21968
 
21969
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
21970
      org.apache.thrift.protocol.TField field;
21971
      iprot.readStructBegin();
21972
      while (true)
21973
      {
21974
        field = iprot.readFieldBegin();
21975
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
21976
          break;
21977
        }
21978
        switch (field.id) {
21979
          case 0: // SUCCESS
21980
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
21981
              {
7210 amar.kumar 21982
                org.apache.thrift.protocol.TList _list64 = iprot.readListBegin();
21983
                this.success = new ArrayList<InventoryMovement>(_list64.size);
21984
                for (int _i65 = 0; _i65 < _list64.size; ++_i65)
6880 amar.kumar 21985
                {
7210 amar.kumar 21986
                  InventoryMovement _elem66; // required
21987
                  _elem66 = new InventoryMovement();
21988
                  _elem66.read(iprot);
21989
                  this.success.add(_elem66);
6880 amar.kumar 21990
                }
21991
                iprot.readListEnd();
21992
              }
21993
            } else { 
21994
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21995
            }
21996
            break;
21997
          default:
21998
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21999
        }
22000
        iprot.readFieldEnd();
22001
      }
22002
      iprot.readStructEnd();
22003
      validate();
22004
    }
22005
 
22006
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
22007
      oprot.writeStructBegin(STRUCT_DESC);
22008
 
22009
      if (this.isSetSuccess()) {
22010
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
22011
        {
22012
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7210 amar.kumar 22013
          for (InventoryMovement _iter67 : this.success)
6880 amar.kumar 22014
          {
7210 amar.kumar 22015
            _iter67.write(oprot);
6880 amar.kumar 22016
          }
22017
          oprot.writeListEnd();
22018
        }
22019
        oprot.writeFieldEnd();
22020
      }
22021
      oprot.writeFieldStop();
22022
      oprot.writeStructEnd();
22023
    }
22024
 
22025
    @Override
22026
    public String toString() {
22027
      StringBuilder sb = new StringBuilder("getMovementSerializedInventoryByScans_result(");
22028
      boolean first = true;
22029
 
22030
      sb.append("success:");
22031
      if (this.success == null) {
22032
        sb.append("null");
22033
      } else {
22034
        sb.append(this.success);
22035
      }
22036
      first = false;
22037
      sb.append(")");
22038
      return sb.toString();
22039
    }
22040
 
22041
    public void validate() throws org.apache.thrift.TException {
22042
      // check for required fields
22043
    }
22044
 
22045
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
22046
      try {
22047
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
22048
      } catch (org.apache.thrift.TException te) {
22049
        throw new java.io.IOException(te);
22050
      }
22051
    }
22052
 
22053
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
22054
      try {
22055
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
22056
      } catch (org.apache.thrift.TException te) {
22057
        throw new java.io.IOException(te);
22058
      }
22059
    }
22060
 
22061
  }
22062
 
7190 amar.kumar 22063
  public static class scanfreebie_args implements org.apache.thrift.TBase<scanfreebie_args, scanfreebie_args._Fields>, java.io.Serializable, Cloneable   {
22064
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanfreebie_args");
22065
 
22066
    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);
22067
    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);
22068
    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);
22069
    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);
22070
 
22071
    private long orderId; // required
22072
    private long freebieItemId; // required
22073
    private long freebieWarehouseId; // required
22074
    private ScanType scanType; // required
22075
 
22076
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22077
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
22078
      ORDER_ID((short)1, "orderId"),
22079
      FREEBIE_ITEM_ID((short)2, "freebieItemId"),
22080
      FREEBIE_WAREHOUSE_ID((short)3, "freebieWarehouseId"),
22081
      /**
22082
       * 
22083
       * @see ScanType
22084
       */
22085
      SCAN_TYPE((short)4, "scanType");
22086
 
22087
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22088
 
22089
      static {
22090
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22091
          byName.put(field.getFieldName(), field);
22092
        }
22093
      }
22094
 
22095
      /**
22096
       * Find the _Fields constant that matches fieldId, or null if its not found.
22097
       */
22098
      public static _Fields findByThriftId(int fieldId) {
22099
        switch(fieldId) {
22100
          case 1: // ORDER_ID
22101
            return ORDER_ID;
22102
          case 2: // FREEBIE_ITEM_ID
22103
            return FREEBIE_ITEM_ID;
22104
          case 3: // FREEBIE_WAREHOUSE_ID
22105
            return FREEBIE_WAREHOUSE_ID;
22106
          case 4: // SCAN_TYPE
22107
            return SCAN_TYPE;
22108
          default:
22109
            return null;
22110
        }
22111
      }
22112
 
22113
      /**
22114
       * Find the _Fields constant that matches fieldId, throwing an exception
22115
       * if it is not found.
22116
       */
22117
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22118
        _Fields fields = findByThriftId(fieldId);
22119
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22120
        return fields;
22121
      }
22122
 
22123
      /**
22124
       * Find the _Fields constant that matches name, or null if its not found.
22125
       */
22126
      public static _Fields findByName(String name) {
22127
        return byName.get(name);
22128
      }
22129
 
22130
      private final short _thriftId;
22131
      private final String _fieldName;
22132
 
22133
      _Fields(short thriftId, String fieldName) {
22134
        _thriftId = thriftId;
22135
        _fieldName = fieldName;
22136
      }
22137
 
22138
      public short getThriftFieldId() {
22139
        return _thriftId;
22140
      }
22141
 
22142
      public String getFieldName() {
22143
        return _fieldName;
22144
      }
22145
    }
22146
 
22147
    // isset id assignments
22148
    private static final int __ORDERID_ISSET_ID = 0;
22149
    private static final int __FREEBIEITEMID_ISSET_ID = 1;
22150
    private static final int __FREEBIEWAREHOUSEID_ISSET_ID = 2;
22151
    private BitSet __isset_bit_vector = new BitSet(3);
22152
 
22153
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
22154
    static {
22155
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
22156
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22157
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
22158
      tmpMap.put(_Fields.FREEBIE_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("freebieItemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22159
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
22160
      tmpMap.put(_Fields.FREEBIE_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("freebieWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22161
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
22162
      tmpMap.put(_Fields.SCAN_TYPE, new org.apache.thrift.meta_data.FieldMetaData("scanType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22163
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
22164
      metaDataMap = Collections.unmodifiableMap(tmpMap);
22165
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanfreebie_args.class, metaDataMap);
22166
    }
22167
 
22168
    public scanfreebie_args() {
22169
    }
22170
 
22171
    public scanfreebie_args(
22172
      long orderId,
22173
      long freebieItemId,
22174
      long freebieWarehouseId,
22175
      ScanType scanType)
22176
    {
22177
      this();
22178
      this.orderId = orderId;
22179
      setOrderIdIsSet(true);
22180
      this.freebieItemId = freebieItemId;
22181
      setFreebieItemIdIsSet(true);
22182
      this.freebieWarehouseId = freebieWarehouseId;
22183
      setFreebieWarehouseIdIsSet(true);
22184
      this.scanType = scanType;
22185
    }
22186
 
22187
    /**
22188
     * Performs a deep copy on <i>other</i>.
22189
     */
22190
    public scanfreebie_args(scanfreebie_args other) {
22191
      __isset_bit_vector.clear();
22192
      __isset_bit_vector.or(other.__isset_bit_vector);
22193
      this.orderId = other.orderId;
22194
      this.freebieItemId = other.freebieItemId;
22195
      this.freebieWarehouseId = other.freebieWarehouseId;
22196
      if (other.isSetScanType()) {
22197
        this.scanType = other.scanType;
22198
      }
22199
    }
22200
 
22201
    public scanfreebie_args deepCopy() {
22202
      return new scanfreebie_args(this);
22203
    }
22204
 
22205
    @Override
22206
    public void clear() {
22207
      setOrderIdIsSet(false);
22208
      this.orderId = 0;
22209
      setFreebieItemIdIsSet(false);
22210
      this.freebieItemId = 0;
22211
      setFreebieWarehouseIdIsSet(false);
22212
      this.freebieWarehouseId = 0;
22213
      this.scanType = null;
22214
    }
22215
 
22216
    public long getOrderId() {
22217
      return this.orderId;
22218
    }
22219
 
22220
    public void setOrderId(long orderId) {
22221
      this.orderId = orderId;
22222
      setOrderIdIsSet(true);
22223
    }
22224
 
22225
    public void unsetOrderId() {
22226
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
22227
    }
22228
 
22229
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
22230
    public boolean isSetOrderId() {
22231
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
22232
    }
22233
 
22234
    public void setOrderIdIsSet(boolean value) {
22235
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
22236
    }
22237
 
22238
    public long getFreebieItemId() {
22239
      return this.freebieItemId;
22240
    }
22241
 
22242
    public void setFreebieItemId(long freebieItemId) {
22243
      this.freebieItemId = freebieItemId;
22244
      setFreebieItemIdIsSet(true);
22245
    }
22246
 
22247
    public void unsetFreebieItemId() {
22248
      __isset_bit_vector.clear(__FREEBIEITEMID_ISSET_ID);
22249
    }
22250
 
22251
    /** Returns true if field freebieItemId is set (has been assigned a value) and false otherwise */
22252
    public boolean isSetFreebieItemId() {
22253
      return __isset_bit_vector.get(__FREEBIEITEMID_ISSET_ID);
22254
    }
22255
 
22256
    public void setFreebieItemIdIsSet(boolean value) {
22257
      __isset_bit_vector.set(__FREEBIEITEMID_ISSET_ID, value);
22258
    }
22259
 
22260
    public long getFreebieWarehouseId() {
22261
      return this.freebieWarehouseId;
22262
    }
22263
 
22264
    public void setFreebieWarehouseId(long freebieWarehouseId) {
22265
      this.freebieWarehouseId = freebieWarehouseId;
22266
      setFreebieWarehouseIdIsSet(true);
22267
    }
22268
 
22269
    public void unsetFreebieWarehouseId() {
22270
      __isset_bit_vector.clear(__FREEBIEWAREHOUSEID_ISSET_ID);
22271
    }
22272
 
22273
    /** Returns true if field freebieWarehouseId is set (has been assigned a value) and false otherwise */
22274
    public boolean isSetFreebieWarehouseId() {
22275
      return __isset_bit_vector.get(__FREEBIEWAREHOUSEID_ISSET_ID);
22276
    }
22277
 
22278
    public void setFreebieWarehouseIdIsSet(boolean value) {
22279
      __isset_bit_vector.set(__FREEBIEWAREHOUSEID_ISSET_ID, value);
22280
    }
22281
 
22282
    /**
22283
     * 
22284
     * @see ScanType
22285
     */
22286
    public ScanType getScanType() {
22287
      return this.scanType;
22288
    }
22289
 
22290
    /**
22291
     * 
22292
     * @see ScanType
22293
     */
22294
    public void setScanType(ScanType scanType) {
22295
      this.scanType = scanType;
22296
    }
22297
 
22298
    public void unsetScanType() {
22299
      this.scanType = null;
22300
    }
22301
 
22302
    /** Returns true if field scanType is set (has been assigned a value) and false otherwise */
22303
    public boolean isSetScanType() {
22304
      return this.scanType != null;
22305
    }
22306
 
22307
    public void setScanTypeIsSet(boolean value) {
22308
      if (!value) {
22309
        this.scanType = null;
22310
      }
22311
    }
22312
 
22313
    public void setFieldValue(_Fields field, Object value) {
22314
      switch (field) {
22315
      case ORDER_ID:
22316
        if (value == null) {
22317
          unsetOrderId();
22318
        } else {
22319
          setOrderId((Long)value);
22320
        }
22321
        break;
22322
 
22323
      case FREEBIE_ITEM_ID:
22324
        if (value == null) {
22325
          unsetFreebieItemId();
22326
        } else {
22327
          setFreebieItemId((Long)value);
22328
        }
22329
        break;
22330
 
22331
      case FREEBIE_WAREHOUSE_ID:
22332
        if (value == null) {
22333
          unsetFreebieWarehouseId();
22334
        } else {
22335
          setFreebieWarehouseId((Long)value);
22336
        }
22337
        break;
22338
 
22339
      case SCAN_TYPE:
22340
        if (value == null) {
22341
          unsetScanType();
22342
        } else {
22343
          setScanType((ScanType)value);
22344
        }
22345
        break;
22346
 
22347
      }
22348
    }
22349
 
22350
    public Object getFieldValue(_Fields field) {
22351
      switch (field) {
22352
      case ORDER_ID:
22353
        return Long.valueOf(getOrderId());
22354
 
22355
      case FREEBIE_ITEM_ID:
22356
        return Long.valueOf(getFreebieItemId());
22357
 
22358
      case FREEBIE_WAREHOUSE_ID:
22359
        return Long.valueOf(getFreebieWarehouseId());
22360
 
22361
      case SCAN_TYPE:
22362
        return getScanType();
22363
 
22364
      }
22365
      throw new IllegalStateException();
22366
    }
22367
 
22368
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
22369
    public boolean isSet(_Fields field) {
22370
      if (field == null) {
22371
        throw new IllegalArgumentException();
22372
      }
22373
 
22374
      switch (field) {
22375
      case ORDER_ID:
22376
        return isSetOrderId();
22377
      case FREEBIE_ITEM_ID:
22378
        return isSetFreebieItemId();
22379
      case FREEBIE_WAREHOUSE_ID:
22380
        return isSetFreebieWarehouseId();
22381
      case SCAN_TYPE:
22382
        return isSetScanType();
22383
      }
22384
      throw new IllegalStateException();
22385
    }
22386
 
22387
    @Override
22388
    public boolean equals(Object that) {
22389
      if (that == null)
22390
        return false;
22391
      if (that instanceof scanfreebie_args)
22392
        return this.equals((scanfreebie_args)that);
22393
      return false;
22394
    }
22395
 
22396
    public boolean equals(scanfreebie_args that) {
22397
      if (that == null)
22398
        return false;
22399
 
22400
      boolean this_present_orderId = true;
22401
      boolean that_present_orderId = true;
22402
      if (this_present_orderId || that_present_orderId) {
22403
        if (!(this_present_orderId && that_present_orderId))
22404
          return false;
22405
        if (this.orderId != that.orderId)
22406
          return false;
22407
      }
22408
 
22409
      boolean this_present_freebieItemId = true;
22410
      boolean that_present_freebieItemId = true;
22411
      if (this_present_freebieItemId || that_present_freebieItemId) {
22412
        if (!(this_present_freebieItemId && that_present_freebieItemId))
22413
          return false;
22414
        if (this.freebieItemId != that.freebieItemId)
22415
          return false;
22416
      }
22417
 
22418
      boolean this_present_freebieWarehouseId = true;
22419
      boolean that_present_freebieWarehouseId = true;
22420
      if (this_present_freebieWarehouseId || that_present_freebieWarehouseId) {
22421
        if (!(this_present_freebieWarehouseId && that_present_freebieWarehouseId))
22422
          return false;
22423
        if (this.freebieWarehouseId != that.freebieWarehouseId)
22424
          return false;
22425
      }
22426
 
22427
      boolean this_present_scanType = true && this.isSetScanType();
22428
      boolean that_present_scanType = true && that.isSetScanType();
22429
      if (this_present_scanType || that_present_scanType) {
22430
        if (!(this_present_scanType && that_present_scanType))
22431
          return false;
22432
        if (!this.scanType.equals(that.scanType))
22433
          return false;
22434
      }
22435
 
22436
      return true;
22437
    }
22438
 
22439
    @Override
22440
    public int hashCode() {
22441
      return 0;
22442
    }
22443
 
22444
    public int compareTo(scanfreebie_args other) {
22445
      if (!getClass().equals(other.getClass())) {
22446
        return getClass().getName().compareTo(other.getClass().getName());
22447
      }
22448
 
22449
      int lastComparison = 0;
22450
      scanfreebie_args typedOther = (scanfreebie_args)other;
22451
 
22452
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
22453
      if (lastComparison != 0) {
22454
        return lastComparison;
22455
      }
22456
      if (isSetOrderId()) {
22457
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
22458
        if (lastComparison != 0) {
22459
          return lastComparison;
22460
        }
22461
      }
22462
      lastComparison = Boolean.valueOf(isSetFreebieItemId()).compareTo(typedOther.isSetFreebieItemId());
22463
      if (lastComparison != 0) {
22464
        return lastComparison;
22465
      }
22466
      if (isSetFreebieItemId()) {
22467
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freebieItemId, typedOther.freebieItemId);
22468
        if (lastComparison != 0) {
22469
          return lastComparison;
22470
        }
22471
      }
22472
      lastComparison = Boolean.valueOf(isSetFreebieWarehouseId()).compareTo(typedOther.isSetFreebieWarehouseId());
22473
      if (lastComparison != 0) {
22474
        return lastComparison;
22475
      }
22476
      if (isSetFreebieWarehouseId()) {
22477
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freebieWarehouseId, typedOther.freebieWarehouseId);
22478
        if (lastComparison != 0) {
22479
          return lastComparison;
22480
        }
22481
      }
22482
      lastComparison = Boolean.valueOf(isSetScanType()).compareTo(typedOther.isSetScanType());
22483
      if (lastComparison != 0) {
22484
        return lastComparison;
22485
      }
22486
      if (isSetScanType()) {
22487
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scanType, typedOther.scanType);
22488
        if (lastComparison != 0) {
22489
          return lastComparison;
22490
        }
22491
      }
22492
      return 0;
22493
    }
22494
 
22495
    public _Fields fieldForId(int fieldId) {
22496
      return _Fields.findByThriftId(fieldId);
22497
    }
22498
 
22499
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
22500
      org.apache.thrift.protocol.TField field;
22501
      iprot.readStructBegin();
22502
      while (true)
22503
      {
22504
        field = iprot.readFieldBegin();
22505
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
22506
          break;
22507
        }
22508
        switch (field.id) {
22509
          case 1: // ORDER_ID
22510
            if (field.type == org.apache.thrift.protocol.TType.I64) {
22511
              this.orderId = iprot.readI64();
22512
              setOrderIdIsSet(true);
22513
            } else { 
22514
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22515
            }
22516
            break;
22517
          case 2: // FREEBIE_ITEM_ID
22518
            if (field.type == org.apache.thrift.protocol.TType.I64) {
22519
              this.freebieItemId = iprot.readI64();
22520
              setFreebieItemIdIsSet(true);
22521
            } else { 
22522
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22523
            }
22524
            break;
22525
          case 3: // FREEBIE_WAREHOUSE_ID
22526
            if (field.type == org.apache.thrift.protocol.TType.I64) {
22527
              this.freebieWarehouseId = iprot.readI64();
22528
              setFreebieWarehouseIdIsSet(true);
22529
            } else { 
22530
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22531
            }
22532
            break;
22533
          case 4: // SCAN_TYPE
22534
            if (field.type == org.apache.thrift.protocol.TType.I32) {
22535
              this.scanType = ScanType.findByValue(iprot.readI32());
22536
            } else { 
22537
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22538
            }
22539
            break;
22540
          default:
22541
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22542
        }
22543
        iprot.readFieldEnd();
22544
      }
22545
      iprot.readStructEnd();
22546
      validate();
22547
    }
22548
 
22549
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
22550
      validate();
22551
 
22552
      oprot.writeStructBegin(STRUCT_DESC);
22553
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
22554
      oprot.writeI64(this.orderId);
22555
      oprot.writeFieldEnd();
22556
      oprot.writeFieldBegin(FREEBIE_ITEM_ID_FIELD_DESC);
22557
      oprot.writeI64(this.freebieItemId);
22558
      oprot.writeFieldEnd();
22559
      oprot.writeFieldBegin(FREEBIE_WAREHOUSE_ID_FIELD_DESC);
22560
      oprot.writeI64(this.freebieWarehouseId);
22561
      oprot.writeFieldEnd();
22562
      if (this.scanType != null) {
22563
        oprot.writeFieldBegin(SCAN_TYPE_FIELD_DESC);
22564
        oprot.writeI32(this.scanType.getValue());
22565
        oprot.writeFieldEnd();
22566
      }
22567
      oprot.writeFieldStop();
22568
      oprot.writeStructEnd();
22569
    }
22570
 
22571
    @Override
22572
    public String toString() {
22573
      StringBuilder sb = new StringBuilder("scanfreebie_args(");
22574
      boolean first = true;
22575
 
22576
      sb.append("orderId:");
22577
      sb.append(this.orderId);
22578
      first = false;
22579
      if (!first) sb.append(", ");
22580
      sb.append("freebieItemId:");
22581
      sb.append(this.freebieItemId);
22582
      first = false;
22583
      if (!first) sb.append(", ");
22584
      sb.append("freebieWarehouseId:");
22585
      sb.append(this.freebieWarehouseId);
22586
      first = false;
22587
      if (!first) sb.append(", ");
22588
      sb.append("scanType:");
22589
      if (this.scanType == null) {
22590
        sb.append("null");
22591
      } else {
22592
        sb.append(this.scanType);
22593
      }
22594
      first = false;
22595
      sb.append(")");
22596
      return sb.toString();
22597
    }
22598
 
22599
    public void validate() throws org.apache.thrift.TException {
22600
      // check for required fields
22601
    }
22602
 
22603
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
22604
      try {
22605
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
22606
      } catch (org.apache.thrift.TException te) {
22607
        throw new java.io.IOException(te);
22608
      }
22609
    }
22610
 
22611
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
22612
      try {
22613
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
22614
        __isset_bit_vector = new BitSet(1);
22615
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
22616
      } catch (org.apache.thrift.TException te) {
22617
        throw new java.io.IOException(te);
22618
      }
22619
    }
22620
 
22621
  }
22622
 
22623
  public static class scanfreebie_result implements org.apache.thrift.TBase<scanfreebie_result, scanfreebie_result._Fields>, java.io.Serializable, Cloneable   {
22624
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanfreebie_result");
22625
 
22626
    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);
22627
    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);
22628
 
22629
    private InventoryItem success; // required
22630
    private WarehouseServiceException wex; // required
22631
 
22632
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22633
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
22634
      SUCCESS((short)0, "success"),
22635
      WEX((short)1, "wex");
22636
 
22637
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22638
 
22639
      static {
22640
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22641
          byName.put(field.getFieldName(), field);
22642
        }
22643
      }
22644
 
22645
      /**
22646
       * Find the _Fields constant that matches fieldId, or null if its not found.
22647
       */
22648
      public static _Fields findByThriftId(int fieldId) {
22649
        switch(fieldId) {
22650
          case 0: // SUCCESS
22651
            return SUCCESS;
22652
          case 1: // WEX
22653
            return WEX;
22654
          default:
22655
            return null;
22656
        }
22657
      }
22658
 
22659
      /**
22660
       * Find the _Fields constant that matches fieldId, throwing an exception
22661
       * if it is not found.
22662
       */
22663
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22664
        _Fields fields = findByThriftId(fieldId);
22665
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22666
        return fields;
22667
      }
22668
 
22669
      /**
22670
       * Find the _Fields constant that matches name, or null if its not found.
22671
       */
22672
      public static _Fields findByName(String name) {
22673
        return byName.get(name);
22674
      }
22675
 
22676
      private final short _thriftId;
22677
      private final String _fieldName;
22678
 
22679
      _Fields(short thriftId, String fieldName) {
22680
        _thriftId = thriftId;
22681
        _fieldName = fieldName;
22682
      }
22683
 
22684
      public short getThriftFieldId() {
22685
        return _thriftId;
22686
      }
22687
 
22688
      public String getFieldName() {
22689
        return _fieldName;
22690
      }
22691
    }
22692
 
22693
    // isset id assignments
22694
 
22695
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
22696
    static {
22697
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
22698
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22699
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
22700
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22701
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
22702
      metaDataMap = Collections.unmodifiableMap(tmpMap);
22703
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanfreebie_result.class, metaDataMap);
22704
    }
22705
 
22706
    public scanfreebie_result() {
22707
    }
22708
 
22709
    public scanfreebie_result(
22710
      InventoryItem success,
22711
      WarehouseServiceException wex)
22712
    {
22713
      this();
22714
      this.success = success;
22715
      this.wex = wex;
22716
    }
22717
 
22718
    /**
22719
     * Performs a deep copy on <i>other</i>.
22720
     */
22721
    public scanfreebie_result(scanfreebie_result other) {
22722
      if (other.isSetSuccess()) {
22723
        this.success = new InventoryItem(other.success);
22724
      }
22725
      if (other.isSetWex()) {
22726
        this.wex = new WarehouseServiceException(other.wex);
22727
      }
22728
    }
22729
 
22730
    public scanfreebie_result deepCopy() {
22731
      return new scanfreebie_result(this);
22732
    }
22733
 
22734
    @Override
22735
    public void clear() {
22736
      this.success = null;
22737
      this.wex = null;
22738
    }
22739
 
22740
    public InventoryItem getSuccess() {
22741
      return this.success;
22742
    }
22743
 
22744
    public void setSuccess(InventoryItem success) {
22745
      this.success = success;
22746
    }
22747
 
22748
    public void unsetSuccess() {
22749
      this.success = null;
22750
    }
22751
 
22752
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
22753
    public boolean isSetSuccess() {
22754
      return this.success != null;
22755
    }
22756
 
22757
    public void setSuccessIsSet(boolean value) {
22758
      if (!value) {
22759
        this.success = null;
22760
      }
22761
    }
22762
 
22763
    public WarehouseServiceException getWex() {
22764
      return this.wex;
22765
    }
22766
 
22767
    public void setWex(WarehouseServiceException wex) {
22768
      this.wex = wex;
22769
    }
22770
 
22771
    public void unsetWex() {
22772
      this.wex = null;
22773
    }
22774
 
22775
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
22776
    public boolean isSetWex() {
22777
      return this.wex != null;
22778
    }
22779
 
22780
    public void setWexIsSet(boolean value) {
22781
      if (!value) {
22782
        this.wex = null;
22783
      }
22784
    }
22785
 
22786
    public void setFieldValue(_Fields field, Object value) {
22787
      switch (field) {
22788
      case SUCCESS:
22789
        if (value == null) {
22790
          unsetSuccess();
22791
        } else {
22792
          setSuccess((InventoryItem)value);
22793
        }
22794
        break;
22795
 
22796
      case WEX:
22797
        if (value == null) {
22798
          unsetWex();
22799
        } else {
22800
          setWex((WarehouseServiceException)value);
22801
        }
22802
        break;
22803
 
22804
      }
22805
    }
22806
 
22807
    public Object getFieldValue(_Fields field) {
22808
      switch (field) {
22809
      case SUCCESS:
22810
        return getSuccess();
22811
 
22812
      case WEX:
22813
        return getWex();
22814
 
22815
      }
22816
      throw new IllegalStateException();
22817
    }
22818
 
22819
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
22820
    public boolean isSet(_Fields field) {
22821
      if (field == null) {
22822
        throw new IllegalArgumentException();
22823
      }
22824
 
22825
      switch (field) {
22826
      case SUCCESS:
22827
        return isSetSuccess();
22828
      case WEX:
22829
        return isSetWex();
22830
      }
22831
      throw new IllegalStateException();
22832
    }
22833
 
22834
    @Override
22835
    public boolean equals(Object that) {
22836
      if (that == null)
22837
        return false;
22838
      if (that instanceof scanfreebie_result)
22839
        return this.equals((scanfreebie_result)that);
22840
      return false;
22841
    }
22842
 
22843
    public boolean equals(scanfreebie_result that) {
22844
      if (that == null)
22845
        return false;
22846
 
22847
      boolean this_present_success = true && this.isSetSuccess();
22848
      boolean that_present_success = true && that.isSetSuccess();
22849
      if (this_present_success || that_present_success) {
22850
        if (!(this_present_success && that_present_success))
22851
          return false;
22852
        if (!this.success.equals(that.success))
22853
          return false;
22854
      }
22855
 
22856
      boolean this_present_wex = true && this.isSetWex();
22857
      boolean that_present_wex = true && that.isSetWex();
22858
      if (this_present_wex || that_present_wex) {
22859
        if (!(this_present_wex && that_present_wex))
22860
          return false;
22861
        if (!this.wex.equals(that.wex))
22862
          return false;
22863
      }
22864
 
22865
      return true;
22866
    }
22867
 
22868
    @Override
22869
    public int hashCode() {
22870
      return 0;
22871
    }
22872
 
22873
    public int compareTo(scanfreebie_result other) {
22874
      if (!getClass().equals(other.getClass())) {
22875
        return getClass().getName().compareTo(other.getClass().getName());
22876
      }
22877
 
22878
      int lastComparison = 0;
22879
      scanfreebie_result typedOther = (scanfreebie_result)other;
22880
 
22881
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
22882
      if (lastComparison != 0) {
22883
        return lastComparison;
22884
      }
22885
      if (isSetSuccess()) {
22886
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
22887
        if (lastComparison != 0) {
22888
          return lastComparison;
22889
        }
22890
      }
22891
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
22892
      if (lastComparison != 0) {
22893
        return lastComparison;
22894
      }
22895
      if (isSetWex()) {
22896
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
22897
        if (lastComparison != 0) {
22898
          return lastComparison;
22899
        }
22900
      }
22901
      return 0;
22902
    }
22903
 
22904
    public _Fields fieldForId(int fieldId) {
22905
      return _Fields.findByThriftId(fieldId);
22906
    }
22907
 
22908
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
22909
      org.apache.thrift.protocol.TField field;
22910
      iprot.readStructBegin();
22911
      while (true)
22912
      {
22913
        field = iprot.readFieldBegin();
22914
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
22915
          break;
22916
        }
22917
        switch (field.id) {
22918
          case 0: // SUCCESS
22919
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
22920
              this.success = new InventoryItem();
22921
              this.success.read(iprot);
22922
            } else { 
22923
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22924
            }
22925
            break;
22926
          case 1: // WEX
22927
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
22928
              this.wex = new WarehouseServiceException();
22929
              this.wex.read(iprot);
22930
            } else { 
22931
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22932
            }
22933
            break;
22934
          default:
22935
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22936
        }
22937
        iprot.readFieldEnd();
22938
      }
22939
      iprot.readStructEnd();
22940
      validate();
22941
    }
22942
 
22943
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
22944
      oprot.writeStructBegin(STRUCT_DESC);
22945
 
22946
      if (this.isSetSuccess()) {
22947
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
22948
        this.success.write(oprot);
22949
        oprot.writeFieldEnd();
22950
      } else if (this.isSetWex()) {
22951
        oprot.writeFieldBegin(WEX_FIELD_DESC);
22952
        this.wex.write(oprot);
22953
        oprot.writeFieldEnd();
22954
      }
22955
      oprot.writeFieldStop();
22956
      oprot.writeStructEnd();
22957
    }
22958
 
22959
    @Override
22960
    public String toString() {
22961
      StringBuilder sb = new StringBuilder("scanfreebie_result(");
22962
      boolean first = true;
22963
 
22964
      sb.append("success:");
22965
      if (this.success == null) {
22966
        sb.append("null");
22967
      } else {
22968
        sb.append(this.success);
22969
      }
22970
      first = false;
22971
      if (!first) sb.append(", ");
22972
      sb.append("wex:");
22973
      if (this.wex == null) {
22974
        sb.append("null");
22975
      } else {
22976
        sb.append(this.wex);
22977
      }
22978
      first = false;
22979
      sb.append(")");
22980
      return sb.toString();
22981
    }
22982
 
22983
    public void validate() throws org.apache.thrift.TException {
22984
      // check for required fields
22985
    }
22986
 
22987
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
22988
      try {
22989
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
22990
      } catch (org.apache.thrift.TException te) {
22991
        throw new java.io.IOException(te);
22992
      }
22993
    }
22994
 
22995
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
22996
      try {
22997
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
22998
      } catch (org.apache.thrift.TException te) {
22999
        throw new java.io.IOException(te);
23000
      }
23001
    }
23002
 
23003
  }
23004
 
7199 amar.kumar 23005
  public static class reshipfreebie_args implements org.apache.thrift.TBase<reshipfreebie_args, reshipfreebie_args._Fields>, java.io.Serializable, Cloneable   {
23006
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("reshipfreebie_args");
23007
 
23008
    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);
23009
    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);
23010
    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);
23011
    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);
23012
 
23013
    private long oldOrderId; // required
23014
    private long newOrderId; // required
23015
    private long freebieItemId; // required
23016
    private ScanType scanType; // required
23017
 
23018
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23019
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
23020
      OLD_ORDER_ID((short)1, "oldOrderId"),
23021
      NEW_ORDER_ID((short)2, "newOrderId"),
23022
      FREEBIE_ITEM_ID((short)3, "freebieItemId"),
23023
      /**
23024
       * 
23025
       * @see ScanType
23026
       */
23027
      SCAN_TYPE((short)4, "scanType");
23028
 
23029
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23030
 
23031
      static {
23032
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23033
          byName.put(field.getFieldName(), field);
23034
        }
23035
      }
23036
 
23037
      /**
23038
       * Find the _Fields constant that matches fieldId, or null if its not found.
23039
       */
23040
      public static _Fields findByThriftId(int fieldId) {
23041
        switch(fieldId) {
23042
          case 1: // OLD_ORDER_ID
23043
            return OLD_ORDER_ID;
23044
          case 2: // NEW_ORDER_ID
23045
            return NEW_ORDER_ID;
23046
          case 3: // FREEBIE_ITEM_ID
23047
            return FREEBIE_ITEM_ID;
23048
          case 4: // SCAN_TYPE
23049
            return SCAN_TYPE;
23050
          default:
23051
            return null;
23052
        }
23053
      }
23054
 
23055
      /**
23056
       * Find the _Fields constant that matches fieldId, throwing an exception
23057
       * if it is not found.
23058
       */
23059
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23060
        _Fields fields = findByThriftId(fieldId);
23061
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23062
        return fields;
23063
      }
23064
 
23065
      /**
23066
       * Find the _Fields constant that matches name, or null if its not found.
23067
       */
23068
      public static _Fields findByName(String name) {
23069
        return byName.get(name);
23070
      }
23071
 
23072
      private final short _thriftId;
23073
      private final String _fieldName;
23074
 
23075
      _Fields(short thriftId, String fieldName) {
23076
        _thriftId = thriftId;
23077
        _fieldName = fieldName;
23078
      }
23079
 
23080
      public short getThriftFieldId() {
23081
        return _thriftId;
23082
      }
23083
 
23084
      public String getFieldName() {
23085
        return _fieldName;
23086
      }
23087
    }
23088
 
23089
    // isset id assignments
23090
    private static final int __OLDORDERID_ISSET_ID = 0;
23091
    private static final int __NEWORDERID_ISSET_ID = 1;
23092
    private static final int __FREEBIEITEMID_ISSET_ID = 2;
23093
    private BitSet __isset_bit_vector = new BitSet(3);
23094
 
23095
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
23096
    static {
23097
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
23098
      tmpMap.put(_Fields.OLD_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("oldOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23099
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
23100
      tmpMap.put(_Fields.NEW_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("newOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23101
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
23102
      tmpMap.put(_Fields.FREEBIE_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("freebieItemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23103
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
23104
      tmpMap.put(_Fields.SCAN_TYPE, new org.apache.thrift.meta_data.FieldMetaData("scanType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23105
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
23106
      metaDataMap = Collections.unmodifiableMap(tmpMap);
23107
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(reshipfreebie_args.class, metaDataMap);
23108
    }
23109
 
23110
    public reshipfreebie_args() {
23111
    }
23112
 
23113
    public reshipfreebie_args(
23114
      long oldOrderId,
23115
      long newOrderId,
23116
      long freebieItemId,
23117
      ScanType scanType)
23118
    {
23119
      this();
23120
      this.oldOrderId = oldOrderId;
23121
      setOldOrderIdIsSet(true);
23122
      this.newOrderId = newOrderId;
23123
      setNewOrderIdIsSet(true);
23124
      this.freebieItemId = freebieItemId;
23125
      setFreebieItemIdIsSet(true);
23126
      this.scanType = scanType;
23127
    }
23128
 
23129
    /**
23130
     * Performs a deep copy on <i>other</i>.
23131
     */
23132
    public reshipfreebie_args(reshipfreebie_args other) {
23133
      __isset_bit_vector.clear();
23134
      __isset_bit_vector.or(other.__isset_bit_vector);
23135
      this.oldOrderId = other.oldOrderId;
23136
      this.newOrderId = other.newOrderId;
23137
      this.freebieItemId = other.freebieItemId;
23138
      if (other.isSetScanType()) {
23139
        this.scanType = other.scanType;
23140
      }
23141
    }
23142
 
23143
    public reshipfreebie_args deepCopy() {
23144
      return new reshipfreebie_args(this);
23145
    }
23146
 
23147
    @Override
23148
    public void clear() {
23149
      setOldOrderIdIsSet(false);
23150
      this.oldOrderId = 0;
23151
      setNewOrderIdIsSet(false);
23152
      this.newOrderId = 0;
23153
      setFreebieItemIdIsSet(false);
23154
      this.freebieItemId = 0;
23155
      this.scanType = null;
23156
    }
23157
 
23158
    public long getOldOrderId() {
23159
      return this.oldOrderId;
23160
    }
23161
 
23162
    public void setOldOrderId(long oldOrderId) {
23163
      this.oldOrderId = oldOrderId;
23164
      setOldOrderIdIsSet(true);
23165
    }
23166
 
23167
    public void unsetOldOrderId() {
23168
      __isset_bit_vector.clear(__OLDORDERID_ISSET_ID);
23169
    }
23170
 
23171
    /** Returns true if field oldOrderId is set (has been assigned a value) and false otherwise */
23172
    public boolean isSetOldOrderId() {
23173
      return __isset_bit_vector.get(__OLDORDERID_ISSET_ID);
23174
    }
23175
 
23176
    public void setOldOrderIdIsSet(boolean value) {
23177
      __isset_bit_vector.set(__OLDORDERID_ISSET_ID, value);
23178
    }
23179
 
23180
    public long getNewOrderId() {
23181
      return this.newOrderId;
23182
    }
23183
 
23184
    public void setNewOrderId(long newOrderId) {
23185
      this.newOrderId = newOrderId;
23186
      setNewOrderIdIsSet(true);
23187
    }
23188
 
23189
    public void unsetNewOrderId() {
23190
      __isset_bit_vector.clear(__NEWORDERID_ISSET_ID);
23191
    }
23192
 
23193
    /** Returns true if field newOrderId is set (has been assigned a value) and false otherwise */
23194
    public boolean isSetNewOrderId() {
23195
      return __isset_bit_vector.get(__NEWORDERID_ISSET_ID);
23196
    }
23197
 
23198
    public void setNewOrderIdIsSet(boolean value) {
23199
      __isset_bit_vector.set(__NEWORDERID_ISSET_ID, value);
23200
    }
23201
 
23202
    public long getFreebieItemId() {
23203
      return this.freebieItemId;
23204
    }
23205
 
23206
    public void setFreebieItemId(long freebieItemId) {
23207
      this.freebieItemId = freebieItemId;
23208
      setFreebieItemIdIsSet(true);
23209
    }
23210
 
23211
    public void unsetFreebieItemId() {
23212
      __isset_bit_vector.clear(__FREEBIEITEMID_ISSET_ID);
23213
    }
23214
 
23215
    /** Returns true if field freebieItemId is set (has been assigned a value) and false otherwise */
23216
    public boolean isSetFreebieItemId() {
23217
      return __isset_bit_vector.get(__FREEBIEITEMID_ISSET_ID);
23218
    }
23219
 
23220
    public void setFreebieItemIdIsSet(boolean value) {
23221
      __isset_bit_vector.set(__FREEBIEITEMID_ISSET_ID, value);
23222
    }
23223
 
23224
    /**
23225
     * 
23226
     * @see ScanType
23227
     */
23228
    public ScanType getScanType() {
23229
      return this.scanType;
23230
    }
23231
 
23232
    /**
23233
     * 
23234
     * @see ScanType
23235
     */
23236
    public void setScanType(ScanType scanType) {
23237
      this.scanType = scanType;
23238
    }
23239
 
23240
    public void unsetScanType() {
23241
      this.scanType = null;
23242
    }
23243
 
23244
    /** Returns true if field scanType is set (has been assigned a value) and false otherwise */
23245
    public boolean isSetScanType() {
23246
      return this.scanType != null;
23247
    }
23248
 
23249
    public void setScanTypeIsSet(boolean value) {
23250
      if (!value) {
23251
        this.scanType = null;
23252
      }
23253
    }
23254
 
23255
    public void setFieldValue(_Fields field, Object value) {
23256
      switch (field) {
23257
      case OLD_ORDER_ID:
23258
        if (value == null) {
23259
          unsetOldOrderId();
23260
        } else {
23261
          setOldOrderId((Long)value);
23262
        }
23263
        break;
23264
 
23265
      case NEW_ORDER_ID:
23266
        if (value == null) {
23267
          unsetNewOrderId();
23268
        } else {
23269
          setNewOrderId((Long)value);
23270
        }
23271
        break;
23272
 
23273
      case FREEBIE_ITEM_ID:
23274
        if (value == null) {
23275
          unsetFreebieItemId();
23276
        } else {
23277
          setFreebieItemId((Long)value);
23278
        }
23279
        break;
23280
 
23281
      case SCAN_TYPE:
23282
        if (value == null) {
23283
          unsetScanType();
23284
        } else {
23285
          setScanType((ScanType)value);
23286
        }
23287
        break;
23288
 
23289
      }
23290
    }
23291
 
23292
    public Object getFieldValue(_Fields field) {
23293
      switch (field) {
23294
      case OLD_ORDER_ID:
23295
        return Long.valueOf(getOldOrderId());
23296
 
23297
      case NEW_ORDER_ID:
23298
        return Long.valueOf(getNewOrderId());
23299
 
23300
      case FREEBIE_ITEM_ID:
23301
        return Long.valueOf(getFreebieItemId());
23302
 
23303
      case SCAN_TYPE:
23304
        return getScanType();
23305
 
23306
      }
23307
      throw new IllegalStateException();
23308
    }
23309
 
23310
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
23311
    public boolean isSet(_Fields field) {
23312
      if (field == null) {
23313
        throw new IllegalArgumentException();
23314
      }
23315
 
23316
      switch (field) {
23317
      case OLD_ORDER_ID:
23318
        return isSetOldOrderId();
23319
      case NEW_ORDER_ID:
23320
        return isSetNewOrderId();
23321
      case FREEBIE_ITEM_ID:
23322
        return isSetFreebieItemId();
23323
      case SCAN_TYPE:
23324
        return isSetScanType();
23325
      }
23326
      throw new IllegalStateException();
23327
    }
23328
 
23329
    @Override
23330
    public boolean equals(Object that) {
23331
      if (that == null)
23332
        return false;
23333
      if (that instanceof reshipfreebie_args)
23334
        return this.equals((reshipfreebie_args)that);
23335
      return false;
23336
    }
23337
 
23338
    public boolean equals(reshipfreebie_args that) {
23339
      if (that == null)
23340
        return false;
23341
 
23342
      boolean this_present_oldOrderId = true;
23343
      boolean that_present_oldOrderId = true;
23344
      if (this_present_oldOrderId || that_present_oldOrderId) {
23345
        if (!(this_present_oldOrderId && that_present_oldOrderId))
23346
          return false;
23347
        if (this.oldOrderId != that.oldOrderId)
23348
          return false;
23349
      }
23350
 
23351
      boolean this_present_newOrderId = true;
23352
      boolean that_present_newOrderId = true;
23353
      if (this_present_newOrderId || that_present_newOrderId) {
23354
        if (!(this_present_newOrderId && that_present_newOrderId))
23355
          return false;
23356
        if (this.newOrderId != that.newOrderId)
23357
          return false;
23358
      }
23359
 
23360
      boolean this_present_freebieItemId = true;
23361
      boolean that_present_freebieItemId = true;
23362
      if (this_present_freebieItemId || that_present_freebieItemId) {
23363
        if (!(this_present_freebieItemId && that_present_freebieItemId))
23364
          return false;
23365
        if (this.freebieItemId != that.freebieItemId)
23366
          return false;
23367
      }
23368
 
23369
      boolean this_present_scanType = true && this.isSetScanType();
23370
      boolean that_present_scanType = true && that.isSetScanType();
23371
      if (this_present_scanType || that_present_scanType) {
23372
        if (!(this_present_scanType && that_present_scanType))
23373
          return false;
23374
        if (!this.scanType.equals(that.scanType))
23375
          return false;
23376
      }
23377
 
23378
      return true;
23379
    }
23380
 
23381
    @Override
23382
    public int hashCode() {
23383
      return 0;
23384
    }
23385
 
23386
    public int compareTo(reshipfreebie_args other) {
23387
      if (!getClass().equals(other.getClass())) {
23388
        return getClass().getName().compareTo(other.getClass().getName());
23389
      }
23390
 
23391
      int lastComparison = 0;
23392
      reshipfreebie_args typedOther = (reshipfreebie_args)other;
23393
 
23394
      lastComparison = Boolean.valueOf(isSetOldOrderId()).compareTo(typedOther.isSetOldOrderId());
23395
      if (lastComparison != 0) {
23396
        return lastComparison;
23397
      }
23398
      if (isSetOldOrderId()) {
23399
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.oldOrderId, typedOther.oldOrderId);
23400
        if (lastComparison != 0) {
23401
          return lastComparison;
23402
        }
23403
      }
23404
      lastComparison = Boolean.valueOf(isSetNewOrderId()).compareTo(typedOther.isSetNewOrderId());
23405
      if (lastComparison != 0) {
23406
        return lastComparison;
23407
      }
23408
      if (isSetNewOrderId()) {
23409
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newOrderId, typedOther.newOrderId);
23410
        if (lastComparison != 0) {
23411
          return lastComparison;
23412
        }
23413
      }
23414
      lastComparison = Boolean.valueOf(isSetFreebieItemId()).compareTo(typedOther.isSetFreebieItemId());
23415
      if (lastComparison != 0) {
23416
        return lastComparison;
23417
      }
23418
      if (isSetFreebieItemId()) {
23419
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freebieItemId, typedOther.freebieItemId);
23420
        if (lastComparison != 0) {
23421
          return lastComparison;
23422
        }
23423
      }
23424
      lastComparison = Boolean.valueOf(isSetScanType()).compareTo(typedOther.isSetScanType());
23425
      if (lastComparison != 0) {
23426
        return lastComparison;
23427
      }
23428
      if (isSetScanType()) {
23429
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scanType, typedOther.scanType);
23430
        if (lastComparison != 0) {
23431
          return lastComparison;
23432
        }
23433
      }
23434
      return 0;
23435
    }
23436
 
23437
    public _Fields fieldForId(int fieldId) {
23438
      return _Fields.findByThriftId(fieldId);
23439
    }
23440
 
23441
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
23442
      org.apache.thrift.protocol.TField field;
23443
      iprot.readStructBegin();
23444
      while (true)
23445
      {
23446
        field = iprot.readFieldBegin();
23447
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
23448
          break;
23449
        }
23450
        switch (field.id) {
23451
          case 1: // OLD_ORDER_ID
23452
            if (field.type == org.apache.thrift.protocol.TType.I64) {
23453
              this.oldOrderId = iprot.readI64();
23454
              setOldOrderIdIsSet(true);
23455
            } else { 
23456
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23457
            }
23458
            break;
23459
          case 2: // NEW_ORDER_ID
23460
            if (field.type == org.apache.thrift.protocol.TType.I64) {
23461
              this.newOrderId = iprot.readI64();
23462
              setNewOrderIdIsSet(true);
23463
            } else { 
23464
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23465
            }
23466
            break;
23467
          case 3: // FREEBIE_ITEM_ID
23468
            if (field.type == org.apache.thrift.protocol.TType.I64) {
23469
              this.freebieItemId = iprot.readI64();
23470
              setFreebieItemIdIsSet(true);
23471
            } else { 
23472
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23473
            }
23474
            break;
23475
          case 4: // SCAN_TYPE
23476
            if (field.type == org.apache.thrift.protocol.TType.I32) {
23477
              this.scanType = ScanType.findByValue(iprot.readI32());
23478
            } else { 
23479
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23480
            }
23481
            break;
23482
          default:
23483
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23484
        }
23485
        iprot.readFieldEnd();
23486
      }
23487
      iprot.readStructEnd();
23488
      validate();
23489
    }
23490
 
23491
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
23492
      validate();
23493
 
23494
      oprot.writeStructBegin(STRUCT_DESC);
23495
      oprot.writeFieldBegin(OLD_ORDER_ID_FIELD_DESC);
23496
      oprot.writeI64(this.oldOrderId);
23497
      oprot.writeFieldEnd();
23498
      oprot.writeFieldBegin(NEW_ORDER_ID_FIELD_DESC);
23499
      oprot.writeI64(this.newOrderId);
23500
      oprot.writeFieldEnd();
23501
      oprot.writeFieldBegin(FREEBIE_ITEM_ID_FIELD_DESC);
23502
      oprot.writeI64(this.freebieItemId);
23503
      oprot.writeFieldEnd();
23504
      if (this.scanType != null) {
23505
        oprot.writeFieldBegin(SCAN_TYPE_FIELD_DESC);
23506
        oprot.writeI32(this.scanType.getValue());
23507
        oprot.writeFieldEnd();
23508
      }
23509
      oprot.writeFieldStop();
23510
      oprot.writeStructEnd();
23511
    }
23512
 
23513
    @Override
23514
    public String toString() {
23515
      StringBuilder sb = new StringBuilder("reshipfreebie_args(");
23516
      boolean first = true;
23517
 
23518
      sb.append("oldOrderId:");
23519
      sb.append(this.oldOrderId);
23520
      first = false;
23521
      if (!first) sb.append(", ");
23522
      sb.append("newOrderId:");
23523
      sb.append(this.newOrderId);
23524
      first = false;
23525
      if (!first) sb.append(", ");
23526
      sb.append("freebieItemId:");
23527
      sb.append(this.freebieItemId);
23528
      first = false;
23529
      if (!first) sb.append(", ");
23530
      sb.append("scanType:");
23531
      if (this.scanType == null) {
23532
        sb.append("null");
23533
      } else {
23534
        sb.append(this.scanType);
23535
      }
23536
      first = false;
23537
      sb.append(")");
23538
      return sb.toString();
23539
    }
23540
 
23541
    public void validate() throws org.apache.thrift.TException {
23542
      // check for required fields
23543
    }
23544
 
23545
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
23546
      try {
23547
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
23548
      } catch (org.apache.thrift.TException te) {
23549
        throw new java.io.IOException(te);
23550
      }
23551
    }
23552
 
23553
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
23554
      try {
23555
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
23556
        __isset_bit_vector = new BitSet(1);
23557
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
23558
      } catch (org.apache.thrift.TException te) {
23559
        throw new java.io.IOException(te);
23560
      }
23561
    }
23562
 
23563
  }
23564
 
23565
  public static class reshipfreebie_result implements org.apache.thrift.TBase<reshipfreebie_result, reshipfreebie_result._Fields>, java.io.Serializable, Cloneable   {
23566
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("reshipfreebie_result");
23567
 
23568
    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);
23569
 
23570
    private WarehouseServiceException wex; // required
23571
 
23572
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23573
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
23574
      WEX((short)1, "wex");
23575
 
23576
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23577
 
23578
      static {
23579
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23580
          byName.put(field.getFieldName(), field);
23581
        }
23582
      }
23583
 
23584
      /**
23585
       * Find the _Fields constant that matches fieldId, or null if its not found.
23586
       */
23587
      public static _Fields findByThriftId(int fieldId) {
23588
        switch(fieldId) {
23589
          case 1: // WEX
23590
            return WEX;
23591
          default:
23592
            return null;
23593
        }
23594
      }
23595
 
23596
      /**
23597
       * Find the _Fields constant that matches fieldId, throwing an exception
23598
       * if it is not found.
23599
       */
23600
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23601
        _Fields fields = findByThriftId(fieldId);
23602
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23603
        return fields;
23604
      }
23605
 
23606
      /**
23607
       * Find the _Fields constant that matches name, or null if its not found.
23608
       */
23609
      public static _Fields findByName(String name) {
23610
        return byName.get(name);
23611
      }
23612
 
23613
      private final short _thriftId;
23614
      private final String _fieldName;
23615
 
23616
      _Fields(short thriftId, String fieldName) {
23617
        _thriftId = thriftId;
23618
        _fieldName = fieldName;
23619
      }
23620
 
23621
      public short getThriftFieldId() {
23622
        return _thriftId;
23623
      }
23624
 
23625
      public String getFieldName() {
23626
        return _fieldName;
23627
      }
23628
    }
23629
 
23630
    // isset id assignments
23631
 
23632
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
23633
    static {
23634
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
23635
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23636
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
23637
      metaDataMap = Collections.unmodifiableMap(tmpMap);
23638
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(reshipfreebie_result.class, metaDataMap);
23639
    }
23640
 
23641
    public reshipfreebie_result() {
23642
    }
23643
 
23644
    public reshipfreebie_result(
23645
      WarehouseServiceException wex)
23646
    {
23647
      this();
23648
      this.wex = wex;
23649
    }
23650
 
23651
    /**
23652
     * Performs a deep copy on <i>other</i>.
23653
     */
23654
    public reshipfreebie_result(reshipfreebie_result other) {
23655
      if (other.isSetWex()) {
23656
        this.wex = new WarehouseServiceException(other.wex);
23657
      }
23658
    }
23659
 
23660
    public reshipfreebie_result deepCopy() {
23661
      return new reshipfreebie_result(this);
23662
    }
23663
 
23664
    @Override
23665
    public void clear() {
23666
      this.wex = null;
23667
    }
23668
 
23669
    public WarehouseServiceException getWex() {
23670
      return this.wex;
23671
    }
23672
 
23673
    public void setWex(WarehouseServiceException wex) {
23674
      this.wex = wex;
23675
    }
23676
 
23677
    public void unsetWex() {
23678
      this.wex = null;
23679
    }
23680
 
23681
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
23682
    public boolean isSetWex() {
23683
      return this.wex != null;
23684
    }
23685
 
23686
    public void setWexIsSet(boolean value) {
23687
      if (!value) {
23688
        this.wex = null;
23689
      }
23690
    }
23691
 
23692
    public void setFieldValue(_Fields field, Object value) {
23693
      switch (field) {
23694
      case WEX:
23695
        if (value == null) {
23696
          unsetWex();
23697
        } else {
23698
          setWex((WarehouseServiceException)value);
23699
        }
23700
        break;
23701
 
23702
      }
23703
    }
23704
 
23705
    public Object getFieldValue(_Fields field) {
23706
      switch (field) {
23707
      case WEX:
23708
        return getWex();
23709
 
23710
      }
23711
      throw new IllegalStateException();
23712
    }
23713
 
23714
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
23715
    public boolean isSet(_Fields field) {
23716
      if (field == null) {
23717
        throw new IllegalArgumentException();
23718
      }
23719
 
23720
      switch (field) {
23721
      case WEX:
23722
        return isSetWex();
23723
      }
23724
      throw new IllegalStateException();
23725
    }
23726
 
23727
    @Override
23728
    public boolean equals(Object that) {
23729
      if (that == null)
23730
        return false;
23731
      if (that instanceof reshipfreebie_result)
23732
        return this.equals((reshipfreebie_result)that);
23733
      return false;
23734
    }
23735
 
23736
    public boolean equals(reshipfreebie_result that) {
23737
      if (that == null)
23738
        return false;
23739
 
23740
      boolean this_present_wex = true && this.isSetWex();
23741
      boolean that_present_wex = true && that.isSetWex();
23742
      if (this_present_wex || that_present_wex) {
23743
        if (!(this_present_wex && that_present_wex))
23744
          return false;
23745
        if (!this.wex.equals(that.wex))
23746
          return false;
23747
      }
23748
 
23749
      return true;
23750
    }
23751
 
23752
    @Override
23753
    public int hashCode() {
23754
      return 0;
23755
    }
23756
 
23757
    public int compareTo(reshipfreebie_result other) {
23758
      if (!getClass().equals(other.getClass())) {
23759
        return getClass().getName().compareTo(other.getClass().getName());
23760
      }
23761
 
23762
      int lastComparison = 0;
23763
      reshipfreebie_result typedOther = (reshipfreebie_result)other;
23764
 
23765
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
23766
      if (lastComparison != 0) {
23767
        return lastComparison;
23768
      }
23769
      if (isSetWex()) {
23770
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
23771
        if (lastComparison != 0) {
23772
          return lastComparison;
23773
        }
23774
      }
23775
      return 0;
23776
    }
23777
 
23778
    public _Fields fieldForId(int fieldId) {
23779
      return _Fields.findByThriftId(fieldId);
23780
    }
23781
 
23782
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
23783
      org.apache.thrift.protocol.TField field;
23784
      iprot.readStructBegin();
23785
      while (true)
23786
      {
23787
        field = iprot.readFieldBegin();
23788
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
23789
          break;
23790
        }
23791
        switch (field.id) {
23792
          case 1: // WEX
23793
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
23794
              this.wex = new WarehouseServiceException();
23795
              this.wex.read(iprot);
23796
            } else { 
23797
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23798
            }
23799
            break;
23800
          default:
23801
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23802
        }
23803
        iprot.readFieldEnd();
23804
      }
23805
      iprot.readStructEnd();
23806
      validate();
23807
    }
23808
 
23809
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
23810
      oprot.writeStructBegin(STRUCT_DESC);
23811
 
23812
      if (this.isSetWex()) {
23813
        oprot.writeFieldBegin(WEX_FIELD_DESC);
23814
        this.wex.write(oprot);
23815
        oprot.writeFieldEnd();
23816
      }
23817
      oprot.writeFieldStop();
23818
      oprot.writeStructEnd();
23819
    }
23820
 
23821
    @Override
23822
    public String toString() {
23823
      StringBuilder sb = new StringBuilder("reshipfreebie_result(");
23824
      boolean first = true;
23825
 
23826
      sb.append("wex:");
23827
      if (this.wex == null) {
23828
        sb.append("null");
23829
      } else {
23830
        sb.append(this.wex);
23831
      }
23832
      first = false;
23833
      sb.append(")");
23834
      return sb.toString();
23835
    }
23836
 
23837
    public void validate() throws org.apache.thrift.TException {
23838
      // check for required fields
23839
    }
23840
 
23841
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
23842
      try {
23843
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
23844
      } catch (org.apache.thrift.TException te) {
23845
        throw new java.io.IOException(te);
23846
      }
23847
    }
23848
 
23849
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
23850
      try {
23851
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
23852
      } catch (org.apache.thrift.TException te) {
23853
        throw new java.io.IOException(te);
23854
      }
23855
    }
23856
 
23857
  }
23858
 
2820 chandransh 23859
}