Subversion Repositories SmartDukaan

Rev

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

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