Subversion Repositories SmartDukaan

Rev

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