Subversion Repositories SmartDukaan

Rev

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