Subversion Repositories SmartDukaan

Rev

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

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