Subversion Repositories SmartDukaan

Rev

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