Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
2820 chandransh 1
/**
3430 rajveer 2
 * Autogenerated by Thrift Compiler (0.7.0)
2820 chandransh 3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.warehouse;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
3430 rajveer 18
import java.nio.ByteBuffer;
2820 chandransh 19
import java.util.Arrays;
20
import org.slf4j.Logger;
21
import org.slf4j.LoggerFactory;
22
 
23
public class WarehouseService {
24
 
3374 rajveer 25
  public interface Iface extends in.shop2020.generic.GenericService.Iface {
2820 chandransh 26
 
27
    /**
4496 mandeep.dh 28
     * Retrieves serialized inventory item given a serial number
2832 chandransh 29
     * 
4496 mandeep.dh 30
     * @param serialNumber
2832 chandransh 31
     */
4541 mandeep.dh 32
    public InventoryItem getInventoryItem(String serialNumber) throws WarehouseServiceException, org.apache.thrift.TException;
2832 chandransh 33
 
34
    /**
5361 mandeep.dh 35
     * Retrieves non-serialized inventory item from a given supplier
2820 chandransh 36
     * 
5530 mandeep.dh 37
     * @param itemNumber
4496 mandeep.dh 38
     * @param itemId
5530 mandeep.dh 39
     * @param fulfilmentWarehouseId
2820 chandransh 40
     */
5530 mandeep.dh 41
    public InventoryItem getNonSeralizedInventoryItem(String itemNumber, long itemId, long fulfilmentWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException;
2820 chandransh 42
 
43
    /**
4496 mandeep.dh 44
     * Scan non-serialized items.
2820 chandransh 45
     * 
5361 mandeep.dh 46
     * @param inventoryItem
2820 chandransh 47
     * @param type
4496 mandeep.dh 48
     * @param quantity
5361 mandeep.dh 49
     * @param billingWarehouseId
2820 chandransh 50
     */
5361 mandeep.dh 51
    public void scan(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException;
2820 chandransh 52
 
4496 mandeep.dh 53
    /**
54
     * Scan serialized items linked with an order. Returns its price.
55
     * 
4555 mandeep.dh 56
     * @param serialNumber
4496 mandeep.dh 57
     * @param type
58
     * @param orderId
5110 mandeep.dh 59
     * @param fulfilmentWarehouseId
60
     * @param quantity
61
     * @param billingWarehouseId
4496 mandeep.dh 62
     */
5110 mandeep.dh 63
    public InventoryItem scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException;
4496 mandeep.dh 64
 
65
    /**
66
     * Scan non-serialized items linked with an order.
67
     * 
5361 mandeep.dh 68
     * @param inventoryItem
4496 mandeep.dh 69
     * @param type
70
     * @param quantity
71
     * @param orderId
5110 mandeep.dh 72
     * @param fulfilmentWarehouseId
5361 mandeep.dh 73
     * @param billingWarehouseId
4496 mandeep.dh 74
     */
5361 mandeep.dh 75
    public InventoryItem scanForOrder(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException;
4496 mandeep.dh 76
 
77
    /**
78
     * Created item number to item id mapping
79
     * 
80
     * @param itemNumber
81
     * @param itemId
82
     */
83
    public void createItemNumberMapping(String itemNumber, long itemId) throws org.apache.thrift.TException;
84
 
4622 amit.gupta 85
    /**
86
     * Get itemNumber mappings for itemId
87
     * 
88
     * @param itemId
89
     */
90
    public List<String> getItemNumbers(long itemId) throws org.apache.thrift.TException;
91
 
5110 mandeep.dh 92
    /**
93
     * Gets item ids for a given item number
94
     * 
95
     * @param itemNumber
96
     */
97
    public List<Long> getItemIds(String itemNumber) throws org.apache.thrift.TException;
98
 
5185 mandeep.dh 99
    /**
100
     * Retrieves all inventory items given a last scan type
101
     * 
102
     * @param lastScanType
103
     */
104
    public List<InventoryItem> getInventoryItemsFromLastScanType(ScanType lastScanType) throws WarehouseServiceException, org.apache.thrift.TException;
105
 
106
    /**
107
     * Retrieves inventory item given a inventoryItem id
108
     * 
109
     * @param inventoryItemId
110
     */
111
    public InventoryItem getInventoryItemFromId(long inventoryItemId) throws WarehouseServiceException, org.apache.thrift.TException;
112
 
5372 mandeep.dh 113
    /**
114
     * Returns the purchase scans grouped by items for Purchase register reconciliation
115
     * 
116
     * @param startDate
117
     * @param endDate
118
     */
119
    public List<DetailedPurchaseScan> getPurchaseScans(long startDate, long endDate) throws org.apache.thrift.TException;
120
 
5496 mandeep.dh 121
    /**
122
     * Returns the invoices and the count of scans against on a given day.
123
     * 
124
     * @param date
125
     */
126
    public List<InvoiceScan> fetchScansPerInvoiceNumber(long date) throws org.apache.thrift.TException;
127
 
5620 mandeep.dh 128
    /**
129
     * Returns inventory item for a given order
130
     * 
131
     * @param orderId
132
     */
133
    public InventoryItem getInventoryItemFromOrder(long orderId) throws WarehouseServiceException, org.apache.thrift.TException;
134
 
5711 mandeep.dh 135
    /**
136
     * Fetches the stock inventory age week-wise
137
     */
138
    public List<InventoryAge> getInventoryAge() throws org.apache.thrift.TException;
139
 
6322 amar.kumar 140
    /**
141
     * Fetches the scanRecords for a given item for a given time interval
142
     * 
143
     * @param itemId
144
     * @param fromDate
145
     * @param toDate
146
     */
147
    public List<Scan> getInventoryScansForItem(long itemId, long fromDate, long toDate) throws org.apache.thrift.TException;
148
 
149
    /**
150
     * Fetches the scanRecords for a given serialNumber for a given time interval
151
     * 
152
     * @param serialNumber
153
     */
154
    public List<Scan> getScanRecordsForSerialNumber(long serialNumber) throws org.apache.thrift.TException;
155
 
2820 chandransh 156
  }
157
 
3430 rajveer 158
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
159
 
4496 mandeep.dh 160
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 161
 
5530 mandeep.dh 162
    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 163
 
5361 mandeep.dh 164
    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 165
 
5110 mandeep.dh 166
    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 167
 
5361 mandeep.dh 168
    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 169
 
170
    public void createItemNumberMapping(String itemNumber, long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createItemNumberMapping_call> resultHandler) throws org.apache.thrift.TException;
171
 
4622 amit.gupta 172
    public void getItemNumbers(long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemNumbers_call> resultHandler) throws org.apache.thrift.TException;
173
 
5110 mandeep.dh 174
    public void getItemIds(String itemNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemIds_call> resultHandler) throws org.apache.thrift.TException;
175
 
5185 mandeep.dh 176
    public void getInventoryItemsFromLastScanType(ScanType lastScanType, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemsFromLastScanType_call> resultHandler) throws org.apache.thrift.TException;
177
 
178
    public void getInventoryItemFromId(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemFromId_call> resultHandler) throws org.apache.thrift.TException;
179
 
5372 mandeep.dh 180
    public void getPurchaseScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseScans_call> resultHandler) throws org.apache.thrift.TException;
181
 
5496 mandeep.dh 182
    public void fetchScansPerInvoiceNumber(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fetchScansPerInvoiceNumber_call> resultHandler) throws org.apache.thrift.TException;
183
 
5620 mandeep.dh 184
    public void getInventoryItemFromOrder(long orderId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemFromOrder_call> resultHandler) throws org.apache.thrift.TException;
185
 
5711 mandeep.dh 186
    public void getInventoryAge(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryAge_call> resultHandler) throws org.apache.thrift.TException;
187
 
6322 amar.kumar 188
    public void getInventoryScansForItem(long itemId, long fromDate, long toDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryScansForItem_call> resultHandler) throws org.apache.thrift.TException;
189
 
190
    public void getScanRecordsForSerialNumber(long serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getScanRecordsForSerialNumber_call> resultHandler) throws org.apache.thrift.TException;
191
 
3430 rajveer 192
  }
193
 
3374 rajveer 194
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
3430 rajveer 195
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
196
      public Factory() {}
197
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
198
        return new Client(prot);
199
      }
200
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
201
        return new Client(iprot, oprot);
202
      }
203
    }
204
 
205
    public Client(org.apache.thrift.protocol.TProtocol prot)
2820 chandransh 206
    {
3430 rajveer 207
      super(prot, prot);
2820 chandransh 208
    }
209
 
3430 rajveer 210
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
3374 rajveer 211
      super(iprot, oprot);
2820 chandransh 212
    }
213
 
4541 mandeep.dh 214
    public InventoryItem getInventoryItem(String serialNumber) throws WarehouseServiceException, org.apache.thrift.TException
2832 chandransh 215
    {
4496 mandeep.dh 216
      send_getInventoryItem(serialNumber);
217
      return recv_getInventoryItem();
2832 chandransh 218
    }
219
 
4496 mandeep.dh 220
    public void send_getInventoryItem(String serialNumber) throws org.apache.thrift.TException
2832 chandransh 221
    {
4496 mandeep.dh 222
      getInventoryItem_args args = new getInventoryItem_args();
223
      args.setSerialNumber(serialNumber);
224
      sendBase("getInventoryItem", args);
2832 chandransh 225
    }
226
 
4541 mandeep.dh 227
    public InventoryItem recv_getInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException
2832 chandransh 228
    {
4496 mandeep.dh 229
      getInventoryItem_result result = new getInventoryItem_result();
230
      receiveBase(result, "getInventoryItem");
2832 chandransh 231
      if (result.isSetSuccess()) {
232
        return result.success;
233
      }
4541 mandeep.dh 234
      if (result.wex != null) {
235
        throw result.wex;
236
      }
4496 mandeep.dh 237
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItem failed: unknown result");
238
    }
239
 
5530 mandeep.dh 240
    public InventoryItem getNonSeralizedInventoryItem(String itemNumber, long itemId, long fulfilmentWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 241
    {
5530 mandeep.dh 242
      send_getNonSeralizedInventoryItem(itemNumber, itemId, fulfilmentWarehouseId);
5361 mandeep.dh 243
      return recv_getNonSeralizedInventoryItem();
4496 mandeep.dh 244
    }
245
 
5530 mandeep.dh 246
    public void send_getNonSeralizedInventoryItem(String itemNumber, long itemId, long fulfilmentWarehouseId) throws org.apache.thrift.TException
4496 mandeep.dh 247
    {
5361 mandeep.dh 248
      getNonSeralizedInventoryItem_args args = new getNonSeralizedInventoryItem_args();
5530 mandeep.dh 249
      args.setItemNumber(itemNumber);
4496 mandeep.dh 250
      args.setItemId(itemId);
5530 mandeep.dh 251
      args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
5361 mandeep.dh 252
      sendBase("getNonSeralizedInventoryItem", args);
4496 mandeep.dh 253
    }
254
 
5361 mandeep.dh 255
    public InventoryItem recv_getNonSeralizedInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 256
    {
5361 mandeep.dh 257
      getNonSeralizedInventoryItem_result result = new getNonSeralizedInventoryItem_result();
258
      receiveBase(result, "getNonSeralizedInventoryItem");
4496 mandeep.dh 259
      if (result.isSetSuccess()) {
260
        return result.success;
2832 chandransh 261
      }
5361 mandeep.dh 262
      if (result.wex != null) {
263
        throw result.wex;
2820 chandransh 264
      }
5361 mandeep.dh 265
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getNonSeralizedInventoryItem failed: unknown result");
4496 mandeep.dh 266
    }
267
 
5361 mandeep.dh 268
    public void scan(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 269
    {
5361 mandeep.dh 270
      send_scan(inventoryItem, type, quantity, billingWarehouseId);
4496 mandeep.dh 271
      recv_scan();
3383 chandransh 272
    }
273
 
5361 mandeep.dh 274
    public void send_scan(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId) throws org.apache.thrift.TException
3383 chandransh 275
    {
4496 mandeep.dh 276
      scan_args args = new scan_args();
5361 mandeep.dh 277
      args.setInventoryItem(inventoryItem);
4496 mandeep.dh 278
      args.setType(type);
279
      args.setQuantity(quantity);
5361 mandeep.dh 280
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 281
      sendBase("scan", args);
3383 chandransh 282
    }
283
 
4496 mandeep.dh 284
    public void recv_scan() throws WarehouseServiceException, org.apache.thrift.TException
3383 chandransh 285
    {
4496 mandeep.dh 286
      scan_result result = new scan_result();
287
      receiveBase(result, "scan");
288
      if (result.wex != null) {
289
        throw result.wex;
290
      }
291
      return;
292
    }
293
 
5110 mandeep.dh 294
    public InventoryItem scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 295
    {
5110 mandeep.dh 296
      send_scanSerializedItemForOrder(serialNumber, type, orderId, fulfilmentWarehouseId, quantity, billingWarehouseId);
4496 mandeep.dh 297
      return recv_scanSerializedItemForOrder();
298
    }
299
 
5110 mandeep.dh 300
    public void send_scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId) throws org.apache.thrift.TException
4496 mandeep.dh 301
    {
302
      scanSerializedItemForOrder_args args = new scanSerializedItemForOrder_args();
4555 mandeep.dh 303
      args.setSerialNumber(serialNumber);
4496 mandeep.dh 304
      args.setType(type);
305
      args.setOrderId(orderId);
5110 mandeep.dh 306
      args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
307
      args.setQuantity(quantity);
308
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 309
      sendBase("scanSerializedItemForOrder", args);
310
    }
311
 
4555 mandeep.dh 312
    public InventoryItem recv_scanSerializedItemForOrder() throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 313
    {
314
      scanSerializedItemForOrder_result result = new scanSerializedItemForOrder_result();
315
      receiveBase(result, "scanSerializedItemForOrder");
3383 chandransh 316
      if (result.isSetSuccess()) {
317
        return result.success;
318
      }
319
      if (result.wex != null) {
320
        throw result.wex;
321
      }
4496 mandeep.dh 322
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scanSerializedItemForOrder failed: unknown result");
3383 chandransh 323
    }
324
 
5361 mandeep.dh 325
    public InventoryItem scanForOrder(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
3383 chandransh 326
    {
5361 mandeep.dh 327
      send_scanForOrder(inventoryItem, type, quantity, orderId, fulfilmentWarehouseId, billingWarehouseId);
328
      return recv_scanForOrder();
2820 chandransh 329
    }
330
 
5361 mandeep.dh 331
    public void send_scanForOrder(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId) throws org.apache.thrift.TException
2820 chandransh 332
    {
4496 mandeep.dh 333
      scanForOrder_args args = new scanForOrder_args();
5361 mandeep.dh 334
      args.setInventoryItem(inventoryItem);
3430 rajveer 335
      args.setType(type);
4496 mandeep.dh 336
      args.setQuantity(quantity);
337
      args.setOrderId(orderId);
5110 mandeep.dh 338
      args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
5361 mandeep.dh 339
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 340
      sendBase("scanForOrder", args);
2820 chandransh 341
    }
342
 
5361 mandeep.dh 343
    public InventoryItem recv_scanForOrder() throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 344
    {
4496 mandeep.dh 345
      scanForOrder_result result = new scanForOrder_result();
346
      receiveBase(result, "scanForOrder");
5361 mandeep.dh 347
      if (result.isSetSuccess()) {
348
        return result.success;
349
      }
2820 chandransh 350
      if (result.wex != null) {
351
        throw result.wex;
352
      }
5361 mandeep.dh 353
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scanForOrder failed: unknown result");
2820 chandransh 354
    }
355
 
4496 mandeep.dh 356
    public void createItemNumberMapping(String itemNumber, long itemId) throws org.apache.thrift.TException
2820 chandransh 357
    {
4496 mandeep.dh 358
      send_createItemNumberMapping(itemNumber, itemId);
359
      recv_createItemNumberMapping();
2820 chandransh 360
    }
361
 
4496 mandeep.dh 362
    public void send_createItemNumberMapping(String itemNumber, long itemId) throws org.apache.thrift.TException
2820 chandransh 363
    {
4496 mandeep.dh 364
      createItemNumberMapping_args args = new createItemNumberMapping_args();
3430 rajveer 365
      args.setItemNumber(itemNumber);
4496 mandeep.dh 366
      args.setItemId(itemId);
367
      sendBase("createItemNumberMapping", args);
2820 chandransh 368
    }
369
 
4496 mandeep.dh 370
    public void recv_createItemNumberMapping() throws org.apache.thrift.TException
2820 chandransh 371
    {
4496 mandeep.dh 372
      createItemNumberMapping_result result = new createItemNumberMapping_result();
373
      receiveBase(result, "createItemNumberMapping");
2820 chandransh 374
      return;
375
    }
376
 
4622 amit.gupta 377
    public List<String> getItemNumbers(long itemId) throws org.apache.thrift.TException
378
    {
379
      send_getItemNumbers(itemId);
380
      return recv_getItemNumbers();
381
    }
382
 
383
    public void send_getItemNumbers(long itemId) throws org.apache.thrift.TException
384
    {
385
      getItemNumbers_args args = new getItemNumbers_args();
386
      args.setItemId(itemId);
387
      sendBase("getItemNumbers", args);
388
    }
389
 
390
    public List<String> recv_getItemNumbers() throws org.apache.thrift.TException
391
    {
392
      getItemNumbers_result result = new getItemNumbers_result();
393
      receiveBase(result, "getItemNumbers");
394
      if (result.isSetSuccess()) {
395
        return result.success;
396
      }
397
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemNumbers failed: unknown result");
398
    }
399
 
5110 mandeep.dh 400
    public List<Long> getItemIds(String itemNumber) throws org.apache.thrift.TException
401
    {
402
      send_getItemIds(itemNumber);
403
      return recv_getItemIds();
404
    }
405
 
406
    public void send_getItemIds(String itemNumber) throws org.apache.thrift.TException
407
    {
408
      getItemIds_args args = new getItemIds_args();
409
      args.setItemNumber(itemNumber);
410
      sendBase("getItemIds", args);
411
    }
412
 
413
    public List<Long> recv_getItemIds() throws org.apache.thrift.TException
414
    {
415
      getItemIds_result result = new getItemIds_result();
416
      receiveBase(result, "getItemIds");
417
      if (result.isSetSuccess()) {
418
        return result.success;
419
      }
420
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemIds failed: unknown result");
421
    }
422
 
5185 mandeep.dh 423
    public List<InventoryItem> getInventoryItemsFromLastScanType(ScanType lastScanType) throws WarehouseServiceException, org.apache.thrift.TException
424
    {
425
      send_getInventoryItemsFromLastScanType(lastScanType);
426
      return recv_getInventoryItemsFromLastScanType();
427
    }
428
 
429
    public void send_getInventoryItemsFromLastScanType(ScanType lastScanType) throws org.apache.thrift.TException
430
    {
431
      getInventoryItemsFromLastScanType_args args = new getInventoryItemsFromLastScanType_args();
432
      args.setLastScanType(lastScanType);
433
      sendBase("getInventoryItemsFromLastScanType", args);
434
    }
435
 
436
    public List<InventoryItem> recv_getInventoryItemsFromLastScanType() throws WarehouseServiceException, org.apache.thrift.TException
437
    {
438
      getInventoryItemsFromLastScanType_result result = new getInventoryItemsFromLastScanType_result();
439
      receiveBase(result, "getInventoryItemsFromLastScanType");
440
      if (result.isSetSuccess()) {
441
        return result.success;
442
      }
443
      if (result.wex != null) {
444
        throw result.wex;
445
      }
446
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItemsFromLastScanType failed: unknown result");
447
    }
448
 
449
    public InventoryItem getInventoryItemFromId(long inventoryItemId) throws WarehouseServiceException, org.apache.thrift.TException
450
    {
451
      send_getInventoryItemFromId(inventoryItemId);
452
      return recv_getInventoryItemFromId();
453
    }
454
 
455
    public void send_getInventoryItemFromId(long inventoryItemId) throws org.apache.thrift.TException
456
    {
457
      getInventoryItemFromId_args args = new getInventoryItemFromId_args();
458
      args.setInventoryItemId(inventoryItemId);
459
      sendBase("getInventoryItemFromId", args);
460
    }
461
 
462
    public InventoryItem recv_getInventoryItemFromId() throws WarehouseServiceException, org.apache.thrift.TException
463
    {
464
      getInventoryItemFromId_result result = new getInventoryItemFromId_result();
465
      receiveBase(result, "getInventoryItemFromId");
466
      if (result.isSetSuccess()) {
467
        return result.success;
468
      }
469
      if (result.wex != null) {
470
        throw result.wex;
471
      }
472
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItemFromId failed: unknown result");
473
    }
474
 
5372 mandeep.dh 475
    public List<DetailedPurchaseScan> getPurchaseScans(long startDate, long endDate) throws org.apache.thrift.TException
476
    {
477
      send_getPurchaseScans(startDate, endDate);
478
      return recv_getPurchaseScans();
479
    }
480
 
481
    public void send_getPurchaseScans(long startDate, long endDate) throws org.apache.thrift.TException
482
    {
483
      getPurchaseScans_args args = new getPurchaseScans_args();
484
      args.setStartDate(startDate);
485
      args.setEndDate(endDate);
486
      sendBase("getPurchaseScans", args);
487
    }
488
 
489
    public List<DetailedPurchaseScan> recv_getPurchaseScans() throws org.apache.thrift.TException
490
    {
491
      getPurchaseScans_result result = new getPurchaseScans_result();
492
      receiveBase(result, "getPurchaseScans");
493
      if (result.isSetSuccess()) {
494
        return result.success;
495
      }
496
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseScans failed: unknown result");
497
    }
498
 
5496 mandeep.dh 499
    public List<InvoiceScan> fetchScansPerInvoiceNumber(long date) throws org.apache.thrift.TException
500
    {
501
      send_fetchScansPerInvoiceNumber(date);
502
      return recv_fetchScansPerInvoiceNumber();
503
    }
504
 
505
    public void send_fetchScansPerInvoiceNumber(long date) throws org.apache.thrift.TException
506
    {
507
      fetchScansPerInvoiceNumber_args args = new fetchScansPerInvoiceNumber_args();
508
      args.setDate(date);
509
      sendBase("fetchScansPerInvoiceNumber", args);
510
    }
511
 
512
    public List<InvoiceScan> recv_fetchScansPerInvoiceNumber() throws org.apache.thrift.TException
513
    {
514
      fetchScansPerInvoiceNumber_result result = new fetchScansPerInvoiceNumber_result();
515
      receiveBase(result, "fetchScansPerInvoiceNumber");
516
      if (result.isSetSuccess()) {
517
        return result.success;
518
      }
519
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "fetchScansPerInvoiceNumber failed: unknown result");
520
    }
521
 
5620 mandeep.dh 522
    public InventoryItem getInventoryItemFromOrder(long orderId) throws WarehouseServiceException, org.apache.thrift.TException
523
    {
524
      send_getInventoryItemFromOrder(orderId);
525
      return recv_getInventoryItemFromOrder();
526
    }
527
 
528
    public void send_getInventoryItemFromOrder(long orderId) throws org.apache.thrift.TException
529
    {
530
      getInventoryItemFromOrder_args args = new getInventoryItemFromOrder_args();
531
      args.setOrderId(orderId);
532
      sendBase("getInventoryItemFromOrder", args);
533
    }
534
 
535
    public InventoryItem recv_getInventoryItemFromOrder() throws WarehouseServiceException, org.apache.thrift.TException
536
    {
537
      getInventoryItemFromOrder_result result = new getInventoryItemFromOrder_result();
538
      receiveBase(result, "getInventoryItemFromOrder");
539
      if (result.isSetSuccess()) {
540
        return result.success;
541
      }
542
      if (result.we != null) {
543
        throw result.we;
544
      }
545
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItemFromOrder failed: unknown result");
546
    }
547
 
5711 mandeep.dh 548
    public List<InventoryAge> getInventoryAge() throws org.apache.thrift.TException
549
    {
550
      send_getInventoryAge();
551
      return recv_getInventoryAge();
552
    }
553
 
554
    public void send_getInventoryAge() throws org.apache.thrift.TException
555
    {
556
      getInventoryAge_args args = new getInventoryAge_args();
557
      sendBase("getInventoryAge", args);
558
    }
559
 
560
    public List<InventoryAge> recv_getInventoryAge() throws org.apache.thrift.TException
561
    {
562
      getInventoryAge_result result = new getInventoryAge_result();
563
      receiveBase(result, "getInventoryAge");
564
      if (result.isSetSuccess()) {
565
        return result.success;
566
      }
567
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryAge failed: unknown result");
568
    }
569
 
6322 amar.kumar 570
    public List<Scan> getInventoryScansForItem(long itemId, long fromDate, long toDate) throws org.apache.thrift.TException
571
    {
572
      send_getInventoryScansForItem(itemId, fromDate, toDate);
573
      return recv_getInventoryScansForItem();
574
    }
575
 
576
    public void send_getInventoryScansForItem(long itemId, long fromDate, long toDate) throws org.apache.thrift.TException
577
    {
578
      getInventoryScansForItem_args args = new getInventoryScansForItem_args();
579
      args.setItemId(itemId);
580
      args.setFromDate(fromDate);
581
      args.setToDate(toDate);
582
      sendBase("getInventoryScansForItem", args);
583
    }
584
 
585
    public List<Scan> recv_getInventoryScansForItem() throws org.apache.thrift.TException
586
    {
587
      getInventoryScansForItem_result result = new getInventoryScansForItem_result();
588
      receiveBase(result, "getInventoryScansForItem");
589
      if (result.isSetSuccess()) {
590
        return result.success;
591
      }
592
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryScansForItem failed: unknown result");
593
    }
594
 
595
    public List<Scan> getScanRecordsForSerialNumber(long serialNumber) throws org.apache.thrift.TException
596
    {
597
      send_getScanRecordsForSerialNumber(serialNumber);
598
      return recv_getScanRecordsForSerialNumber();
599
    }
600
 
601
    public void send_getScanRecordsForSerialNumber(long serialNumber) throws org.apache.thrift.TException
602
    {
603
      getScanRecordsForSerialNumber_args args = new getScanRecordsForSerialNumber_args();
604
      args.setSerialNumber(serialNumber);
605
      sendBase("getScanRecordsForSerialNumber", args);
606
    }
607
 
608
    public List<Scan> recv_getScanRecordsForSerialNumber() throws org.apache.thrift.TException
609
    {
610
      getScanRecordsForSerialNumber_result result = new getScanRecordsForSerialNumber_result();
611
      receiveBase(result, "getScanRecordsForSerialNumber");
612
      if (result.isSetSuccess()) {
613
        return result.success;
614
      }
615
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getScanRecordsForSerialNumber failed: unknown result");
616
    }
617
 
2820 chandransh 618
  }
3430 rajveer 619
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
620
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
621
      private org.apache.thrift.async.TAsyncClientManager clientManager;
622
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
623
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
624
        this.clientManager = clientManager;
625
        this.protocolFactory = protocolFactory;
626
      }
627
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
628
        return new AsyncClient(protocolFactory, clientManager, transport);
629
      }
2820 chandransh 630
    }
631
 
3430 rajveer 632
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
633
      super(protocolFactory, clientManager, transport);
634
    }
2820 chandransh 635
 
4496 mandeep.dh 636
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<getInventoryItem_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 637
      checkReady();
4496 mandeep.dh 638
      getInventoryItem_call method_call = new getInventoryItem_call(serialNumber, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 639
      this.___currentMethod = method_call;
640
      ___manager.call(method_call);
641
    }
642
 
4496 mandeep.dh 643
    public static class getInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {
644
      private String serialNumber;
645
      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 646
        super(client, protocolFactory, transport, resultHandler, false);
4496 mandeep.dh 647
        this.serialNumber = serialNumber;
3430 rajveer 648
      }
649
 
650
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 651
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
652
        getInventoryItem_args args = new getInventoryItem_args();
653
        args.setSerialNumber(serialNumber);
3430 rajveer 654
        args.write(prot);
655
        prot.writeMessageEnd();
656
      }
657
 
4541 mandeep.dh 658
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
3430 rajveer 659
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
660
          throw new IllegalStateException("Method call not finished!");
661
        }
662
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
663
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 664
        return (new Client(prot)).recv_getInventoryItem();
3430 rajveer 665
      }
666
    }
667
 
5530 mandeep.dh 668
    public void getNonSeralizedInventoryItem(String itemNumber, long itemId, long fulfilmentWarehouseId, org.apache.thrift.async.AsyncMethodCallback<getNonSeralizedInventoryItem_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 669
      checkReady();
5530 mandeep.dh 670
      getNonSeralizedInventoryItem_call method_call = new getNonSeralizedInventoryItem_call(itemNumber, itemId, fulfilmentWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 671
      this.___currentMethod = method_call;
672
      ___manager.call(method_call);
673
    }
674
 
5361 mandeep.dh 675
    public static class getNonSeralizedInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {
5530 mandeep.dh 676
      private String itemNumber;
4496 mandeep.dh 677
      private long itemId;
5530 mandeep.dh 678
      private long fulfilmentWarehouseId;
679
      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 680
        super(client, protocolFactory, transport, resultHandler, false);
5530 mandeep.dh 681
        this.itemNumber = itemNumber;
4496 mandeep.dh 682
        this.itemId = itemId;
5530 mandeep.dh 683
        this.fulfilmentWarehouseId = fulfilmentWarehouseId;
3430 rajveer 684
      }
685
 
686
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
5361 mandeep.dh 687
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getNonSeralizedInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
688
        getNonSeralizedInventoryItem_args args = new getNonSeralizedInventoryItem_args();
5530 mandeep.dh 689
        args.setItemNumber(itemNumber);
4496 mandeep.dh 690
        args.setItemId(itemId);
5530 mandeep.dh 691
        args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
3430 rajveer 692
        args.write(prot);
693
        prot.writeMessageEnd();
694
      }
695
 
5361 mandeep.dh 696
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
3430 rajveer 697
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
698
          throw new IllegalStateException("Method call not finished!");
699
        }
700
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
701
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
5361 mandeep.dh 702
        return (new Client(prot)).recv_getNonSeralizedInventoryItem();
3430 rajveer 703
      }
704
    }
705
 
5361 mandeep.dh 706
    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 707
      checkReady();
5361 mandeep.dh 708
      scan_call method_call = new scan_call(inventoryItem, type, quantity, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 709
      this.___currentMethod = method_call;
710
      ___manager.call(method_call);
711
    }
712
 
4496 mandeep.dh 713
    public static class scan_call extends org.apache.thrift.async.TAsyncMethodCall {
5361 mandeep.dh 714
      private InventoryItem inventoryItem;
3430 rajveer 715
      private ScanType type;
4496 mandeep.dh 716
      private long quantity;
5361 mandeep.dh 717
      private long billingWarehouseId;
718
      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 719
        super(client, protocolFactory, transport, resultHandler, false);
5361 mandeep.dh 720
        this.inventoryItem = inventoryItem;
3430 rajveer 721
        this.type = type;
4496 mandeep.dh 722
        this.quantity = quantity;
5361 mandeep.dh 723
        this.billingWarehouseId = billingWarehouseId;
3430 rajveer 724
      }
725
 
726
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 727
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scan", org.apache.thrift.protocol.TMessageType.CALL, 0));
728
        scan_args args = new scan_args();
5361 mandeep.dh 729
        args.setInventoryItem(inventoryItem);
3430 rajveer 730
        args.setType(type);
4496 mandeep.dh 731
        args.setQuantity(quantity);
5361 mandeep.dh 732
        args.setBillingWarehouseId(billingWarehouseId);
3430 rajveer 733
        args.write(prot);
734
        prot.writeMessageEnd();
735
      }
736
 
737
      public void getResult() throws WarehouseServiceException, org.apache.thrift.TException {
738
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
739
          throw new IllegalStateException("Method call not finished!");
740
        }
741
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
742
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 743
        (new Client(prot)).recv_scan();
3430 rajveer 744
      }
745
    }
746
 
5110 mandeep.dh 747
    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 748
      checkReady();
5110 mandeep.dh 749
      scanSerializedItemForOrder_call method_call = new scanSerializedItemForOrder_call(serialNumber, type, orderId, fulfilmentWarehouseId, quantity, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 750
      this.___currentMethod = method_call;
751
      ___manager.call(method_call);
752
    }
753
 
754
    public static class scanSerializedItemForOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
4555 mandeep.dh 755
      private String serialNumber;
4496 mandeep.dh 756
      private ScanType type;
757
      private long orderId;
5110 mandeep.dh 758
      private long fulfilmentWarehouseId;
759
      private double quantity;
760
      private long billingWarehouseId;
761
      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 762
        super(client, protocolFactory, transport, resultHandler, false);
4555 mandeep.dh 763
        this.serialNumber = serialNumber;
4496 mandeep.dh 764
        this.type = type;
765
        this.orderId = orderId;
5110 mandeep.dh 766
        this.fulfilmentWarehouseId = fulfilmentWarehouseId;
767
        this.quantity = quantity;
768
        this.billingWarehouseId = billingWarehouseId;
4496 mandeep.dh 769
      }
770
 
771
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
772
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanSerializedItemForOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
773
        scanSerializedItemForOrder_args args = new scanSerializedItemForOrder_args();
4555 mandeep.dh 774
        args.setSerialNumber(serialNumber);
4496 mandeep.dh 775
        args.setType(type);
776
        args.setOrderId(orderId);
5110 mandeep.dh 777
        args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
778
        args.setQuantity(quantity);
779
        args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 780
        args.write(prot);
781
        prot.writeMessageEnd();
782
      }
783
 
4555 mandeep.dh 784
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
4496 mandeep.dh 785
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
786
          throw new IllegalStateException("Method call not finished!");
787
        }
788
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
789
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
790
        return (new Client(prot)).recv_scanSerializedItemForOrder();
791
      }
792
    }
793
 
5361 mandeep.dh 794
    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 795
      checkReady();
5361 mandeep.dh 796
      scanForOrder_call method_call = new scanForOrder_call(inventoryItem, type, quantity, orderId, fulfilmentWarehouseId, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 797
      this.___currentMethod = method_call;
798
      ___manager.call(method_call);
799
    }
800
 
801
    public static class scanForOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
5361 mandeep.dh 802
      private InventoryItem inventoryItem;
4496 mandeep.dh 803
      private ScanType type;
804
      private long quantity;
805
      private long orderId;
5110 mandeep.dh 806
      private long fulfilmentWarehouseId;
5361 mandeep.dh 807
      private long billingWarehouseId;
808
      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 809
        super(client, protocolFactory, transport, resultHandler, false);
5361 mandeep.dh 810
        this.inventoryItem = inventoryItem;
4496 mandeep.dh 811
        this.type = type;
812
        this.quantity = quantity;
813
        this.orderId = orderId;
5110 mandeep.dh 814
        this.fulfilmentWarehouseId = fulfilmentWarehouseId;
5361 mandeep.dh 815
        this.billingWarehouseId = billingWarehouseId;
4496 mandeep.dh 816
      }
817
 
818
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
819
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanForOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
820
        scanForOrder_args args = new scanForOrder_args();
5361 mandeep.dh 821
        args.setInventoryItem(inventoryItem);
4496 mandeep.dh 822
        args.setType(type);
823
        args.setQuantity(quantity);
824
        args.setOrderId(orderId);
5110 mandeep.dh 825
        args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
5361 mandeep.dh 826
        args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 827
        args.write(prot);
828
        prot.writeMessageEnd();
829
      }
830
 
5361 mandeep.dh 831
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
4496 mandeep.dh 832
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
833
          throw new IllegalStateException("Method call not finished!");
834
        }
835
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
836
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
5361 mandeep.dh 837
        return (new Client(prot)).recv_scanForOrder();
4496 mandeep.dh 838
      }
839
    }
840
 
841
    public void createItemNumberMapping(String itemNumber, long itemId, org.apache.thrift.async.AsyncMethodCallback<createItemNumberMapping_call> resultHandler) throws org.apache.thrift.TException {
842
      checkReady();
843
      createItemNumberMapping_call method_call = new createItemNumberMapping_call(itemNumber, itemId, resultHandler, this, ___protocolFactory, ___transport);
844
      this.___currentMethod = method_call;
845
      ___manager.call(method_call);
846
    }
847
 
848
    public static class createItemNumberMapping_call extends org.apache.thrift.async.TAsyncMethodCall {
849
      private String itemNumber;
850
      private long itemId;
851
      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 {
852
        super(client, protocolFactory, transport, resultHandler, false);
853
        this.itemNumber = itemNumber;
854
        this.itemId = itemId;
855
      }
856
 
857
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
858
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createItemNumberMapping", org.apache.thrift.protocol.TMessageType.CALL, 0));
859
        createItemNumberMapping_args args = new createItemNumberMapping_args();
860
        args.setItemNumber(itemNumber);
861
        args.setItemId(itemId);
862
        args.write(prot);
863
        prot.writeMessageEnd();
864
      }
865
 
866
      public void getResult() throws org.apache.thrift.TException {
867
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
868
          throw new IllegalStateException("Method call not finished!");
869
        }
870
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
871
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
872
        (new Client(prot)).recv_createItemNumberMapping();
873
      }
874
    }
875
 
4622 amit.gupta 876
    public void getItemNumbers(long itemId, org.apache.thrift.async.AsyncMethodCallback<getItemNumbers_call> resultHandler) throws org.apache.thrift.TException {
877
      checkReady();
878
      getItemNumbers_call method_call = new getItemNumbers_call(itemId, resultHandler, this, ___protocolFactory, ___transport);
879
      this.___currentMethod = method_call;
880
      ___manager.call(method_call);
881
    }
882
 
883
    public static class getItemNumbers_call extends org.apache.thrift.async.TAsyncMethodCall {
884
      private long itemId;
885
      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 {
886
        super(client, protocolFactory, transport, resultHandler, false);
887
        this.itemId = itemId;
888
      }
889
 
890
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
891
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemNumbers", org.apache.thrift.protocol.TMessageType.CALL, 0));
892
        getItemNumbers_args args = new getItemNumbers_args();
893
        args.setItemId(itemId);
894
        args.write(prot);
895
        prot.writeMessageEnd();
896
      }
897
 
898
      public List<String> getResult() throws org.apache.thrift.TException {
899
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
900
          throw new IllegalStateException("Method call not finished!");
901
        }
902
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
903
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
904
        return (new Client(prot)).recv_getItemNumbers();
905
      }
906
    }
907
 
5110 mandeep.dh 908
    public void getItemIds(String itemNumber, org.apache.thrift.async.AsyncMethodCallback<getItemIds_call> resultHandler) throws org.apache.thrift.TException {
909
      checkReady();
910
      getItemIds_call method_call = new getItemIds_call(itemNumber, resultHandler, this, ___protocolFactory, ___transport);
911
      this.___currentMethod = method_call;
912
      ___manager.call(method_call);
913
    }
914
 
915
    public static class getItemIds_call extends org.apache.thrift.async.TAsyncMethodCall {
916
      private String itemNumber;
917
      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 {
918
        super(client, protocolFactory, transport, resultHandler, false);
919
        this.itemNumber = itemNumber;
920
      }
921
 
922
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
923
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemIds", org.apache.thrift.protocol.TMessageType.CALL, 0));
924
        getItemIds_args args = new getItemIds_args();
925
        args.setItemNumber(itemNumber);
926
        args.write(prot);
927
        prot.writeMessageEnd();
928
      }
929
 
930
      public List<Long> getResult() throws org.apache.thrift.TException {
931
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
932
          throw new IllegalStateException("Method call not finished!");
933
        }
934
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
935
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
936
        return (new Client(prot)).recv_getItemIds();
937
      }
938
    }
939
 
5185 mandeep.dh 940
    public void getInventoryItemsFromLastScanType(ScanType lastScanType, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemsFromLastScanType_call> resultHandler) throws org.apache.thrift.TException {
941
      checkReady();
942
      getInventoryItemsFromLastScanType_call method_call = new getInventoryItemsFromLastScanType_call(lastScanType, resultHandler, this, ___protocolFactory, ___transport);
943
      this.___currentMethod = method_call;
944
      ___manager.call(method_call);
945
    }
946
 
947
    public static class getInventoryItemsFromLastScanType_call extends org.apache.thrift.async.TAsyncMethodCall {
948
      private ScanType lastScanType;
949
      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 {
950
        super(client, protocolFactory, transport, resultHandler, false);
951
        this.lastScanType = lastScanType;
952
      }
953
 
954
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
955
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItemsFromLastScanType", org.apache.thrift.protocol.TMessageType.CALL, 0));
956
        getInventoryItemsFromLastScanType_args args = new getInventoryItemsFromLastScanType_args();
957
        args.setLastScanType(lastScanType);
958
        args.write(prot);
959
        prot.writeMessageEnd();
960
      }
961
 
962
      public List<InventoryItem> getResult() throws WarehouseServiceException, org.apache.thrift.TException {
963
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
964
          throw new IllegalStateException("Method call not finished!");
965
        }
966
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
967
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
968
        return (new Client(prot)).recv_getInventoryItemsFromLastScanType();
969
      }
970
    }
971
 
972
    public void getInventoryItemFromId(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemFromId_call> resultHandler) throws org.apache.thrift.TException {
973
      checkReady();
974
      getInventoryItemFromId_call method_call = new getInventoryItemFromId_call(inventoryItemId, resultHandler, this, ___protocolFactory, ___transport);
975
      this.___currentMethod = method_call;
976
      ___manager.call(method_call);
977
    }
978
 
979
    public static class getInventoryItemFromId_call extends org.apache.thrift.async.TAsyncMethodCall {
980
      private long inventoryItemId;
981
      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 {
982
        super(client, protocolFactory, transport, resultHandler, false);
983
        this.inventoryItemId = inventoryItemId;
984
      }
985
 
986
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
987
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItemFromId", org.apache.thrift.protocol.TMessageType.CALL, 0));
988
        getInventoryItemFromId_args args = new getInventoryItemFromId_args();
989
        args.setInventoryItemId(inventoryItemId);
990
        args.write(prot);
991
        prot.writeMessageEnd();
992
      }
993
 
994
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
995
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
996
          throw new IllegalStateException("Method call not finished!");
997
        }
998
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
999
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1000
        return (new Client(prot)).recv_getInventoryItemFromId();
1001
      }
1002
    }
1003
 
5372 mandeep.dh 1004
    public void getPurchaseScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getPurchaseScans_call> resultHandler) throws org.apache.thrift.TException {
1005
      checkReady();
1006
      getPurchaseScans_call method_call = new getPurchaseScans_call(startDate, endDate, resultHandler, this, ___protocolFactory, ___transport);
1007
      this.___currentMethod = method_call;
1008
      ___manager.call(method_call);
1009
    }
1010
 
1011
    public static class getPurchaseScans_call extends org.apache.thrift.async.TAsyncMethodCall {
1012
      private long startDate;
1013
      private long endDate;
1014
      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 {
1015
        super(client, protocolFactory, transport, resultHandler, false);
1016
        this.startDate = startDate;
1017
        this.endDate = endDate;
1018
      }
1019
 
1020
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1021
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseScans", org.apache.thrift.protocol.TMessageType.CALL, 0));
1022
        getPurchaseScans_args args = new getPurchaseScans_args();
1023
        args.setStartDate(startDate);
1024
        args.setEndDate(endDate);
1025
        args.write(prot);
1026
        prot.writeMessageEnd();
1027
      }
1028
 
1029
      public List<DetailedPurchaseScan> getResult() throws org.apache.thrift.TException {
1030
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1031
          throw new IllegalStateException("Method call not finished!");
1032
        }
1033
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1034
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1035
        return (new Client(prot)).recv_getPurchaseScans();
1036
      }
1037
    }
1038
 
5496 mandeep.dh 1039
    public void fetchScansPerInvoiceNumber(long date, org.apache.thrift.async.AsyncMethodCallback<fetchScansPerInvoiceNumber_call> resultHandler) throws org.apache.thrift.TException {
1040
      checkReady();
1041
      fetchScansPerInvoiceNumber_call method_call = new fetchScansPerInvoiceNumber_call(date, resultHandler, this, ___protocolFactory, ___transport);
1042
      this.___currentMethod = method_call;
1043
      ___manager.call(method_call);
1044
    }
1045
 
1046
    public static class fetchScansPerInvoiceNumber_call extends org.apache.thrift.async.TAsyncMethodCall {
1047
      private long date;
1048
      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 {
1049
        super(client, protocolFactory, transport, resultHandler, false);
1050
        this.date = date;
1051
      }
1052
 
1053
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1054
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fetchScansPerInvoiceNumber", org.apache.thrift.protocol.TMessageType.CALL, 0));
1055
        fetchScansPerInvoiceNumber_args args = new fetchScansPerInvoiceNumber_args();
1056
        args.setDate(date);
1057
        args.write(prot);
1058
        prot.writeMessageEnd();
1059
      }
1060
 
1061
      public List<InvoiceScan> getResult() throws org.apache.thrift.TException {
1062
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1063
          throw new IllegalStateException("Method call not finished!");
1064
        }
1065
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1066
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1067
        return (new Client(prot)).recv_fetchScansPerInvoiceNumber();
1068
      }
1069
    }
1070
 
5620 mandeep.dh 1071
    public void getInventoryItemFromOrder(long orderId, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemFromOrder_call> resultHandler) throws org.apache.thrift.TException {
1072
      checkReady();
1073
      getInventoryItemFromOrder_call method_call = new getInventoryItemFromOrder_call(orderId, resultHandler, this, ___protocolFactory, ___transport);
1074
      this.___currentMethod = method_call;
1075
      ___manager.call(method_call);
1076
    }
1077
 
1078
    public static class getInventoryItemFromOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1079
      private long orderId;
1080
      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 {
1081
        super(client, protocolFactory, transport, resultHandler, false);
1082
        this.orderId = orderId;
1083
      }
1084
 
1085
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1086
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItemFromOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1087
        getInventoryItemFromOrder_args args = new getInventoryItemFromOrder_args();
1088
        args.setOrderId(orderId);
1089
        args.write(prot);
1090
        prot.writeMessageEnd();
1091
      }
1092
 
1093
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1094
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1095
          throw new IllegalStateException("Method call not finished!");
1096
        }
1097
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1098
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1099
        return (new Client(prot)).recv_getInventoryItemFromOrder();
1100
      }
1101
    }
1102
 
5711 mandeep.dh 1103
    public void getInventoryAge(org.apache.thrift.async.AsyncMethodCallback<getInventoryAge_call> resultHandler) throws org.apache.thrift.TException {
1104
      checkReady();
1105
      getInventoryAge_call method_call = new getInventoryAge_call(resultHandler, this, ___protocolFactory, ___transport);
1106
      this.___currentMethod = method_call;
1107
      ___manager.call(method_call);
1108
    }
1109
 
1110
    public static class getInventoryAge_call extends org.apache.thrift.async.TAsyncMethodCall {
1111
      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 {
1112
        super(client, protocolFactory, transport, resultHandler, false);
1113
      }
1114
 
1115
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1116
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryAge", org.apache.thrift.protocol.TMessageType.CALL, 0));
1117
        getInventoryAge_args args = new getInventoryAge_args();
1118
        args.write(prot);
1119
        prot.writeMessageEnd();
1120
      }
1121
 
1122
      public List<InventoryAge> getResult() throws org.apache.thrift.TException {
1123
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1124
          throw new IllegalStateException("Method call not finished!");
1125
        }
1126
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1127
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1128
        return (new Client(prot)).recv_getInventoryAge();
1129
      }
1130
    }
1131
 
6322 amar.kumar 1132
    public void getInventoryScansForItem(long itemId, long fromDate, long toDate, org.apache.thrift.async.AsyncMethodCallback<getInventoryScansForItem_call> resultHandler) throws org.apache.thrift.TException {
1133
      checkReady();
1134
      getInventoryScansForItem_call method_call = new getInventoryScansForItem_call(itemId, fromDate, toDate, resultHandler, this, ___protocolFactory, ___transport);
1135
      this.___currentMethod = method_call;
1136
      ___manager.call(method_call);
1137
    }
1138
 
1139
    public static class getInventoryScansForItem_call extends org.apache.thrift.async.TAsyncMethodCall {
1140
      private long itemId;
1141
      private long fromDate;
1142
      private long toDate;
1143
      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 {
1144
        super(client, protocolFactory, transport, resultHandler, false);
1145
        this.itemId = itemId;
1146
        this.fromDate = fromDate;
1147
        this.toDate = toDate;
1148
      }
1149
 
1150
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1151
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryScansForItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
1152
        getInventoryScansForItem_args args = new getInventoryScansForItem_args();
1153
        args.setItemId(itemId);
1154
        args.setFromDate(fromDate);
1155
        args.setToDate(toDate);
1156
        args.write(prot);
1157
        prot.writeMessageEnd();
1158
      }
1159
 
1160
      public List<Scan> getResult() throws org.apache.thrift.TException {
1161
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1162
          throw new IllegalStateException("Method call not finished!");
1163
        }
1164
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1165
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1166
        return (new Client(prot)).recv_getInventoryScansForItem();
1167
      }
1168
    }
1169
 
1170
    public void getScanRecordsForSerialNumber(long serialNumber, org.apache.thrift.async.AsyncMethodCallback<getScanRecordsForSerialNumber_call> resultHandler) throws org.apache.thrift.TException {
1171
      checkReady();
1172
      getScanRecordsForSerialNumber_call method_call = new getScanRecordsForSerialNumber_call(serialNumber, resultHandler, this, ___protocolFactory, ___transport);
1173
      this.___currentMethod = method_call;
1174
      ___manager.call(method_call);
1175
    }
1176
 
1177
    public static class getScanRecordsForSerialNumber_call extends org.apache.thrift.async.TAsyncMethodCall {
1178
      private long serialNumber;
1179
      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 {
1180
        super(client, protocolFactory, transport, resultHandler, false);
1181
        this.serialNumber = serialNumber;
1182
      }
1183
 
1184
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1185
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getScanRecordsForSerialNumber", org.apache.thrift.protocol.TMessageType.CALL, 0));
1186
        getScanRecordsForSerialNumber_args args = new getScanRecordsForSerialNumber_args();
1187
        args.setSerialNumber(serialNumber);
1188
        args.write(prot);
1189
        prot.writeMessageEnd();
1190
      }
1191
 
1192
      public List<Scan> getResult() throws org.apache.thrift.TException {
1193
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1194
          throw new IllegalStateException("Method call not finished!");
1195
        }
1196
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1197
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1198
        return (new Client(prot)).recv_getScanRecordsForSerialNumber();
1199
      }
1200
    }
1201
 
3430 rajveer 1202
  }
1203
 
1204
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1205
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1206
    public Processor(I iface) {
1207
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
1208
    }
1209
 
1210
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
1211
      super(iface, getProcessMap(processMap));
1212
    }
1213
 
1214
    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 1215
      processMap.put("getInventoryItem", new getInventoryItem());
5361 mandeep.dh 1216
      processMap.put("getNonSeralizedInventoryItem", new getNonSeralizedInventoryItem());
4496 mandeep.dh 1217
      processMap.put("scan", new scan());
1218
      processMap.put("scanSerializedItemForOrder", new scanSerializedItemForOrder());
1219
      processMap.put("scanForOrder", new scanForOrder());
1220
      processMap.put("createItemNumberMapping", new createItemNumberMapping());
4622 amit.gupta 1221
      processMap.put("getItemNumbers", new getItemNumbers());
5110 mandeep.dh 1222
      processMap.put("getItemIds", new getItemIds());
5185 mandeep.dh 1223
      processMap.put("getInventoryItemsFromLastScanType", new getInventoryItemsFromLastScanType());
1224
      processMap.put("getInventoryItemFromId", new getInventoryItemFromId());
5372 mandeep.dh 1225
      processMap.put("getPurchaseScans", new getPurchaseScans());
5496 mandeep.dh 1226
      processMap.put("fetchScansPerInvoiceNumber", new fetchScansPerInvoiceNumber());
5620 mandeep.dh 1227
      processMap.put("getInventoryItemFromOrder", new getInventoryItemFromOrder());
5711 mandeep.dh 1228
      processMap.put("getInventoryAge", new getInventoryAge());
6322 amar.kumar 1229
      processMap.put("getInventoryScansForItem", new getInventoryScansForItem());
1230
      processMap.put("getScanRecordsForSerialNumber", new getScanRecordsForSerialNumber());
3430 rajveer 1231
      return processMap;
1232
    }
1233
 
4496 mandeep.dh 1234
    private static class getInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItem_args> {
1235
      public getInventoryItem() {
1236
        super("getInventoryItem");
3430 rajveer 1237
      }
1238
 
4496 mandeep.dh 1239
      protected getInventoryItem_args getEmptyArgsInstance() {
1240
        return new getInventoryItem_args();
3430 rajveer 1241
      }
1242
 
4496 mandeep.dh 1243
      protected getInventoryItem_result getResult(I iface, getInventoryItem_args args) throws org.apache.thrift.TException {
1244
        getInventoryItem_result result = new getInventoryItem_result();
4541 mandeep.dh 1245
        try {
1246
          result.success = iface.getInventoryItem(args.serialNumber);
1247
        } catch (WarehouseServiceException wex) {
1248
          result.wex = wex;
1249
        }
3430 rajveer 1250
        return result;
2832 chandransh 1251
      }
1252
    }
1253
 
5361 mandeep.dh 1254
    private static class getNonSeralizedInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getNonSeralizedInventoryItem_args> {
1255
      public getNonSeralizedInventoryItem() {
1256
        super("getNonSeralizedInventoryItem");
3430 rajveer 1257
      }
1258
 
5361 mandeep.dh 1259
      protected getNonSeralizedInventoryItem_args getEmptyArgsInstance() {
1260
        return new getNonSeralizedInventoryItem_args();
3430 rajveer 1261
      }
1262
 
5361 mandeep.dh 1263
      protected getNonSeralizedInventoryItem_result getResult(I iface, getNonSeralizedInventoryItem_args args) throws org.apache.thrift.TException {
1264
        getNonSeralizedInventoryItem_result result = new getNonSeralizedInventoryItem_result();
1265
        try {
5530 mandeep.dh 1266
          result.success = iface.getNonSeralizedInventoryItem(args.itemNumber, args.itemId, args.fulfilmentWarehouseId);
5361 mandeep.dh 1267
        } catch (WarehouseServiceException wex) {
1268
          result.wex = wex;
1269
        }
3430 rajveer 1270
        return result;
2820 chandransh 1271
      }
1272
    }
1273
 
4496 mandeep.dh 1274
    private static class scan<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scan_args> {
1275
      public scan() {
1276
        super("scan");
3430 rajveer 1277
      }
1278
 
4496 mandeep.dh 1279
      protected scan_args getEmptyArgsInstance() {
1280
        return new scan_args();
3430 rajveer 1281
      }
1282
 
4496 mandeep.dh 1283
      protected scan_result getResult(I iface, scan_args args) throws org.apache.thrift.TException {
1284
        scan_result result = new scan_result();
3383 chandransh 1285
        try {
5361 mandeep.dh 1286
          iface.scan(args.inventoryItem, args.type, args.quantity, args.billingWarehouseId);
3383 chandransh 1287
        } catch (WarehouseServiceException wex) {
1288
          result.wex = wex;
1289
        }
3430 rajveer 1290
        return result;
3383 chandransh 1291
      }
1292
    }
1293
 
4496 mandeep.dh 1294
    private static class scanSerializedItemForOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanSerializedItemForOrder_args> {
1295
      public scanSerializedItemForOrder() {
1296
        super("scanSerializedItemForOrder");
3430 rajveer 1297
      }
1298
 
4496 mandeep.dh 1299
      protected scanSerializedItemForOrder_args getEmptyArgsInstance() {
1300
        return new scanSerializedItemForOrder_args();
3430 rajveer 1301
      }
1302
 
4496 mandeep.dh 1303
      protected scanSerializedItemForOrder_result getResult(I iface, scanSerializedItemForOrder_args args) throws org.apache.thrift.TException {
1304
        scanSerializedItemForOrder_result result = new scanSerializedItemForOrder_result();
2820 chandransh 1305
        try {
5110 mandeep.dh 1306
          result.success = iface.scanSerializedItemForOrder(args.serialNumber, args.type, args.orderId, args.fulfilmentWarehouseId, args.quantity, args.billingWarehouseId);
2820 chandransh 1307
        } catch (WarehouseServiceException wex) {
1308
          result.wex = wex;
1309
        }
3430 rajveer 1310
        return result;
2820 chandransh 1311
      }
1312
    }
1313
 
4496 mandeep.dh 1314
    private static class scanForOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanForOrder_args> {
1315
      public scanForOrder() {
1316
        super("scanForOrder");
3430 rajveer 1317
      }
1318
 
4496 mandeep.dh 1319
      protected scanForOrder_args getEmptyArgsInstance() {
1320
        return new scanForOrder_args();
3430 rajveer 1321
      }
1322
 
4496 mandeep.dh 1323
      protected scanForOrder_result getResult(I iface, scanForOrder_args args) throws org.apache.thrift.TException {
1324
        scanForOrder_result result = new scanForOrder_result();
2820 chandransh 1325
        try {
5361 mandeep.dh 1326
          result.success = iface.scanForOrder(args.inventoryItem, args.type, args.quantity, args.orderId, args.fulfilmentWarehouseId, args.billingWarehouseId);
2820 chandransh 1327
        } catch (WarehouseServiceException wex) {
1328
          result.wex = wex;
1329
        }
3430 rajveer 1330
        return result;
2820 chandransh 1331
      }
1332
    }
1333
 
4496 mandeep.dh 1334
    private static class createItemNumberMapping<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createItemNumberMapping_args> {
1335
      public createItemNumberMapping() {
1336
        super("createItemNumberMapping");
1337
      }
1338
 
1339
      protected createItemNumberMapping_args getEmptyArgsInstance() {
1340
        return new createItemNumberMapping_args();
1341
      }
1342
 
1343
      protected createItemNumberMapping_result getResult(I iface, createItemNumberMapping_args args) throws org.apache.thrift.TException {
1344
        createItemNumberMapping_result result = new createItemNumberMapping_result();
1345
        iface.createItemNumberMapping(args.itemNumber, args.itemId);
1346
        return result;
1347
      }
1348
    }
1349
 
4622 amit.gupta 1350
    private static class getItemNumbers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemNumbers_args> {
1351
      public getItemNumbers() {
1352
        super("getItemNumbers");
1353
      }
1354
 
1355
      protected getItemNumbers_args getEmptyArgsInstance() {
1356
        return new getItemNumbers_args();
1357
      }
1358
 
1359
      protected getItemNumbers_result getResult(I iface, getItemNumbers_args args) throws org.apache.thrift.TException {
1360
        getItemNumbers_result result = new getItemNumbers_result();
1361
        result.success = iface.getItemNumbers(args.itemId);
1362
        return result;
1363
      }
1364
    }
1365
 
5110 mandeep.dh 1366
    private static class getItemIds<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemIds_args> {
1367
      public getItemIds() {
1368
        super("getItemIds");
1369
      }
1370
 
1371
      protected getItemIds_args getEmptyArgsInstance() {
1372
        return new getItemIds_args();
1373
      }
1374
 
1375
      protected getItemIds_result getResult(I iface, getItemIds_args args) throws org.apache.thrift.TException {
1376
        getItemIds_result result = new getItemIds_result();
1377
        result.success = iface.getItemIds(args.itemNumber);
1378
        return result;
1379
      }
1380
    }
1381
 
5185 mandeep.dh 1382
    private static class getInventoryItemsFromLastScanType<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItemsFromLastScanType_args> {
1383
      public getInventoryItemsFromLastScanType() {
1384
        super("getInventoryItemsFromLastScanType");
1385
      }
1386
 
1387
      protected getInventoryItemsFromLastScanType_args getEmptyArgsInstance() {
1388
        return new getInventoryItemsFromLastScanType_args();
1389
      }
1390
 
1391
      protected getInventoryItemsFromLastScanType_result getResult(I iface, getInventoryItemsFromLastScanType_args args) throws org.apache.thrift.TException {
1392
        getInventoryItemsFromLastScanType_result result = new getInventoryItemsFromLastScanType_result();
1393
        try {
1394
          result.success = iface.getInventoryItemsFromLastScanType(args.lastScanType);
1395
        } catch (WarehouseServiceException wex) {
1396
          result.wex = wex;
1397
        }
1398
        return result;
1399
      }
1400
    }
1401
 
1402
    private static class getInventoryItemFromId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItemFromId_args> {
1403
      public getInventoryItemFromId() {
1404
        super("getInventoryItemFromId");
1405
      }
1406
 
1407
      protected getInventoryItemFromId_args getEmptyArgsInstance() {
1408
        return new getInventoryItemFromId_args();
1409
      }
1410
 
1411
      protected getInventoryItemFromId_result getResult(I iface, getInventoryItemFromId_args args) throws org.apache.thrift.TException {
1412
        getInventoryItemFromId_result result = new getInventoryItemFromId_result();
1413
        try {
1414
          result.success = iface.getInventoryItemFromId(args.inventoryItemId);
1415
        } catch (WarehouseServiceException wex) {
1416
          result.wex = wex;
1417
        }
1418
        return result;
1419
      }
1420
    }
1421
 
5372 mandeep.dh 1422
    private static class getPurchaseScans<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseScans_args> {
1423
      public getPurchaseScans() {
1424
        super("getPurchaseScans");
1425
      }
1426
 
1427
      protected getPurchaseScans_args getEmptyArgsInstance() {
1428
        return new getPurchaseScans_args();
1429
      }
1430
 
1431
      protected getPurchaseScans_result getResult(I iface, getPurchaseScans_args args) throws org.apache.thrift.TException {
1432
        getPurchaseScans_result result = new getPurchaseScans_result();
1433
        result.success = iface.getPurchaseScans(args.startDate, args.endDate);
1434
        return result;
1435
      }
1436
    }
1437
 
5496 mandeep.dh 1438
    private static class fetchScansPerInvoiceNumber<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fetchScansPerInvoiceNumber_args> {
1439
      public fetchScansPerInvoiceNumber() {
1440
        super("fetchScansPerInvoiceNumber");
1441
      }
1442
 
1443
      protected fetchScansPerInvoiceNumber_args getEmptyArgsInstance() {
1444
        return new fetchScansPerInvoiceNumber_args();
1445
      }
1446
 
1447
      protected fetchScansPerInvoiceNumber_result getResult(I iface, fetchScansPerInvoiceNumber_args args) throws org.apache.thrift.TException {
1448
        fetchScansPerInvoiceNumber_result result = new fetchScansPerInvoiceNumber_result();
1449
        result.success = iface.fetchScansPerInvoiceNumber(args.date);
1450
        return result;
1451
      }
1452
    }
1453
 
5620 mandeep.dh 1454
    private static class getInventoryItemFromOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItemFromOrder_args> {
1455
      public getInventoryItemFromOrder() {
1456
        super("getInventoryItemFromOrder");
1457
      }
1458
 
1459
      protected getInventoryItemFromOrder_args getEmptyArgsInstance() {
1460
        return new getInventoryItemFromOrder_args();
1461
      }
1462
 
1463
      protected getInventoryItemFromOrder_result getResult(I iface, getInventoryItemFromOrder_args args) throws org.apache.thrift.TException {
1464
        getInventoryItemFromOrder_result result = new getInventoryItemFromOrder_result();
1465
        try {
1466
          result.success = iface.getInventoryItemFromOrder(args.orderId);
1467
        } catch (WarehouseServiceException we) {
1468
          result.we = we;
1469
        }
1470
        return result;
1471
      }
1472
    }
1473
 
5711 mandeep.dh 1474
    private static class getInventoryAge<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryAge_args> {
1475
      public getInventoryAge() {
1476
        super("getInventoryAge");
1477
      }
1478
 
1479
      protected getInventoryAge_args getEmptyArgsInstance() {
1480
        return new getInventoryAge_args();
1481
      }
1482
 
1483
      protected getInventoryAge_result getResult(I iface, getInventoryAge_args args) throws org.apache.thrift.TException {
1484
        getInventoryAge_result result = new getInventoryAge_result();
1485
        result.success = iface.getInventoryAge();
1486
        return result;
1487
      }
1488
    }
1489
 
6322 amar.kumar 1490
    private static class getInventoryScansForItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryScansForItem_args> {
1491
      public getInventoryScansForItem() {
1492
        super("getInventoryScansForItem");
1493
      }
1494
 
1495
      protected getInventoryScansForItem_args getEmptyArgsInstance() {
1496
        return new getInventoryScansForItem_args();
1497
      }
1498
 
1499
      protected getInventoryScansForItem_result getResult(I iface, getInventoryScansForItem_args args) throws org.apache.thrift.TException {
1500
        getInventoryScansForItem_result result = new getInventoryScansForItem_result();
1501
        result.success = iface.getInventoryScansForItem(args.itemId, args.fromDate, args.toDate);
1502
        return result;
1503
      }
1504
    }
1505
 
1506
    private static class getScanRecordsForSerialNumber<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getScanRecordsForSerialNumber_args> {
1507
      public getScanRecordsForSerialNumber() {
1508
        super("getScanRecordsForSerialNumber");
1509
      }
1510
 
1511
      protected getScanRecordsForSerialNumber_args getEmptyArgsInstance() {
1512
        return new getScanRecordsForSerialNumber_args();
1513
      }
1514
 
1515
      protected getScanRecordsForSerialNumber_result getResult(I iface, getScanRecordsForSerialNumber_args args) throws org.apache.thrift.TException {
1516
        getScanRecordsForSerialNumber_result result = new getScanRecordsForSerialNumber_result();
1517
        result.success = iface.getScanRecordsForSerialNumber(args.serialNumber);
1518
        return result;
1519
      }
1520
    }
1521
 
2820 chandransh 1522
  }
1523
 
4496 mandeep.dh 1524
  public static class getInventoryItem_args implements org.apache.thrift.TBase<getInventoryItem_args, getInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
1525
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_args");
2832 chandransh 1526
 
4496 mandeep.dh 1527
    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 1528
 
4496 mandeep.dh 1529
    private String serialNumber; // required
2832 chandransh 1530
 
1531
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 1532
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 1533
      SERIAL_NUMBER((short)1, "serialNumber");
2832 chandransh 1534
 
1535
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1536
 
1537
      static {
1538
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1539
          byName.put(field.getFieldName(), field);
1540
        }
1541
      }
1542
 
1543
      /**
1544
       * Find the _Fields constant that matches fieldId, or null if its not found.
1545
       */
1546
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 1547
        switch(fieldId) {
4496 mandeep.dh 1548
          case 1: // SERIAL_NUMBER
1549
            return SERIAL_NUMBER;
3430 rajveer 1550
          default:
1551
            return null;
1552
        }
2832 chandransh 1553
      }
1554
 
1555
      /**
1556
       * Find the _Fields constant that matches fieldId, throwing an exception
1557
       * if it is not found.
1558
       */
1559
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1560
        _Fields fields = findByThriftId(fieldId);
1561
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1562
        return fields;
1563
      }
1564
 
1565
      /**
1566
       * Find the _Fields constant that matches name, or null if its not found.
1567
       */
1568
      public static _Fields findByName(String name) {
1569
        return byName.get(name);
1570
      }
1571
 
1572
      private final short _thriftId;
1573
      private final String _fieldName;
1574
 
1575
      _Fields(short thriftId, String fieldName) {
1576
        _thriftId = thriftId;
1577
        _fieldName = fieldName;
1578
      }
1579
 
1580
      public short getThriftFieldId() {
1581
        return _thriftId;
1582
      }
1583
 
1584
      public String getFieldName() {
1585
        return _fieldName;
1586
      }
1587
    }
1588
 
1589
    // isset id assignments
1590
 
3430 rajveer 1591
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2832 chandransh 1592
    static {
3430 rajveer 1593
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 1594
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1595
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
3430 rajveer 1596
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 1597
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItem_args.class, metaDataMap);
2832 chandransh 1598
    }
1599
 
4496 mandeep.dh 1600
    public getInventoryItem_args() {
2832 chandransh 1601
    }
1602
 
4496 mandeep.dh 1603
    public getInventoryItem_args(
1604
      String serialNumber)
2832 chandransh 1605
    {
1606
      this();
4496 mandeep.dh 1607
      this.serialNumber = serialNumber;
2832 chandransh 1608
    }
1609
 
1610
    /**
1611
     * Performs a deep copy on <i>other</i>.
1612
     */
4496 mandeep.dh 1613
    public getInventoryItem_args(getInventoryItem_args other) {
1614
      if (other.isSetSerialNumber()) {
1615
        this.serialNumber = other.serialNumber;
1616
      }
2832 chandransh 1617
    }
1618
 
4496 mandeep.dh 1619
    public getInventoryItem_args deepCopy() {
1620
      return new getInventoryItem_args(this);
2832 chandransh 1621
    }
1622
 
3430 rajveer 1623
    @Override
1624
    public void clear() {
4496 mandeep.dh 1625
      this.serialNumber = null;
2832 chandransh 1626
    }
1627
 
4496 mandeep.dh 1628
    public String getSerialNumber() {
1629
      return this.serialNumber;
2832 chandransh 1630
    }
1631
 
4496 mandeep.dh 1632
    public void setSerialNumber(String serialNumber) {
1633
      this.serialNumber = serialNumber;
2832 chandransh 1634
    }
1635
 
4496 mandeep.dh 1636
    public void unsetSerialNumber() {
1637
      this.serialNumber = null;
2832 chandransh 1638
    }
1639
 
4496 mandeep.dh 1640
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
1641
    public boolean isSetSerialNumber() {
1642
      return this.serialNumber != null;
2832 chandransh 1643
    }
1644
 
4496 mandeep.dh 1645
    public void setSerialNumberIsSet(boolean value) {
1646
      if (!value) {
1647
        this.serialNumber = null;
1648
      }
2832 chandransh 1649
    }
1650
 
1651
    public void setFieldValue(_Fields field, Object value) {
1652
      switch (field) {
4496 mandeep.dh 1653
      case SERIAL_NUMBER:
2832 chandransh 1654
        if (value == null) {
4496 mandeep.dh 1655
          unsetSerialNumber();
2832 chandransh 1656
        } else {
4496 mandeep.dh 1657
          setSerialNumber((String)value);
2832 chandransh 1658
        }
1659
        break;
1660
 
1661
      }
1662
    }
1663
 
1664
    public Object getFieldValue(_Fields field) {
1665
      switch (field) {
4496 mandeep.dh 1666
      case SERIAL_NUMBER:
1667
        return getSerialNumber();
2832 chandransh 1668
 
1669
      }
1670
      throw new IllegalStateException();
1671
    }
1672
 
3430 rajveer 1673
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1674
    public boolean isSet(_Fields field) {
1675
      if (field == null) {
1676
        throw new IllegalArgumentException();
1677
      }
2832 chandransh 1678
 
1679
      switch (field) {
4496 mandeep.dh 1680
      case SERIAL_NUMBER:
1681
        return isSetSerialNumber();
2832 chandransh 1682
      }
1683
      throw new IllegalStateException();
1684
    }
1685
 
1686
    @Override
1687
    public boolean equals(Object that) {
1688
      if (that == null)
1689
        return false;
4496 mandeep.dh 1690
      if (that instanceof getInventoryItem_args)
1691
        return this.equals((getInventoryItem_args)that);
2832 chandransh 1692
      return false;
1693
    }
1694
 
4496 mandeep.dh 1695
    public boolean equals(getInventoryItem_args that) {
2832 chandransh 1696
      if (that == null)
1697
        return false;
1698
 
4496 mandeep.dh 1699
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
1700
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
1701
      if (this_present_serialNumber || that_present_serialNumber) {
1702
        if (!(this_present_serialNumber && that_present_serialNumber))
2832 chandransh 1703
          return false;
4496 mandeep.dh 1704
        if (!this.serialNumber.equals(that.serialNumber))
2832 chandransh 1705
          return false;
1706
      }
1707
 
1708
      return true;
1709
    }
1710
 
1711
    @Override
1712
    public int hashCode() {
1713
      return 0;
1714
    }
1715
 
4496 mandeep.dh 1716
    public int compareTo(getInventoryItem_args other) {
2832 chandransh 1717
      if (!getClass().equals(other.getClass())) {
1718
        return getClass().getName().compareTo(other.getClass().getName());
1719
      }
1720
 
1721
      int lastComparison = 0;
4496 mandeep.dh 1722
      getInventoryItem_args typedOther = (getInventoryItem_args)other;
2832 chandransh 1723
 
4496 mandeep.dh 1724
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
2832 chandransh 1725
      if (lastComparison != 0) {
1726
        return lastComparison;
1727
      }
4496 mandeep.dh 1728
      if (isSetSerialNumber()) {
1729
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
3430 rajveer 1730
        if (lastComparison != 0) {
1731
          return lastComparison;
1732
        }
2832 chandransh 1733
      }
1734
      return 0;
1735
    }
1736
 
3430 rajveer 1737
    public _Fields fieldForId(int fieldId) {
1738
      return _Fields.findByThriftId(fieldId);
1739
    }
1740
 
1741
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1742
      org.apache.thrift.protocol.TField field;
2832 chandransh 1743
      iprot.readStructBegin();
1744
      while (true)
1745
      {
1746
        field = iprot.readFieldBegin();
3430 rajveer 1747
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2832 chandransh 1748
          break;
1749
        }
3430 rajveer 1750
        switch (field.id) {
4496 mandeep.dh 1751
          case 1: // SERIAL_NUMBER
1752
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
1753
              this.serialNumber = iprot.readString();
3430 rajveer 1754
            } else { 
1755
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1756
            }
1757
            break;
1758
          default:
1759
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2832 chandransh 1760
        }
3430 rajveer 1761
        iprot.readFieldEnd();
2832 chandransh 1762
      }
1763
      iprot.readStructEnd();
1764
      validate();
1765
    }
1766
 
3430 rajveer 1767
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2832 chandransh 1768
      validate();
1769
 
1770
      oprot.writeStructBegin(STRUCT_DESC);
4496 mandeep.dh 1771
      if (this.serialNumber != null) {
1772
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
1773
        oprot.writeString(this.serialNumber);
1774
        oprot.writeFieldEnd();
1775
      }
2832 chandransh 1776
      oprot.writeFieldStop();
1777
      oprot.writeStructEnd();
1778
    }
1779
 
1780
    @Override
1781
    public String toString() {
4496 mandeep.dh 1782
      StringBuilder sb = new StringBuilder("getInventoryItem_args(");
2832 chandransh 1783
      boolean first = true;
1784
 
4496 mandeep.dh 1785
      sb.append("serialNumber:");
1786
      if (this.serialNumber == null) {
1787
        sb.append("null");
1788
      } else {
1789
        sb.append(this.serialNumber);
1790
      }
2832 chandransh 1791
      first = false;
1792
      sb.append(")");
1793
      return sb.toString();
1794
    }
1795
 
3430 rajveer 1796
    public void validate() throws org.apache.thrift.TException {
2832 chandransh 1797
      // check for required fields
1798
    }
1799
 
3430 rajveer 1800
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1801
      try {
1802
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1803
      } catch (org.apache.thrift.TException te) {
1804
        throw new java.io.IOException(te);
1805
      }
1806
    }
1807
 
1808
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1809
      try {
1810
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1811
      } catch (org.apache.thrift.TException te) {
1812
        throw new java.io.IOException(te);
1813
      }
1814
    }
1815
 
2832 chandransh 1816
  }
1817
 
4496 mandeep.dh 1818
  public static class getInventoryItem_result implements org.apache.thrift.TBase<getInventoryItem_result, getInventoryItem_result._Fields>, java.io.Serializable, Cloneable   {
1819
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_result");
2832 chandransh 1820
 
3430 rajveer 1821
    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 1822
    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 1823
 
4496 mandeep.dh 1824
    private InventoryItem success; // required
4541 mandeep.dh 1825
    private WarehouseServiceException wex; // required
2832 chandransh 1826
 
1827
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 1828
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4541 mandeep.dh 1829
      SUCCESS((short)0, "success"),
1830
      WEX((short)1, "wex");
2832 chandransh 1831
 
1832
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1833
 
1834
      static {
1835
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1836
          byName.put(field.getFieldName(), field);
1837
        }
1838
      }
1839
 
1840
      /**
1841
       * Find the _Fields constant that matches fieldId, or null if its not found.
1842
       */
1843
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 1844
        switch(fieldId) {
1845
          case 0: // SUCCESS
1846
            return SUCCESS;
4541 mandeep.dh 1847
          case 1: // WEX
1848
            return WEX;
3430 rajveer 1849
          default:
1850
            return null;
1851
        }
2832 chandransh 1852
      }
1853
 
1854
      /**
1855
       * Find the _Fields constant that matches fieldId, throwing an exception
1856
       * if it is not found.
1857
       */
1858
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1859
        _Fields fields = findByThriftId(fieldId);
1860
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1861
        return fields;
1862
      }
1863
 
1864
      /**
1865
       * Find the _Fields constant that matches name, or null if its not found.
1866
       */
1867
      public static _Fields findByName(String name) {
1868
        return byName.get(name);
1869
      }
1870
 
1871
      private final short _thriftId;
1872
      private final String _fieldName;
1873
 
1874
      _Fields(short thriftId, String fieldName) {
1875
        _thriftId = thriftId;
1876
        _fieldName = fieldName;
1877
      }
1878
 
1879
      public short getThriftFieldId() {
1880
        return _thriftId;
1881
      }
1882
 
1883
      public String getFieldName() {
1884
        return _fieldName;
1885
      }
1886
    }
1887
 
1888
    // isset id assignments
1889
 
3430 rajveer 1890
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2832 chandransh 1891
    static {
3430 rajveer 1892
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
1893
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 1894
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
4541 mandeep.dh 1895
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1896
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3430 rajveer 1897
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 1898
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItem_result.class, metaDataMap);
2832 chandransh 1899
    }
1900
 
4496 mandeep.dh 1901
    public getInventoryItem_result() {
2832 chandransh 1902
    }
1903
 
4496 mandeep.dh 1904
    public getInventoryItem_result(
4541 mandeep.dh 1905
      InventoryItem success,
1906
      WarehouseServiceException wex)
2832 chandransh 1907
    {
1908
      this();
1909
      this.success = success;
4541 mandeep.dh 1910
      this.wex = wex;
2832 chandransh 1911
    }
1912
 
1913
    /**
1914
     * Performs a deep copy on <i>other</i>.
1915
     */
4496 mandeep.dh 1916
    public getInventoryItem_result(getInventoryItem_result other) {
2832 chandransh 1917
      if (other.isSetSuccess()) {
4496 mandeep.dh 1918
        this.success = new InventoryItem(other.success);
2832 chandransh 1919
      }
4541 mandeep.dh 1920
      if (other.isSetWex()) {
1921
        this.wex = new WarehouseServiceException(other.wex);
1922
      }
2832 chandransh 1923
    }
1924
 
4496 mandeep.dh 1925
    public getInventoryItem_result deepCopy() {
1926
      return new getInventoryItem_result(this);
2832 chandransh 1927
    }
1928
 
3430 rajveer 1929
    @Override
1930
    public void clear() {
1931
      this.success = null;
4541 mandeep.dh 1932
      this.wex = null;
2832 chandransh 1933
    }
1934
 
4496 mandeep.dh 1935
    public InventoryItem getSuccess() {
2832 chandransh 1936
      return this.success;
1937
    }
1938
 
4496 mandeep.dh 1939
    public void setSuccess(InventoryItem success) {
2832 chandransh 1940
      this.success = success;
1941
    }
1942
 
1943
    public void unsetSuccess() {
1944
      this.success = null;
1945
    }
1946
 
3430 rajveer 1947
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2832 chandransh 1948
    public boolean isSetSuccess() {
1949
      return this.success != null;
1950
    }
1951
 
1952
    public void setSuccessIsSet(boolean value) {
1953
      if (!value) {
1954
        this.success = null;
1955
      }
1956
    }
1957
 
4541 mandeep.dh 1958
    public WarehouseServiceException getWex() {
1959
      return this.wex;
1960
    }
1961
 
1962
    public void setWex(WarehouseServiceException wex) {
1963
      this.wex = wex;
1964
    }
1965
 
1966
    public void unsetWex() {
1967
      this.wex = null;
1968
    }
1969
 
1970
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
1971
    public boolean isSetWex() {
1972
      return this.wex != null;
1973
    }
1974
 
1975
    public void setWexIsSet(boolean value) {
1976
      if (!value) {
1977
        this.wex = null;
1978
      }
1979
    }
1980
 
2832 chandransh 1981
    public void setFieldValue(_Fields field, Object value) {
1982
      switch (field) {
1983
      case SUCCESS:
1984
        if (value == null) {
1985
          unsetSuccess();
1986
        } else {
4496 mandeep.dh 1987
          setSuccess((InventoryItem)value);
2832 chandransh 1988
        }
1989
        break;
1990
 
4541 mandeep.dh 1991
      case WEX:
1992
        if (value == null) {
1993
          unsetWex();
1994
        } else {
1995
          setWex((WarehouseServiceException)value);
1996
        }
1997
        break;
1998
 
2832 chandransh 1999
      }
2000
    }
2001
 
2002
    public Object getFieldValue(_Fields field) {
2003
      switch (field) {
2004
      case SUCCESS:
2005
        return getSuccess();
2006
 
4541 mandeep.dh 2007
      case WEX:
2008
        return getWex();
2009
 
2832 chandransh 2010
      }
2011
      throw new IllegalStateException();
2012
    }
2013
 
3430 rajveer 2014
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2015
    public boolean isSet(_Fields field) {
2016
      if (field == null) {
2017
        throw new IllegalArgumentException();
2018
      }
2832 chandransh 2019
 
2020
      switch (field) {
2021
      case SUCCESS:
2022
        return isSetSuccess();
4541 mandeep.dh 2023
      case WEX:
2024
        return isSetWex();
2832 chandransh 2025
      }
2026
      throw new IllegalStateException();
2027
    }
2028
 
2029
    @Override
2030
    public boolean equals(Object that) {
2031
      if (that == null)
2032
        return false;
4496 mandeep.dh 2033
      if (that instanceof getInventoryItem_result)
2034
        return this.equals((getInventoryItem_result)that);
2832 chandransh 2035
      return false;
2036
    }
2037
 
4496 mandeep.dh 2038
    public boolean equals(getInventoryItem_result that) {
2832 chandransh 2039
      if (that == null)
2040
        return false;
2041
 
2042
      boolean this_present_success = true && this.isSetSuccess();
2043
      boolean that_present_success = true && that.isSetSuccess();
2044
      if (this_present_success || that_present_success) {
2045
        if (!(this_present_success && that_present_success))
2046
          return false;
2047
        if (!this.success.equals(that.success))
2048
          return false;
2049
      }
2050
 
4541 mandeep.dh 2051
      boolean this_present_wex = true && this.isSetWex();
2052
      boolean that_present_wex = true && that.isSetWex();
2053
      if (this_present_wex || that_present_wex) {
2054
        if (!(this_present_wex && that_present_wex))
2055
          return false;
2056
        if (!this.wex.equals(that.wex))
2057
          return false;
2058
      }
2059
 
2832 chandransh 2060
      return true;
2061
    }
2062
 
2063
    @Override
2064
    public int hashCode() {
2065
      return 0;
2066
    }
2067
 
4496 mandeep.dh 2068
    public int compareTo(getInventoryItem_result other) {
2832 chandransh 2069
      if (!getClass().equals(other.getClass())) {
2070
        return getClass().getName().compareTo(other.getClass().getName());
2071
      }
2072
 
2073
      int lastComparison = 0;
4496 mandeep.dh 2074
      getInventoryItem_result typedOther = (getInventoryItem_result)other;
2832 chandransh 2075
 
3430 rajveer 2076
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2832 chandransh 2077
      if (lastComparison != 0) {
2078
        return lastComparison;
2079
      }
3430 rajveer 2080
      if (isSetSuccess()) {
2081
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
2082
        if (lastComparison != 0) {
2083
          return lastComparison;
2084
        }
2832 chandransh 2085
      }
4541 mandeep.dh 2086
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2087
      if (lastComparison != 0) {
2088
        return lastComparison;
2089
      }
2090
      if (isSetWex()) {
2091
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
2092
        if (lastComparison != 0) {
2093
          return lastComparison;
2094
        }
2095
      }
2832 chandransh 2096
      return 0;
2097
    }
2098
 
3430 rajveer 2099
    public _Fields fieldForId(int fieldId) {
2100
      return _Fields.findByThriftId(fieldId);
2101
    }
2102
 
2103
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2104
      org.apache.thrift.protocol.TField field;
2832 chandransh 2105
      iprot.readStructBegin();
2106
      while (true)
2107
      {
2108
        field = iprot.readFieldBegin();
3430 rajveer 2109
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2832 chandransh 2110
          break;
2111
        }
3430 rajveer 2112
        switch (field.id) {
2113
          case 0: // SUCCESS
2114
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4496 mandeep.dh 2115
              this.success = new InventoryItem();
3430 rajveer 2116
              this.success.read(iprot);
2117
            } else { 
2118
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2119
            }
2120
            break;
4541 mandeep.dh 2121
          case 1: // WEX
2122
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2123
              this.wex = new WarehouseServiceException();
2124
              this.wex.read(iprot);
2125
            } else { 
2126
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2127
            }
2128
            break;
3430 rajveer 2129
          default:
2130
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2832 chandransh 2131
        }
3430 rajveer 2132
        iprot.readFieldEnd();
2832 chandransh 2133
      }
2134
      iprot.readStructEnd();
2135
      validate();
2136
    }
2137
 
3430 rajveer 2138
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2832 chandransh 2139
      oprot.writeStructBegin(STRUCT_DESC);
2140
 
2141
      if (this.isSetSuccess()) {
2142
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2143
        this.success.write(oprot);
2144
        oprot.writeFieldEnd();
4541 mandeep.dh 2145
      } else if (this.isSetWex()) {
2146
        oprot.writeFieldBegin(WEX_FIELD_DESC);
2147
        this.wex.write(oprot);
2148
        oprot.writeFieldEnd();
2832 chandransh 2149
      }
2150
      oprot.writeFieldStop();
2151
      oprot.writeStructEnd();
2152
    }
2153
 
2154
    @Override
2155
    public String toString() {
4496 mandeep.dh 2156
      StringBuilder sb = new StringBuilder("getInventoryItem_result(");
2832 chandransh 2157
      boolean first = true;
2158
 
2159
      sb.append("success:");
2160
      if (this.success == null) {
2161
        sb.append("null");
2162
      } else {
2163
        sb.append(this.success);
2164
      }
2165
      first = false;
4541 mandeep.dh 2166
      if (!first) sb.append(", ");
2167
      sb.append("wex:");
2168
      if (this.wex == null) {
2169
        sb.append("null");
2170
      } else {
2171
        sb.append(this.wex);
2172
      }
2173
      first = false;
2832 chandransh 2174
      sb.append(")");
2175
      return sb.toString();
2176
    }
2177
 
3430 rajveer 2178
    public void validate() throws org.apache.thrift.TException {
2832 chandransh 2179
      // check for required fields
2180
    }
2181
 
3430 rajveer 2182
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2183
      try {
2184
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2185
      } catch (org.apache.thrift.TException te) {
2186
        throw new java.io.IOException(te);
2187
      }
2188
    }
2189
 
2190
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2191
      try {
2192
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2193
      } catch (org.apache.thrift.TException te) {
2194
        throw new java.io.IOException(te);
2195
      }
2196
    }
2197
 
2832 chandransh 2198
  }
2199
 
5361 mandeep.dh 2200
  public static class getNonSeralizedInventoryItem_args implements org.apache.thrift.TBase<getNonSeralizedInventoryItem_args, getNonSeralizedInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
2201
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNonSeralizedInventoryItem_args");
2820 chandransh 2202
 
5530 mandeep.dh 2203
    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);
2204
    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);
2205
    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 2206
 
5530 mandeep.dh 2207
    private String itemNumber; // required
4496 mandeep.dh 2208
    private long itemId; // required
5530 mandeep.dh 2209
    private long fulfilmentWarehouseId; // required
2820 chandransh 2210
 
2211
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2212
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5530 mandeep.dh 2213
      ITEM_NUMBER((short)1, "itemNumber"),
2214
      ITEM_ID((short)2, "itemId"),
2215
      FULFILMENT_WAREHOUSE_ID((short)3, "fulfilmentWarehouseId");
2820 chandransh 2216
 
2217
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2218
 
2219
      static {
2220
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2221
          byName.put(field.getFieldName(), field);
2222
        }
2223
      }
2224
 
2225
      /**
2226
       * Find the _Fields constant that matches fieldId, or null if its not found.
2227
       */
2228
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2229
        switch(fieldId) {
5530 mandeep.dh 2230
          case 1: // ITEM_NUMBER
2231
            return ITEM_NUMBER;
2232
          case 2: // ITEM_ID
4496 mandeep.dh 2233
            return ITEM_ID;
5530 mandeep.dh 2234
          case 3: // FULFILMENT_WAREHOUSE_ID
2235
            return FULFILMENT_WAREHOUSE_ID;
3430 rajveer 2236
          default:
2237
            return null;
2238
        }
2820 chandransh 2239
      }
2240
 
2241
      /**
2242
       * Find the _Fields constant that matches fieldId, throwing an exception
2243
       * if it is not found.
2244
       */
2245
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2246
        _Fields fields = findByThriftId(fieldId);
2247
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2248
        return fields;
2249
      }
2250
 
2251
      /**
2252
       * Find the _Fields constant that matches name, or null if its not found.
2253
       */
2254
      public static _Fields findByName(String name) {
2255
        return byName.get(name);
2256
      }
2257
 
2258
      private final short _thriftId;
2259
      private final String _fieldName;
2260
 
2261
      _Fields(short thriftId, String fieldName) {
2262
        _thriftId = thriftId;
2263
        _fieldName = fieldName;
2264
      }
2265
 
2266
      public short getThriftFieldId() {
2267
        return _thriftId;
2268
      }
2269
 
2270
      public String getFieldName() {
2271
        return _fieldName;
2272
      }
2273
    }
2274
 
2275
    // isset id assignments
4496 mandeep.dh 2276
    private static final int __ITEMID_ISSET_ID = 0;
5530 mandeep.dh 2277
    private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 1;
5361 mandeep.dh 2278
    private BitSet __isset_bit_vector = new BitSet(2);
2820 chandransh 2279
 
3430 rajveer 2280
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 2281
    static {
3430 rajveer 2282
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5530 mandeep.dh 2283
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2284
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
4496 mandeep.dh 2285
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3430 rajveer 2286
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5530 mandeep.dh 2287
      tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 2288
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 2289
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5361 mandeep.dh 2290
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNonSeralizedInventoryItem_args.class, metaDataMap);
2820 chandransh 2291
    }
2292
 
5361 mandeep.dh 2293
    public getNonSeralizedInventoryItem_args() {
2820 chandransh 2294
    }
2295
 
5361 mandeep.dh 2296
    public getNonSeralizedInventoryItem_args(
5530 mandeep.dh 2297
      String itemNumber,
4496 mandeep.dh 2298
      long itemId,
5530 mandeep.dh 2299
      long fulfilmentWarehouseId)
2820 chandransh 2300
    {
2301
      this();
5530 mandeep.dh 2302
      this.itemNumber = itemNumber;
4496 mandeep.dh 2303
      this.itemId = itemId;
2304
      setItemIdIsSet(true);
5530 mandeep.dh 2305
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
2306
      setFulfilmentWarehouseIdIsSet(true);
2820 chandransh 2307
    }
2308
 
2309
    /**
2310
     * Performs a deep copy on <i>other</i>.
2311
     */
5361 mandeep.dh 2312
    public getNonSeralizedInventoryItem_args(getNonSeralizedInventoryItem_args other) {
2820 chandransh 2313
      __isset_bit_vector.clear();
2314
      __isset_bit_vector.or(other.__isset_bit_vector);
5530 mandeep.dh 2315
      if (other.isSetItemNumber()) {
2316
        this.itemNumber = other.itemNumber;
2317
      }
4496 mandeep.dh 2318
      this.itemId = other.itemId;
5530 mandeep.dh 2319
      this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
2820 chandransh 2320
    }
2321
 
5361 mandeep.dh 2322
    public getNonSeralizedInventoryItem_args deepCopy() {
2323
      return new getNonSeralizedInventoryItem_args(this);
2820 chandransh 2324
    }
2325
 
3430 rajveer 2326
    @Override
2327
    public void clear() {
5530 mandeep.dh 2328
      this.itemNumber = null;
4496 mandeep.dh 2329
      setItemIdIsSet(false);
2330
      this.itemId = 0;
5530 mandeep.dh 2331
      setFulfilmentWarehouseIdIsSet(false);
2332
      this.fulfilmentWarehouseId = 0;
2820 chandransh 2333
    }
2334
 
5530 mandeep.dh 2335
    public String getItemNumber() {
2336
      return this.itemNumber;
2337
    }
2338
 
2339
    public void setItemNumber(String itemNumber) {
2340
      this.itemNumber = itemNumber;
2341
    }
2342
 
2343
    public void unsetItemNumber() {
2344
      this.itemNumber = null;
2345
    }
2346
 
2347
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
2348
    public boolean isSetItemNumber() {
2349
      return this.itemNumber != null;
2350
    }
2351
 
2352
    public void setItemNumberIsSet(boolean value) {
2353
      if (!value) {
2354
        this.itemNumber = null;
2355
      }
2356
    }
2357
 
4496 mandeep.dh 2358
    public long getItemId() {
2359
      return this.itemId;
2820 chandransh 2360
    }
2361
 
4496 mandeep.dh 2362
    public void setItemId(long itemId) {
2363
      this.itemId = itemId;
2364
      setItemIdIsSet(true);
2820 chandransh 2365
    }
2366
 
4496 mandeep.dh 2367
    public void unsetItemId() {
2368
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
2820 chandransh 2369
    }
2370
 
4496 mandeep.dh 2371
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
2372
    public boolean isSetItemId() {
2373
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
2820 chandransh 2374
    }
2375
 
4496 mandeep.dh 2376
    public void setItemIdIsSet(boolean value) {
2377
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
2820 chandransh 2378
    }
2379
 
5530 mandeep.dh 2380
    public long getFulfilmentWarehouseId() {
2381
      return this.fulfilmentWarehouseId;
2820 chandransh 2382
    }
2383
 
5530 mandeep.dh 2384
    public void setFulfilmentWarehouseId(long fulfilmentWarehouseId) {
2385
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
2386
      setFulfilmentWarehouseIdIsSet(true);
2820 chandransh 2387
    }
2388
 
5530 mandeep.dh 2389
    public void unsetFulfilmentWarehouseId() {
2390
      __isset_bit_vector.clear(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 2391
    }
2392
 
5530 mandeep.dh 2393
    /** Returns true if field fulfilmentWarehouseId is set (has been assigned a value) and false otherwise */
2394
    public boolean isSetFulfilmentWarehouseId() {
2395
      return __isset_bit_vector.get(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 2396
    }
2397
 
5530 mandeep.dh 2398
    public void setFulfilmentWarehouseIdIsSet(boolean value) {
2399
      __isset_bit_vector.set(__FULFILMENTWAREHOUSEID_ISSET_ID, value);
2820 chandransh 2400
    }
2401
 
2402
    public void setFieldValue(_Fields field, Object value) {
2403
      switch (field) {
5530 mandeep.dh 2404
      case ITEM_NUMBER:
2405
        if (value == null) {
2406
          unsetItemNumber();
2407
        } else {
2408
          setItemNumber((String)value);
2409
        }
2410
        break;
2411
 
4496 mandeep.dh 2412
      case ITEM_ID:
2820 chandransh 2413
        if (value == null) {
4496 mandeep.dh 2414
          unsetItemId();
2820 chandransh 2415
        } else {
4496 mandeep.dh 2416
          setItemId((Long)value);
2820 chandransh 2417
        }
2418
        break;
2419
 
5530 mandeep.dh 2420
      case FULFILMENT_WAREHOUSE_ID:
2820 chandransh 2421
        if (value == null) {
5530 mandeep.dh 2422
          unsetFulfilmentWarehouseId();
2820 chandransh 2423
        } else {
5530 mandeep.dh 2424
          setFulfilmentWarehouseId((Long)value);
2820 chandransh 2425
        }
2426
        break;
2427
 
2428
      }
2429
    }
2430
 
2431
    public Object getFieldValue(_Fields field) {
2432
      switch (field) {
5530 mandeep.dh 2433
      case ITEM_NUMBER:
2434
        return getItemNumber();
2435
 
4496 mandeep.dh 2436
      case ITEM_ID:
2437
        return Long.valueOf(getItemId());
2820 chandransh 2438
 
5530 mandeep.dh 2439
      case FULFILMENT_WAREHOUSE_ID:
2440
        return Long.valueOf(getFulfilmentWarehouseId());
2820 chandransh 2441
 
2442
      }
2443
      throw new IllegalStateException();
2444
    }
2445
 
3430 rajveer 2446
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2447
    public boolean isSet(_Fields field) {
2448
      if (field == null) {
2449
        throw new IllegalArgumentException();
2450
      }
2820 chandransh 2451
 
2452
      switch (field) {
5530 mandeep.dh 2453
      case ITEM_NUMBER:
2454
        return isSetItemNumber();
4496 mandeep.dh 2455
      case ITEM_ID:
2456
        return isSetItemId();
5530 mandeep.dh 2457
      case FULFILMENT_WAREHOUSE_ID:
2458
        return isSetFulfilmentWarehouseId();
2820 chandransh 2459
      }
2460
      throw new IllegalStateException();
2461
    }
2462
 
2463
    @Override
2464
    public boolean equals(Object that) {
2465
      if (that == null)
2466
        return false;
5361 mandeep.dh 2467
      if (that instanceof getNonSeralizedInventoryItem_args)
2468
        return this.equals((getNonSeralizedInventoryItem_args)that);
2820 chandransh 2469
      return false;
2470
    }
2471
 
5361 mandeep.dh 2472
    public boolean equals(getNonSeralizedInventoryItem_args that) {
2820 chandransh 2473
      if (that == null)
2474
        return false;
2475
 
5530 mandeep.dh 2476
      boolean this_present_itemNumber = true && this.isSetItemNumber();
2477
      boolean that_present_itemNumber = true && that.isSetItemNumber();
2478
      if (this_present_itemNumber || that_present_itemNumber) {
2479
        if (!(this_present_itemNumber && that_present_itemNumber))
2480
          return false;
2481
        if (!this.itemNumber.equals(that.itemNumber))
2482
          return false;
2483
      }
2484
 
4496 mandeep.dh 2485
      boolean this_present_itemId = true;
2486
      boolean that_present_itemId = true;
2487
      if (this_present_itemId || that_present_itemId) {
2488
        if (!(this_present_itemId && that_present_itemId))
2820 chandransh 2489
          return false;
4496 mandeep.dh 2490
        if (this.itemId != that.itemId)
2820 chandransh 2491
          return false;
2492
      }
2493
 
5530 mandeep.dh 2494
      boolean this_present_fulfilmentWarehouseId = true;
2495
      boolean that_present_fulfilmentWarehouseId = true;
2496
      if (this_present_fulfilmentWarehouseId || that_present_fulfilmentWarehouseId) {
2497
        if (!(this_present_fulfilmentWarehouseId && that_present_fulfilmentWarehouseId))
2820 chandransh 2498
          return false;
5530 mandeep.dh 2499
        if (this.fulfilmentWarehouseId != that.fulfilmentWarehouseId)
2820 chandransh 2500
          return false;
2501
      }
2502
 
2503
      return true;
2504
    }
2505
 
2506
    @Override
2507
    public int hashCode() {
2508
      return 0;
2509
    }
2510
 
5361 mandeep.dh 2511
    public int compareTo(getNonSeralizedInventoryItem_args other) {
2820 chandransh 2512
      if (!getClass().equals(other.getClass())) {
2513
        return getClass().getName().compareTo(other.getClass().getName());
2514
      }
2515
 
2516
      int lastComparison = 0;
5361 mandeep.dh 2517
      getNonSeralizedInventoryItem_args typedOther = (getNonSeralizedInventoryItem_args)other;
2820 chandransh 2518
 
5530 mandeep.dh 2519
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
2520
      if (lastComparison != 0) {
2521
        return lastComparison;
2522
      }
2523
      if (isSetItemNumber()) {
2524
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
2525
        if (lastComparison != 0) {
2526
          return lastComparison;
2527
        }
2528
      }
4496 mandeep.dh 2529
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
2820 chandransh 2530
      if (lastComparison != 0) {
2531
        return lastComparison;
2532
      }
4496 mandeep.dh 2533
      if (isSetItemId()) {
2534
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
3430 rajveer 2535
        if (lastComparison != 0) {
2536
          return lastComparison;
2537
        }
2820 chandransh 2538
      }
5530 mandeep.dh 2539
      lastComparison = Boolean.valueOf(isSetFulfilmentWarehouseId()).compareTo(typedOther.isSetFulfilmentWarehouseId());
2820 chandransh 2540
      if (lastComparison != 0) {
2541
        return lastComparison;
2542
      }
5530 mandeep.dh 2543
      if (isSetFulfilmentWarehouseId()) {
2544
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilmentWarehouseId, typedOther.fulfilmentWarehouseId);
3430 rajveer 2545
        if (lastComparison != 0) {
2546
          return lastComparison;
2547
        }
2820 chandransh 2548
      }
2549
      return 0;
2550
    }
2551
 
3430 rajveer 2552
    public _Fields fieldForId(int fieldId) {
2553
      return _Fields.findByThriftId(fieldId);
2554
    }
2555
 
2556
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2557
      org.apache.thrift.protocol.TField field;
2820 chandransh 2558
      iprot.readStructBegin();
2559
      while (true)
2560
      {
2561
        field = iprot.readFieldBegin();
3430 rajveer 2562
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 2563
          break;
2564
        }
3430 rajveer 2565
        switch (field.id) {
5530 mandeep.dh 2566
          case 1: // ITEM_NUMBER
2567
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
2568
              this.itemNumber = iprot.readString();
2569
            } else { 
2570
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2571
            }
2572
            break;
2573
          case 2: // ITEM_ID
3430 rajveer 2574
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4496 mandeep.dh 2575
              this.itemId = iprot.readI64();
2576
              setItemIdIsSet(true);
3430 rajveer 2577
            } else { 
2578
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2579
            }
2580
            break;
5530 mandeep.dh 2581
          case 3: // FULFILMENT_WAREHOUSE_ID
4496 mandeep.dh 2582
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5530 mandeep.dh 2583
              this.fulfilmentWarehouseId = iprot.readI64();
2584
              setFulfilmentWarehouseIdIsSet(true);
3430 rajveer 2585
            } else { 
2586
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2587
            }
2588
            break;
2589
          default:
2590
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 2591
        }
3430 rajveer 2592
        iprot.readFieldEnd();
2820 chandransh 2593
      }
2594
      iprot.readStructEnd();
2595
      validate();
2596
    }
2597
 
3430 rajveer 2598
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 2599
      validate();
2600
 
2601
      oprot.writeStructBegin(STRUCT_DESC);
5530 mandeep.dh 2602
      if (this.itemNumber != null) {
2603
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
2604
        oprot.writeString(this.itemNumber);
2605
        oprot.writeFieldEnd();
2606
      }
4496 mandeep.dh 2607
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
2608
      oprot.writeI64(this.itemId);
2820 chandransh 2609
      oprot.writeFieldEnd();
5530 mandeep.dh 2610
      oprot.writeFieldBegin(FULFILMENT_WAREHOUSE_ID_FIELD_DESC);
2611
      oprot.writeI64(this.fulfilmentWarehouseId);
2820 chandransh 2612
      oprot.writeFieldEnd();
2613
      oprot.writeFieldStop();
2614
      oprot.writeStructEnd();
2615
    }
2616
 
2617
    @Override
2618
    public String toString() {
5361 mandeep.dh 2619
      StringBuilder sb = new StringBuilder("getNonSeralizedInventoryItem_args(");
2820 chandransh 2620
      boolean first = true;
2621
 
5530 mandeep.dh 2622
      sb.append("itemNumber:");
2623
      if (this.itemNumber == null) {
2624
        sb.append("null");
2625
      } else {
2626
        sb.append(this.itemNumber);
2627
      }
2628
      first = false;
2629
      if (!first) sb.append(", ");
4496 mandeep.dh 2630
      sb.append("itemId:");
2631
      sb.append(this.itemId);
2820 chandransh 2632
      first = false;
2633
      if (!first) sb.append(", ");
5530 mandeep.dh 2634
      sb.append("fulfilmentWarehouseId:");
2635
      sb.append(this.fulfilmentWarehouseId);
2820 chandransh 2636
      first = false;
2637
      sb.append(")");
2638
      return sb.toString();
2639
    }
2640
 
3430 rajveer 2641
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 2642
      // check for required fields
2643
    }
2644
 
3430 rajveer 2645
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2646
      try {
2647
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2648
      } catch (org.apache.thrift.TException te) {
2649
        throw new java.io.IOException(te);
2650
      }
2651
    }
2652
 
2653
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2654
      try {
4496 mandeep.dh 2655
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
2656
        __isset_bit_vector = new BitSet(1);
3430 rajveer 2657
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2658
      } catch (org.apache.thrift.TException te) {
2659
        throw new java.io.IOException(te);
2660
      }
2661
    }
2662
 
2820 chandransh 2663
  }
2664
 
5361 mandeep.dh 2665
  public static class getNonSeralizedInventoryItem_result implements org.apache.thrift.TBase<getNonSeralizedInventoryItem_result, getNonSeralizedInventoryItem_result._Fields>, java.io.Serializable, Cloneable   {
2666
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNonSeralizedInventoryItem_result");
2820 chandransh 2667
 
5361 mandeep.dh 2668
    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);
2669
    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 2670
 
5361 mandeep.dh 2671
    private InventoryItem success; // required
2672
    private WarehouseServiceException wex; // required
2820 chandransh 2673
 
2674
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2675
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 2676
      SUCCESS((short)0, "success"),
2677
      WEX((short)1, "wex");
2820 chandransh 2678
 
2679
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2680
 
2681
      static {
2682
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2683
          byName.put(field.getFieldName(), field);
2684
        }
2685
      }
2686
 
2687
      /**
2688
       * Find the _Fields constant that matches fieldId, or null if its not found.
2689
       */
2690
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2691
        switch(fieldId) {
2692
          case 0: // SUCCESS
2693
            return SUCCESS;
5361 mandeep.dh 2694
          case 1: // WEX
2695
            return WEX;
3430 rajveer 2696
          default:
2697
            return null;
2698
        }
2820 chandransh 2699
      }
2700
 
2701
      /**
2702
       * Find the _Fields constant that matches fieldId, throwing an exception
2703
       * if it is not found.
2704
       */
2705
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2706
        _Fields fields = findByThriftId(fieldId);
2707
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2708
        return fields;
2709
      }
2710
 
2711
      /**
2712
       * Find the _Fields constant that matches name, or null if its not found.
2713
       */
2714
      public static _Fields findByName(String name) {
2715
        return byName.get(name);
2716
      }
2717
 
2718
      private final short _thriftId;
2719
      private final String _fieldName;
2720
 
2721
      _Fields(short thriftId, String fieldName) {
2722
        _thriftId = thriftId;
2723
        _fieldName = fieldName;
2724
      }
2725
 
2726
      public short getThriftFieldId() {
2727
        return _thriftId;
2728
      }
2729
 
2730
      public String getFieldName() {
2731
        return _fieldName;
2732
      }
2733
    }
2734
 
2735
    // isset id assignments
2736
 
3430 rajveer 2737
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 2738
    static {
3430 rajveer 2739
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2740
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5361 mandeep.dh 2741
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
2742
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2743
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3430 rajveer 2744
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5361 mandeep.dh 2745
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNonSeralizedInventoryItem_result.class, metaDataMap);
2820 chandransh 2746
    }
2747
 
5361 mandeep.dh 2748
    public getNonSeralizedInventoryItem_result() {
2820 chandransh 2749
    }
2750
 
5361 mandeep.dh 2751
    public getNonSeralizedInventoryItem_result(
2752
      InventoryItem success,
2753
      WarehouseServiceException wex)
2820 chandransh 2754
    {
2755
      this();
2756
      this.success = success;
5361 mandeep.dh 2757
      this.wex = wex;
2820 chandransh 2758
    }
2759
 
2760
    /**
2761
     * Performs a deep copy on <i>other</i>.
2762
     */
5361 mandeep.dh 2763
    public getNonSeralizedInventoryItem_result(getNonSeralizedInventoryItem_result other) {
4496 mandeep.dh 2764
      if (other.isSetSuccess()) {
5361 mandeep.dh 2765
        this.success = new InventoryItem(other.success);
2820 chandransh 2766
      }
5361 mandeep.dh 2767
      if (other.isSetWex()) {
2768
        this.wex = new WarehouseServiceException(other.wex);
2769
      }
2820 chandransh 2770
    }
2771
 
5361 mandeep.dh 2772
    public getNonSeralizedInventoryItem_result deepCopy() {
2773
      return new getNonSeralizedInventoryItem_result(this);
2820 chandransh 2774
    }
2775
 
3430 rajveer 2776
    @Override
2777
    public void clear() {
4496 mandeep.dh 2778
      this.success = null;
5361 mandeep.dh 2779
      this.wex = null;
2820 chandransh 2780
    }
2781
 
5361 mandeep.dh 2782
    public InventoryItem getSuccess() {
2820 chandransh 2783
      return this.success;
2784
    }
2785
 
5361 mandeep.dh 2786
    public void setSuccess(InventoryItem success) {
2820 chandransh 2787
      this.success = success;
2788
    }
2789
 
2790
    public void unsetSuccess() {
4496 mandeep.dh 2791
      this.success = null;
2820 chandransh 2792
    }
2793
 
3430 rajveer 2794
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2820 chandransh 2795
    public boolean isSetSuccess() {
4496 mandeep.dh 2796
      return this.success != null;
2820 chandransh 2797
    }
2798
 
2799
    public void setSuccessIsSet(boolean value) {
4496 mandeep.dh 2800
      if (!value) {
2801
        this.success = null;
2802
      }
2820 chandransh 2803
    }
2804
 
5361 mandeep.dh 2805
    public WarehouseServiceException getWex() {
2806
      return this.wex;
2820 chandransh 2807
    }
2808
 
5361 mandeep.dh 2809
    public void setWex(WarehouseServiceException wex) {
2810
      this.wex = wex;
2820 chandransh 2811
    }
2812
 
5361 mandeep.dh 2813
    public void unsetWex() {
2814
      this.wex = null;
2820 chandransh 2815
    }
2816
 
5361 mandeep.dh 2817
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2818
    public boolean isSetWex() {
2819
      return this.wex != null;
2820 chandransh 2820
    }
2821
 
5361 mandeep.dh 2822
    public void setWexIsSet(boolean value) {
2823
      if (!value) {
2824
        this.wex = null;
2820 chandransh 2825
      }
2826
    }
2827
 
2828
    public void setFieldValue(_Fields field, Object value) {
2829
      switch (field) {
5361 mandeep.dh 2830
      case SUCCESS:
2820 chandransh 2831
        if (value == null) {
5361 mandeep.dh 2832
          unsetSuccess();
2820 chandransh 2833
        } else {
5361 mandeep.dh 2834
          setSuccess((InventoryItem)value);
2820 chandransh 2835
        }
2836
        break;
2837
 
5361 mandeep.dh 2838
      case WEX:
2820 chandransh 2839
        if (value == null) {
5361 mandeep.dh 2840
          unsetWex();
2820 chandransh 2841
        } else {
5361 mandeep.dh 2842
          setWex((WarehouseServiceException)value);
2820 chandransh 2843
        }
2844
        break;
2845
 
2846
      }
2847
    }
2848
 
2849
    public Object getFieldValue(_Fields field) {
2850
      switch (field) {
2851
      case SUCCESS:
4496 mandeep.dh 2852
        return getSuccess();
2820 chandransh 2853
 
5361 mandeep.dh 2854
      case WEX:
2855
        return getWex();
2856
 
2820 chandransh 2857
      }
2858
      throw new IllegalStateException();
2859
    }
2860
 
3430 rajveer 2861
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2862
    public boolean isSet(_Fields field) {
2863
      if (field == null) {
2864
        throw new IllegalArgumentException();
2865
      }
2820 chandransh 2866
 
2867
      switch (field) {
2868
      case SUCCESS:
2869
        return isSetSuccess();
5361 mandeep.dh 2870
      case WEX:
2871
        return isSetWex();
2820 chandransh 2872
      }
2873
      throw new IllegalStateException();
2874
    }
2875
 
2876
    @Override
2877
    public boolean equals(Object that) {
2878
      if (that == null)
2879
        return false;
5361 mandeep.dh 2880
      if (that instanceof getNonSeralizedInventoryItem_result)
2881
        return this.equals((getNonSeralizedInventoryItem_result)that);
2820 chandransh 2882
      return false;
2883
    }
2884
 
5361 mandeep.dh 2885
    public boolean equals(getNonSeralizedInventoryItem_result that) {
2820 chandransh 2886
      if (that == null)
2887
        return false;
2888
 
4496 mandeep.dh 2889
      boolean this_present_success = true && this.isSetSuccess();
2890
      boolean that_present_success = true && that.isSetSuccess();
2820 chandransh 2891
      if (this_present_success || that_present_success) {
2892
        if (!(this_present_success && that_present_success))
2893
          return false;
4496 mandeep.dh 2894
        if (!this.success.equals(that.success))
2820 chandransh 2895
          return false;
2896
      }
2897
 
5361 mandeep.dh 2898
      boolean this_present_wex = true && this.isSetWex();
2899
      boolean that_present_wex = true && that.isSetWex();
2900
      if (this_present_wex || that_present_wex) {
2901
        if (!(this_present_wex && that_present_wex))
4496 mandeep.dh 2902
          return false;
5361 mandeep.dh 2903
        if (!this.wex.equals(that.wex))
4496 mandeep.dh 2904
          return false;
2905
      }
2906
 
2907
      return true;
2908
    }
2909
 
2910
    @Override
2911
    public int hashCode() {
2912
      return 0;
2913
    }
2914
 
5361 mandeep.dh 2915
    public int compareTo(getNonSeralizedInventoryItem_result other) {
4496 mandeep.dh 2916
      if (!getClass().equals(other.getClass())) {
2917
        return getClass().getName().compareTo(other.getClass().getName());
2918
      }
2919
 
2920
      int lastComparison = 0;
5361 mandeep.dh 2921
      getNonSeralizedInventoryItem_result typedOther = (getNonSeralizedInventoryItem_result)other;
4496 mandeep.dh 2922
 
2923
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2924
      if (lastComparison != 0) {
2925
        return lastComparison;
2926
      }
2927
      if (isSetSuccess()) {
2928
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
2929
        if (lastComparison != 0) {
2930
          return lastComparison;
2931
        }
2932
      }
5361 mandeep.dh 2933
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 2934
      if (lastComparison != 0) {
2935
        return lastComparison;
2936
      }
5361 mandeep.dh 2937
      if (isSetWex()) {
2938
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
3430 rajveer 2939
        if (lastComparison != 0) {
2940
          return lastComparison;
2941
        }
2820 chandransh 2942
      }
2943
      return 0;
2944
    }
2945
 
3430 rajveer 2946
    public _Fields fieldForId(int fieldId) {
2947
      return _Fields.findByThriftId(fieldId);
2948
    }
2949
 
2950
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2951
      org.apache.thrift.protocol.TField field;
2820 chandransh 2952
      iprot.readStructBegin();
2953
      while (true)
2954
      {
2955
        field = iprot.readFieldBegin();
3430 rajveer 2956
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 2957
          break;
2958
        }
3430 rajveer 2959
        switch (field.id) {
5361 mandeep.dh 2960
          case 0: // SUCCESS
2961
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2962
              this.success = new InventoryItem();
2963
              this.success.read(iprot);
3430 rajveer 2964
            } else { 
2965
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2966
            }
2967
            break;
5361 mandeep.dh 2968
          case 1: // WEX
2969
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2970
              this.wex = new WarehouseServiceException();
2971
              this.wex.read(iprot);
4496 mandeep.dh 2972
            } else { 
2973
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2974
            }
2975
            break;
2976
          default:
2977
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2978
        }
2979
        iprot.readFieldEnd();
2980
      }
2981
      iprot.readStructEnd();
2982
      validate();
2983
    }
2984
 
2985
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2986
      oprot.writeStructBegin(STRUCT_DESC);
2987
 
2988
      if (this.isSetSuccess()) {
2989
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5361 mandeep.dh 2990
        this.success.write(oprot);
4496 mandeep.dh 2991
        oprot.writeFieldEnd();
5361 mandeep.dh 2992
      } else if (this.isSetWex()) {
2993
        oprot.writeFieldBegin(WEX_FIELD_DESC);
2994
        this.wex.write(oprot);
2995
        oprot.writeFieldEnd();
4496 mandeep.dh 2996
      }
2997
      oprot.writeFieldStop();
2998
      oprot.writeStructEnd();
2999
    }
3000
 
3001
    @Override
3002
    public String toString() {
5361 mandeep.dh 3003
      StringBuilder sb = new StringBuilder("getNonSeralizedInventoryItem_result(");
4496 mandeep.dh 3004
      boolean first = true;
3005
 
3006
      sb.append("success:");
3007
      if (this.success == null) {
3008
        sb.append("null");
3009
      } else {
3010
        sb.append(this.success);
3011
      }
3012
      first = false;
5361 mandeep.dh 3013
      if (!first) sb.append(", ");
3014
      sb.append("wex:");
3015
      if (this.wex == null) {
3016
        sb.append("null");
3017
      } else {
3018
        sb.append(this.wex);
3019
      }
3020
      first = false;
4496 mandeep.dh 3021
      sb.append(")");
3022
      return sb.toString();
3023
    }
3024
 
3025
    public void validate() throws org.apache.thrift.TException {
3026
      // check for required fields
3027
    }
3028
 
3029
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3030
      try {
3031
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3032
      } catch (org.apache.thrift.TException te) {
3033
        throw new java.io.IOException(te);
3034
      }
3035
    }
3036
 
3037
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3038
      try {
3039
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3040
      } catch (org.apache.thrift.TException te) {
3041
        throw new java.io.IOException(te);
3042
      }
3043
    }
3044
 
3045
  }
3046
 
3047
  public static class scan_args implements org.apache.thrift.TBase<scan_args, scan_args._Fields>, java.io.Serializable, Cloneable   {
3048
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scan_args");
3383 chandransh 3049
 
5361 mandeep.dh 3050
    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 3051
    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);
3052
    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 3053
    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 3054
 
5361 mandeep.dh 3055
    private InventoryItem inventoryItem; // required
4496 mandeep.dh 3056
    private ScanType type; // required
3057
    private long quantity; // required
5361 mandeep.dh 3058
    private long billingWarehouseId; // required
3383 chandransh 3059
 
3060
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 3061
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 3062
      INVENTORY_ITEM((short)1, "inventoryItem"),
4496 mandeep.dh 3063
      /**
3064
       * 
3065
       * @see ScanType
3066
       */
3067
      TYPE((short)2, "type"),
3068
      QUANTITY((short)3, "quantity"),
5361 mandeep.dh 3069
      BILLING_WAREHOUSE_ID((short)4, "billingWarehouseId");
3383 chandransh 3070
 
3071
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3072
 
3073
      static {
3074
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3075
          byName.put(field.getFieldName(), field);
3076
        }
3077
      }
3078
 
3079
      /**
3080
       * Find the _Fields constant that matches fieldId, or null if its not found.
3081
       */
3082
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 3083
        switch(fieldId) {
5361 mandeep.dh 3084
          case 1: // INVENTORY_ITEM
3085
            return INVENTORY_ITEM;
4496 mandeep.dh 3086
          case 2: // TYPE
3087
            return TYPE;
3088
          case 3: // QUANTITY
3089
            return QUANTITY;
5361 mandeep.dh 3090
          case 4: // BILLING_WAREHOUSE_ID
3091
            return BILLING_WAREHOUSE_ID;
3430 rajveer 3092
          default:
3093
            return null;
3094
        }
3383 chandransh 3095
      }
3096
 
3097
      /**
3098
       * Find the _Fields constant that matches fieldId, throwing an exception
3099
       * if it is not found.
3100
       */
3101
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3102
        _Fields fields = findByThriftId(fieldId);
3103
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3104
        return fields;
3105
      }
3106
 
3107
      /**
3108
       * Find the _Fields constant that matches name, or null if its not found.
3109
       */
3110
      public static _Fields findByName(String name) {
3111
        return byName.get(name);
3112
      }
3113
 
3114
      private final short _thriftId;
3115
      private final String _fieldName;
3116
 
3117
      _Fields(short thriftId, String fieldName) {
3118
        _thriftId = thriftId;
3119
        _fieldName = fieldName;
3120
      }
3121
 
3122
      public short getThriftFieldId() {
3123
        return _thriftId;
3124
      }
3125
 
3126
      public String getFieldName() {
3127
        return _fieldName;
3128
      }
3129
    }
3130
 
3131
    // isset id assignments
5361 mandeep.dh 3132
    private static final int __QUANTITY_ISSET_ID = 0;
3133
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 1;
3134
    private BitSet __isset_bit_vector = new BitSet(2);
3383 chandransh 3135
 
3430 rajveer 3136
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3383 chandransh 3137
    static {
3430 rajveer 3138
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5361 mandeep.dh 3139
      tmpMap.put(_Fields.INVENTORY_ITEM, new org.apache.thrift.meta_data.FieldMetaData("inventoryItem", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3140
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
4496 mandeep.dh 3141
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3142
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
3143
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3144
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5361 mandeep.dh 3145
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 3146
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 3147
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 3148
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scan_args.class, metaDataMap);
3383 chandransh 3149
    }
3150
 
4496 mandeep.dh 3151
    public scan_args() {
3383 chandransh 3152
    }
3153
 
4496 mandeep.dh 3154
    public scan_args(
5361 mandeep.dh 3155
      InventoryItem inventoryItem,
4496 mandeep.dh 3156
      ScanType type,
3157
      long quantity,
5361 mandeep.dh 3158
      long billingWarehouseId)
3383 chandransh 3159
    {
3160
      this();
5361 mandeep.dh 3161
      this.inventoryItem = inventoryItem;
4496 mandeep.dh 3162
      this.type = type;
3163
      this.quantity = quantity;
3164
      setQuantityIsSet(true);
5361 mandeep.dh 3165
      this.billingWarehouseId = billingWarehouseId;
3166
      setBillingWarehouseIdIsSet(true);
3383 chandransh 3167
    }
3168
 
3169
    /**
3170
     * Performs a deep copy on <i>other</i>.
3171
     */
4496 mandeep.dh 3172
    public scan_args(scan_args other) {
3383 chandransh 3173
      __isset_bit_vector.clear();
3174
      __isset_bit_vector.or(other.__isset_bit_vector);
5361 mandeep.dh 3175
      if (other.isSetInventoryItem()) {
3176
        this.inventoryItem = new InventoryItem(other.inventoryItem);
3177
      }
4496 mandeep.dh 3178
      if (other.isSetType()) {
3179
        this.type = other.type;
3180
      }
3181
      this.quantity = other.quantity;
5361 mandeep.dh 3182
      this.billingWarehouseId = other.billingWarehouseId;
3383 chandransh 3183
    }
3184
 
4496 mandeep.dh 3185
    public scan_args deepCopy() {
3186
      return new scan_args(this);
3383 chandransh 3187
    }
3188
 
3430 rajveer 3189
    @Override
3190
    public void clear() {
5361 mandeep.dh 3191
      this.inventoryItem = null;
4496 mandeep.dh 3192
      this.type = null;
3193
      setQuantityIsSet(false);
3194
      this.quantity = 0;
5361 mandeep.dh 3195
      setBillingWarehouseIdIsSet(false);
3196
      this.billingWarehouseId = 0;
3383 chandransh 3197
    }
3198
 
5361 mandeep.dh 3199
    public InventoryItem getInventoryItem() {
3200
      return this.inventoryItem;
3383 chandransh 3201
    }
3202
 
5361 mandeep.dh 3203
    public void setInventoryItem(InventoryItem inventoryItem) {
3204
      this.inventoryItem = inventoryItem;
3383 chandransh 3205
    }
3206
 
5361 mandeep.dh 3207
    public void unsetInventoryItem() {
3208
      this.inventoryItem = null;
3383 chandransh 3209
    }
3210
 
5361 mandeep.dh 3211
    /** Returns true if field inventoryItem is set (has been assigned a value) and false otherwise */
3212
    public boolean isSetInventoryItem() {
3213
      return this.inventoryItem != null;
3383 chandransh 3214
    }
3215
 
5361 mandeep.dh 3216
    public void setInventoryItemIsSet(boolean value) {
3217
      if (!value) {
3218
        this.inventoryItem = null;
3219
      }
3383 chandransh 3220
    }
3221
 
4496 mandeep.dh 3222
    /**
3223
     * 
3224
     * @see ScanType
3225
     */
3226
    public ScanType getType() {
3227
      return this.type;
3383 chandransh 3228
    }
3229
 
4496 mandeep.dh 3230
    /**
3231
     * 
3232
     * @see ScanType
3233
     */
3234
    public void setType(ScanType type) {
3235
      this.type = type;
3383 chandransh 3236
    }
3237
 
4496 mandeep.dh 3238
    public void unsetType() {
3239
      this.type = null;
3383 chandransh 3240
    }
3241
 
4496 mandeep.dh 3242
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
3243
    public boolean isSetType() {
3244
      return this.type != null;
3383 chandransh 3245
    }
3246
 
4496 mandeep.dh 3247
    public void setTypeIsSet(boolean value) {
3248
      if (!value) {
3249
        this.type = null;
3250
      }
3383 chandransh 3251
    }
3252
 
4496 mandeep.dh 3253
    public long getQuantity() {
3254
      return this.quantity;
3255
    }
3256
 
3257
    public void setQuantity(long quantity) {
3258
      this.quantity = quantity;
3259
      setQuantityIsSet(true);
3260
    }
3261
 
3262
    public void unsetQuantity() {
3263
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
3264
    }
3265
 
3266
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
3267
    public boolean isSetQuantity() {
3268
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
3269
    }
3270
 
3271
    public void setQuantityIsSet(boolean value) {
3272
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
3273
    }
3274
 
5361 mandeep.dh 3275
    public long getBillingWarehouseId() {
3276
      return this.billingWarehouseId;
4496 mandeep.dh 3277
    }
3278
 
5361 mandeep.dh 3279
    public void setBillingWarehouseId(long billingWarehouseId) {
3280
      this.billingWarehouseId = billingWarehouseId;
3281
      setBillingWarehouseIdIsSet(true);
4496 mandeep.dh 3282
    }
3283
 
5361 mandeep.dh 3284
    public void unsetBillingWarehouseId() {
3285
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 3286
    }
3287
 
5361 mandeep.dh 3288
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
3289
    public boolean isSetBillingWarehouseId() {
3290
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 3291
    }
3292
 
5361 mandeep.dh 3293
    public void setBillingWarehouseIdIsSet(boolean value) {
3294
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
4496 mandeep.dh 3295
    }
3296
 
3383 chandransh 3297
    public void setFieldValue(_Fields field, Object value) {
3298
      switch (field) {
5361 mandeep.dh 3299
      case INVENTORY_ITEM:
3383 chandransh 3300
        if (value == null) {
5361 mandeep.dh 3301
          unsetInventoryItem();
3383 chandransh 3302
        } else {
5361 mandeep.dh 3303
          setInventoryItem((InventoryItem)value);
3383 chandransh 3304
        }
3305
        break;
3306
 
4496 mandeep.dh 3307
      case TYPE:
3383 chandransh 3308
        if (value == null) {
4496 mandeep.dh 3309
          unsetType();
3383 chandransh 3310
        } else {
4496 mandeep.dh 3311
          setType((ScanType)value);
3383 chandransh 3312
        }
3313
        break;
3314
 
4496 mandeep.dh 3315
      case QUANTITY:
3316
        if (value == null) {
3317
          unsetQuantity();
3318
        } else {
3319
          setQuantity((Long)value);
3320
        }
3321
        break;
3322
 
5361 mandeep.dh 3323
      case BILLING_WAREHOUSE_ID:
4496 mandeep.dh 3324
        if (value == null) {
5361 mandeep.dh 3325
          unsetBillingWarehouseId();
4496 mandeep.dh 3326
        } else {
5361 mandeep.dh 3327
          setBillingWarehouseId((Long)value);
4496 mandeep.dh 3328
        }
3329
        break;
3330
 
3383 chandransh 3331
      }
3332
    }
3333
 
3334
    public Object getFieldValue(_Fields field) {
3335
      switch (field) {
5361 mandeep.dh 3336
      case INVENTORY_ITEM:
3337
        return getInventoryItem();
3383 chandransh 3338
 
4496 mandeep.dh 3339
      case TYPE:
3340
        return getType();
3383 chandransh 3341
 
4496 mandeep.dh 3342
      case QUANTITY:
3343
        return Long.valueOf(getQuantity());
3344
 
5361 mandeep.dh 3345
      case BILLING_WAREHOUSE_ID:
3346
        return Long.valueOf(getBillingWarehouseId());
4496 mandeep.dh 3347
 
3383 chandransh 3348
      }
3349
      throw new IllegalStateException();
3350
    }
3351
 
3430 rajveer 3352
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3353
    public boolean isSet(_Fields field) {
3354
      if (field == null) {
3355
        throw new IllegalArgumentException();
3356
      }
3383 chandransh 3357
 
3358
      switch (field) {
5361 mandeep.dh 3359
      case INVENTORY_ITEM:
3360
        return isSetInventoryItem();
4496 mandeep.dh 3361
      case TYPE:
3362
        return isSetType();
3363
      case QUANTITY:
3364
        return isSetQuantity();
5361 mandeep.dh 3365
      case BILLING_WAREHOUSE_ID:
3366
        return isSetBillingWarehouseId();
3383 chandransh 3367
      }
3368
      throw new IllegalStateException();
3369
    }
3370
 
3371
    @Override
3372
    public boolean equals(Object that) {
3373
      if (that == null)
3374
        return false;
4496 mandeep.dh 3375
      if (that instanceof scan_args)
3376
        return this.equals((scan_args)that);
3383 chandransh 3377
      return false;
3378
    }
3379
 
4496 mandeep.dh 3380
    public boolean equals(scan_args that) {
3383 chandransh 3381
      if (that == null)
3382
        return false;
3383
 
5361 mandeep.dh 3384
      boolean this_present_inventoryItem = true && this.isSetInventoryItem();
3385
      boolean that_present_inventoryItem = true && that.isSetInventoryItem();
3386
      if (this_present_inventoryItem || that_present_inventoryItem) {
3387
        if (!(this_present_inventoryItem && that_present_inventoryItem))
3383 chandransh 3388
          return false;
5361 mandeep.dh 3389
        if (!this.inventoryItem.equals(that.inventoryItem))
3383 chandransh 3390
          return false;
3391
      }
3392
 
4496 mandeep.dh 3393
      boolean this_present_type = true && this.isSetType();
3394
      boolean that_present_type = true && that.isSetType();
3395
      if (this_present_type || that_present_type) {
3396
        if (!(this_present_type && that_present_type))
3383 chandransh 3397
          return false;
4496 mandeep.dh 3398
        if (!this.type.equals(that.type))
3383 chandransh 3399
          return false;
3400
      }
3401
 
4496 mandeep.dh 3402
      boolean this_present_quantity = true;
3403
      boolean that_present_quantity = true;
3404
      if (this_present_quantity || that_present_quantity) {
3405
        if (!(this_present_quantity && that_present_quantity))
3406
          return false;
3407
        if (this.quantity != that.quantity)
3408
          return false;
3409
      }
3410
 
5361 mandeep.dh 3411
      boolean this_present_billingWarehouseId = true;
3412
      boolean that_present_billingWarehouseId = true;
3413
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
3414
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
4496 mandeep.dh 3415
          return false;
5361 mandeep.dh 3416
        if (this.billingWarehouseId != that.billingWarehouseId)
4496 mandeep.dh 3417
          return false;
3418
      }
3419
 
3383 chandransh 3420
      return true;
3421
    }
3422
 
3423
    @Override
3424
    public int hashCode() {
3425
      return 0;
3426
    }
3427
 
4496 mandeep.dh 3428
    public int compareTo(scan_args other) {
3383 chandransh 3429
      if (!getClass().equals(other.getClass())) {
3430
        return getClass().getName().compareTo(other.getClass().getName());
3431
      }
3432
 
3433
      int lastComparison = 0;
4496 mandeep.dh 3434
      scan_args typedOther = (scan_args)other;
3383 chandransh 3435
 
5361 mandeep.dh 3436
      lastComparison = Boolean.valueOf(isSetInventoryItem()).compareTo(typedOther.isSetInventoryItem());
3383 chandransh 3437
      if (lastComparison != 0) {
3438
        return lastComparison;
3439
      }
5361 mandeep.dh 3440
      if (isSetInventoryItem()) {
3441
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItem, typedOther.inventoryItem);
3430 rajveer 3442
        if (lastComparison != 0) {
3443
          return lastComparison;
3444
        }
3383 chandransh 3445
      }
4496 mandeep.dh 3446
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
3383 chandransh 3447
      if (lastComparison != 0) {
3448
        return lastComparison;
3449
      }
4496 mandeep.dh 3450
      if (isSetType()) {
3451
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 3452
        if (lastComparison != 0) {
3453
          return lastComparison;
3454
        }
3383 chandransh 3455
      }
4496 mandeep.dh 3456
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
3457
      if (lastComparison != 0) {
3458
        return lastComparison;
3459
      }
3460
      if (isSetQuantity()) {
3461
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
3462
        if (lastComparison != 0) {
3463
          return lastComparison;
3464
        }
3465
      }
5361 mandeep.dh 3466
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
4496 mandeep.dh 3467
      if (lastComparison != 0) {
3468
        return lastComparison;
3469
      }
5361 mandeep.dh 3470
      if (isSetBillingWarehouseId()) {
3471
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
4496 mandeep.dh 3472
        if (lastComparison != 0) {
3473
          return lastComparison;
3474
        }
3475
      }
3383 chandransh 3476
      return 0;
3477
    }
3478
 
3430 rajveer 3479
    public _Fields fieldForId(int fieldId) {
3480
      return _Fields.findByThriftId(fieldId);
3481
    }
3482
 
3483
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3484
      org.apache.thrift.protocol.TField field;
3383 chandransh 3485
      iprot.readStructBegin();
3486
      while (true)
3487
      {
3488
        field = iprot.readFieldBegin();
3430 rajveer 3489
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3383 chandransh 3490
          break;
3491
        }
3430 rajveer 3492
        switch (field.id) {
5361 mandeep.dh 3493
          case 1: // INVENTORY_ITEM
3494
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3495
              this.inventoryItem = new InventoryItem();
3496
              this.inventoryItem.read(iprot);
3430 rajveer 3497
            } else { 
3498
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3499
            }
3500
            break;
4496 mandeep.dh 3501
          case 2: // TYPE
3502
            if (field.type == org.apache.thrift.protocol.TType.I32) {
3503
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 3504
            } else { 
3505
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3506
            }
3507
            break;
4496 mandeep.dh 3508
          case 3: // QUANTITY
3509
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3510
              this.quantity = iprot.readI64();
3511
              setQuantityIsSet(true);
3512
            } else { 
3513
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3514
            }
3515
            break;
5361 mandeep.dh 3516
          case 4: // BILLING_WAREHOUSE_ID
4496 mandeep.dh 3517
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5361 mandeep.dh 3518
              this.billingWarehouseId = iprot.readI64();
3519
              setBillingWarehouseIdIsSet(true);
4496 mandeep.dh 3520
            } else { 
3521
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3522
            }
3523
            break;
3430 rajveer 3524
          default:
3525
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3383 chandransh 3526
        }
3430 rajveer 3527
        iprot.readFieldEnd();
3383 chandransh 3528
      }
3529
      iprot.readStructEnd();
3530
      validate();
3531
    }
3532
 
3430 rajveer 3533
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3383 chandransh 3534
      validate();
3535
 
3536
      oprot.writeStructBegin(STRUCT_DESC);
5361 mandeep.dh 3537
      if (this.inventoryItem != null) {
3538
        oprot.writeFieldBegin(INVENTORY_ITEM_FIELD_DESC);
3539
        this.inventoryItem.write(oprot);
3540
        oprot.writeFieldEnd();
3541
      }
4496 mandeep.dh 3542
      if (this.type != null) {
3543
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
3544
        oprot.writeI32(this.type.getValue());
3545
        oprot.writeFieldEnd();
3546
      }
3547
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
3548
      oprot.writeI64(this.quantity);
3383 chandransh 3549
      oprot.writeFieldEnd();
5361 mandeep.dh 3550
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
3551
      oprot.writeI64(this.billingWarehouseId);
4496 mandeep.dh 3552
      oprot.writeFieldEnd();
3383 chandransh 3553
      oprot.writeFieldStop();
3554
      oprot.writeStructEnd();
3555
    }
3556
 
3557
    @Override
3558
    public String toString() {
4496 mandeep.dh 3559
      StringBuilder sb = new StringBuilder("scan_args(");
3383 chandransh 3560
      boolean first = true;
3561
 
5361 mandeep.dh 3562
      sb.append("inventoryItem:");
3563
      if (this.inventoryItem == null) {
3564
        sb.append("null");
3565
      } else {
3566
        sb.append(this.inventoryItem);
3567
      }
3383 chandransh 3568
      first = false;
3569
      if (!first) sb.append(", ");
4496 mandeep.dh 3570
      sb.append("type:");
3571
      if (this.type == null) {
3572
        sb.append("null");
3573
      } else {
3574
        sb.append(this.type);
3575
      }
3383 chandransh 3576
      first = false;
4496 mandeep.dh 3577
      if (!first) sb.append(", ");
3578
      sb.append("quantity:");
3579
      sb.append(this.quantity);
3580
      first = false;
3581
      if (!first) sb.append(", ");
5361 mandeep.dh 3582
      sb.append("billingWarehouseId:");
3583
      sb.append(this.billingWarehouseId);
4496 mandeep.dh 3584
      first = false;
3383 chandransh 3585
      sb.append(")");
3586
      return sb.toString();
3587
    }
3588
 
3430 rajveer 3589
    public void validate() throws org.apache.thrift.TException {
3383 chandransh 3590
      // check for required fields
3591
    }
3592
 
3430 rajveer 3593
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3594
      try {
3595
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3596
      } catch (org.apache.thrift.TException te) {
3597
        throw new java.io.IOException(te);
3598
      }
3599
    }
3600
 
3601
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3602
      try {
4496 mandeep.dh 3603
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
3604
        __isset_bit_vector = new BitSet(1);
3430 rajveer 3605
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3606
      } catch (org.apache.thrift.TException te) {
3607
        throw new java.io.IOException(te);
3608
      }
3609
    }
3610
 
3383 chandransh 3611
  }
3612
 
4496 mandeep.dh 3613
  public static class scan_result implements org.apache.thrift.TBase<scan_result, scan_result._Fields>, java.io.Serializable, Cloneable   {
3614
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scan_result");
3383 chandransh 3615
 
3430 rajveer 3616
    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 3617
 
3430 rajveer 3618
    private WarehouseServiceException wex; // required
3383 chandransh 3619
 
3620
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 3621
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3383 chandransh 3622
      WEX((short)1, "wex");
3623
 
3624
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3625
 
3626
      static {
3627
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3628
          byName.put(field.getFieldName(), field);
3629
        }
3630
      }
3631
 
3632
      /**
3633
       * Find the _Fields constant that matches fieldId, or null if its not found.
3634
       */
3635
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 3636
        switch(fieldId) {
3637
          case 1: // WEX
3638
            return WEX;
3639
          default:
3640
            return null;
3641
        }
3383 chandransh 3642
      }
3643
 
3644
      /**
3645
       * Find the _Fields constant that matches fieldId, throwing an exception
3646
       * if it is not found.
3647
       */
3648
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3649
        _Fields fields = findByThriftId(fieldId);
3650
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3651
        return fields;
3652
      }
3653
 
3654
      /**
3655
       * Find the _Fields constant that matches name, or null if its not found.
3656
       */
3657
      public static _Fields findByName(String name) {
3658
        return byName.get(name);
3659
      }
3660
 
3661
      private final short _thriftId;
3662
      private final String _fieldName;
3663
 
3664
      _Fields(short thriftId, String fieldName) {
3665
        _thriftId = thriftId;
3666
        _fieldName = fieldName;
3667
      }
3668
 
3669
      public short getThriftFieldId() {
3670
        return _thriftId;
3671
      }
3672
 
3673
      public String getFieldName() {
3674
        return _fieldName;
3675
      }
3676
    }
3677
 
3678
    // isset id assignments
3679
 
3430 rajveer 3680
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3383 chandransh 3681
    static {
3430 rajveer 3682
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3683
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3684
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3685
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 3686
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scan_result.class, metaDataMap);
3383 chandransh 3687
    }
3688
 
4496 mandeep.dh 3689
    public scan_result() {
3383 chandransh 3690
    }
3691
 
4496 mandeep.dh 3692
    public scan_result(
3383 chandransh 3693
      WarehouseServiceException wex)
3694
    {
3695
      this();
3696
      this.wex = wex;
3697
    }
3698
 
3699
    /**
3700
     * Performs a deep copy on <i>other</i>.
3701
     */
4496 mandeep.dh 3702
    public scan_result(scan_result other) {
3383 chandransh 3703
      if (other.isSetWex()) {
3704
        this.wex = new WarehouseServiceException(other.wex);
3705
      }
3706
    }
3707
 
4496 mandeep.dh 3708
    public scan_result deepCopy() {
3709
      return new scan_result(this);
3383 chandransh 3710
    }
3711
 
3430 rajveer 3712
    @Override
3713
    public void clear() {
3714
      this.wex = null;
3383 chandransh 3715
    }
3716
 
3717
    public WarehouseServiceException getWex() {
3718
      return this.wex;
3719
    }
3720
 
3430 rajveer 3721
    public void setWex(WarehouseServiceException wex) {
3383 chandransh 3722
      this.wex = wex;
3723
    }
3724
 
3725
    public void unsetWex() {
3726
      this.wex = null;
3727
    }
3728
 
3430 rajveer 3729
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
3383 chandransh 3730
    public boolean isSetWex() {
3731
      return this.wex != null;
3732
    }
3733
 
3734
    public void setWexIsSet(boolean value) {
3735
      if (!value) {
3736
        this.wex = null;
3737
      }
3738
    }
3739
 
3740
    public void setFieldValue(_Fields field, Object value) {
3741
      switch (field) {
3742
      case WEX:
3743
        if (value == null) {
3744
          unsetWex();
3745
        } else {
3746
          setWex((WarehouseServiceException)value);
3747
        }
3748
        break;
3749
 
3750
      }
3751
    }
3752
 
3753
    public Object getFieldValue(_Fields field) {
3754
      switch (field) {
3755
      case WEX:
3756
        return getWex();
3757
 
3758
      }
3759
      throw new IllegalStateException();
3760
    }
3761
 
3430 rajveer 3762
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3763
    public boolean isSet(_Fields field) {
3764
      if (field == null) {
3765
        throw new IllegalArgumentException();
3766
      }
3383 chandransh 3767
 
3768
      switch (field) {
3769
      case WEX:
3770
        return isSetWex();
3771
      }
3772
      throw new IllegalStateException();
3773
    }
3774
 
3775
    @Override
3776
    public boolean equals(Object that) {
3777
      if (that == null)
3778
        return false;
4496 mandeep.dh 3779
      if (that instanceof scan_result)
3780
        return this.equals((scan_result)that);
3383 chandransh 3781
      return false;
3782
    }
3783
 
4496 mandeep.dh 3784
    public boolean equals(scan_result that) {
3383 chandransh 3785
      if (that == null)
3786
        return false;
3787
 
3788
      boolean this_present_wex = true && this.isSetWex();
3789
      boolean that_present_wex = true && that.isSetWex();
3790
      if (this_present_wex || that_present_wex) {
3791
        if (!(this_present_wex && that_present_wex))
3792
          return false;
3793
        if (!this.wex.equals(that.wex))
3794
          return false;
3795
      }
3796
 
3797
      return true;
3798
    }
3799
 
3800
    @Override
3801
    public int hashCode() {
3802
      return 0;
3803
    }
3804
 
4496 mandeep.dh 3805
    public int compareTo(scan_result other) {
3383 chandransh 3806
      if (!getClass().equals(other.getClass())) {
3807
        return getClass().getName().compareTo(other.getClass().getName());
3808
      }
3809
 
3810
      int lastComparison = 0;
4496 mandeep.dh 3811
      scan_result typedOther = (scan_result)other;
3383 chandransh 3812
 
3430 rajveer 3813
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
3383 chandransh 3814
      if (lastComparison != 0) {
3815
        return lastComparison;
3816
      }
3430 rajveer 3817
      if (isSetWex()) {
3818
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
3819
        if (lastComparison != 0) {
3820
          return lastComparison;
3821
        }
3383 chandransh 3822
      }
3823
      return 0;
3824
    }
3825
 
3430 rajveer 3826
    public _Fields fieldForId(int fieldId) {
3827
      return _Fields.findByThriftId(fieldId);
3828
    }
3829
 
3830
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3831
      org.apache.thrift.protocol.TField field;
3383 chandransh 3832
      iprot.readStructBegin();
3833
      while (true)
3834
      {
3835
        field = iprot.readFieldBegin();
3430 rajveer 3836
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3383 chandransh 3837
          break;
3838
        }
3430 rajveer 3839
        switch (field.id) {
3840
          case 1: // WEX
3841
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3842
              this.wex = new WarehouseServiceException();
3843
              this.wex.read(iprot);
3844
            } else { 
3845
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3846
            }
3847
            break;
3848
          default:
3849
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3383 chandransh 3850
        }
3430 rajveer 3851
        iprot.readFieldEnd();
3383 chandransh 3852
      }
3853
      iprot.readStructEnd();
3854
      validate();
3855
    }
3856
 
3430 rajveer 3857
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3383 chandransh 3858
      oprot.writeStructBegin(STRUCT_DESC);
3859
 
4496 mandeep.dh 3860
      if (this.isSetWex()) {
3383 chandransh 3861
        oprot.writeFieldBegin(WEX_FIELD_DESC);
3862
        this.wex.write(oprot);
3863
        oprot.writeFieldEnd();
3864
      }
3865
      oprot.writeFieldStop();
3866
      oprot.writeStructEnd();
3867
    }
3868
 
3869
    @Override
3870
    public String toString() {
4496 mandeep.dh 3871
      StringBuilder sb = new StringBuilder("scan_result(");
3383 chandransh 3872
      boolean first = true;
3873
 
3874
      sb.append("wex:");
3875
      if (this.wex == null) {
3876
        sb.append("null");
3877
      } else {
3878
        sb.append(this.wex);
3879
      }
3880
      first = false;
3881
      sb.append(")");
3882
      return sb.toString();
3883
    }
3884
 
3430 rajveer 3885
    public void validate() throws org.apache.thrift.TException {
3383 chandransh 3886
      // check for required fields
3887
    }
3888
 
3430 rajveer 3889
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3890
      try {
3891
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3892
      } catch (org.apache.thrift.TException te) {
3893
        throw new java.io.IOException(te);
3894
      }
3895
    }
3896
 
3897
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3898
      try {
3899
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3900
      } catch (org.apache.thrift.TException te) {
3901
        throw new java.io.IOException(te);
3902
      }
3903
    }
3904
 
3383 chandransh 3905
  }
3906
 
4496 mandeep.dh 3907
  public static class scanSerializedItemForOrder_args implements org.apache.thrift.TBase<scanSerializedItemForOrder_args, scanSerializedItemForOrder_args._Fields>, java.io.Serializable, Cloneable   {
3908
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItemForOrder_args");
2820 chandransh 3909
 
4555 mandeep.dh 3910
    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 3911
    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);
3912
    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 3913
    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);
3914
    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);
3915
    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 3916
 
4555 mandeep.dh 3917
    private String serialNumber; // required
3430 rajveer 3918
    private ScanType type; // required
4496 mandeep.dh 3919
    private long orderId; // required
5110 mandeep.dh 3920
    private long fulfilmentWarehouseId; // required
3921
    private double quantity; // required
3922
    private long billingWarehouseId; // required
2820 chandransh 3923
 
3924
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 3925
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4555 mandeep.dh 3926
      SERIAL_NUMBER((short)1, "serialNumber"),
2820 chandransh 3927
      /**
3928
       * 
3929
       * @see ScanType
3930
       */
4496 mandeep.dh 3931
      TYPE((short)2, "type"),
3932
      ORDER_ID((short)3, "orderId"),
5110 mandeep.dh 3933
      FULFILMENT_WAREHOUSE_ID((short)4, "fulfilmentWarehouseId"),
3934
      QUANTITY((short)5, "quantity"),
3935
      BILLING_WAREHOUSE_ID((short)6, "billingWarehouseId");
2820 chandransh 3936
 
3937
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3938
 
3939
      static {
3940
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3941
          byName.put(field.getFieldName(), field);
3942
        }
3943
      }
3944
 
3945
      /**
3946
       * Find the _Fields constant that matches fieldId, or null if its not found.
3947
       */
3948
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 3949
        switch(fieldId) {
4555 mandeep.dh 3950
          case 1: // SERIAL_NUMBER
3951
            return SERIAL_NUMBER;
4496 mandeep.dh 3952
          case 2: // TYPE
3430 rajveer 3953
            return TYPE;
4496 mandeep.dh 3954
          case 3: // ORDER_ID
3955
            return ORDER_ID;
5110 mandeep.dh 3956
          case 4: // FULFILMENT_WAREHOUSE_ID
3957
            return FULFILMENT_WAREHOUSE_ID;
3958
          case 5: // QUANTITY
3959
            return QUANTITY;
3960
          case 6: // BILLING_WAREHOUSE_ID
3961
            return BILLING_WAREHOUSE_ID;
3430 rajveer 3962
          default:
3963
            return null;
3964
        }
2820 chandransh 3965
      }
3966
 
3967
      /**
3968
       * Find the _Fields constant that matches fieldId, throwing an exception
3969
       * if it is not found.
3970
       */
3971
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3972
        _Fields fields = findByThriftId(fieldId);
3973
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3974
        return fields;
3975
      }
3976
 
3977
      /**
3978
       * Find the _Fields constant that matches name, or null if its not found.
3979
       */
3980
      public static _Fields findByName(String name) {
3981
        return byName.get(name);
3982
      }
3983
 
3984
      private final short _thriftId;
3985
      private final String _fieldName;
3986
 
3987
      _Fields(short thriftId, String fieldName) {
3988
        _thriftId = thriftId;
3989
        _fieldName = fieldName;
3990
      }
3991
 
3992
      public short getThriftFieldId() {
3993
        return _thriftId;
3994
      }
3995
 
3996
      public String getFieldName() {
3997
        return _fieldName;
3998
      }
3999
    }
4000
 
4001
    // isset id assignments
4555 mandeep.dh 4002
    private static final int __ORDERID_ISSET_ID = 0;
5110 mandeep.dh 4003
    private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 1;
4004
    private static final int __QUANTITY_ISSET_ID = 2;
4005
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 3;
4006
    private BitSet __isset_bit_vector = new BitSet(4);
2820 chandransh 4007
 
3430 rajveer 4008
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 4009
    static {
3430 rajveer 4010
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4555 mandeep.dh 4011
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4012
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
3430 rajveer 4013
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4014
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
4496 mandeep.dh 4015
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4016
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 4017
      tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 4018
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 4019
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4020
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
4021
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4022
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 4023
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 4024
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanSerializedItemForOrder_args.class, metaDataMap);
2820 chandransh 4025
    }
4026
 
4496 mandeep.dh 4027
    public scanSerializedItemForOrder_args() {
2820 chandransh 4028
    }
4029
 
4496 mandeep.dh 4030
    public scanSerializedItemForOrder_args(
4555 mandeep.dh 4031
      String serialNumber,
4496 mandeep.dh 4032
      ScanType type,
4033
      long orderId,
5110 mandeep.dh 4034
      long fulfilmentWarehouseId,
4035
      double quantity,
4036
      long billingWarehouseId)
2820 chandransh 4037
    {
4038
      this();
4555 mandeep.dh 4039
      this.serialNumber = serialNumber;
2820 chandransh 4040
      this.type = type;
4496 mandeep.dh 4041
      this.orderId = orderId;
4042
      setOrderIdIsSet(true);
5110 mandeep.dh 4043
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
4044
      setFulfilmentWarehouseIdIsSet(true);
4045
      this.quantity = quantity;
4046
      setQuantityIsSet(true);
4047
      this.billingWarehouseId = billingWarehouseId;
4048
      setBillingWarehouseIdIsSet(true);
2820 chandransh 4049
    }
4050
 
4051
    /**
4052
     * Performs a deep copy on <i>other</i>.
4053
     */
4496 mandeep.dh 4054
    public scanSerializedItemForOrder_args(scanSerializedItemForOrder_args other) {
2820 chandransh 4055
      __isset_bit_vector.clear();
4056
      __isset_bit_vector.or(other.__isset_bit_vector);
4555 mandeep.dh 4057
      if (other.isSetSerialNumber()) {
4058
        this.serialNumber = other.serialNumber;
4059
      }
2820 chandransh 4060
      if (other.isSetType()) {
4061
        this.type = other.type;
4062
      }
4496 mandeep.dh 4063
      this.orderId = other.orderId;
5110 mandeep.dh 4064
      this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
4065
      this.quantity = other.quantity;
4066
      this.billingWarehouseId = other.billingWarehouseId;
2820 chandransh 4067
    }
4068
 
4496 mandeep.dh 4069
    public scanSerializedItemForOrder_args deepCopy() {
4070
      return new scanSerializedItemForOrder_args(this);
2820 chandransh 4071
    }
4072
 
3430 rajveer 4073
    @Override
4074
    public void clear() {
4555 mandeep.dh 4075
      this.serialNumber = null;
3430 rajveer 4076
      this.type = null;
4496 mandeep.dh 4077
      setOrderIdIsSet(false);
4078
      this.orderId = 0;
5110 mandeep.dh 4079
      setFulfilmentWarehouseIdIsSet(false);
4080
      this.fulfilmentWarehouseId = 0;
4081
      setQuantityIsSet(false);
4082
      this.quantity = 0.0;
4083
      setBillingWarehouseIdIsSet(false);
4084
      this.billingWarehouseId = 0;
2820 chandransh 4085
    }
4086
 
4555 mandeep.dh 4087
    public String getSerialNumber() {
4088
      return this.serialNumber;
2820 chandransh 4089
    }
4090
 
4555 mandeep.dh 4091
    public void setSerialNumber(String serialNumber) {
4092
      this.serialNumber = serialNumber;
2820 chandransh 4093
    }
4094
 
4555 mandeep.dh 4095
    public void unsetSerialNumber() {
4096
      this.serialNumber = null;
2820 chandransh 4097
    }
4098
 
4555 mandeep.dh 4099
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
4100
    public boolean isSetSerialNumber() {
4101
      return this.serialNumber != null;
2820 chandransh 4102
    }
4103
 
4555 mandeep.dh 4104
    public void setSerialNumberIsSet(boolean value) {
4105
      if (!value) {
4106
        this.serialNumber = null;
4107
      }
2820 chandransh 4108
    }
4109
 
4496 mandeep.dh 4110
    /**
4111
     * 
4112
     * @see ScanType
4113
     */
4114
    public ScanType getType() {
4115
      return this.type;
2820 chandransh 4116
    }
4117
 
4496 mandeep.dh 4118
    /**
4119
     * 
4120
     * @see ScanType
4121
     */
4122
    public void setType(ScanType type) {
4123
      this.type = type;
2820 chandransh 4124
    }
4125
 
4496 mandeep.dh 4126
    public void unsetType() {
4127
      this.type = null;
2820 chandransh 4128
    }
4129
 
4496 mandeep.dh 4130
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
4131
    public boolean isSetType() {
4132
      return this.type != null;
2820 chandransh 4133
    }
4134
 
4496 mandeep.dh 4135
    public void setTypeIsSet(boolean value) {
2820 chandransh 4136
      if (!value) {
4496 mandeep.dh 4137
        this.type = null;
2820 chandransh 4138
      }
4139
    }
4140
 
4496 mandeep.dh 4141
    public long getOrderId() {
4142
      return this.orderId;
2820 chandransh 4143
    }
4144
 
4496 mandeep.dh 4145
    public void setOrderId(long orderId) {
4146
      this.orderId = orderId;
4147
      setOrderIdIsSet(true);
2820 chandransh 4148
    }
4149
 
4496 mandeep.dh 4150
    public void unsetOrderId() {
4151
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
2820 chandransh 4152
    }
4153
 
4496 mandeep.dh 4154
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
4155
    public boolean isSetOrderId() {
4156
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
2820 chandransh 4157
    }
4158
 
4496 mandeep.dh 4159
    public void setOrderIdIsSet(boolean value) {
4160
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
2820 chandransh 4161
    }
4162
 
5110 mandeep.dh 4163
    public long getFulfilmentWarehouseId() {
4164
      return this.fulfilmentWarehouseId;
2820 chandransh 4165
    }
4166
 
5110 mandeep.dh 4167
    public void setFulfilmentWarehouseId(long fulfilmentWarehouseId) {
4168
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
4169
      setFulfilmentWarehouseIdIsSet(true);
2820 chandransh 4170
    }
4171
 
5110 mandeep.dh 4172
    public void unsetFulfilmentWarehouseId() {
4173
      __isset_bit_vector.clear(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 4174
    }
4175
 
5110 mandeep.dh 4176
    /** Returns true if field fulfilmentWarehouseId is set (has been assigned a value) and false otherwise */
4177
    public boolean isSetFulfilmentWarehouseId() {
4178
      return __isset_bit_vector.get(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 4179
    }
4180
 
5110 mandeep.dh 4181
    public void setFulfilmentWarehouseIdIsSet(boolean value) {
4182
      __isset_bit_vector.set(__FULFILMENTWAREHOUSEID_ISSET_ID, value);
2820 chandransh 4183
    }
4184
 
5110 mandeep.dh 4185
    public double getQuantity() {
4186
      return this.quantity;
4187
    }
4188
 
4189
    public void setQuantity(double quantity) {
4190
      this.quantity = quantity;
4191
      setQuantityIsSet(true);
4192
    }
4193
 
4194
    public void unsetQuantity() {
4195
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
4196
    }
4197
 
4198
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
4199
    public boolean isSetQuantity() {
4200
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
4201
    }
4202
 
4203
    public void setQuantityIsSet(boolean value) {
4204
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
4205
    }
4206
 
4207
    public long getBillingWarehouseId() {
4208
      return this.billingWarehouseId;
4209
    }
4210
 
4211
    public void setBillingWarehouseId(long billingWarehouseId) {
4212
      this.billingWarehouseId = billingWarehouseId;
4213
      setBillingWarehouseIdIsSet(true);
4214
    }
4215
 
4216
    public void unsetBillingWarehouseId() {
4217
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
4218
    }
4219
 
4220
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
4221
    public boolean isSetBillingWarehouseId() {
4222
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
4223
    }
4224
 
4225
    public void setBillingWarehouseIdIsSet(boolean value) {
4226
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
4227
    }
4228
 
2820 chandransh 4229
    public void setFieldValue(_Fields field, Object value) {
4230
      switch (field) {
4555 mandeep.dh 4231
      case SERIAL_NUMBER:
2820 chandransh 4232
        if (value == null) {
4555 mandeep.dh 4233
          unsetSerialNumber();
2820 chandransh 4234
        } else {
4555 mandeep.dh 4235
          setSerialNumber((String)value);
2820 chandransh 4236
        }
4237
        break;
4238
 
4496 mandeep.dh 4239
      case TYPE:
2820 chandransh 4240
        if (value == null) {
4496 mandeep.dh 4241
          unsetType();
2820 chandransh 4242
        } else {
4496 mandeep.dh 4243
          setType((ScanType)value);
2820 chandransh 4244
        }
4245
        break;
4246
 
4496 mandeep.dh 4247
      case ORDER_ID:
2820 chandransh 4248
        if (value == null) {
4496 mandeep.dh 4249
          unsetOrderId();
2820 chandransh 4250
        } else {
4496 mandeep.dh 4251
          setOrderId((Long)value);
2820 chandransh 4252
        }
4253
        break;
4254
 
5110 mandeep.dh 4255
      case FULFILMENT_WAREHOUSE_ID:
2820 chandransh 4256
        if (value == null) {
5110 mandeep.dh 4257
          unsetFulfilmentWarehouseId();
2820 chandransh 4258
        } else {
5110 mandeep.dh 4259
          setFulfilmentWarehouseId((Long)value);
2820 chandransh 4260
        }
4261
        break;
4262
 
5110 mandeep.dh 4263
      case QUANTITY:
4264
        if (value == null) {
4265
          unsetQuantity();
4266
        } else {
4267
          setQuantity((Double)value);
4268
        }
4269
        break;
4270
 
4271
      case BILLING_WAREHOUSE_ID:
4272
        if (value == null) {
4273
          unsetBillingWarehouseId();
4274
        } else {
4275
          setBillingWarehouseId((Long)value);
4276
        }
4277
        break;
4278
 
2820 chandransh 4279
      }
4280
    }
4281
 
4282
    public Object getFieldValue(_Fields field) {
4283
      switch (field) {
4555 mandeep.dh 4284
      case SERIAL_NUMBER:
4285
        return getSerialNumber();
2820 chandransh 4286
 
4287
      case TYPE:
4288
        return getType();
4289
 
4496 mandeep.dh 4290
      case ORDER_ID:
4291
        return Long.valueOf(getOrderId());
4292
 
5110 mandeep.dh 4293
      case FULFILMENT_WAREHOUSE_ID:
4294
        return Long.valueOf(getFulfilmentWarehouseId());
4496 mandeep.dh 4295
 
5110 mandeep.dh 4296
      case QUANTITY:
4297
        return Double.valueOf(getQuantity());
4298
 
4299
      case BILLING_WAREHOUSE_ID:
4300
        return Long.valueOf(getBillingWarehouseId());
4301
 
2820 chandransh 4302
      }
4303
      throw new IllegalStateException();
4304
    }
4305
 
3430 rajveer 4306
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4307
    public boolean isSet(_Fields field) {
4308
      if (field == null) {
4309
        throw new IllegalArgumentException();
4310
      }
2820 chandransh 4311
 
4312
      switch (field) {
4555 mandeep.dh 4313
      case SERIAL_NUMBER:
4314
        return isSetSerialNumber();
2820 chandransh 4315
      case TYPE:
4316
        return isSetType();
4496 mandeep.dh 4317
      case ORDER_ID:
4318
        return isSetOrderId();
5110 mandeep.dh 4319
      case FULFILMENT_WAREHOUSE_ID:
4320
        return isSetFulfilmentWarehouseId();
4321
      case QUANTITY:
4322
        return isSetQuantity();
4323
      case BILLING_WAREHOUSE_ID:
4324
        return isSetBillingWarehouseId();
2820 chandransh 4325
      }
4326
      throw new IllegalStateException();
4327
    }
4328
 
4329
    @Override
4330
    public boolean equals(Object that) {
4331
      if (that == null)
4332
        return false;
4496 mandeep.dh 4333
      if (that instanceof scanSerializedItemForOrder_args)
4334
        return this.equals((scanSerializedItemForOrder_args)that);
2820 chandransh 4335
      return false;
4336
    }
4337
 
4496 mandeep.dh 4338
    public boolean equals(scanSerializedItemForOrder_args that) {
2820 chandransh 4339
      if (that == null)
4340
        return false;
4341
 
4555 mandeep.dh 4342
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
4343
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
4344
      if (this_present_serialNumber || that_present_serialNumber) {
4345
        if (!(this_present_serialNumber && that_present_serialNumber))
2820 chandransh 4346
          return false;
4555 mandeep.dh 4347
        if (!this.serialNumber.equals(that.serialNumber))
2820 chandransh 4348
          return false;
4349
      }
4350
 
4496 mandeep.dh 4351
      boolean this_present_type = true && this.isSetType();
4352
      boolean that_present_type = true && that.isSetType();
4353
      if (this_present_type || that_present_type) {
4354
        if (!(this_present_type && that_present_type))
2820 chandransh 4355
          return false;
4496 mandeep.dh 4356
        if (!this.type.equals(that.type))
2820 chandransh 4357
          return false;
4358
      }
4359
 
4496 mandeep.dh 4360
      boolean this_present_orderId = true;
4361
      boolean that_present_orderId = true;
4362
      if (this_present_orderId || that_present_orderId) {
4363
        if (!(this_present_orderId && that_present_orderId))
2820 chandransh 4364
          return false;
4496 mandeep.dh 4365
        if (this.orderId != that.orderId)
2820 chandransh 4366
          return false;
4367
      }
4368
 
5110 mandeep.dh 4369
      boolean this_present_fulfilmentWarehouseId = true;
4370
      boolean that_present_fulfilmentWarehouseId = true;
4371
      if (this_present_fulfilmentWarehouseId || that_present_fulfilmentWarehouseId) {
4372
        if (!(this_present_fulfilmentWarehouseId && that_present_fulfilmentWarehouseId))
2820 chandransh 4373
          return false;
5110 mandeep.dh 4374
        if (this.fulfilmentWarehouseId != that.fulfilmentWarehouseId)
2820 chandransh 4375
          return false;
4376
      }
4377
 
5110 mandeep.dh 4378
      boolean this_present_quantity = true;
4379
      boolean that_present_quantity = true;
4380
      if (this_present_quantity || that_present_quantity) {
4381
        if (!(this_present_quantity && that_present_quantity))
4382
          return false;
4383
        if (this.quantity != that.quantity)
4384
          return false;
4385
      }
4386
 
4387
      boolean this_present_billingWarehouseId = true;
4388
      boolean that_present_billingWarehouseId = true;
4389
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
4390
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
4391
          return false;
4392
        if (this.billingWarehouseId != that.billingWarehouseId)
4393
          return false;
4394
      }
4395
 
2820 chandransh 4396
      return true;
4397
    }
4398
 
4399
    @Override
4400
    public int hashCode() {
4401
      return 0;
4402
    }
4403
 
4496 mandeep.dh 4404
    public int compareTo(scanSerializedItemForOrder_args other) {
2820 chandransh 4405
      if (!getClass().equals(other.getClass())) {
4406
        return getClass().getName().compareTo(other.getClass().getName());
4407
      }
4408
 
4409
      int lastComparison = 0;
4496 mandeep.dh 4410
      scanSerializedItemForOrder_args typedOther = (scanSerializedItemForOrder_args)other;
2820 chandransh 4411
 
4555 mandeep.dh 4412
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
2820 chandransh 4413
      if (lastComparison != 0) {
4414
        return lastComparison;
4415
      }
4555 mandeep.dh 4416
      if (isSetSerialNumber()) {
4417
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
3430 rajveer 4418
        if (lastComparison != 0) {
4419
          return lastComparison;
4420
        }
2820 chandransh 4421
      }
4496 mandeep.dh 4422
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
2820 chandransh 4423
      if (lastComparison != 0) {
4424
        return lastComparison;
4425
      }
4496 mandeep.dh 4426
      if (isSetType()) {
4427
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 4428
        if (lastComparison != 0) {
4429
          return lastComparison;
4430
        }
2820 chandransh 4431
      }
4496 mandeep.dh 4432
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
2820 chandransh 4433
      if (lastComparison != 0) {
4434
        return lastComparison;
4435
      }
4496 mandeep.dh 4436
      if (isSetOrderId()) {
4437
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
3430 rajveer 4438
        if (lastComparison != 0) {
4439
          return lastComparison;
4440
        }
2820 chandransh 4441
      }
5110 mandeep.dh 4442
      lastComparison = Boolean.valueOf(isSetFulfilmentWarehouseId()).compareTo(typedOther.isSetFulfilmentWarehouseId());
2820 chandransh 4443
      if (lastComparison != 0) {
4444
        return lastComparison;
4445
      }
5110 mandeep.dh 4446
      if (isSetFulfilmentWarehouseId()) {
4447
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilmentWarehouseId, typedOther.fulfilmentWarehouseId);
3430 rajveer 4448
        if (lastComparison != 0) {
4449
          return lastComparison;
4450
        }
2820 chandransh 4451
      }
5110 mandeep.dh 4452
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
4453
      if (lastComparison != 0) {
4454
        return lastComparison;
4455
      }
4456
      if (isSetQuantity()) {
4457
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
4458
        if (lastComparison != 0) {
4459
          return lastComparison;
4460
        }
4461
      }
4462
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
4463
      if (lastComparison != 0) {
4464
        return lastComparison;
4465
      }
4466
      if (isSetBillingWarehouseId()) {
4467
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
4468
        if (lastComparison != 0) {
4469
          return lastComparison;
4470
        }
4471
      }
2820 chandransh 4472
      return 0;
4473
    }
4474
 
3430 rajveer 4475
    public _Fields fieldForId(int fieldId) {
4476
      return _Fields.findByThriftId(fieldId);
4477
    }
4478
 
4479
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4480
      org.apache.thrift.protocol.TField field;
2820 chandransh 4481
      iprot.readStructBegin();
4482
      while (true)
4483
      {
4484
        field = iprot.readFieldBegin();
3430 rajveer 4485
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 4486
          break;
4487
        }
3430 rajveer 4488
        switch (field.id) {
4555 mandeep.dh 4489
          case 1: // SERIAL_NUMBER
4490
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
4491
              this.serialNumber = iprot.readString();
3430 rajveer 4492
            } else { 
4493
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4494
            }
4495
            break;
4496 mandeep.dh 4496
          case 2: // TYPE
4497
            if (field.type == org.apache.thrift.protocol.TType.I32) {
4498
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 4499
            } else { 
4500
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4501
            }
4502
            break;
4496 mandeep.dh 4503
          case 3: // ORDER_ID
4504
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4505
              this.orderId = iprot.readI64();
4506
              setOrderIdIsSet(true);
3430 rajveer 4507
            } else { 
4508
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4509
            }
4510
            break;
5110 mandeep.dh 4511
          case 4: // FULFILMENT_WAREHOUSE_ID
4496 mandeep.dh 4512
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5110 mandeep.dh 4513
              this.fulfilmentWarehouseId = iprot.readI64();
4514
              setFulfilmentWarehouseIdIsSet(true);
3430 rajveer 4515
            } else { 
4516
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4517
            }
4518
            break;
5110 mandeep.dh 4519
          case 5: // QUANTITY
4520
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
4521
              this.quantity = iprot.readDouble();
4522
              setQuantityIsSet(true);
4523
            } else { 
4524
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4525
            }
4526
            break;
4527
          case 6: // BILLING_WAREHOUSE_ID
4528
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4529
              this.billingWarehouseId = iprot.readI64();
4530
              setBillingWarehouseIdIsSet(true);
4531
            } else { 
4532
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4533
            }
4534
            break;
3430 rajveer 4535
          default:
4536
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 4537
        }
3430 rajveer 4538
        iprot.readFieldEnd();
2820 chandransh 4539
      }
4540
      iprot.readStructEnd();
4541
      validate();
4542
    }
4543
 
3430 rajveer 4544
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 4545
      validate();
4546
 
4547
      oprot.writeStructBegin(STRUCT_DESC);
4555 mandeep.dh 4548
      if (this.serialNumber != null) {
4549
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
4550
        oprot.writeString(this.serialNumber);
4551
        oprot.writeFieldEnd();
4552
      }
2820 chandransh 4553
      if (this.type != null) {
4554
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
4555
        oprot.writeI32(this.type.getValue());
4556
        oprot.writeFieldEnd();
4557
      }
4496 mandeep.dh 4558
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
4559
      oprot.writeI64(this.orderId);
4560
      oprot.writeFieldEnd();
5110 mandeep.dh 4561
      oprot.writeFieldBegin(FULFILMENT_WAREHOUSE_ID_FIELD_DESC);
4562
      oprot.writeI64(this.fulfilmentWarehouseId);
4496 mandeep.dh 4563
      oprot.writeFieldEnd();
5110 mandeep.dh 4564
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
4565
      oprot.writeDouble(this.quantity);
4566
      oprot.writeFieldEnd();
4567
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
4568
      oprot.writeI64(this.billingWarehouseId);
4569
      oprot.writeFieldEnd();
2820 chandransh 4570
      oprot.writeFieldStop();
4571
      oprot.writeStructEnd();
4572
    }
4573
 
4574
    @Override
4575
    public String toString() {
4496 mandeep.dh 4576
      StringBuilder sb = new StringBuilder("scanSerializedItemForOrder_args(");
2820 chandransh 4577
      boolean first = true;
4578
 
4555 mandeep.dh 4579
      sb.append("serialNumber:");
4580
      if (this.serialNumber == null) {
4581
        sb.append("null");
4582
      } else {
4583
        sb.append(this.serialNumber);
4584
      }
2820 chandransh 4585
      first = false;
4586
      if (!first) sb.append(", ");
4496 mandeep.dh 4587
      sb.append("type:");
4588
      if (this.type == null) {
2820 chandransh 4589
        sb.append("null");
4590
      } else {
4496 mandeep.dh 4591
        sb.append(this.type);
2820 chandransh 4592
      }
4593
      first = false;
4594
      if (!first) sb.append(", ");
4496 mandeep.dh 4595
      sb.append("orderId:");
4596
      sb.append(this.orderId);
2820 chandransh 4597
      first = false;
4598
      if (!first) sb.append(", ");
5110 mandeep.dh 4599
      sb.append("fulfilmentWarehouseId:");
4600
      sb.append(this.fulfilmentWarehouseId);
2820 chandransh 4601
      first = false;
5110 mandeep.dh 4602
      if (!first) sb.append(", ");
4603
      sb.append("quantity:");
4604
      sb.append(this.quantity);
4605
      first = false;
4606
      if (!first) sb.append(", ");
4607
      sb.append("billingWarehouseId:");
4608
      sb.append(this.billingWarehouseId);
4609
      first = false;
2820 chandransh 4610
      sb.append(")");
4611
      return sb.toString();
4612
    }
4613
 
3430 rajveer 4614
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 4615
      // check for required fields
4616
    }
4617
 
3430 rajveer 4618
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4619
      try {
4620
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4621
      } catch (org.apache.thrift.TException te) {
4622
        throw new java.io.IOException(te);
4623
      }
4624
    }
4625
 
4626
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4627
      try {
4628
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4629
      } catch (org.apache.thrift.TException te) {
4630
        throw new java.io.IOException(te);
4631
      }
4632
    }
4633
 
2820 chandransh 4634
  }
4635
 
4496 mandeep.dh 4636
  public static class scanSerializedItemForOrder_result implements org.apache.thrift.TBase<scanSerializedItemForOrder_result, scanSerializedItemForOrder_result._Fields>, java.io.Serializable, Cloneable   {
4637
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItemForOrder_result");
2820 chandransh 4638
 
4555 mandeep.dh 4639
    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 4640
    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 4641
 
4555 mandeep.dh 4642
    private InventoryItem success; // required
3430 rajveer 4643
    private WarehouseServiceException wex; // required
2820 chandransh 4644
 
4645
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4646
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 4647
      SUCCESS((short)0, "success"),
2820 chandransh 4648
      WEX((short)1, "wex");
4649
 
4650
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4651
 
4652
      static {
4653
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4654
          byName.put(field.getFieldName(), field);
4655
        }
4656
      }
4657
 
4658
      /**
4659
       * Find the _Fields constant that matches fieldId, or null if its not found.
4660
       */
4661
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4662
        switch(fieldId) {
4496 mandeep.dh 4663
          case 0: // SUCCESS
4664
            return SUCCESS;
3430 rajveer 4665
          case 1: // WEX
4666
            return WEX;
4667
          default:
4668
            return null;
4669
        }
2820 chandransh 4670
      }
4671
 
4672
      /**
4673
       * Find the _Fields constant that matches fieldId, throwing an exception
4674
       * if it is not found.
4675
       */
4676
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4677
        _Fields fields = findByThriftId(fieldId);
4678
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4679
        return fields;
4680
      }
4681
 
4682
      /**
4683
       * Find the _Fields constant that matches name, or null if its not found.
4684
       */
4685
      public static _Fields findByName(String name) {
4686
        return byName.get(name);
4687
      }
4688
 
4689
      private final short _thriftId;
4690
      private final String _fieldName;
4691
 
4692
      _Fields(short thriftId, String fieldName) {
4693
        _thriftId = thriftId;
4694
        _fieldName = fieldName;
4695
      }
4696
 
4697
      public short getThriftFieldId() {
4698
        return _thriftId;
4699
      }
4700
 
4701
      public String getFieldName() {
4702
        return _fieldName;
4703
      }
4704
    }
4705
 
4706
    // isset id assignments
4707
 
3430 rajveer 4708
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 4709
    static {
3430 rajveer 4710
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 4711
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 4712
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 4713
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4714
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4715
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 4716
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanSerializedItemForOrder_result.class, metaDataMap);
2820 chandransh 4717
    }
4718
 
4496 mandeep.dh 4719
    public scanSerializedItemForOrder_result() {
2820 chandransh 4720
    }
4721
 
4496 mandeep.dh 4722
    public scanSerializedItemForOrder_result(
4555 mandeep.dh 4723
      InventoryItem success,
2820 chandransh 4724
      WarehouseServiceException wex)
4725
    {
4726
      this();
4496 mandeep.dh 4727
      this.success = success;
2820 chandransh 4728
      this.wex = wex;
4729
    }
4730
 
4731
    /**
4732
     * Performs a deep copy on <i>other</i>.
4733
     */
4496 mandeep.dh 4734
    public scanSerializedItemForOrder_result(scanSerializedItemForOrder_result other) {
4555 mandeep.dh 4735
      if (other.isSetSuccess()) {
4736
        this.success = new InventoryItem(other.success);
4737
      }
2820 chandransh 4738
      if (other.isSetWex()) {
4739
        this.wex = new WarehouseServiceException(other.wex);
4740
      }
4741
    }
4742
 
4496 mandeep.dh 4743
    public scanSerializedItemForOrder_result deepCopy() {
4744
      return new scanSerializedItemForOrder_result(this);
2820 chandransh 4745
    }
4746
 
3430 rajveer 4747
    @Override
4748
    public void clear() {
4555 mandeep.dh 4749
      this.success = null;
3430 rajveer 4750
      this.wex = null;
2820 chandransh 4751
    }
4752
 
4555 mandeep.dh 4753
    public InventoryItem getSuccess() {
4496 mandeep.dh 4754
      return this.success;
4755
    }
4756
 
4555 mandeep.dh 4757
    public void setSuccess(InventoryItem success) {
4496 mandeep.dh 4758
      this.success = success;
4759
    }
4760
 
4761
    public void unsetSuccess() {
4555 mandeep.dh 4762
      this.success = null;
4496 mandeep.dh 4763
    }
4764
 
4765
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
4766
    public boolean isSetSuccess() {
4555 mandeep.dh 4767
      return this.success != null;
4496 mandeep.dh 4768
    }
4769
 
4770
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 4771
      if (!value) {
4772
        this.success = null;
4773
      }
4496 mandeep.dh 4774
    }
4775
 
2820 chandransh 4776
    public WarehouseServiceException getWex() {
4777
      return this.wex;
4778
    }
4779
 
3430 rajveer 4780
    public void setWex(WarehouseServiceException wex) {
2820 chandransh 4781
      this.wex = wex;
4782
    }
4783
 
4784
    public void unsetWex() {
4785
      this.wex = null;
4786
    }
4787
 
3430 rajveer 4788
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2820 chandransh 4789
    public boolean isSetWex() {
4790
      return this.wex != null;
4791
    }
4792
 
4793
    public void setWexIsSet(boolean value) {
4794
      if (!value) {
4795
        this.wex = null;
4796
      }
4797
    }
4798
 
4799
    public void setFieldValue(_Fields field, Object value) {
4800
      switch (field) {
4496 mandeep.dh 4801
      case SUCCESS:
4802
        if (value == null) {
4803
          unsetSuccess();
4804
        } else {
4555 mandeep.dh 4805
          setSuccess((InventoryItem)value);
4496 mandeep.dh 4806
        }
4807
        break;
4808
 
2820 chandransh 4809
      case WEX:
4810
        if (value == null) {
4811
          unsetWex();
4812
        } else {
4813
          setWex((WarehouseServiceException)value);
4814
        }
4815
        break;
4816
 
4817
      }
4818
    }
4819
 
4820
    public Object getFieldValue(_Fields field) {
4821
      switch (field) {
4496 mandeep.dh 4822
      case SUCCESS:
4555 mandeep.dh 4823
        return getSuccess();
4496 mandeep.dh 4824
 
2820 chandransh 4825
      case WEX:
4826
        return getWex();
4827
 
4828
      }
4829
      throw new IllegalStateException();
4830
    }
4831
 
3430 rajveer 4832
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4833
    public boolean isSet(_Fields field) {
4834
      if (field == null) {
4835
        throw new IllegalArgumentException();
4836
      }
2820 chandransh 4837
 
4838
      switch (field) {
4496 mandeep.dh 4839
      case SUCCESS:
4840
        return isSetSuccess();
2820 chandransh 4841
      case WEX:
4842
        return isSetWex();
4843
      }
4844
      throw new IllegalStateException();
4845
    }
4846
 
4847
    @Override
4848
    public boolean equals(Object that) {
4849
      if (that == null)
4850
        return false;
4496 mandeep.dh 4851
      if (that instanceof scanSerializedItemForOrder_result)
4852
        return this.equals((scanSerializedItemForOrder_result)that);
2820 chandransh 4853
      return false;
4854
    }
4855
 
4496 mandeep.dh 4856
    public boolean equals(scanSerializedItemForOrder_result that) {
2820 chandransh 4857
      if (that == null)
4858
        return false;
4859
 
4555 mandeep.dh 4860
      boolean this_present_success = true && this.isSetSuccess();
4861
      boolean that_present_success = true && that.isSetSuccess();
4496 mandeep.dh 4862
      if (this_present_success || that_present_success) {
4863
        if (!(this_present_success && that_present_success))
4864
          return false;
4555 mandeep.dh 4865
        if (!this.success.equals(that.success))
4496 mandeep.dh 4866
          return false;
4867
      }
4868
 
2820 chandransh 4869
      boolean this_present_wex = true && this.isSetWex();
4870
      boolean that_present_wex = true && that.isSetWex();
4871
      if (this_present_wex || that_present_wex) {
4872
        if (!(this_present_wex && that_present_wex))
4873
          return false;
4874
        if (!this.wex.equals(that.wex))
4875
          return false;
4876
      }
4877
 
4878
      return true;
4879
    }
4880
 
4881
    @Override
4882
    public int hashCode() {
4883
      return 0;
4884
    }
4885
 
4496 mandeep.dh 4886
    public int compareTo(scanSerializedItemForOrder_result other) {
2820 chandransh 4887
      if (!getClass().equals(other.getClass())) {
4888
        return getClass().getName().compareTo(other.getClass().getName());
4889
      }
4890
 
4891
      int lastComparison = 0;
4496 mandeep.dh 4892
      scanSerializedItemForOrder_result typedOther = (scanSerializedItemForOrder_result)other;
2820 chandransh 4893
 
4496 mandeep.dh 4894
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
4895
      if (lastComparison != 0) {
4896
        return lastComparison;
4897
      }
4898
      if (isSetSuccess()) {
4899
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4900
        if (lastComparison != 0) {
4901
          return lastComparison;
4902
        }
4903
      }
3430 rajveer 4904
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 4905
      if (lastComparison != 0) {
4906
        return lastComparison;
4907
      }
3430 rajveer 4908
      if (isSetWex()) {
4909
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
4910
        if (lastComparison != 0) {
4911
          return lastComparison;
4912
        }
2820 chandransh 4913
      }
4914
      return 0;
4915
    }
4916
 
3430 rajveer 4917
    public _Fields fieldForId(int fieldId) {
4918
      return _Fields.findByThriftId(fieldId);
4919
    }
4920
 
4921
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4922
      org.apache.thrift.protocol.TField field;
2820 chandransh 4923
      iprot.readStructBegin();
4924
      while (true)
4925
      {
4926
        field = iprot.readFieldBegin();
3430 rajveer 4927
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 4928
          break;
4929
        }
3430 rajveer 4930
        switch (field.id) {
4496 mandeep.dh 4931
          case 0: // SUCCESS
4555 mandeep.dh 4932
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4933
              this.success = new InventoryItem();
4934
              this.success.read(iprot);
4496 mandeep.dh 4935
            } else { 
4936
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4937
            }
4938
            break;
3430 rajveer 4939
          case 1: // WEX
4940
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4941
              this.wex = new WarehouseServiceException();
4942
              this.wex.read(iprot);
4943
            } else { 
4944
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4945
            }
4946
            break;
4947
          default:
4948
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 4949
        }
3430 rajveer 4950
        iprot.readFieldEnd();
2820 chandransh 4951
      }
4952
      iprot.readStructEnd();
4953
      validate();
4954
    }
4955
 
3430 rajveer 4956
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 4957
      oprot.writeStructBegin(STRUCT_DESC);
4958
 
4496 mandeep.dh 4959
      if (this.isSetSuccess()) {
4960
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 4961
        this.success.write(oprot);
4496 mandeep.dh 4962
        oprot.writeFieldEnd();
4963
      } else if (this.isSetWex()) {
2820 chandransh 4964
        oprot.writeFieldBegin(WEX_FIELD_DESC);
4965
        this.wex.write(oprot);
4966
        oprot.writeFieldEnd();
4967
      }
4968
      oprot.writeFieldStop();
4969
      oprot.writeStructEnd();
4970
    }
4971
 
4972
    @Override
4973
    public String toString() {
4496 mandeep.dh 4974
      StringBuilder sb = new StringBuilder("scanSerializedItemForOrder_result(");
2820 chandransh 4975
      boolean first = true;
4976
 
4496 mandeep.dh 4977
      sb.append("success:");
4555 mandeep.dh 4978
      if (this.success == null) {
4979
        sb.append("null");
4980
      } else {
4981
        sb.append(this.success);
4982
      }
4496 mandeep.dh 4983
      first = false;
4984
      if (!first) sb.append(", ");
2820 chandransh 4985
      sb.append("wex:");
4986
      if (this.wex == null) {
4987
        sb.append("null");
4988
      } else {
4989
        sb.append(this.wex);
4990
      }
4991
      first = false;
4992
      sb.append(")");
4993
      return sb.toString();
4994
    }
4995
 
3430 rajveer 4996
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 4997
      // check for required fields
4998
    }
4999
 
3430 rajveer 5000
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5001
      try {
5002
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5003
      } catch (org.apache.thrift.TException te) {
5004
        throw new java.io.IOException(te);
5005
      }
5006
    }
5007
 
5008
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5009
      try {
5010
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5011
      } catch (org.apache.thrift.TException te) {
5012
        throw new java.io.IOException(te);
5013
      }
5014
    }
5015
 
2820 chandransh 5016
  }
5017
 
4496 mandeep.dh 5018
  public static class scanForOrder_args implements org.apache.thrift.TBase<scanForOrder_args, scanForOrder_args._Fields>, java.io.Serializable, Cloneable   {
5019
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOrder_args");
2820 chandransh 5020
 
5361 mandeep.dh 5021
    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 5022
    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);
5023
    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);
5024
    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 5025
    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 5026
    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 5027
 
5361 mandeep.dh 5028
    private InventoryItem inventoryItem; // required
3430 rajveer 5029
    private ScanType type; // required
4496 mandeep.dh 5030
    private long quantity; // required
5031
    private long orderId; // required
5110 mandeep.dh 5032
    private long fulfilmentWarehouseId; // required
5361 mandeep.dh 5033
    private long billingWarehouseId; // required
2820 chandransh 5034
 
5035
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 5036
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 5037
      INVENTORY_ITEM((short)1, "inventoryItem"),
2820 chandransh 5038
      /**
5039
       * 
5040
       * @see ScanType
5041
       */
4496 mandeep.dh 5042
      TYPE((short)2, "type"),
5043
      QUANTITY((short)3, "quantity"),
5044
      ORDER_ID((short)4, "orderId"),
5361 mandeep.dh 5045
      FULFILMENT_WAREHOUSE_ID((short)5, "fulfilmentWarehouseId"),
5046
      BILLING_WAREHOUSE_ID((short)6, "billingWarehouseId");
2820 chandransh 5047
 
5048
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5049
 
5050
      static {
5051
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5052
          byName.put(field.getFieldName(), field);
5053
        }
5054
      }
5055
 
5056
      /**
5057
       * Find the _Fields constant that matches fieldId, or null if its not found.
5058
       */
5059
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 5060
        switch(fieldId) {
5361 mandeep.dh 5061
          case 1: // INVENTORY_ITEM
5062
            return INVENTORY_ITEM;
4496 mandeep.dh 5063
          case 2: // TYPE
3430 rajveer 5064
            return TYPE;
4496 mandeep.dh 5065
          case 3: // QUANTITY
5066
            return QUANTITY;
5067
          case 4: // ORDER_ID
5068
            return ORDER_ID;
5110 mandeep.dh 5069
          case 5: // FULFILMENT_WAREHOUSE_ID
5070
            return FULFILMENT_WAREHOUSE_ID;
5361 mandeep.dh 5071
          case 6: // BILLING_WAREHOUSE_ID
5072
            return BILLING_WAREHOUSE_ID;
3430 rajveer 5073
          default:
5074
            return null;
5075
        }
2820 chandransh 5076
      }
5077
 
5078
      /**
5079
       * Find the _Fields constant that matches fieldId, throwing an exception
5080
       * if it is not found.
5081
       */
5082
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5083
        _Fields fields = findByThriftId(fieldId);
5084
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5085
        return fields;
5086
      }
5087
 
5088
      /**
5089
       * Find the _Fields constant that matches name, or null if its not found.
5090
       */
5091
      public static _Fields findByName(String name) {
5092
        return byName.get(name);
5093
      }
5094
 
5095
      private final short _thriftId;
5096
      private final String _fieldName;
5097
 
5098
      _Fields(short thriftId, String fieldName) {
5099
        _thriftId = thriftId;
5100
        _fieldName = fieldName;
5101
      }
5102
 
5103
      public short getThriftFieldId() {
5104
        return _thriftId;
5105
      }
5106
 
5107
      public String getFieldName() {
5108
        return _fieldName;
5109
      }
5110
    }
5111
 
5112
    // isset id assignments
5361 mandeep.dh 5113
    private static final int __QUANTITY_ISSET_ID = 0;
5114
    private static final int __ORDERID_ISSET_ID = 1;
5115
    private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 2;
5116
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 3;
4496 mandeep.dh 5117
    private BitSet __isset_bit_vector = new BitSet(4);
2820 chandransh 5118
 
3430 rajveer 5119
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 5120
    static {
3430 rajveer 5121
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5361 mandeep.dh 5122
      tmpMap.put(_Fields.INVENTORY_ITEM, new org.apache.thrift.meta_data.FieldMetaData("inventoryItem", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5123
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 5124
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5125
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
4496 mandeep.dh 5126
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5127
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5128
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5129
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 5130
      tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 5131
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5361 mandeep.dh 5132
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5133
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 5134
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 5135
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOrder_args.class, metaDataMap);
2820 chandransh 5136
    }
5137
 
4496 mandeep.dh 5138
    public scanForOrder_args() {
2820 chandransh 5139
    }
5140
 
4496 mandeep.dh 5141
    public scanForOrder_args(
5361 mandeep.dh 5142
      InventoryItem inventoryItem,
4496 mandeep.dh 5143
      ScanType type,
5144
      long quantity,
5145
      long orderId,
5361 mandeep.dh 5146
      long fulfilmentWarehouseId,
5147
      long billingWarehouseId)
2820 chandransh 5148
    {
5149
      this();
5361 mandeep.dh 5150
      this.inventoryItem = inventoryItem;
2820 chandransh 5151
      this.type = type;
4496 mandeep.dh 5152
      this.quantity = quantity;
5153
      setQuantityIsSet(true);
5154
      this.orderId = orderId;
5155
      setOrderIdIsSet(true);
5110 mandeep.dh 5156
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
5157
      setFulfilmentWarehouseIdIsSet(true);
5361 mandeep.dh 5158
      this.billingWarehouseId = billingWarehouseId;
5159
      setBillingWarehouseIdIsSet(true);
2820 chandransh 5160
    }
5161
 
5162
    /**
5163
     * Performs a deep copy on <i>other</i>.
5164
     */
4496 mandeep.dh 5165
    public scanForOrder_args(scanForOrder_args other) {
5166
      __isset_bit_vector.clear();
5167
      __isset_bit_vector.or(other.__isset_bit_vector);
5361 mandeep.dh 5168
      if (other.isSetInventoryItem()) {
5169
        this.inventoryItem = new InventoryItem(other.inventoryItem);
5170
      }
2820 chandransh 5171
      if (other.isSetType()) {
5172
        this.type = other.type;
5173
      }
4496 mandeep.dh 5174
      this.quantity = other.quantity;
5175
      this.orderId = other.orderId;
5110 mandeep.dh 5176
      this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
5361 mandeep.dh 5177
      this.billingWarehouseId = other.billingWarehouseId;
2820 chandransh 5178
    }
5179
 
4496 mandeep.dh 5180
    public scanForOrder_args deepCopy() {
5181
      return new scanForOrder_args(this);
2820 chandransh 5182
    }
5183
 
3430 rajveer 5184
    @Override
5185
    public void clear() {
5361 mandeep.dh 5186
      this.inventoryItem = null;
3430 rajveer 5187
      this.type = null;
4496 mandeep.dh 5188
      setQuantityIsSet(false);
5189
      this.quantity = 0;
5190
      setOrderIdIsSet(false);
5191
      this.orderId = 0;
5110 mandeep.dh 5192
      setFulfilmentWarehouseIdIsSet(false);
5193
      this.fulfilmentWarehouseId = 0;
5361 mandeep.dh 5194
      setBillingWarehouseIdIsSet(false);
5195
      this.billingWarehouseId = 0;
2820 chandransh 5196
    }
5197
 
5361 mandeep.dh 5198
    public InventoryItem getInventoryItem() {
5199
      return this.inventoryItem;
2820 chandransh 5200
    }
5201
 
5361 mandeep.dh 5202
    public void setInventoryItem(InventoryItem inventoryItem) {
5203
      this.inventoryItem = inventoryItem;
2820 chandransh 5204
    }
5205
 
5361 mandeep.dh 5206
    public void unsetInventoryItem() {
5207
      this.inventoryItem = null;
2820 chandransh 5208
    }
5209
 
5361 mandeep.dh 5210
    /** Returns true if field inventoryItem is set (has been assigned a value) and false otherwise */
5211
    public boolean isSetInventoryItem() {
5212
      return this.inventoryItem != null;
2820 chandransh 5213
    }
5214
 
5361 mandeep.dh 5215
    public void setInventoryItemIsSet(boolean value) {
5216
      if (!value) {
5217
        this.inventoryItem = null;
5218
      }
2820 chandransh 5219
    }
5220
 
5221
    /**
5222
     * 
5223
     * @see ScanType
5224
     */
5225
    public ScanType getType() {
5226
      return this.type;
5227
    }
5228
 
5229
    /**
5230
     * 
5231
     * @see ScanType
5232
     */
3430 rajveer 5233
    public void setType(ScanType type) {
2820 chandransh 5234
      this.type = type;
5235
    }
5236
 
5237
    public void unsetType() {
5238
      this.type = null;
5239
    }
5240
 
3430 rajveer 5241
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
2820 chandransh 5242
    public boolean isSetType() {
5243
      return this.type != null;
5244
    }
5245
 
5246
    public void setTypeIsSet(boolean value) {
5247
      if (!value) {
5248
        this.type = null;
5249
      }
5250
    }
5251
 
4496 mandeep.dh 5252
    public long getQuantity() {
5253
      return this.quantity;
5254
    }
5255
 
5256
    public void setQuantity(long quantity) {
5257
      this.quantity = quantity;
5258
      setQuantityIsSet(true);
5259
    }
5260
 
5261
    public void unsetQuantity() {
5262
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
5263
    }
5264
 
5265
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
5266
    public boolean isSetQuantity() {
5267
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
5268
    }
5269
 
5270
    public void setQuantityIsSet(boolean value) {
5271
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
5272
    }
5273
 
5274
    public long getOrderId() {
5275
      return this.orderId;
5276
    }
5277
 
5278
    public void setOrderId(long orderId) {
5279
      this.orderId = orderId;
5280
      setOrderIdIsSet(true);
5281
    }
5282
 
5283
    public void unsetOrderId() {
5284
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
5285
    }
5286
 
5287
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
5288
    public boolean isSetOrderId() {
5289
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
5290
    }
5291
 
5292
    public void setOrderIdIsSet(boolean value) {
5293
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
5294
    }
5295
 
5110 mandeep.dh 5296
    public long getFulfilmentWarehouseId() {
5297
      return this.fulfilmentWarehouseId;
4496 mandeep.dh 5298
    }
5299
 
5110 mandeep.dh 5300
    public void setFulfilmentWarehouseId(long fulfilmentWarehouseId) {
5301
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
5302
      setFulfilmentWarehouseIdIsSet(true);
4496 mandeep.dh 5303
    }
5304
 
5110 mandeep.dh 5305
    public void unsetFulfilmentWarehouseId() {
5306
      __isset_bit_vector.clear(__FULFILMENTWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 5307
    }
5308
 
5110 mandeep.dh 5309
    /** Returns true if field fulfilmentWarehouseId is set (has been assigned a value) and false otherwise */
5310
    public boolean isSetFulfilmentWarehouseId() {
5311
      return __isset_bit_vector.get(__FULFILMENTWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 5312
    }
5313
 
5110 mandeep.dh 5314
    public void setFulfilmentWarehouseIdIsSet(boolean value) {
5315
      __isset_bit_vector.set(__FULFILMENTWAREHOUSEID_ISSET_ID, value);
4496 mandeep.dh 5316
    }
5317
 
5361 mandeep.dh 5318
    public long getBillingWarehouseId() {
5319
      return this.billingWarehouseId;
5320
    }
5321
 
5322
    public void setBillingWarehouseId(long billingWarehouseId) {
5323
      this.billingWarehouseId = billingWarehouseId;
5324
      setBillingWarehouseIdIsSet(true);
5325
    }
5326
 
5327
    public void unsetBillingWarehouseId() {
5328
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
5329
    }
5330
 
5331
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
5332
    public boolean isSetBillingWarehouseId() {
5333
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
5334
    }
5335
 
5336
    public void setBillingWarehouseIdIsSet(boolean value) {
5337
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
5338
    }
5339
 
2820 chandransh 5340
    public void setFieldValue(_Fields field, Object value) {
5341
      switch (field) {
5361 mandeep.dh 5342
      case INVENTORY_ITEM:
2820 chandransh 5343
        if (value == null) {
5361 mandeep.dh 5344
          unsetInventoryItem();
2820 chandransh 5345
        } else {
5361 mandeep.dh 5346
          setInventoryItem((InventoryItem)value);
2820 chandransh 5347
        }
5348
        break;
5349
 
4496 mandeep.dh 5350
      case TYPE:
2820 chandransh 5351
        if (value == null) {
4496 mandeep.dh 5352
          unsetType();
2820 chandransh 5353
        } else {
4496 mandeep.dh 5354
          setType((ScanType)value);
2820 chandransh 5355
        }
5356
        break;
5357
 
4496 mandeep.dh 5358
      case QUANTITY:
2820 chandransh 5359
        if (value == null) {
4496 mandeep.dh 5360
          unsetQuantity();
2820 chandransh 5361
        } else {
4496 mandeep.dh 5362
          setQuantity((Long)value);
2820 chandransh 5363
        }
5364
        break;
5365
 
4496 mandeep.dh 5366
      case ORDER_ID:
5367
        if (value == null) {
5368
          unsetOrderId();
5369
        } else {
5370
          setOrderId((Long)value);
5371
        }
5372
        break;
5373
 
5110 mandeep.dh 5374
      case FULFILMENT_WAREHOUSE_ID:
4496 mandeep.dh 5375
        if (value == null) {
5110 mandeep.dh 5376
          unsetFulfilmentWarehouseId();
4496 mandeep.dh 5377
        } else {
5110 mandeep.dh 5378
          setFulfilmentWarehouseId((Long)value);
4496 mandeep.dh 5379
        }
5380
        break;
5381
 
5361 mandeep.dh 5382
      case BILLING_WAREHOUSE_ID:
5383
        if (value == null) {
5384
          unsetBillingWarehouseId();
5385
        } else {
5386
          setBillingWarehouseId((Long)value);
5387
        }
5388
        break;
5389
 
2820 chandransh 5390
      }
5391
    }
5392
 
5393
    public Object getFieldValue(_Fields field) {
5394
      switch (field) {
5361 mandeep.dh 5395
      case INVENTORY_ITEM:
5396
        return getInventoryItem();
2820 chandransh 5397
 
5398
      case TYPE:
5399
        return getType();
5400
 
4496 mandeep.dh 5401
      case QUANTITY:
5402
        return Long.valueOf(getQuantity());
5403
 
5404
      case ORDER_ID:
5405
        return Long.valueOf(getOrderId());
5406
 
5110 mandeep.dh 5407
      case FULFILMENT_WAREHOUSE_ID:
5408
        return Long.valueOf(getFulfilmentWarehouseId());
4496 mandeep.dh 5409
 
5361 mandeep.dh 5410
      case BILLING_WAREHOUSE_ID:
5411
        return Long.valueOf(getBillingWarehouseId());
5412
 
2820 chandransh 5413
      }
5414
      throw new IllegalStateException();
5415
    }
5416
 
3430 rajveer 5417
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5418
    public boolean isSet(_Fields field) {
5419
      if (field == null) {
5420
        throw new IllegalArgumentException();
5421
      }
2820 chandransh 5422
 
5423
      switch (field) {
5361 mandeep.dh 5424
      case INVENTORY_ITEM:
5425
        return isSetInventoryItem();
2820 chandransh 5426
      case TYPE:
5427
        return isSetType();
4496 mandeep.dh 5428
      case QUANTITY:
5429
        return isSetQuantity();
5430
      case ORDER_ID:
5431
        return isSetOrderId();
5110 mandeep.dh 5432
      case FULFILMENT_WAREHOUSE_ID:
5433
        return isSetFulfilmentWarehouseId();
5361 mandeep.dh 5434
      case BILLING_WAREHOUSE_ID:
5435
        return isSetBillingWarehouseId();
2820 chandransh 5436
      }
5437
      throw new IllegalStateException();
5438
    }
5439
 
5440
    @Override
5441
    public boolean equals(Object that) {
5442
      if (that == null)
5443
        return false;
4496 mandeep.dh 5444
      if (that instanceof scanForOrder_args)
5445
        return this.equals((scanForOrder_args)that);
2820 chandransh 5446
      return false;
5447
    }
5448
 
4496 mandeep.dh 5449
    public boolean equals(scanForOrder_args that) {
2820 chandransh 5450
      if (that == null)
5451
        return false;
5452
 
5361 mandeep.dh 5453
      boolean this_present_inventoryItem = true && this.isSetInventoryItem();
5454
      boolean that_present_inventoryItem = true && that.isSetInventoryItem();
5455
      if (this_present_inventoryItem || that_present_inventoryItem) {
5456
        if (!(this_present_inventoryItem && that_present_inventoryItem))
2820 chandransh 5457
          return false;
5361 mandeep.dh 5458
        if (!this.inventoryItem.equals(that.inventoryItem))
2820 chandransh 5459
          return false;
5460
      }
5461
 
5462
      boolean this_present_type = true && this.isSetType();
5463
      boolean that_present_type = true && that.isSetType();
5464
      if (this_present_type || that_present_type) {
5465
        if (!(this_present_type && that_present_type))
5466
          return false;
5467
        if (!this.type.equals(that.type))
5468
          return false;
5469
      }
5470
 
4496 mandeep.dh 5471
      boolean this_present_quantity = true;
5472
      boolean that_present_quantity = true;
5473
      if (this_present_quantity || that_present_quantity) {
5474
        if (!(this_present_quantity && that_present_quantity))
5475
          return false;
5476
        if (this.quantity != that.quantity)
5477
          return false;
5478
      }
5479
 
5480
      boolean this_present_orderId = true;
5481
      boolean that_present_orderId = true;
5482
      if (this_present_orderId || that_present_orderId) {
5483
        if (!(this_present_orderId && that_present_orderId))
5484
          return false;
5485
        if (this.orderId != that.orderId)
5486
          return false;
5487
      }
5488
 
5110 mandeep.dh 5489
      boolean this_present_fulfilmentWarehouseId = true;
5490
      boolean that_present_fulfilmentWarehouseId = true;
5491
      if (this_present_fulfilmentWarehouseId || that_present_fulfilmentWarehouseId) {
5492
        if (!(this_present_fulfilmentWarehouseId && that_present_fulfilmentWarehouseId))
4496 mandeep.dh 5493
          return false;
5110 mandeep.dh 5494
        if (this.fulfilmentWarehouseId != that.fulfilmentWarehouseId)
4496 mandeep.dh 5495
          return false;
5496
      }
5497
 
5361 mandeep.dh 5498
      boolean this_present_billingWarehouseId = true;
5499
      boolean that_present_billingWarehouseId = true;
5500
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
5501
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
5502
          return false;
5503
        if (this.billingWarehouseId != that.billingWarehouseId)
5504
          return false;
5505
      }
5506
 
2820 chandransh 5507
      return true;
5508
    }
5509
 
5510
    @Override
5511
    public int hashCode() {
5512
      return 0;
5513
    }
5514
 
4496 mandeep.dh 5515
    public int compareTo(scanForOrder_args other) {
2820 chandransh 5516
      if (!getClass().equals(other.getClass())) {
5517
        return getClass().getName().compareTo(other.getClass().getName());
5518
      }
5519
 
5520
      int lastComparison = 0;
4496 mandeep.dh 5521
      scanForOrder_args typedOther = (scanForOrder_args)other;
2820 chandransh 5522
 
5361 mandeep.dh 5523
      lastComparison = Boolean.valueOf(isSetInventoryItem()).compareTo(typedOther.isSetInventoryItem());
2820 chandransh 5524
      if (lastComparison != 0) {
5525
        return lastComparison;
5526
      }
5361 mandeep.dh 5527
      if (isSetInventoryItem()) {
5528
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItem, typedOther.inventoryItem);
3430 rajveer 5529
        if (lastComparison != 0) {
5530
          return lastComparison;
5531
        }
2820 chandransh 5532
      }
4496 mandeep.dh 5533
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
2820 chandransh 5534
      if (lastComparison != 0) {
5535
        return lastComparison;
5536
      }
4496 mandeep.dh 5537
      if (isSetType()) {
5538
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 5539
        if (lastComparison != 0) {
5540
          return lastComparison;
5541
        }
2820 chandransh 5542
      }
4496 mandeep.dh 5543
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
2820 chandransh 5544
      if (lastComparison != 0) {
5545
        return lastComparison;
5546
      }
4496 mandeep.dh 5547
      if (isSetQuantity()) {
5548
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
3430 rajveer 5549
        if (lastComparison != 0) {
5550
          return lastComparison;
5551
        }
2820 chandransh 5552
      }
4496 mandeep.dh 5553
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
5554
      if (lastComparison != 0) {
5555
        return lastComparison;
5556
      }
5557
      if (isSetOrderId()) {
5558
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
5559
        if (lastComparison != 0) {
5560
          return lastComparison;
5561
        }
5562
      }
5110 mandeep.dh 5563
      lastComparison = Boolean.valueOf(isSetFulfilmentWarehouseId()).compareTo(typedOther.isSetFulfilmentWarehouseId());
4496 mandeep.dh 5564
      if (lastComparison != 0) {
5565
        return lastComparison;
5566
      }
5110 mandeep.dh 5567
      if (isSetFulfilmentWarehouseId()) {
5568
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilmentWarehouseId, typedOther.fulfilmentWarehouseId);
4496 mandeep.dh 5569
        if (lastComparison != 0) {
5570
          return lastComparison;
5571
        }
5572
      }
5361 mandeep.dh 5573
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
5574
      if (lastComparison != 0) {
5575
        return lastComparison;
5576
      }
5577
      if (isSetBillingWarehouseId()) {
5578
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
5579
        if (lastComparison != 0) {
5580
          return lastComparison;
5581
        }
5582
      }
2820 chandransh 5583
      return 0;
5584
    }
5585
 
3430 rajveer 5586
    public _Fields fieldForId(int fieldId) {
5587
      return _Fields.findByThriftId(fieldId);
5588
    }
5589
 
5590
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5591
      org.apache.thrift.protocol.TField field;
2820 chandransh 5592
      iprot.readStructBegin();
5593
      while (true)
5594
      {
5595
        field = iprot.readFieldBegin();
3430 rajveer 5596
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 5597
          break;
5598
        }
3430 rajveer 5599
        switch (field.id) {
5361 mandeep.dh 5600
          case 1: // INVENTORY_ITEM
5601
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5602
              this.inventoryItem = new InventoryItem();
5603
              this.inventoryItem.read(iprot);
3430 rajveer 5604
            } else { 
5605
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5606
            }
5607
            break;
4496 mandeep.dh 5608
          case 2: // TYPE
5609
            if (field.type == org.apache.thrift.protocol.TType.I32) {
5610
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 5611
            } else { 
5612
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5613
            }
5614
            break;
4496 mandeep.dh 5615
          case 3: // QUANTITY
5616
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5617
              this.quantity = iprot.readI64();
5618
              setQuantityIsSet(true);
3430 rajveer 5619
            } else { 
5620
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5621
            }
5622
            break;
4496 mandeep.dh 5623
          case 4: // ORDER_ID
5624
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5625
              this.orderId = iprot.readI64();
5626
              setOrderIdIsSet(true);
5627
            } else { 
5628
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5629
            }
5630
            break;
5110 mandeep.dh 5631
          case 5: // FULFILMENT_WAREHOUSE_ID
4496 mandeep.dh 5632
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5110 mandeep.dh 5633
              this.fulfilmentWarehouseId = iprot.readI64();
5634
              setFulfilmentWarehouseIdIsSet(true);
4496 mandeep.dh 5635
            } else { 
5636
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5637
            }
5638
            break;
5361 mandeep.dh 5639
          case 6: // BILLING_WAREHOUSE_ID
5640
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5641
              this.billingWarehouseId = iprot.readI64();
5642
              setBillingWarehouseIdIsSet(true);
5643
            } else { 
5644
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5645
            }
5646
            break;
3430 rajveer 5647
          default:
5648
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 5649
        }
3430 rajveer 5650
        iprot.readFieldEnd();
2820 chandransh 5651
      }
5652
      iprot.readStructEnd();
5653
      validate();
5654
    }
5655
 
3430 rajveer 5656
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 5657
      validate();
5658
 
5659
      oprot.writeStructBegin(STRUCT_DESC);
5361 mandeep.dh 5660
      if (this.inventoryItem != null) {
5661
        oprot.writeFieldBegin(INVENTORY_ITEM_FIELD_DESC);
5662
        this.inventoryItem.write(oprot);
5663
        oprot.writeFieldEnd();
5664
      }
2820 chandransh 5665
      if (this.type != null) {
5666
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
5667
        oprot.writeI32(this.type.getValue());
5668
        oprot.writeFieldEnd();
5669
      }
4496 mandeep.dh 5670
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
5671
      oprot.writeI64(this.quantity);
5672
      oprot.writeFieldEnd();
5673
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
5674
      oprot.writeI64(this.orderId);
5675
      oprot.writeFieldEnd();
5110 mandeep.dh 5676
      oprot.writeFieldBegin(FULFILMENT_WAREHOUSE_ID_FIELD_DESC);
5677
      oprot.writeI64(this.fulfilmentWarehouseId);
4496 mandeep.dh 5678
      oprot.writeFieldEnd();
5361 mandeep.dh 5679
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
5680
      oprot.writeI64(this.billingWarehouseId);
5681
      oprot.writeFieldEnd();
2820 chandransh 5682
      oprot.writeFieldStop();
5683
      oprot.writeStructEnd();
5684
    }
5685
 
5686
    @Override
5687
    public String toString() {
4496 mandeep.dh 5688
      StringBuilder sb = new StringBuilder("scanForOrder_args(");
2820 chandransh 5689
      boolean first = true;
5690
 
5361 mandeep.dh 5691
      sb.append("inventoryItem:");
5692
      if (this.inventoryItem == null) {
5693
        sb.append("null");
5694
      } else {
5695
        sb.append(this.inventoryItem);
5696
      }
2820 chandransh 5697
      first = false;
5698
      if (!first) sb.append(", ");
5699
      sb.append("type:");
5700
      if (this.type == null) {
5701
        sb.append("null");
5702
      } else {
5703
        sb.append(this.type);
5704
      }
5705
      first = false;
4496 mandeep.dh 5706
      if (!first) sb.append(", ");
5707
      sb.append("quantity:");
5708
      sb.append(this.quantity);
5709
      first = false;
5710
      if (!first) sb.append(", ");
5711
      sb.append("orderId:");
5712
      sb.append(this.orderId);
5713
      first = false;
5714
      if (!first) sb.append(", ");
5110 mandeep.dh 5715
      sb.append("fulfilmentWarehouseId:");
5716
      sb.append(this.fulfilmentWarehouseId);
4496 mandeep.dh 5717
      first = false;
5361 mandeep.dh 5718
      if (!first) sb.append(", ");
5719
      sb.append("billingWarehouseId:");
5720
      sb.append(this.billingWarehouseId);
5721
      first = false;
2820 chandransh 5722
      sb.append(")");
5723
      return sb.toString();
5724
    }
5725
 
3430 rajveer 5726
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 5727
      // check for required fields
5728
    }
5729
 
3430 rajveer 5730
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5731
      try {
5732
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5733
      } catch (org.apache.thrift.TException te) {
5734
        throw new java.io.IOException(te);
5735
      }
5736
    }
5737
 
5738
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5739
      try {
4496 mandeep.dh 5740
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
5741
        __isset_bit_vector = new BitSet(1);
3430 rajveer 5742
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5743
      } catch (org.apache.thrift.TException te) {
5744
        throw new java.io.IOException(te);
5745
      }
5746
    }
5747
 
2820 chandransh 5748
  }
5749
 
4496 mandeep.dh 5750
  public static class scanForOrder_result implements org.apache.thrift.TBase<scanForOrder_result, scanForOrder_result._Fields>, java.io.Serializable, Cloneable   {
5751
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOrder_result");
2820 chandransh 5752
 
5361 mandeep.dh 5753
    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 5754
    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 5755
 
5361 mandeep.dh 5756
    private InventoryItem success; // required
3430 rajveer 5757
    private WarehouseServiceException wex; // required
2820 chandransh 5758
 
5759
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 5760
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 5761
      SUCCESS((short)0, "success"),
2820 chandransh 5762
      WEX((short)1, "wex");
5763
 
5764
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5765
 
5766
      static {
5767
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5768
          byName.put(field.getFieldName(), field);
5769
        }
5770
      }
5771
 
5772
      /**
5773
       * Find the _Fields constant that matches fieldId, or null if its not found.
5774
       */
5775
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 5776
        switch(fieldId) {
5361 mandeep.dh 5777
          case 0: // SUCCESS
5778
            return SUCCESS;
3430 rajveer 5779
          case 1: // WEX
5780
            return WEX;
5781
          default:
5782
            return null;
5783
        }
2820 chandransh 5784
      }
5785
 
5786
      /**
5787
       * Find the _Fields constant that matches fieldId, throwing an exception
5788
       * if it is not found.
5789
       */
5790
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5791
        _Fields fields = findByThriftId(fieldId);
5792
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5793
        return fields;
5794
      }
5795
 
5796
      /**
5797
       * Find the _Fields constant that matches name, or null if its not found.
5798
       */
5799
      public static _Fields findByName(String name) {
5800
        return byName.get(name);
5801
      }
5802
 
5803
      private final short _thriftId;
5804
      private final String _fieldName;
5805
 
5806
      _Fields(short thriftId, String fieldName) {
5807
        _thriftId = thriftId;
5808
        _fieldName = fieldName;
5809
      }
5810
 
5811
      public short getThriftFieldId() {
5812
        return _thriftId;
5813
      }
5814
 
5815
      public String getFieldName() {
5816
        return _fieldName;
5817
      }
5818
    }
5819
 
5820
    // isset id assignments
5821
 
3430 rajveer 5822
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 5823
    static {
3430 rajveer 5824
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5361 mandeep.dh 5825
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5826
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 5827
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5828
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5829
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 5830
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOrder_result.class, metaDataMap);
2820 chandransh 5831
    }
5832
 
4496 mandeep.dh 5833
    public scanForOrder_result() {
2820 chandransh 5834
    }
5835
 
4496 mandeep.dh 5836
    public scanForOrder_result(
5361 mandeep.dh 5837
      InventoryItem success,
2820 chandransh 5838
      WarehouseServiceException wex)
5839
    {
5840
      this();
5361 mandeep.dh 5841
      this.success = success;
2820 chandransh 5842
      this.wex = wex;
5843
    }
5844
 
5845
    /**
5846
     * Performs a deep copy on <i>other</i>.
5847
     */
4496 mandeep.dh 5848
    public scanForOrder_result(scanForOrder_result other) {
5361 mandeep.dh 5849
      if (other.isSetSuccess()) {
5850
        this.success = new InventoryItem(other.success);
5851
      }
2820 chandransh 5852
      if (other.isSetWex()) {
5853
        this.wex = new WarehouseServiceException(other.wex);
5854
      }
5855
    }
5856
 
4496 mandeep.dh 5857
    public scanForOrder_result deepCopy() {
5858
      return new scanForOrder_result(this);
2820 chandransh 5859
    }
5860
 
3430 rajveer 5861
    @Override
5862
    public void clear() {
5361 mandeep.dh 5863
      this.success = null;
3430 rajveer 5864
      this.wex = null;
2820 chandransh 5865
    }
5866
 
5361 mandeep.dh 5867
    public InventoryItem getSuccess() {
5868
      return this.success;
5869
    }
5870
 
5871
    public void setSuccess(InventoryItem success) {
5872
      this.success = success;
5873
    }
5874
 
5875
    public void unsetSuccess() {
5876
      this.success = null;
5877
    }
5878
 
5879
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5880
    public boolean isSetSuccess() {
5881
      return this.success != null;
5882
    }
5883
 
5884
    public void setSuccessIsSet(boolean value) {
5885
      if (!value) {
5886
        this.success = null;
5887
      }
5888
    }
5889
 
2820 chandransh 5890
    public WarehouseServiceException getWex() {
5891
      return this.wex;
5892
    }
5893
 
3430 rajveer 5894
    public void setWex(WarehouseServiceException wex) {
2820 chandransh 5895
      this.wex = wex;
5896
    }
5897
 
5898
    public void unsetWex() {
5899
      this.wex = null;
5900
    }
5901
 
3430 rajveer 5902
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2820 chandransh 5903
    public boolean isSetWex() {
5904
      return this.wex != null;
5905
    }
5906
 
5907
    public void setWexIsSet(boolean value) {
5908
      if (!value) {
5909
        this.wex = null;
5910
      }
5911
    }
5912
 
5913
    public void setFieldValue(_Fields field, Object value) {
5914
      switch (field) {
5361 mandeep.dh 5915
      case SUCCESS:
5916
        if (value == null) {
5917
          unsetSuccess();
5918
        } else {
5919
          setSuccess((InventoryItem)value);
5920
        }
5921
        break;
5922
 
2820 chandransh 5923
      case WEX:
5924
        if (value == null) {
5925
          unsetWex();
5926
        } else {
5927
          setWex((WarehouseServiceException)value);
5928
        }
5929
        break;
5930
 
5931
      }
5932
    }
5933
 
5934
    public Object getFieldValue(_Fields field) {
5935
      switch (field) {
5361 mandeep.dh 5936
      case SUCCESS:
5937
        return getSuccess();
5938
 
2820 chandransh 5939
      case WEX:
5940
        return getWex();
5941
 
5942
      }
5943
      throw new IllegalStateException();
5944
    }
5945
 
3430 rajveer 5946
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5947
    public boolean isSet(_Fields field) {
5948
      if (field == null) {
5949
        throw new IllegalArgumentException();
5950
      }
2820 chandransh 5951
 
5952
      switch (field) {
5361 mandeep.dh 5953
      case SUCCESS:
5954
        return isSetSuccess();
2820 chandransh 5955
      case WEX:
5956
        return isSetWex();
5957
      }
5958
      throw new IllegalStateException();
5959
    }
5960
 
5961
    @Override
5962
    public boolean equals(Object that) {
5963
      if (that == null)
5964
        return false;
4496 mandeep.dh 5965
      if (that instanceof scanForOrder_result)
5966
        return this.equals((scanForOrder_result)that);
2820 chandransh 5967
      return false;
5968
    }
5969
 
4496 mandeep.dh 5970
    public boolean equals(scanForOrder_result that) {
2820 chandransh 5971
      if (that == null)
5972
        return false;
5973
 
5361 mandeep.dh 5974
      boolean this_present_success = true && this.isSetSuccess();
5975
      boolean that_present_success = true && that.isSetSuccess();
5976
      if (this_present_success || that_present_success) {
5977
        if (!(this_present_success && that_present_success))
5978
          return false;
5979
        if (!this.success.equals(that.success))
5980
          return false;
5981
      }
5982
 
2820 chandransh 5983
      boolean this_present_wex = true && this.isSetWex();
5984
      boolean that_present_wex = true && that.isSetWex();
5985
      if (this_present_wex || that_present_wex) {
5986
        if (!(this_present_wex && that_present_wex))
5987
          return false;
5988
        if (!this.wex.equals(that.wex))
5989
          return false;
5990
      }
5991
 
5992
      return true;
5993
    }
5994
 
5995
    @Override
5996
    public int hashCode() {
5997
      return 0;
5998
    }
5999
 
4496 mandeep.dh 6000
    public int compareTo(scanForOrder_result other) {
2820 chandransh 6001
      if (!getClass().equals(other.getClass())) {
6002
        return getClass().getName().compareTo(other.getClass().getName());
6003
      }
6004
 
6005
      int lastComparison = 0;
4496 mandeep.dh 6006
      scanForOrder_result typedOther = (scanForOrder_result)other;
2820 chandransh 6007
 
5361 mandeep.dh 6008
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
6009
      if (lastComparison != 0) {
6010
        return lastComparison;
6011
      }
6012
      if (isSetSuccess()) {
6013
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6014
        if (lastComparison != 0) {
6015
          return lastComparison;
6016
        }
6017
      }
3430 rajveer 6018
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 6019
      if (lastComparison != 0) {
6020
        return lastComparison;
6021
      }
3430 rajveer 6022
      if (isSetWex()) {
6023
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
6024
        if (lastComparison != 0) {
6025
          return lastComparison;
6026
        }
2820 chandransh 6027
      }
6028
      return 0;
6029
    }
6030
 
3430 rajveer 6031
    public _Fields fieldForId(int fieldId) {
6032
      return _Fields.findByThriftId(fieldId);
6033
    }
6034
 
6035
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6036
      org.apache.thrift.protocol.TField field;
2820 chandransh 6037
      iprot.readStructBegin();
6038
      while (true)
6039
      {
6040
        field = iprot.readFieldBegin();
3430 rajveer 6041
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 6042
          break;
6043
        }
3430 rajveer 6044
        switch (field.id) {
5361 mandeep.dh 6045
          case 0: // SUCCESS
6046
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6047
              this.success = new InventoryItem();
6048
              this.success.read(iprot);
6049
            } else { 
6050
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6051
            }
6052
            break;
3430 rajveer 6053
          case 1: // WEX
6054
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6055
              this.wex = new WarehouseServiceException();
6056
              this.wex.read(iprot);
6057
            } else { 
6058
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6059
            }
6060
            break;
6061
          default:
6062
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 6063
        }
3430 rajveer 6064
        iprot.readFieldEnd();
2820 chandransh 6065
      }
6066
      iprot.readStructEnd();
6067
      validate();
6068
    }
6069
 
3430 rajveer 6070
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 6071
      oprot.writeStructBegin(STRUCT_DESC);
6072
 
5361 mandeep.dh 6073
      if (this.isSetSuccess()) {
6074
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6075
        this.success.write(oprot);
6076
        oprot.writeFieldEnd();
6077
      } else if (this.isSetWex()) {
2820 chandransh 6078
        oprot.writeFieldBegin(WEX_FIELD_DESC);
6079
        this.wex.write(oprot);
6080
        oprot.writeFieldEnd();
6081
      }
6082
      oprot.writeFieldStop();
6083
      oprot.writeStructEnd();
6084
    }
6085
 
6086
    @Override
6087
    public String toString() {
4496 mandeep.dh 6088
      StringBuilder sb = new StringBuilder("scanForOrder_result(");
2820 chandransh 6089
      boolean first = true;
6090
 
5361 mandeep.dh 6091
      sb.append("success:");
6092
      if (this.success == null) {
6093
        sb.append("null");
6094
      } else {
6095
        sb.append(this.success);
6096
      }
6097
      first = false;
6098
      if (!first) sb.append(", ");
2820 chandransh 6099
      sb.append("wex:");
6100
      if (this.wex == null) {
6101
        sb.append("null");
6102
      } else {
6103
        sb.append(this.wex);
6104
      }
6105
      first = false;
6106
      sb.append(")");
6107
      return sb.toString();
6108
    }
6109
 
3430 rajveer 6110
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 6111
      // check for required fields
6112
    }
6113
 
3430 rajveer 6114
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6115
      try {
6116
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6117
      } catch (org.apache.thrift.TException te) {
6118
        throw new java.io.IOException(te);
6119
      }
6120
    }
6121
 
6122
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6123
      try {
6124
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6125
      } catch (org.apache.thrift.TException te) {
6126
        throw new java.io.IOException(te);
6127
      }
6128
    }
6129
 
2820 chandransh 6130
  }
6131
 
4496 mandeep.dh 6132
  public static class createItemNumberMapping_args implements org.apache.thrift.TBase<createItemNumberMapping_args, createItemNumberMapping_args._Fields>, java.io.Serializable, Cloneable   {
6133
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createItemNumberMapping_args");
6134
 
6135
    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);
6136
    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);
6137
 
6138
    private String itemNumber; // required
6139
    private long itemId; // required
6140
 
6141
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6142
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6143
      ITEM_NUMBER((short)1, "itemNumber"),
6144
      ITEM_ID((short)2, "itemId");
6145
 
6146
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6147
 
6148
      static {
6149
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6150
          byName.put(field.getFieldName(), field);
6151
        }
6152
      }
6153
 
6154
      /**
6155
       * Find the _Fields constant that matches fieldId, or null if its not found.
6156
       */
6157
      public static _Fields findByThriftId(int fieldId) {
6158
        switch(fieldId) {
6159
          case 1: // ITEM_NUMBER
6160
            return ITEM_NUMBER;
6161
          case 2: // ITEM_ID
6162
            return ITEM_ID;
6163
          default:
6164
            return null;
6165
        }
6166
      }
6167
 
6168
      /**
6169
       * Find the _Fields constant that matches fieldId, throwing an exception
6170
       * if it is not found.
6171
       */
6172
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6173
        _Fields fields = findByThriftId(fieldId);
6174
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6175
        return fields;
6176
      }
6177
 
6178
      /**
6179
       * Find the _Fields constant that matches name, or null if its not found.
6180
       */
6181
      public static _Fields findByName(String name) {
6182
        return byName.get(name);
6183
      }
6184
 
6185
      private final short _thriftId;
6186
      private final String _fieldName;
6187
 
6188
      _Fields(short thriftId, String fieldName) {
6189
        _thriftId = thriftId;
6190
        _fieldName = fieldName;
6191
      }
6192
 
6193
      public short getThriftFieldId() {
6194
        return _thriftId;
6195
      }
6196
 
6197
      public String getFieldName() {
6198
        return _fieldName;
6199
      }
6200
    }
6201
 
6202
    // isset id assignments
6203
    private static final int __ITEMID_ISSET_ID = 0;
6204
    private BitSet __isset_bit_vector = new BitSet(1);
6205
 
6206
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6207
    static {
6208
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6209
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6210
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
6211
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6212
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6213
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6214
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createItemNumberMapping_args.class, metaDataMap);
6215
    }
6216
 
6217
    public createItemNumberMapping_args() {
6218
    }
6219
 
6220
    public createItemNumberMapping_args(
6221
      String itemNumber,
6222
      long itemId)
6223
    {
6224
      this();
6225
      this.itemNumber = itemNumber;
6226
      this.itemId = itemId;
6227
      setItemIdIsSet(true);
6228
    }
6229
 
6230
    /**
6231
     * Performs a deep copy on <i>other</i>.
6232
     */
6233
    public createItemNumberMapping_args(createItemNumberMapping_args other) {
6234
      __isset_bit_vector.clear();
6235
      __isset_bit_vector.or(other.__isset_bit_vector);
6236
      if (other.isSetItemNumber()) {
6237
        this.itemNumber = other.itemNumber;
6238
      }
6239
      this.itemId = other.itemId;
6240
    }
6241
 
6242
    public createItemNumberMapping_args deepCopy() {
6243
      return new createItemNumberMapping_args(this);
6244
    }
6245
 
6246
    @Override
6247
    public void clear() {
6248
      this.itemNumber = null;
6249
      setItemIdIsSet(false);
6250
      this.itemId = 0;
6251
    }
6252
 
6253
    public String getItemNumber() {
6254
      return this.itemNumber;
6255
    }
6256
 
6257
    public void setItemNumber(String itemNumber) {
6258
      this.itemNumber = itemNumber;
6259
    }
6260
 
6261
    public void unsetItemNumber() {
6262
      this.itemNumber = null;
6263
    }
6264
 
6265
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
6266
    public boolean isSetItemNumber() {
6267
      return this.itemNumber != null;
6268
    }
6269
 
6270
    public void setItemNumberIsSet(boolean value) {
6271
      if (!value) {
6272
        this.itemNumber = null;
6273
      }
6274
    }
6275
 
6276
    public long getItemId() {
6277
      return this.itemId;
6278
    }
6279
 
6280
    public void setItemId(long itemId) {
6281
      this.itemId = itemId;
6282
      setItemIdIsSet(true);
6283
    }
6284
 
6285
    public void unsetItemId() {
6286
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
6287
    }
6288
 
6289
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
6290
    public boolean isSetItemId() {
6291
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
6292
    }
6293
 
6294
    public void setItemIdIsSet(boolean value) {
6295
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
6296
    }
6297
 
6298
    public void setFieldValue(_Fields field, Object value) {
6299
      switch (field) {
6300
      case ITEM_NUMBER:
6301
        if (value == null) {
6302
          unsetItemNumber();
6303
        } else {
6304
          setItemNumber((String)value);
6305
        }
6306
        break;
6307
 
6308
      case ITEM_ID:
6309
        if (value == null) {
6310
          unsetItemId();
6311
        } else {
6312
          setItemId((Long)value);
6313
        }
6314
        break;
6315
 
6316
      }
6317
    }
6318
 
6319
    public Object getFieldValue(_Fields field) {
6320
      switch (field) {
6321
      case ITEM_NUMBER:
6322
        return getItemNumber();
6323
 
6324
      case ITEM_ID:
6325
        return Long.valueOf(getItemId());
6326
 
6327
      }
6328
      throw new IllegalStateException();
6329
    }
6330
 
6331
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6332
    public boolean isSet(_Fields field) {
6333
      if (field == null) {
6334
        throw new IllegalArgumentException();
6335
      }
6336
 
6337
      switch (field) {
6338
      case ITEM_NUMBER:
6339
        return isSetItemNumber();
6340
      case ITEM_ID:
6341
        return isSetItemId();
6342
      }
6343
      throw new IllegalStateException();
6344
    }
6345
 
6346
    @Override
6347
    public boolean equals(Object that) {
6348
      if (that == null)
6349
        return false;
6350
      if (that instanceof createItemNumberMapping_args)
6351
        return this.equals((createItemNumberMapping_args)that);
6352
      return false;
6353
    }
6354
 
6355
    public boolean equals(createItemNumberMapping_args that) {
6356
      if (that == null)
6357
        return false;
6358
 
6359
      boolean this_present_itemNumber = true && this.isSetItemNumber();
6360
      boolean that_present_itemNumber = true && that.isSetItemNumber();
6361
      if (this_present_itemNumber || that_present_itemNumber) {
6362
        if (!(this_present_itemNumber && that_present_itemNumber))
6363
          return false;
6364
        if (!this.itemNumber.equals(that.itemNumber))
6365
          return false;
6366
      }
6367
 
6368
      boolean this_present_itemId = true;
6369
      boolean that_present_itemId = true;
6370
      if (this_present_itemId || that_present_itemId) {
6371
        if (!(this_present_itemId && that_present_itemId))
6372
          return false;
6373
        if (this.itemId != that.itemId)
6374
          return false;
6375
      }
6376
 
6377
      return true;
6378
    }
6379
 
6380
    @Override
6381
    public int hashCode() {
6382
      return 0;
6383
    }
6384
 
6385
    public int compareTo(createItemNumberMapping_args other) {
6386
      if (!getClass().equals(other.getClass())) {
6387
        return getClass().getName().compareTo(other.getClass().getName());
6388
      }
6389
 
6390
      int lastComparison = 0;
6391
      createItemNumberMapping_args typedOther = (createItemNumberMapping_args)other;
6392
 
6393
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
6394
      if (lastComparison != 0) {
6395
        return lastComparison;
6396
      }
6397
      if (isSetItemNumber()) {
6398
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
6399
        if (lastComparison != 0) {
6400
          return lastComparison;
6401
        }
6402
      }
6403
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
6404
      if (lastComparison != 0) {
6405
        return lastComparison;
6406
      }
6407
      if (isSetItemId()) {
6408
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
6409
        if (lastComparison != 0) {
6410
          return lastComparison;
6411
        }
6412
      }
6413
      return 0;
6414
    }
6415
 
6416
    public _Fields fieldForId(int fieldId) {
6417
      return _Fields.findByThriftId(fieldId);
6418
    }
6419
 
6420
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6421
      org.apache.thrift.protocol.TField field;
6422
      iprot.readStructBegin();
6423
      while (true)
6424
      {
6425
        field = iprot.readFieldBegin();
6426
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6427
          break;
6428
        }
6429
        switch (field.id) {
6430
          case 1: // ITEM_NUMBER
6431
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
6432
              this.itemNumber = iprot.readString();
6433
            } else { 
6434
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6435
            }
6436
            break;
6437
          case 2: // ITEM_ID
6438
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6439
              this.itemId = iprot.readI64();
6440
              setItemIdIsSet(true);
6441
            } else { 
6442
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6443
            }
6444
            break;
6445
          default:
6446
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6447
        }
6448
        iprot.readFieldEnd();
6449
      }
6450
      iprot.readStructEnd();
6451
      validate();
6452
    }
6453
 
6454
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6455
      validate();
6456
 
6457
      oprot.writeStructBegin(STRUCT_DESC);
6458
      if (this.itemNumber != null) {
6459
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
6460
        oprot.writeString(this.itemNumber);
6461
        oprot.writeFieldEnd();
6462
      }
6463
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
6464
      oprot.writeI64(this.itemId);
6465
      oprot.writeFieldEnd();
6466
      oprot.writeFieldStop();
6467
      oprot.writeStructEnd();
6468
    }
6469
 
6470
    @Override
6471
    public String toString() {
6472
      StringBuilder sb = new StringBuilder("createItemNumberMapping_args(");
6473
      boolean first = true;
6474
 
6475
      sb.append("itemNumber:");
6476
      if (this.itemNumber == null) {
6477
        sb.append("null");
6478
      } else {
6479
        sb.append(this.itemNumber);
6480
      }
6481
      first = false;
6482
      if (!first) sb.append(", ");
6483
      sb.append("itemId:");
6484
      sb.append(this.itemId);
6485
      first = false;
6486
      sb.append(")");
6487
      return sb.toString();
6488
    }
6489
 
6490
    public void validate() throws org.apache.thrift.TException {
6491
      // check for required fields
6492
    }
6493
 
6494
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6495
      try {
6496
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6497
      } catch (org.apache.thrift.TException te) {
6498
        throw new java.io.IOException(te);
6499
      }
6500
    }
6501
 
6502
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6503
      try {
6504
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
6505
        __isset_bit_vector = new BitSet(1);
6506
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6507
      } catch (org.apache.thrift.TException te) {
6508
        throw new java.io.IOException(te);
6509
      }
6510
    }
6511
 
6512
  }
6513
 
6514
  public static class createItemNumberMapping_result implements org.apache.thrift.TBase<createItemNumberMapping_result, createItemNumberMapping_result._Fields>, java.io.Serializable, Cloneable   {
6515
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createItemNumberMapping_result");
6516
 
6517
 
6518
 
6519
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6520
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6521
;
6522
 
6523
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6524
 
6525
      static {
6526
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6527
          byName.put(field.getFieldName(), field);
6528
        }
6529
      }
6530
 
6531
      /**
6532
       * Find the _Fields constant that matches fieldId, or null if its not found.
6533
       */
6534
      public static _Fields findByThriftId(int fieldId) {
6535
        switch(fieldId) {
6536
          default:
6537
            return null;
6538
        }
6539
      }
6540
 
6541
      /**
6542
       * Find the _Fields constant that matches fieldId, throwing an exception
6543
       * if it is not found.
6544
       */
6545
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6546
        _Fields fields = findByThriftId(fieldId);
6547
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6548
        return fields;
6549
      }
6550
 
6551
      /**
6552
       * Find the _Fields constant that matches name, or null if its not found.
6553
       */
6554
      public static _Fields findByName(String name) {
6555
        return byName.get(name);
6556
      }
6557
 
6558
      private final short _thriftId;
6559
      private final String _fieldName;
6560
 
6561
      _Fields(short thriftId, String fieldName) {
6562
        _thriftId = thriftId;
6563
        _fieldName = fieldName;
6564
      }
6565
 
6566
      public short getThriftFieldId() {
6567
        return _thriftId;
6568
      }
6569
 
6570
      public String getFieldName() {
6571
        return _fieldName;
6572
      }
6573
    }
6574
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6575
    static {
6576
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6577
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6578
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createItemNumberMapping_result.class, metaDataMap);
6579
    }
6580
 
6581
    public createItemNumberMapping_result() {
6582
    }
6583
 
6584
    /**
6585
     * Performs a deep copy on <i>other</i>.
6586
     */
6587
    public createItemNumberMapping_result(createItemNumberMapping_result other) {
6588
    }
6589
 
6590
    public createItemNumberMapping_result deepCopy() {
6591
      return new createItemNumberMapping_result(this);
6592
    }
6593
 
6594
    @Override
6595
    public void clear() {
6596
    }
6597
 
6598
    public void setFieldValue(_Fields field, Object value) {
6599
      switch (field) {
6600
      }
6601
    }
6602
 
6603
    public Object getFieldValue(_Fields field) {
6604
      switch (field) {
6605
      }
6606
      throw new IllegalStateException();
6607
    }
6608
 
6609
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6610
    public boolean isSet(_Fields field) {
6611
      if (field == null) {
6612
        throw new IllegalArgumentException();
6613
      }
6614
 
6615
      switch (field) {
6616
      }
6617
      throw new IllegalStateException();
6618
    }
6619
 
6620
    @Override
6621
    public boolean equals(Object that) {
6622
      if (that == null)
6623
        return false;
6624
      if (that instanceof createItemNumberMapping_result)
6625
        return this.equals((createItemNumberMapping_result)that);
6626
      return false;
6627
    }
6628
 
6629
    public boolean equals(createItemNumberMapping_result that) {
6630
      if (that == null)
6631
        return false;
6632
 
6633
      return true;
6634
    }
6635
 
6636
    @Override
6637
    public int hashCode() {
6638
      return 0;
6639
    }
6640
 
6641
    public int compareTo(createItemNumberMapping_result other) {
6642
      if (!getClass().equals(other.getClass())) {
6643
        return getClass().getName().compareTo(other.getClass().getName());
6644
      }
6645
 
6646
      int lastComparison = 0;
6647
      createItemNumberMapping_result typedOther = (createItemNumberMapping_result)other;
6648
 
6649
      return 0;
6650
    }
6651
 
6652
    public _Fields fieldForId(int fieldId) {
6653
      return _Fields.findByThriftId(fieldId);
6654
    }
6655
 
6656
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6657
      org.apache.thrift.protocol.TField field;
6658
      iprot.readStructBegin();
6659
      while (true)
6660
      {
6661
        field = iprot.readFieldBegin();
6662
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6663
          break;
6664
        }
6665
        switch (field.id) {
6666
          default:
6667
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6668
        }
6669
        iprot.readFieldEnd();
6670
      }
6671
      iprot.readStructEnd();
6672
      validate();
6673
    }
6674
 
6675
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6676
      oprot.writeStructBegin(STRUCT_DESC);
6677
 
6678
      oprot.writeFieldStop();
6679
      oprot.writeStructEnd();
6680
    }
6681
 
6682
    @Override
6683
    public String toString() {
6684
      StringBuilder sb = new StringBuilder("createItemNumberMapping_result(");
6685
      boolean first = true;
6686
 
6687
      sb.append(")");
6688
      return sb.toString();
6689
    }
6690
 
6691
    public void validate() throws org.apache.thrift.TException {
6692
      // check for required fields
6693
    }
6694
 
6695
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6696
      try {
6697
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6698
      } catch (org.apache.thrift.TException te) {
6699
        throw new java.io.IOException(te);
6700
      }
6701
    }
6702
 
6703
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6704
      try {
6705
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6706
      } catch (org.apache.thrift.TException te) {
6707
        throw new java.io.IOException(te);
6708
      }
6709
    }
6710
 
6711
  }
6712
 
4622 amit.gupta 6713
  public static class getItemNumbers_args implements org.apache.thrift.TBase<getItemNumbers_args, getItemNumbers_args._Fields>, java.io.Serializable, Cloneable   {
6714
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemNumbers_args");
6715
 
6716
    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);
6717
 
6718
    private long itemId; // required
6719
 
6720
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6721
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6722
      ITEM_ID((short)1, "itemId");
6723
 
6724
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6725
 
6726
      static {
6727
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6728
          byName.put(field.getFieldName(), field);
6729
        }
6730
      }
6731
 
6732
      /**
6733
       * Find the _Fields constant that matches fieldId, or null if its not found.
6734
       */
6735
      public static _Fields findByThriftId(int fieldId) {
6736
        switch(fieldId) {
6737
          case 1: // ITEM_ID
6738
            return ITEM_ID;
6739
          default:
6740
            return null;
6741
        }
6742
      }
6743
 
6744
      /**
6745
       * Find the _Fields constant that matches fieldId, throwing an exception
6746
       * if it is not found.
6747
       */
6748
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6749
        _Fields fields = findByThriftId(fieldId);
6750
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6751
        return fields;
6752
      }
6753
 
6754
      /**
6755
       * Find the _Fields constant that matches name, or null if its not found.
6756
       */
6757
      public static _Fields findByName(String name) {
6758
        return byName.get(name);
6759
      }
6760
 
6761
      private final short _thriftId;
6762
      private final String _fieldName;
6763
 
6764
      _Fields(short thriftId, String fieldName) {
6765
        _thriftId = thriftId;
6766
        _fieldName = fieldName;
6767
      }
6768
 
6769
      public short getThriftFieldId() {
6770
        return _thriftId;
6771
      }
6772
 
6773
      public String getFieldName() {
6774
        return _fieldName;
6775
      }
6776
    }
6777
 
6778
    // isset id assignments
6779
    private static final int __ITEMID_ISSET_ID = 0;
6780
    private BitSet __isset_bit_vector = new BitSet(1);
6781
 
6782
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6783
    static {
6784
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6785
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6786
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6787
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6788
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemNumbers_args.class, metaDataMap);
6789
    }
6790
 
6791
    public getItemNumbers_args() {
6792
    }
6793
 
6794
    public getItemNumbers_args(
6795
      long itemId)
6796
    {
6797
      this();
6798
      this.itemId = itemId;
6799
      setItemIdIsSet(true);
6800
    }
6801
 
6802
    /**
6803
     * Performs a deep copy on <i>other</i>.
6804
     */
6805
    public getItemNumbers_args(getItemNumbers_args other) {
6806
      __isset_bit_vector.clear();
6807
      __isset_bit_vector.or(other.__isset_bit_vector);
6808
      this.itemId = other.itemId;
6809
    }
6810
 
6811
    public getItemNumbers_args deepCopy() {
6812
      return new getItemNumbers_args(this);
6813
    }
6814
 
6815
    @Override
6816
    public void clear() {
6817
      setItemIdIsSet(false);
6818
      this.itemId = 0;
6819
    }
6820
 
6821
    public long getItemId() {
6822
      return this.itemId;
6823
    }
6824
 
6825
    public void setItemId(long itemId) {
6826
      this.itemId = itemId;
6827
      setItemIdIsSet(true);
6828
    }
6829
 
6830
    public void unsetItemId() {
6831
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
6832
    }
6833
 
6834
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
6835
    public boolean isSetItemId() {
6836
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
6837
    }
6838
 
6839
    public void setItemIdIsSet(boolean value) {
6840
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
6841
    }
6842
 
6843
    public void setFieldValue(_Fields field, Object value) {
6844
      switch (field) {
6845
      case ITEM_ID:
6846
        if (value == null) {
6847
          unsetItemId();
6848
        } else {
6849
          setItemId((Long)value);
6850
        }
6851
        break;
6852
 
6853
      }
6854
    }
6855
 
6856
    public Object getFieldValue(_Fields field) {
6857
      switch (field) {
6858
      case ITEM_ID:
6859
        return Long.valueOf(getItemId());
6860
 
6861
      }
6862
      throw new IllegalStateException();
6863
    }
6864
 
6865
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6866
    public boolean isSet(_Fields field) {
6867
      if (field == null) {
6868
        throw new IllegalArgumentException();
6869
      }
6870
 
6871
      switch (field) {
6872
      case ITEM_ID:
6873
        return isSetItemId();
6874
      }
6875
      throw new IllegalStateException();
6876
    }
6877
 
6878
    @Override
6879
    public boolean equals(Object that) {
6880
      if (that == null)
6881
        return false;
6882
      if (that instanceof getItemNumbers_args)
6883
        return this.equals((getItemNumbers_args)that);
6884
      return false;
6885
    }
6886
 
6887
    public boolean equals(getItemNumbers_args that) {
6888
      if (that == null)
6889
        return false;
6890
 
6891
      boolean this_present_itemId = true;
6892
      boolean that_present_itemId = true;
6893
      if (this_present_itemId || that_present_itemId) {
6894
        if (!(this_present_itemId && that_present_itemId))
6895
          return false;
6896
        if (this.itemId != that.itemId)
6897
          return false;
6898
      }
6899
 
6900
      return true;
6901
    }
6902
 
6903
    @Override
6904
    public int hashCode() {
6905
      return 0;
6906
    }
6907
 
6908
    public int compareTo(getItemNumbers_args other) {
6909
      if (!getClass().equals(other.getClass())) {
6910
        return getClass().getName().compareTo(other.getClass().getName());
6911
      }
6912
 
6913
      int lastComparison = 0;
6914
      getItemNumbers_args typedOther = (getItemNumbers_args)other;
6915
 
6916
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
6917
      if (lastComparison != 0) {
6918
        return lastComparison;
6919
      }
6920
      if (isSetItemId()) {
6921
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
6922
        if (lastComparison != 0) {
6923
          return lastComparison;
6924
        }
6925
      }
6926
      return 0;
6927
    }
6928
 
6929
    public _Fields fieldForId(int fieldId) {
6930
      return _Fields.findByThriftId(fieldId);
6931
    }
6932
 
6933
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6934
      org.apache.thrift.protocol.TField field;
6935
      iprot.readStructBegin();
6936
      while (true)
6937
      {
6938
        field = iprot.readFieldBegin();
6939
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6940
          break;
6941
        }
6942
        switch (field.id) {
6943
          case 1: // ITEM_ID
6944
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6945
              this.itemId = iprot.readI64();
6946
              setItemIdIsSet(true);
6947
            } else { 
6948
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6949
            }
6950
            break;
6951
          default:
6952
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6953
        }
6954
        iprot.readFieldEnd();
6955
      }
6956
      iprot.readStructEnd();
6957
      validate();
6958
    }
6959
 
6960
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6961
      validate();
6962
 
6963
      oprot.writeStructBegin(STRUCT_DESC);
6964
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
6965
      oprot.writeI64(this.itemId);
6966
      oprot.writeFieldEnd();
6967
      oprot.writeFieldStop();
6968
      oprot.writeStructEnd();
6969
    }
6970
 
6971
    @Override
6972
    public String toString() {
6973
      StringBuilder sb = new StringBuilder("getItemNumbers_args(");
6974
      boolean first = true;
6975
 
6976
      sb.append("itemId:");
6977
      sb.append(this.itemId);
6978
      first = false;
6979
      sb.append(")");
6980
      return sb.toString();
6981
    }
6982
 
6983
    public void validate() throws org.apache.thrift.TException {
6984
      // check for required fields
6985
    }
6986
 
6987
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6988
      try {
6989
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6990
      } catch (org.apache.thrift.TException te) {
6991
        throw new java.io.IOException(te);
6992
      }
6993
    }
6994
 
6995
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6996
      try {
6997
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
6998
        __isset_bit_vector = new BitSet(1);
6999
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7000
      } catch (org.apache.thrift.TException te) {
7001
        throw new java.io.IOException(te);
7002
      }
7003
    }
7004
 
7005
  }
7006
 
7007
  public static class getItemNumbers_result implements org.apache.thrift.TBase<getItemNumbers_result, getItemNumbers_result._Fields>, java.io.Serializable, Cloneable   {
7008
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemNumbers_result");
7009
 
7010
    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);
7011
 
7012
    private List<String> success; // required
7013
 
7014
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7015
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7016
      SUCCESS((short)0, "success");
7017
 
7018
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7019
 
7020
      static {
7021
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7022
          byName.put(field.getFieldName(), field);
7023
        }
7024
      }
7025
 
7026
      /**
7027
       * Find the _Fields constant that matches fieldId, or null if its not found.
7028
       */
7029
      public static _Fields findByThriftId(int fieldId) {
7030
        switch(fieldId) {
7031
          case 0: // SUCCESS
7032
            return SUCCESS;
7033
          default:
7034
            return null;
7035
        }
7036
      }
7037
 
7038
      /**
7039
       * Find the _Fields constant that matches fieldId, throwing an exception
7040
       * if it is not found.
7041
       */
7042
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7043
        _Fields fields = findByThriftId(fieldId);
7044
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7045
        return fields;
7046
      }
7047
 
7048
      /**
7049
       * Find the _Fields constant that matches name, or null if its not found.
7050
       */
7051
      public static _Fields findByName(String name) {
7052
        return byName.get(name);
7053
      }
7054
 
7055
      private final short _thriftId;
7056
      private final String _fieldName;
7057
 
7058
      _Fields(short thriftId, String fieldName) {
7059
        _thriftId = thriftId;
7060
        _fieldName = fieldName;
7061
      }
7062
 
7063
      public short getThriftFieldId() {
7064
        return _thriftId;
7065
      }
7066
 
7067
      public String getFieldName() {
7068
        return _fieldName;
7069
      }
7070
    }
7071
 
7072
    // isset id assignments
7073
 
7074
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7075
    static {
7076
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7077
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7078
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7079
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
7080
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7081
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemNumbers_result.class, metaDataMap);
7082
    }
7083
 
7084
    public getItemNumbers_result() {
7085
    }
7086
 
7087
    public getItemNumbers_result(
7088
      List<String> success)
7089
    {
7090
      this();
7091
      this.success = success;
7092
    }
7093
 
7094
    /**
7095
     * Performs a deep copy on <i>other</i>.
7096
     */
7097
    public getItemNumbers_result(getItemNumbers_result other) {
7098
      if (other.isSetSuccess()) {
7099
        List<String> __this__success = new ArrayList<String>();
7100
        for (String other_element : other.success) {
7101
          __this__success.add(other_element);
7102
        }
7103
        this.success = __this__success;
7104
      }
7105
    }
7106
 
7107
    public getItemNumbers_result deepCopy() {
7108
      return new getItemNumbers_result(this);
7109
    }
7110
 
7111
    @Override
7112
    public void clear() {
7113
      this.success = null;
7114
    }
7115
 
7116
    public int getSuccessSize() {
7117
      return (this.success == null) ? 0 : this.success.size();
7118
    }
7119
 
7120
    public java.util.Iterator<String> getSuccessIterator() {
7121
      return (this.success == null) ? null : this.success.iterator();
7122
    }
7123
 
7124
    public void addToSuccess(String elem) {
7125
      if (this.success == null) {
7126
        this.success = new ArrayList<String>();
7127
      }
7128
      this.success.add(elem);
7129
    }
7130
 
7131
    public List<String> getSuccess() {
7132
      return this.success;
7133
    }
7134
 
7135
    public void setSuccess(List<String> success) {
7136
      this.success = success;
7137
    }
7138
 
7139
    public void unsetSuccess() {
7140
      this.success = null;
7141
    }
7142
 
7143
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7144
    public boolean isSetSuccess() {
7145
      return this.success != null;
7146
    }
7147
 
7148
    public void setSuccessIsSet(boolean value) {
7149
      if (!value) {
7150
        this.success = null;
7151
      }
7152
    }
7153
 
7154
    public void setFieldValue(_Fields field, Object value) {
7155
      switch (field) {
7156
      case SUCCESS:
7157
        if (value == null) {
7158
          unsetSuccess();
7159
        } else {
7160
          setSuccess((List<String>)value);
7161
        }
7162
        break;
7163
 
7164
      }
7165
    }
7166
 
7167
    public Object getFieldValue(_Fields field) {
7168
      switch (field) {
7169
      case SUCCESS:
7170
        return getSuccess();
7171
 
7172
      }
7173
      throw new IllegalStateException();
7174
    }
7175
 
7176
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7177
    public boolean isSet(_Fields field) {
7178
      if (field == null) {
7179
        throw new IllegalArgumentException();
7180
      }
7181
 
7182
      switch (field) {
7183
      case SUCCESS:
7184
        return isSetSuccess();
7185
      }
7186
      throw new IllegalStateException();
7187
    }
7188
 
7189
    @Override
7190
    public boolean equals(Object that) {
7191
      if (that == null)
7192
        return false;
7193
      if (that instanceof getItemNumbers_result)
7194
        return this.equals((getItemNumbers_result)that);
7195
      return false;
7196
    }
7197
 
7198
    public boolean equals(getItemNumbers_result that) {
7199
      if (that == null)
7200
        return false;
7201
 
7202
      boolean this_present_success = true && this.isSetSuccess();
7203
      boolean that_present_success = true && that.isSetSuccess();
7204
      if (this_present_success || that_present_success) {
7205
        if (!(this_present_success && that_present_success))
7206
          return false;
7207
        if (!this.success.equals(that.success))
7208
          return false;
7209
      }
7210
 
7211
      return true;
7212
    }
7213
 
7214
    @Override
7215
    public int hashCode() {
7216
      return 0;
7217
    }
7218
 
7219
    public int compareTo(getItemNumbers_result other) {
7220
      if (!getClass().equals(other.getClass())) {
7221
        return getClass().getName().compareTo(other.getClass().getName());
7222
      }
7223
 
7224
      int lastComparison = 0;
7225
      getItemNumbers_result typedOther = (getItemNumbers_result)other;
7226
 
7227
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7228
      if (lastComparison != 0) {
7229
        return lastComparison;
7230
      }
7231
      if (isSetSuccess()) {
7232
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7233
        if (lastComparison != 0) {
7234
          return lastComparison;
7235
        }
7236
      }
7237
      return 0;
7238
    }
7239
 
7240
    public _Fields fieldForId(int fieldId) {
7241
      return _Fields.findByThriftId(fieldId);
7242
    }
7243
 
7244
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7245
      org.apache.thrift.protocol.TField field;
7246
      iprot.readStructBegin();
7247
      while (true)
7248
      {
7249
        field = iprot.readFieldBegin();
7250
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7251
          break;
7252
        }
7253
        switch (field.id) {
7254
          case 0: // SUCCESS
7255
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
7256
              {
5361 mandeep.dh 7257
                org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
7258
                this.success = new ArrayList<String>(_list0.size);
7259
                for (int _i1 = 0; _i1 < _list0.size; ++_i1)
4622 amit.gupta 7260
                {
5361 mandeep.dh 7261
                  String _elem2; // required
7262
                  _elem2 = iprot.readString();
7263
                  this.success.add(_elem2);
4622 amit.gupta 7264
                }
7265
                iprot.readListEnd();
7266
              }
7267
            } else { 
7268
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7269
            }
7270
            break;
7271
          default:
7272
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7273
        }
7274
        iprot.readFieldEnd();
7275
      }
7276
      iprot.readStructEnd();
7277
      validate();
7278
    }
7279
 
7280
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7281
      oprot.writeStructBegin(STRUCT_DESC);
7282
 
7283
      if (this.isSetSuccess()) {
7284
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7285
        {
7286
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size()));
5361 mandeep.dh 7287
          for (String _iter3 : this.success)
4622 amit.gupta 7288
          {
5361 mandeep.dh 7289
            oprot.writeString(_iter3);
4622 amit.gupta 7290
          }
7291
          oprot.writeListEnd();
7292
        }
7293
        oprot.writeFieldEnd();
7294
      }
7295
      oprot.writeFieldStop();
7296
      oprot.writeStructEnd();
7297
    }
7298
 
7299
    @Override
7300
    public String toString() {
7301
      StringBuilder sb = new StringBuilder("getItemNumbers_result(");
7302
      boolean first = true;
7303
 
7304
      sb.append("success:");
7305
      if (this.success == null) {
7306
        sb.append("null");
7307
      } else {
7308
        sb.append(this.success);
7309
      }
7310
      first = false;
7311
      sb.append(")");
7312
      return sb.toString();
7313
    }
7314
 
7315
    public void validate() throws org.apache.thrift.TException {
7316
      // check for required fields
7317
    }
7318
 
7319
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7320
      try {
7321
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7322
      } catch (org.apache.thrift.TException te) {
7323
        throw new java.io.IOException(te);
7324
      }
7325
    }
7326
 
7327
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7328
      try {
7329
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7330
      } catch (org.apache.thrift.TException te) {
7331
        throw new java.io.IOException(te);
7332
      }
7333
    }
7334
 
7335
  }
7336
 
5110 mandeep.dh 7337
  public static class getItemIds_args implements org.apache.thrift.TBase<getItemIds_args, getItemIds_args._Fields>, java.io.Serializable, Cloneable   {
7338
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemIds_args");
7339
 
7340
    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);
7341
 
7342
    private String itemNumber; // required
7343
 
7344
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7345
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7346
      ITEM_NUMBER((short)1, "itemNumber");
7347
 
7348
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7349
 
7350
      static {
7351
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7352
          byName.put(field.getFieldName(), field);
7353
        }
7354
      }
7355
 
7356
      /**
7357
       * Find the _Fields constant that matches fieldId, or null if its not found.
7358
       */
7359
      public static _Fields findByThriftId(int fieldId) {
7360
        switch(fieldId) {
7361
          case 1: // ITEM_NUMBER
7362
            return ITEM_NUMBER;
7363
          default:
7364
            return null;
7365
        }
7366
      }
7367
 
7368
      /**
7369
       * Find the _Fields constant that matches fieldId, throwing an exception
7370
       * if it is not found.
7371
       */
7372
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7373
        _Fields fields = findByThriftId(fieldId);
7374
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7375
        return fields;
7376
      }
7377
 
7378
      /**
7379
       * Find the _Fields constant that matches name, or null if its not found.
7380
       */
7381
      public static _Fields findByName(String name) {
7382
        return byName.get(name);
7383
      }
7384
 
7385
      private final short _thriftId;
7386
      private final String _fieldName;
7387
 
7388
      _Fields(short thriftId, String fieldName) {
7389
        _thriftId = thriftId;
7390
        _fieldName = fieldName;
7391
      }
7392
 
7393
      public short getThriftFieldId() {
7394
        return _thriftId;
7395
      }
7396
 
7397
      public String getFieldName() {
7398
        return _fieldName;
7399
      }
7400
    }
7401
 
7402
    // isset id assignments
7403
 
7404
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7405
    static {
7406
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7407
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7408
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
7409
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7410
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemIds_args.class, metaDataMap);
7411
    }
7412
 
7413
    public getItemIds_args() {
7414
    }
7415
 
7416
    public getItemIds_args(
7417
      String itemNumber)
7418
    {
7419
      this();
7420
      this.itemNumber = itemNumber;
7421
    }
7422
 
7423
    /**
7424
     * Performs a deep copy on <i>other</i>.
7425
     */
7426
    public getItemIds_args(getItemIds_args other) {
7427
      if (other.isSetItemNumber()) {
7428
        this.itemNumber = other.itemNumber;
7429
      }
7430
    }
7431
 
7432
    public getItemIds_args deepCopy() {
7433
      return new getItemIds_args(this);
7434
    }
7435
 
7436
    @Override
7437
    public void clear() {
7438
      this.itemNumber = null;
7439
    }
7440
 
7441
    public String getItemNumber() {
7442
      return this.itemNumber;
7443
    }
7444
 
7445
    public void setItemNumber(String itemNumber) {
7446
      this.itemNumber = itemNumber;
7447
    }
7448
 
7449
    public void unsetItemNumber() {
7450
      this.itemNumber = null;
7451
    }
7452
 
7453
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
7454
    public boolean isSetItemNumber() {
7455
      return this.itemNumber != null;
7456
    }
7457
 
7458
    public void setItemNumberIsSet(boolean value) {
7459
      if (!value) {
7460
        this.itemNumber = null;
7461
      }
7462
    }
7463
 
7464
    public void setFieldValue(_Fields field, Object value) {
7465
      switch (field) {
7466
      case ITEM_NUMBER:
7467
        if (value == null) {
7468
          unsetItemNumber();
7469
        } else {
7470
          setItemNumber((String)value);
7471
        }
7472
        break;
7473
 
7474
      }
7475
    }
7476
 
7477
    public Object getFieldValue(_Fields field) {
7478
      switch (field) {
7479
      case ITEM_NUMBER:
7480
        return getItemNumber();
7481
 
7482
      }
7483
      throw new IllegalStateException();
7484
    }
7485
 
7486
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7487
    public boolean isSet(_Fields field) {
7488
      if (field == null) {
7489
        throw new IllegalArgumentException();
7490
      }
7491
 
7492
      switch (field) {
7493
      case ITEM_NUMBER:
7494
        return isSetItemNumber();
7495
      }
7496
      throw new IllegalStateException();
7497
    }
7498
 
7499
    @Override
7500
    public boolean equals(Object that) {
7501
      if (that == null)
7502
        return false;
7503
      if (that instanceof getItemIds_args)
7504
        return this.equals((getItemIds_args)that);
7505
      return false;
7506
    }
7507
 
7508
    public boolean equals(getItemIds_args that) {
7509
      if (that == null)
7510
        return false;
7511
 
7512
      boolean this_present_itemNumber = true && this.isSetItemNumber();
7513
      boolean that_present_itemNumber = true && that.isSetItemNumber();
7514
      if (this_present_itemNumber || that_present_itemNumber) {
7515
        if (!(this_present_itemNumber && that_present_itemNumber))
7516
          return false;
7517
        if (!this.itemNumber.equals(that.itemNumber))
7518
          return false;
7519
      }
7520
 
7521
      return true;
7522
    }
7523
 
7524
    @Override
7525
    public int hashCode() {
7526
      return 0;
7527
    }
7528
 
7529
    public int compareTo(getItemIds_args other) {
7530
      if (!getClass().equals(other.getClass())) {
7531
        return getClass().getName().compareTo(other.getClass().getName());
7532
      }
7533
 
7534
      int lastComparison = 0;
7535
      getItemIds_args typedOther = (getItemIds_args)other;
7536
 
7537
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
7538
      if (lastComparison != 0) {
7539
        return lastComparison;
7540
      }
7541
      if (isSetItemNumber()) {
7542
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
7543
        if (lastComparison != 0) {
7544
          return lastComparison;
7545
        }
7546
      }
7547
      return 0;
7548
    }
7549
 
7550
    public _Fields fieldForId(int fieldId) {
7551
      return _Fields.findByThriftId(fieldId);
7552
    }
7553
 
7554
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7555
      org.apache.thrift.protocol.TField field;
7556
      iprot.readStructBegin();
7557
      while (true)
7558
      {
7559
        field = iprot.readFieldBegin();
7560
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7561
          break;
7562
        }
7563
        switch (field.id) {
7564
          case 1: // ITEM_NUMBER
7565
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
7566
              this.itemNumber = iprot.readString();
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.writeFieldStop();
7590
      oprot.writeStructEnd();
7591
    }
7592
 
7593
    @Override
7594
    public String toString() {
7595
      StringBuilder sb = new StringBuilder("getItemIds_args(");
7596
      boolean first = true;
7597
 
7598
      sb.append("itemNumber:");
7599
      if (this.itemNumber == null) {
7600
        sb.append("null");
7601
      } else {
7602
        sb.append(this.itemNumber);
7603
      }
7604
      first = false;
7605
      sb.append(")");
7606
      return sb.toString();
7607
    }
7608
 
7609
    public void validate() throws org.apache.thrift.TException {
7610
      // check for required fields
7611
    }
7612
 
7613
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7614
      try {
7615
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7616
      } catch (org.apache.thrift.TException te) {
7617
        throw new java.io.IOException(te);
7618
      }
7619
    }
7620
 
7621
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7622
      try {
7623
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7624
      } catch (org.apache.thrift.TException te) {
7625
        throw new java.io.IOException(te);
7626
      }
7627
    }
7628
 
7629
  }
7630
 
7631
  public static class getItemIds_result implements org.apache.thrift.TBase<getItemIds_result, getItemIds_result._Fields>, java.io.Serializable, Cloneable   {
7632
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemIds_result");
7633
 
7634
    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);
7635
 
7636
    private List<Long> success; // required
7637
 
7638
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7639
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7640
      SUCCESS((short)0, "success");
7641
 
7642
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7643
 
7644
      static {
7645
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7646
          byName.put(field.getFieldName(), field);
7647
        }
7648
      }
7649
 
7650
      /**
7651
       * Find the _Fields constant that matches fieldId, or null if its not found.
7652
       */
7653
      public static _Fields findByThriftId(int fieldId) {
7654
        switch(fieldId) {
7655
          case 0: // SUCCESS
7656
            return SUCCESS;
7657
          default:
7658
            return null;
7659
        }
7660
      }
7661
 
7662
      /**
7663
       * Find the _Fields constant that matches fieldId, throwing an exception
7664
       * if it is not found.
7665
       */
7666
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7667
        _Fields fields = findByThriftId(fieldId);
7668
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7669
        return fields;
7670
      }
7671
 
7672
      /**
7673
       * Find the _Fields constant that matches name, or null if its not found.
7674
       */
7675
      public static _Fields findByName(String name) {
7676
        return byName.get(name);
7677
      }
7678
 
7679
      private final short _thriftId;
7680
      private final String _fieldName;
7681
 
7682
      _Fields(short thriftId, String fieldName) {
7683
        _thriftId = thriftId;
7684
        _fieldName = fieldName;
7685
      }
7686
 
7687
      public short getThriftFieldId() {
7688
        return _thriftId;
7689
      }
7690
 
7691
      public String getFieldName() {
7692
        return _fieldName;
7693
      }
7694
    }
7695
 
7696
    // isset id assignments
7697
 
7698
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7699
    static {
7700
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7701
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7702
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7703
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
7704
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7705
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemIds_result.class, metaDataMap);
7706
    }
7707
 
7708
    public getItemIds_result() {
7709
    }
7710
 
7711
    public getItemIds_result(
7712
      List<Long> success)
7713
    {
7714
      this();
7715
      this.success = success;
7716
    }
7717
 
7718
    /**
7719
     * Performs a deep copy on <i>other</i>.
7720
     */
7721
    public getItemIds_result(getItemIds_result other) {
7722
      if (other.isSetSuccess()) {
7723
        List<Long> __this__success = new ArrayList<Long>();
7724
        for (Long other_element : other.success) {
7725
          __this__success.add(other_element);
7726
        }
7727
        this.success = __this__success;
7728
      }
7729
    }
7730
 
7731
    public getItemIds_result deepCopy() {
7732
      return new getItemIds_result(this);
7733
    }
7734
 
7735
    @Override
7736
    public void clear() {
7737
      this.success = null;
7738
    }
7739
 
7740
    public int getSuccessSize() {
7741
      return (this.success == null) ? 0 : this.success.size();
7742
    }
7743
 
7744
    public java.util.Iterator<Long> getSuccessIterator() {
7745
      return (this.success == null) ? null : this.success.iterator();
7746
    }
7747
 
7748
    public void addToSuccess(long elem) {
7749
      if (this.success == null) {
7750
        this.success = new ArrayList<Long>();
7751
      }
7752
      this.success.add(elem);
7753
    }
7754
 
7755
    public List<Long> getSuccess() {
7756
      return this.success;
7757
    }
7758
 
7759
    public void setSuccess(List<Long> success) {
7760
      this.success = success;
7761
    }
7762
 
7763
    public void unsetSuccess() {
7764
      this.success = null;
7765
    }
7766
 
7767
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7768
    public boolean isSetSuccess() {
7769
      return this.success != null;
7770
    }
7771
 
7772
    public void setSuccessIsSet(boolean value) {
7773
      if (!value) {
7774
        this.success = null;
7775
      }
7776
    }
7777
 
7778
    public void setFieldValue(_Fields field, Object value) {
7779
      switch (field) {
7780
      case SUCCESS:
7781
        if (value == null) {
7782
          unsetSuccess();
7783
        } else {
7784
          setSuccess((List<Long>)value);
7785
        }
7786
        break;
7787
 
7788
      }
7789
    }
7790
 
7791
    public Object getFieldValue(_Fields field) {
7792
      switch (field) {
7793
      case SUCCESS:
7794
        return getSuccess();
7795
 
7796
      }
7797
      throw new IllegalStateException();
7798
    }
7799
 
7800
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7801
    public boolean isSet(_Fields field) {
7802
      if (field == null) {
7803
        throw new IllegalArgumentException();
7804
      }
7805
 
7806
      switch (field) {
7807
      case SUCCESS:
7808
        return isSetSuccess();
7809
      }
7810
      throw new IllegalStateException();
7811
    }
7812
 
7813
    @Override
7814
    public boolean equals(Object that) {
7815
      if (that == null)
7816
        return false;
7817
      if (that instanceof getItemIds_result)
7818
        return this.equals((getItemIds_result)that);
7819
      return false;
7820
    }
7821
 
7822
    public boolean equals(getItemIds_result that) {
7823
      if (that == null)
7824
        return false;
7825
 
7826
      boolean this_present_success = true && this.isSetSuccess();
7827
      boolean that_present_success = true && that.isSetSuccess();
7828
      if (this_present_success || that_present_success) {
7829
        if (!(this_present_success && that_present_success))
7830
          return false;
7831
        if (!this.success.equals(that.success))
7832
          return false;
7833
      }
7834
 
7835
      return true;
7836
    }
7837
 
7838
    @Override
7839
    public int hashCode() {
7840
      return 0;
7841
    }
7842
 
7843
    public int compareTo(getItemIds_result other) {
7844
      if (!getClass().equals(other.getClass())) {
7845
        return getClass().getName().compareTo(other.getClass().getName());
7846
      }
7847
 
7848
      int lastComparison = 0;
7849
      getItemIds_result typedOther = (getItemIds_result)other;
7850
 
7851
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7852
      if (lastComparison != 0) {
7853
        return lastComparison;
7854
      }
7855
      if (isSetSuccess()) {
7856
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7857
        if (lastComparison != 0) {
7858
          return lastComparison;
7859
        }
7860
      }
7861
      return 0;
7862
    }
7863
 
7864
    public _Fields fieldForId(int fieldId) {
7865
      return _Fields.findByThriftId(fieldId);
7866
    }
7867
 
7868
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7869
      org.apache.thrift.protocol.TField field;
7870
      iprot.readStructBegin();
7871
      while (true)
7872
      {
7873
        field = iprot.readFieldBegin();
7874
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7875
          break;
7876
        }
7877
        switch (field.id) {
7878
          case 0: // SUCCESS
7879
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
7880
              {
5361 mandeep.dh 7881
                org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
7882
                this.success = new ArrayList<Long>(_list4.size);
7883
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
5110 mandeep.dh 7884
                {
5361 mandeep.dh 7885
                  long _elem6; // required
7886
                  _elem6 = iprot.readI64();
7887
                  this.success.add(_elem6);
5110 mandeep.dh 7888
                }
7889
                iprot.readListEnd();
7890
              }
7891
            } else { 
7892
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7893
            }
7894
            break;
7895
          default:
7896
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7897
        }
7898
        iprot.readFieldEnd();
7899
      }
7900
      iprot.readStructEnd();
7901
      validate();
7902
    }
7903
 
7904
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7905
      oprot.writeStructBegin(STRUCT_DESC);
7906
 
7907
      if (this.isSetSuccess()) {
7908
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7909
        {
7910
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.success.size()));
5361 mandeep.dh 7911
          for (long _iter7 : this.success)
5110 mandeep.dh 7912
          {
5361 mandeep.dh 7913
            oprot.writeI64(_iter7);
5110 mandeep.dh 7914
          }
7915
          oprot.writeListEnd();
7916
        }
7917
        oprot.writeFieldEnd();
7918
      }
7919
      oprot.writeFieldStop();
7920
      oprot.writeStructEnd();
7921
    }
7922
 
7923
    @Override
7924
    public String toString() {
7925
      StringBuilder sb = new StringBuilder("getItemIds_result(");
7926
      boolean first = true;
7927
 
7928
      sb.append("success:");
7929
      if (this.success == null) {
7930
        sb.append("null");
7931
      } else {
7932
        sb.append(this.success);
7933
      }
7934
      first = false;
7935
      sb.append(")");
7936
      return sb.toString();
7937
    }
7938
 
7939
    public void validate() throws org.apache.thrift.TException {
7940
      // check for required fields
7941
    }
7942
 
7943
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7944
      try {
7945
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7946
      } catch (org.apache.thrift.TException te) {
7947
        throw new java.io.IOException(te);
7948
      }
7949
    }
7950
 
7951
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7952
      try {
7953
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7954
      } catch (org.apache.thrift.TException te) {
7955
        throw new java.io.IOException(te);
7956
      }
7957
    }
7958
 
7959
  }
7960
 
5185 mandeep.dh 7961
  public static class getInventoryItemsFromLastScanType_args implements org.apache.thrift.TBase<getInventoryItemsFromLastScanType_args, getInventoryItemsFromLastScanType_args._Fields>, java.io.Serializable, Cloneable   {
7962
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemsFromLastScanType_args");
7963
 
7964
    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);
7965
 
7966
    private ScanType lastScanType; // required
7967
 
7968
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7969
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7970
      /**
7971
       * 
7972
       * @see ScanType
7973
       */
7974
      LAST_SCAN_TYPE((short)1, "lastScanType");
7975
 
7976
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7977
 
7978
      static {
7979
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7980
          byName.put(field.getFieldName(), field);
7981
        }
7982
      }
7983
 
7984
      /**
7985
       * Find the _Fields constant that matches fieldId, or null if its not found.
7986
       */
7987
      public static _Fields findByThriftId(int fieldId) {
7988
        switch(fieldId) {
7989
          case 1: // LAST_SCAN_TYPE
7990
            return LAST_SCAN_TYPE;
7991
          default:
7992
            return null;
7993
        }
7994
      }
7995
 
7996
      /**
7997
       * Find the _Fields constant that matches fieldId, throwing an exception
7998
       * if it is not found.
7999
       */
8000
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8001
        _Fields fields = findByThriftId(fieldId);
8002
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8003
        return fields;
8004
      }
8005
 
8006
      /**
8007
       * Find the _Fields constant that matches name, or null if its not found.
8008
       */
8009
      public static _Fields findByName(String name) {
8010
        return byName.get(name);
8011
      }
8012
 
8013
      private final short _thriftId;
8014
      private final String _fieldName;
8015
 
8016
      _Fields(short thriftId, String fieldName) {
8017
        _thriftId = thriftId;
8018
        _fieldName = fieldName;
8019
      }
8020
 
8021
      public short getThriftFieldId() {
8022
        return _thriftId;
8023
      }
8024
 
8025
      public String getFieldName() {
8026
        return _fieldName;
8027
      }
8028
    }
8029
 
8030
    // isset id assignments
8031
 
8032
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8033
    static {
8034
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8035
      tmpMap.put(_Fields.LAST_SCAN_TYPE, new org.apache.thrift.meta_data.FieldMetaData("lastScanType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8036
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
8037
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8038
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemsFromLastScanType_args.class, metaDataMap);
8039
    }
8040
 
8041
    public getInventoryItemsFromLastScanType_args() {
8042
    }
8043
 
8044
    public getInventoryItemsFromLastScanType_args(
8045
      ScanType lastScanType)
8046
    {
8047
      this();
8048
      this.lastScanType = lastScanType;
8049
    }
8050
 
8051
    /**
8052
     * Performs a deep copy on <i>other</i>.
8053
     */
8054
    public getInventoryItemsFromLastScanType_args(getInventoryItemsFromLastScanType_args other) {
8055
      if (other.isSetLastScanType()) {
8056
        this.lastScanType = other.lastScanType;
8057
      }
8058
    }
8059
 
8060
    public getInventoryItemsFromLastScanType_args deepCopy() {
8061
      return new getInventoryItemsFromLastScanType_args(this);
8062
    }
8063
 
8064
    @Override
8065
    public void clear() {
8066
      this.lastScanType = null;
8067
    }
8068
 
8069
    /**
8070
     * 
8071
     * @see ScanType
8072
     */
8073
    public ScanType getLastScanType() {
8074
      return this.lastScanType;
8075
    }
8076
 
8077
    /**
8078
     * 
8079
     * @see ScanType
8080
     */
8081
    public void setLastScanType(ScanType lastScanType) {
8082
      this.lastScanType = lastScanType;
8083
    }
8084
 
8085
    public void unsetLastScanType() {
8086
      this.lastScanType = null;
8087
    }
8088
 
8089
    /** Returns true if field lastScanType is set (has been assigned a value) and false otherwise */
8090
    public boolean isSetLastScanType() {
8091
      return this.lastScanType != null;
8092
    }
8093
 
8094
    public void setLastScanTypeIsSet(boolean value) {
8095
      if (!value) {
8096
        this.lastScanType = null;
8097
      }
8098
    }
8099
 
8100
    public void setFieldValue(_Fields field, Object value) {
8101
      switch (field) {
8102
      case LAST_SCAN_TYPE:
8103
        if (value == null) {
8104
          unsetLastScanType();
8105
        } else {
8106
          setLastScanType((ScanType)value);
8107
        }
8108
        break;
8109
 
8110
      }
8111
    }
8112
 
8113
    public Object getFieldValue(_Fields field) {
8114
      switch (field) {
8115
      case LAST_SCAN_TYPE:
8116
        return getLastScanType();
8117
 
8118
      }
8119
      throw new IllegalStateException();
8120
    }
8121
 
8122
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8123
    public boolean isSet(_Fields field) {
8124
      if (field == null) {
8125
        throw new IllegalArgumentException();
8126
      }
8127
 
8128
      switch (field) {
8129
      case LAST_SCAN_TYPE:
8130
        return isSetLastScanType();
8131
      }
8132
      throw new IllegalStateException();
8133
    }
8134
 
8135
    @Override
8136
    public boolean equals(Object that) {
8137
      if (that == null)
8138
        return false;
8139
      if (that instanceof getInventoryItemsFromLastScanType_args)
8140
        return this.equals((getInventoryItemsFromLastScanType_args)that);
8141
      return false;
8142
    }
8143
 
8144
    public boolean equals(getInventoryItemsFromLastScanType_args that) {
8145
      if (that == null)
8146
        return false;
8147
 
8148
      boolean this_present_lastScanType = true && this.isSetLastScanType();
8149
      boolean that_present_lastScanType = true && that.isSetLastScanType();
8150
      if (this_present_lastScanType || that_present_lastScanType) {
8151
        if (!(this_present_lastScanType && that_present_lastScanType))
8152
          return false;
8153
        if (!this.lastScanType.equals(that.lastScanType))
8154
          return false;
8155
      }
8156
 
8157
      return true;
8158
    }
8159
 
8160
    @Override
8161
    public int hashCode() {
8162
      return 0;
8163
    }
8164
 
8165
    public int compareTo(getInventoryItemsFromLastScanType_args other) {
8166
      if (!getClass().equals(other.getClass())) {
8167
        return getClass().getName().compareTo(other.getClass().getName());
8168
      }
8169
 
8170
      int lastComparison = 0;
8171
      getInventoryItemsFromLastScanType_args typedOther = (getInventoryItemsFromLastScanType_args)other;
8172
 
8173
      lastComparison = Boolean.valueOf(isSetLastScanType()).compareTo(typedOther.isSetLastScanType());
8174
      if (lastComparison != 0) {
8175
        return lastComparison;
8176
      }
8177
      if (isSetLastScanType()) {
8178
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastScanType, typedOther.lastScanType);
8179
        if (lastComparison != 0) {
8180
          return lastComparison;
8181
        }
8182
      }
8183
      return 0;
8184
    }
8185
 
8186
    public _Fields fieldForId(int fieldId) {
8187
      return _Fields.findByThriftId(fieldId);
8188
    }
8189
 
8190
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8191
      org.apache.thrift.protocol.TField field;
8192
      iprot.readStructBegin();
8193
      while (true)
8194
      {
8195
        field = iprot.readFieldBegin();
8196
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8197
          break;
8198
        }
8199
        switch (field.id) {
8200
          case 1: // LAST_SCAN_TYPE
8201
            if (field.type == org.apache.thrift.protocol.TType.I32) {
8202
              this.lastScanType = ScanType.findByValue(iprot.readI32());
8203
            } else { 
8204
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8205
            }
8206
            break;
8207
          default:
8208
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8209
        }
8210
        iprot.readFieldEnd();
8211
      }
8212
      iprot.readStructEnd();
8213
      validate();
8214
    }
8215
 
8216
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8217
      validate();
8218
 
8219
      oprot.writeStructBegin(STRUCT_DESC);
8220
      if (this.lastScanType != null) {
8221
        oprot.writeFieldBegin(LAST_SCAN_TYPE_FIELD_DESC);
8222
        oprot.writeI32(this.lastScanType.getValue());
8223
        oprot.writeFieldEnd();
8224
      }
8225
      oprot.writeFieldStop();
8226
      oprot.writeStructEnd();
8227
    }
8228
 
8229
    @Override
8230
    public String toString() {
8231
      StringBuilder sb = new StringBuilder("getInventoryItemsFromLastScanType_args(");
8232
      boolean first = true;
8233
 
8234
      sb.append("lastScanType:");
8235
      if (this.lastScanType == null) {
8236
        sb.append("null");
8237
      } else {
8238
        sb.append(this.lastScanType);
8239
      }
8240
      first = false;
8241
      sb.append(")");
8242
      return sb.toString();
8243
    }
8244
 
8245
    public void validate() throws org.apache.thrift.TException {
8246
      // check for required fields
8247
    }
8248
 
8249
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8250
      try {
8251
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8252
      } catch (org.apache.thrift.TException te) {
8253
        throw new java.io.IOException(te);
8254
      }
8255
    }
8256
 
8257
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8258
      try {
8259
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8260
      } catch (org.apache.thrift.TException te) {
8261
        throw new java.io.IOException(te);
8262
      }
8263
    }
8264
 
8265
  }
8266
 
8267
  public static class getInventoryItemsFromLastScanType_result implements org.apache.thrift.TBase<getInventoryItemsFromLastScanType_result, getInventoryItemsFromLastScanType_result._Fields>, java.io.Serializable, Cloneable   {
8268
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemsFromLastScanType_result");
8269
 
8270
    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);
8271
    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);
8272
 
8273
    private List<InventoryItem> success; // required
8274
    private WarehouseServiceException wex; // required
8275
 
8276
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8277
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8278
      SUCCESS((short)0, "success"),
8279
      WEX((short)1, "wex");
8280
 
8281
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8282
 
8283
      static {
8284
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8285
          byName.put(field.getFieldName(), field);
8286
        }
8287
      }
8288
 
8289
      /**
8290
       * Find the _Fields constant that matches fieldId, or null if its not found.
8291
       */
8292
      public static _Fields findByThriftId(int fieldId) {
8293
        switch(fieldId) {
8294
          case 0: // SUCCESS
8295
            return SUCCESS;
8296
          case 1: // WEX
8297
            return WEX;
8298
          default:
8299
            return null;
8300
        }
8301
      }
8302
 
8303
      /**
8304
       * Find the _Fields constant that matches fieldId, throwing an exception
8305
       * if it is not found.
8306
       */
8307
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8308
        _Fields fields = findByThriftId(fieldId);
8309
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8310
        return fields;
8311
      }
8312
 
8313
      /**
8314
       * Find the _Fields constant that matches name, or null if its not found.
8315
       */
8316
      public static _Fields findByName(String name) {
8317
        return byName.get(name);
8318
      }
8319
 
8320
      private final short _thriftId;
8321
      private final String _fieldName;
8322
 
8323
      _Fields(short thriftId, String fieldName) {
8324
        _thriftId = thriftId;
8325
        _fieldName = fieldName;
8326
      }
8327
 
8328
      public short getThriftFieldId() {
8329
        return _thriftId;
8330
      }
8331
 
8332
      public String getFieldName() {
8333
        return _fieldName;
8334
      }
8335
    }
8336
 
8337
    // isset id assignments
8338
 
8339
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8340
    static {
8341
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8342
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8343
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
8344
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class))));
8345
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8346
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
8347
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8348
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemsFromLastScanType_result.class, metaDataMap);
8349
    }
8350
 
8351
    public getInventoryItemsFromLastScanType_result() {
8352
    }
8353
 
8354
    public getInventoryItemsFromLastScanType_result(
8355
      List<InventoryItem> success,
8356
      WarehouseServiceException wex)
8357
    {
8358
      this();
8359
      this.success = success;
8360
      this.wex = wex;
8361
    }
8362
 
8363
    /**
8364
     * Performs a deep copy on <i>other</i>.
8365
     */
8366
    public getInventoryItemsFromLastScanType_result(getInventoryItemsFromLastScanType_result other) {
8367
      if (other.isSetSuccess()) {
8368
        List<InventoryItem> __this__success = new ArrayList<InventoryItem>();
8369
        for (InventoryItem other_element : other.success) {
8370
          __this__success.add(new InventoryItem(other_element));
8371
        }
8372
        this.success = __this__success;
8373
      }
8374
      if (other.isSetWex()) {
8375
        this.wex = new WarehouseServiceException(other.wex);
8376
      }
8377
    }
8378
 
8379
    public getInventoryItemsFromLastScanType_result deepCopy() {
8380
      return new getInventoryItemsFromLastScanType_result(this);
8381
    }
8382
 
8383
    @Override
8384
    public void clear() {
8385
      this.success = null;
8386
      this.wex = null;
8387
    }
8388
 
8389
    public int getSuccessSize() {
8390
      return (this.success == null) ? 0 : this.success.size();
8391
    }
8392
 
8393
    public java.util.Iterator<InventoryItem> getSuccessIterator() {
8394
      return (this.success == null) ? null : this.success.iterator();
8395
    }
8396
 
8397
    public void addToSuccess(InventoryItem elem) {
8398
      if (this.success == null) {
8399
        this.success = new ArrayList<InventoryItem>();
8400
      }
8401
      this.success.add(elem);
8402
    }
8403
 
8404
    public List<InventoryItem> getSuccess() {
8405
      return this.success;
8406
    }
8407
 
8408
    public void setSuccess(List<InventoryItem> success) {
8409
      this.success = success;
8410
    }
8411
 
8412
    public void unsetSuccess() {
8413
      this.success = null;
8414
    }
8415
 
8416
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8417
    public boolean isSetSuccess() {
8418
      return this.success != null;
8419
    }
8420
 
8421
    public void setSuccessIsSet(boolean value) {
8422
      if (!value) {
8423
        this.success = null;
8424
      }
8425
    }
8426
 
8427
    public WarehouseServiceException getWex() {
8428
      return this.wex;
8429
    }
8430
 
8431
    public void setWex(WarehouseServiceException wex) {
8432
      this.wex = wex;
8433
    }
8434
 
8435
    public void unsetWex() {
8436
      this.wex = null;
8437
    }
8438
 
8439
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
8440
    public boolean isSetWex() {
8441
      return this.wex != null;
8442
    }
8443
 
8444
    public void setWexIsSet(boolean value) {
8445
      if (!value) {
8446
        this.wex = null;
8447
      }
8448
    }
8449
 
8450
    public void setFieldValue(_Fields field, Object value) {
8451
      switch (field) {
8452
      case SUCCESS:
8453
        if (value == null) {
8454
          unsetSuccess();
8455
        } else {
8456
          setSuccess((List<InventoryItem>)value);
8457
        }
8458
        break;
8459
 
8460
      case WEX:
8461
        if (value == null) {
8462
          unsetWex();
8463
        } else {
8464
          setWex((WarehouseServiceException)value);
8465
        }
8466
        break;
8467
 
8468
      }
8469
    }
8470
 
8471
    public Object getFieldValue(_Fields field) {
8472
      switch (field) {
8473
      case SUCCESS:
8474
        return getSuccess();
8475
 
8476
      case WEX:
8477
        return getWex();
8478
 
8479
      }
8480
      throw new IllegalStateException();
8481
    }
8482
 
8483
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8484
    public boolean isSet(_Fields field) {
8485
      if (field == null) {
8486
        throw new IllegalArgumentException();
8487
      }
8488
 
8489
      switch (field) {
8490
      case SUCCESS:
8491
        return isSetSuccess();
8492
      case WEX:
8493
        return isSetWex();
8494
      }
8495
      throw new IllegalStateException();
8496
    }
8497
 
8498
    @Override
8499
    public boolean equals(Object that) {
8500
      if (that == null)
8501
        return false;
8502
      if (that instanceof getInventoryItemsFromLastScanType_result)
8503
        return this.equals((getInventoryItemsFromLastScanType_result)that);
8504
      return false;
8505
    }
8506
 
8507
    public boolean equals(getInventoryItemsFromLastScanType_result that) {
8508
      if (that == null)
8509
        return false;
8510
 
8511
      boolean this_present_success = true && this.isSetSuccess();
8512
      boolean that_present_success = true && that.isSetSuccess();
8513
      if (this_present_success || that_present_success) {
8514
        if (!(this_present_success && that_present_success))
8515
          return false;
8516
        if (!this.success.equals(that.success))
8517
          return false;
8518
      }
8519
 
8520
      boolean this_present_wex = true && this.isSetWex();
8521
      boolean that_present_wex = true && that.isSetWex();
8522
      if (this_present_wex || that_present_wex) {
8523
        if (!(this_present_wex && that_present_wex))
8524
          return false;
8525
        if (!this.wex.equals(that.wex))
8526
          return false;
8527
      }
8528
 
8529
      return true;
8530
    }
8531
 
8532
    @Override
8533
    public int hashCode() {
8534
      return 0;
8535
    }
8536
 
8537
    public int compareTo(getInventoryItemsFromLastScanType_result other) {
8538
      if (!getClass().equals(other.getClass())) {
8539
        return getClass().getName().compareTo(other.getClass().getName());
8540
      }
8541
 
8542
      int lastComparison = 0;
8543
      getInventoryItemsFromLastScanType_result typedOther = (getInventoryItemsFromLastScanType_result)other;
8544
 
8545
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8546
      if (lastComparison != 0) {
8547
        return lastComparison;
8548
      }
8549
      if (isSetSuccess()) {
8550
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8551
        if (lastComparison != 0) {
8552
          return lastComparison;
8553
        }
8554
      }
8555
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
8556
      if (lastComparison != 0) {
8557
        return lastComparison;
8558
      }
8559
      if (isSetWex()) {
8560
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
8561
        if (lastComparison != 0) {
8562
          return lastComparison;
8563
        }
8564
      }
8565
      return 0;
8566
    }
8567
 
8568
    public _Fields fieldForId(int fieldId) {
8569
      return _Fields.findByThriftId(fieldId);
8570
    }
8571
 
8572
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8573
      org.apache.thrift.protocol.TField field;
8574
      iprot.readStructBegin();
8575
      while (true)
8576
      {
8577
        field = iprot.readFieldBegin();
8578
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8579
          break;
8580
        }
8581
        switch (field.id) {
8582
          case 0: // SUCCESS
8583
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8584
              {
5361 mandeep.dh 8585
                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
8586
                this.success = new ArrayList<InventoryItem>(_list8.size);
8587
                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
5185 mandeep.dh 8588
                {
5361 mandeep.dh 8589
                  InventoryItem _elem10; // required
8590
                  _elem10 = new InventoryItem();
8591
                  _elem10.read(iprot);
8592
                  this.success.add(_elem10);
5185 mandeep.dh 8593
                }
8594
                iprot.readListEnd();
8595
              }
8596
            } else { 
8597
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8598
            }
8599
            break;
8600
          case 1: // WEX
8601
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8602
              this.wex = new WarehouseServiceException();
8603
              this.wex.read(iprot);
8604
            } else { 
8605
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8606
            }
8607
            break;
8608
          default:
8609
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8610
        }
8611
        iprot.readFieldEnd();
8612
      }
8613
      iprot.readStructEnd();
8614
      validate();
8615
    }
8616
 
8617
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8618
      oprot.writeStructBegin(STRUCT_DESC);
8619
 
8620
      if (this.isSetSuccess()) {
8621
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8622
        {
8623
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
5361 mandeep.dh 8624
          for (InventoryItem _iter11 : this.success)
5185 mandeep.dh 8625
          {
5361 mandeep.dh 8626
            _iter11.write(oprot);
5185 mandeep.dh 8627
          }
8628
          oprot.writeListEnd();
8629
        }
8630
        oprot.writeFieldEnd();
8631
      } else if (this.isSetWex()) {
8632
        oprot.writeFieldBegin(WEX_FIELD_DESC);
8633
        this.wex.write(oprot);
8634
        oprot.writeFieldEnd();
8635
      }
8636
      oprot.writeFieldStop();
8637
      oprot.writeStructEnd();
8638
    }
8639
 
8640
    @Override
8641
    public String toString() {
8642
      StringBuilder sb = new StringBuilder("getInventoryItemsFromLastScanType_result(");
8643
      boolean first = true;
8644
 
8645
      sb.append("success:");
8646
      if (this.success == null) {
8647
        sb.append("null");
8648
      } else {
8649
        sb.append(this.success);
8650
      }
8651
      first = false;
8652
      if (!first) sb.append(", ");
8653
      sb.append("wex:");
8654
      if (this.wex == null) {
8655
        sb.append("null");
8656
      } else {
8657
        sb.append(this.wex);
8658
      }
8659
      first = false;
8660
      sb.append(")");
8661
      return sb.toString();
8662
    }
8663
 
8664
    public void validate() throws org.apache.thrift.TException {
8665
      // check for required fields
8666
    }
8667
 
8668
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8669
      try {
8670
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8671
      } catch (org.apache.thrift.TException te) {
8672
        throw new java.io.IOException(te);
8673
      }
8674
    }
8675
 
8676
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8677
      try {
8678
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8679
      } catch (org.apache.thrift.TException te) {
8680
        throw new java.io.IOException(te);
8681
      }
8682
    }
8683
 
8684
  }
8685
 
8686
  public static class getInventoryItemFromId_args implements org.apache.thrift.TBase<getInventoryItemFromId_args, getInventoryItemFromId_args._Fields>, java.io.Serializable, Cloneable   {
8687
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromId_args");
8688
 
8689
    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);
8690
 
8691
    private long inventoryItemId; // required
8692
 
8693
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8694
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8695
      INVENTORY_ITEM_ID((short)1, "inventoryItemId");
8696
 
8697
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8698
 
8699
      static {
8700
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8701
          byName.put(field.getFieldName(), field);
8702
        }
8703
      }
8704
 
8705
      /**
8706
       * Find the _Fields constant that matches fieldId, or null if its not found.
8707
       */
8708
      public static _Fields findByThriftId(int fieldId) {
8709
        switch(fieldId) {
8710
          case 1: // INVENTORY_ITEM_ID
8711
            return INVENTORY_ITEM_ID;
8712
          default:
8713
            return null;
8714
        }
8715
      }
8716
 
8717
      /**
8718
       * Find the _Fields constant that matches fieldId, throwing an exception
8719
       * if it is not found.
8720
       */
8721
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8722
        _Fields fields = findByThriftId(fieldId);
8723
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8724
        return fields;
8725
      }
8726
 
8727
      /**
8728
       * Find the _Fields constant that matches name, or null if its not found.
8729
       */
8730
      public static _Fields findByName(String name) {
8731
        return byName.get(name);
8732
      }
8733
 
8734
      private final short _thriftId;
8735
      private final String _fieldName;
8736
 
8737
      _Fields(short thriftId, String fieldName) {
8738
        _thriftId = thriftId;
8739
        _fieldName = fieldName;
8740
      }
8741
 
8742
      public short getThriftFieldId() {
8743
        return _thriftId;
8744
      }
8745
 
8746
      public String getFieldName() {
8747
        return _fieldName;
8748
      }
8749
    }
8750
 
8751
    // isset id assignments
8752
    private static final int __INVENTORYITEMID_ISSET_ID = 0;
8753
    private BitSet __isset_bit_vector = new BitSet(1);
8754
 
8755
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8756
    static {
8757
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8758
      tmpMap.put(_Fields.INVENTORY_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("inventoryItemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8759
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8760
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8761
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromId_args.class, metaDataMap);
8762
    }
8763
 
8764
    public getInventoryItemFromId_args() {
8765
    }
8766
 
8767
    public getInventoryItemFromId_args(
8768
      long inventoryItemId)
8769
    {
8770
      this();
8771
      this.inventoryItemId = inventoryItemId;
8772
      setInventoryItemIdIsSet(true);
8773
    }
8774
 
8775
    /**
8776
     * Performs a deep copy on <i>other</i>.
8777
     */
8778
    public getInventoryItemFromId_args(getInventoryItemFromId_args other) {
8779
      __isset_bit_vector.clear();
8780
      __isset_bit_vector.or(other.__isset_bit_vector);
8781
      this.inventoryItemId = other.inventoryItemId;
8782
    }
8783
 
8784
    public getInventoryItemFromId_args deepCopy() {
8785
      return new getInventoryItemFromId_args(this);
8786
    }
8787
 
8788
    @Override
8789
    public void clear() {
8790
      setInventoryItemIdIsSet(false);
8791
      this.inventoryItemId = 0;
8792
    }
8793
 
8794
    public long getInventoryItemId() {
8795
      return this.inventoryItemId;
8796
    }
8797
 
8798
    public void setInventoryItemId(long inventoryItemId) {
8799
      this.inventoryItemId = inventoryItemId;
8800
      setInventoryItemIdIsSet(true);
8801
    }
8802
 
8803
    public void unsetInventoryItemId() {
8804
      __isset_bit_vector.clear(__INVENTORYITEMID_ISSET_ID);
8805
    }
8806
 
8807
    /** Returns true if field inventoryItemId is set (has been assigned a value) and false otherwise */
8808
    public boolean isSetInventoryItemId() {
8809
      return __isset_bit_vector.get(__INVENTORYITEMID_ISSET_ID);
8810
    }
8811
 
8812
    public void setInventoryItemIdIsSet(boolean value) {
8813
      __isset_bit_vector.set(__INVENTORYITEMID_ISSET_ID, value);
8814
    }
8815
 
8816
    public void setFieldValue(_Fields field, Object value) {
8817
      switch (field) {
8818
      case INVENTORY_ITEM_ID:
8819
        if (value == null) {
8820
          unsetInventoryItemId();
8821
        } else {
8822
          setInventoryItemId((Long)value);
8823
        }
8824
        break;
8825
 
8826
      }
8827
    }
8828
 
8829
    public Object getFieldValue(_Fields field) {
8830
      switch (field) {
8831
      case INVENTORY_ITEM_ID:
8832
        return Long.valueOf(getInventoryItemId());
8833
 
8834
      }
8835
      throw new IllegalStateException();
8836
    }
8837
 
8838
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8839
    public boolean isSet(_Fields field) {
8840
      if (field == null) {
8841
        throw new IllegalArgumentException();
8842
      }
8843
 
8844
      switch (field) {
8845
      case INVENTORY_ITEM_ID:
8846
        return isSetInventoryItemId();
8847
      }
8848
      throw new IllegalStateException();
8849
    }
8850
 
8851
    @Override
8852
    public boolean equals(Object that) {
8853
      if (that == null)
8854
        return false;
8855
      if (that instanceof getInventoryItemFromId_args)
8856
        return this.equals((getInventoryItemFromId_args)that);
8857
      return false;
8858
    }
8859
 
8860
    public boolean equals(getInventoryItemFromId_args that) {
8861
      if (that == null)
8862
        return false;
8863
 
8864
      boolean this_present_inventoryItemId = true;
8865
      boolean that_present_inventoryItemId = true;
8866
      if (this_present_inventoryItemId || that_present_inventoryItemId) {
8867
        if (!(this_present_inventoryItemId && that_present_inventoryItemId))
8868
          return false;
8869
        if (this.inventoryItemId != that.inventoryItemId)
8870
          return false;
8871
      }
8872
 
8873
      return true;
8874
    }
8875
 
8876
    @Override
8877
    public int hashCode() {
8878
      return 0;
8879
    }
8880
 
8881
    public int compareTo(getInventoryItemFromId_args other) {
8882
      if (!getClass().equals(other.getClass())) {
8883
        return getClass().getName().compareTo(other.getClass().getName());
8884
      }
8885
 
8886
      int lastComparison = 0;
8887
      getInventoryItemFromId_args typedOther = (getInventoryItemFromId_args)other;
8888
 
8889
      lastComparison = Boolean.valueOf(isSetInventoryItemId()).compareTo(typedOther.isSetInventoryItemId());
8890
      if (lastComparison != 0) {
8891
        return lastComparison;
8892
      }
8893
      if (isSetInventoryItemId()) {
8894
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItemId, typedOther.inventoryItemId);
8895
        if (lastComparison != 0) {
8896
          return lastComparison;
8897
        }
8898
      }
8899
      return 0;
8900
    }
8901
 
8902
    public _Fields fieldForId(int fieldId) {
8903
      return _Fields.findByThriftId(fieldId);
8904
    }
8905
 
8906
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8907
      org.apache.thrift.protocol.TField field;
8908
      iprot.readStructBegin();
8909
      while (true)
8910
      {
8911
        field = iprot.readFieldBegin();
8912
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8913
          break;
8914
        }
8915
        switch (field.id) {
8916
          case 1: // INVENTORY_ITEM_ID
8917
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8918
              this.inventoryItemId = iprot.readI64();
8919
              setInventoryItemIdIsSet(true);
8920
            } else { 
8921
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8922
            }
8923
            break;
8924
          default:
8925
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8926
        }
8927
        iprot.readFieldEnd();
8928
      }
8929
      iprot.readStructEnd();
8930
      validate();
8931
    }
8932
 
8933
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8934
      validate();
8935
 
8936
      oprot.writeStructBegin(STRUCT_DESC);
8937
      oprot.writeFieldBegin(INVENTORY_ITEM_ID_FIELD_DESC);
8938
      oprot.writeI64(this.inventoryItemId);
8939
      oprot.writeFieldEnd();
8940
      oprot.writeFieldStop();
8941
      oprot.writeStructEnd();
8942
    }
8943
 
8944
    @Override
8945
    public String toString() {
8946
      StringBuilder sb = new StringBuilder("getInventoryItemFromId_args(");
8947
      boolean first = true;
8948
 
8949
      sb.append("inventoryItemId:");
8950
      sb.append(this.inventoryItemId);
8951
      first = false;
8952
      sb.append(")");
8953
      return sb.toString();
8954
    }
8955
 
8956
    public void validate() throws org.apache.thrift.TException {
8957
      // check for required fields
8958
    }
8959
 
8960
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8961
      try {
8962
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8963
      } catch (org.apache.thrift.TException te) {
8964
        throw new java.io.IOException(te);
8965
      }
8966
    }
8967
 
8968
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8969
      try {
5372 mandeep.dh 8970
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8971
        __isset_bit_vector = new BitSet(1);
5185 mandeep.dh 8972
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8973
      } catch (org.apache.thrift.TException te) {
8974
        throw new java.io.IOException(te);
8975
      }
8976
    }
8977
 
8978
  }
8979
 
8980
  public static class getInventoryItemFromId_result implements org.apache.thrift.TBase<getInventoryItemFromId_result, getInventoryItemFromId_result._Fields>, java.io.Serializable, Cloneable   {
8981
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromId_result");
8982
 
8983
    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);
8984
    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);
8985
 
8986
    private InventoryItem success; // required
8987
    private WarehouseServiceException wex; // required
8988
 
8989
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8990
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8991
      SUCCESS((short)0, "success"),
8992
      WEX((short)1, "wex");
8993
 
8994
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8995
 
8996
      static {
8997
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8998
          byName.put(field.getFieldName(), field);
8999
        }
9000
      }
9001
 
9002
      /**
9003
       * Find the _Fields constant that matches fieldId, or null if its not found.
9004
       */
9005
      public static _Fields findByThriftId(int fieldId) {
9006
        switch(fieldId) {
9007
          case 0: // SUCCESS
9008
            return SUCCESS;
9009
          case 1: // WEX
9010
            return WEX;
9011
          default:
9012
            return null;
9013
        }
9014
      }
9015
 
9016
      /**
9017
       * Find the _Fields constant that matches fieldId, throwing an exception
9018
       * if it is not found.
9019
       */
9020
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9021
        _Fields fields = findByThriftId(fieldId);
9022
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9023
        return fields;
9024
      }
9025
 
9026
      /**
9027
       * Find the _Fields constant that matches name, or null if its not found.
9028
       */
9029
      public static _Fields findByName(String name) {
9030
        return byName.get(name);
9031
      }
9032
 
9033
      private final short _thriftId;
9034
      private final String _fieldName;
9035
 
9036
      _Fields(short thriftId, String fieldName) {
9037
        _thriftId = thriftId;
9038
        _fieldName = fieldName;
9039
      }
9040
 
9041
      public short getThriftFieldId() {
9042
        return _thriftId;
9043
      }
9044
 
9045
      public String getFieldName() {
9046
        return _fieldName;
9047
      }
9048
    }
9049
 
9050
    // isset id assignments
9051
 
9052
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9053
    static {
9054
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9055
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9056
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
9057
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9058
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9059
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9060
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromId_result.class, metaDataMap);
9061
    }
9062
 
9063
    public getInventoryItemFromId_result() {
9064
    }
9065
 
9066
    public getInventoryItemFromId_result(
9067
      InventoryItem success,
9068
      WarehouseServiceException wex)
9069
    {
9070
      this();
9071
      this.success = success;
9072
      this.wex = wex;
9073
    }
9074
 
9075
    /**
9076
     * Performs a deep copy on <i>other</i>.
9077
     */
9078
    public getInventoryItemFromId_result(getInventoryItemFromId_result other) {
9079
      if (other.isSetSuccess()) {
9080
        this.success = new InventoryItem(other.success);
9081
      }
9082
      if (other.isSetWex()) {
9083
        this.wex = new WarehouseServiceException(other.wex);
9084
      }
9085
    }
9086
 
9087
    public getInventoryItemFromId_result deepCopy() {
9088
      return new getInventoryItemFromId_result(this);
9089
    }
9090
 
9091
    @Override
9092
    public void clear() {
9093
      this.success = null;
9094
      this.wex = null;
9095
    }
9096
 
9097
    public InventoryItem getSuccess() {
9098
      return this.success;
9099
    }
9100
 
9101
    public void setSuccess(InventoryItem success) {
9102
      this.success = success;
9103
    }
9104
 
9105
    public void unsetSuccess() {
9106
      this.success = null;
9107
    }
9108
 
9109
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9110
    public boolean isSetSuccess() {
9111
      return this.success != null;
9112
    }
9113
 
9114
    public void setSuccessIsSet(boolean value) {
9115
      if (!value) {
9116
        this.success = null;
9117
      }
9118
    }
9119
 
9120
    public WarehouseServiceException getWex() {
9121
      return this.wex;
9122
    }
9123
 
9124
    public void setWex(WarehouseServiceException wex) {
9125
      this.wex = wex;
9126
    }
9127
 
9128
    public void unsetWex() {
9129
      this.wex = null;
9130
    }
9131
 
9132
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
9133
    public boolean isSetWex() {
9134
      return this.wex != null;
9135
    }
9136
 
9137
    public void setWexIsSet(boolean value) {
9138
      if (!value) {
9139
        this.wex = null;
9140
      }
9141
    }
9142
 
9143
    public void setFieldValue(_Fields field, Object value) {
9144
      switch (field) {
9145
      case SUCCESS:
9146
        if (value == null) {
9147
          unsetSuccess();
9148
        } else {
9149
          setSuccess((InventoryItem)value);
9150
        }
9151
        break;
9152
 
9153
      case WEX:
9154
        if (value == null) {
9155
          unsetWex();
9156
        } else {
9157
          setWex((WarehouseServiceException)value);
9158
        }
9159
        break;
9160
 
9161
      }
9162
    }
9163
 
9164
    public Object getFieldValue(_Fields field) {
9165
      switch (field) {
9166
      case SUCCESS:
9167
        return getSuccess();
9168
 
9169
      case WEX:
9170
        return getWex();
9171
 
9172
      }
9173
      throw new IllegalStateException();
9174
    }
9175
 
9176
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9177
    public boolean isSet(_Fields field) {
9178
      if (field == null) {
9179
        throw new IllegalArgumentException();
9180
      }
9181
 
9182
      switch (field) {
9183
      case SUCCESS:
9184
        return isSetSuccess();
9185
      case WEX:
9186
        return isSetWex();
9187
      }
9188
      throw new IllegalStateException();
9189
    }
9190
 
9191
    @Override
9192
    public boolean equals(Object that) {
9193
      if (that == null)
9194
        return false;
9195
      if (that instanceof getInventoryItemFromId_result)
9196
        return this.equals((getInventoryItemFromId_result)that);
9197
      return false;
9198
    }
9199
 
9200
    public boolean equals(getInventoryItemFromId_result that) {
9201
      if (that == null)
9202
        return false;
9203
 
9204
      boolean this_present_success = true && this.isSetSuccess();
9205
      boolean that_present_success = true && that.isSetSuccess();
9206
      if (this_present_success || that_present_success) {
9207
        if (!(this_present_success && that_present_success))
9208
          return false;
9209
        if (!this.success.equals(that.success))
9210
          return false;
9211
      }
9212
 
9213
      boolean this_present_wex = true && this.isSetWex();
9214
      boolean that_present_wex = true && that.isSetWex();
9215
      if (this_present_wex || that_present_wex) {
9216
        if (!(this_present_wex && that_present_wex))
9217
          return false;
9218
        if (!this.wex.equals(that.wex))
9219
          return false;
9220
      }
9221
 
9222
      return true;
9223
    }
9224
 
9225
    @Override
9226
    public int hashCode() {
9227
      return 0;
9228
    }
9229
 
9230
    public int compareTo(getInventoryItemFromId_result other) {
9231
      if (!getClass().equals(other.getClass())) {
9232
        return getClass().getName().compareTo(other.getClass().getName());
9233
      }
9234
 
9235
      int lastComparison = 0;
9236
      getInventoryItemFromId_result typedOther = (getInventoryItemFromId_result)other;
9237
 
9238
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9239
      if (lastComparison != 0) {
9240
        return lastComparison;
9241
      }
9242
      if (isSetSuccess()) {
9243
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9244
        if (lastComparison != 0) {
9245
          return lastComparison;
9246
        }
9247
      }
9248
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
9249
      if (lastComparison != 0) {
9250
        return lastComparison;
9251
      }
9252
      if (isSetWex()) {
9253
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
9254
        if (lastComparison != 0) {
9255
          return lastComparison;
9256
        }
9257
      }
9258
      return 0;
9259
    }
9260
 
9261
    public _Fields fieldForId(int fieldId) {
9262
      return _Fields.findByThriftId(fieldId);
9263
    }
9264
 
9265
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9266
      org.apache.thrift.protocol.TField field;
9267
      iprot.readStructBegin();
9268
      while (true)
9269
      {
9270
        field = iprot.readFieldBegin();
9271
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9272
          break;
9273
        }
9274
        switch (field.id) {
9275
          case 0: // SUCCESS
9276
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9277
              this.success = new InventoryItem();
9278
              this.success.read(iprot);
9279
            } else { 
9280
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9281
            }
9282
            break;
9283
          case 1: // WEX
9284
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9285
              this.wex = new WarehouseServiceException();
9286
              this.wex.read(iprot);
9287
            } else { 
9288
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9289
            }
9290
            break;
9291
          default:
9292
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9293
        }
9294
        iprot.readFieldEnd();
9295
      }
9296
      iprot.readStructEnd();
9297
      validate();
9298
    }
9299
 
9300
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9301
      oprot.writeStructBegin(STRUCT_DESC);
9302
 
9303
      if (this.isSetSuccess()) {
9304
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9305
        this.success.write(oprot);
9306
        oprot.writeFieldEnd();
9307
      } else if (this.isSetWex()) {
9308
        oprot.writeFieldBegin(WEX_FIELD_DESC);
9309
        this.wex.write(oprot);
9310
        oprot.writeFieldEnd();
9311
      }
9312
      oprot.writeFieldStop();
9313
      oprot.writeStructEnd();
9314
    }
9315
 
9316
    @Override
9317
    public String toString() {
9318
      StringBuilder sb = new StringBuilder("getInventoryItemFromId_result(");
9319
      boolean first = true;
9320
 
9321
      sb.append("success:");
9322
      if (this.success == null) {
9323
        sb.append("null");
9324
      } else {
9325
        sb.append(this.success);
9326
      }
9327
      first = false;
9328
      if (!first) sb.append(", ");
9329
      sb.append("wex:");
9330
      if (this.wex == null) {
9331
        sb.append("null");
9332
      } else {
9333
        sb.append(this.wex);
9334
      }
9335
      first = false;
9336
      sb.append(")");
9337
      return sb.toString();
9338
    }
9339
 
9340
    public void validate() throws org.apache.thrift.TException {
9341
      // check for required fields
9342
    }
9343
 
9344
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9345
      try {
9346
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9347
      } catch (org.apache.thrift.TException te) {
9348
        throw new java.io.IOException(te);
9349
      }
9350
    }
9351
 
9352
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9353
      try {
9354
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9355
      } catch (org.apache.thrift.TException te) {
9356
        throw new java.io.IOException(te);
9357
      }
9358
    }
9359
 
9360
  }
9361
 
5372 mandeep.dh 9362
  public static class getPurchaseScans_args implements org.apache.thrift.TBase<getPurchaseScans_args, getPurchaseScans_args._Fields>, java.io.Serializable, Cloneable   {
9363
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseScans_args");
9364
 
9365
    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);
9366
    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);
9367
 
9368
    private long startDate; // required
9369
    private long endDate; // required
9370
 
9371
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9372
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9373
      START_DATE((short)1, "startDate"),
9374
      END_DATE((short)2, "endDate");
9375
 
9376
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9377
 
9378
      static {
9379
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9380
          byName.put(field.getFieldName(), field);
9381
        }
9382
      }
9383
 
9384
      /**
9385
       * Find the _Fields constant that matches fieldId, or null if its not found.
9386
       */
9387
      public static _Fields findByThriftId(int fieldId) {
9388
        switch(fieldId) {
9389
          case 1: // START_DATE
9390
            return START_DATE;
9391
          case 2: // END_DATE
9392
            return END_DATE;
9393
          default:
9394
            return null;
9395
        }
9396
      }
9397
 
9398
      /**
9399
       * Find the _Fields constant that matches fieldId, throwing an exception
9400
       * if it is not found.
9401
       */
9402
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9403
        _Fields fields = findByThriftId(fieldId);
9404
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9405
        return fields;
9406
      }
9407
 
9408
      /**
9409
       * Find the _Fields constant that matches name, or null if its not found.
9410
       */
9411
      public static _Fields findByName(String name) {
9412
        return byName.get(name);
9413
      }
9414
 
9415
      private final short _thriftId;
9416
      private final String _fieldName;
9417
 
9418
      _Fields(short thriftId, String fieldName) {
9419
        _thriftId = thriftId;
9420
        _fieldName = fieldName;
9421
      }
9422
 
9423
      public short getThriftFieldId() {
9424
        return _thriftId;
9425
      }
9426
 
9427
      public String getFieldName() {
9428
        return _fieldName;
9429
      }
9430
    }
9431
 
9432
    // isset id assignments
9433
    private static final int __STARTDATE_ISSET_ID = 0;
9434
    private static final int __ENDDATE_ISSET_ID = 1;
9435
    private BitSet __isset_bit_vector = new BitSet(2);
9436
 
9437
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9438
    static {
9439
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9440
      tmpMap.put(_Fields.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9441
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9442
      tmpMap.put(_Fields.END_DATE, new org.apache.thrift.meta_data.FieldMetaData("endDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9443
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9444
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9445
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseScans_args.class, metaDataMap);
9446
    }
9447
 
9448
    public getPurchaseScans_args() {
9449
    }
9450
 
9451
    public getPurchaseScans_args(
9452
      long startDate,
9453
      long endDate)
9454
    {
9455
      this();
9456
      this.startDate = startDate;
9457
      setStartDateIsSet(true);
9458
      this.endDate = endDate;
9459
      setEndDateIsSet(true);
9460
    }
9461
 
9462
    /**
9463
     * Performs a deep copy on <i>other</i>.
9464
     */
9465
    public getPurchaseScans_args(getPurchaseScans_args other) {
9466
      __isset_bit_vector.clear();
9467
      __isset_bit_vector.or(other.__isset_bit_vector);
9468
      this.startDate = other.startDate;
9469
      this.endDate = other.endDate;
9470
    }
9471
 
9472
    public getPurchaseScans_args deepCopy() {
9473
      return new getPurchaseScans_args(this);
9474
    }
9475
 
9476
    @Override
9477
    public void clear() {
9478
      setStartDateIsSet(false);
9479
      this.startDate = 0;
9480
      setEndDateIsSet(false);
9481
      this.endDate = 0;
9482
    }
9483
 
9484
    public long getStartDate() {
9485
      return this.startDate;
9486
    }
9487
 
9488
    public void setStartDate(long startDate) {
9489
      this.startDate = startDate;
9490
      setStartDateIsSet(true);
9491
    }
9492
 
9493
    public void unsetStartDate() {
9494
      __isset_bit_vector.clear(__STARTDATE_ISSET_ID);
9495
    }
9496
 
9497
    /** Returns true if field startDate is set (has been assigned a value) and false otherwise */
9498
    public boolean isSetStartDate() {
9499
      return __isset_bit_vector.get(__STARTDATE_ISSET_ID);
9500
    }
9501
 
9502
    public void setStartDateIsSet(boolean value) {
9503
      __isset_bit_vector.set(__STARTDATE_ISSET_ID, value);
9504
    }
9505
 
9506
    public long getEndDate() {
9507
      return this.endDate;
9508
    }
9509
 
9510
    public void setEndDate(long endDate) {
9511
      this.endDate = endDate;
9512
      setEndDateIsSet(true);
9513
    }
9514
 
9515
    public void unsetEndDate() {
9516
      __isset_bit_vector.clear(__ENDDATE_ISSET_ID);
9517
    }
9518
 
9519
    /** Returns true if field endDate is set (has been assigned a value) and false otherwise */
9520
    public boolean isSetEndDate() {
9521
      return __isset_bit_vector.get(__ENDDATE_ISSET_ID);
9522
    }
9523
 
9524
    public void setEndDateIsSet(boolean value) {
9525
      __isset_bit_vector.set(__ENDDATE_ISSET_ID, value);
9526
    }
9527
 
9528
    public void setFieldValue(_Fields field, Object value) {
9529
      switch (field) {
9530
      case START_DATE:
9531
        if (value == null) {
9532
          unsetStartDate();
9533
        } else {
9534
          setStartDate((Long)value);
9535
        }
9536
        break;
9537
 
9538
      case END_DATE:
9539
        if (value == null) {
9540
          unsetEndDate();
9541
        } else {
9542
          setEndDate((Long)value);
9543
        }
9544
        break;
9545
 
9546
      }
9547
    }
9548
 
9549
    public Object getFieldValue(_Fields field) {
9550
      switch (field) {
9551
      case START_DATE:
9552
        return Long.valueOf(getStartDate());
9553
 
9554
      case END_DATE:
9555
        return Long.valueOf(getEndDate());
9556
 
9557
      }
9558
      throw new IllegalStateException();
9559
    }
9560
 
9561
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9562
    public boolean isSet(_Fields field) {
9563
      if (field == null) {
9564
        throw new IllegalArgumentException();
9565
      }
9566
 
9567
      switch (field) {
9568
      case START_DATE:
9569
        return isSetStartDate();
9570
      case END_DATE:
9571
        return isSetEndDate();
9572
      }
9573
      throw new IllegalStateException();
9574
    }
9575
 
9576
    @Override
9577
    public boolean equals(Object that) {
9578
      if (that == null)
9579
        return false;
9580
      if (that instanceof getPurchaseScans_args)
9581
        return this.equals((getPurchaseScans_args)that);
9582
      return false;
9583
    }
9584
 
9585
    public boolean equals(getPurchaseScans_args that) {
9586
      if (that == null)
9587
        return false;
9588
 
9589
      boolean this_present_startDate = true;
9590
      boolean that_present_startDate = true;
9591
      if (this_present_startDate || that_present_startDate) {
9592
        if (!(this_present_startDate && that_present_startDate))
9593
          return false;
9594
        if (this.startDate != that.startDate)
9595
          return false;
9596
      }
9597
 
9598
      boolean this_present_endDate = true;
9599
      boolean that_present_endDate = true;
9600
      if (this_present_endDate || that_present_endDate) {
9601
        if (!(this_present_endDate && that_present_endDate))
9602
          return false;
9603
        if (this.endDate != that.endDate)
9604
          return false;
9605
      }
9606
 
9607
      return true;
9608
    }
9609
 
9610
    @Override
9611
    public int hashCode() {
9612
      return 0;
9613
    }
9614
 
9615
    public int compareTo(getPurchaseScans_args other) {
9616
      if (!getClass().equals(other.getClass())) {
9617
        return getClass().getName().compareTo(other.getClass().getName());
9618
      }
9619
 
9620
      int lastComparison = 0;
9621
      getPurchaseScans_args typedOther = (getPurchaseScans_args)other;
9622
 
9623
      lastComparison = Boolean.valueOf(isSetStartDate()).compareTo(typedOther.isSetStartDate());
9624
      if (lastComparison != 0) {
9625
        return lastComparison;
9626
      }
9627
      if (isSetStartDate()) {
9628
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startDate, typedOther.startDate);
9629
        if (lastComparison != 0) {
9630
          return lastComparison;
9631
        }
9632
      }
9633
      lastComparison = Boolean.valueOf(isSetEndDate()).compareTo(typedOther.isSetEndDate());
9634
      if (lastComparison != 0) {
9635
        return lastComparison;
9636
      }
9637
      if (isSetEndDate()) {
9638
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endDate, typedOther.endDate);
9639
        if (lastComparison != 0) {
9640
          return lastComparison;
9641
        }
9642
      }
9643
      return 0;
9644
    }
9645
 
9646
    public _Fields fieldForId(int fieldId) {
9647
      return _Fields.findByThriftId(fieldId);
9648
    }
9649
 
9650
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9651
      org.apache.thrift.protocol.TField field;
9652
      iprot.readStructBegin();
9653
      while (true)
9654
      {
9655
        field = iprot.readFieldBegin();
9656
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9657
          break;
9658
        }
9659
        switch (field.id) {
9660
          case 1: // START_DATE
9661
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9662
              this.startDate = iprot.readI64();
9663
              setStartDateIsSet(true);
9664
            } else { 
9665
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9666
            }
9667
            break;
9668
          case 2: // END_DATE
9669
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9670
              this.endDate = iprot.readI64();
9671
              setEndDateIsSet(true);
9672
            } else { 
9673
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9674
            }
9675
            break;
9676
          default:
9677
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9678
        }
9679
        iprot.readFieldEnd();
9680
      }
9681
      iprot.readStructEnd();
9682
      validate();
9683
    }
9684
 
9685
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9686
      validate();
9687
 
9688
      oprot.writeStructBegin(STRUCT_DESC);
9689
      oprot.writeFieldBegin(START_DATE_FIELD_DESC);
9690
      oprot.writeI64(this.startDate);
9691
      oprot.writeFieldEnd();
9692
      oprot.writeFieldBegin(END_DATE_FIELD_DESC);
9693
      oprot.writeI64(this.endDate);
9694
      oprot.writeFieldEnd();
9695
      oprot.writeFieldStop();
9696
      oprot.writeStructEnd();
9697
    }
9698
 
9699
    @Override
9700
    public String toString() {
9701
      StringBuilder sb = new StringBuilder("getPurchaseScans_args(");
9702
      boolean first = true;
9703
 
9704
      sb.append("startDate:");
9705
      sb.append(this.startDate);
9706
      first = false;
9707
      if (!first) sb.append(", ");
9708
      sb.append("endDate:");
9709
      sb.append(this.endDate);
9710
      first = false;
9711
      sb.append(")");
9712
      return sb.toString();
9713
    }
9714
 
9715
    public void validate() throws org.apache.thrift.TException {
9716
      // check for required fields
9717
    }
9718
 
9719
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9720
      try {
9721
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9722
      } catch (org.apache.thrift.TException te) {
9723
        throw new java.io.IOException(te);
9724
      }
9725
    }
9726
 
9727
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9728
      try {
9729
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
9730
        __isset_bit_vector = new BitSet(1);
9731
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9732
      } catch (org.apache.thrift.TException te) {
9733
        throw new java.io.IOException(te);
9734
      }
9735
    }
9736
 
9737
  }
9738
 
9739
  public static class getPurchaseScans_result implements org.apache.thrift.TBase<getPurchaseScans_result, getPurchaseScans_result._Fields>, java.io.Serializable, Cloneable   {
9740
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseScans_result");
9741
 
9742
    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);
9743
 
9744
    private List<DetailedPurchaseScan> success; // required
9745
 
9746
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9747
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9748
      SUCCESS((short)0, "success");
9749
 
9750
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9751
 
9752
      static {
9753
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9754
          byName.put(field.getFieldName(), field);
9755
        }
9756
      }
9757
 
9758
      /**
9759
       * Find the _Fields constant that matches fieldId, or null if its not found.
9760
       */
9761
      public static _Fields findByThriftId(int fieldId) {
9762
        switch(fieldId) {
9763
          case 0: // SUCCESS
9764
            return SUCCESS;
9765
          default:
9766
            return null;
9767
        }
9768
      }
9769
 
9770
      /**
9771
       * Find the _Fields constant that matches fieldId, throwing an exception
9772
       * if it is not found.
9773
       */
9774
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9775
        _Fields fields = findByThriftId(fieldId);
9776
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9777
        return fields;
9778
      }
9779
 
9780
      /**
9781
       * Find the _Fields constant that matches name, or null if its not found.
9782
       */
9783
      public static _Fields findByName(String name) {
9784
        return byName.get(name);
9785
      }
9786
 
9787
      private final short _thriftId;
9788
      private final String _fieldName;
9789
 
9790
      _Fields(short thriftId, String fieldName) {
9791
        _thriftId = thriftId;
9792
        _fieldName = fieldName;
9793
      }
9794
 
9795
      public short getThriftFieldId() {
9796
        return _thriftId;
9797
      }
9798
 
9799
      public String getFieldName() {
9800
        return _fieldName;
9801
      }
9802
    }
9803
 
9804
    // isset id assignments
9805
 
9806
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9807
    static {
9808
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9809
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9810
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
9811
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DetailedPurchaseScan.class))));
9812
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9813
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseScans_result.class, metaDataMap);
9814
    }
9815
 
9816
    public getPurchaseScans_result() {
9817
    }
9818
 
9819
    public getPurchaseScans_result(
9820
      List<DetailedPurchaseScan> success)
9821
    {
9822
      this();
9823
      this.success = success;
9824
    }
9825
 
9826
    /**
9827
     * Performs a deep copy on <i>other</i>.
9828
     */
9829
    public getPurchaseScans_result(getPurchaseScans_result other) {
9830
      if (other.isSetSuccess()) {
9831
        List<DetailedPurchaseScan> __this__success = new ArrayList<DetailedPurchaseScan>();
9832
        for (DetailedPurchaseScan other_element : other.success) {
9833
          __this__success.add(new DetailedPurchaseScan(other_element));
9834
        }
9835
        this.success = __this__success;
9836
      }
9837
    }
9838
 
9839
    public getPurchaseScans_result deepCopy() {
9840
      return new getPurchaseScans_result(this);
9841
    }
9842
 
9843
    @Override
9844
    public void clear() {
9845
      this.success = null;
9846
    }
9847
 
9848
    public int getSuccessSize() {
9849
      return (this.success == null) ? 0 : this.success.size();
9850
    }
9851
 
9852
    public java.util.Iterator<DetailedPurchaseScan> getSuccessIterator() {
9853
      return (this.success == null) ? null : this.success.iterator();
9854
    }
9855
 
9856
    public void addToSuccess(DetailedPurchaseScan elem) {
9857
      if (this.success == null) {
9858
        this.success = new ArrayList<DetailedPurchaseScan>();
9859
      }
9860
      this.success.add(elem);
9861
    }
9862
 
9863
    public List<DetailedPurchaseScan> getSuccess() {
9864
      return this.success;
9865
    }
9866
 
9867
    public void setSuccess(List<DetailedPurchaseScan> success) {
9868
      this.success = success;
9869
    }
9870
 
9871
    public void unsetSuccess() {
9872
      this.success = null;
9873
    }
9874
 
9875
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9876
    public boolean isSetSuccess() {
9877
      return this.success != null;
9878
    }
9879
 
9880
    public void setSuccessIsSet(boolean value) {
9881
      if (!value) {
9882
        this.success = null;
9883
      }
9884
    }
9885
 
9886
    public void setFieldValue(_Fields field, Object value) {
9887
      switch (field) {
9888
      case SUCCESS:
9889
        if (value == null) {
9890
          unsetSuccess();
9891
        } else {
9892
          setSuccess((List<DetailedPurchaseScan>)value);
9893
        }
9894
        break;
9895
 
9896
      }
9897
    }
9898
 
9899
    public Object getFieldValue(_Fields field) {
9900
      switch (field) {
9901
      case SUCCESS:
9902
        return getSuccess();
9903
 
9904
      }
9905
      throw new IllegalStateException();
9906
    }
9907
 
9908
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9909
    public boolean isSet(_Fields field) {
9910
      if (field == null) {
9911
        throw new IllegalArgumentException();
9912
      }
9913
 
9914
      switch (field) {
9915
      case SUCCESS:
9916
        return isSetSuccess();
9917
      }
9918
      throw new IllegalStateException();
9919
    }
9920
 
9921
    @Override
9922
    public boolean equals(Object that) {
9923
      if (that == null)
9924
        return false;
9925
      if (that instanceof getPurchaseScans_result)
9926
        return this.equals((getPurchaseScans_result)that);
9927
      return false;
9928
    }
9929
 
9930
    public boolean equals(getPurchaseScans_result that) {
9931
      if (that == null)
9932
        return false;
9933
 
9934
      boolean this_present_success = true && this.isSetSuccess();
9935
      boolean that_present_success = true && that.isSetSuccess();
9936
      if (this_present_success || that_present_success) {
9937
        if (!(this_present_success && that_present_success))
9938
          return false;
9939
        if (!this.success.equals(that.success))
9940
          return false;
9941
      }
9942
 
9943
      return true;
9944
    }
9945
 
9946
    @Override
9947
    public int hashCode() {
9948
      return 0;
9949
    }
9950
 
9951
    public int compareTo(getPurchaseScans_result other) {
9952
      if (!getClass().equals(other.getClass())) {
9953
        return getClass().getName().compareTo(other.getClass().getName());
9954
      }
9955
 
9956
      int lastComparison = 0;
9957
      getPurchaseScans_result typedOther = (getPurchaseScans_result)other;
9958
 
9959
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9960
      if (lastComparison != 0) {
9961
        return lastComparison;
9962
      }
9963
      if (isSetSuccess()) {
9964
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9965
        if (lastComparison != 0) {
9966
          return lastComparison;
9967
        }
9968
      }
9969
      return 0;
9970
    }
9971
 
9972
    public _Fields fieldForId(int fieldId) {
9973
      return _Fields.findByThriftId(fieldId);
9974
    }
9975
 
9976
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9977
      org.apache.thrift.protocol.TField field;
9978
      iprot.readStructBegin();
9979
      while (true)
9980
      {
9981
        field = iprot.readFieldBegin();
9982
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9983
          break;
9984
        }
9985
        switch (field.id) {
9986
          case 0: // SUCCESS
9987
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
9988
              {
9989
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
9990
                this.success = new ArrayList<DetailedPurchaseScan>(_list12.size);
9991
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
9992
                {
9993
                  DetailedPurchaseScan _elem14; // required
9994
                  _elem14 = new DetailedPurchaseScan();
9995
                  _elem14.read(iprot);
9996
                  this.success.add(_elem14);
9997
                }
9998
                iprot.readListEnd();
9999
              }
10000
            } else { 
10001
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10002
            }
10003
            break;
10004
          default:
10005
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10006
        }
10007
        iprot.readFieldEnd();
10008
      }
10009
      iprot.readStructEnd();
10010
      validate();
10011
    }
10012
 
10013
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10014
      oprot.writeStructBegin(STRUCT_DESC);
10015
 
10016
      if (this.isSetSuccess()) {
10017
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10018
        {
10019
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
10020
          for (DetailedPurchaseScan _iter15 : this.success)
10021
          {
10022
            _iter15.write(oprot);
10023
          }
10024
          oprot.writeListEnd();
10025
        }
10026
        oprot.writeFieldEnd();
10027
      }
10028
      oprot.writeFieldStop();
10029
      oprot.writeStructEnd();
10030
    }
10031
 
10032
    @Override
10033
    public String toString() {
10034
      StringBuilder sb = new StringBuilder("getPurchaseScans_result(");
10035
      boolean first = true;
10036
 
10037
      sb.append("success:");
10038
      if (this.success == null) {
10039
        sb.append("null");
10040
      } else {
10041
        sb.append(this.success);
10042
      }
10043
      first = false;
10044
      sb.append(")");
10045
      return sb.toString();
10046
    }
10047
 
10048
    public void validate() throws org.apache.thrift.TException {
10049
      // check for required fields
10050
    }
10051
 
10052
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10053
      try {
10054
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10055
      } catch (org.apache.thrift.TException te) {
10056
        throw new java.io.IOException(te);
10057
      }
10058
    }
10059
 
10060
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10061
      try {
10062
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10063
      } catch (org.apache.thrift.TException te) {
10064
        throw new java.io.IOException(te);
10065
      }
10066
    }
10067
 
10068
  }
10069
 
5496 mandeep.dh 10070
  public static class fetchScansPerInvoiceNumber_args implements org.apache.thrift.TBase<fetchScansPerInvoiceNumber_args, fetchScansPerInvoiceNumber_args._Fields>, java.io.Serializable, Cloneable   {
10071
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchScansPerInvoiceNumber_args");
10072
 
10073
    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);
10074
 
10075
    private long date; // required
10076
 
10077
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10078
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10079
      DATE((short)1, "date");
10080
 
10081
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10082
 
10083
      static {
10084
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10085
          byName.put(field.getFieldName(), field);
10086
        }
10087
      }
10088
 
10089
      /**
10090
       * Find the _Fields constant that matches fieldId, or null if its not found.
10091
       */
10092
      public static _Fields findByThriftId(int fieldId) {
10093
        switch(fieldId) {
10094
          case 1: // DATE
10095
            return DATE;
10096
          default:
10097
            return null;
10098
        }
10099
      }
10100
 
10101
      /**
10102
       * Find the _Fields constant that matches fieldId, throwing an exception
10103
       * if it is not found.
10104
       */
10105
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10106
        _Fields fields = findByThriftId(fieldId);
10107
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10108
        return fields;
10109
      }
10110
 
10111
      /**
10112
       * Find the _Fields constant that matches name, or null if its not found.
10113
       */
10114
      public static _Fields findByName(String name) {
10115
        return byName.get(name);
10116
      }
10117
 
10118
      private final short _thriftId;
10119
      private final String _fieldName;
10120
 
10121
      _Fields(short thriftId, String fieldName) {
10122
        _thriftId = thriftId;
10123
        _fieldName = fieldName;
10124
      }
10125
 
10126
      public short getThriftFieldId() {
10127
        return _thriftId;
10128
      }
10129
 
10130
      public String getFieldName() {
10131
        return _fieldName;
10132
      }
10133
    }
10134
 
10135
    // isset id assignments
10136
    private static final int __DATE_ISSET_ID = 0;
10137
    private BitSet __isset_bit_vector = new BitSet(1);
10138
 
10139
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10140
    static {
10141
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10142
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10143
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10144
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10145
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchScansPerInvoiceNumber_args.class, metaDataMap);
10146
    }
10147
 
10148
    public fetchScansPerInvoiceNumber_args() {
10149
    }
10150
 
10151
    public fetchScansPerInvoiceNumber_args(
10152
      long date)
10153
    {
10154
      this();
10155
      this.date = date;
10156
      setDateIsSet(true);
10157
    }
10158
 
10159
    /**
10160
     * Performs a deep copy on <i>other</i>.
10161
     */
10162
    public fetchScansPerInvoiceNumber_args(fetchScansPerInvoiceNumber_args other) {
10163
      __isset_bit_vector.clear();
10164
      __isset_bit_vector.or(other.__isset_bit_vector);
10165
      this.date = other.date;
10166
    }
10167
 
10168
    public fetchScansPerInvoiceNumber_args deepCopy() {
10169
      return new fetchScansPerInvoiceNumber_args(this);
10170
    }
10171
 
10172
    @Override
10173
    public void clear() {
10174
      setDateIsSet(false);
10175
      this.date = 0;
10176
    }
10177
 
10178
    public long getDate() {
10179
      return this.date;
10180
    }
10181
 
10182
    public void setDate(long date) {
10183
      this.date = date;
10184
      setDateIsSet(true);
10185
    }
10186
 
10187
    public void unsetDate() {
10188
      __isset_bit_vector.clear(__DATE_ISSET_ID);
10189
    }
10190
 
10191
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
10192
    public boolean isSetDate() {
10193
      return __isset_bit_vector.get(__DATE_ISSET_ID);
10194
    }
10195
 
10196
    public void setDateIsSet(boolean value) {
10197
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
10198
    }
10199
 
10200
    public void setFieldValue(_Fields field, Object value) {
10201
      switch (field) {
10202
      case DATE:
10203
        if (value == null) {
10204
          unsetDate();
10205
        } else {
10206
          setDate((Long)value);
10207
        }
10208
        break;
10209
 
10210
      }
10211
    }
10212
 
10213
    public Object getFieldValue(_Fields field) {
10214
      switch (field) {
10215
      case DATE:
10216
        return Long.valueOf(getDate());
10217
 
10218
      }
10219
      throw new IllegalStateException();
10220
    }
10221
 
10222
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10223
    public boolean isSet(_Fields field) {
10224
      if (field == null) {
10225
        throw new IllegalArgumentException();
10226
      }
10227
 
10228
      switch (field) {
10229
      case DATE:
10230
        return isSetDate();
10231
      }
10232
      throw new IllegalStateException();
10233
    }
10234
 
10235
    @Override
10236
    public boolean equals(Object that) {
10237
      if (that == null)
10238
        return false;
10239
      if (that instanceof fetchScansPerInvoiceNumber_args)
10240
        return this.equals((fetchScansPerInvoiceNumber_args)that);
10241
      return false;
10242
    }
10243
 
10244
    public boolean equals(fetchScansPerInvoiceNumber_args that) {
10245
      if (that == null)
10246
        return false;
10247
 
10248
      boolean this_present_date = true;
10249
      boolean that_present_date = true;
10250
      if (this_present_date || that_present_date) {
10251
        if (!(this_present_date && that_present_date))
10252
          return false;
10253
        if (this.date != that.date)
10254
          return false;
10255
      }
10256
 
10257
      return true;
10258
    }
10259
 
10260
    @Override
10261
    public int hashCode() {
10262
      return 0;
10263
    }
10264
 
10265
    public int compareTo(fetchScansPerInvoiceNumber_args other) {
10266
      if (!getClass().equals(other.getClass())) {
10267
        return getClass().getName().compareTo(other.getClass().getName());
10268
      }
10269
 
10270
      int lastComparison = 0;
10271
      fetchScansPerInvoiceNumber_args typedOther = (fetchScansPerInvoiceNumber_args)other;
10272
 
10273
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
10274
      if (lastComparison != 0) {
10275
        return lastComparison;
10276
      }
10277
      if (isSetDate()) {
10278
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
10279
        if (lastComparison != 0) {
10280
          return lastComparison;
10281
        }
10282
      }
10283
      return 0;
10284
    }
10285
 
10286
    public _Fields fieldForId(int fieldId) {
10287
      return _Fields.findByThriftId(fieldId);
10288
    }
10289
 
10290
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10291
      org.apache.thrift.protocol.TField field;
10292
      iprot.readStructBegin();
10293
      while (true)
10294
      {
10295
        field = iprot.readFieldBegin();
10296
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10297
          break;
10298
        }
10299
        switch (field.id) {
10300
          case 1: // DATE
10301
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10302
              this.date = iprot.readI64();
10303
              setDateIsSet(true);
10304
            } else { 
10305
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10306
            }
10307
            break;
10308
          default:
10309
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10310
        }
10311
        iprot.readFieldEnd();
10312
      }
10313
      iprot.readStructEnd();
10314
      validate();
10315
    }
10316
 
10317
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10318
      validate();
10319
 
10320
      oprot.writeStructBegin(STRUCT_DESC);
10321
      oprot.writeFieldBegin(DATE_FIELD_DESC);
10322
      oprot.writeI64(this.date);
10323
      oprot.writeFieldEnd();
10324
      oprot.writeFieldStop();
10325
      oprot.writeStructEnd();
10326
    }
10327
 
10328
    @Override
10329
    public String toString() {
10330
      StringBuilder sb = new StringBuilder("fetchScansPerInvoiceNumber_args(");
10331
      boolean first = true;
10332
 
10333
      sb.append("date:");
10334
      sb.append(this.date);
10335
      first = false;
10336
      sb.append(")");
10337
      return sb.toString();
10338
    }
10339
 
10340
    public void validate() throws org.apache.thrift.TException {
10341
      // check for required fields
10342
    }
10343
 
10344
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10345
      try {
10346
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10347
      } catch (org.apache.thrift.TException te) {
10348
        throw new java.io.IOException(te);
10349
      }
10350
    }
10351
 
10352
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10353
      try {
5711 mandeep.dh 10354
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
10355
        __isset_bit_vector = new BitSet(1);
5496 mandeep.dh 10356
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10357
      } catch (org.apache.thrift.TException te) {
10358
        throw new java.io.IOException(te);
10359
      }
10360
    }
10361
 
10362
  }
10363
 
10364
  public static class fetchScansPerInvoiceNumber_result implements org.apache.thrift.TBase<fetchScansPerInvoiceNumber_result, fetchScansPerInvoiceNumber_result._Fields>, java.io.Serializable, Cloneable   {
10365
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchScansPerInvoiceNumber_result");
10366
 
10367
    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);
10368
 
10369
    private List<InvoiceScan> success; // required
10370
 
10371
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10372
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10373
      SUCCESS((short)0, "success");
10374
 
10375
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10376
 
10377
      static {
10378
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10379
          byName.put(field.getFieldName(), field);
10380
        }
10381
      }
10382
 
10383
      /**
10384
       * Find the _Fields constant that matches fieldId, or null if its not found.
10385
       */
10386
      public static _Fields findByThriftId(int fieldId) {
10387
        switch(fieldId) {
10388
          case 0: // SUCCESS
10389
            return SUCCESS;
10390
          default:
10391
            return null;
10392
        }
10393
      }
10394
 
10395
      /**
10396
       * Find the _Fields constant that matches fieldId, throwing an exception
10397
       * if it is not found.
10398
       */
10399
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10400
        _Fields fields = findByThriftId(fieldId);
10401
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10402
        return fields;
10403
      }
10404
 
10405
      /**
10406
       * Find the _Fields constant that matches name, or null if its not found.
10407
       */
10408
      public static _Fields findByName(String name) {
10409
        return byName.get(name);
10410
      }
10411
 
10412
      private final short _thriftId;
10413
      private final String _fieldName;
10414
 
10415
      _Fields(short thriftId, String fieldName) {
10416
        _thriftId = thriftId;
10417
        _fieldName = fieldName;
10418
      }
10419
 
10420
      public short getThriftFieldId() {
10421
        return _thriftId;
10422
      }
10423
 
10424
      public String getFieldName() {
10425
        return _fieldName;
10426
      }
10427
    }
10428
 
10429
    // isset id assignments
10430
 
10431
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10432
    static {
10433
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10434
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10435
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
10436
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InvoiceScan.class))));
10437
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10438
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchScansPerInvoiceNumber_result.class, metaDataMap);
10439
    }
10440
 
10441
    public fetchScansPerInvoiceNumber_result() {
10442
    }
10443
 
10444
    public fetchScansPerInvoiceNumber_result(
10445
      List<InvoiceScan> success)
10446
    {
10447
      this();
10448
      this.success = success;
10449
    }
10450
 
10451
    /**
10452
     * Performs a deep copy on <i>other</i>.
10453
     */
10454
    public fetchScansPerInvoiceNumber_result(fetchScansPerInvoiceNumber_result other) {
10455
      if (other.isSetSuccess()) {
10456
        List<InvoiceScan> __this__success = new ArrayList<InvoiceScan>();
10457
        for (InvoiceScan other_element : other.success) {
10458
          __this__success.add(new InvoiceScan(other_element));
10459
        }
10460
        this.success = __this__success;
10461
      }
10462
    }
10463
 
10464
    public fetchScansPerInvoiceNumber_result deepCopy() {
10465
      return new fetchScansPerInvoiceNumber_result(this);
10466
    }
10467
 
10468
    @Override
10469
    public void clear() {
10470
      this.success = null;
10471
    }
10472
 
10473
    public int getSuccessSize() {
10474
      return (this.success == null) ? 0 : this.success.size();
10475
    }
10476
 
10477
    public java.util.Iterator<InvoiceScan> getSuccessIterator() {
10478
      return (this.success == null) ? null : this.success.iterator();
10479
    }
10480
 
10481
    public void addToSuccess(InvoiceScan elem) {
10482
      if (this.success == null) {
10483
        this.success = new ArrayList<InvoiceScan>();
10484
      }
10485
      this.success.add(elem);
10486
    }
10487
 
10488
    public List<InvoiceScan> getSuccess() {
10489
      return this.success;
10490
    }
10491
 
10492
    public void setSuccess(List<InvoiceScan> success) {
10493
      this.success = success;
10494
    }
10495
 
10496
    public void unsetSuccess() {
10497
      this.success = null;
10498
    }
10499
 
10500
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
10501
    public boolean isSetSuccess() {
10502
      return this.success != null;
10503
    }
10504
 
10505
    public void setSuccessIsSet(boolean value) {
10506
      if (!value) {
10507
        this.success = null;
10508
      }
10509
    }
10510
 
10511
    public void setFieldValue(_Fields field, Object value) {
10512
      switch (field) {
10513
      case SUCCESS:
10514
        if (value == null) {
10515
          unsetSuccess();
10516
        } else {
10517
          setSuccess((List<InvoiceScan>)value);
10518
        }
10519
        break;
10520
 
10521
      }
10522
    }
10523
 
10524
    public Object getFieldValue(_Fields field) {
10525
      switch (field) {
10526
      case SUCCESS:
10527
        return getSuccess();
10528
 
10529
      }
10530
      throw new IllegalStateException();
10531
    }
10532
 
10533
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10534
    public boolean isSet(_Fields field) {
10535
      if (field == null) {
10536
        throw new IllegalArgumentException();
10537
      }
10538
 
10539
      switch (field) {
10540
      case SUCCESS:
10541
        return isSetSuccess();
10542
      }
10543
      throw new IllegalStateException();
10544
    }
10545
 
10546
    @Override
10547
    public boolean equals(Object that) {
10548
      if (that == null)
10549
        return false;
10550
      if (that instanceof fetchScansPerInvoiceNumber_result)
10551
        return this.equals((fetchScansPerInvoiceNumber_result)that);
10552
      return false;
10553
    }
10554
 
10555
    public boolean equals(fetchScansPerInvoiceNumber_result that) {
10556
      if (that == null)
10557
        return false;
10558
 
10559
      boolean this_present_success = true && this.isSetSuccess();
10560
      boolean that_present_success = true && that.isSetSuccess();
10561
      if (this_present_success || that_present_success) {
10562
        if (!(this_present_success && that_present_success))
10563
          return false;
10564
        if (!this.success.equals(that.success))
10565
          return false;
10566
      }
10567
 
10568
      return true;
10569
    }
10570
 
10571
    @Override
10572
    public int hashCode() {
10573
      return 0;
10574
    }
10575
 
10576
    public int compareTo(fetchScansPerInvoiceNumber_result other) {
10577
      if (!getClass().equals(other.getClass())) {
10578
        return getClass().getName().compareTo(other.getClass().getName());
10579
      }
10580
 
10581
      int lastComparison = 0;
10582
      fetchScansPerInvoiceNumber_result typedOther = (fetchScansPerInvoiceNumber_result)other;
10583
 
10584
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
10585
      if (lastComparison != 0) {
10586
        return lastComparison;
10587
      }
10588
      if (isSetSuccess()) {
10589
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
10590
        if (lastComparison != 0) {
10591
          return lastComparison;
10592
        }
10593
      }
10594
      return 0;
10595
    }
10596
 
10597
    public _Fields fieldForId(int fieldId) {
10598
      return _Fields.findByThriftId(fieldId);
10599
    }
10600
 
10601
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10602
      org.apache.thrift.protocol.TField field;
10603
      iprot.readStructBegin();
10604
      while (true)
10605
      {
10606
        field = iprot.readFieldBegin();
10607
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10608
          break;
10609
        }
10610
        switch (field.id) {
10611
          case 0: // SUCCESS
10612
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
10613
              {
10614
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
10615
                this.success = new ArrayList<InvoiceScan>(_list16.size);
10616
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
10617
                {
10618
                  InvoiceScan _elem18; // required
10619
                  _elem18 = new InvoiceScan();
10620
                  _elem18.read(iprot);
10621
                  this.success.add(_elem18);
10622
                }
10623
                iprot.readListEnd();
10624
              }
10625
            } else { 
10626
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10627
            }
10628
            break;
10629
          default:
10630
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10631
        }
10632
        iprot.readFieldEnd();
10633
      }
10634
      iprot.readStructEnd();
10635
      validate();
10636
    }
10637
 
10638
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10639
      oprot.writeStructBegin(STRUCT_DESC);
10640
 
10641
      if (this.isSetSuccess()) {
10642
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10643
        {
10644
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
10645
          for (InvoiceScan _iter19 : this.success)
10646
          {
10647
            _iter19.write(oprot);
10648
          }
10649
          oprot.writeListEnd();
10650
        }
10651
        oprot.writeFieldEnd();
10652
      }
10653
      oprot.writeFieldStop();
10654
      oprot.writeStructEnd();
10655
    }
10656
 
10657
    @Override
10658
    public String toString() {
10659
      StringBuilder sb = new StringBuilder("fetchScansPerInvoiceNumber_result(");
10660
      boolean first = true;
10661
 
10662
      sb.append("success:");
10663
      if (this.success == null) {
10664
        sb.append("null");
10665
      } else {
10666
        sb.append(this.success);
10667
      }
10668
      first = false;
10669
      sb.append(")");
10670
      return sb.toString();
10671
    }
10672
 
10673
    public void validate() throws org.apache.thrift.TException {
10674
      // check for required fields
10675
    }
10676
 
10677
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10678
      try {
10679
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10680
      } catch (org.apache.thrift.TException te) {
10681
        throw new java.io.IOException(te);
10682
      }
10683
    }
10684
 
10685
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10686
      try {
10687
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10688
      } catch (org.apache.thrift.TException te) {
10689
        throw new java.io.IOException(te);
10690
      }
10691
    }
10692
 
10693
  }
10694
 
5620 mandeep.dh 10695
  public static class getInventoryItemFromOrder_args implements org.apache.thrift.TBase<getInventoryItemFromOrder_args, getInventoryItemFromOrder_args._Fields>, java.io.Serializable, Cloneable   {
10696
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromOrder_args");
10697
 
10698
    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);
10699
 
10700
    private long orderId; // required
10701
 
10702
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10703
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10704
      ORDER_ID((short)1, "orderId");
10705
 
10706
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10707
 
10708
      static {
10709
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10710
          byName.put(field.getFieldName(), field);
10711
        }
10712
      }
10713
 
10714
      /**
10715
       * Find the _Fields constant that matches fieldId, or null if its not found.
10716
       */
10717
      public static _Fields findByThriftId(int fieldId) {
10718
        switch(fieldId) {
10719
          case 1: // ORDER_ID
10720
            return ORDER_ID;
10721
          default:
10722
            return null;
10723
        }
10724
      }
10725
 
10726
      /**
10727
       * Find the _Fields constant that matches fieldId, throwing an exception
10728
       * if it is not found.
10729
       */
10730
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10731
        _Fields fields = findByThriftId(fieldId);
10732
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10733
        return fields;
10734
      }
10735
 
10736
      /**
10737
       * Find the _Fields constant that matches name, or null if its not found.
10738
       */
10739
      public static _Fields findByName(String name) {
10740
        return byName.get(name);
10741
      }
10742
 
10743
      private final short _thriftId;
10744
      private final String _fieldName;
10745
 
10746
      _Fields(short thriftId, String fieldName) {
10747
        _thriftId = thriftId;
10748
        _fieldName = fieldName;
10749
      }
10750
 
10751
      public short getThriftFieldId() {
10752
        return _thriftId;
10753
      }
10754
 
10755
      public String getFieldName() {
10756
        return _fieldName;
10757
      }
10758
    }
10759
 
10760
    // isset id assignments
10761
    private static final int __ORDERID_ISSET_ID = 0;
10762
    private BitSet __isset_bit_vector = new BitSet(1);
10763
 
10764
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10765
    static {
10766
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10767
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10768
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10769
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10770
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromOrder_args.class, metaDataMap);
10771
    }
10772
 
10773
    public getInventoryItemFromOrder_args() {
10774
    }
10775
 
10776
    public getInventoryItemFromOrder_args(
10777
      long orderId)
10778
    {
10779
      this();
10780
      this.orderId = orderId;
10781
      setOrderIdIsSet(true);
10782
    }
10783
 
10784
    /**
10785
     * Performs a deep copy on <i>other</i>.
10786
     */
10787
    public getInventoryItemFromOrder_args(getInventoryItemFromOrder_args other) {
10788
      __isset_bit_vector.clear();
10789
      __isset_bit_vector.or(other.__isset_bit_vector);
10790
      this.orderId = other.orderId;
10791
    }
10792
 
10793
    public getInventoryItemFromOrder_args deepCopy() {
10794
      return new getInventoryItemFromOrder_args(this);
10795
    }
10796
 
10797
    @Override
10798
    public void clear() {
10799
      setOrderIdIsSet(false);
10800
      this.orderId = 0;
10801
    }
10802
 
10803
    public long getOrderId() {
10804
      return this.orderId;
10805
    }
10806
 
10807
    public void setOrderId(long orderId) {
10808
      this.orderId = orderId;
10809
      setOrderIdIsSet(true);
10810
    }
10811
 
10812
    public void unsetOrderId() {
10813
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
10814
    }
10815
 
10816
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
10817
    public boolean isSetOrderId() {
10818
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
10819
    }
10820
 
10821
    public void setOrderIdIsSet(boolean value) {
10822
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
10823
    }
10824
 
10825
    public void setFieldValue(_Fields field, Object value) {
10826
      switch (field) {
10827
      case ORDER_ID:
10828
        if (value == null) {
10829
          unsetOrderId();
10830
        } else {
10831
          setOrderId((Long)value);
10832
        }
10833
        break;
10834
 
10835
      }
10836
    }
10837
 
10838
    public Object getFieldValue(_Fields field) {
10839
      switch (field) {
10840
      case ORDER_ID:
10841
        return Long.valueOf(getOrderId());
10842
 
10843
      }
10844
      throw new IllegalStateException();
10845
    }
10846
 
10847
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10848
    public boolean isSet(_Fields field) {
10849
      if (field == null) {
10850
        throw new IllegalArgumentException();
10851
      }
10852
 
10853
      switch (field) {
10854
      case ORDER_ID:
10855
        return isSetOrderId();
10856
      }
10857
      throw new IllegalStateException();
10858
    }
10859
 
10860
    @Override
10861
    public boolean equals(Object that) {
10862
      if (that == null)
10863
        return false;
10864
      if (that instanceof getInventoryItemFromOrder_args)
10865
        return this.equals((getInventoryItemFromOrder_args)that);
10866
      return false;
10867
    }
10868
 
10869
    public boolean equals(getInventoryItemFromOrder_args that) {
10870
      if (that == null)
10871
        return false;
10872
 
10873
      boolean this_present_orderId = true;
10874
      boolean that_present_orderId = true;
10875
      if (this_present_orderId || that_present_orderId) {
10876
        if (!(this_present_orderId && that_present_orderId))
10877
          return false;
10878
        if (this.orderId != that.orderId)
10879
          return false;
10880
      }
10881
 
10882
      return true;
10883
    }
10884
 
10885
    @Override
10886
    public int hashCode() {
10887
      return 0;
10888
    }
10889
 
10890
    public int compareTo(getInventoryItemFromOrder_args other) {
10891
      if (!getClass().equals(other.getClass())) {
10892
        return getClass().getName().compareTo(other.getClass().getName());
10893
      }
10894
 
10895
      int lastComparison = 0;
10896
      getInventoryItemFromOrder_args typedOther = (getInventoryItemFromOrder_args)other;
10897
 
10898
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
10899
      if (lastComparison != 0) {
10900
        return lastComparison;
10901
      }
10902
      if (isSetOrderId()) {
10903
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
10904
        if (lastComparison != 0) {
10905
          return lastComparison;
10906
        }
10907
      }
10908
      return 0;
10909
    }
10910
 
10911
    public _Fields fieldForId(int fieldId) {
10912
      return _Fields.findByThriftId(fieldId);
10913
    }
10914
 
10915
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10916
      org.apache.thrift.protocol.TField field;
10917
      iprot.readStructBegin();
10918
      while (true)
10919
      {
10920
        field = iprot.readFieldBegin();
10921
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10922
          break;
10923
        }
10924
        switch (field.id) {
10925
          case 1: // ORDER_ID
10926
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10927
              this.orderId = iprot.readI64();
10928
              setOrderIdIsSet(true);
10929
            } else { 
10930
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10931
            }
10932
            break;
10933
          default:
10934
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10935
        }
10936
        iprot.readFieldEnd();
10937
      }
10938
      iprot.readStructEnd();
10939
      validate();
10940
    }
10941
 
10942
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10943
      validate();
10944
 
10945
      oprot.writeStructBegin(STRUCT_DESC);
10946
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
10947
      oprot.writeI64(this.orderId);
10948
      oprot.writeFieldEnd();
10949
      oprot.writeFieldStop();
10950
      oprot.writeStructEnd();
10951
    }
10952
 
10953
    @Override
10954
    public String toString() {
10955
      StringBuilder sb = new StringBuilder("getInventoryItemFromOrder_args(");
10956
      boolean first = true;
10957
 
10958
      sb.append("orderId:");
10959
      sb.append(this.orderId);
10960
      first = false;
10961
      sb.append(")");
10962
      return sb.toString();
10963
    }
10964
 
10965
    public void validate() throws org.apache.thrift.TException {
10966
      // check for required fields
10967
    }
10968
 
10969
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10970
      try {
10971
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10972
      } catch (org.apache.thrift.TException te) {
10973
        throw new java.io.IOException(te);
10974
      }
10975
    }
10976
 
10977
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10978
      try {
10979
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
10980
        __isset_bit_vector = new BitSet(1);
10981
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10982
      } catch (org.apache.thrift.TException te) {
10983
        throw new java.io.IOException(te);
10984
      }
10985
    }
10986
 
10987
  }
10988
 
10989
  public static class getInventoryItemFromOrder_result implements org.apache.thrift.TBase<getInventoryItemFromOrder_result, getInventoryItemFromOrder_result._Fields>, java.io.Serializable, Cloneable   {
10990
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromOrder_result");
10991
 
10992
    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);
10993
    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);
10994
 
10995
    private InventoryItem success; // required
10996
    private WarehouseServiceException we; // required
10997
 
10998
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10999
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11000
      SUCCESS((short)0, "success"),
11001
      WE((short)1, "we");
11002
 
11003
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11004
 
11005
      static {
11006
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11007
          byName.put(field.getFieldName(), field);
11008
        }
11009
      }
11010
 
11011
      /**
11012
       * Find the _Fields constant that matches fieldId, or null if its not found.
11013
       */
11014
      public static _Fields findByThriftId(int fieldId) {
11015
        switch(fieldId) {
11016
          case 0: // SUCCESS
11017
            return SUCCESS;
11018
          case 1: // WE
11019
            return WE;
11020
          default:
11021
            return null;
11022
        }
11023
      }
11024
 
11025
      /**
11026
       * Find the _Fields constant that matches fieldId, throwing an exception
11027
       * if it is not found.
11028
       */
11029
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11030
        _Fields fields = findByThriftId(fieldId);
11031
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11032
        return fields;
11033
      }
11034
 
11035
      /**
11036
       * Find the _Fields constant that matches name, or null if its not found.
11037
       */
11038
      public static _Fields findByName(String name) {
11039
        return byName.get(name);
11040
      }
11041
 
11042
      private final short _thriftId;
11043
      private final String _fieldName;
11044
 
11045
      _Fields(short thriftId, String fieldName) {
11046
        _thriftId = thriftId;
11047
        _fieldName = fieldName;
11048
      }
11049
 
11050
      public short getThriftFieldId() {
11051
        return _thriftId;
11052
      }
11053
 
11054
      public String getFieldName() {
11055
        return _fieldName;
11056
      }
11057
    }
11058
 
11059
    // isset id assignments
11060
 
11061
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11062
    static {
11063
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11064
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11065
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
11066
      tmpMap.put(_Fields.WE, new org.apache.thrift.meta_data.FieldMetaData("we", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11067
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11068
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11069
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromOrder_result.class, metaDataMap);
11070
    }
11071
 
11072
    public getInventoryItemFromOrder_result() {
11073
    }
11074
 
11075
    public getInventoryItemFromOrder_result(
11076
      InventoryItem success,
11077
      WarehouseServiceException we)
11078
    {
11079
      this();
11080
      this.success = success;
11081
      this.we = we;
11082
    }
11083
 
11084
    /**
11085
     * Performs a deep copy on <i>other</i>.
11086
     */
11087
    public getInventoryItemFromOrder_result(getInventoryItemFromOrder_result other) {
11088
      if (other.isSetSuccess()) {
11089
        this.success = new InventoryItem(other.success);
11090
      }
11091
      if (other.isSetWe()) {
11092
        this.we = new WarehouseServiceException(other.we);
11093
      }
11094
    }
11095
 
11096
    public getInventoryItemFromOrder_result deepCopy() {
11097
      return new getInventoryItemFromOrder_result(this);
11098
    }
11099
 
11100
    @Override
11101
    public void clear() {
11102
      this.success = null;
11103
      this.we = null;
11104
    }
11105
 
11106
    public InventoryItem getSuccess() {
11107
      return this.success;
11108
    }
11109
 
11110
    public void setSuccess(InventoryItem success) {
11111
      this.success = success;
11112
    }
11113
 
11114
    public void unsetSuccess() {
11115
      this.success = null;
11116
    }
11117
 
11118
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
11119
    public boolean isSetSuccess() {
11120
      return this.success != null;
11121
    }
11122
 
11123
    public void setSuccessIsSet(boolean value) {
11124
      if (!value) {
11125
        this.success = null;
11126
      }
11127
    }
11128
 
11129
    public WarehouseServiceException getWe() {
11130
      return this.we;
11131
    }
11132
 
11133
    public void setWe(WarehouseServiceException we) {
11134
      this.we = we;
11135
    }
11136
 
11137
    public void unsetWe() {
11138
      this.we = null;
11139
    }
11140
 
11141
    /** Returns true if field we is set (has been assigned a value) and false otherwise */
11142
    public boolean isSetWe() {
11143
      return this.we != null;
11144
    }
11145
 
11146
    public void setWeIsSet(boolean value) {
11147
      if (!value) {
11148
        this.we = null;
11149
      }
11150
    }
11151
 
11152
    public void setFieldValue(_Fields field, Object value) {
11153
      switch (field) {
11154
      case SUCCESS:
11155
        if (value == null) {
11156
          unsetSuccess();
11157
        } else {
11158
          setSuccess((InventoryItem)value);
11159
        }
11160
        break;
11161
 
11162
      case WE:
11163
        if (value == null) {
11164
          unsetWe();
11165
        } else {
11166
          setWe((WarehouseServiceException)value);
11167
        }
11168
        break;
11169
 
11170
      }
11171
    }
11172
 
11173
    public Object getFieldValue(_Fields field) {
11174
      switch (field) {
11175
      case SUCCESS:
11176
        return getSuccess();
11177
 
11178
      case WE:
11179
        return getWe();
11180
 
11181
      }
11182
      throw new IllegalStateException();
11183
    }
11184
 
11185
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11186
    public boolean isSet(_Fields field) {
11187
      if (field == null) {
11188
        throw new IllegalArgumentException();
11189
      }
11190
 
11191
      switch (field) {
11192
      case SUCCESS:
11193
        return isSetSuccess();
11194
      case WE:
11195
        return isSetWe();
11196
      }
11197
      throw new IllegalStateException();
11198
    }
11199
 
11200
    @Override
11201
    public boolean equals(Object that) {
11202
      if (that == null)
11203
        return false;
11204
      if (that instanceof getInventoryItemFromOrder_result)
11205
        return this.equals((getInventoryItemFromOrder_result)that);
11206
      return false;
11207
    }
11208
 
11209
    public boolean equals(getInventoryItemFromOrder_result that) {
11210
      if (that == null)
11211
        return false;
11212
 
11213
      boolean this_present_success = true && this.isSetSuccess();
11214
      boolean that_present_success = true && that.isSetSuccess();
11215
      if (this_present_success || that_present_success) {
11216
        if (!(this_present_success && that_present_success))
11217
          return false;
11218
        if (!this.success.equals(that.success))
11219
          return false;
11220
      }
11221
 
11222
      boolean this_present_we = true && this.isSetWe();
11223
      boolean that_present_we = true && that.isSetWe();
11224
      if (this_present_we || that_present_we) {
11225
        if (!(this_present_we && that_present_we))
11226
          return false;
11227
        if (!this.we.equals(that.we))
11228
          return false;
11229
      }
11230
 
11231
      return true;
11232
    }
11233
 
11234
    @Override
11235
    public int hashCode() {
11236
      return 0;
11237
    }
11238
 
11239
    public int compareTo(getInventoryItemFromOrder_result other) {
11240
      if (!getClass().equals(other.getClass())) {
11241
        return getClass().getName().compareTo(other.getClass().getName());
11242
      }
11243
 
11244
      int lastComparison = 0;
11245
      getInventoryItemFromOrder_result typedOther = (getInventoryItemFromOrder_result)other;
11246
 
11247
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
11248
      if (lastComparison != 0) {
11249
        return lastComparison;
11250
      }
11251
      if (isSetSuccess()) {
11252
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
11253
        if (lastComparison != 0) {
11254
          return lastComparison;
11255
        }
11256
      }
11257
      lastComparison = Boolean.valueOf(isSetWe()).compareTo(typedOther.isSetWe());
11258
      if (lastComparison != 0) {
11259
        return lastComparison;
11260
      }
11261
      if (isSetWe()) {
11262
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.we, typedOther.we);
11263
        if (lastComparison != 0) {
11264
          return lastComparison;
11265
        }
11266
      }
11267
      return 0;
11268
    }
11269
 
11270
    public _Fields fieldForId(int fieldId) {
11271
      return _Fields.findByThriftId(fieldId);
11272
    }
11273
 
11274
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11275
      org.apache.thrift.protocol.TField field;
11276
      iprot.readStructBegin();
11277
      while (true)
11278
      {
11279
        field = iprot.readFieldBegin();
11280
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11281
          break;
11282
        }
11283
        switch (field.id) {
11284
          case 0: // SUCCESS
11285
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11286
              this.success = new InventoryItem();
11287
              this.success.read(iprot);
11288
            } else { 
11289
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11290
            }
11291
            break;
11292
          case 1: // WE
11293
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11294
              this.we = new WarehouseServiceException();
11295
              this.we.read(iprot);
11296
            } else { 
11297
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11298
            }
11299
            break;
11300
          default:
11301
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11302
        }
11303
        iprot.readFieldEnd();
11304
      }
11305
      iprot.readStructEnd();
11306
      validate();
11307
    }
11308
 
11309
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11310
      oprot.writeStructBegin(STRUCT_DESC);
11311
 
11312
      if (this.isSetSuccess()) {
11313
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11314
        this.success.write(oprot);
11315
        oprot.writeFieldEnd();
11316
      } else if (this.isSetWe()) {
11317
        oprot.writeFieldBegin(WE_FIELD_DESC);
11318
        this.we.write(oprot);
11319
        oprot.writeFieldEnd();
11320
      }
11321
      oprot.writeFieldStop();
11322
      oprot.writeStructEnd();
11323
    }
11324
 
11325
    @Override
11326
    public String toString() {
11327
      StringBuilder sb = new StringBuilder("getInventoryItemFromOrder_result(");
11328
      boolean first = true;
11329
 
11330
      sb.append("success:");
11331
      if (this.success == null) {
11332
        sb.append("null");
11333
      } else {
11334
        sb.append(this.success);
11335
      }
11336
      first = false;
11337
      if (!first) sb.append(", ");
11338
      sb.append("we:");
11339
      if (this.we == null) {
11340
        sb.append("null");
11341
      } else {
11342
        sb.append(this.we);
11343
      }
11344
      first = false;
11345
      sb.append(")");
11346
      return sb.toString();
11347
    }
11348
 
11349
    public void validate() throws org.apache.thrift.TException {
11350
      // check for required fields
11351
    }
11352
 
11353
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11354
      try {
11355
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11356
      } catch (org.apache.thrift.TException te) {
11357
        throw new java.io.IOException(te);
11358
      }
11359
    }
11360
 
11361
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11362
      try {
11363
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11364
      } catch (org.apache.thrift.TException te) {
11365
        throw new java.io.IOException(te);
11366
      }
11367
    }
11368
 
11369
  }
11370
 
5711 mandeep.dh 11371
  public static class getInventoryAge_args implements org.apache.thrift.TBase<getInventoryAge_args, getInventoryAge_args._Fields>, java.io.Serializable, Cloneable   {
11372
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryAge_args");
11373
 
11374
 
11375
 
11376
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11377
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11378
;
11379
 
11380
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11381
 
11382
      static {
11383
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11384
          byName.put(field.getFieldName(), field);
11385
        }
11386
      }
11387
 
11388
      /**
11389
       * Find the _Fields constant that matches fieldId, or null if its not found.
11390
       */
11391
      public static _Fields findByThriftId(int fieldId) {
11392
        switch(fieldId) {
11393
          default:
11394
            return null;
11395
        }
11396
      }
11397
 
11398
      /**
11399
       * Find the _Fields constant that matches fieldId, throwing an exception
11400
       * if it is not found.
11401
       */
11402
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11403
        _Fields fields = findByThriftId(fieldId);
11404
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11405
        return fields;
11406
      }
11407
 
11408
      /**
11409
       * Find the _Fields constant that matches name, or null if its not found.
11410
       */
11411
      public static _Fields findByName(String name) {
11412
        return byName.get(name);
11413
      }
11414
 
11415
      private final short _thriftId;
11416
      private final String _fieldName;
11417
 
11418
      _Fields(short thriftId, String fieldName) {
11419
        _thriftId = thriftId;
11420
        _fieldName = fieldName;
11421
      }
11422
 
11423
      public short getThriftFieldId() {
11424
        return _thriftId;
11425
      }
11426
 
11427
      public String getFieldName() {
11428
        return _fieldName;
11429
      }
11430
    }
11431
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11432
    static {
11433
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11434
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11435
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryAge_args.class, metaDataMap);
11436
    }
11437
 
11438
    public getInventoryAge_args() {
11439
    }
11440
 
11441
    /**
11442
     * Performs a deep copy on <i>other</i>.
11443
     */
11444
    public getInventoryAge_args(getInventoryAge_args other) {
11445
    }
11446
 
11447
    public getInventoryAge_args deepCopy() {
11448
      return new getInventoryAge_args(this);
11449
    }
11450
 
11451
    @Override
11452
    public void clear() {
11453
    }
11454
 
11455
    public void setFieldValue(_Fields field, Object value) {
11456
      switch (field) {
11457
      }
11458
    }
11459
 
11460
    public Object getFieldValue(_Fields field) {
11461
      switch (field) {
11462
      }
11463
      throw new IllegalStateException();
11464
    }
11465
 
11466
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11467
    public boolean isSet(_Fields field) {
11468
      if (field == null) {
11469
        throw new IllegalArgumentException();
11470
      }
11471
 
11472
      switch (field) {
11473
      }
11474
      throw new IllegalStateException();
11475
    }
11476
 
11477
    @Override
11478
    public boolean equals(Object that) {
11479
      if (that == null)
11480
        return false;
11481
      if (that instanceof getInventoryAge_args)
11482
        return this.equals((getInventoryAge_args)that);
11483
      return false;
11484
    }
11485
 
11486
    public boolean equals(getInventoryAge_args that) {
11487
      if (that == null)
11488
        return false;
11489
 
11490
      return true;
11491
    }
11492
 
11493
    @Override
11494
    public int hashCode() {
11495
      return 0;
11496
    }
11497
 
11498
    public int compareTo(getInventoryAge_args other) {
11499
      if (!getClass().equals(other.getClass())) {
11500
        return getClass().getName().compareTo(other.getClass().getName());
11501
      }
11502
 
11503
      int lastComparison = 0;
11504
      getInventoryAge_args typedOther = (getInventoryAge_args)other;
11505
 
11506
      return 0;
11507
    }
11508
 
11509
    public _Fields fieldForId(int fieldId) {
11510
      return _Fields.findByThriftId(fieldId);
11511
    }
11512
 
11513
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11514
      org.apache.thrift.protocol.TField field;
11515
      iprot.readStructBegin();
11516
      while (true)
11517
      {
11518
        field = iprot.readFieldBegin();
11519
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11520
          break;
11521
        }
11522
        switch (field.id) {
11523
          default:
11524
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11525
        }
11526
        iprot.readFieldEnd();
11527
      }
11528
      iprot.readStructEnd();
11529
      validate();
11530
    }
11531
 
11532
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11533
      validate();
11534
 
11535
      oprot.writeStructBegin(STRUCT_DESC);
11536
      oprot.writeFieldStop();
11537
      oprot.writeStructEnd();
11538
    }
11539
 
11540
    @Override
11541
    public String toString() {
11542
      StringBuilder sb = new StringBuilder("getInventoryAge_args(");
11543
      boolean first = true;
11544
 
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
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11564
      } catch (org.apache.thrift.TException te) {
11565
        throw new java.io.IOException(te);
11566
      }
11567
    }
11568
 
11569
  }
11570
 
11571
  public static class getInventoryAge_result implements org.apache.thrift.TBase<getInventoryAge_result, getInventoryAge_result._Fields>, java.io.Serializable, Cloneable   {
11572
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryAge_result");
11573
 
11574
    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);
11575
 
11576
    private List<InventoryAge> success; // required
11577
 
11578
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11579
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11580
      SUCCESS((short)0, "success");
11581
 
11582
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11583
 
11584
      static {
11585
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11586
          byName.put(field.getFieldName(), field);
11587
        }
11588
      }
11589
 
11590
      /**
11591
       * Find the _Fields constant that matches fieldId, or null if its not found.
11592
       */
11593
      public static _Fields findByThriftId(int fieldId) {
11594
        switch(fieldId) {
11595
          case 0: // SUCCESS
11596
            return SUCCESS;
11597
          default:
11598
            return null;
11599
        }
11600
      }
11601
 
11602
      /**
11603
       * Find the _Fields constant that matches fieldId, throwing an exception
11604
       * if it is not found.
11605
       */
11606
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11607
        _Fields fields = findByThriftId(fieldId);
11608
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11609
        return fields;
11610
      }
11611
 
11612
      /**
11613
       * Find the _Fields constant that matches name, or null if its not found.
11614
       */
11615
      public static _Fields findByName(String name) {
11616
        return byName.get(name);
11617
      }
11618
 
11619
      private final short _thriftId;
11620
      private final String _fieldName;
11621
 
11622
      _Fields(short thriftId, String fieldName) {
11623
        _thriftId = thriftId;
11624
        _fieldName = fieldName;
11625
      }
11626
 
11627
      public short getThriftFieldId() {
11628
        return _thriftId;
11629
      }
11630
 
11631
      public String getFieldName() {
11632
        return _fieldName;
11633
      }
11634
    }
11635
 
11636
    // isset id assignments
11637
 
11638
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11639
    static {
11640
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11641
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11642
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
11643
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryAge.class))));
11644
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11645
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryAge_result.class, metaDataMap);
11646
    }
11647
 
11648
    public getInventoryAge_result() {
11649
    }
11650
 
11651
    public getInventoryAge_result(
11652
      List<InventoryAge> success)
11653
    {
11654
      this();
11655
      this.success = success;
11656
    }
11657
 
11658
    /**
11659
     * Performs a deep copy on <i>other</i>.
11660
     */
11661
    public getInventoryAge_result(getInventoryAge_result other) {
11662
      if (other.isSetSuccess()) {
11663
        List<InventoryAge> __this__success = new ArrayList<InventoryAge>();
11664
        for (InventoryAge other_element : other.success) {
11665
          __this__success.add(new InventoryAge(other_element));
11666
        }
11667
        this.success = __this__success;
11668
      }
11669
    }
11670
 
11671
    public getInventoryAge_result deepCopy() {
11672
      return new getInventoryAge_result(this);
11673
    }
11674
 
11675
    @Override
11676
    public void clear() {
11677
      this.success = null;
11678
    }
11679
 
11680
    public int getSuccessSize() {
11681
      return (this.success == null) ? 0 : this.success.size();
11682
    }
11683
 
11684
    public java.util.Iterator<InventoryAge> getSuccessIterator() {
11685
      return (this.success == null) ? null : this.success.iterator();
11686
    }
11687
 
11688
    public void addToSuccess(InventoryAge elem) {
11689
      if (this.success == null) {
11690
        this.success = new ArrayList<InventoryAge>();
11691
      }
11692
      this.success.add(elem);
11693
    }
11694
 
11695
    public List<InventoryAge> getSuccess() {
11696
      return this.success;
11697
    }
11698
 
11699
    public void setSuccess(List<InventoryAge> success) {
11700
      this.success = success;
11701
    }
11702
 
11703
    public void unsetSuccess() {
11704
      this.success = null;
11705
    }
11706
 
11707
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
11708
    public boolean isSetSuccess() {
11709
      return this.success != null;
11710
    }
11711
 
11712
    public void setSuccessIsSet(boolean value) {
11713
      if (!value) {
11714
        this.success = null;
11715
      }
11716
    }
11717
 
11718
    public void setFieldValue(_Fields field, Object value) {
11719
      switch (field) {
11720
      case SUCCESS:
11721
        if (value == null) {
11722
          unsetSuccess();
11723
        } else {
11724
          setSuccess((List<InventoryAge>)value);
11725
        }
11726
        break;
11727
 
11728
      }
11729
    }
11730
 
11731
    public Object getFieldValue(_Fields field) {
11732
      switch (field) {
11733
      case SUCCESS:
11734
        return getSuccess();
11735
 
11736
      }
11737
      throw new IllegalStateException();
11738
    }
11739
 
11740
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11741
    public boolean isSet(_Fields field) {
11742
      if (field == null) {
11743
        throw new IllegalArgumentException();
11744
      }
11745
 
11746
      switch (field) {
11747
      case SUCCESS:
11748
        return isSetSuccess();
11749
      }
11750
      throw new IllegalStateException();
11751
    }
11752
 
11753
    @Override
11754
    public boolean equals(Object that) {
11755
      if (that == null)
11756
        return false;
11757
      if (that instanceof getInventoryAge_result)
11758
        return this.equals((getInventoryAge_result)that);
11759
      return false;
11760
    }
11761
 
11762
    public boolean equals(getInventoryAge_result that) {
11763
      if (that == null)
11764
        return false;
11765
 
11766
      boolean this_present_success = true && this.isSetSuccess();
11767
      boolean that_present_success = true && that.isSetSuccess();
11768
      if (this_present_success || that_present_success) {
11769
        if (!(this_present_success && that_present_success))
11770
          return false;
11771
        if (!this.success.equals(that.success))
11772
          return false;
11773
      }
11774
 
11775
      return true;
11776
    }
11777
 
11778
    @Override
11779
    public int hashCode() {
11780
      return 0;
11781
    }
11782
 
11783
    public int compareTo(getInventoryAge_result other) {
11784
      if (!getClass().equals(other.getClass())) {
11785
        return getClass().getName().compareTo(other.getClass().getName());
11786
      }
11787
 
11788
      int lastComparison = 0;
11789
      getInventoryAge_result typedOther = (getInventoryAge_result)other;
11790
 
11791
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
11792
      if (lastComparison != 0) {
11793
        return lastComparison;
11794
      }
11795
      if (isSetSuccess()) {
11796
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
11797
        if (lastComparison != 0) {
11798
          return lastComparison;
11799
        }
11800
      }
11801
      return 0;
11802
    }
11803
 
11804
    public _Fields fieldForId(int fieldId) {
11805
      return _Fields.findByThriftId(fieldId);
11806
    }
11807
 
11808
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11809
      org.apache.thrift.protocol.TField field;
11810
      iprot.readStructBegin();
11811
      while (true)
11812
      {
11813
        field = iprot.readFieldBegin();
11814
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11815
          break;
11816
        }
11817
        switch (field.id) {
11818
          case 0: // SUCCESS
11819
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
11820
              {
11821
                org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
11822
                this.success = new ArrayList<InventoryAge>(_list20.size);
11823
                for (int _i21 = 0; _i21 < _list20.size; ++_i21)
11824
                {
11825
                  InventoryAge _elem22; // required
11826
                  _elem22 = new InventoryAge();
11827
                  _elem22.read(iprot);
11828
                  this.success.add(_elem22);
11829
                }
11830
                iprot.readListEnd();
11831
              }
11832
            } else { 
11833
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11834
            }
11835
            break;
11836
          default:
11837
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11838
        }
11839
        iprot.readFieldEnd();
11840
      }
11841
      iprot.readStructEnd();
11842
      validate();
11843
    }
11844
 
11845
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11846
      oprot.writeStructBegin(STRUCT_DESC);
11847
 
11848
      if (this.isSetSuccess()) {
11849
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11850
        {
11851
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
11852
          for (InventoryAge _iter23 : this.success)
11853
          {
11854
            _iter23.write(oprot);
11855
          }
11856
          oprot.writeListEnd();
11857
        }
11858
        oprot.writeFieldEnd();
11859
      }
11860
      oprot.writeFieldStop();
11861
      oprot.writeStructEnd();
11862
    }
11863
 
11864
    @Override
11865
    public String toString() {
11866
      StringBuilder sb = new StringBuilder("getInventoryAge_result(");
11867
      boolean first = true;
11868
 
11869
      sb.append("success:");
11870
      if (this.success == null) {
11871
        sb.append("null");
11872
      } else {
11873
        sb.append(this.success);
11874
      }
11875
      first = false;
11876
      sb.append(")");
11877
      return sb.toString();
11878
    }
11879
 
11880
    public void validate() throws org.apache.thrift.TException {
11881
      // check for required fields
11882
    }
11883
 
11884
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11885
      try {
11886
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11887
      } catch (org.apache.thrift.TException te) {
11888
        throw new java.io.IOException(te);
11889
      }
11890
    }
11891
 
11892
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11893
      try {
11894
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11895
      } catch (org.apache.thrift.TException te) {
11896
        throw new java.io.IOException(te);
11897
      }
11898
    }
11899
 
11900
  }
11901
 
6322 amar.kumar 11902
  public static class getInventoryScansForItem_args implements org.apache.thrift.TBase<getInventoryScansForItem_args, getInventoryScansForItem_args._Fields>, java.io.Serializable, Cloneable   {
11903
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryScansForItem_args");
11904
 
11905
    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);
11906
    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);
11907
    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);
11908
 
11909
    private long itemId; // required
11910
    private long fromDate; // required
11911
    private long toDate; // required
11912
 
11913
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11914
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11915
      ITEM_ID((short)1, "itemId"),
11916
      FROM_DATE((short)2, "fromDate"),
11917
      TO_DATE((short)3, "toDate");
11918
 
11919
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11920
 
11921
      static {
11922
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11923
          byName.put(field.getFieldName(), field);
11924
        }
11925
      }
11926
 
11927
      /**
11928
       * Find the _Fields constant that matches fieldId, or null if its not found.
11929
       */
11930
      public static _Fields findByThriftId(int fieldId) {
11931
        switch(fieldId) {
11932
          case 1: // ITEM_ID
11933
            return ITEM_ID;
11934
          case 2: // FROM_DATE
11935
            return FROM_DATE;
11936
          case 3: // TO_DATE
11937
            return TO_DATE;
11938
          default:
11939
            return null;
11940
        }
11941
      }
11942
 
11943
      /**
11944
       * Find the _Fields constant that matches fieldId, throwing an exception
11945
       * if it is not found.
11946
       */
11947
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11948
        _Fields fields = findByThriftId(fieldId);
11949
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11950
        return fields;
11951
      }
11952
 
11953
      /**
11954
       * Find the _Fields constant that matches name, or null if its not found.
11955
       */
11956
      public static _Fields findByName(String name) {
11957
        return byName.get(name);
11958
      }
11959
 
11960
      private final short _thriftId;
11961
      private final String _fieldName;
11962
 
11963
      _Fields(short thriftId, String fieldName) {
11964
        _thriftId = thriftId;
11965
        _fieldName = fieldName;
11966
      }
11967
 
11968
      public short getThriftFieldId() {
11969
        return _thriftId;
11970
      }
11971
 
11972
      public String getFieldName() {
11973
        return _fieldName;
11974
      }
11975
    }
11976
 
11977
    // isset id assignments
11978
    private static final int __ITEMID_ISSET_ID = 0;
11979
    private static final int __FROMDATE_ISSET_ID = 1;
11980
    private static final int __TODATE_ISSET_ID = 2;
11981
    private BitSet __isset_bit_vector = new BitSet(3);
11982
 
11983
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11984
    static {
11985
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11986
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11987
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11988
      tmpMap.put(_Fields.FROM_DATE, new org.apache.thrift.meta_data.FieldMetaData("fromDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11989
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11990
      tmpMap.put(_Fields.TO_DATE, new org.apache.thrift.meta_data.FieldMetaData("toDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11991
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11992
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11993
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryScansForItem_args.class, metaDataMap);
11994
    }
11995
 
11996
    public getInventoryScansForItem_args() {
11997
    }
11998
 
11999
    public getInventoryScansForItem_args(
12000
      long itemId,
12001
      long fromDate,
12002
      long toDate)
12003
    {
12004
      this();
12005
      this.itemId = itemId;
12006
      setItemIdIsSet(true);
12007
      this.fromDate = fromDate;
12008
      setFromDateIsSet(true);
12009
      this.toDate = toDate;
12010
      setToDateIsSet(true);
12011
    }
12012
 
12013
    /**
12014
     * Performs a deep copy on <i>other</i>.
12015
     */
12016
    public getInventoryScansForItem_args(getInventoryScansForItem_args other) {
12017
      __isset_bit_vector.clear();
12018
      __isset_bit_vector.or(other.__isset_bit_vector);
12019
      this.itemId = other.itemId;
12020
      this.fromDate = other.fromDate;
12021
      this.toDate = other.toDate;
12022
    }
12023
 
12024
    public getInventoryScansForItem_args deepCopy() {
12025
      return new getInventoryScansForItem_args(this);
12026
    }
12027
 
12028
    @Override
12029
    public void clear() {
12030
      setItemIdIsSet(false);
12031
      this.itemId = 0;
12032
      setFromDateIsSet(false);
12033
      this.fromDate = 0;
12034
      setToDateIsSet(false);
12035
      this.toDate = 0;
12036
    }
12037
 
12038
    public long getItemId() {
12039
      return this.itemId;
12040
    }
12041
 
12042
    public void setItemId(long itemId) {
12043
      this.itemId = itemId;
12044
      setItemIdIsSet(true);
12045
    }
12046
 
12047
    public void unsetItemId() {
12048
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
12049
    }
12050
 
12051
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
12052
    public boolean isSetItemId() {
12053
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
12054
    }
12055
 
12056
    public void setItemIdIsSet(boolean value) {
12057
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
12058
    }
12059
 
12060
    public long getFromDate() {
12061
      return this.fromDate;
12062
    }
12063
 
12064
    public void setFromDate(long fromDate) {
12065
      this.fromDate = fromDate;
12066
      setFromDateIsSet(true);
12067
    }
12068
 
12069
    public void unsetFromDate() {
12070
      __isset_bit_vector.clear(__FROMDATE_ISSET_ID);
12071
    }
12072
 
12073
    /** Returns true if field fromDate is set (has been assigned a value) and false otherwise */
12074
    public boolean isSetFromDate() {
12075
      return __isset_bit_vector.get(__FROMDATE_ISSET_ID);
12076
    }
12077
 
12078
    public void setFromDateIsSet(boolean value) {
12079
      __isset_bit_vector.set(__FROMDATE_ISSET_ID, value);
12080
    }
12081
 
12082
    public long getToDate() {
12083
      return this.toDate;
12084
    }
12085
 
12086
    public void setToDate(long toDate) {
12087
      this.toDate = toDate;
12088
      setToDateIsSet(true);
12089
    }
12090
 
12091
    public void unsetToDate() {
12092
      __isset_bit_vector.clear(__TODATE_ISSET_ID);
12093
    }
12094
 
12095
    /** Returns true if field toDate is set (has been assigned a value) and false otherwise */
12096
    public boolean isSetToDate() {
12097
      return __isset_bit_vector.get(__TODATE_ISSET_ID);
12098
    }
12099
 
12100
    public void setToDateIsSet(boolean value) {
12101
      __isset_bit_vector.set(__TODATE_ISSET_ID, value);
12102
    }
12103
 
12104
    public void setFieldValue(_Fields field, Object value) {
12105
      switch (field) {
12106
      case ITEM_ID:
12107
        if (value == null) {
12108
          unsetItemId();
12109
        } else {
12110
          setItemId((Long)value);
12111
        }
12112
        break;
12113
 
12114
      case FROM_DATE:
12115
        if (value == null) {
12116
          unsetFromDate();
12117
        } else {
12118
          setFromDate((Long)value);
12119
        }
12120
        break;
12121
 
12122
      case TO_DATE:
12123
        if (value == null) {
12124
          unsetToDate();
12125
        } else {
12126
          setToDate((Long)value);
12127
        }
12128
        break;
12129
 
12130
      }
12131
    }
12132
 
12133
    public Object getFieldValue(_Fields field) {
12134
      switch (field) {
12135
      case ITEM_ID:
12136
        return Long.valueOf(getItemId());
12137
 
12138
      case FROM_DATE:
12139
        return Long.valueOf(getFromDate());
12140
 
12141
      case TO_DATE:
12142
        return Long.valueOf(getToDate());
12143
 
12144
      }
12145
      throw new IllegalStateException();
12146
    }
12147
 
12148
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12149
    public boolean isSet(_Fields field) {
12150
      if (field == null) {
12151
        throw new IllegalArgumentException();
12152
      }
12153
 
12154
      switch (field) {
12155
      case ITEM_ID:
12156
        return isSetItemId();
12157
      case FROM_DATE:
12158
        return isSetFromDate();
12159
      case TO_DATE:
12160
        return isSetToDate();
12161
      }
12162
      throw new IllegalStateException();
12163
    }
12164
 
12165
    @Override
12166
    public boolean equals(Object that) {
12167
      if (that == null)
12168
        return false;
12169
      if (that instanceof getInventoryScansForItem_args)
12170
        return this.equals((getInventoryScansForItem_args)that);
12171
      return false;
12172
    }
12173
 
12174
    public boolean equals(getInventoryScansForItem_args that) {
12175
      if (that == null)
12176
        return false;
12177
 
12178
      boolean this_present_itemId = true;
12179
      boolean that_present_itemId = true;
12180
      if (this_present_itemId || that_present_itemId) {
12181
        if (!(this_present_itemId && that_present_itemId))
12182
          return false;
12183
        if (this.itemId != that.itemId)
12184
          return false;
12185
      }
12186
 
12187
      boolean this_present_fromDate = true;
12188
      boolean that_present_fromDate = true;
12189
      if (this_present_fromDate || that_present_fromDate) {
12190
        if (!(this_present_fromDate && that_present_fromDate))
12191
          return false;
12192
        if (this.fromDate != that.fromDate)
12193
          return false;
12194
      }
12195
 
12196
      boolean this_present_toDate = true;
12197
      boolean that_present_toDate = true;
12198
      if (this_present_toDate || that_present_toDate) {
12199
        if (!(this_present_toDate && that_present_toDate))
12200
          return false;
12201
        if (this.toDate != that.toDate)
12202
          return false;
12203
      }
12204
 
12205
      return true;
12206
    }
12207
 
12208
    @Override
12209
    public int hashCode() {
12210
      return 0;
12211
    }
12212
 
12213
    public int compareTo(getInventoryScansForItem_args other) {
12214
      if (!getClass().equals(other.getClass())) {
12215
        return getClass().getName().compareTo(other.getClass().getName());
12216
      }
12217
 
12218
      int lastComparison = 0;
12219
      getInventoryScansForItem_args typedOther = (getInventoryScansForItem_args)other;
12220
 
12221
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
12222
      if (lastComparison != 0) {
12223
        return lastComparison;
12224
      }
12225
      if (isSetItemId()) {
12226
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
12227
        if (lastComparison != 0) {
12228
          return lastComparison;
12229
        }
12230
      }
12231
      lastComparison = Boolean.valueOf(isSetFromDate()).compareTo(typedOther.isSetFromDate());
12232
      if (lastComparison != 0) {
12233
        return lastComparison;
12234
      }
12235
      if (isSetFromDate()) {
12236
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fromDate, typedOther.fromDate);
12237
        if (lastComparison != 0) {
12238
          return lastComparison;
12239
        }
12240
      }
12241
      lastComparison = Boolean.valueOf(isSetToDate()).compareTo(typedOther.isSetToDate());
12242
      if (lastComparison != 0) {
12243
        return lastComparison;
12244
      }
12245
      if (isSetToDate()) {
12246
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.toDate, typedOther.toDate);
12247
        if (lastComparison != 0) {
12248
          return lastComparison;
12249
        }
12250
      }
12251
      return 0;
12252
    }
12253
 
12254
    public _Fields fieldForId(int fieldId) {
12255
      return _Fields.findByThriftId(fieldId);
12256
    }
12257
 
12258
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12259
      org.apache.thrift.protocol.TField field;
12260
      iprot.readStructBegin();
12261
      while (true)
12262
      {
12263
        field = iprot.readFieldBegin();
12264
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12265
          break;
12266
        }
12267
        switch (field.id) {
12268
          case 1: // ITEM_ID
12269
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12270
              this.itemId = iprot.readI64();
12271
              setItemIdIsSet(true);
12272
            } else { 
12273
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12274
            }
12275
            break;
12276
          case 2: // FROM_DATE
12277
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12278
              this.fromDate = iprot.readI64();
12279
              setFromDateIsSet(true);
12280
            } else { 
12281
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12282
            }
12283
            break;
12284
          case 3: // TO_DATE
12285
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12286
              this.toDate = iprot.readI64();
12287
              setToDateIsSet(true);
12288
            } else { 
12289
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12290
            }
12291
            break;
12292
          default:
12293
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12294
        }
12295
        iprot.readFieldEnd();
12296
      }
12297
      iprot.readStructEnd();
12298
      validate();
12299
    }
12300
 
12301
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12302
      validate();
12303
 
12304
      oprot.writeStructBegin(STRUCT_DESC);
12305
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
12306
      oprot.writeI64(this.itemId);
12307
      oprot.writeFieldEnd();
12308
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
12309
      oprot.writeI64(this.fromDate);
12310
      oprot.writeFieldEnd();
12311
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
12312
      oprot.writeI64(this.toDate);
12313
      oprot.writeFieldEnd();
12314
      oprot.writeFieldStop();
12315
      oprot.writeStructEnd();
12316
    }
12317
 
12318
    @Override
12319
    public String toString() {
12320
      StringBuilder sb = new StringBuilder("getInventoryScansForItem_args(");
12321
      boolean first = true;
12322
 
12323
      sb.append("itemId:");
12324
      sb.append(this.itemId);
12325
      first = false;
12326
      if (!first) sb.append(", ");
12327
      sb.append("fromDate:");
12328
      sb.append(this.fromDate);
12329
      first = false;
12330
      if (!first) sb.append(", ");
12331
      sb.append("toDate:");
12332
      sb.append(this.toDate);
12333
      first = false;
12334
      sb.append(")");
12335
      return sb.toString();
12336
    }
12337
 
12338
    public void validate() throws org.apache.thrift.TException {
12339
      // check for required fields
12340
    }
12341
 
12342
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12343
      try {
12344
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12345
      } catch (org.apache.thrift.TException te) {
12346
        throw new java.io.IOException(te);
12347
      }
12348
    }
12349
 
12350
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12351
      try {
12352
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12353
      } catch (org.apache.thrift.TException te) {
12354
        throw new java.io.IOException(te);
12355
      }
12356
    }
12357
 
12358
  }
12359
 
12360
  public static class getInventoryScansForItem_result implements org.apache.thrift.TBase<getInventoryScansForItem_result, getInventoryScansForItem_result._Fields>, java.io.Serializable, Cloneable   {
12361
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryScansForItem_result");
12362
 
12363
    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);
12364
 
12365
    private List<Scan> success; // required
12366
 
12367
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12368
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12369
      SUCCESS((short)0, "success");
12370
 
12371
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12372
 
12373
      static {
12374
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12375
          byName.put(field.getFieldName(), field);
12376
        }
12377
      }
12378
 
12379
      /**
12380
       * Find the _Fields constant that matches fieldId, or null if its not found.
12381
       */
12382
      public static _Fields findByThriftId(int fieldId) {
12383
        switch(fieldId) {
12384
          case 0: // SUCCESS
12385
            return SUCCESS;
12386
          default:
12387
            return null;
12388
        }
12389
      }
12390
 
12391
      /**
12392
       * Find the _Fields constant that matches fieldId, throwing an exception
12393
       * if it is not found.
12394
       */
12395
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12396
        _Fields fields = findByThriftId(fieldId);
12397
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12398
        return fields;
12399
      }
12400
 
12401
      /**
12402
       * Find the _Fields constant that matches name, or null if its not found.
12403
       */
12404
      public static _Fields findByName(String name) {
12405
        return byName.get(name);
12406
      }
12407
 
12408
      private final short _thriftId;
12409
      private final String _fieldName;
12410
 
12411
      _Fields(short thriftId, String fieldName) {
12412
        _thriftId = thriftId;
12413
        _fieldName = fieldName;
12414
      }
12415
 
12416
      public short getThriftFieldId() {
12417
        return _thriftId;
12418
      }
12419
 
12420
      public String getFieldName() {
12421
        return _fieldName;
12422
      }
12423
    }
12424
 
12425
    // isset id assignments
12426
 
12427
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12428
    static {
12429
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12430
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12431
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
12432
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Scan.class))));
12433
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12434
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryScansForItem_result.class, metaDataMap);
12435
    }
12436
 
12437
    public getInventoryScansForItem_result() {
12438
    }
12439
 
12440
    public getInventoryScansForItem_result(
12441
      List<Scan> success)
12442
    {
12443
      this();
12444
      this.success = success;
12445
    }
12446
 
12447
    /**
12448
     * Performs a deep copy on <i>other</i>.
12449
     */
12450
    public getInventoryScansForItem_result(getInventoryScansForItem_result other) {
12451
      if (other.isSetSuccess()) {
12452
        List<Scan> __this__success = new ArrayList<Scan>();
12453
        for (Scan other_element : other.success) {
12454
          __this__success.add(new Scan(other_element));
12455
        }
12456
        this.success = __this__success;
12457
      }
12458
    }
12459
 
12460
    public getInventoryScansForItem_result deepCopy() {
12461
      return new getInventoryScansForItem_result(this);
12462
    }
12463
 
12464
    @Override
12465
    public void clear() {
12466
      this.success = null;
12467
    }
12468
 
12469
    public int getSuccessSize() {
12470
      return (this.success == null) ? 0 : this.success.size();
12471
    }
12472
 
12473
    public java.util.Iterator<Scan> getSuccessIterator() {
12474
      return (this.success == null) ? null : this.success.iterator();
12475
    }
12476
 
12477
    public void addToSuccess(Scan elem) {
12478
      if (this.success == null) {
12479
        this.success = new ArrayList<Scan>();
12480
      }
12481
      this.success.add(elem);
12482
    }
12483
 
12484
    public List<Scan> getSuccess() {
12485
      return this.success;
12486
    }
12487
 
12488
    public void setSuccess(List<Scan> success) {
12489
      this.success = success;
12490
    }
12491
 
12492
    public void unsetSuccess() {
12493
      this.success = null;
12494
    }
12495
 
12496
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
12497
    public boolean isSetSuccess() {
12498
      return this.success != null;
12499
    }
12500
 
12501
    public void setSuccessIsSet(boolean value) {
12502
      if (!value) {
12503
        this.success = null;
12504
      }
12505
    }
12506
 
12507
    public void setFieldValue(_Fields field, Object value) {
12508
      switch (field) {
12509
      case SUCCESS:
12510
        if (value == null) {
12511
          unsetSuccess();
12512
        } else {
12513
          setSuccess((List<Scan>)value);
12514
        }
12515
        break;
12516
 
12517
      }
12518
    }
12519
 
12520
    public Object getFieldValue(_Fields field) {
12521
      switch (field) {
12522
      case SUCCESS:
12523
        return getSuccess();
12524
 
12525
      }
12526
      throw new IllegalStateException();
12527
    }
12528
 
12529
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12530
    public boolean isSet(_Fields field) {
12531
      if (field == null) {
12532
        throw new IllegalArgumentException();
12533
      }
12534
 
12535
      switch (field) {
12536
      case SUCCESS:
12537
        return isSetSuccess();
12538
      }
12539
      throw new IllegalStateException();
12540
    }
12541
 
12542
    @Override
12543
    public boolean equals(Object that) {
12544
      if (that == null)
12545
        return false;
12546
      if (that instanceof getInventoryScansForItem_result)
12547
        return this.equals((getInventoryScansForItem_result)that);
12548
      return false;
12549
    }
12550
 
12551
    public boolean equals(getInventoryScansForItem_result that) {
12552
      if (that == null)
12553
        return false;
12554
 
12555
      boolean this_present_success = true && this.isSetSuccess();
12556
      boolean that_present_success = true && that.isSetSuccess();
12557
      if (this_present_success || that_present_success) {
12558
        if (!(this_present_success && that_present_success))
12559
          return false;
12560
        if (!this.success.equals(that.success))
12561
          return false;
12562
      }
12563
 
12564
      return true;
12565
    }
12566
 
12567
    @Override
12568
    public int hashCode() {
12569
      return 0;
12570
    }
12571
 
12572
    public int compareTo(getInventoryScansForItem_result other) {
12573
      if (!getClass().equals(other.getClass())) {
12574
        return getClass().getName().compareTo(other.getClass().getName());
12575
      }
12576
 
12577
      int lastComparison = 0;
12578
      getInventoryScansForItem_result typedOther = (getInventoryScansForItem_result)other;
12579
 
12580
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
12581
      if (lastComparison != 0) {
12582
        return lastComparison;
12583
      }
12584
      if (isSetSuccess()) {
12585
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
12586
        if (lastComparison != 0) {
12587
          return lastComparison;
12588
        }
12589
      }
12590
      return 0;
12591
    }
12592
 
12593
    public _Fields fieldForId(int fieldId) {
12594
      return _Fields.findByThriftId(fieldId);
12595
    }
12596
 
12597
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12598
      org.apache.thrift.protocol.TField field;
12599
      iprot.readStructBegin();
12600
      while (true)
12601
      {
12602
        field = iprot.readFieldBegin();
12603
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12604
          break;
12605
        }
12606
        switch (field.id) {
12607
          case 0: // SUCCESS
12608
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
12609
              {
12610
                org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
12611
                this.success = new ArrayList<Scan>(_list24.size);
12612
                for (int _i25 = 0; _i25 < _list24.size; ++_i25)
12613
                {
12614
                  Scan _elem26; // required
12615
                  _elem26 = new Scan();
12616
                  _elem26.read(iprot);
12617
                  this.success.add(_elem26);
12618
                }
12619
                iprot.readListEnd();
12620
              }
12621
            } else { 
12622
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12623
            }
12624
            break;
12625
          default:
12626
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12627
        }
12628
        iprot.readFieldEnd();
12629
      }
12630
      iprot.readStructEnd();
12631
      validate();
12632
    }
12633
 
12634
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12635
      oprot.writeStructBegin(STRUCT_DESC);
12636
 
12637
      if (this.isSetSuccess()) {
12638
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12639
        {
12640
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
12641
          for (Scan _iter27 : this.success)
12642
          {
12643
            _iter27.write(oprot);
12644
          }
12645
          oprot.writeListEnd();
12646
        }
12647
        oprot.writeFieldEnd();
12648
      }
12649
      oprot.writeFieldStop();
12650
      oprot.writeStructEnd();
12651
    }
12652
 
12653
    @Override
12654
    public String toString() {
12655
      StringBuilder sb = new StringBuilder("getInventoryScansForItem_result(");
12656
      boolean first = true;
12657
 
12658
      sb.append("success:");
12659
      if (this.success == null) {
12660
        sb.append("null");
12661
      } else {
12662
        sb.append(this.success);
12663
      }
12664
      first = false;
12665
      sb.append(")");
12666
      return sb.toString();
12667
    }
12668
 
12669
    public void validate() throws org.apache.thrift.TException {
12670
      // check for required fields
12671
    }
12672
 
12673
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12674
      try {
12675
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12676
      } catch (org.apache.thrift.TException te) {
12677
        throw new java.io.IOException(te);
12678
      }
12679
    }
12680
 
12681
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12682
      try {
12683
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12684
      } catch (org.apache.thrift.TException te) {
12685
        throw new java.io.IOException(te);
12686
      }
12687
    }
12688
 
12689
  }
12690
 
12691
  public static class getScanRecordsForSerialNumber_args implements org.apache.thrift.TBase<getScanRecordsForSerialNumber_args, getScanRecordsForSerialNumber_args._Fields>, java.io.Serializable, Cloneable   {
12692
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScanRecordsForSerialNumber_args");
12693
 
12694
    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);
12695
 
12696
    private long serialNumber; // required
12697
 
12698
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12699
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12700
      SERIAL_NUMBER((short)1, "serialNumber");
12701
 
12702
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12703
 
12704
      static {
12705
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12706
          byName.put(field.getFieldName(), field);
12707
        }
12708
      }
12709
 
12710
      /**
12711
       * Find the _Fields constant that matches fieldId, or null if its not found.
12712
       */
12713
      public static _Fields findByThriftId(int fieldId) {
12714
        switch(fieldId) {
12715
          case 1: // SERIAL_NUMBER
12716
            return SERIAL_NUMBER;
12717
          default:
12718
            return null;
12719
        }
12720
      }
12721
 
12722
      /**
12723
       * Find the _Fields constant that matches fieldId, throwing an exception
12724
       * if it is not found.
12725
       */
12726
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12727
        _Fields fields = findByThriftId(fieldId);
12728
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12729
        return fields;
12730
      }
12731
 
12732
      /**
12733
       * Find the _Fields constant that matches name, or null if its not found.
12734
       */
12735
      public static _Fields findByName(String name) {
12736
        return byName.get(name);
12737
      }
12738
 
12739
      private final short _thriftId;
12740
      private final String _fieldName;
12741
 
12742
      _Fields(short thriftId, String fieldName) {
12743
        _thriftId = thriftId;
12744
        _fieldName = fieldName;
12745
      }
12746
 
12747
      public short getThriftFieldId() {
12748
        return _thriftId;
12749
      }
12750
 
12751
      public String getFieldName() {
12752
        return _fieldName;
12753
      }
12754
    }
12755
 
12756
    // isset id assignments
12757
    private static final int __SERIALNUMBER_ISSET_ID = 0;
12758
    private BitSet __isset_bit_vector = new BitSet(1);
12759
 
12760
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12761
    static {
12762
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12763
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12764
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12765
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12766
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScanRecordsForSerialNumber_args.class, metaDataMap);
12767
    }
12768
 
12769
    public getScanRecordsForSerialNumber_args() {
12770
    }
12771
 
12772
    public getScanRecordsForSerialNumber_args(
12773
      long serialNumber)
12774
    {
12775
      this();
12776
      this.serialNumber = serialNumber;
12777
      setSerialNumberIsSet(true);
12778
    }
12779
 
12780
    /**
12781
     * Performs a deep copy on <i>other</i>.
12782
     */
12783
    public getScanRecordsForSerialNumber_args(getScanRecordsForSerialNumber_args other) {
12784
      __isset_bit_vector.clear();
12785
      __isset_bit_vector.or(other.__isset_bit_vector);
12786
      this.serialNumber = other.serialNumber;
12787
    }
12788
 
12789
    public getScanRecordsForSerialNumber_args deepCopy() {
12790
      return new getScanRecordsForSerialNumber_args(this);
12791
    }
12792
 
12793
    @Override
12794
    public void clear() {
12795
      setSerialNumberIsSet(false);
12796
      this.serialNumber = 0;
12797
    }
12798
 
12799
    public long getSerialNumber() {
12800
      return this.serialNumber;
12801
    }
12802
 
12803
    public void setSerialNumber(long serialNumber) {
12804
      this.serialNumber = serialNumber;
12805
      setSerialNumberIsSet(true);
12806
    }
12807
 
12808
    public void unsetSerialNumber() {
12809
      __isset_bit_vector.clear(__SERIALNUMBER_ISSET_ID);
12810
    }
12811
 
12812
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
12813
    public boolean isSetSerialNumber() {
12814
      return __isset_bit_vector.get(__SERIALNUMBER_ISSET_ID);
12815
    }
12816
 
12817
    public void setSerialNumberIsSet(boolean value) {
12818
      __isset_bit_vector.set(__SERIALNUMBER_ISSET_ID, value);
12819
    }
12820
 
12821
    public void setFieldValue(_Fields field, Object value) {
12822
      switch (field) {
12823
      case SERIAL_NUMBER:
12824
        if (value == null) {
12825
          unsetSerialNumber();
12826
        } else {
12827
          setSerialNumber((Long)value);
12828
        }
12829
        break;
12830
 
12831
      }
12832
    }
12833
 
12834
    public Object getFieldValue(_Fields field) {
12835
      switch (field) {
12836
      case SERIAL_NUMBER:
12837
        return Long.valueOf(getSerialNumber());
12838
 
12839
      }
12840
      throw new IllegalStateException();
12841
    }
12842
 
12843
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12844
    public boolean isSet(_Fields field) {
12845
      if (field == null) {
12846
        throw new IllegalArgumentException();
12847
      }
12848
 
12849
      switch (field) {
12850
      case SERIAL_NUMBER:
12851
        return isSetSerialNumber();
12852
      }
12853
      throw new IllegalStateException();
12854
    }
12855
 
12856
    @Override
12857
    public boolean equals(Object that) {
12858
      if (that == null)
12859
        return false;
12860
      if (that instanceof getScanRecordsForSerialNumber_args)
12861
        return this.equals((getScanRecordsForSerialNumber_args)that);
12862
      return false;
12863
    }
12864
 
12865
    public boolean equals(getScanRecordsForSerialNumber_args that) {
12866
      if (that == null)
12867
        return false;
12868
 
12869
      boolean this_present_serialNumber = true;
12870
      boolean that_present_serialNumber = true;
12871
      if (this_present_serialNumber || that_present_serialNumber) {
12872
        if (!(this_present_serialNumber && that_present_serialNumber))
12873
          return false;
12874
        if (this.serialNumber != that.serialNumber)
12875
          return false;
12876
      }
12877
 
12878
      return true;
12879
    }
12880
 
12881
    @Override
12882
    public int hashCode() {
12883
      return 0;
12884
    }
12885
 
12886
    public int compareTo(getScanRecordsForSerialNumber_args other) {
12887
      if (!getClass().equals(other.getClass())) {
12888
        return getClass().getName().compareTo(other.getClass().getName());
12889
      }
12890
 
12891
      int lastComparison = 0;
12892
      getScanRecordsForSerialNumber_args typedOther = (getScanRecordsForSerialNumber_args)other;
12893
 
12894
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
12895
      if (lastComparison != 0) {
12896
        return lastComparison;
12897
      }
12898
      if (isSetSerialNumber()) {
12899
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
12900
        if (lastComparison != 0) {
12901
          return lastComparison;
12902
        }
12903
      }
12904
      return 0;
12905
    }
12906
 
12907
    public _Fields fieldForId(int fieldId) {
12908
      return _Fields.findByThriftId(fieldId);
12909
    }
12910
 
12911
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12912
      org.apache.thrift.protocol.TField field;
12913
      iprot.readStructBegin();
12914
      while (true)
12915
      {
12916
        field = iprot.readFieldBegin();
12917
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12918
          break;
12919
        }
12920
        switch (field.id) {
12921
          case 1: // SERIAL_NUMBER
12922
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12923
              this.serialNumber = iprot.readI64();
12924
              setSerialNumberIsSet(true);
12925
            } else { 
12926
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12927
            }
12928
            break;
12929
          default:
12930
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12931
        }
12932
        iprot.readFieldEnd();
12933
      }
12934
      iprot.readStructEnd();
12935
      validate();
12936
    }
12937
 
12938
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12939
      validate();
12940
 
12941
      oprot.writeStructBegin(STRUCT_DESC);
12942
      oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
12943
      oprot.writeI64(this.serialNumber);
12944
      oprot.writeFieldEnd();
12945
      oprot.writeFieldStop();
12946
      oprot.writeStructEnd();
12947
    }
12948
 
12949
    @Override
12950
    public String toString() {
12951
      StringBuilder sb = new StringBuilder("getScanRecordsForSerialNumber_args(");
12952
      boolean first = true;
12953
 
12954
      sb.append("serialNumber:");
12955
      sb.append(this.serialNumber);
12956
      first = false;
12957
      sb.append(")");
12958
      return sb.toString();
12959
    }
12960
 
12961
    public void validate() throws org.apache.thrift.TException {
12962
      // check for required fields
12963
    }
12964
 
12965
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12966
      try {
12967
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12968
      } catch (org.apache.thrift.TException te) {
12969
        throw new java.io.IOException(te);
12970
      }
12971
    }
12972
 
12973
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12974
      try {
12975
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
12976
        __isset_bit_vector = new BitSet(1);
12977
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12978
      } catch (org.apache.thrift.TException te) {
12979
        throw new java.io.IOException(te);
12980
      }
12981
    }
12982
 
12983
  }
12984
 
12985
  public static class getScanRecordsForSerialNumber_result implements org.apache.thrift.TBase<getScanRecordsForSerialNumber_result, getScanRecordsForSerialNumber_result._Fields>, java.io.Serializable, Cloneable   {
12986
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScanRecordsForSerialNumber_result");
12987
 
12988
    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);
12989
 
12990
    private List<Scan> success; // required
12991
 
12992
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12993
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12994
      SUCCESS((short)0, "success");
12995
 
12996
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12997
 
12998
      static {
12999
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13000
          byName.put(field.getFieldName(), field);
13001
        }
13002
      }
13003
 
13004
      /**
13005
       * Find the _Fields constant that matches fieldId, or null if its not found.
13006
       */
13007
      public static _Fields findByThriftId(int fieldId) {
13008
        switch(fieldId) {
13009
          case 0: // SUCCESS
13010
            return SUCCESS;
13011
          default:
13012
            return null;
13013
        }
13014
      }
13015
 
13016
      /**
13017
       * Find the _Fields constant that matches fieldId, throwing an exception
13018
       * if it is not found.
13019
       */
13020
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13021
        _Fields fields = findByThriftId(fieldId);
13022
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13023
        return fields;
13024
      }
13025
 
13026
      /**
13027
       * Find the _Fields constant that matches name, or null if its not found.
13028
       */
13029
      public static _Fields findByName(String name) {
13030
        return byName.get(name);
13031
      }
13032
 
13033
      private final short _thriftId;
13034
      private final String _fieldName;
13035
 
13036
      _Fields(short thriftId, String fieldName) {
13037
        _thriftId = thriftId;
13038
        _fieldName = fieldName;
13039
      }
13040
 
13041
      public short getThriftFieldId() {
13042
        return _thriftId;
13043
      }
13044
 
13045
      public String getFieldName() {
13046
        return _fieldName;
13047
      }
13048
    }
13049
 
13050
    // isset id assignments
13051
 
13052
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13053
    static {
13054
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13055
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13056
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
13057
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Scan.class))));
13058
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13059
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScanRecordsForSerialNumber_result.class, metaDataMap);
13060
    }
13061
 
13062
    public getScanRecordsForSerialNumber_result() {
13063
    }
13064
 
13065
    public getScanRecordsForSerialNumber_result(
13066
      List<Scan> success)
13067
    {
13068
      this();
13069
      this.success = success;
13070
    }
13071
 
13072
    /**
13073
     * Performs a deep copy on <i>other</i>.
13074
     */
13075
    public getScanRecordsForSerialNumber_result(getScanRecordsForSerialNumber_result other) {
13076
      if (other.isSetSuccess()) {
13077
        List<Scan> __this__success = new ArrayList<Scan>();
13078
        for (Scan other_element : other.success) {
13079
          __this__success.add(new Scan(other_element));
13080
        }
13081
        this.success = __this__success;
13082
      }
13083
    }
13084
 
13085
    public getScanRecordsForSerialNumber_result deepCopy() {
13086
      return new getScanRecordsForSerialNumber_result(this);
13087
    }
13088
 
13089
    @Override
13090
    public void clear() {
13091
      this.success = null;
13092
    }
13093
 
13094
    public int getSuccessSize() {
13095
      return (this.success == null) ? 0 : this.success.size();
13096
    }
13097
 
13098
    public java.util.Iterator<Scan> getSuccessIterator() {
13099
      return (this.success == null) ? null : this.success.iterator();
13100
    }
13101
 
13102
    public void addToSuccess(Scan elem) {
13103
      if (this.success == null) {
13104
        this.success = new ArrayList<Scan>();
13105
      }
13106
      this.success.add(elem);
13107
    }
13108
 
13109
    public List<Scan> getSuccess() {
13110
      return this.success;
13111
    }
13112
 
13113
    public void setSuccess(List<Scan> success) {
13114
      this.success = success;
13115
    }
13116
 
13117
    public void unsetSuccess() {
13118
      this.success = null;
13119
    }
13120
 
13121
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
13122
    public boolean isSetSuccess() {
13123
      return this.success != null;
13124
    }
13125
 
13126
    public void setSuccessIsSet(boolean value) {
13127
      if (!value) {
13128
        this.success = null;
13129
      }
13130
    }
13131
 
13132
    public void setFieldValue(_Fields field, Object value) {
13133
      switch (field) {
13134
      case SUCCESS:
13135
        if (value == null) {
13136
          unsetSuccess();
13137
        } else {
13138
          setSuccess((List<Scan>)value);
13139
        }
13140
        break;
13141
 
13142
      }
13143
    }
13144
 
13145
    public Object getFieldValue(_Fields field) {
13146
      switch (field) {
13147
      case SUCCESS:
13148
        return getSuccess();
13149
 
13150
      }
13151
      throw new IllegalStateException();
13152
    }
13153
 
13154
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13155
    public boolean isSet(_Fields field) {
13156
      if (field == null) {
13157
        throw new IllegalArgumentException();
13158
      }
13159
 
13160
      switch (field) {
13161
      case SUCCESS:
13162
        return isSetSuccess();
13163
      }
13164
      throw new IllegalStateException();
13165
    }
13166
 
13167
    @Override
13168
    public boolean equals(Object that) {
13169
      if (that == null)
13170
        return false;
13171
      if (that instanceof getScanRecordsForSerialNumber_result)
13172
        return this.equals((getScanRecordsForSerialNumber_result)that);
13173
      return false;
13174
    }
13175
 
13176
    public boolean equals(getScanRecordsForSerialNumber_result that) {
13177
      if (that == null)
13178
        return false;
13179
 
13180
      boolean this_present_success = true && this.isSetSuccess();
13181
      boolean that_present_success = true && that.isSetSuccess();
13182
      if (this_present_success || that_present_success) {
13183
        if (!(this_present_success && that_present_success))
13184
          return false;
13185
        if (!this.success.equals(that.success))
13186
          return false;
13187
      }
13188
 
13189
      return true;
13190
    }
13191
 
13192
    @Override
13193
    public int hashCode() {
13194
      return 0;
13195
    }
13196
 
13197
    public int compareTo(getScanRecordsForSerialNumber_result other) {
13198
      if (!getClass().equals(other.getClass())) {
13199
        return getClass().getName().compareTo(other.getClass().getName());
13200
      }
13201
 
13202
      int lastComparison = 0;
13203
      getScanRecordsForSerialNumber_result typedOther = (getScanRecordsForSerialNumber_result)other;
13204
 
13205
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
13206
      if (lastComparison != 0) {
13207
        return lastComparison;
13208
      }
13209
      if (isSetSuccess()) {
13210
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
13211
        if (lastComparison != 0) {
13212
          return lastComparison;
13213
        }
13214
      }
13215
      return 0;
13216
    }
13217
 
13218
    public _Fields fieldForId(int fieldId) {
13219
      return _Fields.findByThriftId(fieldId);
13220
    }
13221
 
13222
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13223
      org.apache.thrift.protocol.TField field;
13224
      iprot.readStructBegin();
13225
      while (true)
13226
      {
13227
        field = iprot.readFieldBegin();
13228
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13229
          break;
13230
        }
13231
        switch (field.id) {
13232
          case 0: // SUCCESS
13233
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
13234
              {
13235
                org.apache.thrift.protocol.TList _list28 = iprot.readListBegin();
13236
                this.success = new ArrayList<Scan>(_list28.size);
13237
                for (int _i29 = 0; _i29 < _list28.size; ++_i29)
13238
                {
13239
                  Scan _elem30; // required
13240
                  _elem30 = new Scan();
13241
                  _elem30.read(iprot);
13242
                  this.success.add(_elem30);
13243
                }
13244
                iprot.readListEnd();
13245
              }
13246
            } else { 
13247
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13248
            }
13249
            break;
13250
          default:
13251
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13252
        }
13253
        iprot.readFieldEnd();
13254
      }
13255
      iprot.readStructEnd();
13256
      validate();
13257
    }
13258
 
13259
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13260
      oprot.writeStructBegin(STRUCT_DESC);
13261
 
13262
      if (this.isSetSuccess()) {
13263
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13264
        {
13265
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
13266
          for (Scan _iter31 : this.success)
13267
          {
13268
            _iter31.write(oprot);
13269
          }
13270
          oprot.writeListEnd();
13271
        }
13272
        oprot.writeFieldEnd();
13273
      }
13274
      oprot.writeFieldStop();
13275
      oprot.writeStructEnd();
13276
    }
13277
 
13278
    @Override
13279
    public String toString() {
13280
      StringBuilder sb = new StringBuilder("getScanRecordsForSerialNumber_result(");
13281
      boolean first = true;
13282
 
13283
      sb.append("success:");
13284
      if (this.success == null) {
13285
        sb.append("null");
13286
      } else {
13287
        sb.append(this.success);
13288
      }
13289
      first = false;
13290
      sb.append(")");
13291
      return sb.toString();
13292
    }
13293
 
13294
    public void validate() throws org.apache.thrift.TException {
13295
      // check for required fields
13296
    }
13297
 
13298
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13299
      try {
13300
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13301
      } catch (org.apache.thrift.TException te) {
13302
        throw new java.io.IOException(te);
13303
      }
13304
    }
13305
 
13306
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13307
      try {
13308
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13309
      } catch (org.apache.thrift.TException te) {
13310
        throw new java.io.IOException(te);
13311
      }
13312
    }
13313
 
13314
  }
13315
 
2820 chandransh 13316
}