Subversion Repositories SmartDukaan

Rev

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