Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
4496 mandeep.dh 1
/**
2
 * Autogenerated by Thrift Compiler (0.7.0)
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.purchase;
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;
18
import java.nio.ByteBuffer;
19
import java.util.Arrays;
20
import org.slf4j.Logger;
21
import org.slf4j.LoggerFactory;
22
 
23
public class PurchaseService {
24
 
25
  public interface Iface extends in.shop2020.generic.GenericService.Iface {
26
 
27
    /**
28
     * Creates a purchase order based on the data in the given purchase order object.
29
     * This method populates a nummber of missing fields
30
     * 
31
     * @param purchaseOrder
32
     */
33
    public long createPurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException;
34
 
35
    /**
36
     * Returns the purchase order with the given id. Throws an exception if there is no such purchase order.
37
     * 
38
     * @param id
39
     */
40
    public PurchaseOrder getPurchaseOrder(long id) throws PurchaseServiceException, org.apache.thrift.TException;
41
 
42
    /**
43
     * Returns a list of all the purchase orders in the given state
44
     * 
45
     * @param status
46
     */
47
    public List<PurchaseOrder> getAllPurchaseOrders(POStatus status) throws PurchaseServiceException, org.apache.thrift.TException;
48
 
49
    /**
50
     * Returns the supplier with the given order id. Throws an exception if there is no such supplier.
51
     * 
52
     * @param id
53
     */
54
    public Supplier getSupplier(long id) throws PurchaseServiceException, org.apache.thrift.TException;
55
 
56
    /**
57
     * Creates a purchase for the given purchase order.
58
     * Throws an exception if no more purchases are allowed against the given purchase order.
59
     * 
60
     * @param purchaseOrderId
61
     * @param invoiceNumber
62
     * @param freightCharges
63
     */
64
    public long startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws PurchaseServiceException, org.apache.thrift.TException;
65
 
66
    /**
67
     * Marks a purchase as complete and updates the receivedOn time.
68
     * Throws an exception if no such purchase exists.
69
     * 
70
     * @param purchaseId
71
     */
72
    public long closePurchase(long purchaseId) throws PurchaseServiceException, org.apache.thrift.TException;
73
 
74
    /**
75
     * Returns all open or closed purchases for the given purchase order. Throws an exception if no such purchase order exists
76
     * 
77
     * @param purchaseOrderId
78
     * @param open
79
     */
80
    public List<Purchase> getAllPurchases(long purchaseOrderId, boolean open) throws PurchaseServiceException, org.apache.thrift.TException;
81
 
82
    /**
6385 amar.kumar 83
     * Returns all purchases for the given purchase order. Throws an exception if no such purchase order exists
84
     * 
85
     * @param purchaseOrderId
86
     */
87
    public List<Purchase> getPurchasesForPO(long purchaseOrderId) throws PurchaseServiceException, org.apache.thrift.TException;
88
 
89
    /**
4555 mandeep.dh 90
     * Returns the purchase order object for a given purchase
4496 mandeep.dh 91
     * 
92
     * @param purchaseId
93
     */
4555 mandeep.dh 94
    public PurchaseOrder getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException;
4496 mandeep.dh 95
 
4754 mandeep.dh 96
    /**
97
     * Creates purchase order objects from pending orders
98
     * 
99
     * @param warehouseId
100
     */
101
    public List<PurchaseOrder> getPendingPurchaseOrders(long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException;
102
 
103
    /**
104
     * Returns all the valid suppliers
105
     */
106
    public List<Supplier> getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException;
107
 
108
    /**
109
     * Fulfills a given purchase order with an item.
110
     * 
111
     * @param purchaseOrderId
112
     * @param itemId
113
     * @param quantity
114
     */
115
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException;
116
 
117
    /**
118
     * Amends a PO as per the new lineitems passed
119
     * 
120
     * @param purchaseOrder
121
     */
122
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException;
123
 
5185 mandeep.dh 124
    /**
125
     * Fulfills a given purchase id with an item and its quantity.
126
     * 
127
     * @param purchaseId
128
     * @param itemId
129
     * @param quantity
130
     */
131
    public void unFulfillPO(long purchaseId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException;
132
 
5443 mandeep.dh 133
    /**
5530 mandeep.dh 134
     * Fetches all invoices after a given date
5443 mandeep.dh 135
     * 
136
     * @param date
137
     */
138
    public List<Invoice> getInvoices(long date) throws org.apache.thrift.TException;
139
 
140
    /**
7410 amar.kumar 141
     * Fetches all invoices after a given date
142
     * 
143
     * @param warehouseId
144
     * @param supplierId
145
     * @param date
146
     */
147
    public List<Invoice> getInvoicesForWarehouse(long warehouseId, long supplierId, long date) throws org.apache.thrift.TException;
148
 
149
    /**
5443 mandeep.dh 150
     * Creates an invoice object
151
     * 
152
     * @param invoice
153
     */
154
    public void createInvoice(Invoice invoice) throws PurchaseServiceException, org.apache.thrift.TException;
155
 
5591 mandeep.dh 156
    /**
157
     * Creates a supplier
158
     * 
159
     * @param supplier
160
     */
161
    public Supplier addSupplier(Supplier supplier) throws org.apache.thrift.TException;
162
 
163
    /**
164
     * Updates a supplier
165
     * 
166
     * @param supplier
167
     */
168
    public void updateSupplier(Supplier supplier) throws org.apache.thrift.TException;
169
 
6467 amar.kumar 170
    /**
171
     * Create a new Purchase Return
172
     * 
173
     * @param purchaseReturn
174
     */
175
    public long createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException;
176
 
177
    /**
178
     * Create a new Purchase Return
179
     * 
180
     * @param id
181
     */
182
    public void settlePurchaseReturn(long id) throws org.apache.thrift.TException;
183
 
184
    /**
185
     * Create a new Purchase Return
186
     */
187
    public List<PurchaseReturn> getUnsettledPurchaseReturns() throws org.apache.thrift.TException;
188
 
6630 amar.kumar 189
    /**
190
     * Get invoice with given supplierId and invoiceNumber
191
     * 
192
     * @param invoiceNumber
193
     * @param supplierId
194
     */
195
    public List<PurchaseReturn> getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException;
196
 
6762 amar.kumar 197
    /**
198
     *  * Inserts new Invoice/LineItem/Purchase Entries for Billed Product done through Our External Billing
199
     * *
200
     * 
201
     * @param invoiceNumber
202
     * @param unitPrice
7672 rajveer 203
     * @param nlc
6762 amar.kumar 204
     * @param itemId
205
     */
7672 rajveer 206
    public long createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId) throws org.apache.thrift.TException;
6762 amar.kumar 207
 
208
    public void fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException;
209
 
7410 amar.kumar 210
    /**
211
     * Marks a purchase order as closedcomplete and updates the receivedOn time.
212
     * 
213
     * @param poId
214
     */
215
    public void closePO(long poId) throws PurchaseServiceException, org.apache.thrift.TException;
216
 
217
    /**
218
     * Check if invoice is already received with given supplierId and invoiceNumber
219
     * 
220
     * @param invoiceNumber
221
     * @param supplierId
222
     */
223
    public boolean isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException;
224
 
9829 amar.kumar 225
    /**
226
     * Change warehouseId of PO if no items have been received yet for the PO
227
     * 
228
     * @param id
229
     * @param warehouseId
230
     */
231
    public void changeWarehouseForPO(long id, long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException;
232
 
9925 amar.kumar 233
    /**
234
     * Change status of PO
235
     * 
236
     * @param id
237
     * @param poStatus
238
     */
239
    public void changePOStatus(long id, POStatus poStatus) throws PurchaseServiceException, org.apache.thrift.TException;
240
 
11751 manish.sha 241
    /**
242
     * Get Purchase Return from Id
243
     * 
244
     * @param id
245
     */
246
    public PurchaseReturn getPurchaseReturn(long id) throws PurchaseServiceException, org.apache.thrift.TException;
247
 
4496 mandeep.dh 248
  }
249
 
250
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
251
 
252
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
253
 
254
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
255
 
256
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
257
 
258
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSupplier_call> resultHandler) throws org.apache.thrift.TException;
259
 
260
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.startPurchase_call> resultHandler) throws org.apache.thrift.TException;
261
 
262
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePurchase_call> resultHandler) throws org.apache.thrift.TException;
263
 
264
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchases_call> resultHandler) throws org.apache.thrift.TException;
265
 
6385 amar.kumar 266
    public void getPurchasesForPO(long purchaseOrderId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchasesForPO_call> resultHandler) throws org.apache.thrift.TException;
267
 
4555 mandeep.dh 268
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException;
4496 mandeep.dh 269
 
4754 mandeep.dh 270
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
271
 
272
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuppliers_call> resultHandler) throws org.apache.thrift.TException;
273
 
274
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fulfillPO_call> resultHandler) throws org.apache.thrift.TException;
275
 
276
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
277
 
5185 mandeep.dh 278
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.unFulfillPO_call> resultHandler) throws org.apache.thrift.TException;
279
 
5443 mandeep.dh 280
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoices_call> resultHandler) throws org.apache.thrift.TException;
281
 
7410 amar.kumar 282
    public void getInvoicesForWarehouse(long warehouseId, long supplierId, long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoicesForWarehouse_call> resultHandler) throws org.apache.thrift.TException;
283
 
5443 mandeep.dh 284
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createInvoice_call> resultHandler) throws org.apache.thrift.TException;
285
 
5591 mandeep.dh 286
    public void addSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addSupplier_call> resultHandler) throws org.apache.thrift.TException;
287
 
288
    public void updateSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateSupplier_call> resultHandler) throws org.apache.thrift.TException;
289
 
6467 amar.kumar 290
    public void createPurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
291
 
292
    public void settlePurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.settlePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
293
 
294
    public void getUnsettledPurchaseReturns(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUnsettledPurchaseReturns_call> resultHandler) throws org.apache.thrift.TException;
295
 
6630 amar.kumar 296
    public void getInvoice(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoice_call> resultHandler) throws org.apache.thrift.TException;
297
 
7672 rajveer 298
    public void createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseForOurExtBilling_call> resultHandler) throws org.apache.thrift.TException;
6762 amar.kumar 299
 
300
    public void fulfillPOForExtBilling(long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fulfillPOForExtBilling_call> resultHandler) throws org.apache.thrift.TException;
301
 
7410 amar.kumar 302
    public void closePO(long poId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePO_call> resultHandler) throws org.apache.thrift.TException;
303
 
304
    public void isInvoiceReceived(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.isInvoiceReceived_call> resultHandler) throws org.apache.thrift.TException;
305
 
9829 amar.kumar 306
    public void changeWarehouseForPO(long id, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.changeWarehouseForPO_call> resultHandler) throws org.apache.thrift.TException;
307
 
9925 amar.kumar 308
    public void changePOStatus(long id, POStatus poStatus, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.changePOStatus_call> resultHandler) throws org.apache.thrift.TException;
309
 
11751 manish.sha 310
    public void getPurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
311
 
4496 mandeep.dh 312
  }
313
 
314
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
315
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
316
      public Factory() {}
317
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
318
        return new Client(prot);
319
      }
320
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
321
        return new Client(iprot, oprot);
322
      }
323
    }
324
 
325
    public Client(org.apache.thrift.protocol.TProtocol prot)
326
    {
327
      super(prot, prot);
328
    }
329
 
330
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
331
      super(iprot, oprot);
332
    }
333
 
334
    public long createPurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
335
    {
336
      send_createPurchaseOrder(purchaseOrder);
337
      return recv_createPurchaseOrder();
338
    }
339
 
340
    public void send_createPurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
341
    {
342
      createPurchaseOrder_args args = new createPurchaseOrder_args();
343
      args.setPurchaseOrder(purchaseOrder);
344
      sendBase("createPurchaseOrder", args);
345
    }
346
 
347
    public long recv_createPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
348
    {
349
      createPurchaseOrder_result result = new createPurchaseOrder_result();
350
      receiveBase(result, "createPurchaseOrder");
351
      if (result.isSetSuccess()) {
352
        return result.success;
353
      }
354
      if (result.e != null) {
355
        throw result.e;
356
      }
357
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseOrder failed: unknown result");
358
    }
359
 
360
    public PurchaseOrder getPurchaseOrder(long id) throws PurchaseServiceException, org.apache.thrift.TException
361
    {
362
      send_getPurchaseOrder(id);
363
      return recv_getPurchaseOrder();
364
    }
365
 
366
    public void send_getPurchaseOrder(long id) throws org.apache.thrift.TException
367
    {
368
      getPurchaseOrder_args args = new getPurchaseOrder_args();
369
      args.setId(id);
370
      sendBase("getPurchaseOrder", args);
371
    }
372
 
373
    public PurchaseOrder recv_getPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
374
    {
375
      getPurchaseOrder_result result = new getPurchaseOrder_result();
376
      receiveBase(result, "getPurchaseOrder");
377
      if (result.isSetSuccess()) {
378
        return result.success;
379
      }
380
      if (result.e != null) {
381
        throw result.e;
382
      }
383
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrder failed: unknown result");
384
    }
385
 
386
    public List<PurchaseOrder> getAllPurchaseOrders(POStatus status) throws PurchaseServiceException, org.apache.thrift.TException
387
    {
388
      send_getAllPurchaseOrders(status);
389
      return recv_getAllPurchaseOrders();
390
    }
391
 
392
    public void send_getAllPurchaseOrders(POStatus status) throws org.apache.thrift.TException
393
    {
394
      getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
395
      args.setStatus(status);
396
      sendBase("getAllPurchaseOrders", args);
397
    }
398
 
399
    public List<PurchaseOrder> recv_getAllPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
400
    {
401
      getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
402
      receiveBase(result, "getAllPurchaseOrders");
403
      if (result.isSetSuccess()) {
404
        return result.success;
405
      }
406
      if (result.e != null) {
407
        throw result.e;
408
      }
409
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchaseOrders failed: unknown result");
410
    }
411
 
412
    public Supplier getSupplier(long id) throws PurchaseServiceException, org.apache.thrift.TException
413
    {
414
      send_getSupplier(id);
415
      return recv_getSupplier();
416
    }
417
 
418
    public void send_getSupplier(long id) throws org.apache.thrift.TException
419
    {
420
      getSupplier_args args = new getSupplier_args();
421
      args.setId(id);
422
      sendBase("getSupplier", args);
423
    }
424
 
425
    public Supplier recv_getSupplier() throws PurchaseServiceException, org.apache.thrift.TException
426
    {
427
      getSupplier_result result = new getSupplier_result();
428
      receiveBase(result, "getSupplier");
429
      if (result.isSetSuccess()) {
430
        return result.success;
431
      }
432
      if (result.e != null) {
433
        throw result.e;
434
      }
435
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSupplier failed: unknown result");
436
    }
437
 
438
    public long startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws PurchaseServiceException, org.apache.thrift.TException
439
    {
440
      send_startPurchase(purchaseOrderId, invoiceNumber, freightCharges);
441
      return recv_startPurchase();
442
    }
443
 
444
    public void send_startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws org.apache.thrift.TException
445
    {
446
      startPurchase_args args = new startPurchase_args();
447
      args.setPurchaseOrderId(purchaseOrderId);
448
      args.setInvoiceNumber(invoiceNumber);
449
      args.setFreightCharges(freightCharges);
450
      sendBase("startPurchase", args);
451
    }
452
 
453
    public long recv_startPurchase() throws PurchaseServiceException, org.apache.thrift.TException
454
    {
455
      startPurchase_result result = new startPurchase_result();
456
      receiveBase(result, "startPurchase");
457
      if (result.isSetSuccess()) {
458
        return result.success;
459
      }
460
      if (result.e != null) {
461
        throw result.e;
462
      }
463
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startPurchase failed: unknown result");
464
    }
465
 
466
    public long closePurchase(long purchaseId) throws PurchaseServiceException, org.apache.thrift.TException
467
    {
468
      send_closePurchase(purchaseId);
469
      return recv_closePurchase();
470
    }
471
 
472
    public void send_closePurchase(long purchaseId) throws org.apache.thrift.TException
473
    {
474
      closePurchase_args args = new closePurchase_args();
475
      args.setPurchaseId(purchaseId);
476
      sendBase("closePurchase", args);
477
    }
478
 
479
    public long recv_closePurchase() throws PurchaseServiceException, org.apache.thrift.TException
480
    {
481
      closePurchase_result result = new closePurchase_result();
482
      receiveBase(result, "closePurchase");
483
      if (result.isSetSuccess()) {
484
        return result.success;
485
      }
486
      if (result.e != null) {
487
        throw result.e;
488
      }
489
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "closePurchase failed: unknown result");
490
    }
491
 
492
    public List<Purchase> getAllPurchases(long purchaseOrderId, boolean open) throws PurchaseServiceException, org.apache.thrift.TException
493
    {
494
      send_getAllPurchases(purchaseOrderId, open);
495
      return recv_getAllPurchases();
496
    }
497
 
498
    public void send_getAllPurchases(long purchaseOrderId, boolean open) throws org.apache.thrift.TException
499
    {
500
      getAllPurchases_args args = new getAllPurchases_args();
501
      args.setPurchaseOrderId(purchaseOrderId);
502
      args.setOpen(open);
503
      sendBase("getAllPurchases", args);
504
    }
505
 
506
    public List<Purchase> recv_getAllPurchases() throws PurchaseServiceException, org.apache.thrift.TException
507
    {
508
      getAllPurchases_result result = new getAllPurchases_result();
509
      receiveBase(result, "getAllPurchases");
510
      if (result.isSetSuccess()) {
511
        return result.success;
512
      }
513
      if (result.e != null) {
514
        throw result.e;
515
      }
516
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchases failed: unknown result");
517
    }
518
 
6385 amar.kumar 519
    public List<Purchase> getPurchasesForPO(long purchaseOrderId) throws PurchaseServiceException, org.apache.thrift.TException
520
    {
521
      send_getPurchasesForPO(purchaseOrderId);
522
      return recv_getPurchasesForPO();
523
    }
524
 
525
    public void send_getPurchasesForPO(long purchaseOrderId) throws org.apache.thrift.TException
526
    {
527
      getPurchasesForPO_args args = new getPurchasesForPO_args();
528
      args.setPurchaseOrderId(purchaseOrderId);
529
      sendBase("getPurchasesForPO", args);
530
    }
531
 
532
    public List<Purchase> recv_getPurchasesForPO() throws PurchaseServiceException, org.apache.thrift.TException
533
    {
534
      getPurchasesForPO_result result = new getPurchasesForPO_result();
535
      receiveBase(result, "getPurchasesForPO");
536
      if (result.isSetSuccess()) {
537
        return result.success;
538
      }
539
      if (result.e != null) {
540
        throw result.e;
541
      }
542
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchasesForPO failed: unknown result");
543
    }
544
 
4555 mandeep.dh 545
    public PurchaseOrder getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 546
    {
4555 mandeep.dh 547
      send_getPurchaseOrderForPurchase(purchaseId);
548
      return recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 549
    }
550
 
4555 mandeep.dh 551
    public void send_getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 552
    {
4555 mandeep.dh 553
      getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 554
      args.setPurchaseId(purchaseId);
4555 mandeep.dh 555
      sendBase("getPurchaseOrderForPurchase", args);
4496 mandeep.dh 556
    }
557
 
4555 mandeep.dh 558
    public PurchaseOrder recv_getPurchaseOrderForPurchase() throws org.apache.thrift.TException
4496 mandeep.dh 559
    {
4555 mandeep.dh 560
      getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
561
      receiveBase(result, "getPurchaseOrderForPurchase");
4496 mandeep.dh 562
      if (result.isSetSuccess()) {
563
        return result.success;
564
      }
4555 mandeep.dh 565
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrderForPurchase failed: unknown result");
4496 mandeep.dh 566
    }
567
 
4754 mandeep.dh 568
    public List<PurchaseOrder> getPendingPurchaseOrders(long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException
569
    {
570
      send_getPendingPurchaseOrders(warehouseId);
571
      return recv_getPendingPurchaseOrders();
572
    }
573
 
574
    public void send_getPendingPurchaseOrders(long warehouseId) throws org.apache.thrift.TException
575
    {
576
      getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
577
      args.setWarehouseId(warehouseId);
578
      sendBase("getPendingPurchaseOrders", args);
579
    }
580
 
581
    public List<PurchaseOrder> recv_getPendingPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
582
    {
583
      getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
584
      receiveBase(result, "getPendingPurchaseOrders");
585
      if (result.isSetSuccess()) {
586
        return result.success;
587
      }
588
      if (result.e != null) {
589
        throw result.e;
590
      }
591
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPendingPurchaseOrders failed: unknown result");
592
    }
593
 
594
    public List<Supplier> getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
595
    {
596
      send_getSuppliers();
597
      return recv_getSuppliers();
598
    }
599
 
600
    public void send_getSuppliers() throws org.apache.thrift.TException
601
    {
602
      getSuppliers_args args = new getSuppliers_args();
603
      sendBase("getSuppliers", args);
604
    }
605
 
606
    public List<Supplier> recv_getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
607
    {
608
      getSuppliers_result result = new getSuppliers_result();
609
      receiveBase(result, "getSuppliers");
610
      if (result.isSetSuccess()) {
611
        return result.success;
612
      }
613
      if (result.e != null) {
614
        throw result.e;
615
      }
616
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSuppliers failed: unknown result");
617
    }
618
 
619
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
620
    {
621
      send_fulfillPO(purchaseOrderId, itemId, quantity);
622
      recv_fulfillPO();
623
    }
624
 
625
    public void send_fulfillPO(long purchaseOrderId, long itemId, long quantity) throws org.apache.thrift.TException
626
    {
627
      fulfillPO_args args = new fulfillPO_args();
628
      args.setPurchaseOrderId(purchaseOrderId);
629
      args.setItemId(itemId);
630
      args.setQuantity(quantity);
631
      sendBase("fulfillPO", args);
632
    }
633
 
634
    public void recv_fulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
635
    {
636
      fulfillPO_result result = new fulfillPO_result();
637
      receiveBase(result, "fulfillPO");
638
      if (result.e != null) {
639
        throw result.e;
640
      }
641
      return;
642
    }
643
 
644
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
645
    {
646
      send_updatePurchaseOrder(purchaseOrder);
647
      recv_updatePurchaseOrder();
648
    }
649
 
650
    public void send_updatePurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
651
    {
652
      updatePurchaseOrder_args args = new updatePurchaseOrder_args();
653
      args.setPurchaseOrder(purchaseOrder);
654
      sendBase("updatePurchaseOrder", args);
655
    }
656
 
657
    public void recv_updatePurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
658
    {
659
      updatePurchaseOrder_result result = new updatePurchaseOrder_result();
660
      receiveBase(result, "updatePurchaseOrder");
661
      if (result.e != null) {
662
        throw result.e;
663
      }
664
      return;
665
    }
666
 
5185 mandeep.dh 667
    public void unFulfillPO(long purchaseId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
668
    {
669
      send_unFulfillPO(purchaseId, itemId, quantity);
670
      recv_unFulfillPO();
671
    }
672
 
673
    public void send_unFulfillPO(long purchaseId, long itemId, long quantity) throws org.apache.thrift.TException
674
    {
675
      unFulfillPO_args args = new unFulfillPO_args();
676
      args.setPurchaseId(purchaseId);
677
      args.setItemId(itemId);
678
      args.setQuantity(quantity);
679
      sendBase("unFulfillPO", args);
680
    }
681
 
682
    public void recv_unFulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
683
    {
684
      unFulfillPO_result result = new unFulfillPO_result();
685
      receiveBase(result, "unFulfillPO");
686
      if (result.e != null) {
687
        throw result.e;
688
      }
689
      return;
690
    }
691
 
5443 mandeep.dh 692
    public List<Invoice> getInvoices(long date) throws org.apache.thrift.TException
693
    {
694
      send_getInvoices(date);
695
      return recv_getInvoices();
696
    }
697
 
698
    public void send_getInvoices(long date) throws org.apache.thrift.TException
699
    {
700
      getInvoices_args args = new getInvoices_args();
701
      args.setDate(date);
702
      sendBase("getInvoices", args);
703
    }
704
 
705
    public List<Invoice> recv_getInvoices() throws org.apache.thrift.TException
706
    {
707
      getInvoices_result result = new getInvoices_result();
708
      receiveBase(result, "getInvoices");
709
      if (result.isSetSuccess()) {
710
        return result.success;
711
      }
712
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoices failed: unknown result");
713
    }
714
 
7410 amar.kumar 715
    public List<Invoice> getInvoicesForWarehouse(long warehouseId, long supplierId, long date) throws org.apache.thrift.TException
716
    {
717
      send_getInvoicesForWarehouse(warehouseId, supplierId, date);
718
      return recv_getInvoicesForWarehouse();
719
    }
720
 
721
    public void send_getInvoicesForWarehouse(long warehouseId, long supplierId, long date) throws org.apache.thrift.TException
722
    {
723
      getInvoicesForWarehouse_args args = new getInvoicesForWarehouse_args();
724
      args.setWarehouseId(warehouseId);
725
      args.setSupplierId(supplierId);
726
      args.setDate(date);
727
      sendBase("getInvoicesForWarehouse", args);
728
    }
729
 
730
    public List<Invoice> recv_getInvoicesForWarehouse() throws org.apache.thrift.TException
731
    {
732
      getInvoicesForWarehouse_result result = new getInvoicesForWarehouse_result();
733
      receiveBase(result, "getInvoicesForWarehouse");
734
      if (result.isSetSuccess()) {
735
        return result.success;
736
      }
737
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoicesForWarehouse failed: unknown result");
738
    }
739
 
5443 mandeep.dh 740
    public void createInvoice(Invoice invoice) throws PurchaseServiceException, org.apache.thrift.TException
741
    {
742
      send_createInvoice(invoice);
743
      recv_createInvoice();
744
    }
745
 
746
    public void send_createInvoice(Invoice invoice) throws org.apache.thrift.TException
747
    {
748
      createInvoice_args args = new createInvoice_args();
749
      args.setInvoice(invoice);
750
      sendBase("createInvoice", args);
751
    }
752
 
753
    public void recv_createInvoice() throws PurchaseServiceException, org.apache.thrift.TException
754
    {
755
      createInvoice_result result = new createInvoice_result();
756
      receiveBase(result, "createInvoice");
757
      if (result.e != null) {
758
        throw result.e;
759
      }
760
      return;
761
    }
762
 
5591 mandeep.dh 763
    public Supplier addSupplier(Supplier supplier) throws org.apache.thrift.TException
764
    {
765
      send_addSupplier(supplier);
766
      return recv_addSupplier();
767
    }
768
 
769
    public void send_addSupplier(Supplier supplier) throws org.apache.thrift.TException
770
    {
771
      addSupplier_args args = new addSupplier_args();
772
      args.setSupplier(supplier);
773
      sendBase("addSupplier", args);
774
    }
775
 
776
    public Supplier recv_addSupplier() throws org.apache.thrift.TException
777
    {
778
      addSupplier_result result = new addSupplier_result();
779
      receiveBase(result, "addSupplier");
780
      if (result.isSetSuccess()) {
781
        return result.success;
782
      }
783
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addSupplier failed: unknown result");
784
    }
785
 
786
    public void updateSupplier(Supplier supplier) throws org.apache.thrift.TException
787
    {
788
      send_updateSupplier(supplier);
789
      recv_updateSupplier();
790
    }
791
 
792
    public void send_updateSupplier(Supplier supplier) throws org.apache.thrift.TException
793
    {
794
      updateSupplier_args args = new updateSupplier_args();
795
      args.setSupplier(supplier);
796
      sendBase("updateSupplier", args);
797
    }
798
 
799
    public void recv_updateSupplier() throws org.apache.thrift.TException
800
    {
801
      updateSupplier_result result = new updateSupplier_result();
802
      receiveBase(result, "updateSupplier");
803
      return;
804
    }
805
 
6467 amar.kumar 806
    public long createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
807
    {
808
      send_createPurchaseReturn(purchaseReturn);
809
      return recv_createPurchaseReturn();
810
    }
811
 
812
    public void send_createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
813
    {
814
      createPurchaseReturn_args args = new createPurchaseReturn_args();
815
      args.setPurchaseReturn(purchaseReturn);
816
      sendBase("createPurchaseReturn", args);
817
    }
818
 
819
    public long recv_createPurchaseReturn() throws org.apache.thrift.TException
820
    {
821
      createPurchaseReturn_result result = new createPurchaseReturn_result();
822
      receiveBase(result, "createPurchaseReturn");
823
      if (result.isSetSuccess()) {
824
        return result.success;
825
      }
826
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseReturn failed: unknown result");
827
    }
828
 
829
    public void settlePurchaseReturn(long id) throws org.apache.thrift.TException
830
    {
831
      send_settlePurchaseReturn(id);
832
      recv_settlePurchaseReturn();
833
    }
834
 
835
    public void send_settlePurchaseReturn(long id) throws org.apache.thrift.TException
836
    {
837
      settlePurchaseReturn_args args = new settlePurchaseReturn_args();
838
      args.setId(id);
839
      sendBase("settlePurchaseReturn", args);
840
    }
841
 
842
    public void recv_settlePurchaseReturn() throws org.apache.thrift.TException
843
    {
844
      settlePurchaseReturn_result result = new settlePurchaseReturn_result();
845
      receiveBase(result, "settlePurchaseReturn");
846
      return;
847
    }
848
 
849
    public List<PurchaseReturn> getUnsettledPurchaseReturns() throws org.apache.thrift.TException
850
    {
851
      send_getUnsettledPurchaseReturns();
852
      return recv_getUnsettledPurchaseReturns();
853
    }
854
 
855
    public void send_getUnsettledPurchaseReturns() throws org.apache.thrift.TException
856
    {
857
      getUnsettledPurchaseReturns_args args = new getUnsettledPurchaseReturns_args();
858
      sendBase("getUnsettledPurchaseReturns", args);
859
    }
860
 
861
    public List<PurchaseReturn> recv_getUnsettledPurchaseReturns() throws org.apache.thrift.TException
862
    {
863
      getUnsettledPurchaseReturns_result result = new getUnsettledPurchaseReturns_result();
864
      receiveBase(result, "getUnsettledPurchaseReturns");
865
      if (result.isSetSuccess()) {
866
        return result.success;
867
      }
868
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUnsettledPurchaseReturns failed: unknown result");
869
    }
870
 
6630 amar.kumar 871
    public List<PurchaseReturn> getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
872
    {
873
      send_getInvoice(invoiceNumber, supplierId);
874
      return recv_getInvoice();
875
    }
876
 
877
    public void send_getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
878
    {
879
      getInvoice_args args = new getInvoice_args();
880
      args.setInvoiceNumber(invoiceNumber);
881
      args.setSupplierId(supplierId);
882
      sendBase("getInvoice", args);
883
    }
884
 
885
    public List<PurchaseReturn> recv_getInvoice() throws org.apache.thrift.TException
886
    {
887
      getInvoice_result result = new getInvoice_result();
888
      receiveBase(result, "getInvoice");
889
      if (result.isSetSuccess()) {
890
        return result.success;
891
      }
892
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoice failed: unknown result");
893
    }
894
 
7672 rajveer 895
    public long createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId) throws org.apache.thrift.TException
6762 amar.kumar 896
    {
7672 rajveer 897
      send_createPurchaseForOurExtBilling(invoiceNumber, unitPrice, nlc, itemId);
6762 amar.kumar 898
      return recv_createPurchaseForOurExtBilling();
899
    }
900
 
7672 rajveer 901
    public void send_createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId) throws org.apache.thrift.TException
6762 amar.kumar 902
    {
903
      createPurchaseForOurExtBilling_args args = new createPurchaseForOurExtBilling_args();
904
      args.setInvoiceNumber(invoiceNumber);
905
      args.setUnitPrice(unitPrice);
7672 rajveer 906
      args.setNlc(nlc);
6762 amar.kumar 907
      args.setItemId(itemId);
908
      sendBase("createPurchaseForOurExtBilling", args);
909
    }
910
 
911
    public long recv_createPurchaseForOurExtBilling() throws org.apache.thrift.TException
912
    {
913
      createPurchaseForOurExtBilling_result result = new createPurchaseForOurExtBilling_result();
914
      receiveBase(result, "createPurchaseForOurExtBilling");
915
      if (result.isSetSuccess()) {
916
        return result.success;
917
      }
918
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseForOurExtBilling failed: unknown result");
919
    }
920
 
921
    public void fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException
922
    {
923
      send_fulfillPOForExtBilling(itemId, quantity);
924
      recv_fulfillPOForExtBilling();
925
    }
926
 
927
    public void send_fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException
928
    {
929
      fulfillPOForExtBilling_args args = new fulfillPOForExtBilling_args();
930
      args.setItemId(itemId);
931
      args.setQuantity(quantity);
932
      sendBase("fulfillPOForExtBilling", args);
933
    }
934
 
935
    public void recv_fulfillPOForExtBilling() throws org.apache.thrift.TException
936
    {
937
      fulfillPOForExtBilling_result result = new fulfillPOForExtBilling_result();
938
      receiveBase(result, "fulfillPOForExtBilling");
939
      return;
940
    }
941
 
7410 amar.kumar 942
    public void closePO(long poId) throws PurchaseServiceException, org.apache.thrift.TException
943
    {
944
      send_closePO(poId);
945
      recv_closePO();
946
    }
947
 
948
    public void send_closePO(long poId) throws org.apache.thrift.TException
949
    {
950
      closePO_args args = new closePO_args();
951
      args.setPoId(poId);
952
      sendBase("closePO", args);
953
    }
954
 
955
    public void recv_closePO() throws PurchaseServiceException, org.apache.thrift.TException
956
    {
957
      closePO_result result = new closePO_result();
958
      receiveBase(result, "closePO");
959
      if (result.e != null) {
960
        throw result.e;
961
      }
962
      return;
963
    }
964
 
965
    public boolean isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
966
    {
967
      send_isInvoiceReceived(invoiceNumber, supplierId);
968
      return recv_isInvoiceReceived();
969
    }
970
 
971
    public void send_isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
972
    {
973
      isInvoiceReceived_args args = new isInvoiceReceived_args();
974
      args.setInvoiceNumber(invoiceNumber);
975
      args.setSupplierId(supplierId);
976
      sendBase("isInvoiceReceived", args);
977
    }
978
 
979
    public boolean recv_isInvoiceReceived() throws org.apache.thrift.TException
980
    {
981
      isInvoiceReceived_result result = new isInvoiceReceived_result();
982
      receiveBase(result, "isInvoiceReceived");
983
      if (result.isSetSuccess()) {
984
        return result.success;
985
      }
986
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isInvoiceReceived failed: unknown result");
987
    }
988
 
9829 amar.kumar 989
    public void changeWarehouseForPO(long id, long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException
990
    {
991
      send_changeWarehouseForPO(id, warehouseId);
992
      recv_changeWarehouseForPO();
993
    }
994
 
995
    public void send_changeWarehouseForPO(long id, long warehouseId) throws org.apache.thrift.TException
996
    {
997
      changeWarehouseForPO_args args = new changeWarehouseForPO_args();
998
      args.setId(id);
999
      args.setWarehouseId(warehouseId);
1000
      sendBase("changeWarehouseForPO", args);
1001
    }
1002
 
1003
    public void recv_changeWarehouseForPO() throws PurchaseServiceException, org.apache.thrift.TException
1004
    {
1005
      changeWarehouseForPO_result result = new changeWarehouseForPO_result();
1006
      receiveBase(result, "changeWarehouseForPO");
1007
      if (result.e != null) {
1008
        throw result.e;
1009
      }
1010
      return;
1011
    }
1012
 
9925 amar.kumar 1013
    public void changePOStatus(long id, POStatus poStatus) throws PurchaseServiceException, org.apache.thrift.TException
1014
    {
1015
      send_changePOStatus(id, poStatus);
1016
      recv_changePOStatus();
1017
    }
1018
 
1019
    public void send_changePOStatus(long id, POStatus poStatus) throws org.apache.thrift.TException
1020
    {
1021
      changePOStatus_args args = new changePOStatus_args();
1022
      args.setId(id);
1023
      args.setPoStatus(poStatus);
1024
      sendBase("changePOStatus", args);
1025
    }
1026
 
1027
    public void recv_changePOStatus() throws PurchaseServiceException, org.apache.thrift.TException
1028
    {
1029
      changePOStatus_result result = new changePOStatus_result();
1030
      receiveBase(result, "changePOStatus");
1031
      if (result.e != null) {
1032
        throw result.e;
1033
      }
1034
      return;
1035
    }
1036
 
11751 manish.sha 1037
    public PurchaseReturn getPurchaseReturn(long id) throws PurchaseServiceException, org.apache.thrift.TException
1038
    {
1039
      send_getPurchaseReturn(id);
1040
      return recv_getPurchaseReturn();
1041
    }
1042
 
1043
    public void send_getPurchaseReturn(long id) throws org.apache.thrift.TException
1044
    {
1045
      getPurchaseReturn_args args = new getPurchaseReturn_args();
1046
      args.setId(id);
1047
      sendBase("getPurchaseReturn", args);
1048
    }
1049
 
1050
    public PurchaseReturn recv_getPurchaseReturn() throws PurchaseServiceException, org.apache.thrift.TException
1051
    {
1052
      getPurchaseReturn_result result = new getPurchaseReturn_result();
1053
      receiveBase(result, "getPurchaseReturn");
1054
      if (result.isSetSuccess()) {
1055
        return result.success;
1056
      }
1057
      if (result.e != null) {
1058
        throw result.e;
1059
      }
1060
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseReturn failed: unknown result");
1061
    }
1062
 
4496 mandeep.dh 1063
  }
1064
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
1065
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
1066
      private org.apache.thrift.async.TAsyncClientManager clientManager;
1067
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
1068
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
1069
        this.clientManager = clientManager;
1070
        this.protocolFactory = protocolFactory;
1071
      }
1072
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
1073
        return new AsyncClient(protocolFactory, clientManager, transport);
1074
      }
1075
    }
1076
 
1077
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
1078
      super(protocolFactory, clientManager, transport);
1079
    }
1080
 
1081
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1082
      checkReady();
1083
      createPurchaseOrder_call method_call = new createPurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
1084
      this.___currentMethod = method_call;
1085
      ___manager.call(method_call);
1086
    }
1087
 
1088
    public static class createPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1089
      private PurchaseOrder purchaseOrder;
1090
      public createPurchaseOrder_call(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<createPurchaseOrder_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 {
1091
        super(client, protocolFactory, transport, resultHandler, false);
1092
        this.purchaseOrder = purchaseOrder;
1093
      }
1094
 
1095
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1096
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1097
        createPurchaseOrder_args args = new createPurchaseOrder_args();
1098
        args.setPurchaseOrder(purchaseOrder);
1099
        args.write(prot);
1100
        prot.writeMessageEnd();
1101
      }
1102
 
1103
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1104
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1105
          throw new IllegalStateException("Method call not finished!");
1106
        }
1107
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1108
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1109
        return (new Client(prot)).recv_createPurchaseOrder();
1110
      }
1111
    }
1112
 
1113
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1114
      checkReady();
1115
      getPurchaseOrder_call method_call = new getPurchaseOrder_call(id, resultHandler, this, ___protocolFactory, ___transport);
1116
      this.___currentMethod = method_call;
1117
      ___manager.call(method_call);
1118
    }
1119
 
1120
    public static class getPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1121
      private long id;
1122
      public getPurchaseOrder_call(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrder_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 {
1123
        super(client, protocolFactory, transport, resultHandler, false);
1124
        this.id = id;
1125
      }
1126
 
1127
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1128
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1129
        getPurchaseOrder_args args = new getPurchaseOrder_args();
1130
        args.setId(id);
1131
        args.write(prot);
1132
        prot.writeMessageEnd();
1133
      }
1134
 
1135
      public PurchaseOrder getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1136
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1137
          throw new IllegalStateException("Method call not finished!");
1138
        }
1139
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1140
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1141
        return (new Client(prot)).recv_getPurchaseOrder();
1142
      }
1143
    }
1144
 
1145
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
1146
      checkReady();
1147
      getAllPurchaseOrders_call method_call = new getAllPurchaseOrders_call(status, resultHandler, this, ___protocolFactory, ___transport);
1148
      this.___currentMethod = method_call;
1149
      ___manager.call(method_call);
1150
    }
1151
 
1152
    public static class getAllPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
1153
      private POStatus status;
1154
      public getAllPurchaseOrders_call(POStatus status, org.apache.thrift.async.AsyncMethodCallback<getAllPurchaseOrders_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 {
1155
        super(client, protocolFactory, transport, resultHandler, false);
1156
        this.status = status;
1157
      }
1158
 
1159
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1160
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
1161
        getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
1162
        args.setStatus(status);
1163
        args.write(prot);
1164
        prot.writeMessageEnd();
1165
      }
1166
 
1167
      public List<PurchaseOrder> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1168
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1169
          throw new IllegalStateException("Method call not finished!");
1170
        }
1171
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1172
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1173
        return (new Client(prot)).recv_getAllPurchaseOrders();
1174
      }
1175
    }
1176
 
1177
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<getSupplier_call> resultHandler) throws org.apache.thrift.TException {
1178
      checkReady();
1179
      getSupplier_call method_call = new getSupplier_call(id, resultHandler, this, ___protocolFactory, ___transport);
1180
      this.___currentMethod = method_call;
1181
      ___manager.call(method_call);
1182
    }
1183
 
1184
    public static class getSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1185
      private long id;
1186
      public getSupplier_call(long id, org.apache.thrift.async.AsyncMethodCallback<getSupplier_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 {
1187
        super(client, protocolFactory, transport, resultHandler, false);
1188
        this.id = id;
1189
      }
1190
 
1191
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1192
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1193
        getSupplier_args args = new getSupplier_args();
1194
        args.setId(id);
1195
        args.write(prot);
1196
        prot.writeMessageEnd();
1197
      }
1198
 
1199
      public Supplier getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1200
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1201
          throw new IllegalStateException("Method call not finished!");
1202
        }
1203
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1204
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1205
        return (new Client(prot)).recv_getSupplier();
1206
      }
1207
    }
1208
 
1209
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, org.apache.thrift.async.AsyncMethodCallback<startPurchase_call> resultHandler) throws org.apache.thrift.TException {
1210
      checkReady();
1211
      startPurchase_call method_call = new startPurchase_call(purchaseOrderId, invoiceNumber, freightCharges, resultHandler, this, ___protocolFactory, ___transport);
1212
      this.___currentMethod = method_call;
1213
      ___manager.call(method_call);
1214
    }
1215
 
1216
    public static class startPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
1217
      private long purchaseOrderId;
1218
      private String invoiceNumber;
1219
      private double freightCharges;
1220
      public startPurchase_call(long purchaseOrderId, String invoiceNumber, double freightCharges, org.apache.thrift.async.AsyncMethodCallback<startPurchase_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 {
1221
        super(client, protocolFactory, transport, resultHandler, false);
1222
        this.purchaseOrderId = purchaseOrderId;
1223
        this.invoiceNumber = invoiceNumber;
1224
        this.freightCharges = freightCharges;
1225
      }
1226
 
1227
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1228
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1229
        startPurchase_args args = new startPurchase_args();
1230
        args.setPurchaseOrderId(purchaseOrderId);
1231
        args.setInvoiceNumber(invoiceNumber);
1232
        args.setFreightCharges(freightCharges);
1233
        args.write(prot);
1234
        prot.writeMessageEnd();
1235
      }
1236
 
1237
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1238
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1239
          throw new IllegalStateException("Method call not finished!");
1240
        }
1241
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1242
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1243
        return (new Client(prot)).recv_startPurchase();
1244
      }
1245
    }
1246
 
1247
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<closePurchase_call> resultHandler) throws org.apache.thrift.TException {
1248
      checkReady();
1249
      closePurchase_call method_call = new closePurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
1250
      this.___currentMethod = method_call;
1251
      ___manager.call(method_call);
1252
    }
1253
 
1254
    public static class closePurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
1255
      private long purchaseId;
1256
      public closePurchase_call(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<closePurchase_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 {
1257
        super(client, protocolFactory, transport, resultHandler, false);
1258
        this.purchaseId = purchaseId;
1259
      }
1260
 
1261
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1262
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closePurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1263
        closePurchase_args args = new closePurchase_args();
1264
        args.setPurchaseId(purchaseId);
1265
        args.write(prot);
1266
        prot.writeMessageEnd();
1267
      }
1268
 
1269
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1270
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1271
          throw new IllegalStateException("Method call not finished!");
1272
        }
1273
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1274
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1275
        return (new Client(prot)).recv_closePurchase();
1276
      }
1277
    }
1278
 
1279
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<getAllPurchases_call> resultHandler) throws org.apache.thrift.TException {
1280
      checkReady();
1281
      getAllPurchases_call method_call = new getAllPurchases_call(purchaseOrderId, open, resultHandler, this, ___protocolFactory, ___transport);
1282
      this.___currentMethod = method_call;
1283
      ___manager.call(method_call);
1284
    }
1285
 
1286
    public static class getAllPurchases_call extends org.apache.thrift.async.TAsyncMethodCall {
1287
      private long purchaseOrderId;
1288
      private boolean open;
1289
      public getAllPurchases_call(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<getAllPurchases_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 {
1290
        super(client, protocolFactory, transport, resultHandler, false);
1291
        this.purchaseOrderId = purchaseOrderId;
1292
        this.open = open;
1293
      }
1294
 
1295
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1296
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPurchases", org.apache.thrift.protocol.TMessageType.CALL, 0));
1297
        getAllPurchases_args args = new getAllPurchases_args();
1298
        args.setPurchaseOrderId(purchaseOrderId);
1299
        args.setOpen(open);
1300
        args.write(prot);
1301
        prot.writeMessageEnd();
1302
      }
1303
 
1304
      public List<Purchase> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1305
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1306
          throw new IllegalStateException("Method call not finished!");
1307
        }
1308
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1309
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1310
        return (new Client(prot)).recv_getAllPurchases();
1311
      }
1312
    }
1313
 
6385 amar.kumar 1314
    public void getPurchasesForPO(long purchaseOrderId, org.apache.thrift.async.AsyncMethodCallback<getPurchasesForPO_call> resultHandler) throws org.apache.thrift.TException {
1315
      checkReady();
1316
      getPurchasesForPO_call method_call = new getPurchasesForPO_call(purchaseOrderId, resultHandler, this, ___protocolFactory, ___transport);
1317
      this.___currentMethod = method_call;
1318
      ___manager.call(method_call);
1319
    }
1320
 
1321
    public static class getPurchasesForPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1322
      private long purchaseOrderId;
1323
      public getPurchasesForPO_call(long purchaseOrderId, org.apache.thrift.async.AsyncMethodCallback<getPurchasesForPO_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 {
1324
        super(client, protocolFactory, transport, resultHandler, false);
1325
        this.purchaseOrderId = purchaseOrderId;
1326
      }
1327
 
1328
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1329
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchasesForPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1330
        getPurchasesForPO_args args = new getPurchasesForPO_args();
1331
        args.setPurchaseOrderId(purchaseOrderId);
1332
        args.write(prot);
1333
        prot.writeMessageEnd();
1334
      }
1335
 
1336
      public List<Purchase> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1337
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1338
          throw new IllegalStateException("Method call not finished!");
1339
        }
1340
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1341
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1342
        return (new Client(prot)).recv_getPurchasesForPO();
1343
      }
1344
    }
1345
 
4555 mandeep.dh 1346
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException {
4496 mandeep.dh 1347
      checkReady();
4555 mandeep.dh 1348
      getPurchaseOrderForPurchase_call method_call = new getPurchaseOrderForPurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 1349
      this.___currentMethod = method_call;
1350
      ___manager.call(method_call);
1351
    }
1352
 
4555 mandeep.dh 1353
    public static class getPurchaseOrderForPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
4496 mandeep.dh 1354
      private long purchaseId;
4555 mandeep.dh 1355
      public getPurchaseOrderForPurchase_call(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrderForPurchase_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
4496 mandeep.dh 1356
        super(client, protocolFactory, transport, resultHandler, false);
1357
        this.purchaseId = purchaseId;
1358
      }
1359
 
1360
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4555 mandeep.dh 1361
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrderForPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1362
        getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 1363
        args.setPurchaseId(purchaseId);
1364
        args.write(prot);
1365
        prot.writeMessageEnd();
1366
      }
1367
 
4555 mandeep.dh 1368
      public PurchaseOrder getResult() throws org.apache.thrift.TException {
4496 mandeep.dh 1369
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1370
          throw new IllegalStateException("Method call not finished!");
1371
        }
1372
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1373
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4555 mandeep.dh 1374
        return (new Client(prot)).recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 1375
      }
1376
    }
1377
 
4754 mandeep.dh 1378
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
1379
      checkReady();
1380
      getPendingPurchaseOrders_call method_call = new getPendingPurchaseOrders_call(warehouseId, resultHandler, this, ___protocolFactory, ___transport);
1381
      this.___currentMethod = method_call;
1382
      ___manager.call(method_call);
1383
    }
1384
 
1385
    public static class getPendingPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
1386
      private long warehouseId;
1387
      public getPendingPurchaseOrders_call(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<getPendingPurchaseOrders_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 {
1388
        super(client, protocolFactory, transport, resultHandler, false);
1389
        this.warehouseId = warehouseId;
1390
      }
1391
 
1392
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1393
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPendingPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
1394
        getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
1395
        args.setWarehouseId(warehouseId);
1396
        args.write(prot);
1397
        prot.writeMessageEnd();
1398
      }
1399
 
1400
      public List<PurchaseOrder> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1401
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1402
          throw new IllegalStateException("Method call not finished!");
1403
        }
1404
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1405
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1406
        return (new Client(prot)).recv_getPendingPurchaseOrders();
1407
      }
1408
    }
1409
 
1410
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<getSuppliers_call> resultHandler) throws org.apache.thrift.TException {
1411
      checkReady();
1412
      getSuppliers_call method_call = new getSuppliers_call(resultHandler, this, ___protocolFactory, ___transport);
1413
      this.___currentMethod = method_call;
1414
      ___manager.call(method_call);
1415
    }
1416
 
1417
    public static class getSuppliers_call extends org.apache.thrift.async.TAsyncMethodCall {
1418
      public getSuppliers_call(org.apache.thrift.async.AsyncMethodCallback<getSuppliers_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 {
1419
        super(client, protocolFactory, transport, resultHandler, false);
1420
      }
1421
 
1422
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1423
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSuppliers", org.apache.thrift.protocol.TMessageType.CALL, 0));
1424
        getSuppliers_args args = new getSuppliers_args();
1425
        args.write(prot);
1426
        prot.writeMessageEnd();
1427
      }
1428
 
1429
      public List<Supplier> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1430
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1431
          throw new IllegalStateException("Method call not finished!");
1432
        }
1433
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1434
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1435
        return (new Client(prot)).recv_getSuppliers();
1436
      }
1437
    }
1438
 
1439
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPO_call> resultHandler) throws org.apache.thrift.TException {
1440
      checkReady();
1441
      fulfillPO_call method_call = new fulfillPO_call(purchaseOrderId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1442
      this.___currentMethod = method_call;
1443
      ___manager.call(method_call);
1444
    }
1445
 
1446
    public static class fulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1447
      private long purchaseOrderId;
1448
      private long itemId;
1449
      private long quantity;
1450
      public fulfillPO_call(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPO_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 {
1451
        super(client, protocolFactory, transport, resultHandler, false);
1452
        this.purchaseOrderId = purchaseOrderId;
1453
        this.itemId = itemId;
1454
        this.quantity = quantity;
1455
      }
1456
 
1457
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1458
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1459
        fulfillPO_args args = new fulfillPO_args();
1460
        args.setPurchaseOrderId(purchaseOrderId);
1461
        args.setItemId(itemId);
1462
        args.setQuantity(quantity);
1463
        args.write(prot);
1464
        prot.writeMessageEnd();
1465
      }
1466
 
1467
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1468
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1469
          throw new IllegalStateException("Method call not finished!");
1470
        }
1471
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1472
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1473
        (new Client(prot)).recv_fulfillPO();
1474
      }
1475
    }
1476
 
1477
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1478
      checkReady();
1479
      updatePurchaseOrder_call method_call = new updatePurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
1480
      this.___currentMethod = method_call;
1481
      ___manager.call(method_call);
1482
    }
1483
 
1484
    public static class updatePurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1485
      private PurchaseOrder purchaseOrder;
1486
      public updatePurchaseOrder_call(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<updatePurchaseOrder_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 {
1487
        super(client, protocolFactory, transport, resultHandler, false);
1488
        this.purchaseOrder = purchaseOrder;
1489
      }
1490
 
1491
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1492
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updatePurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1493
        updatePurchaseOrder_args args = new updatePurchaseOrder_args();
1494
        args.setPurchaseOrder(purchaseOrder);
1495
        args.write(prot);
1496
        prot.writeMessageEnd();
1497
      }
1498
 
1499
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1500
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1501
          throw new IllegalStateException("Method call not finished!");
1502
        }
1503
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1504
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1505
        (new Client(prot)).recv_updatePurchaseOrder();
1506
      }
1507
    }
1508
 
5185 mandeep.dh 1509
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<unFulfillPO_call> resultHandler) throws org.apache.thrift.TException {
1510
      checkReady();
1511
      unFulfillPO_call method_call = new unFulfillPO_call(purchaseId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1512
      this.___currentMethod = method_call;
1513
      ___manager.call(method_call);
1514
    }
1515
 
1516
    public static class unFulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1517
      private long purchaseId;
1518
      private long itemId;
1519
      private long quantity;
1520
      public unFulfillPO_call(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<unFulfillPO_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 {
1521
        super(client, protocolFactory, transport, resultHandler, false);
1522
        this.purchaseId = purchaseId;
1523
        this.itemId = itemId;
1524
        this.quantity = quantity;
1525
      }
1526
 
1527
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1528
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unFulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1529
        unFulfillPO_args args = new unFulfillPO_args();
1530
        args.setPurchaseId(purchaseId);
1531
        args.setItemId(itemId);
1532
        args.setQuantity(quantity);
1533
        args.write(prot);
1534
        prot.writeMessageEnd();
1535
      }
1536
 
1537
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1538
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1539
          throw new IllegalStateException("Method call not finished!");
1540
        }
1541
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1542
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1543
        (new Client(prot)).recv_unFulfillPO();
1544
      }
1545
    }
1546
 
5443 mandeep.dh 1547
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<getInvoices_call> resultHandler) throws org.apache.thrift.TException {
1548
      checkReady();
1549
      getInvoices_call method_call = new getInvoices_call(date, resultHandler, this, ___protocolFactory, ___transport);
1550
      this.___currentMethod = method_call;
1551
      ___manager.call(method_call);
1552
    }
1553
 
1554
    public static class getInvoices_call extends org.apache.thrift.async.TAsyncMethodCall {
1555
      private long date;
1556
      public getInvoices_call(long date, org.apache.thrift.async.AsyncMethodCallback<getInvoices_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 {
1557
        super(client, protocolFactory, transport, resultHandler, false);
1558
        this.date = date;
1559
      }
1560
 
1561
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1562
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoices", org.apache.thrift.protocol.TMessageType.CALL, 0));
1563
        getInvoices_args args = new getInvoices_args();
1564
        args.setDate(date);
1565
        args.write(prot);
1566
        prot.writeMessageEnd();
1567
      }
1568
 
1569
      public List<Invoice> getResult() throws org.apache.thrift.TException {
1570
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1571
          throw new IllegalStateException("Method call not finished!");
1572
        }
1573
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1574
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1575
        return (new Client(prot)).recv_getInvoices();
1576
      }
1577
    }
1578
 
7410 amar.kumar 1579
    public void getInvoicesForWarehouse(long warehouseId, long supplierId, long date, org.apache.thrift.async.AsyncMethodCallback<getInvoicesForWarehouse_call> resultHandler) throws org.apache.thrift.TException {
1580
      checkReady();
1581
      getInvoicesForWarehouse_call method_call = new getInvoicesForWarehouse_call(warehouseId, supplierId, date, resultHandler, this, ___protocolFactory, ___transport);
1582
      this.___currentMethod = method_call;
1583
      ___manager.call(method_call);
1584
    }
1585
 
1586
    public static class getInvoicesForWarehouse_call extends org.apache.thrift.async.TAsyncMethodCall {
1587
      private long warehouseId;
1588
      private long supplierId;
1589
      private long date;
1590
      public getInvoicesForWarehouse_call(long warehouseId, long supplierId, long date, org.apache.thrift.async.AsyncMethodCallback<getInvoicesForWarehouse_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 {
1591
        super(client, protocolFactory, transport, resultHandler, false);
1592
        this.warehouseId = warehouseId;
1593
        this.supplierId = supplierId;
1594
        this.date = date;
1595
      }
1596
 
1597
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1598
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoicesForWarehouse", org.apache.thrift.protocol.TMessageType.CALL, 0));
1599
        getInvoicesForWarehouse_args args = new getInvoicesForWarehouse_args();
1600
        args.setWarehouseId(warehouseId);
1601
        args.setSupplierId(supplierId);
1602
        args.setDate(date);
1603
        args.write(prot);
1604
        prot.writeMessageEnd();
1605
      }
1606
 
1607
      public List<Invoice> getResult() throws org.apache.thrift.TException {
1608
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1609
          throw new IllegalStateException("Method call not finished!");
1610
        }
1611
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1612
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1613
        return (new Client(prot)).recv_getInvoicesForWarehouse();
1614
      }
1615
    }
1616
 
5443 mandeep.dh 1617
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<createInvoice_call> resultHandler) throws org.apache.thrift.TException {
1618
      checkReady();
1619
      createInvoice_call method_call = new createInvoice_call(invoice, resultHandler, this, ___protocolFactory, ___transport);
1620
      this.___currentMethod = method_call;
1621
      ___manager.call(method_call);
1622
    }
1623
 
1624
    public static class createInvoice_call extends org.apache.thrift.async.TAsyncMethodCall {
1625
      private Invoice invoice;
1626
      public createInvoice_call(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<createInvoice_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 {
1627
        super(client, protocolFactory, transport, resultHandler, false);
1628
        this.invoice = invoice;
1629
      }
1630
 
1631
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1632
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createInvoice", org.apache.thrift.protocol.TMessageType.CALL, 0));
1633
        createInvoice_args args = new createInvoice_args();
1634
        args.setInvoice(invoice);
1635
        args.write(prot);
1636
        prot.writeMessageEnd();
1637
      }
1638
 
1639
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1640
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1641
          throw new IllegalStateException("Method call not finished!");
1642
        }
1643
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1644
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1645
        (new Client(prot)).recv_createInvoice();
1646
      }
1647
    }
1648
 
5591 mandeep.dh 1649
    public void addSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<addSupplier_call> resultHandler) throws org.apache.thrift.TException {
1650
      checkReady();
1651
      addSupplier_call method_call = new addSupplier_call(supplier, resultHandler, this, ___protocolFactory, ___transport);
1652
      this.___currentMethod = method_call;
1653
      ___manager.call(method_call);
1654
    }
1655
 
1656
    public static class addSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1657
      private Supplier supplier;
1658
      public addSupplier_call(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<addSupplier_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 {
1659
        super(client, protocolFactory, transport, resultHandler, false);
1660
        this.supplier = supplier;
1661
      }
1662
 
1663
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1664
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1665
        addSupplier_args args = new addSupplier_args();
1666
        args.setSupplier(supplier);
1667
        args.write(prot);
1668
        prot.writeMessageEnd();
1669
      }
1670
 
1671
      public Supplier getResult() throws org.apache.thrift.TException {
1672
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1673
          throw new IllegalStateException("Method call not finished!");
1674
        }
1675
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1676
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1677
        return (new Client(prot)).recv_addSupplier();
1678
      }
1679
    }
1680
 
1681
    public void updateSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<updateSupplier_call> resultHandler) throws org.apache.thrift.TException {
1682
      checkReady();
1683
      updateSupplier_call method_call = new updateSupplier_call(supplier, resultHandler, this, ___protocolFactory, ___transport);
1684
      this.___currentMethod = method_call;
1685
      ___manager.call(method_call);
1686
    }
1687
 
1688
    public static class updateSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1689
      private Supplier supplier;
1690
      public updateSupplier_call(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<updateSupplier_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 {
1691
        super(client, protocolFactory, transport, resultHandler, false);
1692
        this.supplier = supplier;
1693
      }
1694
 
1695
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1696
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1697
        updateSupplier_args args = new updateSupplier_args();
1698
        args.setSupplier(supplier);
1699
        args.write(prot);
1700
        prot.writeMessageEnd();
1701
      }
1702
 
1703
      public void getResult() throws org.apache.thrift.TException {
1704
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1705
          throw new IllegalStateException("Method call not finished!");
1706
        }
1707
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1708
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1709
        (new Client(prot)).recv_updateSupplier();
1710
      }
1711
    }
1712
 
6467 amar.kumar 1713
    public void createPurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<createPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1714
      checkReady();
1715
      createPurchaseReturn_call method_call = new createPurchaseReturn_call(purchaseReturn, resultHandler, this, ___protocolFactory, ___transport);
1716
      this.___currentMethod = method_call;
1717
      ___manager.call(method_call);
1718
    }
1719
 
1720
    public static class createPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1721
      private PurchaseReturn purchaseReturn;
1722
      public createPurchaseReturn_call(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<createPurchaseReturn_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 {
1723
        super(client, protocolFactory, transport, resultHandler, false);
1724
        this.purchaseReturn = purchaseReturn;
1725
      }
1726
 
1727
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1728
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1729
        createPurchaseReturn_args args = new createPurchaseReturn_args();
1730
        args.setPurchaseReturn(purchaseReturn);
1731
        args.write(prot);
1732
        prot.writeMessageEnd();
1733
      }
1734
 
1735
      public long getResult() throws org.apache.thrift.TException {
1736
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1737
          throw new IllegalStateException("Method call not finished!");
1738
        }
1739
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1740
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1741
        return (new Client(prot)).recv_createPurchaseReturn();
1742
      }
1743
    }
1744
 
1745
    public void settlePurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<settlePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1746
      checkReady();
1747
      settlePurchaseReturn_call method_call = new settlePurchaseReturn_call(id, resultHandler, this, ___protocolFactory, ___transport);
1748
      this.___currentMethod = method_call;
1749
      ___manager.call(method_call);
1750
    }
1751
 
1752
    public static class settlePurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1753
      private long id;
1754
      public settlePurchaseReturn_call(long id, org.apache.thrift.async.AsyncMethodCallback<settlePurchaseReturn_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 {
1755
        super(client, protocolFactory, transport, resultHandler, false);
1756
        this.id = id;
1757
      }
1758
 
1759
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1760
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("settlePurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1761
        settlePurchaseReturn_args args = new settlePurchaseReturn_args();
1762
        args.setId(id);
1763
        args.write(prot);
1764
        prot.writeMessageEnd();
1765
      }
1766
 
1767
      public void getResult() throws org.apache.thrift.TException {
1768
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1769
          throw new IllegalStateException("Method call not finished!");
1770
        }
1771
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1772
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1773
        (new Client(prot)).recv_settlePurchaseReturn();
1774
      }
1775
    }
1776
 
1777
    public void getUnsettledPurchaseReturns(org.apache.thrift.async.AsyncMethodCallback<getUnsettledPurchaseReturns_call> resultHandler) throws org.apache.thrift.TException {
1778
      checkReady();
1779
      getUnsettledPurchaseReturns_call method_call = new getUnsettledPurchaseReturns_call(resultHandler, this, ___protocolFactory, ___transport);
1780
      this.___currentMethod = method_call;
1781
      ___manager.call(method_call);
1782
    }
1783
 
1784
    public static class getUnsettledPurchaseReturns_call extends org.apache.thrift.async.TAsyncMethodCall {
1785
      public getUnsettledPurchaseReturns_call(org.apache.thrift.async.AsyncMethodCallback<getUnsettledPurchaseReturns_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 {
1786
        super(client, protocolFactory, transport, resultHandler, false);
1787
      }
1788
 
1789
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1790
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUnsettledPurchaseReturns", org.apache.thrift.protocol.TMessageType.CALL, 0));
1791
        getUnsettledPurchaseReturns_args args = new getUnsettledPurchaseReturns_args();
1792
        args.write(prot);
1793
        prot.writeMessageEnd();
1794
      }
1795
 
1796
      public List<PurchaseReturn> getResult() throws org.apache.thrift.TException {
1797
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1798
          throw new IllegalStateException("Method call not finished!");
1799
        }
1800
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1801
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1802
        return (new Client(prot)).recv_getUnsettledPurchaseReturns();
1803
      }
1804
    }
1805
 
6630 amar.kumar 1806
    public void getInvoice(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<getInvoice_call> resultHandler) throws org.apache.thrift.TException {
1807
      checkReady();
1808
      getInvoice_call method_call = new getInvoice_call(invoiceNumber, supplierId, resultHandler, this, ___protocolFactory, ___transport);
1809
      this.___currentMethod = method_call;
1810
      ___manager.call(method_call);
1811
    }
1812
 
1813
    public static class getInvoice_call extends org.apache.thrift.async.TAsyncMethodCall {
1814
      private String invoiceNumber;
1815
      private long supplierId;
1816
      public getInvoice_call(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<getInvoice_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 {
1817
        super(client, protocolFactory, transport, resultHandler, false);
1818
        this.invoiceNumber = invoiceNumber;
1819
        this.supplierId = supplierId;
1820
      }
1821
 
1822
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1823
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoice", org.apache.thrift.protocol.TMessageType.CALL, 0));
1824
        getInvoice_args args = new getInvoice_args();
1825
        args.setInvoiceNumber(invoiceNumber);
1826
        args.setSupplierId(supplierId);
1827
        args.write(prot);
1828
        prot.writeMessageEnd();
1829
      }
1830
 
1831
      public List<PurchaseReturn> getResult() throws org.apache.thrift.TException {
1832
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1833
          throw new IllegalStateException("Method call not finished!");
1834
        }
1835
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1836
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1837
        return (new Client(prot)).recv_getInvoice();
1838
      }
1839
    }
1840
 
7672 rajveer 1841
    public void createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId, org.apache.thrift.async.AsyncMethodCallback<createPurchaseForOurExtBilling_call> resultHandler) throws org.apache.thrift.TException {
6762 amar.kumar 1842
      checkReady();
7672 rajveer 1843
      createPurchaseForOurExtBilling_call method_call = new createPurchaseForOurExtBilling_call(invoiceNumber, unitPrice, nlc, itemId, resultHandler, this, ___protocolFactory, ___transport);
6762 amar.kumar 1844
      this.___currentMethod = method_call;
1845
      ___manager.call(method_call);
1846
    }
1847
 
1848
    public static class createPurchaseForOurExtBilling_call extends org.apache.thrift.async.TAsyncMethodCall {
1849
      private String invoiceNumber;
1850
      private double unitPrice;
7672 rajveer 1851
      private double nlc;
6762 amar.kumar 1852
      private long itemId;
7672 rajveer 1853
      public createPurchaseForOurExtBilling_call(String invoiceNumber, double unitPrice, double nlc, long itemId, org.apache.thrift.async.AsyncMethodCallback<createPurchaseForOurExtBilling_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 {
6762 amar.kumar 1854
        super(client, protocolFactory, transport, resultHandler, false);
1855
        this.invoiceNumber = invoiceNumber;
1856
        this.unitPrice = unitPrice;
7672 rajveer 1857
        this.nlc = nlc;
6762 amar.kumar 1858
        this.itemId = itemId;
1859
      }
1860
 
1861
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1862
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseForOurExtBilling", org.apache.thrift.protocol.TMessageType.CALL, 0));
1863
        createPurchaseForOurExtBilling_args args = new createPurchaseForOurExtBilling_args();
1864
        args.setInvoiceNumber(invoiceNumber);
1865
        args.setUnitPrice(unitPrice);
7672 rajveer 1866
        args.setNlc(nlc);
6762 amar.kumar 1867
        args.setItemId(itemId);
1868
        args.write(prot);
1869
        prot.writeMessageEnd();
1870
      }
1871
 
1872
      public long getResult() throws org.apache.thrift.TException {
1873
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1874
          throw new IllegalStateException("Method call not finished!");
1875
        }
1876
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1877
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1878
        return (new Client(prot)).recv_createPurchaseForOurExtBilling();
1879
      }
1880
    }
1881
 
1882
    public void fulfillPOForExtBilling(long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPOForExtBilling_call> resultHandler) throws org.apache.thrift.TException {
1883
      checkReady();
1884
      fulfillPOForExtBilling_call method_call = new fulfillPOForExtBilling_call(itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1885
      this.___currentMethod = method_call;
1886
      ___manager.call(method_call);
1887
    }
1888
 
1889
    public static class fulfillPOForExtBilling_call extends org.apache.thrift.async.TAsyncMethodCall {
1890
      private long itemId;
1891
      private long quantity;
1892
      public fulfillPOForExtBilling_call(long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPOForExtBilling_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 {
1893
        super(client, protocolFactory, transport, resultHandler, false);
1894
        this.itemId = itemId;
1895
        this.quantity = quantity;
1896
      }
1897
 
1898
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1899
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fulfillPOForExtBilling", org.apache.thrift.protocol.TMessageType.CALL, 0));
1900
        fulfillPOForExtBilling_args args = new fulfillPOForExtBilling_args();
1901
        args.setItemId(itemId);
1902
        args.setQuantity(quantity);
1903
        args.write(prot);
1904
        prot.writeMessageEnd();
1905
      }
1906
 
1907
      public void getResult() throws org.apache.thrift.TException {
1908
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1909
          throw new IllegalStateException("Method call not finished!");
1910
        }
1911
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1912
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1913
        (new Client(prot)).recv_fulfillPOForExtBilling();
1914
      }
1915
    }
1916
 
7410 amar.kumar 1917
    public void closePO(long poId, org.apache.thrift.async.AsyncMethodCallback<closePO_call> resultHandler) throws org.apache.thrift.TException {
1918
      checkReady();
1919
      closePO_call method_call = new closePO_call(poId, resultHandler, this, ___protocolFactory, ___transport);
1920
      this.___currentMethod = method_call;
1921
      ___manager.call(method_call);
1922
    }
1923
 
1924
    public static class closePO_call extends org.apache.thrift.async.TAsyncMethodCall {
1925
      private long poId;
1926
      public closePO_call(long poId, org.apache.thrift.async.AsyncMethodCallback<closePO_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 {
1927
        super(client, protocolFactory, transport, resultHandler, false);
1928
        this.poId = poId;
1929
      }
1930
 
1931
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1932
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closePO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1933
        closePO_args args = new closePO_args();
1934
        args.setPoId(poId);
1935
        args.write(prot);
1936
        prot.writeMessageEnd();
1937
      }
1938
 
1939
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1940
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1941
          throw new IllegalStateException("Method call not finished!");
1942
        }
1943
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1944
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1945
        (new Client(prot)).recv_closePO();
1946
      }
1947
    }
1948
 
1949
    public void isInvoiceReceived(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<isInvoiceReceived_call> resultHandler) throws org.apache.thrift.TException {
1950
      checkReady();
1951
      isInvoiceReceived_call method_call = new isInvoiceReceived_call(invoiceNumber, supplierId, resultHandler, this, ___protocolFactory, ___transport);
1952
      this.___currentMethod = method_call;
1953
      ___manager.call(method_call);
1954
    }
1955
 
1956
    public static class isInvoiceReceived_call extends org.apache.thrift.async.TAsyncMethodCall {
1957
      private String invoiceNumber;
1958
      private long supplierId;
1959
      public isInvoiceReceived_call(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<isInvoiceReceived_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 {
1960
        super(client, protocolFactory, transport, resultHandler, false);
1961
        this.invoiceNumber = invoiceNumber;
1962
        this.supplierId = supplierId;
1963
      }
1964
 
1965
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1966
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isInvoiceReceived", org.apache.thrift.protocol.TMessageType.CALL, 0));
1967
        isInvoiceReceived_args args = new isInvoiceReceived_args();
1968
        args.setInvoiceNumber(invoiceNumber);
1969
        args.setSupplierId(supplierId);
1970
        args.write(prot);
1971
        prot.writeMessageEnd();
1972
      }
1973
 
1974
      public boolean getResult() throws org.apache.thrift.TException {
1975
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1976
          throw new IllegalStateException("Method call not finished!");
1977
        }
1978
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1979
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1980
        return (new Client(prot)).recv_isInvoiceReceived();
1981
      }
1982
    }
1983
 
9829 amar.kumar 1984
    public void changeWarehouseForPO(long id, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<changeWarehouseForPO_call> resultHandler) throws org.apache.thrift.TException {
1985
      checkReady();
1986
      changeWarehouseForPO_call method_call = new changeWarehouseForPO_call(id, warehouseId, resultHandler, this, ___protocolFactory, ___transport);
1987
      this.___currentMethod = method_call;
1988
      ___manager.call(method_call);
1989
    }
1990
 
1991
    public static class changeWarehouseForPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1992
      private long id;
1993
      private long warehouseId;
1994
      public changeWarehouseForPO_call(long id, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<changeWarehouseForPO_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 {
1995
        super(client, protocolFactory, transport, resultHandler, false);
1996
        this.id = id;
1997
        this.warehouseId = warehouseId;
1998
      }
1999
 
2000
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2001
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("changeWarehouseForPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
2002
        changeWarehouseForPO_args args = new changeWarehouseForPO_args();
2003
        args.setId(id);
2004
        args.setWarehouseId(warehouseId);
2005
        args.write(prot);
2006
        prot.writeMessageEnd();
2007
      }
2008
 
2009
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2010
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2011
          throw new IllegalStateException("Method call not finished!");
2012
        }
2013
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2014
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2015
        (new Client(prot)).recv_changeWarehouseForPO();
2016
      }
2017
    }
2018
 
9925 amar.kumar 2019
    public void changePOStatus(long id, POStatus poStatus, org.apache.thrift.async.AsyncMethodCallback<changePOStatus_call> resultHandler) throws org.apache.thrift.TException {
2020
      checkReady();
2021
      changePOStatus_call method_call = new changePOStatus_call(id, poStatus, resultHandler, this, ___protocolFactory, ___transport);
2022
      this.___currentMethod = method_call;
2023
      ___manager.call(method_call);
2024
    }
2025
 
2026
    public static class changePOStatus_call extends org.apache.thrift.async.TAsyncMethodCall {
2027
      private long id;
2028
      private POStatus poStatus;
2029
      public changePOStatus_call(long id, POStatus poStatus, org.apache.thrift.async.AsyncMethodCallback<changePOStatus_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 {
2030
        super(client, protocolFactory, transport, resultHandler, false);
2031
        this.id = id;
2032
        this.poStatus = poStatus;
2033
      }
2034
 
2035
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2036
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("changePOStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
2037
        changePOStatus_args args = new changePOStatus_args();
2038
        args.setId(id);
2039
        args.setPoStatus(poStatus);
2040
        args.write(prot);
2041
        prot.writeMessageEnd();
2042
      }
2043
 
2044
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2045
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2046
          throw new IllegalStateException("Method call not finished!");
2047
        }
2048
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2049
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2050
        (new Client(prot)).recv_changePOStatus();
2051
      }
2052
    }
2053
 
11751 manish.sha 2054
    public void getPurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
2055
      checkReady();
2056
      getPurchaseReturn_call method_call = new getPurchaseReturn_call(id, resultHandler, this, ___protocolFactory, ___transport);
2057
      this.___currentMethod = method_call;
2058
      ___manager.call(method_call);
2059
    }
2060
 
2061
    public static class getPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
2062
      private long id;
2063
      public getPurchaseReturn_call(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseReturn_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 {
2064
        super(client, protocolFactory, transport, resultHandler, false);
2065
        this.id = id;
2066
      }
2067
 
2068
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2069
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
2070
        getPurchaseReturn_args args = new getPurchaseReturn_args();
2071
        args.setId(id);
2072
        args.write(prot);
2073
        prot.writeMessageEnd();
2074
      }
2075
 
2076
      public PurchaseReturn getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2077
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2078
          throw new IllegalStateException("Method call not finished!");
2079
        }
2080
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2081
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2082
        return (new Client(prot)).recv_getPurchaseReturn();
2083
      }
2084
    }
2085
 
4496 mandeep.dh 2086
  }
2087
 
2088
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
2089
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
2090
    public Processor(I iface) {
2091
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
2092
    }
2093
 
2094
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
2095
      super(iface, getProcessMap(processMap));
2096
    }
2097
 
2098
    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) {
2099
      processMap.put("createPurchaseOrder", new createPurchaseOrder());
2100
      processMap.put("getPurchaseOrder", new getPurchaseOrder());
2101
      processMap.put("getAllPurchaseOrders", new getAllPurchaseOrders());
2102
      processMap.put("getSupplier", new getSupplier());
2103
      processMap.put("startPurchase", new startPurchase());
2104
      processMap.put("closePurchase", new closePurchase());
2105
      processMap.put("getAllPurchases", new getAllPurchases());
6385 amar.kumar 2106
      processMap.put("getPurchasesForPO", new getPurchasesForPO());
4555 mandeep.dh 2107
      processMap.put("getPurchaseOrderForPurchase", new getPurchaseOrderForPurchase());
4754 mandeep.dh 2108
      processMap.put("getPendingPurchaseOrders", new getPendingPurchaseOrders());
2109
      processMap.put("getSuppliers", new getSuppliers());
2110
      processMap.put("fulfillPO", new fulfillPO());
2111
      processMap.put("updatePurchaseOrder", new updatePurchaseOrder());
5185 mandeep.dh 2112
      processMap.put("unFulfillPO", new unFulfillPO());
5443 mandeep.dh 2113
      processMap.put("getInvoices", new getInvoices());
7410 amar.kumar 2114
      processMap.put("getInvoicesForWarehouse", new getInvoicesForWarehouse());
5443 mandeep.dh 2115
      processMap.put("createInvoice", new createInvoice());
5591 mandeep.dh 2116
      processMap.put("addSupplier", new addSupplier());
2117
      processMap.put("updateSupplier", new updateSupplier());
6467 amar.kumar 2118
      processMap.put("createPurchaseReturn", new createPurchaseReturn());
2119
      processMap.put("settlePurchaseReturn", new settlePurchaseReturn());
2120
      processMap.put("getUnsettledPurchaseReturns", new getUnsettledPurchaseReturns());
6630 amar.kumar 2121
      processMap.put("getInvoice", new getInvoice());
6762 amar.kumar 2122
      processMap.put("createPurchaseForOurExtBilling", new createPurchaseForOurExtBilling());
2123
      processMap.put("fulfillPOForExtBilling", new fulfillPOForExtBilling());
7410 amar.kumar 2124
      processMap.put("closePO", new closePO());
2125
      processMap.put("isInvoiceReceived", new isInvoiceReceived());
9829 amar.kumar 2126
      processMap.put("changeWarehouseForPO", new changeWarehouseForPO());
9925 amar.kumar 2127
      processMap.put("changePOStatus", new changePOStatus());
11751 manish.sha 2128
      processMap.put("getPurchaseReturn", new getPurchaseReturn());
4496 mandeep.dh 2129
      return processMap;
2130
    }
2131
 
2132
    private static class createPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseOrder_args> {
2133
      public createPurchaseOrder() {
2134
        super("createPurchaseOrder");
2135
      }
2136
 
2137
      protected createPurchaseOrder_args getEmptyArgsInstance() {
2138
        return new createPurchaseOrder_args();
2139
      }
2140
 
2141
      protected createPurchaseOrder_result getResult(I iface, createPurchaseOrder_args args) throws org.apache.thrift.TException {
2142
        createPurchaseOrder_result result = new createPurchaseOrder_result();
2143
        try {
2144
          result.success = iface.createPurchaseOrder(args.purchaseOrder);
2145
          result.setSuccessIsSet(true);
2146
        } catch (PurchaseServiceException e) {
2147
          result.e = e;
2148
        }
2149
        return result;
2150
      }
2151
    }
2152
 
2153
    private static class getPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrder_args> {
2154
      public getPurchaseOrder() {
2155
        super("getPurchaseOrder");
2156
      }
2157
 
2158
      protected getPurchaseOrder_args getEmptyArgsInstance() {
2159
        return new getPurchaseOrder_args();
2160
      }
2161
 
2162
      protected getPurchaseOrder_result getResult(I iface, getPurchaseOrder_args args) throws org.apache.thrift.TException {
2163
        getPurchaseOrder_result result = new getPurchaseOrder_result();
2164
        try {
2165
          result.success = iface.getPurchaseOrder(args.id);
2166
        } catch (PurchaseServiceException e) {
2167
          result.e = e;
2168
        }
2169
        return result;
2170
      }
2171
    }
2172
 
2173
    private static class getAllPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchaseOrders_args> {
2174
      public getAllPurchaseOrders() {
2175
        super("getAllPurchaseOrders");
2176
      }
2177
 
2178
      protected getAllPurchaseOrders_args getEmptyArgsInstance() {
2179
        return new getAllPurchaseOrders_args();
2180
      }
2181
 
2182
      protected getAllPurchaseOrders_result getResult(I iface, getAllPurchaseOrders_args args) throws org.apache.thrift.TException {
2183
        getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
2184
        try {
2185
          result.success = iface.getAllPurchaseOrders(args.status);
2186
        } catch (PurchaseServiceException e) {
2187
          result.e = e;
2188
        }
2189
        return result;
2190
      }
2191
    }
2192
 
2193
    private static class getSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSupplier_args> {
2194
      public getSupplier() {
2195
        super("getSupplier");
2196
      }
2197
 
2198
      protected getSupplier_args getEmptyArgsInstance() {
2199
        return new getSupplier_args();
2200
      }
2201
 
2202
      protected getSupplier_result getResult(I iface, getSupplier_args args) throws org.apache.thrift.TException {
2203
        getSupplier_result result = new getSupplier_result();
2204
        try {
2205
          result.success = iface.getSupplier(args.id);
2206
        } catch (PurchaseServiceException e) {
2207
          result.e = e;
2208
        }
2209
        return result;
2210
      }
2211
    }
2212
 
2213
    private static class startPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startPurchase_args> {
2214
      public startPurchase() {
2215
        super("startPurchase");
2216
      }
2217
 
2218
      protected startPurchase_args getEmptyArgsInstance() {
2219
        return new startPurchase_args();
2220
      }
2221
 
2222
      protected startPurchase_result getResult(I iface, startPurchase_args args) throws org.apache.thrift.TException {
2223
        startPurchase_result result = new startPurchase_result();
2224
        try {
2225
          result.success = iface.startPurchase(args.purchaseOrderId, args.invoiceNumber, args.freightCharges);
2226
          result.setSuccessIsSet(true);
2227
        } catch (PurchaseServiceException e) {
2228
          result.e = e;
2229
        }
2230
        return result;
2231
      }
2232
    }
2233
 
2234
    private static class closePurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closePurchase_args> {
2235
      public closePurchase() {
2236
        super("closePurchase");
2237
      }
2238
 
2239
      protected closePurchase_args getEmptyArgsInstance() {
2240
        return new closePurchase_args();
2241
      }
2242
 
2243
      protected closePurchase_result getResult(I iface, closePurchase_args args) throws org.apache.thrift.TException {
2244
        closePurchase_result result = new closePurchase_result();
2245
        try {
2246
          result.success = iface.closePurchase(args.purchaseId);
2247
          result.setSuccessIsSet(true);
2248
        } catch (PurchaseServiceException e) {
2249
          result.e = e;
2250
        }
2251
        return result;
2252
      }
2253
    }
2254
 
2255
    private static class getAllPurchases<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchases_args> {
2256
      public getAllPurchases() {
2257
        super("getAllPurchases");
2258
      }
2259
 
2260
      protected getAllPurchases_args getEmptyArgsInstance() {
2261
        return new getAllPurchases_args();
2262
      }
2263
 
2264
      protected getAllPurchases_result getResult(I iface, getAllPurchases_args args) throws org.apache.thrift.TException {
2265
        getAllPurchases_result result = new getAllPurchases_result();
2266
        try {
2267
          result.success = iface.getAllPurchases(args.purchaseOrderId, args.open);
2268
        } catch (PurchaseServiceException e) {
2269
          result.e = e;
2270
        }
2271
        return result;
2272
      }
2273
    }
2274
 
6385 amar.kumar 2275
    private static class getPurchasesForPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchasesForPO_args> {
2276
      public getPurchasesForPO() {
2277
        super("getPurchasesForPO");
2278
      }
2279
 
2280
      protected getPurchasesForPO_args getEmptyArgsInstance() {
2281
        return new getPurchasesForPO_args();
2282
      }
2283
 
2284
      protected getPurchasesForPO_result getResult(I iface, getPurchasesForPO_args args) throws org.apache.thrift.TException {
2285
        getPurchasesForPO_result result = new getPurchasesForPO_result();
2286
        try {
2287
          result.success = iface.getPurchasesForPO(args.purchaseOrderId);
2288
        } catch (PurchaseServiceException e) {
2289
          result.e = e;
2290
        }
2291
        return result;
2292
      }
2293
    }
2294
 
4555 mandeep.dh 2295
    private static class getPurchaseOrderForPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrderForPurchase_args> {
2296
      public getPurchaseOrderForPurchase() {
2297
        super("getPurchaseOrderForPurchase");
4496 mandeep.dh 2298
      }
2299
 
4555 mandeep.dh 2300
      protected getPurchaseOrderForPurchase_args getEmptyArgsInstance() {
2301
        return new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 2302
      }
2303
 
4555 mandeep.dh 2304
      protected getPurchaseOrderForPurchase_result getResult(I iface, getPurchaseOrderForPurchase_args args) throws org.apache.thrift.TException {
2305
        getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
2306
        result.success = iface.getPurchaseOrderForPurchase(args.purchaseId);
4496 mandeep.dh 2307
        return result;
2308
      }
2309
    }
2310
 
4754 mandeep.dh 2311
    private static class getPendingPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPendingPurchaseOrders_args> {
2312
      public getPendingPurchaseOrders() {
2313
        super("getPendingPurchaseOrders");
2314
      }
2315
 
2316
      protected getPendingPurchaseOrders_args getEmptyArgsInstance() {
2317
        return new getPendingPurchaseOrders_args();
2318
      }
2319
 
2320
      protected getPendingPurchaseOrders_result getResult(I iface, getPendingPurchaseOrders_args args) throws org.apache.thrift.TException {
2321
        getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
2322
        try {
2323
          result.success = iface.getPendingPurchaseOrders(args.warehouseId);
2324
        } catch (PurchaseServiceException e) {
2325
          result.e = e;
2326
        }
2327
        return result;
2328
      }
2329
    }
2330
 
2331
    private static class getSuppliers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSuppliers_args> {
2332
      public getSuppliers() {
2333
        super("getSuppliers");
2334
      }
2335
 
2336
      protected getSuppliers_args getEmptyArgsInstance() {
2337
        return new getSuppliers_args();
2338
      }
2339
 
2340
      protected getSuppliers_result getResult(I iface, getSuppliers_args args) throws org.apache.thrift.TException {
2341
        getSuppliers_result result = new getSuppliers_result();
2342
        try {
2343
          result.success = iface.getSuppliers();
2344
        } catch (PurchaseServiceException e) {
2345
          result.e = e;
2346
        }
2347
        return result;
2348
      }
2349
    }
2350
 
2351
    private static class fulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fulfillPO_args> {
2352
      public fulfillPO() {
2353
        super("fulfillPO");
2354
      }
2355
 
2356
      protected fulfillPO_args getEmptyArgsInstance() {
2357
        return new fulfillPO_args();
2358
      }
2359
 
2360
      protected fulfillPO_result getResult(I iface, fulfillPO_args args) throws org.apache.thrift.TException {
2361
        fulfillPO_result result = new fulfillPO_result();
2362
        try {
2363
          iface.fulfillPO(args.purchaseOrderId, args.itemId, args.quantity);
2364
        } catch (PurchaseServiceException e) {
2365
          result.e = e;
2366
        }
2367
        return result;
2368
      }
2369
    }
2370
 
2371
    private static class updatePurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updatePurchaseOrder_args> {
2372
      public updatePurchaseOrder() {
2373
        super("updatePurchaseOrder");
2374
      }
2375
 
2376
      protected updatePurchaseOrder_args getEmptyArgsInstance() {
2377
        return new updatePurchaseOrder_args();
2378
      }
2379
 
2380
      protected updatePurchaseOrder_result getResult(I iface, updatePurchaseOrder_args args) throws org.apache.thrift.TException {
2381
        updatePurchaseOrder_result result = new updatePurchaseOrder_result();
2382
        try {
2383
          iface.updatePurchaseOrder(args.purchaseOrder);
2384
        } catch (PurchaseServiceException e) {
2385
          result.e = e;
2386
        }
2387
        return result;
2388
      }
2389
    }
2390
 
5185 mandeep.dh 2391
    private static class unFulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, unFulfillPO_args> {
2392
      public unFulfillPO() {
2393
        super("unFulfillPO");
2394
      }
2395
 
2396
      protected unFulfillPO_args getEmptyArgsInstance() {
2397
        return new unFulfillPO_args();
2398
      }
2399
 
2400
      protected unFulfillPO_result getResult(I iface, unFulfillPO_args args) throws org.apache.thrift.TException {
2401
        unFulfillPO_result result = new unFulfillPO_result();
2402
        try {
2403
          iface.unFulfillPO(args.purchaseId, args.itemId, args.quantity);
2404
        } catch (PurchaseServiceException e) {
2405
          result.e = e;
2406
        }
2407
        return result;
2408
      }
2409
    }
2410
 
5443 mandeep.dh 2411
    private static class getInvoices<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoices_args> {
2412
      public getInvoices() {
2413
        super("getInvoices");
2414
      }
2415
 
2416
      protected getInvoices_args getEmptyArgsInstance() {
2417
        return new getInvoices_args();
2418
      }
2419
 
2420
      protected getInvoices_result getResult(I iface, getInvoices_args args) throws org.apache.thrift.TException {
2421
        getInvoices_result result = new getInvoices_result();
2422
        result.success = iface.getInvoices(args.date);
2423
        return result;
2424
      }
2425
    }
2426
 
7410 amar.kumar 2427
    private static class getInvoicesForWarehouse<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoicesForWarehouse_args> {
2428
      public getInvoicesForWarehouse() {
2429
        super("getInvoicesForWarehouse");
2430
      }
2431
 
2432
      protected getInvoicesForWarehouse_args getEmptyArgsInstance() {
2433
        return new getInvoicesForWarehouse_args();
2434
      }
2435
 
2436
      protected getInvoicesForWarehouse_result getResult(I iface, getInvoicesForWarehouse_args args) throws org.apache.thrift.TException {
2437
        getInvoicesForWarehouse_result result = new getInvoicesForWarehouse_result();
2438
        result.success = iface.getInvoicesForWarehouse(args.warehouseId, args.supplierId, args.date);
2439
        return result;
2440
      }
2441
    }
2442
 
5443 mandeep.dh 2443
    private static class createInvoice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createInvoice_args> {
2444
      public createInvoice() {
2445
        super("createInvoice");
2446
      }
2447
 
2448
      protected createInvoice_args getEmptyArgsInstance() {
2449
        return new createInvoice_args();
2450
      }
2451
 
2452
      protected createInvoice_result getResult(I iface, createInvoice_args args) throws org.apache.thrift.TException {
2453
        createInvoice_result result = new createInvoice_result();
2454
        try {
2455
          iface.createInvoice(args.invoice);
2456
        } catch (PurchaseServiceException e) {
2457
          result.e = e;
2458
        }
2459
        return result;
2460
      }
2461
    }
2462
 
5591 mandeep.dh 2463
    private static class addSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addSupplier_args> {
2464
      public addSupplier() {
2465
        super("addSupplier");
2466
      }
2467
 
2468
      protected addSupplier_args getEmptyArgsInstance() {
2469
        return new addSupplier_args();
2470
      }
2471
 
2472
      protected addSupplier_result getResult(I iface, addSupplier_args args) throws org.apache.thrift.TException {
2473
        addSupplier_result result = new addSupplier_result();
2474
        result.success = iface.addSupplier(args.supplier);
2475
        return result;
2476
      }
2477
    }
2478
 
2479
    private static class updateSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateSupplier_args> {
2480
      public updateSupplier() {
2481
        super("updateSupplier");
2482
      }
2483
 
2484
      protected updateSupplier_args getEmptyArgsInstance() {
2485
        return new updateSupplier_args();
2486
      }
2487
 
2488
      protected updateSupplier_result getResult(I iface, updateSupplier_args args) throws org.apache.thrift.TException {
2489
        updateSupplier_result result = new updateSupplier_result();
2490
        iface.updateSupplier(args.supplier);
2491
        return result;
2492
      }
2493
    }
2494
 
6467 amar.kumar 2495
    private static class createPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseReturn_args> {
2496
      public createPurchaseReturn() {
2497
        super("createPurchaseReturn");
2498
      }
2499
 
2500
      protected createPurchaseReturn_args getEmptyArgsInstance() {
2501
        return new createPurchaseReturn_args();
2502
      }
2503
 
2504
      protected createPurchaseReturn_result getResult(I iface, createPurchaseReturn_args args) throws org.apache.thrift.TException {
2505
        createPurchaseReturn_result result = new createPurchaseReturn_result();
2506
        result.success = iface.createPurchaseReturn(args.purchaseReturn);
2507
        result.setSuccessIsSet(true);
2508
        return result;
2509
      }
2510
    }
2511
 
2512
    private static class settlePurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, settlePurchaseReturn_args> {
2513
      public settlePurchaseReturn() {
2514
        super("settlePurchaseReturn");
2515
      }
2516
 
2517
      protected settlePurchaseReturn_args getEmptyArgsInstance() {
2518
        return new settlePurchaseReturn_args();
2519
      }
2520
 
2521
      protected settlePurchaseReturn_result getResult(I iface, settlePurchaseReturn_args args) throws org.apache.thrift.TException {
2522
        settlePurchaseReturn_result result = new settlePurchaseReturn_result();
2523
        iface.settlePurchaseReturn(args.id);
2524
        return result;
2525
      }
2526
    }
2527
 
2528
    private static class getUnsettledPurchaseReturns<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUnsettledPurchaseReturns_args> {
2529
      public getUnsettledPurchaseReturns() {
2530
        super("getUnsettledPurchaseReturns");
2531
      }
2532
 
2533
      protected getUnsettledPurchaseReturns_args getEmptyArgsInstance() {
2534
        return new getUnsettledPurchaseReturns_args();
2535
      }
2536
 
2537
      protected getUnsettledPurchaseReturns_result getResult(I iface, getUnsettledPurchaseReturns_args args) throws org.apache.thrift.TException {
2538
        getUnsettledPurchaseReturns_result result = new getUnsettledPurchaseReturns_result();
2539
        result.success = iface.getUnsettledPurchaseReturns();
2540
        return result;
2541
      }
2542
    }
2543
 
6630 amar.kumar 2544
    private static class getInvoice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoice_args> {
2545
      public getInvoice() {
2546
        super("getInvoice");
2547
      }
2548
 
2549
      protected getInvoice_args getEmptyArgsInstance() {
2550
        return new getInvoice_args();
2551
      }
2552
 
2553
      protected getInvoice_result getResult(I iface, getInvoice_args args) throws org.apache.thrift.TException {
2554
        getInvoice_result result = new getInvoice_result();
2555
        result.success = iface.getInvoice(args.invoiceNumber, args.supplierId);
2556
        return result;
2557
      }
2558
    }
2559
 
6762 amar.kumar 2560
    private static class createPurchaseForOurExtBilling<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseForOurExtBilling_args> {
2561
      public createPurchaseForOurExtBilling() {
2562
        super("createPurchaseForOurExtBilling");
2563
      }
2564
 
2565
      protected createPurchaseForOurExtBilling_args getEmptyArgsInstance() {
2566
        return new createPurchaseForOurExtBilling_args();
2567
      }
2568
 
2569
      protected createPurchaseForOurExtBilling_result getResult(I iface, createPurchaseForOurExtBilling_args args) throws org.apache.thrift.TException {
2570
        createPurchaseForOurExtBilling_result result = new createPurchaseForOurExtBilling_result();
7672 rajveer 2571
        result.success = iface.createPurchaseForOurExtBilling(args.invoiceNumber, args.unitPrice, args.nlc, args.itemId);
6762 amar.kumar 2572
        result.setSuccessIsSet(true);
2573
        return result;
2574
      }
2575
    }
2576
 
2577
    private static class fulfillPOForExtBilling<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fulfillPOForExtBilling_args> {
2578
      public fulfillPOForExtBilling() {
2579
        super("fulfillPOForExtBilling");
2580
      }
2581
 
2582
      protected fulfillPOForExtBilling_args getEmptyArgsInstance() {
2583
        return new fulfillPOForExtBilling_args();
2584
      }
2585
 
2586
      protected fulfillPOForExtBilling_result getResult(I iface, fulfillPOForExtBilling_args args) throws org.apache.thrift.TException {
2587
        fulfillPOForExtBilling_result result = new fulfillPOForExtBilling_result();
2588
        iface.fulfillPOForExtBilling(args.itemId, args.quantity);
2589
        return result;
2590
      }
2591
    }
2592
 
7410 amar.kumar 2593
    private static class closePO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closePO_args> {
2594
      public closePO() {
2595
        super("closePO");
2596
      }
2597
 
2598
      protected closePO_args getEmptyArgsInstance() {
2599
        return new closePO_args();
2600
      }
2601
 
2602
      protected closePO_result getResult(I iface, closePO_args args) throws org.apache.thrift.TException {
2603
        closePO_result result = new closePO_result();
2604
        try {
2605
          iface.closePO(args.poId);
2606
        } catch (PurchaseServiceException e) {
2607
          result.e = e;
2608
        }
2609
        return result;
2610
      }
2611
    }
2612
 
2613
    private static class isInvoiceReceived<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isInvoiceReceived_args> {
2614
      public isInvoiceReceived() {
2615
        super("isInvoiceReceived");
2616
      }
2617
 
2618
      protected isInvoiceReceived_args getEmptyArgsInstance() {
2619
        return new isInvoiceReceived_args();
2620
      }
2621
 
2622
      protected isInvoiceReceived_result getResult(I iface, isInvoiceReceived_args args) throws org.apache.thrift.TException {
2623
        isInvoiceReceived_result result = new isInvoiceReceived_result();
2624
        result.success = iface.isInvoiceReceived(args.invoiceNumber, args.supplierId);
2625
        result.setSuccessIsSet(true);
2626
        return result;
2627
      }
2628
    }
2629
 
9829 amar.kumar 2630
    private static class changeWarehouseForPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, changeWarehouseForPO_args> {
2631
      public changeWarehouseForPO() {
2632
        super("changeWarehouseForPO");
2633
      }
2634
 
2635
      protected changeWarehouseForPO_args getEmptyArgsInstance() {
2636
        return new changeWarehouseForPO_args();
2637
      }
2638
 
2639
      protected changeWarehouseForPO_result getResult(I iface, changeWarehouseForPO_args args) throws org.apache.thrift.TException {
2640
        changeWarehouseForPO_result result = new changeWarehouseForPO_result();
2641
        try {
2642
          iface.changeWarehouseForPO(args.id, args.warehouseId);
2643
        } catch (PurchaseServiceException e) {
2644
          result.e = e;
2645
        }
2646
        return result;
2647
      }
2648
    }
2649
 
9925 amar.kumar 2650
    private static class changePOStatus<I extends Iface> extends org.apache.thrift.ProcessFunction<I, changePOStatus_args> {
2651
      public changePOStatus() {
2652
        super("changePOStatus");
2653
      }
2654
 
2655
      protected changePOStatus_args getEmptyArgsInstance() {
2656
        return new changePOStatus_args();
2657
      }
2658
 
2659
      protected changePOStatus_result getResult(I iface, changePOStatus_args args) throws org.apache.thrift.TException {
2660
        changePOStatus_result result = new changePOStatus_result();
2661
        try {
2662
          iface.changePOStatus(args.id, args.poStatus);
2663
        } catch (PurchaseServiceException e) {
2664
          result.e = e;
2665
        }
2666
        return result;
2667
      }
2668
    }
2669
 
11751 manish.sha 2670
    private static class getPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseReturn_args> {
2671
      public getPurchaseReturn() {
2672
        super("getPurchaseReturn");
2673
      }
2674
 
2675
      protected getPurchaseReturn_args getEmptyArgsInstance() {
2676
        return new getPurchaseReturn_args();
2677
      }
2678
 
2679
      protected getPurchaseReturn_result getResult(I iface, getPurchaseReturn_args args) throws org.apache.thrift.TException {
2680
        getPurchaseReturn_result result = new getPurchaseReturn_result();
2681
        try {
2682
          result.success = iface.getPurchaseReturn(args.id);
2683
        } catch (PurchaseServiceException e) {
2684
          result.e = e;
2685
        }
2686
        return result;
2687
      }
2688
    }
2689
 
4496 mandeep.dh 2690
  }
2691
 
2692
  public static class createPurchaseOrder_args implements org.apache.thrift.TBase<createPurchaseOrder_args, createPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
2693
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_args");
2694
 
2695
    private static final org.apache.thrift.protocol.TField PURCHASE_ORDER_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseOrder", org.apache.thrift.protocol.TType.STRUCT, (short)1);
2696
 
2697
    private PurchaseOrder purchaseOrder; // required
2698
 
2699
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2700
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2701
      PURCHASE_ORDER((short)1, "purchaseOrder");
2702
 
2703
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2704
 
2705
      static {
2706
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2707
          byName.put(field.getFieldName(), field);
2708
        }
2709
      }
2710
 
2711
      /**
2712
       * Find the _Fields constant that matches fieldId, or null if its not found.
2713
       */
2714
      public static _Fields findByThriftId(int fieldId) {
2715
        switch(fieldId) {
2716
          case 1: // PURCHASE_ORDER
2717
            return PURCHASE_ORDER;
2718
          default:
2719
            return null;
2720
        }
2721
      }
2722
 
2723
      /**
2724
       * Find the _Fields constant that matches fieldId, throwing an exception
2725
       * if it is not found.
2726
       */
2727
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2728
        _Fields fields = findByThriftId(fieldId);
2729
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2730
        return fields;
2731
      }
2732
 
2733
      /**
2734
       * Find the _Fields constant that matches name, or null if its not found.
2735
       */
2736
      public static _Fields findByName(String name) {
2737
        return byName.get(name);
2738
      }
2739
 
2740
      private final short _thriftId;
2741
      private final String _fieldName;
2742
 
2743
      _Fields(short thriftId, String fieldName) {
2744
        _thriftId = thriftId;
2745
        _fieldName = fieldName;
2746
      }
2747
 
2748
      public short getThriftFieldId() {
2749
        return _thriftId;
2750
      }
2751
 
2752
      public String getFieldName() {
2753
        return _fieldName;
2754
      }
2755
    }
2756
 
2757
    // isset id assignments
2758
 
2759
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2760
    static {
2761
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2762
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2763
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
2764
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2765
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_args.class, metaDataMap);
2766
    }
2767
 
2768
    public createPurchaseOrder_args() {
2769
    }
2770
 
2771
    public createPurchaseOrder_args(
2772
      PurchaseOrder purchaseOrder)
2773
    {
2774
      this();
2775
      this.purchaseOrder = purchaseOrder;
2776
    }
2777
 
2778
    /**
2779
     * Performs a deep copy on <i>other</i>.
2780
     */
2781
    public createPurchaseOrder_args(createPurchaseOrder_args other) {
2782
      if (other.isSetPurchaseOrder()) {
2783
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
2784
      }
2785
    }
2786
 
2787
    public createPurchaseOrder_args deepCopy() {
2788
      return new createPurchaseOrder_args(this);
2789
    }
2790
 
2791
    @Override
2792
    public void clear() {
2793
      this.purchaseOrder = null;
2794
    }
2795
 
2796
    public PurchaseOrder getPurchaseOrder() {
2797
      return this.purchaseOrder;
2798
    }
2799
 
2800
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
2801
      this.purchaseOrder = purchaseOrder;
2802
    }
2803
 
2804
    public void unsetPurchaseOrder() {
2805
      this.purchaseOrder = null;
2806
    }
2807
 
2808
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
2809
    public boolean isSetPurchaseOrder() {
2810
      return this.purchaseOrder != null;
2811
    }
2812
 
2813
    public void setPurchaseOrderIsSet(boolean value) {
2814
      if (!value) {
2815
        this.purchaseOrder = null;
2816
      }
2817
    }
2818
 
2819
    public void setFieldValue(_Fields field, Object value) {
2820
      switch (field) {
2821
      case PURCHASE_ORDER:
2822
        if (value == null) {
2823
          unsetPurchaseOrder();
2824
        } else {
2825
          setPurchaseOrder((PurchaseOrder)value);
2826
        }
2827
        break;
2828
 
2829
      }
2830
    }
2831
 
2832
    public Object getFieldValue(_Fields field) {
2833
      switch (field) {
2834
      case PURCHASE_ORDER:
2835
        return getPurchaseOrder();
2836
 
2837
      }
2838
      throw new IllegalStateException();
2839
    }
2840
 
2841
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2842
    public boolean isSet(_Fields field) {
2843
      if (field == null) {
2844
        throw new IllegalArgumentException();
2845
      }
2846
 
2847
      switch (field) {
2848
      case PURCHASE_ORDER:
2849
        return isSetPurchaseOrder();
2850
      }
2851
      throw new IllegalStateException();
2852
    }
2853
 
2854
    @Override
2855
    public boolean equals(Object that) {
2856
      if (that == null)
2857
        return false;
2858
      if (that instanceof createPurchaseOrder_args)
2859
        return this.equals((createPurchaseOrder_args)that);
2860
      return false;
2861
    }
2862
 
2863
    public boolean equals(createPurchaseOrder_args that) {
2864
      if (that == null)
2865
        return false;
2866
 
2867
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
2868
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
2869
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
2870
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
2871
          return false;
2872
        if (!this.purchaseOrder.equals(that.purchaseOrder))
2873
          return false;
2874
      }
2875
 
2876
      return true;
2877
    }
2878
 
2879
    @Override
2880
    public int hashCode() {
2881
      return 0;
2882
    }
2883
 
2884
    public int compareTo(createPurchaseOrder_args other) {
2885
      if (!getClass().equals(other.getClass())) {
2886
        return getClass().getName().compareTo(other.getClass().getName());
2887
      }
2888
 
2889
      int lastComparison = 0;
2890
      createPurchaseOrder_args typedOther = (createPurchaseOrder_args)other;
2891
 
2892
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
2893
      if (lastComparison != 0) {
2894
        return lastComparison;
2895
      }
2896
      if (isSetPurchaseOrder()) {
2897
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
2898
        if (lastComparison != 0) {
2899
          return lastComparison;
2900
        }
2901
      }
2902
      return 0;
2903
    }
2904
 
2905
    public _Fields fieldForId(int fieldId) {
2906
      return _Fields.findByThriftId(fieldId);
2907
    }
2908
 
2909
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2910
      org.apache.thrift.protocol.TField field;
2911
      iprot.readStructBegin();
2912
      while (true)
2913
      {
2914
        field = iprot.readFieldBegin();
2915
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2916
          break;
2917
        }
2918
        switch (field.id) {
2919
          case 1: // PURCHASE_ORDER
2920
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2921
              this.purchaseOrder = new PurchaseOrder();
2922
              this.purchaseOrder.read(iprot);
2923
            } else { 
2924
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2925
            }
2926
            break;
2927
          default:
2928
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2929
        }
2930
        iprot.readFieldEnd();
2931
      }
2932
      iprot.readStructEnd();
2933
      validate();
2934
    }
2935
 
2936
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2937
      validate();
2938
 
2939
      oprot.writeStructBegin(STRUCT_DESC);
2940
      if (this.purchaseOrder != null) {
2941
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
2942
        this.purchaseOrder.write(oprot);
2943
        oprot.writeFieldEnd();
2944
      }
2945
      oprot.writeFieldStop();
2946
      oprot.writeStructEnd();
2947
    }
2948
 
2949
    @Override
2950
    public String toString() {
2951
      StringBuilder sb = new StringBuilder("createPurchaseOrder_args(");
2952
      boolean first = true;
2953
 
2954
      sb.append("purchaseOrder:");
2955
      if (this.purchaseOrder == null) {
2956
        sb.append("null");
2957
      } else {
2958
        sb.append(this.purchaseOrder);
2959
      }
2960
      first = false;
2961
      sb.append(")");
2962
      return sb.toString();
2963
    }
2964
 
2965
    public void validate() throws org.apache.thrift.TException {
2966
      // check for required fields
2967
    }
2968
 
2969
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2970
      try {
2971
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2972
      } catch (org.apache.thrift.TException te) {
2973
        throw new java.io.IOException(te);
2974
      }
2975
    }
2976
 
2977
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2978
      try {
2979
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2980
      } catch (org.apache.thrift.TException te) {
2981
        throw new java.io.IOException(te);
2982
      }
2983
    }
2984
 
2985
  }
2986
 
2987
  public static class createPurchaseOrder_result implements org.apache.thrift.TBase<createPurchaseOrder_result, createPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
2988
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_result");
2989
 
2990
    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);
2991
    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
2992
 
2993
    private long success; // required
2994
    private PurchaseServiceException e; // required
2995
 
2996
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2997
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2998
      SUCCESS((short)0, "success"),
2999
      E((short)1, "e");
3000
 
3001
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3002
 
3003
      static {
3004
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3005
          byName.put(field.getFieldName(), field);
3006
        }
3007
      }
3008
 
3009
      /**
3010
       * Find the _Fields constant that matches fieldId, or null if its not found.
3011
       */
3012
      public static _Fields findByThriftId(int fieldId) {
3013
        switch(fieldId) {
3014
          case 0: // SUCCESS
3015
            return SUCCESS;
3016
          case 1: // E
3017
            return E;
3018
          default:
3019
            return null;
3020
        }
3021
      }
3022
 
3023
      /**
3024
       * Find the _Fields constant that matches fieldId, throwing an exception
3025
       * if it is not found.
3026
       */
3027
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3028
        _Fields fields = findByThriftId(fieldId);
3029
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3030
        return fields;
3031
      }
3032
 
3033
      /**
3034
       * Find the _Fields constant that matches name, or null if its not found.
3035
       */
3036
      public static _Fields findByName(String name) {
3037
        return byName.get(name);
3038
      }
3039
 
3040
      private final short _thriftId;
3041
      private final String _fieldName;
3042
 
3043
      _Fields(short thriftId, String fieldName) {
3044
        _thriftId = thriftId;
3045
        _fieldName = fieldName;
3046
      }
3047
 
3048
      public short getThriftFieldId() {
3049
        return _thriftId;
3050
      }
3051
 
3052
      public String getFieldName() {
3053
        return _fieldName;
3054
      }
3055
    }
3056
 
3057
    // isset id assignments
3058
    private static final int __SUCCESS_ISSET_ID = 0;
3059
    private BitSet __isset_bit_vector = new BitSet(1);
3060
 
3061
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3062
    static {
3063
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3064
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3065
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3066
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3067
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3068
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3069
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_result.class, metaDataMap);
3070
    }
3071
 
3072
    public createPurchaseOrder_result() {
3073
    }
3074
 
3075
    public createPurchaseOrder_result(
3076
      long success,
3077
      PurchaseServiceException e)
3078
    {
3079
      this();
3080
      this.success = success;
3081
      setSuccessIsSet(true);
3082
      this.e = e;
3083
    }
3084
 
3085
    /**
3086
     * Performs a deep copy on <i>other</i>.
3087
     */
3088
    public createPurchaseOrder_result(createPurchaseOrder_result other) {
3089
      __isset_bit_vector.clear();
3090
      __isset_bit_vector.or(other.__isset_bit_vector);
3091
      this.success = other.success;
3092
      if (other.isSetE()) {
3093
        this.e = new PurchaseServiceException(other.e);
3094
      }
3095
    }
3096
 
3097
    public createPurchaseOrder_result deepCopy() {
3098
      return new createPurchaseOrder_result(this);
3099
    }
3100
 
3101
    @Override
3102
    public void clear() {
3103
      setSuccessIsSet(false);
3104
      this.success = 0;
3105
      this.e = null;
3106
    }
3107
 
3108
    public long getSuccess() {
3109
      return this.success;
3110
    }
3111
 
3112
    public void setSuccess(long success) {
3113
      this.success = success;
3114
      setSuccessIsSet(true);
3115
    }
3116
 
3117
    public void unsetSuccess() {
3118
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
3119
    }
3120
 
3121
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
3122
    public boolean isSetSuccess() {
3123
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
3124
    }
3125
 
3126
    public void setSuccessIsSet(boolean value) {
3127
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
3128
    }
3129
 
3130
    public PurchaseServiceException getE() {
3131
      return this.e;
3132
    }
3133
 
3134
    public void setE(PurchaseServiceException e) {
3135
      this.e = e;
3136
    }
3137
 
3138
    public void unsetE() {
3139
      this.e = null;
3140
    }
3141
 
3142
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
3143
    public boolean isSetE() {
3144
      return this.e != null;
3145
    }
3146
 
3147
    public void setEIsSet(boolean value) {
3148
      if (!value) {
3149
        this.e = null;
3150
      }
3151
    }
3152
 
3153
    public void setFieldValue(_Fields field, Object value) {
3154
      switch (field) {
3155
      case SUCCESS:
3156
        if (value == null) {
3157
          unsetSuccess();
3158
        } else {
3159
          setSuccess((Long)value);
3160
        }
3161
        break;
3162
 
3163
      case E:
3164
        if (value == null) {
3165
          unsetE();
3166
        } else {
3167
          setE((PurchaseServiceException)value);
3168
        }
3169
        break;
3170
 
3171
      }
3172
    }
3173
 
3174
    public Object getFieldValue(_Fields field) {
3175
      switch (field) {
3176
      case SUCCESS:
3177
        return Long.valueOf(getSuccess());
3178
 
3179
      case E:
3180
        return getE();
3181
 
3182
      }
3183
      throw new IllegalStateException();
3184
    }
3185
 
3186
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3187
    public boolean isSet(_Fields field) {
3188
      if (field == null) {
3189
        throw new IllegalArgumentException();
3190
      }
3191
 
3192
      switch (field) {
3193
      case SUCCESS:
3194
        return isSetSuccess();
3195
      case E:
3196
        return isSetE();
3197
      }
3198
      throw new IllegalStateException();
3199
    }
3200
 
3201
    @Override
3202
    public boolean equals(Object that) {
3203
      if (that == null)
3204
        return false;
3205
      if (that instanceof createPurchaseOrder_result)
3206
        return this.equals((createPurchaseOrder_result)that);
3207
      return false;
3208
    }
3209
 
3210
    public boolean equals(createPurchaseOrder_result that) {
3211
      if (that == null)
3212
        return false;
3213
 
3214
      boolean this_present_success = true;
3215
      boolean that_present_success = true;
3216
      if (this_present_success || that_present_success) {
3217
        if (!(this_present_success && that_present_success))
3218
          return false;
3219
        if (this.success != that.success)
3220
          return false;
3221
      }
3222
 
3223
      boolean this_present_e = true && this.isSetE();
3224
      boolean that_present_e = true && that.isSetE();
3225
      if (this_present_e || that_present_e) {
3226
        if (!(this_present_e && that_present_e))
3227
          return false;
3228
        if (!this.e.equals(that.e))
3229
          return false;
3230
      }
3231
 
3232
      return true;
3233
    }
3234
 
3235
    @Override
3236
    public int hashCode() {
3237
      return 0;
3238
    }
3239
 
3240
    public int compareTo(createPurchaseOrder_result other) {
3241
      if (!getClass().equals(other.getClass())) {
3242
        return getClass().getName().compareTo(other.getClass().getName());
3243
      }
3244
 
3245
      int lastComparison = 0;
3246
      createPurchaseOrder_result typedOther = (createPurchaseOrder_result)other;
3247
 
3248
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3249
      if (lastComparison != 0) {
3250
        return lastComparison;
3251
      }
3252
      if (isSetSuccess()) {
3253
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3254
        if (lastComparison != 0) {
3255
          return lastComparison;
3256
        }
3257
      }
3258
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
3259
      if (lastComparison != 0) {
3260
        return lastComparison;
3261
      }
3262
      if (isSetE()) {
3263
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
3264
        if (lastComparison != 0) {
3265
          return lastComparison;
3266
        }
3267
      }
3268
      return 0;
3269
    }
3270
 
3271
    public _Fields fieldForId(int fieldId) {
3272
      return _Fields.findByThriftId(fieldId);
3273
    }
3274
 
3275
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3276
      org.apache.thrift.protocol.TField field;
3277
      iprot.readStructBegin();
3278
      while (true)
3279
      {
3280
        field = iprot.readFieldBegin();
3281
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3282
          break;
3283
        }
3284
        switch (field.id) {
3285
          case 0: // SUCCESS
3286
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3287
              this.success = iprot.readI64();
3288
              setSuccessIsSet(true);
3289
            } else { 
3290
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3291
            }
3292
            break;
3293
          case 1: // E
3294
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3295
              this.e = new PurchaseServiceException();
3296
              this.e.read(iprot);
3297
            } else { 
3298
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3299
            }
3300
            break;
3301
          default:
3302
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3303
        }
3304
        iprot.readFieldEnd();
3305
      }
3306
      iprot.readStructEnd();
3307
      validate();
3308
    }
3309
 
3310
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3311
      oprot.writeStructBegin(STRUCT_DESC);
3312
 
3313
      if (this.isSetSuccess()) {
3314
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3315
        oprot.writeI64(this.success);
3316
        oprot.writeFieldEnd();
3317
      } else if (this.isSetE()) {
3318
        oprot.writeFieldBegin(E_FIELD_DESC);
3319
        this.e.write(oprot);
3320
        oprot.writeFieldEnd();
3321
      }
3322
      oprot.writeFieldStop();
3323
      oprot.writeStructEnd();
3324
    }
3325
 
3326
    @Override
3327
    public String toString() {
3328
      StringBuilder sb = new StringBuilder("createPurchaseOrder_result(");
3329
      boolean first = true;
3330
 
3331
      sb.append("success:");
3332
      sb.append(this.success);
3333
      first = false;
3334
      if (!first) sb.append(", ");
3335
      sb.append("e:");
3336
      if (this.e == null) {
3337
        sb.append("null");
3338
      } else {
3339
        sb.append(this.e);
3340
      }
3341
      first = false;
3342
      sb.append(")");
3343
      return sb.toString();
3344
    }
3345
 
3346
    public void validate() throws org.apache.thrift.TException {
3347
      // check for required fields
3348
    }
3349
 
3350
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3351
      try {
3352
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3353
      } catch (org.apache.thrift.TException te) {
3354
        throw new java.io.IOException(te);
3355
      }
3356
    }
3357
 
3358
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3359
      try {
3360
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3361
      } catch (org.apache.thrift.TException te) {
3362
        throw new java.io.IOException(te);
3363
      }
3364
    }
3365
 
3366
  }
3367
 
3368
  public static class getPurchaseOrder_args implements org.apache.thrift.TBase<getPurchaseOrder_args, getPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
3369
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_args");
3370
 
3371
    private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);
3372
 
3373
    private long id; // required
3374
 
3375
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3376
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3377
      ID((short)1, "id");
3378
 
3379
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3380
 
3381
      static {
3382
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3383
          byName.put(field.getFieldName(), field);
3384
        }
3385
      }
3386
 
3387
      /**
3388
       * Find the _Fields constant that matches fieldId, or null if its not found.
3389
       */
3390
      public static _Fields findByThriftId(int fieldId) {
3391
        switch(fieldId) {
3392
          case 1: // ID
3393
            return ID;
3394
          default:
3395
            return null;
3396
        }
3397
      }
3398
 
3399
      /**
3400
       * Find the _Fields constant that matches fieldId, throwing an exception
3401
       * if it is not found.
3402
       */
3403
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3404
        _Fields fields = findByThriftId(fieldId);
3405
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3406
        return fields;
3407
      }
3408
 
3409
      /**
3410
       * Find the _Fields constant that matches name, or null if its not found.
3411
       */
3412
      public static _Fields findByName(String name) {
3413
        return byName.get(name);
3414
      }
3415
 
3416
      private final short _thriftId;
3417
      private final String _fieldName;
3418
 
3419
      _Fields(short thriftId, String fieldName) {
3420
        _thriftId = thriftId;
3421
        _fieldName = fieldName;
3422
      }
3423
 
3424
      public short getThriftFieldId() {
3425
        return _thriftId;
3426
      }
3427
 
3428
      public String getFieldName() {
3429
        return _fieldName;
3430
      }
3431
    }
3432
 
3433
    // isset id assignments
3434
    private static final int __ID_ISSET_ID = 0;
3435
    private BitSet __isset_bit_vector = new BitSet(1);
3436
 
3437
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3438
    static {
3439
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3440
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3441
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3442
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3443
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_args.class, metaDataMap);
3444
    }
3445
 
3446
    public getPurchaseOrder_args() {
3447
    }
3448
 
3449
    public getPurchaseOrder_args(
3450
      long id)
3451
    {
3452
      this();
3453
      this.id = id;
3454
      setIdIsSet(true);
3455
    }
3456
 
3457
    /**
3458
     * Performs a deep copy on <i>other</i>.
3459
     */
3460
    public getPurchaseOrder_args(getPurchaseOrder_args other) {
3461
      __isset_bit_vector.clear();
3462
      __isset_bit_vector.or(other.__isset_bit_vector);
3463
      this.id = other.id;
3464
    }
3465
 
3466
    public getPurchaseOrder_args deepCopy() {
3467
      return new getPurchaseOrder_args(this);
3468
    }
3469
 
3470
    @Override
3471
    public void clear() {
3472
      setIdIsSet(false);
3473
      this.id = 0;
3474
    }
3475
 
3476
    public long getId() {
3477
      return this.id;
3478
    }
3479
 
3480
    public void setId(long id) {
3481
      this.id = id;
3482
      setIdIsSet(true);
3483
    }
3484
 
3485
    public void unsetId() {
3486
      __isset_bit_vector.clear(__ID_ISSET_ID);
3487
    }
3488
 
3489
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
3490
    public boolean isSetId() {
3491
      return __isset_bit_vector.get(__ID_ISSET_ID);
3492
    }
3493
 
3494
    public void setIdIsSet(boolean value) {
3495
      __isset_bit_vector.set(__ID_ISSET_ID, value);
3496
    }
3497
 
3498
    public void setFieldValue(_Fields field, Object value) {
3499
      switch (field) {
3500
      case ID:
3501
        if (value == null) {
3502
          unsetId();
3503
        } else {
3504
          setId((Long)value);
3505
        }
3506
        break;
3507
 
3508
      }
3509
    }
3510
 
3511
    public Object getFieldValue(_Fields field) {
3512
      switch (field) {
3513
      case ID:
3514
        return Long.valueOf(getId());
3515
 
3516
      }
3517
      throw new IllegalStateException();
3518
    }
3519
 
3520
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3521
    public boolean isSet(_Fields field) {
3522
      if (field == null) {
3523
        throw new IllegalArgumentException();
3524
      }
3525
 
3526
      switch (field) {
3527
      case ID:
3528
        return isSetId();
3529
      }
3530
      throw new IllegalStateException();
3531
    }
3532
 
3533
    @Override
3534
    public boolean equals(Object that) {
3535
      if (that == null)
3536
        return false;
3537
      if (that instanceof getPurchaseOrder_args)
3538
        return this.equals((getPurchaseOrder_args)that);
3539
      return false;
3540
    }
3541
 
3542
    public boolean equals(getPurchaseOrder_args that) {
3543
      if (that == null)
3544
        return false;
3545
 
3546
      boolean this_present_id = true;
3547
      boolean that_present_id = true;
3548
      if (this_present_id || that_present_id) {
3549
        if (!(this_present_id && that_present_id))
3550
          return false;
3551
        if (this.id != that.id)
3552
          return false;
3553
      }
3554
 
3555
      return true;
3556
    }
3557
 
3558
    @Override
3559
    public int hashCode() {
3560
      return 0;
3561
    }
3562
 
3563
    public int compareTo(getPurchaseOrder_args other) {
3564
      if (!getClass().equals(other.getClass())) {
3565
        return getClass().getName().compareTo(other.getClass().getName());
3566
      }
3567
 
3568
      int lastComparison = 0;
3569
      getPurchaseOrder_args typedOther = (getPurchaseOrder_args)other;
3570
 
3571
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
3572
      if (lastComparison != 0) {
3573
        return lastComparison;
3574
      }
3575
      if (isSetId()) {
3576
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
3577
        if (lastComparison != 0) {
3578
          return lastComparison;
3579
        }
3580
      }
3581
      return 0;
3582
    }
3583
 
3584
    public _Fields fieldForId(int fieldId) {
3585
      return _Fields.findByThriftId(fieldId);
3586
    }
3587
 
3588
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3589
      org.apache.thrift.protocol.TField field;
3590
      iprot.readStructBegin();
3591
      while (true)
3592
      {
3593
        field = iprot.readFieldBegin();
3594
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3595
          break;
3596
        }
3597
        switch (field.id) {
3598
          case 1: // ID
3599
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3600
              this.id = iprot.readI64();
3601
              setIdIsSet(true);
3602
            } else { 
3603
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3604
            }
3605
            break;
3606
          default:
3607
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3608
        }
3609
        iprot.readFieldEnd();
3610
      }
3611
      iprot.readStructEnd();
3612
      validate();
3613
    }
3614
 
3615
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3616
      validate();
3617
 
3618
      oprot.writeStructBegin(STRUCT_DESC);
3619
      oprot.writeFieldBegin(ID_FIELD_DESC);
3620
      oprot.writeI64(this.id);
3621
      oprot.writeFieldEnd();
3622
      oprot.writeFieldStop();
3623
      oprot.writeStructEnd();
3624
    }
3625
 
3626
    @Override
3627
    public String toString() {
3628
      StringBuilder sb = new StringBuilder("getPurchaseOrder_args(");
3629
      boolean first = true;
3630
 
3631
      sb.append("id:");
3632
      sb.append(this.id);
3633
      first = false;
3634
      sb.append(")");
3635
      return sb.toString();
3636
    }
3637
 
3638
    public void validate() throws org.apache.thrift.TException {
3639
      // check for required fields
3640
    }
3641
 
3642
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3643
      try {
3644
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3645
      } catch (org.apache.thrift.TException te) {
3646
        throw new java.io.IOException(te);
3647
      }
3648
    }
3649
 
3650
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3651
      try {
3652
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3653
      } catch (org.apache.thrift.TException te) {
3654
        throw new java.io.IOException(te);
3655
      }
3656
    }
3657
 
3658
  }
3659
 
3660
  public static class getPurchaseOrder_result implements org.apache.thrift.TBase<getPurchaseOrder_result, getPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
3661
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_result");
3662
 
3663
    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);
3664
    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
3665
 
3666
    private PurchaseOrder success; // required
3667
    private PurchaseServiceException e; // required
3668
 
3669
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3670
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3671
      SUCCESS((short)0, "success"),
3672
      E((short)1, "e");
3673
 
3674
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3675
 
3676
      static {
3677
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3678
          byName.put(field.getFieldName(), field);
3679
        }
3680
      }
3681
 
3682
      /**
3683
       * Find the _Fields constant that matches fieldId, or null if its not found.
3684
       */
3685
      public static _Fields findByThriftId(int fieldId) {
3686
        switch(fieldId) {
3687
          case 0: // SUCCESS
3688
            return SUCCESS;
3689
          case 1: // E
3690
            return E;
3691
          default:
3692
            return null;
3693
        }
3694
      }
3695
 
3696
      /**
3697
       * Find the _Fields constant that matches fieldId, throwing an exception
3698
       * if it is not found.
3699
       */
3700
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3701
        _Fields fields = findByThriftId(fieldId);
3702
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3703
        return fields;
3704
      }
3705
 
3706
      /**
3707
       * Find the _Fields constant that matches name, or null if its not found.
3708
       */
3709
      public static _Fields findByName(String name) {
3710
        return byName.get(name);
3711
      }
3712
 
3713
      private final short _thriftId;
3714
      private final String _fieldName;
3715
 
3716
      _Fields(short thriftId, String fieldName) {
3717
        _thriftId = thriftId;
3718
        _fieldName = fieldName;
3719
      }
3720
 
3721
      public short getThriftFieldId() {
3722
        return _thriftId;
3723
      }
3724
 
3725
      public String getFieldName() {
3726
        return _fieldName;
3727
      }
3728
    }
3729
 
3730
    // isset id assignments
3731
 
3732
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3733
    static {
3734
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3735
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3736
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
3737
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3738
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3739
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3740
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_result.class, metaDataMap);
3741
    }
3742
 
3743
    public getPurchaseOrder_result() {
3744
    }
3745
 
3746
    public getPurchaseOrder_result(
3747
      PurchaseOrder success,
3748
      PurchaseServiceException e)
3749
    {
3750
      this();
3751
      this.success = success;
3752
      this.e = e;
3753
    }
3754
 
3755
    /**
3756
     * Performs a deep copy on <i>other</i>.
3757
     */
3758
    public getPurchaseOrder_result(getPurchaseOrder_result other) {
3759
      if (other.isSetSuccess()) {
3760
        this.success = new PurchaseOrder(other.success);
3761
      }
3762
      if (other.isSetE()) {
3763
        this.e = new PurchaseServiceException(other.e);
3764
      }
3765
    }
3766
 
3767
    public getPurchaseOrder_result deepCopy() {
3768
      return new getPurchaseOrder_result(this);
3769
    }
3770
 
3771
    @Override
3772
    public void clear() {
3773
      this.success = null;
3774
      this.e = null;
3775
    }
3776
 
3777
    public PurchaseOrder getSuccess() {
3778
      return this.success;
3779
    }
3780
 
3781
    public void setSuccess(PurchaseOrder success) {
3782
      this.success = success;
3783
    }
3784
 
3785
    public void unsetSuccess() {
3786
      this.success = null;
3787
    }
3788
 
3789
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
3790
    public boolean isSetSuccess() {
3791
      return this.success != null;
3792
    }
3793
 
3794
    public void setSuccessIsSet(boolean value) {
3795
      if (!value) {
3796
        this.success = null;
3797
      }
3798
    }
3799
 
3800
    public PurchaseServiceException getE() {
3801
      return this.e;
3802
    }
3803
 
3804
    public void setE(PurchaseServiceException e) {
3805
      this.e = e;
3806
    }
3807
 
3808
    public void unsetE() {
3809
      this.e = null;
3810
    }
3811
 
3812
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
3813
    public boolean isSetE() {
3814
      return this.e != null;
3815
    }
3816
 
3817
    public void setEIsSet(boolean value) {
3818
      if (!value) {
3819
        this.e = null;
3820
      }
3821
    }
3822
 
3823
    public void setFieldValue(_Fields field, Object value) {
3824
      switch (field) {
3825
      case SUCCESS:
3826
        if (value == null) {
3827
          unsetSuccess();
3828
        } else {
3829
          setSuccess((PurchaseOrder)value);
3830
        }
3831
        break;
3832
 
3833
      case E:
3834
        if (value == null) {
3835
          unsetE();
3836
        } else {
3837
          setE((PurchaseServiceException)value);
3838
        }
3839
        break;
3840
 
3841
      }
3842
    }
3843
 
3844
    public Object getFieldValue(_Fields field) {
3845
      switch (field) {
3846
      case SUCCESS:
3847
        return getSuccess();
3848
 
3849
      case E:
3850
        return getE();
3851
 
3852
      }
3853
      throw new IllegalStateException();
3854
    }
3855
 
3856
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3857
    public boolean isSet(_Fields field) {
3858
      if (field == null) {
3859
        throw new IllegalArgumentException();
3860
      }
3861
 
3862
      switch (field) {
3863
      case SUCCESS:
3864
        return isSetSuccess();
3865
      case E:
3866
        return isSetE();
3867
      }
3868
      throw new IllegalStateException();
3869
    }
3870
 
3871
    @Override
3872
    public boolean equals(Object that) {
3873
      if (that == null)
3874
        return false;
3875
      if (that instanceof getPurchaseOrder_result)
3876
        return this.equals((getPurchaseOrder_result)that);
3877
      return false;
3878
    }
3879
 
3880
    public boolean equals(getPurchaseOrder_result that) {
3881
      if (that == null)
3882
        return false;
3883
 
3884
      boolean this_present_success = true && this.isSetSuccess();
3885
      boolean that_present_success = true && that.isSetSuccess();
3886
      if (this_present_success || that_present_success) {
3887
        if (!(this_present_success && that_present_success))
3888
          return false;
3889
        if (!this.success.equals(that.success))
3890
          return false;
3891
      }
3892
 
3893
      boolean this_present_e = true && this.isSetE();
3894
      boolean that_present_e = true && that.isSetE();
3895
      if (this_present_e || that_present_e) {
3896
        if (!(this_present_e && that_present_e))
3897
          return false;
3898
        if (!this.e.equals(that.e))
3899
          return false;
3900
      }
3901
 
3902
      return true;
3903
    }
3904
 
3905
    @Override
3906
    public int hashCode() {
3907
      return 0;
3908
    }
3909
 
3910
    public int compareTo(getPurchaseOrder_result other) {
3911
      if (!getClass().equals(other.getClass())) {
3912
        return getClass().getName().compareTo(other.getClass().getName());
3913
      }
3914
 
3915
      int lastComparison = 0;
3916
      getPurchaseOrder_result typedOther = (getPurchaseOrder_result)other;
3917
 
3918
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3919
      if (lastComparison != 0) {
3920
        return lastComparison;
3921
      }
3922
      if (isSetSuccess()) {
3923
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3924
        if (lastComparison != 0) {
3925
          return lastComparison;
3926
        }
3927
      }
3928
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
3929
      if (lastComparison != 0) {
3930
        return lastComparison;
3931
      }
3932
      if (isSetE()) {
3933
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
3934
        if (lastComparison != 0) {
3935
          return lastComparison;
3936
        }
3937
      }
3938
      return 0;
3939
    }
3940
 
3941
    public _Fields fieldForId(int fieldId) {
3942
      return _Fields.findByThriftId(fieldId);
3943
    }
3944
 
3945
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3946
      org.apache.thrift.protocol.TField field;
3947
      iprot.readStructBegin();
3948
      while (true)
3949
      {
3950
        field = iprot.readFieldBegin();
3951
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3952
          break;
3953
        }
3954
        switch (field.id) {
3955
          case 0: // SUCCESS
3956
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3957
              this.success = new PurchaseOrder();
3958
              this.success.read(iprot);
3959
            } else { 
3960
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3961
            }
3962
            break;
3963
          case 1: // E
3964
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3965
              this.e = new PurchaseServiceException();
3966
              this.e.read(iprot);
3967
            } else { 
3968
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3969
            }
3970
            break;
3971
          default:
3972
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3973
        }
3974
        iprot.readFieldEnd();
3975
      }
3976
      iprot.readStructEnd();
3977
      validate();
3978
    }
3979
 
3980
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3981
      oprot.writeStructBegin(STRUCT_DESC);
3982
 
3983
      if (this.isSetSuccess()) {
3984
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3985
        this.success.write(oprot);
3986
        oprot.writeFieldEnd();
3987
      } else if (this.isSetE()) {
3988
        oprot.writeFieldBegin(E_FIELD_DESC);
3989
        this.e.write(oprot);
3990
        oprot.writeFieldEnd();
3991
      }
3992
      oprot.writeFieldStop();
3993
      oprot.writeStructEnd();
3994
    }
3995
 
3996
    @Override
3997
    public String toString() {
3998
      StringBuilder sb = new StringBuilder("getPurchaseOrder_result(");
3999
      boolean first = true;
4000
 
4001
      sb.append("success:");
4002
      if (this.success == null) {
4003
        sb.append("null");
4004
      } else {
4005
        sb.append(this.success);
4006
      }
4007
      first = false;
4008
      if (!first) sb.append(", ");
4009
      sb.append("e:");
4010
      if (this.e == null) {
4011
        sb.append("null");
4012
      } else {
4013
        sb.append(this.e);
4014
      }
4015
      first = false;
4016
      sb.append(")");
4017
      return sb.toString();
4018
    }
4019
 
4020
    public void validate() throws org.apache.thrift.TException {
4021
      // check for required fields
4022
    }
4023
 
4024
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4025
      try {
4026
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4027
      } catch (org.apache.thrift.TException te) {
4028
        throw new java.io.IOException(te);
4029
      }
4030
    }
4031
 
4032
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4033
      try {
4034
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4035
      } catch (org.apache.thrift.TException te) {
4036
        throw new java.io.IOException(te);
4037
      }
4038
    }
4039
 
4040
  }
4041
 
4042
  public static class getAllPurchaseOrders_args implements org.apache.thrift.TBase<getAllPurchaseOrders_args, getAllPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
4043
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_args");
4044
 
4045
    private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.I32, (short)1);
4046
 
4047
    private POStatus status; // required
4048
 
4049
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4050
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4051
      /**
4052
       * 
4053
       * @see POStatus
4054
       */
4055
      STATUS((short)1, "status");
4056
 
4057
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4058
 
4059
      static {
4060
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4061
          byName.put(field.getFieldName(), field);
4062
        }
4063
      }
4064
 
4065
      /**
4066
       * Find the _Fields constant that matches fieldId, or null if its not found.
4067
       */
4068
      public static _Fields findByThriftId(int fieldId) {
4069
        switch(fieldId) {
4070
          case 1: // STATUS
4071
            return STATUS;
4072
          default:
4073
            return null;
4074
        }
4075
      }
4076
 
4077
      /**
4078
       * Find the _Fields constant that matches fieldId, throwing an exception
4079
       * if it is not found.
4080
       */
4081
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4082
        _Fields fields = findByThriftId(fieldId);
4083
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4084
        return fields;
4085
      }
4086
 
4087
      /**
4088
       * Find the _Fields constant that matches name, or null if its not found.
4089
       */
4090
      public static _Fields findByName(String name) {
4091
        return byName.get(name);
4092
      }
4093
 
4094
      private final short _thriftId;
4095
      private final String _fieldName;
4096
 
4097
      _Fields(short thriftId, String fieldName) {
4098
        _thriftId = thriftId;
4099
        _fieldName = fieldName;
4100
      }
4101
 
4102
      public short getThriftFieldId() {
4103
        return _thriftId;
4104
      }
4105
 
4106
      public String getFieldName() {
4107
        return _fieldName;
4108
      }
4109
    }
4110
 
4111
    // isset id assignments
4112
 
4113
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4114
    static {
4115
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4116
      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4117
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, POStatus.class)));
4118
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4119
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_args.class, metaDataMap);
4120
    }
4121
 
4122
    public getAllPurchaseOrders_args() {
4123
    }
4124
 
4125
    public getAllPurchaseOrders_args(
4126
      POStatus status)
4127
    {
4128
      this();
4129
      this.status = status;
4130
    }
4131
 
4132
    /**
4133
     * Performs a deep copy on <i>other</i>.
4134
     */
4135
    public getAllPurchaseOrders_args(getAllPurchaseOrders_args other) {
4136
      if (other.isSetStatus()) {
4137
        this.status = other.status;
4138
      }
4139
    }
4140
 
4141
    public getAllPurchaseOrders_args deepCopy() {
4142
      return new getAllPurchaseOrders_args(this);
4143
    }
4144
 
4145
    @Override
4146
    public void clear() {
4147
      this.status = null;
4148
    }
4149
 
4150
    /**
4151
     * 
4152
     * @see POStatus
4153
     */
4154
    public POStatus getStatus() {
4155
      return this.status;
4156
    }
4157
 
4158
    /**
4159
     * 
4160
     * @see POStatus
4161
     */
4162
    public void setStatus(POStatus status) {
4163
      this.status = status;
4164
    }
4165
 
4166
    public void unsetStatus() {
4167
      this.status = null;
4168
    }
4169
 
4170
    /** Returns true if field status is set (has been assigned a value) and false otherwise */
4171
    public boolean isSetStatus() {
4172
      return this.status != null;
4173
    }
4174
 
4175
    public void setStatusIsSet(boolean value) {
4176
      if (!value) {
4177
        this.status = null;
4178
      }
4179
    }
4180
 
4181
    public void setFieldValue(_Fields field, Object value) {
4182
      switch (field) {
4183
      case STATUS:
4184
        if (value == null) {
4185
          unsetStatus();
4186
        } else {
4187
          setStatus((POStatus)value);
4188
        }
4189
        break;
4190
 
4191
      }
4192
    }
4193
 
4194
    public Object getFieldValue(_Fields field) {
4195
      switch (field) {
4196
      case STATUS:
4197
        return getStatus();
4198
 
4199
      }
4200
      throw new IllegalStateException();
4201
    }
4202
 
4203
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4204
    public boolean isSet(_Fields field) {
4205
      if (field == null) {
4206
        throw new IllegalArgumentException();
4207
      }
4208
 
4209
      switch (field) {
4210
      case STATUS:
4211
        return isSetStatus();
4212
      }
4213
      throw new IllegalStateException();
4214
    }
4215
 
4216
    @Override
4217
    public boolean equals(Object that) {
4218
      if (that == null)
4219
        return false;
4220
      if (that instanceof getAllPurchaseOrders_args)
4221
        return this.equals((getAllPurchaseOrders_args)that);
4222
      return false;
4223
    }
4224
 
4225
    public boolean equals(getAllPurchaseOrders_args that) {
4226
      if (that == null)
4227
        return false;
4228
 
4229
      boolean this_present_status = true && this.isSetStatus();
4230
      boolean that_present_status = true && that.isSetStatus();
4231
      if (this_present_status || that_present_status) {
4232
        if (!(this_present_status && that_present_status))
4233
          return false;
4234
        if (!this.status.equals(that.status))
4235
          return false;
4236
      }
4237
 
4238
      return true;
4239
    }
4240
 
4241
    @Override
4242
    public int hashCode() {
4243
      return 0;
4244
    }
4245
 
4246
    public int compareTo(getAllPurchaseOrders_args other) {
4247
      if (!getClass().equals(other.getClass())) {
4248
        return getClass().getName().compareTo(other.getClass().getName());
4249
      }
4250
 
4251
      int lastComparison = 0;
4252
      getAllPurchaseOrders_args typedOther = (getAllPurchaseOrders_args)other;
4253
 
4254
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
4255
      if (lastComparison != 0) {
4256
        return lastComparison;
4257
      }
4258
      if (isSetStatus()) {
4259
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
4260
        if (lastComparison != 0) {
4261
          return lastComparison;
4262
        }
4263
      }
4264
      return 0;
4265
    }
4266
 
4267
    public _Fields fieldForId(int fieldId) {
4268
      return _Fields.findByThriftId(fieldId);
4269
    }
4270
 
4271
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4272
      org.apache.thrift.protocol.TField field;
4273
      iprot.readStructBegin();
4274
      while (true)
4275
      {
4276
        field = iprot.readFieldBegin();
4277
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4278
          break;
4279
        }
4280
        switch (field.id) {
4281
          case 1: // STATUS
4282
            if (field.type == org.apache.thrift.protocol.TType.I32) {
4283
              this.status = POStatus.findByValue(iprot.readI32());
4284
            } else { 
4285
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4286
            }
4287
            break;
4288
          default:
4289
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4290
        }
4291
        iprot.readFieldEnd();
4292
      }
4293
      iprot.readStructEnd();
4294
      validate();
4295
    }
4296
 
4297
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4298
      validate();
4299
 
4300
      oprot.writeStructBegin(STRUCT_DESC);
4301
      if (this.status != null) {
4302
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
4303
        oprot.writeI32(this.status.getValue());
4304
        oprot.writeFieldEnd();
4305
      }
4306
      oprot.writeFieldStop();
4307
      oprot.writeStructEnd();
4308
    }
4309
 
4310
    @Override
4311
    public String toString() {
4312
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_args(");
4313
      boolean first = true;
4314
 
4315
      sb.append("status:");
4316
      if (this.status == null) {
4317
        sb.append("null");
4318
      } else {
4319
        sb.append(this.status);
4320
      }
4321
      first = false;
4322
      sb.append(")");
4323
      return sb.toString();
4324
    }
4325
 
4326
    public void validate() throws org.apache.thrift.TException {
4327
      // check for required fields
4328
    }
4329
 
4330
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4331
      try {
4332
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4333
      } catch (org.apache.thrift.TException te) {
4334
        throw new java.io.IOException(te);
4335
      }
4336
    }
4337
 
4338
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4339
      try {
4340
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4341
      } catch (org.apache.thrift.TException te) {
4342
        throw new java.io.IOException(te);
4343
      }
4344
    }
4345
 
4346
  }
4347
 
4348
  public static class getAllPurchaseOrders_result implements org.apache.thrift.TBase<getAllPurchaseOrders_result, getAllPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
4349
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_result");
4350
 
4351
    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);
4352
    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
4353
 
4354
    private List<PurchaseOrder> success; // required
4355
    private PurchaseServiceException e; // required
4356
 
4357
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4358
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4359
      SUCCESS((short)0, "success"),
4360
      E((short)1, "e");
4361
 
4362
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4363
 
4364
      static {
4365
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4366
          byName.put(field.getFieldName(), field);
4367
        }
4368
      }
4369
 
4370
      /**
4371
       * Find the _Fields constant that matches fieldId, or null if its not found.
4372
       */
4373
      public static _Fields findByThriftId(int fieldId) {
4374
        switch(fieldId) {
4375
          case 0: // SUCCESS
4376
            return SUCCESS;
4377
          case 1: // E
4378
            return E;
4379
          default:
4380
            return null;
4381
        }
4382
      }
4383
 
4384
      /**
4385
       * Find the _Fields constant that matches fieldId, throwing an exception
4386
       * if it is not found.
4387
       */
4388
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4389
        _Fields fields = findByThriftId(fieldId);
4390
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4391
        return fields;
4392
      }
4393
 
4394
      /**
4395
       * Find the _Fields constant that matches name, or null if its not found.
4396
       */
4397
      public static _Fields findByName(String name) {
4398
        return byName.get(name);
4399
      }
4400
 
4401
      private final short _thriftId;
4402
      private final String _fieldName;
4403
 
4404
      _Fields(short thriftId, String fieldName) {
4405
        _thriftId = thriftId;
4406
        _fieldName = fieldName;
4407
      }
4408
 
4409
      public short getThriftFieldId() {
4410
        return _thriftId;
4411
      }
4412
 
4413
      public String getFieldName() {
4414
        return _fieldName;
4415
      }
4416
    }
4417
 
4418
    // isset id assignments
4419
 
4420
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4421
    static {
4422
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4423
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4424
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
4425
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
4426
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4427
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4428
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4429
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_result.class, metaDataMap);
4430
    }
4431
 
4432
    public getAllPurchaseOrders_result() {
4433
    }
4434
 
4435
    public getAllPurchaseOrders_result(
4436
      List<PurchaseOrder> success,
4437
      PurchaseServiceException e)
4438
    {
4439
      this();
4440
      this.success = success;
4441
      this.e = e;
4442
    }
4443
 
4444
    /**
4445
     * Performs a deep copy on <i>other</i>.
4446
     */
4447
    public getAllPurchaseOrders_result(getAllPurchaseOrders_result other) {
4448
      if (other.isSetSuccess()) {
4449
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
4450
        for (PurchaseOrder other_element : other.success) {
4451
          __this__success.add(new PurchaseOrder(other_element));
4452
        }
4453
        this.success = __this__success;
4454
      }
4455
      if (other.isSetE()) {
4456
        this.e = new PurchaseServiceException(other.e);
4457
      }
4458
    }
4459
 
4460
    public getAllPurchaseOrders_result deepCopy() {
4461
      return new getAllPurchaseOrders_result(this);
4462
    }
4463
 
4464
    @Override
4465
    public void clear() {
4466
      this.success = null;
4467
      this.e = null;
4468
    }
4469
 
4470
    public int getSuccessSize() {
4471
      return (this.success == null) ? 0 : this.success.size();
4472
    }
4473
 
4474
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
4475
      return (this.success == null) ? null : this.success.iterator();
4476
    }
4477
 
4478
    public void addToSuccess(PurchaseOrder elem) {
4479
      if (this.success == null) {
4480
        this.success = new ArrayList<PurchaseOrder>();
4481
      }
4482
      this.success.add(elem);
4483
    }
4484
 
4485
    public List<PurchaseOrder> getSuccess() {
4486
      return this.success;
4487
    }
4488
 
4489
    public void setSuccess(List<PurchaseOrder> success) {
4490
      this.success = success;
4491
    }
4492
 
4493
    public void unsetSuccess() {
4494
      this.success = null;
4495
    }
4496
 
4497
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
4498
    public boolean isSetSuccess() {
4499
      return this.success != null;
4500
    }
4501
 
4502
    public void setSuccessIsSet(boolean value) {
4503
      if (!value) {
4504
        this.success = null;
4505
      }
4506
    }
4507
 
4508
    public PurchaseServiceException getE() {
4509
      return this.e;
4510
    }
4511
 
4512
    public void setE(PurchaseServiceException e) {
4513
      this.e = e;
4514
    }
4515
 
4516
    public void unsetE() {
4517
      this.e = null;
4518
    }
4519
 
4520
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
4521
    public boolean isSetE() {
4522
      return this.e != null;
4523
    }
4524
 
4525
    public void setEIsSet(boolean value) {
4526
      if (!value) {
4527
        this.e = null;
4528
      }
4529
    }
4530
 
4531
    public void setFieldValue(_Fields field, Object value) {
4532
      switch (field) {
4533
      case SUCCESS:
4534
        if (value == null) {
4535
          unsetSuccess();
4536
        } else {
4537
          setSuccess((List<PurchaseOrder>)value);
4538
        }
4539
        break;
4540
 
4541
      case E:
4542
        if (value == null) {
4543
          unsetE();
4544
        } else {
4545
          setE((PurchaseServiceException)value);
4546
        }
4547
        break;
4548
 
4549
      }
4550
    }
4551
 
4552
    public Object getFieldValue(_Fields field) {
4553
      switch (field) {
4554
      case SUCCESS:
4555
        return getSuccess();
4556
 
4557
      case E:
4558
        return getE();
4559
 
4560
      }
4561
      throw new IllegalStateException();
4562
    }
4563
 
4564
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4565
    public boolean isSet(_Fields field) {
4566
      if (field == null) {
4567
        throw new IllegalArgumentException();
4568
      }
4569
 
4570
      switch (field) {
4571
      case SUCCESS:
4572
        return isSetSuccess();
4573
      case E:
4574
        return isSetE();
4575
      }
4576
      throw new IllegalStateException();
4577
    }
4578
 
4579
    @Override
4580
    public boolean equals(Object that) {
4581
      if (that == null)
4582
        return false;
4583
      if (that instanceof getAllPurchaseOrders_result)
4584
        return this.equals((getAllPurchaseOrders_result)that);
4585
      return false;
4586
    }
4587
 
4588
    public boolean equals(getAllPurchaseOrders_result that) {
4589
      if (that == null)
4590
        return false;
4591
 
4592
      boolean this_present_success = true && this.isSetSuccess();
4593
      boolean that_present_success = true && that.isSetSuccess();
4594
      if (this_present_success || that_present_success) {
4595
        if (!(this_present_success && that_present_success))
4596
          return false;
4597
        if (!this.success.equals(that.success))
4598
          return false;
4599
      }
4600
 
4601
      boolean this_present_e = true && this.isSetE();
4602
      boolean that_present_e = true && that.isSetE();
4603
      if (this_present_e || that_present_e) {
4604
        if (!(this_present_e && that_present_e))
4605
          return false;
4606
        if (!this.e.equals(that.e))
4607
          return false;
4608
      }
4609
 
4610
      return true;
4611
    }
4612
 
4613
    @Override
4614
    public int hashCode() {
4615
      return 0;
4616
    }
4617
 
4618
    public int compareTo(getAllPurchaseOrders_result other) {
4619
      if (!getClass().equals(other.getClass())) {
4620
        return getClass().getName().compareTo(other.getClass().getName());
4621
      }
4622
 
4623
      int lastComparison = 0;
4624
      getAllPurchaseOrders_result typedOther = (getAllPurchaseOrders_result)other;
4625
 
4626
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
4627
      if (lastComparison != 0) {
4628
        return lastComparison;
4629
      }
4630
      if (isSetSuccess()) {
4631
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4632
        if (lastComparison != 0) {
4633
          return lastComparison;
4634
        }
4635
      }
4636
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
4637
      if (lastComparison != 0) {
4638
        return lastComparison;
4639
      }
4640
      if (isSetE()) {
4641
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
4642
        if (lastComparison != 0) {
4643
          return lastComparison;
4644
        }
4645
      }
4646
      return 0;
4647
    }
4648
 
4649
    public _Fields fieldForId(int fieldId) {
4650
      return _Fields.findByThriftId(fieldId);
4651
    }
4652
 
4653
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4654
      org.apache.thrift.protocol.TField field;
4655
      iprot.readStructBegin();
4656
      while (true)
4657
      {
4658
        field = iprot.readFieldBegin();
4659
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4660
          break;
4661
        }
4662
        switch (field.id) {
4663
          case 0: // SUCCESS
4664
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
4665
              {
4666
                org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
4667
                this.success = new ArrayList<PurchaseOrder>(_list4.size);
4668
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
4669
                {
4670
                  PurchaseOrder _elem6; // required
4671
                  _elem6 = new PurchaseOrder();
4672
                  _elem6.read(iprot);
4673
                  this.success.add(_elem6);
4674
                }
4675
                iprot.readListEnd();
4676
              }
4677
            } else { 
4678
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4679
            }
4680
            break;
4681
          case 1: // E
4682
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4683
              this.e = new PurchaseServiceException();
4684
              this.e.read(iprot);
4685
            } else { 
4686
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4687
            }
4688
            break;
4689
          default:
4690
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4691
        }
4692
        iprot.readFieldEnd();
4693
      }
4694
      iprot.readStructEnd();
4695
      validate();
4696
    }
4697
 
4698
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4699
      oprot.writeStructBegin(STRUCT_DESC);
4700
 
4701
      if (this.isSetSuccess()) {
4702
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4703
        {
4704
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
4705
          for (PurchaseOrder _iter7 : this.success)
4706
          {
4707
            _iter7.write(oprot);
4708
          }
4709
          oprot.writeListEnd();
4710
        }
4711
        oprot.writeFieldEnd();
4712
      } else if (this.isSetE()) {
4713
        oprot.writeFieldBegin(E_FIELD_DESC);
4714
        this.e.write(oprot);
4715
        oprot.writeFieldEnd();
4716
      }
4717
      oprot.writeFieldStop();
4718
      oprot.writeStructEnd();
4719
    }
4720
 
4721
    @Override
4722
    public String toString() {
4723
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_result(");
4724
      boolean first = true;
4725
 
4726
      sb.append("success:");
4727
      if (this.success == null) {
4728
        sb.append("null");
4729
      } else {
4730
        sb.append(this.success);
4731
      }
4732
      first = false;
4733
      if (!first) sb.append(", ");
4734
      sb.append("e:");
4735
      if (this.e == null) {
4736
        sb.append("null");
4737
      } else {
4738
        sb.append(this.e);
4739
      }
4740
      first = false;
4741
      sb.append(")");
4742
      return sb.toString();
4743
    }
4744
 
4745
    public void validate() throws org.apache.thrift.TException {
4746
      // check for required fields
4747
    }
4748
 
4749
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4750
      try {
4751
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4752
      } catch (org.apache.thrift.TException te) {
4753
        throw new java.io.IOException(te);
4754
      }
4755
    }
4756
 
4757
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4758
      try {
4759
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4760
      } catch (org.apache.thrift.TException te) {
4761
        throw new java.io.IOException(te);
4762
      }
4763
    }
4764
 
4765
  }
4766
 
4767
  public static class getSupplier_args implements org.apache.thrift.TBase<getSupplier_args, getSupplier_args._Fields>, java.io.Serializable, Cloneable   {
4768
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_args");
4769
 
4770
    private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);
4771
 
4772
    private long id; // required
4773
 
4774
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4775
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4776
      ID((short)1, "id");
4777
 
4778
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4779
 
4780
      static {
4781
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4782
          byName.put(field.getFieldName(), field);
4783
        }
4784
      }
4785
 
4786
      /**
4787
       * Find the _Fields constant that matches fieldId, or null if its not found.
4788
       */
4789
      public static _Fields findByThriftId(int fieldId) {
4790
        switch(fieldId) {
4791
          case 1: // ID
4792
            return ID;
4793
          default:
4794
            return null;
4795
        }
4796
      }
4797
 
4798
      /**
4799
       * Find the _Fields constant that matches fieldId, throwing an exception
4800
       * if it is not found.
4801
       */
4802
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4803
        _Fields fields = findByThriftId(fieldId);
4804
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4805
        return fields;
4806
      }
4807
 
4808
      /**
4809
       * Find the _Fields constant that matches name, or null if its not found.
4810
       */
4811
      public static _Fields findByName(String name) {
4812
        return byName.get(name);
4813
      }
4814
 
4815
      private final short _thriftId;
4816
      private final String _fieldName;
4817
 
4818
      _Fields(short thriftId, String fieldName) {
4819
        _thriftId = thriftId;
4820
        _fieldName = fieldName;
4821
      }
4822
 
4823
      public short getThriftFieldId() {
4824
        return _thriftId;
4825
      }
4826
 
4827
      public String getFieldName() {
4828
        return _fieldName;
4829
      }
4830
    }
4831
 
4832
    // isset id assignments
4833
    private static final int __ID_ISSET_ID = 0;
4834
    private BitSet __isset_bit_vector = new BitSet(1);
4835
 
4836
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4837
    static {
4838
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4839
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4840
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4841
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4842
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_args.class, metaDataMap);
4843
    }
4844
 
4845
    public getSupplier_args() {
4846
    }
4847
 
4848
    public getSupplier_args(
4849
      long id)
4850
    {
4851
      this();
4852
      this.id = id;
4853
      setIdIsSet(true);
4854
    }
4855
 
4856
    /**
4857
     * Performs a deep copy on <i>other</i>.
4858
     */
4859
    public getSupplier_args(getSupplier_args other) {
4860
      __isset_bit_vector.clear();
4861
      __isset_bit_vector.or(other.__isset_bit_vector);
4862
      this.id = other.id;
4863
    }
4864
 
4865
    public getSupplier_args deepCopy() {
4866
      return new getSupplier_args(this);
4867
    }
4868
 
4869
    @Override
4870
    public void clear() {
4871
      setIdIsSet(false);
4872
      this.id = 0;
4873
    }
4874
 
4875
    public long getId() {
4876
      return this.id;
4877
    }
4878
 
4879
    public void setId(long id) {
4880
      this.id = id;
4881
      setIdIsSet(true);
4882
    }
4883
 
4884
    public void unsetId() {
4885
      __isset_bit_vector.clear(__ID_ISSET_ID);
4886
    }
4887
 
4888
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
4889
    public boolean isSetId() {
4890
      return __isset_bit_vector.get(__ID_ISSET_ID);
4891
    }
4892
 
4893
    public void setIdIsSet(boolean value) {
4894
      __isset_bit_vector.set(__ID_ISSET_ID, value);
4895
    }
4896
 
4897
    public void setFieldValue(_Fields field, Object value) {
4898
      switch (field) {
4899
      case ID:
4900
        if (value == null) {
4901
          unsetId();
4902
        } else {
4903
          setId((Long)value);
4904
        }
4905
        break;
4906
 
4907
      }
4908
    }
4909
 
4910
    public Object getFieldValue(_Fields field) {
4911
      switch (field) {
4912
      case ID:
4913
        return Long.valueOf(getId());
4914
 
4915
      }
4916
      throw new IllegalStateException();
4917
    }
4918
 
4919
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4920
    public boolean isSet(_Fields field) {
4921
      if (field == null) {
4922
        throw new IllegalArgumentException();
4923
      }
4924
 
4925
      switch (field) {
4926
      case ID:
4927
        return isSetId();
4928
      }
4929
      throw new IllegalStateException();
4930
    }
4931
 
4932
    @Override
4933
    public boolean equals(Object that) {
4934
      if (that == null)
4935
        return false;
4936
      if (that instanceof getSupplier_args)
4937
        return this.equals((getSupplier_args)that);
4938
      return false;
4939
    }
4940
 
4941
    public boolean equals(getSupplier_args that) {
4942
      if (that == null)
4943
        return false;
4944
 
4945
      boolean this_present_id = true;
4946
      boolean that_present_id = true;
4947
      if (this_present_id || that_present_id) {
4948
        if (!(this_present_id && that_present_id))
4949
          return false;
4950
        if (this.id != that.id)
4951
          return false;
4952
      }
4953
 
4954
      return true;
4955
    }
4956
 
4957
    @Override
4958
    public int hashCode() {
4959
      return 0;
4960
    }
4961
 
4962
    public int compareTo(getSupplier_args other) {
4963
      if (!getClass().equals(other.getClass())) {
4964
        return getClass().getName().compareTo(other.getClass().getName());
4965
      }
4966
 
4967
      int lastComparison = 0;
4968
      getSupplier_args typedOther = (getSupplier_args)other;
4969
 
4970
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
4971
      if (lastComparison != 0) {
4972
        return lastComparison;
4973
      }
4974
      if (isSetId()) {
4975
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
4976
        if (lastComparison != 0) {
4977
          return lastComparison;
4978
        }
4979
      }
4980
      return 0;
4981
    }
4982
 
4983
    public _Fields fieldForId(int fieldId) {
4984
      return _Fields.findByThriftId(fieldId);
4985
    }
4986
 
4987
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4988
      org.apache.thrift.protocol.TField field;
4989
      iprot.readStructBegin();
4990
      while (true)
4991
      {
4992
        field = iprot.readFieldBegin();
4993
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4994
          break;
4995
        }
4996
        switch (field.id) {
4997
          case 1: // ID
4998
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4999
              this.id = iprot.readI64();
5000
              setIdIsSet(true);
5001
            } else { 
5002
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5003
            }
5004
            break;
5005
          default:
5006
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5007
        }
5008
        iprot.readFieldEnd();
5009
      }
5010
      iprot.readStructEnd();
5011
      validate();
5012
    }
5013
 
5014
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5015
      validate();
5016
 
5017
      oprot.writeStructBegin(STRUCT_DESC);
5018
      oprot.writeFieldBegin(ID_FIELD_DESC);
5019
      oprot.writeI64(this.id);
5020
      oprot.writeFieldEnd();
5021
      oprot.writeFieldStop();
5022
      oprot.writeStructEnd();
5023
    }
5024
 
5025
    @Override
5026
    public String toString() {
5027
      StringBuilder sb = new StringBuilder("getSupplier_args(");
5028
      boolean first = true;
5029
 
5030
      sb.append("id:");
5031
      sb.append(this.id);
5032
      first = false;
5033
      sb.append(")");
5034
      return sb.toString();
5035
    }
5036
 
5037
    public void validate() throws org.apache.thrift.TException {
5038
      // check for required fields
5039
    }
5040
 
5041
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5042
      try {
5043
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5044
      } catch (org.apache.thrift.TException te) {
5045
        throw new java.io.IOException(te);
5046
      }
5047
    }
5048
 
5049
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5050
      try {
5051
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
5052
        __isset_bit_vector = new BitSet(1);
5053
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5054
      } catch (org.apache.thrift.TException te) {
5055
        throw new java.io.IOException(te);
5056
      }
5057
    }
5058
 
5059
  }
5060
 
5061
  public static class getSupplier_result implements org.apache.thrift.TBase<getSupplier_result, getSupplier_result._Fields>, java.io.Serializable, Cloneable   {
5062
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_result");
5063
 
5064
    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);
5065
    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
5066
 
5067
    private Supplier success; // required
5068
    private PurchaseServiceException e; // required
5069
 
5070
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5071
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5072
      SUCCESS((short)0, "success"),
5073
      E((short)1, "e");
5074
 
5075
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5076
 
5077
      static {
5078
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5079
          byName.put(field.getFieldName(), field);
5080
        }
5081
      }
5082
 
5083
      /**
5084
       * Find the _Fields constant that matches fieldId, or null if its not found.
5085
       */
5086
      public static _Fields findByThriftId(int fieldId) {
5087
        switch(fieldId) {
5088
          case 0: // SUCCESS
5089
            return SUCCESS;
5090
          case 1: // E
5091
            return E;
5092
          default:
5093
            return null;
5094
        }
5095
      }
5096
 
5097
      /**
5098
       * Find the _Fields constant that matches fieldId, throwing an exception
5099
       * if it is not found.
5100
       */
5101
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5102
        _Fields fields = findByThriftId(fieldId);
5103
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5104
        return fields;
5105
      }
5106
 
5107
      /**
5108
       * Find the _Fields constant that matches name, or null if its not found.
5109
       */
5110
      public static _Fields findByName(String name) {
5111
        return byName.get(name);
5112
      }
5113
 
5114
      private final short _thriftId;
5115
      private final String _fieldName;
5116
 
5117
      _Fields(short thriftId, String fieldName) {
5118
        _thriftId = thriftId;
5119
        _fieldName = fieldName;
5120
      }
5121
 
5122
      public short getThriftFieldId() {
5123
        return _thriftId;
5124
      }
5125
 
5126
      public String getFieldName() {
5127
        return _fieldName;
5128
      }
5129
    }
5130
 
5131
    // isset id assignments
5132
 
5133
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5134
    static {
5135
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5136
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5137
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
5138
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5139
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5140
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5141
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_result.class, metaDataMap);
5142
    }
5143
 
5144
    public getSupplier_result() {
5145
    }
5146
 
5147
    public getSupplier_result(
5148
      Supplier success,
5149
      PurchaseServiceException e)
5150
    {
5151
      this();
5152
      this.success = success;
5153
      this.e = e;
5154
    }
5155
 
5156
    /**
5157
     * Performs a deep copy on <i>other</i>.
5158
     */
5159
    public getSupplier_result(getSupplier_result other) {
5160
      if (other.isSetSuccess()) {
5161
        this.success = new Supplier(other.success);
5162
      }
5163
      if (other.isSetE()) {
5164
        this.e = new PurchaseServiceException(other.e);
5165
      }
5166
    }
5167
 
5168
    public getSupplier_result deepCopy() {
5169
      return new getSupplier_result(this);
5170
    }
5171
 
5172
    @Override
5173
    public void clear() {
5174
      this.success = null;
5175
      this.e = null;
5176
    }
5177
 
5178
    public Supplier getSuccess() {
5179
      return this.success;
5180
    }
5181
 
5182
    public void setSuccess(Supplier success) {
5183
      this.success = success;
5184
    }
5185
 
5186
    public void unsetSuccess() {
5187
      this.success = null;
5188
    }
5189
 
5190
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5191
    public boolean isSetSuccess() {
5192
      return this.success != null;
5193
    }
5194
 
5195
    public void setSuccessIsSet(boolean value) {
5196
      if (!value) {
5197
        this.success = null;
5198
      }
5199
    }
5200
 
5201
    public PurchaseServiceException getE() {
5202
      return this.e;
5203
    }
5204
 
5205
    public void setE(PurchaseServiceException e) {
5206
      this.e = e;
5207
    }
5208
 
5209
    public void unsetE() {
5210
      this.e = null;
5211
    }
5212
 
5213
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
5214
    public boolean isSetE() {
5215
      return this.e != null;
5216
    }
5217
 
5218
    public void setEIsSet(boolean value) {
5219
      if (!value) {
5220
        this.e = null;
5221
      }
5222
    }
5223
 
5224
    public void setFieldValue(_Fields field, Object value) {
5225
      switch (field) {
5226
      case SUCCESS:
5227
        if (value == null) {
5228
          unsetSuccess();
5229
        } else {
5230
          setSuccess((Supplier)value);
5231
        }
5232
        break;
5233
 
5234
      case E:
5235
        if (value == null) {
5236
          unsetE();
5237
        } else {
5238
          setE((PurchaseServiceException)value);
5239
        }
5240
        break;
5241
 
5242
      }
5243
    }
5244
 
5245
    public Object getFieldValue(_Fields field) {
5246
      switch (field) {
5247
      case SUCCESS:
5248
        return getSuccess();
5249
 
5250
      case E:
5251
        return getE();
5252
 
5253
      }
5254
      throw new IllegalStateException();
5255
    }
5256
 
5257
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5258
    public boolean isSet(_Fields field) {
5259
      if (field == null) {
5260
        throw new IllegalArgumentException();
5261
      }
5262
 
5263
      switch (field) {
5264
      case SUCCESS:
5265
        return isSetSuccess();
5266
      case E:
5267
        return isSetE();
5268
      }
5269
      throw new IllegalStateException();
5270
    }
5271
 
5272
    @Override
5273
    public boolean equals(Object that) {
5274
      if (that == null)
5275
        return false;
5276
      if (that instanceof getSupplier_result)
5277
        return this.equals((getSupplier_result)that);
5278
      return false;
5279
    }
5280
 
5281
    public boolean equals(getSupplier_result that) {
5282
      if (that == null)
5283
        return false;
5284
 
5285
      boolean this_present_success = true && this.isSetSuccess();
5286
      boolean that_present_success = true && that.isSetSuccess();
5287
      if (this_present_success || that_present_success) {
5288
        if (!(this_present_success && that_present_success))
5289
          return false;
5290
        if (!this.success.equals(that.success))
5291
          return false;
5292
      }
5293
 
5294
      boolean this_present_e = true && this.isSetE();
5295
      boolean that_present_e = true && that.isSetE();
5296
      if (this_present_e || that_present_e) {
5297
        if (!(this_present_e && that_present_e))
5298
          return false;
5299
        if (!this.e.equals(that.e))
5300
          return false;
5301
      }
5302
 
5303
      return true;
5304
    }
5305
 
5306
    @Override
5307
    public int hashCode() {
5308
      return 0;
5309
    }
5310
 
5311
    public int compareTo(getSupplier_result other) {
5312
      if (!getClass().equals(other.getClass())) {
5313
        return getClass().getName().compareTo(other.getClass().getName());
5314
      }
5315
 
5316
      int lastComparison = 0;
5317
      getSupplier_result typedOther = (getSupplier_result)other;
5318
 
5319
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5320
      if (lastComparison != 0) {
5321
        return lastComparison;
5322
      }
5323
      if (isSetSuccess()) {
5324
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5325
        if (lastComparison != 0) {
5326
          return lastComparison;
5327
        }
5328
      }
5329
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
5330
      if (lastComparison != 0) {
5331
        return lastComparison;
5332
      }
5333
      if (isSetE()) {
5334
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
5335
        if (lastComparison != 0) {
5336
          return lastComparison;
5337
        }
5338
      }
5339
      return 0;
5340
    }
5341
 
5342
    public _Fields fieldForId(int fieldId) {
5343
      return _Fields.findByThriftId(fieldId);
5344
    }
5345
 
5346
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5347
      org.apache.thrift.protocol.TField field;
5348
      iprot.readStructBegin();
5349
      while (true)
5350
      {
5351
        field = iprot.readFieldBegin();
5352
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5353
          break;
5354
        }
5355
        switch (field.id) {
5356
          case 0: // SUCCESS
5357
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5358
              this.success = new Supplier();
5359
              this.success.read(iprot);
5360
            } else { 
5361
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5362
            }
5363
            break;
5364
          case 1: // E
5365
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5366
              this.e = new PurchaseServiceException();
5367
              this.e.read(iprot);
5368
            } else { 
5369
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5370
            }
5371
            break;
5372
          default:
5373
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5374
        }
5375
        iprot.readFieldEnd();
5376
      }
5377
      iprot.readStructEnd();
5378
      validate();
5379
    }
5380
 
5381
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5382
      oprot.writeStructBegin(STRUCT_DESC);
5383
 
5384
      if (this.isSetSuccess()) {
5385
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5386
        this.success.write(oprot);
5387
        oprot.writeFieldEnd();
5388
      } else if (this.isSetE()) {
5389
        oprot.writeFieldBegin(E_FIELD_DESC);
5390
        this.e.write(oprot);
5391
        oprot.writeFieldEnd();
5392
      }
5393
      oprot.writeFieldStop();
5394
      oprot.writeStructEnd();
5395
    }
5396
 
5397
    @Override
5398
    public String toString() {
5399
      StringBuilder sb = new StringBuilder("getSupplier_result(");
5400
      boolean first = true;
5401
 
5402
      sb.append("success:");
5403
      if (this.success == null) {
5404
        sb.append("null");
5405
      } else {
5406
        sb.append(this.success);
5407
      }
5408
      first = false;
5409
      if (!first) sb.append(", ");
5410
      sb.append("e:");
5411
      if (this.e == null) {
5412
        sb.append("null");
5413
      } else {
5414
        sb.append(this.e);
5415
      }
5416
      first = false;
5417
      sb.append(")");
5418
      return sb.toString();
5419
    }
5420
 
5421
    public void validate() throws org.apache.thrift.TException {
5422
      // check for required fields
5423
    }
5424
 
5425
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5426
      try {
5427
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5428
      } catch (org.apache.thrift.TException te) {
5429
        throw new java.io.IOException(te);
5430
      }
5431
    }
5432
 
5433
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5434
      try {
5435
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5436
      } catch (org.apache.thrift.TException te) {
5437
        throw new java.io.IOException(te);
5438
      }
5439
    }
5440
 
5441
  }
5442
 
5443
  public static class startPurchase_args implements org.apache.thrift.TBase<startPurchase_args, startPurchase_args._Fields>, java.io.Serializable, Cloneable   {
5444
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_args");
5445
 
5446
    private static final org.apache.thrift.protocol.TField PURCHASE_ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseOrderId", org.apache.thrift.protocol.TType.I64, (short)1);
5447
    private static final org.apache.thrift.protocol.TField INVOICE_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("invoiceNumber", org.apache.thrift.protocol.TType.STRING, (short)2);
5448
    private static final org.apache.thrift.protocol.TField FREIGHT_CHARGES_FIELD_DESC = new org.apache.thrift.protocol.TField("freightCharges", org.apache.thrift.protocol.TType.DOUBLE, (short)3);
5449
 
5450
    private long purchaseOrderId; // required
5451
    private String invoiceNumber; // required
5452
    private double freightCharges; // required
5453
 
5454
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5455
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5456
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
5457
      INVOICE_NUMBER((short)2, "invoiceNumber"),
5458
      FREIGHT_CHARGES((short)3, "freightCharges");
5459
 
5460
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5461
 
5462
      static {
5463
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5464
          byName.put(field.getFieldName(), field);
5465
        }
5466
      }
5467
 
5468
      /**
5469
       * Find the _Fields constant that matches fieldId, or null if its not found.
5470
       */
5471
      public static _Fields findByThriftId(int fieldId) {
5472
        switch(fieldId) {
5473
          case 1: // PURCHASE_ORDER_ID
5474
            return PURCHASE_ORDER_ID;
5475
          case 2: // INVOICE_NUMBER
5476
            return INVOICE_NUMBER;
5477
          case 3: // FREIGHT_CHARGES
5478
            return FREIGHT_CHARGES;
5479
          default:
5480
            return null;
5481
        }
5482
      }
5483
 
5484
      /**
5485
       * Find the _Fields constant that matches fieldId, throwing an exception
5486
       * if it is not found.
5487
       */
5488
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5489
        _Fields fields = findByThriftId(fieldId);
5490
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5491
        return fields;
5492
      }
5493
 
5494
      /**
5495
       * Find the _Fields constant that matches name, or null if its not found.
5496
       */
5497
      public static _Fields findByName(String name) {
5498
        return byName.get(name);
5499
      }
5500
 
5501
      private final short _thriftId;
5502
      private final String _fieldName;
5503
 
5504
      _Fields(short thriftId, String fieldName) {
5505
        _thriftId = thriftId;
5506
        _fieldName = fieldName;
5507
      }
5508
 
5509
      public short getThriftFieldId() {
5510
        return _thriftId;
5511
      }
5512
 
5513
      public String getFieldName() {
5514
        return _fieldName;
5515
      }
5516
    }
5517
 
5518
    // isset id assignments
5519
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
5520
    private static final int __FREIGHTCHARGES_ISSET_ID = 1;
5521
    private BitSet __isset_bit_vector = new BitSet(2);
5522
 
5523
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5524
    static {
5525
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5526
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5527
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5528
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5529
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
5530
      tmpMap.put(_Fields.FREIGHT_CHARGES, new org.apache.thrift.meta_data.FieldMetaData("freightCharges", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5531
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
5532
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5533
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_args.class, metaDataMap);
5534
    }
5535
 
5536
    public startPurchase_args() {
5537
    }
5538
 
5539
    public startPurchase_args(
5540
      long purchaseOrderId,
5541
      String invoiceNumber,
5542
      double freightCharges)
5543
    {
5544
      this();
5545
      this.purchaseOrderId = purchaseOrderId;
5546
      setPurchaseOrderIdIsSet(true);
5547
      this.invoiceNumber = invoiceNumber;
5548
      this.freightCharges = freightCharges;
5549
      setFreightChargesIsSet(true);
5550
    }
5551
 
5552
    /**
5553
     * Performs a deep copy on <i>other</i>.
5554
     */
5555
    public startPurchase_args(startPurchase_args other) {
5556
      __isset_bit_vector.clear();
5557
      __isset_bit_vector.or(other.__isset_bit_vector);
5558
      this.purchaseOrderId = other.purchaseOrderId;
5559
      if (other.isSetInvoiceNumber()) {
5560
        this.invoiceNumber = other.invoiceNumber;
5561
      }
5562
      this.freightCharges = other.freightCharges;
5563
    }
5564
 
5565
    public startPurchase_args deepCopy() {
5566
      return new startPurchase_args(this);
5567
    }
5568
 
5569
    @Override
5570
    public void clear() {
5571
      setPurchaseOrderIdIsSet(false);
5572
      this.purchaseOrderId = 0;
5573
      this.invoiceNumber = null;
5574
      setFreightChargesIsSet(false);
5575
      this.freightCharges = 0.0;
5576
    }
5577
 
5578
    public long getPurchaseOrderId() {
5579
      return this.purchaseOrderId;
5580
    }
5581
 
5582
    public void setPurchaseOrderId(long purchaseOrderId) {
5583
      this.purchaseOrderId = purchaseOrderId;
5584
      setPurchaseOrderIdIsSet(true);
5585
    }
5586
 
5587
    public void unsetPurchaseOrderId() {
5588
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
5589
    }
5590
 
5591
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
5592
    public boolean isSetPurchaseOrderId() {
5593
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
5594
    }
5595
 
5596
    public void setPurchaseOrderIdIsSet(boolean value) {
5597
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
5598
    }
5599
 
5600
    public String getInvoiceNumber() {
5601
      return this.invoiceNumber;
5602
    }
5603
 
5604
    public void setInvoiceNumber(String invoiceNumber) {
5605
      this.invoiceNumber = invoiceNumber;
5606
    }
5607
 
5608
    public void unsetInvoiceNumber() {
5609
      this.invoiceNumber = null;
5610
    }
5611
 
5612
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
5613
    public boolean isSetInvoiceNumber() {
5614
      return this.invoiceNumber != null;
5615
    }
5616
 
5617
    public void setInvoiceNumberIsSet(boolean value) {
5618
      if (!value) {
5619
        this.invoiceNumber = null;
5620
      }
5621
    }
5622
 
5623
    public double getFreightCharges() {
5624
      return this.freightCharges;
5625
    }
5626
 
5627
    public void setFreightCharges(double freightCharges) {
5628
      this.freightCharges = freightCharges;
5629
      setFreightChargesIsSet(true);
5630
    }
5631
 
5632
    public void unsetFreightCharges() {
5633
      __isset_bit_vector.clear(__FREIGHTCHARGES_ISSET_ID);
5634
    }
5635
 
5636
    /** Returns true if field freightCharges is set (has been assigned a value) and false otherwise */
5637
    public boolean isSetFreightCharges() {
5638
      return __isset_bit_vector.get(__FREIGHTCHARGES_ISSET_ID);
5639
    }
5640
 
5641
    public void setFreightChargesIsSet(boolean value) {
5642
      __isset_bit_vector.set(__FREIGHTCHARGES_ISSET_ID, value);
5643
    }
5644
 
5645
    public void setFieldValue(_Fields field, Object value) {
5646
      switch (field) {
5647
      case PURCHASE_ORDER_ID:
5648
        if (value == null) {
5649
          unsetPurchaseOrderId();
5650
        } else {
5651
          setPurchaseOrderId((Long)value);
5652
        }
5653
        break;
5654
 
5655
      case INVOICE_NUMBER:
5656
        if (value == null) {
5657
          unsetInvoiceNumber();
5658
        } else {
5659
          setInvoiceNumber((String)value);
5660
        }
5661
        break;
5662
 
5663
      case FREIGHT_CHARGES:
5664
        if (value == null) {
5665
          unsetFreightCharges();
5666
        } else {
5667
          setFreightCharges((Double)value);
5668
        }
5669
        break;
5670
 
5671
      }
5672
    }
5673
 
5674
    public Object getFieldValue(_Fields field) {
5675
      switch (field) {
5676
      case PURCHASE_ORDER_ID:
5677
        return Long.valueOf(getPurchaseOrderId());
5678
 
5679
      case INVOICE_NUMBER:
5680
        return getInvoiceNumber();
5681
 
5682
      case FREIGHT_CHARGES:
5683
        return Double.valueOf(getFreightCharges());
5684
 
5685
      }
5686
      throw new IllegalStateException();
5687
    }
5688
 
5689
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5690
    public boolean isSet(_Fields field) {
5691
      if (field == null) {
5692
        throw new IllegalArgumentException();
5693
      }
5694
 
5695
      switch (field) {
5696
      case PURCHASE_ORDER_ID:
5697
        return isSetPurchaseOrderId();
5698
      case INVOICE_NUMBER:
5699
        return isSetInvoiceNumber();
5700
      case FREIGHT_CHARGES:
5701
        return isSetFreightCharges();
5702
      }
5703
      throw new IllegalStateException();
5704
    }
5705
 
5706
    @Override
5707
    public boolean equals(Object that) {
5708
      if (that == null)
5709
        return false;
5710
      if (that instanceof startPurchase_args)
5711
        return this.equals((startPurchase_args)that);
5712
      return false;
5713
    }
5714
 
5715
    public boolean equals(startPurchase_args that) {
5716
      if (that == null)
5717
        return false;
5718
 
5719
      boolean this_present_purchaseOrderId = true;
5720
      boolean that_present_purchaseOrderId = true;
5721
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
5722
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
5723
          return false;
5724
        if (this.purchaseOrderId != that.purchaseOrderId)
5725
          return false;
5726
      }
5727
 
5728
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
5729
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
5730
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
5731
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
5732
          return false;
5733
        if (!this.invoiceNumber.equals(that.invoiceNumber))
5734
          return false;
5735
      }
5736
 
5737
      boolean this_present_freightCharges = true;
5738
      boolean that_present_freightCharges = true;
5739
      if (this_present_freightCharges || that_present_freightCharges) {
5740
        if (!(this_present_freightCharges && that_present_freightCharges))
5741
          return false;
5742
        if (this.freightCharges != that.freightCharges)
5743
          return false;
5744
      }
5745
 
5746
      return true;
5747
    }
5748
 
5749
    @Override
5750
    public int hashCode() {
5751
      return 0;
5752
    }
5753
 
5754
    public int compareTo(startPurchase_args other) {
5755
      if (!getClass().equals(other.getClass())) {
5756
        return getClass().getName().compareTo(other.getClass().getName());
5757
      }
5758
 
5759
      int lastComparison = 0;
5760
      startPurchase_args typedOther = (startPurchase_args)other;
5761
 
5762
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
5763
      if (lastComparison != 0) {
5764
        return lastComparison;
5765
      }
5766
      if (isSetPurchaseOrderId()) {
5767
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
5768
        if (lastComparison != 0) {
5769
          return lastComparison;
5770
        }
5771
      }
5772
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
5773
      if (lastComparison != 0) {
5774
        return lastComparison;
5775
      }
5776
      if (isSetInvoiceNumber()) {
5777
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
5778
        if (lastComparison != 0) {
5779
          return lastComparison;
5780
        }
5781
      }
5782
      lastComparison = Boolean.valueOf(isSetFreightCharges()).compareTo(typedOther.isSetFreightCharges());
5783
      if (lastComparison != 0) {
5784
        return lastComparison;
5785
      }
5786
      if (isSetFreightCharges()) {
5787
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freightCharges, typedOther.freightCharges);
5788
        if (lastComparison != 0) {
5789
          return lastComparison;
5790
        }
5791
      }
5792
      return 0;
5793
    }
5794
 
5795
    public _Fields fieldForId(int fieldId) {
5796
      return _Fields.findByThriftId(fieldId);
5797
    }
5798
 
5799
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5800
      org.apache.thrift.protocol.TField field;
5801
      iprot.readStructBegin();
5802
      while (true)
5803
      {
5804
        field = iprot.readFieldBegin();
5805
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5806
          break;
5807
        }
5808
        switch (field.id) {
5809
          case 1: // PURCHASE_ORDER_ID
5810
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5811
              this.purchaseOrderId = iprot.readI64();
5812
              setPurchaseOrderIdIsSet(true);
5813
            } else { 
5814
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5815
            }
5816
            break;
5817
          case 2: // INVOICE_NUMBER
5818
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
5819
              this.invoiceNumber = iprot.readString();
5820
            } else { 
5821
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5822
            }
5823
            break;
5824
          case 3: // FREIGHT_CHARGES
5825
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
5826
              this.freightCharges = iprot.readDouble();
5827
              setFreightChargesIsSet(true);
5828
            } else { 
5829
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5830
            }
5831
            break;
5832
          default:
5833
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5834
        }
5835
        iprot.readFieldEnd();
5836
      }
5837
      iprot.readStructEnd();
5838
      validate();
5839
    }
5840
 
5841
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5842
      validate();
5843
 
5844
      oprot.writeStructBegin(STRUCT_DESC);
5845
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
5846
      oprot.writeI64(this.purchaseOrderId);
5847
      oprot.writeFieldEnd();
5848
      if (this.invoiceNumber != null) {
5849
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
5850
        oprot.writeString(this.invoiceNumber);
5851
        oprot.writeFieldEnd();
5852
      }
5853
      oprot.writeFieldBegin(FREIGHT_CHARGES_FIELD_DESC);
5854
      oprot.writeDouble(this.freightCharges);
5855
      oprot.writeFieldEnd();
5856
      oprot.writeFieldStop();
5857
      oprot.writeStructEnd();
5858
    }
5859
 
5860
    @Override
5861
    public String toString() {
5862
      StringBuilder sb = new StringBuilder("startPurchase_args(");
5863
      boolean first = true;
5864
 
5865
      sb.append("purchaseOrderId:");
5866
      sb.append(this.purchaseOrderId);
5867
      first = false;
5868
      if (!first) sb.append(", ");
5869
      sb.append("invoiceNumber:");
5870
      if (this.invoiceNumber == null) {
5871
        sb.append("null");
5872
      } else {
5873
        sb.append(this.invoiceNumber);
5874
      }
5875
      first = false;
5876
      if (!first) sb.append(", ");
5877
      sb.append("freightCharges:");
5878
      sb.append(this.freightCharges);
5879
      first = false;
5880
      sb.append(")");
5881
      return sb.toString();
5882
    }
5883
 
5884
    public void validate() throws org.apache.thrift.TException {
5885
      // check for required fields
5886
    }
5887
 
5888
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5889
      try {
5890
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5891
      } catch (org.apache.thrift.TException te) {
5892
        throw new java.io.IOException(te);
5893
      }
5894
    }
5895
 
5896
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5897
      try {
5898
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5899
      } catch (org.apache.thrift.TException te) {
5900
        throw new java.io.IOException(te);
5901
      }
5902
    }
5903
 
5904
  }
5905
 
5906
  public static class startPurchase_result implements org.apache.thrift.TBase<startPurchase_result, startPurchase_result._Fields>, java.io.Serializable, Cloneable   {
5907
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_result");
5908
 
5909
    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);
5910
    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
5911
 
5912
    private long success; // required
5913
    private PurchaseServiceException e; // required
5914
 
5915
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5916
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5917
      SUCCESS((short)0, "success"),
5918
      E((short)1, "e");
5919
 
5920
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5921
 
5922
      static {
5923
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5924
          byName.put(field.getFieldName(), field);
5925
        }
5926
      }
5927
 
5928
      /**
5929
       * Find the _Fields constant that matches fieldId, or null if its not found.
5930
       */
5931
      public static _Fields findByThriftId(int fieldId) {
5932
        switch(fieldId) {
5933
          case 0: // SUCCESS
5934
            return SUCCESS;
5935
          case 1: // E
5936
            return E;
5937
          default:
5938
            return null;
5939
        }
5940
      }
5941
 
5942
      /**
5943
       * Find the _Fields constant that matches fieldId, throwing an exception
5944
       * if it is not found.
5945
       */
5946
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5947
        _Fields fields = findByThriftId(fieldId);
5948
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5949
        return fields;
5950
      }
5951
 
5952
      /**
5953
       * Find the _Fields constant that matches name, or null if its not found.
5954
       */
5955
      public static _Fields findByName(String name) {
5956
        return byName.get(name);
5957
      }
5958
 
5959
      private final short _thriftId;
5960
      private final String _fieldName;
5961
 
5962
      _Fields(short thriftId, String fieldName) {
5963
        _thriftId = thriftId;
5964
        _fieldName = fieldName;
5965
      }
5966
 
5967
      public short getThriftFieldId() {
5968
        return _thriftId;
5969
      }
5970
 
5971
      public String getFieldName() {
5972
        return _fieldName;
5973
      }
5974
    }
5975
 
5976
    // isset id assignments
5977
    private static final int __SUCCESS_ISSET_ID = 0;
5978
    private BitSet __isset_bit_vector = new BitSet(1);
5979
 
5980
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5981
    static {
5982
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5983
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5984
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5985
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5986
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5987
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5988
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_result.class, metaDataMap);
5989
    }
5990
 
5991
    public startPurchase_result() {
5992
    }
5993
 
5994
    public startPurchase_result(
5995
      long success,
5996
      PurchaseServiceException e)
5997
    {
5998
      this();
5999
      this.success = success;
6000
      setSuccessIsSet(true);
6001
      this.e = e;
6002
    }
6003
 
6004
    /**
6005
     * Performs a deep copy on <i>other</i>.
6006
     */
6007
    public startPurchase_result(startPurchase_result other) {
6008
      __isset_bit_vector.clear();
6009
      __isset_bit_vector.or(other.__isset_bit_vector);
6010
      this.success = other.success;
6011
      if (other.isSetE()) {
6012
        this.e = new PurchaseServiceException(other.e);
6013
      }
6014
    }
6015
 
6016
    public startPurchase_result deepCopy() {
6017
      return new startPurchase_result(this);
6018
    }
6019
 
6020
    @Override
6021
    public void clear() {
6022
      setSuccessIsSet(false);
6023
      this.success = 0;
6024
      this.e = null;
6025
    }
6026
 
6027
    public long getSuccess() {
6028
      return this.success;
6029
    }
6030
 
6031
    public void setSuccess(long success) {
6032
      this.success = success;
6033
      setSuccessIsSet(true);
6034
    }
6035
 
6036
    public void unsetSuccess() {
6037
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
6038
    }
6039
 
6040
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
6041
    public boolean isSetSuccess() {
6042
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
6043
    }
6044
 
6045
    public void setSuccessIsSet(boolean value) {
6046
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
6047
    }
6048
 
6049
    public PurchaseServiceException getE() {
6050
      return this.e;
6051
    }
6052
 
6053
    public void setE(PurchaseServiceException e) {
6054
      this.e = e;
6055
    }
6056
 
6057
    public void unsetE() {
6058
      this.e = null;
6059
    }
6060
 
6061
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
6062
    public boolean isSetE() {
6063
      return this.e != null;
6064
    }
6065
 
6066
    public void setEIsSet(boolean value) {
6067
      if (!value) {
6068
        this.e = null;
6069
      }
6070
    }
6071
 
6072
    public void setFieldValue(_Fields field, Object value) {
6073
      switch (field) {
6074
      case SUCCESS:
6075
        if (value == null) {
6076
          unsetSuccess();
6077
        } else {
6078
          setSuccess((Long)value);
6079
        }
6080
        break;
6081
 
6082
      case E:
6083
        if (value == null) {
6084
          unsetE();
6085
        } else {
6086
          setE((PurchaseServiceException)value);
6087
        }
6088
        break;
6089
 
6090
      }
6091
    }
6092
 
6093
    public Object getFieldValue(_Fields field) {
6094
      switch (field) {
6095
      case SUCCESS:
6096
        return Long.valueOf(getSuccess());
6097
 
6098
      case E:
6099
        return getE();
6100
 
6101
      }
6102
      throw new IllegalStateException();
6103
    }
6104
 
6105
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6106
    public boolean isSet(_Fields field) {
6107
      if (field == null) {
6108
        throw new IllegalArgumentException();
6109
      }
6110
 
6111
      switch (field) {
6112
      case SUCCESS:
6113
        return isSetSuccess();
6114
      case E:
6115
        return isSetE();
6116
      }
6117
      throw new IllegalStateException();
6118
    }
6119
 
6120
    @Override
6121
    public boolean equals(Object that) {
6122
      if (that == null)
6123
        return false;
6124
      if (that instanceof startPurchase_result)
6125
        return this.equals((startPurchase_result)that);
6126
      return false;
6127
    }
6128
 
6129
    public boolean equals(startPurchase_result that) {
6130
      if (that == null)
6131
        return false;
6132
 
6133
      boolean this_present_success = true;
6134
      boolean that_present_success = true;
6135
      if (this_present_success || that_present_success) {
6136
        if (!(this_present_success && that_present_success))
6137
          return false;
6138
        if (this.success != that.success)
6139
          return false;
6140
      }
6141
 
6142
      boolean this_present_e = true && this.isSetE();
6143
      boolean that_present_e = true && that.isSetE();
6144
      if (this_present_e || that_present_e) {
6145
        if (!(this_present_e && that_present_e))
6146
          return false;
6147
        if (!this.e.equals(that.e))
6148
          return false;
6149
      }
6150
 
6151
      return true;
6152
    }
6153
 
6154
    @Override
6155
    public int hashCode() {
6156
      return 0;
6157
    }
6158
 
6159
    public int compareTo(startPurchase_result other) {
6160
      if (!getClass().equals(other.getClass())) {
6161
        return getClass().getName().compareTo(other.getClass().getName());
6162
      }
6163
 
6164
      int lastComparison = 0;
6165
      startPurchase_result typedOther = (startPurchase_result)other;
6166
 
6167
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
6168
      if (lastComparison != 0) {
6169
        return lastComparison;
6170
      }
6171
      if (isSetSuccess()) {
6172
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6173
        if (lastComparison != 0) {
6174
          return lastComparison;
6175
        }
6176
      }
6177
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
6178
      if (lastComparison != 0) {
6179
        return lastComparison;
6180
      }
6181
      if (isSetE()) {
6182
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
6183
        if (lastComparison != 0) {
6184
          return lastComparison;
6185
        }
6186
      }
6187
      return 0;
6188
    }
6189
 
6190
    public _Fields fieldForId(int fieldId) {
6191
      return _Fields.findByThriftId(fieldId);
6192
    }
6193
 
6194
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6195
      org.apache.thrift.protocol.TField field;
6196
      iprot.readStructBegin();
6197
      while (true)
6198
      {
6199
        field = iprot.readFieldBegin();
6200
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6201
          break;
6202
        }
6203
        switch (field.id) {
6204
          case 0: // SUCCESS
6205
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6206
              this.success = iprot.readI64();
6207
              setSuccessIsSet(true);
6208
            } else { 
6209
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6210
            }
6211
            break;
6212
          case 1: // E
6213
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6214
              this.e = new PurchaseServiceException();
6215
              this.e.read(iprot);
6216
            } else { 
6217
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6218
            }
6219
            break;
6220
          default:
6221
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6222
        }
6223
        iprot.readFieldEnd();
6224
      }
6225
      iprot.readStructEnd();
6226
      validate();
6227
    }
6228
 
6229
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6230
      oprot.writeStructBegin(STRUCT_DESC);
6231
 
6232
      if (this.isSetSuccess()) {
6233
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6234
        oprot.writeI64(this.success);
6235
        oprot.writeFieldEnd();
6236
      } else if (this.isSetE()) {
6237
        oprot.writeFieldBegin(E_FIELD_DESC);
6238
        this.e.write(oprot);
6239
        oprot.writeFieldEnd();
6240
      }
6241
      oprot.writeFieldStop();
6242
      oprot.writeStructEnd();
6243
    }
6244
 
6245
    @Override
6246
    public String toString() {
6247
      StringBuilder sb = new StringBuilder("startPurchase_result(");
6248
      boolean first = true;
6249
 
6250
      sb.append("success:");
6251
      sb.append(this.success);
6252
      first = false;
6253
      if (!first) sb.append(", ");
6254
      sb.append("e:");
6255
      if (this.e == null) {
6256
        sb.append("null");
6257
      } else {
6258
        sb.append(this.e);
6259
      }
6260
      first = false;
6261
      sb.append(")");
6262
      return sb.toString();
6263
    }
6264
 
6265
    public void validate() throws org.apache.thrift.TException {
6266
      // check for required fields
6267
    }
6268
 
6269
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6270
      try {
6271
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6272
      } catch (org.apache.thrift.TException te) {
6273
        throw new java.io.IOException(te);
6274
      }
6275
    }
6276
 
6277
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6278
      try {
6279
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6280
      } catch (org.apache.thrift.TException te) {
6281
        throw new java.io.IOException(te);
6282
      }
6283
    }
6284
 
6285
  }
6286
 
6287
  public static class closePurchase_args implements org.apache.thrift.TBase<closePurchase_args, closePurchase_args._Fields>, java.io.Serializable, Cloneable   {
6288
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_args");
6289
 
6290
    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)1);
6291
 
6292
    private long purchaseId; // required
6293
 
6294
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6295
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6296
      PURCHASE_ID((short)1, "purchaseId");
6297
 
6298
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6299
 
6300
      static {
6301
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6302
          byName.put(field.getFieldName(), field);
6303
        }
6304
      }
6305
 
6306
      /**
6307
       * Find the _Fields constant that matches fieldId, or null if its not found.
6308
       */
6309
      public static _Fields findByThriftId(int fieldId) {
6310
        switch(fieldId) {
6311
          case 1: // PURCHASE_ID
6312
            return PURCHASE_ID;
6313
          default:
6314
            return null;
6315
        }
6316
      }
6317
 
6318
      /**
6319
       * Find the _Fields constant that matches fieldId, throwing an exception
6320
       * if it is not found.
6321
       */
6322
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6323
        _Fields fields = findByThriftId(fieldId);
6324
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6325
        return fields;
6326
      }
6327
 
6328
      /**
6329
       * Find the _Fields constant that matches name, or null if its not found.
6330
       */
6331
      public static _Fields findByName(String name) {
6332
        return byName.get(name);
6333
      }
6334
 
6335
      private final short _thriftId;
6336
      private final String _fieldName;
6337
 
6338
      _Fields(short thriftId, String fieldName) {
6339
        _thriftId = thriftId;
6340
        _fieldName = fieldName;
6341
      }
6342
 
6343
      public short getThriftFieldId() {
6344
        return _thriftId;
6345
      }
6346
 
6347
      public String getFieldName() {
6348
        return _fieldName;
6349
      }
6350
    }
6351
 
6352
    // isset id assignments
6353
    private static final int __PURCHASEID_ISSET_ID = 0;
6354
    private BitSet __isset_bit_vector = new BitSet(1);
6355
 
6356
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6357
    static {
6358
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6359
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6360
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6361
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6362
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_args.class, metaDataMap);
6363
    }
6364
 
6365
    public closePurchase_args() {
6366
    }
6367
 
6368
    public closePurchase_args(
6369
      long purchaseId)
6370
    {
6371
      this();
6372
      this.purchaseId = purchaseId;
6373
      setPurchaseIdIsSet(true);
6374
    }
6375
 
6376
    /**
6377
     * Performs a deep copy on <i>other</i>.
6378
     */
6379
    public closePurchase_args(closePurchase_args other) {
6380
      __isset_bit_vector.clear();
6381
      __isset_bit_vector.or(other.__isset_bit_vector);
6382
      this.purchaseId = other.purchaseId;
6383
    }
6384
 
6385
    public closePurchase_args deepCopy() {
6386
      return new closePurchase_args(this);
6387
    }
6388
 
6389
    @Override
6390
    public void clear() {
6391
      setPurchaseIdIsSet(false);
6392
      this.purchaseId = 0;
6393
    }
6394
 
6395
    public long getPurchaseId() {
6396
      return this.purchaseId;
6397
    }
6398
 
6399
    public void setPurchaseId(long purchaseId) {
6400
      this.purchaseId = purchaseId;
6401
      setPurchaseIdIsSet(true);
6402
    }
6403
 
6404
    public void unsetPurchaseId() {
6405
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
6406
    }
6407
 
6408
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
6409
    public boolean isSetPurchaseId() {
6410
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
6411
    }
6412
 
6413
    public void setPurchaseIdIsSet(boolean value) {
6414
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
6415
    }
6416
 
6417
    public void setFieldValue(_Fields field, Object value) {
6418
      switch (field) {
6419
      case PURCHASE_ID:
6420
        if (value == null) {
6421
          unsetPurchaseId();
6422
        } else {
6423
          setPurchaseId((Long)value);
6424
        }
6425
        break;
6426
 
6427
      }
6428
    }
6429
 
6430
    public Object getFieldValue(_Fields field) {
6431
      switch (field) {
6432
      case PURCHASE_ID:
6433
        return Long.valueOf(getPurchaseId());
6434
 
6435
      }
6436
      throw new IllegalStateException();
6437
    }
6438
 
6439
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6440
    public boolean isSet(_Fields field) {
6441
      if (field == null) {
6442
        throw new IllegalArgumentException();
6443
      }
6444
 
6445
      switch (field) {
6446
      case PURCHASE_ID:
6447
        return isSetPurchaseId();
6448
      }
6449
      throw new IllegalStateException();
6450
    }
6451
 
6452
    @Override
6453
    public boolean equals(Object that) {
6454
      if (that == null)
6455
        return false;
6456
      if (that instanceof closePurchase_args)
6457
        return this.equals((closePurchase_args)that);
6458
      return false;
6459
    }
6460
 
6461
    public boolean equals(closePurchase_args that) {
6462
      if (that == null)
6463
        return false;
6464
 
6465
      boolean this_present_purchaseId = true;
6466
      boolean that_present_purchaseId = true;
6467
      if (this_present_purchaseId || that_present_purchaseId) {
6468
        if (!(this_present_purchaseId && that_present_purchaseId))
6469
          return false;
6470
        if (this.purchaseId != that.purchaseId)
6471
          return false;
6472
      }
6473
 
6474
      return true;
6475
    }
6476
 
6477
    @Override
6478
    public int hashCode() {
6479
      return 0;
6480
    }
6481
 
6482
    public int compareTo(closePurchase_args other) {
6483
      if (!getClass().equals(other.getClass())) {
6484
        return getClass().getName().compareTo(other.getClass().getName());
6485
      }
6486
 
6487
      int lastComparison = 0;
6488
      closePurchase_args typedOther = (closePurchase_args)other;
6489
 
6490
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
6491
      if (lastComparison != 0) {
6492
        return lastComparison;
6493
      }
6494
      if (isSetPurchaseId()) {
6495
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
6496
        if (lastComparison != 0) {
6497
          return lastComparison;
6498
        }
6499
      }
6500
      return 0;
6501
    }
6502
 
6503
    public _Fields fieldForId(int fieldId) {
6504
      return _Fields.findByThriftId(fieldId);
6505
    }
6506
 
6507
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6508
      org.apache.thrift.protocol.TField field;
6509
      iprot.readStructBegin();
6510
      while (true)
6511
      {
6512
        field = iprot.readFieldBegin();
6513
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6514
          break;
6515
        }
6516
        switch (field.id) {
6517
          case 1: // PURCHASE_ID
6518
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6519
              this.purchaseId = iprot.readI64();
6520
              setPurchaseIdIsSet(true);
6521
            } else { 
6522
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6523
            }
6524
            break;
6525
          default:
6526
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6527
        }
6528
        iprot.readFieldEnd();
6529
      }
6530
      iprot.readStructEnd();
6531
      validate();
6532
    }
6533
 
6534
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6535
      validate();
6536
 
6537
      oprot.writeStructBegin(STRUCT_DESC);
6538
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
6539
      oprot.writeI64(this.purchaseId);
6540
      oprot.writeFieldEnd();
6541
      oprot.writeFieldStop();
6542
      oprot.writeStructEnd();
6543
    }
6544
 
6545
    @Override
6546
    public String toString() {
6547
      StringBuilder sb = new StringBuilder("closePurchase_args(");
6548
      boolean first = true;
6549
 
6550
      sb.append("purchaseId:");
6551
      sb.append(this.purchaseId);
6552
      first = false;
6553
      sb.append(")");
6554
      return sb.toString();
6555
    }
6556
 
6557
    public void validate() throws org.apache.thrift.TException {
6558
      // check for required fields
6559
    }
6560
 
6561
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6562
      try {
6563
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6564
      } catch (org.apache.thrift.TException te) {
6565
        throw new java.io.IOException(te);
6566
      }
6567
    }
6568
 
6569
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6570
      try {
6571
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6572
      } catch (org.apache.thrift.TException te) {
6573
        throw new java.io.IOException(te);
6574
      }
6575
    }
6576
 
6577
  }
6578
 
6579
  public static class closePurchase_result implements org.apache.thrift.TBase<closePurchase_result, closePurchase_result._Fields>, java.io.Serializable, Cloneable   {
6580
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_result");
6581
 
6582
    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);
6583
    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
6584
 
6585
    private long success; // required
6586
    private PurchaseServiceException e; // required
6587
 
6588
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6589
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6590
      SUCCESS((short)0, "success"),
6591
      E((short)1, "e");
6592
 
6593
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6594
 
6595
      static {
6596
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6597
          byName.put(field.getFieldName(), field);
6598
        }
6599
      }
6600
 
6601
      /**
6602
       * Find the _Fields constant that matches fieldId, or null if its not found.
6603
       */
6604
      public static _Fields findByThriftId(int fieldId) {
6605
        switch(fieldId) {
6606
          case 0: // SUCCESS
6607
            return SUCCESS;
6608
          case 1: // E
6609
            return E;
6610
          default:
6611
            return null;
6612
        }
6613
      }
6614
 
6615
      /**
6616
       * Find the _Fields constant that matches fieldId, throwing an exception
6617
       * if it is not found.
6618
       */
6619
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6620
        _Fields fields = findByThriftId(fieldId);
6621
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6622
        return fields;
6623
      }
6624
 
6625
      /**
6626
       * Find the _Fields constant that matches name, or null if its not found.
6627
       */
6628
      public static _Fields findByName(String name) {
6629
        return byName.get(name);
6630
      }
6631
 
6632
      private final short _thriftId;
6633
      private final String _fieldName;
6634
 
6635
      _Fields(short thriftId, String fieldName) {
6636
        _thriftId = thriftId;
6637
        _fieldName = fieldName;
6638
      }
6639
 
6640
      public short getThriftFieldId() {
6641
        return _thriftId;
6642
      }
6643
 
6644
      public String getFieldName() {
6645
        return _fieldName;
6646
      }
6647
    }
6648
 
6649
    // isset id assignments
6650
    private static final int __SUCCESS_ISSET_ID = 0;
6651
    private BitSet __isset_bit_vector = new BitSet(1);
6652
 
6653
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6654
    static {
6655
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6656
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6657
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6658
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6659
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
6660
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6661
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_result.class, metaDataMap);
6662
    }
6663
 
6664
    public closePurchase_result() {
6665
    }
6666
 
6667
    public closePurchase_result(
6668
      long success,
6669
      PurchaseServiceException e)
6670
    {
6671
      this();
6672
      this.success = success;
6673
      setSuccessIsSet(true);
6674
      this.e = e;
6675
    }
6676
 
6677
    /**
6678
     * Performs a deep copy on <i>other</i>.
6679
     */
6680
    public closePurchase_result(closePurchase_result other) {
6681
      __isset_bit_vector.clear();
6682
      __isset_bit_vector.or(other.__isset_bit_vector);
6683
      this.success = other.success;
6684
      if (other.isSetE()) {
6685
        this.e = new PurchaseServiceException(other.e);
6686
      }
6687
    }
6688
 
6689
    public closePurchase_result deepCopy() {
6690
      return new closePurchase_result(this);
6691
    }
6692
 
6693
    @Override
6694
    public void clear() {
6695
      setSuccessIsSet(false);
6696
      this.success = 0;
6697
      this.e = null;
6698
    }
6699
 
6700
    public long getSuccess() {
6701
      return this.success;
6702
    }
6703
 
6704
    public void setSuccess(long success) {
6705
      this.success = success;
6706
      setSuccessIsSet(true);
6707
    }
6708
 
6709
    public void unsetSuccess() {
6710
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
6711
    }
6712
 
6713
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
6714
    public boolean isSetSuccess() {
6715
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
6716
    }
6717
 
6718
    public void setSuccessIsSet(boolean value) {
6719
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
6720
    }
6721
 
6722
    public PurchaseServiceException getE() {
6723
      return this.e;
6724
    }
6725
 
6726
    public void setE(PurchaseServiceException e) {
6727
      this.e = e;
6728
    }
6729
 
6730
    public void unsetE() {
6731
      this.e = null;
6732
    }
6733
 
6734
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
6735
    public boolean isSetE() {
6736
      return this.e != null;
6737
    }
6738
 
6739
    public void setEIsSet(boolean value) {
6740
      if (!value) {
6741
        this.e = null;
6742
      }
6743
    }
6744
 
6745
    public void setFieldValue(_Fields field, Object value) {
6746
      switch (field) {
6747
      case SUCCESS:
6748
        if (value == null) {
6749
          unsetSuccess();
6750
        } else {
6751
          setSuccess((Long)value);
6752
        }
6753
        break;
6754
 
6755
      case E:
6756
        if (value == null) {
6757
          unsetE();
6758
        } else {
6759
          setE((PurchaseServiceException)value);
6760
        }
6761
        break;
6762
 
6763
      }
6764
    }
6765
 
6766
    public Object getFieldValue(_Fields field) {
6767
      switch (field) {
6768
      case SUCCESS:
6769
        return Long.valueOf(getSuccess());
6770
 
6771
      case E:
6772
        return getE();
6773
 
6774
      }
6775
      throw new IllegalStateException();
6776
    }
6777
 
6778
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6779
    public boolean isSet(_Fields field) {
6780
      if (field == null) {
6781
        throw new IllegalArgumentException();
6782
      }
6783
 
6784
      switch (field) {
6785
      case SUCCESS:
6786
        return isSetSuccess();
6787
      case E:
6788
        return isSetE();
6789
      }
6790
      throw new IllegalStateException();
6791
    }
6792
 
6793
    @Override
6794
    public boolean equals(Object that) {
6795
      if (that == null)
6796
        return false;
6797
      if (that instanceof closePurchase_result)
6798
        return this.equals((closePurchase_result)that);
6799
      return false;
6800
    }
6801
 
6802
    public boolean equals(closePurchase_result that) {
6803
      if (that == null)
6804
        return false;
6805
 
6806
      boolean this_present_success = true;
6807
      boolean that_present_success = true;
6808
      if (this_present_success || that_present_success) {
6809
        if (!(this_present_success && that_present_success))
6810
          return false;
6811
        if (this.success != that.success)
6812
          return false;
6813
      }
6814
 
6815
      boolean this_present_e = true && this.isSetE();
6816
      boolean that_present_e = true && that.isSetE();
6817
      if (this_present_e || that_present_e) {
6818
        if (!(this_present_e && that_present_e))
6819
          return false;
6820
        if (!this.e.equals(that.e))
6821
          return false;
6822
      }
6823
 
6824
      return true;
6825
    }
6826
 
6827
    @Override
6828
    public int hashCode() {
6829
      return 0;
6830
    }
6831
 
6832
    public int compareTo(closePurchase_result other) {
6833
      if (!getClass().equals(other.getClass())) {
6834
        return getClass().getName().compareTo(other.getClass().getName());
6835
      }
6836
 
6837
      int lastComparison = 0;
6838
      closePurchase_result typedOther = (closePurchase_result)other;
6839
 
6840
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
6841
      if (lastComparison != 0) {
6842
        return lastComparison;
6843
      }
6844
      if (isSetSuccess()) {
6845
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6846
        if (lastComparison != 0) {
6847
          return lastComparison;
6848
        }
6849
      }
6850
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
6851
      if (lastComparison != 0) {
6852
        return lastComparison;
6853
      }
6854
      if (isSetE()) {
6855
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
6856
        if (lastComparison != 0) {
6857
          return lastComparison;
6858
        }
6859
      }
6860
      return 0;
6861
    }
6862
 
6863
    public _Fields fieldForId(int fieldId) {
6864
      return _Fields.findByThriftId(fieldId);
6865
    }
6866
 
6867
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6868
      org.apache.thrift.protocol.TField field;
6869
      iprot.readStructBegin();
6870
      while (true)
6871
      {
6872
        field = iprot.readFieldBegin();
6873
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6874
          break;
6875
        }
6876
        switch (field.id) {
6877
          case 0: // SUCCESS
6878
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6879
              this.success = iprot.readI64();
6880
              setSuccessIsSet(true);
6881
            } else { 
6882
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6883
            }
6884
            break;
6885
          case 1: // E
6886
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6887
              this.e = new PurchaseServiceException();
6888
              this.e.read(iprot);
6889
            } else { 
6890
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6891
            }
6892
            break;
6893
          default:
6894
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6895
        }
6896
        iprot.readFieldEnd();
6897
      }
6898
      iprot.readStructEnd();
6899
      validate();
6900
    }
6901
 
6902
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6903
      oprot.writeStructBegin(STRUCT_DESC);
6904
 
6905
      if (this.isSetSuccess()) {
6906
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6907
        oprot.writeI64(this.success);
6908
        oprot.writeFieldEnd();
6909
      } else if (this.isSetE()) {
6910
        oprot.writeFieldBegin(E_FIELD_DESC);
6911
        this.e.write(oprot);
6912
        oprot.writeFieldEnd();
6913
      }
6914
      oprot.writeFieldStop();
6915
      oprot.writeStructEnd();
6916
    }
6917
 
6918
    @Override
6919
    public String toString() {
6920
      StringBuilder sb = new StringBuilder("closePurchase_result(");
6921
      boolean first = true;
6922
 
6923
      sb.append("success:");
6924
      sb.append(this.success);
6925
      first = false;
6926
      if (!first) sb.append(", ");
6927
      sb.append("e:");
6928
      if (this.e == null) {
6929
        sb.append("null");
6930
      } else {
6931
        sb.append(this.e);
6932
      }
6933
      first = false;
6934
      sb.append(")");
6935
      return sb.toString();
6936
    }
6937
 
6938
    public void validate() throws org.apache.thrift.TException {
6939
      // check for required fields
6940
    }
6941
 
6942
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6943
      try {
6944
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6945
      } catch (org.apache.thrift.TException te) {
6946
        throw new java.io.IOException(te);
6947
      }
6948
    }
6949
 
6950
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6951
      try {
6952
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6953
      } catch (org.apache.thrift.TException te) {
6954
        throw new java.io.IOException(te);
6955
      }
6956
    }
6957
 
6958
  }
6959
 
6960
  public static class getAllPurchases_args implements org.apache.thrift.TBase<getAllPurchases_args, getAllPurchases_args._Fields>, java.io.Serializable, Cloneable   {
6961
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_args");
6962
 
6963
    private static final org.apache.thrift.protocol.TField PURCHASE_ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseOrderId", org.apache.thrift.protocol.TType.I64, (short)1);
6964
    private static final org.apache.thrift.protocol.TField OPEN_FIELD_DESC = new org.apache.thrift.protocol.TField("open", org.apache.thrift.protocol.TType.BOOL, (short)2);
6965
 
6966
    private long purchaseOrderId; // required
6967
    private boolean open; // required
6968
 
6969
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6970
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6971
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
6972
      OPEN((short)2, "open");
6973
 
6974
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6975
 
6976
      static {
6977
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6978
          byName.put(field.getFieldName(), field);
6979
        }
6980
      }
6981
 
6982
      /**
6983
       * Find the _Fields constant that matches fieldId, or null if its not found.
6984
       */
6985
      public static _Fields findByThriftId(int fieldId) {
6986
        switch(fieldId) {
6987
          case 1: // PURCHASE_ORDER_ID
6988
            return PURCHASE_ORDER_ID;
6989
          case 2: // OPEN
6990
            return OPEN;
6991
          default:
6992
            return null;
6993
        }
6994
      }
6995
 
6996
      /**
6997
       * Find the _Fields constant that matches fieldId, throwing an exception
6998
       * if it is not found.
6999
       */
7000
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7001
        _Fields fields = findByThriftId(fieldId);
7002
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7003
        return fields;
7004
      }
7005
 
7006
      /**
7007
       * Find the _Fields constant that matches name, or null if its not found.
7008
       */
7009
      public static _Fields findByName(String name) {
7010
        return byName.get(name);
7011
      }
7012
 
7013
      private final short _thriftId;
7014
      private final String _fieldName;
7015
 
7016
      _Fields(short thriftId, String fieldName) {
7017
        _thriftId = thriftId;
7018
        _fieldName = fieldName;
7019
      }
7020
 
7021
      public short getThriftFieldId() {
7022
        return _thriftId;
7023
      }
7024
 
7025
      public String getFieldName() {
7026
        return _fieldName;
7027
      }
7028
    }
7029
 
7030
    // isset id assignments
7031
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
7032
    private static final int __OPEN_ISSET_ID = 1;
7033
    private BitSet __isset_bit_vector = new BitSet(2);
7034
 
7035
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7036
    static {
7037
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7038
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7039
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7040
      tmpMap.put(_Fields.OPEN, new org.apache.thrift.meta_data.FieldMetaData("open", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7041
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
7042
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7043
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_args.class, metaDataMap);
7044
    }
7045
 
7046
    public getAllPurchases_args() {
7047
    }
7048
 
7049
    public getAllPurchases_args(
7050
      long purchaseOrderId,
7051
      boolean open)
7052
    {
7053
      this();
7054
      this.purchaseOrderId = purchaseOrderId;
7055
      setPurchaseOrderIdIsSet(true);
7056
      this.open = open;
7057
      setOpenIsSet(true);
7058
    }
7059
 
7060
    /**
7061
     * Performs a deep copy on <i>other</i>.
7062
     */
7063
    public getAllPurchases_args(getAllPurchases_args other) {
7064
      __isset_bit_vector.clear();
7065
      __isset_bit_vector.or(other.__isset_bit_vector);
7066
      this.purchaseOrderId = other.purchaseOrderId;
7067
      this.open = other.open;
7068
    }
7069
 
7070
    public getAllPurchases_args deepCopy() {
7071
      return new getAllPurchases_args(this);
7072
    }
7073
 
7074
    @Override
7075
    public void clear() {
7076
      setPurchaseOrderIdIsSet(false);
7077
      this.purchaseOrderId = 0;
7078
      setOpenIsSet(false);
7079
      this.open = false;
7080
    }
7081
 
7082
    public long getPurchaseOrderId() {
7083
      return this.purchaseOrderId;
7084
    }
7085
 
7086
    public void setPurchaseOrderId(long purchaseOrderId) {
7087
      this.purchaseOrderId = purchaseOrderId;
7088
      setPurchaseOrderIdIsSet(true);
7089
    }
7090
 
7091
    public void unsetPurchaseOrderId() {
7092
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
7093
    }
7094
 
7095
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
7096
    public boolean isSetPurchaseOrderId() {
7097
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
7098
    }
7099
 
7100
    public void setPurchaseOrderIdIsSet(boolean value) {
7101
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
7102
    }
7103
 
7104
    public boolean isOpen() {
7105
      return this.open;
7106
    }
7107
 
7108
    public void setOpen(boolean open) {
7109
      this.open = open;
7110
      setOpenIsSet(true);
7111
    }
7112
 
7113
    public void unsetOpen() {
7114
      __isset_bit_vector.clear(__OPEN_ISSET_ID);
7115
    }
7116
 
7117
    /** Returns true if field open is set (has been assigned a value) and false otherwise */
7118
    public boolean isSetOpen() {
7119
      return __isset_bit_vector.get(__OPEN_ISSET_ID);
7120
    }
7121
 
7122
    public void setOpenIsSet(boolean value) {
7123
      __isset_bit_vector.set(__OPEN_ISSET_ID, value);
7124
    }
7125
 
7126
    public void setFieldValue(_Fields field, Object value) {
7127
      switch (field) {
7128
      case PURCHASE_ORDER_ID:
7129
        if (value == null) {
7130
          unsetPurchaseOrderId();
7131
        } else {
7132
          setPurchaseOrderId((Long)value);
7133
        }
7134
        break;
7135
 
7136
      case OPEN:
7137
        if (value == null) {
7138
          unsetOpen();
7139
        } else {
7140
          setOpen((Boolean)value);
7141
        }
7142
        break;
7143
 
7144
      }
7145
    }
7146
 
7147
    public Object getFieldValue(_Fields field) {
7148
      switch (field) {
7149
      case PURCHASE_ORDER_ID:
7150
        return Long.valueOf(getPurchaseOrderId());
7151
 
7152
      case OPEN:
7153
        return Boolean.valueOf(isOpen());
7154
 
7155
      }
7156
      throw new IllegalStateException();
7157
    }
7158
 
7159
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7160
    public boolean isSet(_Fields field) {
7161
      if (field == null) {
7162
        throw new IllegalArgumentException();
7163
      }
7164
 
7165
      switch (field) {
7166
      case PURCHASE_ORDER_ID:
7167
        return isSetPurchaseOrderId();
7168
      case OPEN:
7169
        return isSetOpen();
7170
      }
7171
      throw new IllegalStateException();
7172
    }
7173
 
7174
    @Override
7175
    public boolean equals(Object that) {
7176
      if (that == null)
7177
        return false;
7178
      if (that instanceof getAllPurchases_args)
7179
        return this.equals((getAllPurchases_args)that);
7180
      return false;
7181
    }
7182
 
7183
    public boolean equals(getAllPurchases_args that) {
7184
      if (that == null)
7185
        return false;
7186
 
7187
      boolean this_present_purchaseOrderId = true;
7188
      boolean that_present_purchaseOrderId = true;
7189
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
7190
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
7191
          return false;
7192
        if (this.purchaseOrderId != that.purchaseOrderId)
7193
          return false;
7194
      }
7195
 
7196
      boolean this_present_open = true;
7197
      boolean that_present_open = true;
7198
      if (this_present_open || that_present_open) {
7199
        if (!(this_present_open && that_present_open))
7200
          return false;
7201
        if (this.open != that.open)
7202
          return false;
7203
      }
7204
 
7205
      return true;
7206
    }
7207
 
7208
    @Override
7209
    public int hashCode() {
7210
      return 0;
7211
    }
7212
 
7213
    public int compareTo(getAllPurchases_args other) {
7214
      if (!getClass().equals(other.getClass())) {
7215
        return getClass().getName().compareTo(other.getClass().getName());
7216
      }
7217
 
7218
      int lastComparison = 0;
7219
      getAllPurchases_args typedOther = (getAllPurchases_args)other;
7220
 
7221
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
7222
      if (lastComparison != 0) {
7223
        return lastComparison;
7224
      }
7225
      if (isSetPurchaseOrderId()) {
7226
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
7227
        if (lastComparison != 0) {
7228
          return lastComparison;
7229
        }
7230
      }
7231
      lastComparison = Boolean.valueOf(isSetOpen()).compareTo(typedOther.isSetOpen());
7232
      if (lastComparison != 0) {
7233
        return lastComparison;
7234
      }
7235
      if (isSetOpen()) {
7236
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.open, typedOther.open);
7237
        if (lastComparison != 0) {
7238
          return lastComparison;
7239
        }
7240
      }
7241
      return 0;
7242
    }
7243
 
7244
    public _Fields fieldForId(int fieldId) {
7245
      return _Fields.findByThriftId(fieldId);
7246
    }
7247
 
7248
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7249
      org.apache.thrift.protocol.TField field;
7250
      iprot.readStructBegin();
7251
      while (true)
7252
      {
7253
        field = iprot.readFieldBegin();
7254
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7255
          break;
7256
        }
7257
        switch (field.id) {
7258
          case 1: // PURCHASE_ORDER_ID
7259
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7260
              this.purchaseOrderId = iprot.readI64();
7261
              setPurchaseOrderIdIsSet(true);
7262
            } else { 
7263
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7264
            }
7265
            break;
7266
          case 2: // OPEN
7267
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
7268
              this.open = iprot.readBool();
7269
              setOpenIsSet(true);
7270
            } else { 
7271
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7272
            }
7273
            break;
7274
          default:
7275
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7276
        }
7277
        iprot.readFieldEnd();
7278
      }
7279
      iprot.readStructEnd();
7280
      validate();
7281
    }
7282
 
7283
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7284
      validate();
7285
 
7286
      oprot.writeStructBegin(STRUCT_DESC);
7287
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
7288
      oprot.writeI64(this.purchaseOrderId);
7289
      oprot.writeFieldEnd();
7290
      oprot.writeFieldBegin(OPEN_FIELD_DESC);
7291
      oprot.writeBool(this.open);
7292
      oprot.writeFieldEnd();
7293
      oprot.writeFieldStop();
7294
      oprot.writeStructEnd();
7295
    }
7296
 
7297
    @Override
7298
    public String toString() {
7299
      StringBuilder sb = new StringBuilder("getAllPurchases_args(");
7300
      boolean first = true;
7301
 
7302
      sb.append("purchaseOrderId:");
7303
      sb.append(this.purchaseOrderId);
7304
      first = false;
7305
      if (!first) sb.append(", ");
7306
      sb.append("open:");
7307
      sb.append(this.open);
7308
      first = false;
7309
      sb.append(")");
7310
      return sb.toString();
7311
    }
7312
 
7313
    public void validate() throws org.apache.thrift.TException {
7314
      // check for required fields
7315
    }
7316
 
7317
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7318
      try {
7319
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7320
      } catch (org.apache.thrift.TException te) {
7321
        throw new java.io.IOException(te);
7322
      }
7323
    }
7324
 
7325
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7326
      try {
7327
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7328
      } catch (org.apache.thrift.TException te) {
7329
        throw new java.io.IOException(te);
7330
      }
7331
    }
7332
 
7333
  }
7334
 
7335
  public static class getAllPurchases_result implements org.apache.thrift.TBase<getAllPurchases_result, getAllPurchases_result._Fields>, java.io.Serializable, Cloneable   {
7336
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_result");
7337
 
7338
    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);
7339
    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
7340
 
7341
    private List<Purchase> success; // required
7342
    private PurchaseServiceException e; // required
7343
 
7344
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7345
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7346
      SUCCESS((short)0, "success"),
7347
      E((short)1, "e");
7348
 
7349
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7350
 
7351
      static {
7352
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7353
          byName.put(field.getFieldName(), field);
7354
        }
7355
      }
7356
 
7357
      /**
7358
       * Find the _Fields constant that matches fieldId, or null if its not found.
7359
       */
7360
      public static _Fields findByThriftId(int fieldId) {
7361
        switch(fieldId) {
7362
          case 0: // SUCCESS
7363
            return SUCCESS;
7364
          case 1: // E
7365
            return E;
7366
          default:
7367
            return null;
7368
        }
7369
      }
7370
 
7371
      /**
7372
       * Find the _Fields constant that matches fieldId, throwing an exception
7373
       * if it is not found.
7374
       */
7375
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7376
        _Fields fields = findByThriftId(fieldId);
7377
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7378
        return fields;
7379
      }
7380
 
7381
      /**
7382
       * Find the _Fields constant that matches name, or null if its not found.
7383
       */
7384
      public static _Fields findByName(String name) {
7385
        return byName.get(name);
7386
      }
7387
 
7388
      private final short _thriftId;
7389
      private final String _fieldName;
7390
 
7391
      _Fields(short thriftId, String fieldName) {
7392
        _thriftId = thriftId;
7393
        _fieldName = fieldName;
7394
      }
7395
 
7396
      public short getThriftFieldId() {
7397
        return _thriftId;
7398
      }
7399
 
7400
      public String getFieldName() {
7401
        return _fieldName;
7402
      }
7403
    }
7404
 
7405
    // isset id assignments
7406
 
7407
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7408
    static {
7409
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7410
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7411
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7412
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Purchase.class))));
7413
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7414
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7415
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7416
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_result.class, metaDataMap);
7417
    }
7418
 
7419
    public getAllPurchases_result() {
7420
    }
7421
 
7422
    public getAllPurchases_result(
7423
      List<Purchase> success,
7424
      PurchaseServiceException e)
7425
    {
7426
      this();
7427
      this.success = success;
7428
      this.e = e;
7429
    }
7430
 
7431
    /**
7432
     * Performs a deep copy on <i>other</i>.
7433
     */
7434
    public getAllPurchases_result(getAllPurchases_result other) {
7435
      if (other.isSetSuccess()) {
7436
        List<Purchase> __this__success = new ArrayList<Purchase>();
7437
        for (Purchase other_element : other.success) {
7438
          __this__success.add(new Purchase(other_element));
7439
        }
7440
        this.success = __this__success;
7441
      }
7442
      if (other.isSetE()) {
7443
        this.e = new PurchaseServiceException(other.e);
7444
      }
7445
    }
7446
 
7447
    public getAllPurchases_result deepCopy() {
7448
      return new getAllPurchases_result(this);
7449
    }
7450
 
7451
    @Override
7452
    public void clear() {
7453
      this.success = null;
7454
      this.e = null;
7455
    }
7456
 
7457
    public int getSuccessSize() {
7458
      return (this.success == null) ? 0 : this.success.size();
7459
    }
7460
 
7461
    public java.util.Iterator<Purchase> getSuccessIterator() {
7462
      return (this.success == null) ? null : this.success.iterator();
7463
    }
7464
 
7465
    public void addToSuccess(Purchase elem) {
7466
      if (this.success == null) {
7467
        this.success = new ArrayList<Purchase>();
7468
      }
7469
      this.success.add(elem);
7470
    }
7471
 
7472
    public List<Purchase> getSuccess() {
7473
      return this.success;
7474
    }
7475
 
7476
    public void setSuccess(List<Purchase> success) {
7477
      this.success = success;
7478
    }
7479
 
7480
    public void unsetSuccess() {
7481
      this.success = null;
7482
    }
7483
 
7484
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7485
    public boolean isSetSuccess() {
7486
      return this.success != null;
7487
    }
7488
 
7489
    public void setSuccessIsSet(boolean value) {
7490
      if (!value) {
7491
        this.success = null;
7492
      }
7493
    }
7494
 
7495
    public PurchaseServiceException getE() {
7496
      return this.e;
7497
    }
7498
 
7499
    public void setE(PurchaseServiceException e) {
7500
      this.e = e;
7501
    }
7502
 
7503
    public void unsetE() {
7504
      this.e = null;
7505
    }
7506
 
7507
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
7508
    public boolean isSetE() {
7509
      return this.e != null;
7510
    }
7511
 
7512
    public void setEIsSet(boolean value) {
7513
      if (!value) {
7514
        this.e = null;
7515
      }
7516
    }
7517
 
7518
    public void setFieldValue(_Fields field, Object value) {
7519
      switch (field) {
7520
      case SUCCESS:
7521
        if (value == null) {
7522
          unsetSuccess();
7523
        } else {
7524
          setSuccess((List<Purchase>)value);
7525
        }
7526
        break;
7527
 
7528
      case E:
7529
        if (value == null) {
7530
          unsetE();
7531
        } else {
7532
          setE((PurchaseServiceException)value);
7533
        }
7534
        break;
7535
 
7536
      }
7537
    }
7538
 
7539
    public Object getFieldValue(_Fields field) {
7540
      switch (field) {
7541
      case SUCCESS:
7542
        return getSuccess();
7543
 
7544
      case E:
7545
        return getE();
7546
 
7547
      }
7548
      throw new IllegalStateException();
7549
    }
7550
 
7551
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7552
    public boolean isSet(_Fields field) {
7553
      if (field == null) {
7554
        throw new IllegalArgumentException();
7555
      }
7556
 
7557
      switch (field) {
7558
      case SUCCESS:
7559
        return isSetSuccess();
7560
      case E:
7561
        return isSetE();
7562
      }
7563
      throw new IllegalStateException();
7564
    }
7565
 
7566
    @Override
7567
    public boolean equals(Object that) {
7568
      if (that == null)
7569
        return false;
7570
      if (that instanceof getAllPurchases_result)
7571
        return this.equals((getAllPurchases_result)that);
7572
      return false;
7573
    }
7574
 
7575
    public boolean equals(getAllPurchases_result that) {
7576
      if (that == null)
7577
        return false;
7578
 
7579
      boolean this_present_success = true && this.isSetSuccess();
7580
      boolean that_present_success = true && that.isSetSuccess();
7581
      if (this_present_success || that_present_success) {
7582
        if (!(this_present_success && that_present_success))
7583
          return false;
7584
        if (!this.success.equals(that.success))
7585
          return false;
7586
      }
7587
 
7588
      boolean this_present_e = true && this.isSetE();
7589
      boolean that_present_e = true && that.isSetE();
7590
      if (this_present_e || that_present_e) {
7591
        if (!(this_present_e && that_present_e))
7592
          return false;
7593
        if (!this.e.equals(that.e))
7594
          return false;
7595
      }
7596
 
7597
      return true;
7598
    }
7599
 
7600
    @Override
7601
    public int hashCode() {
7602
      return 0;
7603
    }
7604
 
7605
    public int compareTo(getAllPurchases_result other) {
7606
      if (!getClass().equals(other.getClass())) {
7607
        return getClass().getName().compareTo(other.getClass().getName());
7608
      }
7609
 
7610
      int lastComparison = 0;
7611
      getAllPurchases_result typedOther = (getAllPurchases_result)other;
7612
 
7613
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7614
      if (lastComparison != 0) {
7615
        return lastComparison;
7616
      }
7617
      if (isSetSuccess()) {
7618
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7619
        if (lastComparison != 0) {
7620
          return lastComparison;
7621
        }
7622
      }
7623
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
7624
      if (lastComparison != 0) {
7625
        return lastComparison;
7626
      }
7627
      if (isSetE()) {
7628
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
7629
        if (lastComparison != 0) {
7630
          return lastComparison;
7631
        }
7632
      }
7633
      return 0;
7634
    }
7635
 
7636
    public _Fields fieldForId(int fieldId) {
7637
      return _Fields.findByThriftId(fieldId);
7638
    }
7639
 
7640
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7641
      org.apache.thrift.protocol.TField field;
7642
      iprot.readStructBegin();
7643
      while (true)
7644
      {
7645
        field = iprot.readFieldBegin();
7646
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7647
          break;
7648
        }
7649
        switch (field.id) {
7650
          case 0: // SUCCESS
7651
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
7652
              {
7653
                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
7654
                this.success = new ArrayList<Purchase>(_list8.size);
7655
                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
7656
                {
7657
                  Purchase _elem10; // required
7658
                  _elem10 = new Purchase();
7659
                  _elem10.read(iprot);
7660
                  this.success.add(_elem10);
7661
                }
7662
                iprot.readListEnd();
7663
              }
7664
            } else { 
7665
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7666
            }
7667
            break;
7668
          case 1: // E
7669
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7670
              this.e = new PurchaseServiceException();
7671
              this.e.read(iprot);
7672
            } else { 
7673
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7674
            }
7675
            break;
7676
          default:
7677
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7678
        }
7679
        iprot.readFieldEnd();
7680
      }
7681
      iprot.readStructEnd();
7682
      validate();
7683
    }
7684
 
7685
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7686
      oprot.writeStructBegin(STRUCT_DESC);
7687
 
7688
      if (this.isSetSuccess()) {
7689
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7690
        {
7691
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7692
          for (Purchase _iter11 : this.success)
7693
          {
7694
            _iter11.write(oprot);
7695
          }
7696
          oprot.writeListEnd();
7697
        }
7698
        oprot.writeFieldEnd();
7699
      } else if (this.isSetE()) {
7700
        oprot.writeFieldBegin(E_FIELD_DESC);
7701
        this.e.write(oprot);
7702
        oprot.writeFieldEnd();
7703
      }
7704
      oprot.writeFieldStop();
7705
      oprot.writeStructEnd();
7706
    }
7707
 
7708
    @Override
7709
    public String toString() {
7710
      StringBuilder sb = new StringBuilder("getAllPurchases_result(");
7711
      boolean first = true;
7712
 
7713
      sb.append("success:");
7714
      if (this.success == null) {
7715
        sb.append("null");
7716
      } else {
7717
        sb.append(this.success);
7718
      }
7719
      first = false;
7720
      if (!first) sb.append(", ");
7721
      sb.append("e:");
7722
      if (this.e == null) {
7723
        sb.append("null");
7724
      } else {
7725
        sb.append(this.e);
7726
      }
7727
      first = false;
7728
      sb.append(")");
7729
      return sb.toString();
7730
    }
7731
 
7732
    public void validate() throws org.apache.thrift.TException {
7733
      // check for required fields
7734
    }
7735
 
7736
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7737
      try {
7738
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7739
      } catch (org.apache.thrift.TException te) {
7740
        throw new java.io.IOException(te);
7741
      }
7742
    }
7743
 
7744
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7745
      try {
7746
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7747
      } catch (org.apache.thrift.TException te) {
7748
        throw new java.io.IOException(te);
7749
      }
7750
    }
7751
 
7752
  }
7753
 
6385 amar.kumar 7754
  public static class getPurchasesForPO_args implements org.apache.thrift.TBase<getPurchasesForPO_args, getPurchasesForPO_args._Fields>, java.io.Serializable, Cloneable   {
7755
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchasesForPO_args");
7756
 
7757
    private static final org.apache.thrift.protocol.TField PURCHASE_ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseOrderId", org.apache.thrift.protocol.TType.I64, (short)1);
7758
 
7759
    private long purchaseOrderId; // required
7760
 
7761
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7762
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7763
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId");
7764
 
7765
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7766
 
7767
      static {
7768
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7769
          byName.put(field.getFieldName(), field);
7770
        }
7771
      }
7772
 
7773
      /**
7774
       * Find the _Fields constant that matches fieldId, or null if its not found.
7775
       */
7776
      public static _Fields findByThriftId(int fieldId) {
7777
        switch(fieldId) {
7778
          case 1: // PURCHASE_ORDER_ID
7779
            return PURCHASE_ORDER_ID;
7780
          default:
7781
            return null;
7782
        }
7783
      }
7784
 
7785
      /**
7786
       * Find the _Fields constant that matches fieldId, throwing an exception
7787
       * if it is not found.
7788
       */
7789
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7790
        _Fields fields = findByThriftId(fieldId);
7791
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7792
        return fields;
7793
      }
7794
 
7795
      /**
7796
       * Find the _Fields constant that matches name, or null if its not found.
7797
       */
7798
      public static _Fields findByName(String name) {
7799
        return byName.get(name);
7800
      }
7801
 
7802
      private final short _thriftId;
7803
      private final String _fieldName;
7804
 
7805
      _Fields(short thriftId, String fieldName) {
7806
        _thriftId = thriftId;
7807
        _fieldName = fieldName;
7808
      }
7809
 
7810
      public short getThriftFieldId() {
7811
        return _thriftId;
7812
      }
7813
 
7814
      public String getFieldName() {
7815
        return _fieldName;
7816
      }
7817
    }
7818
 
7819
    // isset id assignments
7820
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
7821
    private BitSet __isset_bit_vector = new BitSet(1);
7822
 
7823
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7824
    static {
7825
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7826
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7827
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7828
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7829
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchasesForPO_args.class, metaDataMap);
7830
    }
7831
 
7832
    public getPurchasesForPO_args() {
7833
    }
7834
 
7835
    public getPurchasesForPO_args(
7836
      long purchaseOrderId)
7837
    {
7838
      this();
7839
      this.purchaseOrderId = purchaseOrderId;
7840
      setPurchaseOrderIdIsSet(true);
7841
    }
7842
 
7843
    /**
7844
     * Performs a deep copy on <i>other</i>.
7845
     */
7846
    public getPurchasesForPO_args(getPurchasesForPO_args other) {
7847
      __isset_bit_vector.clear();
7848
      __isset_bit_vector.or(other.__isset_bit_vector);
7849
      this.purchaseOrderId = other.purchaseOrderId;
7850
    }
7851
 
7852
    public getPurchasesForPO_args deepCopy() {
7853
      return new getPurchasesForPO_args(this);
7854
    }
7855
 
7856
    @Override
7857
    public void clear() {
7858
      setPurchaseOrderIdIsSet(false);
7859
      this.purchaseOrderId = 0;
7860
    }
7861
 
7862
    public long getPurchaseOrderId() {
7863
      return this.purchaseOrderId;
7864
    }
7865
 
7866
    public void setPurchaseOrderId(long purchaseOrderId) {
7867
      this.purchaseOrderId = purchaseOrderId;
7868
      setPurchaseOrderIdIsSet(true);
7869
    }
7870
 
7871
    public void unsetPurchaseOrderId() {
7872
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
7873
    }
7874
 
7875
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
7876
    public boolean isSetPurchaseOrderId() {
7877
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
7878
    }
7879
 
7880
    public void setPurchaseOrderIdIsSet(boolean value) {
7881
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
7882
    }
7883
 
7884
    public void setFieldValue(_Fields field, Object value) {
7885
      switch (field) {
7886
      case PURCHASE_ORDER_ID:
7887
        if (value == null) {
7888
          unsetPurchaseOrderId();
7889
        } else {
7890
          setPurchaseOrderId((Long)value);
7891
        }
7892
        break;
7893
 
7894
      }
7895
    }
7896
 
7897
    public Object getFieldValue(_Fields field) {
7898
      switch (field) {
7899
      case PURCHASE_ORDER_ID:
7900
        return Long.valueOf(getPurchaseOrderId());
7901
 
7902
      }
7903
      throw new IllegalStateException();
7904
    }
7905
 
7906
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7907
    public boolean isSet(_Fields field) {
7908
      if (field == null) {
7909
        throw new IllegalArgumentException();
7910
      }
7911
 
7912
      switch (field) {
7913
      case PURCHASE_ORDER_ID:
7914
        return isSetPurchaseOrderId();
7915
      }
7916
      throw new IllegalStateException();
7917
    }
7918
 
7919
    @Override
7920
    public boolean equals(Object that) {
7921
      if (that == null)
7922
        return false;
7923
      if (that instanceof getPurchasesForPO_args)
7924
        return this.equals((getPurchasesForPO_args)that);
7925
      return false;
7926
    }
7927
 
7928
    public boolean equals(getPurchasesForPO_args that) {
7929
      if (that == null)
7930
        return false;
7931
 
7932
      boolean this_present_purchaseOrderId = true;
7933
      boolean that_present_purchaseOrderId = true;
7934
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
7935
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
7936
          return false;
7937
        if (this.purchaseOrderId != that.purchaseOrderId)
7938
          return false;
7939
      }
7940
 
7941
      return true;
7942
    }
7943
 
7944
    @Override
7945
    public int hashCode() {
7946
      return 0;
7947
    }
7948
 
7949
    public int compareTo(getPurchasesForPO_args other) {
7950
      if (!getClass().equals(other.getClass())) {
7951
        return getClass().getName().compareTo(other.getClass().getName());
7952
      }
7953
 
7954
      int lastComparison = 0;
7955
      getPurchasesForPO_args typedOther = (getPurchasesForPO_args)other;
7956
 
7957
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
7958
      if (lastComparison != 0) {
7959
        return lastComparison;
7960
      }
7961
      if (isSetPurchaseOrderId()) {
7962
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
7963
        if (lastComparison != 0) {
7964
          return lastComparison;
7965
        }
7966
      }
7967
      return 0;
7968
    }
7969
 
7970
    public _Fields fieldForId(int fieldId) {
7971
      return _Fields.findByThriftId(fieldId);
7972
    }
7973
 
7974
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7975
      org.apache.thrift.protocol.TField field;
7976
      iprot.readStructBegin();
7977
      while (true)
7978
      {
7979
        field = iprot.readFieldBegin();
7980
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7981
          break;
7982
        }
7983
        switch (field.id) {
7984
          case 1: // PURCHASE_ORDER_ID
7985
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7986
              this.purchaseOrderId = iprot.readI64();
7987
              setPurchaseOrderIdIsSet(true);
7988
            } else { 
7989
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7990
            }
7991
            break;
7992
          default:
7993
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7994
        }
7995
        iprot.readFieldEnd();
7996
      }
7997
      iprot.readStructEnd();
7998
      validate();
7999
    }
8000
 
8001
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8002
      validate();
8003
 
8004
      oprot.writeStructBegin(STRUCT_DESC);
8005
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
8006
      oprot.writeI64(this.purchaseOrderId);
8007
      oprot.writeFieldEnd();
8008
      oprot.writeFieldStop();
8009
      oprot.writeStructEnd();
8010
    }
8011
 
8012
    @Override
8013
    public String toString() {
8014
      StringBuilder sb = new StringBuilder("getPurchasesForPO_args(");
8015
      boolean first = true;
8016
 
8017
      sb.append("purchaseOrderId:");
8018
      sb.append(this.purchaseOrderId);
8019
      first = false;
8020
      sb.append(")");
8021
      return sb.toString();
8022
    }
8023
 
8024
    public void validate() throws org.apache.thrift.TException {
8025
      // check for required fields
8026
    }
8027
 
8028
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8029
      try {
8030
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8031
      } catch (org.apache.thrift.TException te) {
8032
        throw new java.io.IOException(te);
8033
      }
8034
    }
8035
 
8036
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8037
      try {
8038
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8039
        __isset_bit_vector = new BitSet(1);
8040
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8041
      } catch (org.apache.thrift.TException te) {
8042
        throw new java.io.IOException(te);
8043
      }
8044
    }
8045
 
8046
  }
8047
 
8048
  public static class getPurchasesForPO_result implements org.apache.thrift.TBase<getPurchasesForPO_result, getPurchasesForPO_result._Fields>, java.io.Serializable, Cloneable   {
8049
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchasesForPO_result");
8050
 
8051
    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);
8052
    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
8053
 
8054
    private List<Purchase> success; // required
8055
    private PurchaseServiceException e; // required
8056
 
8057
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8058
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8059
      SUCCESS((short)0, "success"),
8060
      E((short)1, "e");
8061
 
8062
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8063
 
8064
      static {
8065
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8066
          byName.put(field.getFieldName(), field);
8067
        }
8068
      }
8069
 
8070
      /**
8071
       * Find the _Fields constant that matches fieldId, or null if its not found.
8072
       */
8073
      public static _Fields findByThriftId(int fieldId) {
8074
        switch(fieldId) {
8075
          case 0: // SUCCESS
8076
            return SUCCESS;
8077
          case 1: // E
8078
            return E;
8079
          default:
8080
            return null;
8081
        }
8082
      }
8083
 
8084
      /**
8085
       * Find the _Fields constant that matches fieldId, throwing an exception
8086
       * if it is not found.
8087
       */
8088
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8089
        _Fields fields = findByThriftId(fieldId);
8090
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8091
        return fields;
8092
      }
8093
 
8094
      /**
8095
       * Find the _Fields constant that matches name, or null if its not found.
8096
       */
8097
      public static _Fields findByName(String name) {
8098
        return byName.get(name);
8099
      }
8100
 
8101
      private final short _thriftId;
8102
      private final String _fieldName;
8103
 
8104
      _Fields(short thriftId, String fieldName) {
8105
        _thriftId = thriftId;
8106
        _fieldName = fieldName;
8107
      }
8108
 
8109
      public short getThriftFieldId() {
8110
        return _thriftId;
8111
      }
8112
 
8113
      public String getFieldName() {
8114
        return _fieldName;
8115
      }
8116
    }
8117
 
8118
    // isset id assignments
8119
 
8120
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8121
    static {
8122
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8123
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8124
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
8125
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Purchase.class))));
8126
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8127
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
8128
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8129
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchasesForPO_result.class, metaDataMap);
8130
    }
8131
 
8132
    public getPurchasesForPO_result() {
8133
    }
8134
 
8135
    public getPurchasesForPO_result(
8136
      List<Purchase> success,
8137
      PurchaseServiceException e)
8138
    {
8139
      this();
8140
      this.success = success;
8141
      this.e = e;
8142
    }
8143
 
8144
    /**
8145
     * Performs a deep copy on <i>other</i>.
8146
     */
8147
    public getPurchasesForPO_result(getPurchasesForPO_result other) {
8148
      if (other.isSetSuccess()) {
8149
        List<Purchase> __this__success = new ArrayList<Purchase>();
8150
        for (Purchase other_element : other.success) {
8151
          __this__success.add(new Purchase(other_element));
8152
        }
8153
        this.success = __this__success;
8154
      }
8155
      if (other.isSetE()) {
8156
        this.e = new PurchaseServiceException(other.e);
8157
      }
8158
    }
8159
 
8160
    public getPurchasesForPO_result deepCopy() {
8161
      return new getPurchasesForPO_result(this);
8162
    }
8163
 
8164
    @Override
8165
    public void clear() {
8166
      this.success = null;
8167
      this.e = null;
8168
    }
8169
 
8170
    public int getSuccessSize() {
8171
      return (this.success == null) ? 0 : this.success.size();
8172
    }
8173
 
8174
    public java.util.Iterator<Purchase> getSuccessIterator() {
8175
      return (this.success == null) ? null : this.success.iterator();
8176
    }
8177
 
8178
    public void addToSuccess(Purchase elem) {
8179
      if (this.success == null) {
8180
        this.success = new ArrayList<Purchase>();
8181
      }
8182
      this.success.add(elem);
8183
    }
8184
 
8185
    public List<Purchase> getSuccess() {
8186
      return this.success;
8187
    }
8188
 
8189
    public void setSuccess(List<Purchase> success) {
8190
      this.success = success;
8191
    }
8192
 
8193
    public void unsetSuccess() {
8194
      this.success = null;
8195
    }
8196
 
8197
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8198
    public boolean isSetSuccess() {
8199
      return this.success != null;
8200
    }
8201
 
8202
    public void setSuccessIsSet(boolean value) {
8203
      if (!value) {
8204
        this.success = null;
8205
      }
8206
    }
8207
 
8208
    public PurchaseServiceException getE() {
8209
      return this.e;
8210
    }
8211
 
8212
    public void setE(PurchaseServiceException e) {
8213
      this.e = e;
8214
    }
8215
 
8216
    public void unsetE() {
8217
      this.e = null;
8218
    }
8219
 
8220
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
8221
    public boolean isSetE() {
8222
      return this.e != null;
8223
    }
8224
 
8225
    public void setEIsSet(boolean value) {
8226
      if (!value) {
8227
        this.e = null;
8228
      }
8229
    }
8230
 
8231
    public void setFieldValue(_Fields field, Object value) {
8232
      switch (field) {
8233
      case SUCCESS:
8234
        if (value == null) {
8235
          unsetSuccess();
8236
        } else {
8237
          setSuccess((List<Purchase>)value);
8238
        }
8239
        break;
8240
 
8241
      case E:
8242
        if (value == null) {
8243
          unsetE();
8244
        } else {
8245
          setE((PurchaseServiceException)value);
8246
        }
8247
        break;
8248
 
8249
      }
8250
    }
8251
 
8252
    public Object getFieldValue(_Fields field) {
8253
      switch (field) {
8254
      case SUCCESS:
8255
        return getSuccess();
8256
 
8257
      case E:
8258
        return getE();
8259
 
8260
      }
8261
      throw new IllegalStateException();
8262
    }
8263
 
8264
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8265
    public boolean isSet(_Fields field) {
8266
      if (field == null) {
8267
        throw new IllegalArgumentException();
8268
      }
8269
 
8270
      switch (field) {
8271
      case SUCCESS:
8272
        return isSetSuccess();
8273
      case E:
8274
        return isSetE();
8275
      }
8276
      throw new IllegalStateException();
8277
    }
8278
 
8279
    @Override
8280
    public boolean equals(Object that) {
8281
      if (that == null)
8282
        return false;
8283
      if (that instanceof getPurchasesForPO_result)
8284
        return this.equals((getPurchasesForPO_result)that);
8285
      return false;
8286
    }
8287
 
8288
    public boolean equals(getPurchasesForPO_result that) {
8289
      if (that == null)
8290
        return false;
8291
 
8292
      boolean this_present_success = true && this.isSetSuccess();
8293
      boolean that_present_success = true && that.isSetSuccess();
8294
      if (this_present_success || that_present_success) {
8295
        if (!(this_present_success && that_present_success))
8296
          return false;
8297
        if (!this.success.equals(that.success))
8298
          return false;
8299
      }
8300
 
8301
      boolean this_present_e = true && this.isSetE();
8302
      boolean that_present_e = true && that.isSetE();
8303
      if (this_present_e || that_present_e) {
8304
        if (!(this_present_e && that_present_e))
8305
          return false;
8306
        if (!this.e.equals(that.e))
8307
          return false;
8308
      }
8309
 
8310
      return true;
8311
    }
8312
 
8313
    @Override
8314
    public int hashCode() {
8315
      return 0;
8316
    }
8317
 
8318
    public int compareTo(getPurchasesForPO_result other) {
8319
      if (!getClass().equals(other.getClass())) {
8320
        return getClass().getName().compareTo(other.getClass().getName());
8321
      }
8322
 
8323
      int lastComparison = 0;
8324
      getPurchasesForPO_result typedOther = (getPurchasesForPO_result)other;
8325
 
8326
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8327
      if (lastComparison != 0) {
8328
        return lastComparison;
8329
      }
8330
      if (isSetSuccess()) {
8331
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8332
        if (lastComparison != 0) {
8333
          return lastComparison;
8334
        }
8335
      }
8336
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
8337
      if (lastComparison != 0) {
8338
        return lastComparison;
8339
      }
8340
      if (isSetE()) {
8341
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
8342
        if (lastComparison != 0) {
8343
          return lastComparison;
8344
        }
8345
      }
8346
      return 0;
8347
    }
8348
 
8349
    public _Fields fieldForId(int fieldId) {
8350
      return _Fields.findByThriftId(fieldId);
8351
    }
8352
 
8353
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8354
      org.apache.thrift.protocol.TField field;
8355
      iprot.readStructBegin();
8356
      while (true)
8357
      {
8358
        field = iprot.readFieldBegin();
8359
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8360
          break;
8361
        }
8362
        switch (field.id) {
8363
          case 0: // SUCCESS
8364
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8365
              {
8366
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
8367
                this.success = new ArrayList<Purchase>(_list12.size);
8368
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
8369
                {
8370
                  Purchase _elem14; // required
8371
                  _elem14 = new Purchase();
8372
                  _elem14.read(iprot);
8373
                  this.success.add(_elem14);
8374
                }
8375
                iprot.readListEnd();
8376
              }
8377
            } else { 
8378
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8379
            }
8380
            break;
8381
          case 1: // E
8382
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8383
              this.e = new PurchaseServiceException();
8384
              this.e.read(iprot);
8385
            } else { 
8386
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8387
            }
8388
            break;
8389
          default:
8390
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8391
        }
8392
        iprot.readFieldEnd();
8393
      }
8394
      iprot.readStructEnd();
8395
      validate();
8396
    }
8397
 
8398
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8399
      oprot.writeStructBegin(STRUCT_DESC);
8400
 
8401
      if (this.isSetSuccess()) {
8402
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8403
        {
8404
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
8405
          for (Purchase _iter15 : this.success)
8406
          {
8407
            _iter15.write(oprot);
8408
          }
8409
          oprot.writeListEnd();
8410
        }
8411
        oprot.writeFieldEnd();
8412
      } else if (this.isSetE()) {
8413
        oprot.writeFieldBegin(E_FIELD_DESC);
8414
        this.e.write(oprot);
8415
        oprot.writeFieldEnd();
8416
      }
8417
      oprot.writeFieldStop();
8418
      oprot.writeStructEnd();
8419
    }
8420
 
8421
    @Override
8422
    public String toString() {
8423
      StringBuilder sb = new StringBuilder("getPurchasesForPO_result(");
8424
      boolean first = true;
8425
 
8426
      sb.append("success:");
8427
      if (this.success == null) {
8428
        sb.append("null");
8429
      } else {
8430
        sb.append(this.success);
8431
      }
8432
      first = false;
8433
      if (!first) sb.append(", ");
8434
      sb.append("e:");
8435
      if (this.e == null) {
8436
        sb.append("null");
8437
      } else {
8438
        sb.append(this.e);
8439
      }
8440
      first = false;
8441
      sb.append(")");
8442
      return sb.toString();
8443
    }
8444
 
8445
    public void validate() throws org.apache.thrift.TException {
8446
      // check for required fields
8447
    }
8448
 
8449
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8450
      try {
8451
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8452
      } catch (org.apache.thrift.TException te) {
8453
        throw new java.io.IOException(te);
8454
      }
8455
    }
8456
 
8457
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8458
      try {
8459
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8460
      } catch (org.apache.thrift.TException te) {
8461
        throw new java.io.IOException(te);
8462
      }
8463
    }
8464
 
8465
  }
8466
 
4555 mandeep.dh 8467
  public static class getPurchaseOrderForPurchase_args implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_args, getPurchaseOrderForPurchase_args._Fields>, java.io.Serializable, Cloneable   {
8468
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_args");
4496 mandeep.dh 8469
 
8470
    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)1);
8471
 
8472
    private long purchaseId; // required
8473
 
8474
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8475
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4555 mandeep.dh 8476
      PURCHASE_ID((short)1, "purchaseId");
4496 mandeep.dh 8477
 
8478
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8479
 
8480
      static {
8481
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8482
          byName.put(field.getFieldName(), field);
8483
        }
8484
      }
8485
 
8486
      /**
8487
       * Find the _Fields constant that matches fieldId, or null if its not found.
8488
       */
8489
      public static _Fields findByThriftId(int fieldId) {
8490
        switch(fieldId) {
8491
          case 1: // PURCHASE_ID
8492
            return PURCHASE_ID;
8493
          default:
8494
            return null;
8495
        }
8496
      }
8497
 
8498
      /**
8499
       * Find the _Fields constant that matches fieldId, throwing an exception
8500
       * if it is not found.
8501
       */
8502
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8503
        _Fields fields = findByThriftId(fieldId);
8504
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8505
        return fields;
8506
      }
8507
 
8508
      /**
8509
       * Find the _Fields constant that matches name, or null if its not found.
8510
       */
8511
      public static _Fields findByName(String name) {
8512
        return byName.get(name);
8513
      }
8514
 
8515
      private final short _thriftId;
8516
      private final String _fieldName;
8517
 
8518
      _Fields(short thriftId, String fieldName) {
8519
        _thriftId = thriftId;
8520
        _fieldName = fieldName;
8521
      }
8522
 
8523
      public short getThriftFieldId() {
8524
        return _thriftId;
8525
      }
8526
 
8527
      public String getFieldName() {
8528
        return _fieldName;
8529
      }
8530
    }
8531
 
8532
    // isset id assignments
8533
    private static final int __PURCHASEID_ISSET_ID = 0;
4555 mandeep.dh 8534
    private BitSet __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 8535
 
8536
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8537
    static {
8538
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8539
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8540
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8541
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 8542
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_args.class, metaDataMap);
4496 mandeep.dh 8543
    }
8544
 
4555 mandeep.dh 8545
    public getPurchaseOrderForPurchase_args() {
4496 mandeep.dh 8546
    }
8547
 
4555 mandeep.dh 8548
    public getPurchaseOrderForPurchase_args(
8549
      long purchaseId)
4496 mandeep.dh 8550
    {
8551
      this();
8552
      this.purchaseId = purchaseId;
8553
      setPurchaseIdIsSet(true);
8554
    }
8555
 
8556
    /**
8557
     * Performs a deep copy on <i>other</i>.
8558
     */
4555 mandeep.dh 8559
    public getPurchaseOrderForPurchase_args(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 8560
      __isset_bit_vector.clear();
8561
      __isset_bit_vector.or(other.__isset_bit_vector);
8562
      this.purchaseId = other.purchaseId;
8563
    }
8564
 
4555 mandeep.dh 8565
    public getPurchaseOrderForPurchase_args deepCopy() {
8566
      return new getPurchaseOrderForPurchase_args(this);
4496 mandeep.dh 8567
    }
8568
 
8569
    @Override
8570
    public void clear() {
8571
      setPurchaseIdIsSet(false);
8572
      this.purchaseId = 0;
8573
    }
8574
 
8575
    public long getPurchaseId() {
8576
      return this.purchaseId;
8577
    }
8578
 
8579
    public void setPurchaseId(long purchaseId) {
8580
      this.purchaseId = purchaseId;
8581
      setPurchaseIdIsSet(true);
8582
    }
8583
 
8584
    public void unsetPurchaseId() {
8585
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
8586
    }
8587
 
8588
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
8589
    public boolean isSetPurchaseId() {
8590
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
8591
    }
8592
 
8593
    public void setPurchaseIdIsSet(boolean value) {
8594
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
8595
    }
8596
 
8597
    public void setFieldValue(_Fields field, Object value) {
8598
      switch (field) {
8599
      case PURCHASE_ID:
8600
        if (value == null) {
8601
          unsetPurchaseId();
8602
        } else {
8603
          setPurchaseId((Long)value);
8604
        }
8605
        break;
8606
 
8607
      }
8608
    }
8609
 
8610
    public Object getFieldValue(_Fields field) {
8611
      switch (field) {
8612
      case PURCHASE_ID:
8613
        return Long.valueOf(getPurchaseId());
8614
 
8615
      }
8616
      throw new IllegalStateException();
8617
    }
8618
 
8619
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8620
    public boolean isSet(_Fields field) {
8621
      if (field == null) {
8622
        throw new IllegalArgumentException();
8623
      }
8624
 
8625
      switch (field) {
8626
      case PURCHASE_ID:
8627
        return isSetPurchaseId();
8628
      }
8629
      throw new IllegalStateException();
8630
    }
8631
 
8632
    @Override
8633
    public boolean equals(Object that) {
8634
      if (that == null)
8635
        return false;
4555 mandeep.dh 8636
      if (that instanceof getPurchaseOrderForPurchase_args)
8637
        return this.equals((getPurchaseOrderForPurchase_args)that);
4496 mandeep.dh 8638
      return false;
8639
    }
8640
 
4555 mandeep.dh 8641
    public boolean equals(getPurchaseOrderForPurchase_args that) {
4496 mandeep.dh 8642
      if (that == null)
8643
        return false;
8644
 
8645
      boolean this_present_purchaseId = true;
8646
      boolean that_present_purchaseId = true;
8647
      if (this_present_purchaseId || that_present_purchaseId) {
8648
        if (!(this_present_purchaseId && that_present_purchaseId))
8649
          return false;
8650
        if (this.purchaseId != that.purchaseId)
8651
          return false;
8652
      }
8653
 
8654
      return true;
8655
    }
8656
 
8657
    @Override
8658
    public int hashCode() {
8659
      return 0;
8660
    }
8661
 
4555 mandeep.dh 8662
    public int compareTo(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 8663
      if (!getClass().equals(other.getClass())) {
8664
        return getClass().getName().compareTo(other.getClass().getName());
8665
      }
8666
 
8667
      int lastComparison = 0;
4555 mandeep.dh 8668
      getPurchaseOrderForPurchase_args typedOther = (getPurchaseOrderForPurchase_args)other;
4496 mandeep.dh 8669
 
8670
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
8671
      if (lastComparison != 0) {
8672
        return lastComparison;
8673
      }
8674
      if (isSetPurchaseId()) {
8675
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
8676
        if (lastComparison != 0) {
8677
          return lastComparison;
8678
        }
8679
      }
8680
      return 0;
8681
    }
8682
 
8683
    public _Fields fieldForId(int fieldId) {
8684
      return _Fields.findByThriftId(fieldId);
8685
    }
8686
 
8687
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8688
      org.apache.thrift.protocol.TField field;
8689
      iprot.readStructBegin();
8690
      while (true)
8691
      {
8692
        field = iprot.readFieldBegin();
8693
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8694
          break;
8695
        }
8696
        switch (field.id) {
8697
          case 1: // PURCHASE_ID
8698
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8699
              this.purchaseId = iprot.readI64();
8700
              setPurchaseIdIsSet(true);
8701
            } else { 
8702
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8703
            }
8704
            break;
8705
          default:
8706
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8707
        }
8708
        iprot.readFieldEnd();
8709
      }
8710
      iprot.readStructEnd();
8711
      validate();
8712
    }
8713
 
8714
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8715
      validate();
8716
 
8717
      oprot.writeStructBegin(STRUCT_DESC);
8718
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
8719
      oprot.writeI64(this.purchaseId);
8720
      oprot.writeFieldEnd();
8721
      oprot.writeFieldStop();
8722
      oprot.writeStructEnd();
8723
    }
8724
 
8725
    @Override
8726
    public String toString() {
4555 mandeep.dh 8727
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_args(");
4496 mandeep.dh 8728
      boolean first = true;
8729
 
8730
      sb.append("purchaseId:");
8731
      sb.append(this.purchaseId);
8732
      first = false;
8733
      sb.append(")");
8734
      return sb.toString();
8735
    }
8736
 
8737
    public void validate() throws org.apache.thrift.TException {
8738
      // check for required fields
8739
    }
8740
 
8741
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8742
      try {
8743
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8744
      } catch (org.apache.thrift.TException te) {
8745
        throw new java.io.IOException(te);
8746
      }
8747
    }
8748
 
8749
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8750
      try {
4555 mandeep.dh 8751
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8752
        __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 8753
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8754
      } catch (org.apache.thrift.TException te) {
8755
        throw new java.io.IOException(te);
8756
      }
8757
    }
8758
 
8759
  }
8760
 
4555 mandeep.dh 8761
  public static class getPurchaseOrderForPurchase_result implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_result, getPurchaseOrderForPurchase_result._Fields>, java.io.Serializable, Cloneable   {
8762
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_result");
4496 mandeep.dh 8763
 
4555 mandeep.dh 8764
    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);
4496 mandeep.dh 8765
 
4555 mandeep.dh 8766
    private PurchaseOrder success; // required
4496 mandeep.dh 8767
 
8768
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8769
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8770
      SUCCESS((short)0, "success");
8771
 
8772
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8773
 
8774
      static {
8775
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8776
          byName.put(field.getFieldName(), field);
8777
        }
8778
      }
8779
 
8780
      /**
8781
       * Find the _Fields constant that matches fieldId, or null if its not found.
8782
       */
8783
      public static _Fields findByThriftId(int fieldId) {
8784
        switch(fieldId) {
8785
          case 0: // SUCCESS
8786
            return SUCCESS;
8787
          default:
8788
            return null;
8789
        }
8790
      }
8791
 
8792
      /**
8793
       * Find the _Fields constant that matches fieldId, throwing an exception
8794
       * if it is not found.
8795
       */
8796
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8797
        _Fields fields = findByThriftId(fieldId);
8798
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8799
        return fields;
8800
      }
8801
 
8802
      /**
8803
       * Find the _Fields constant that matches name, or null if its not found.
8804
       */
8805
      public static _Fields findByName(String name) {
8806
        return byName.get(name);
8807
      }
8808
 
8809
      private final short _thriftId;
8810
      private final String _fieldName;
8811
 
8812
      _Fields(short thriftId, String fieldName) {
8813
        _thriftId = thriftId;
8814
        _fieldName = fieldName;
8815
      }
8816
 
8817
      public short getThriftFieldId() {
8818
        return _thriftId;
8819
      }
8820
 
8821
      public String getFieldName() {
8822
        return _fieldName;
8823
      }
8824
    }
8825
 
8826
    // isset id assignments
8827
 
8828
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8829
    static {
8830
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8831
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 8832
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
4496 mandeep.dh 8833
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 8834
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_result.class, metaDataMap);
4496 mandeep.dh 8835
    }
8836
 
4555 mandeep.dh 8837
    public getPurchaseOrderForPurchase_result() {
4496 mandeep.dh 8838
    }
8839
 
4555 mandeep.dh 8840
    public getPurchaseOrderForPurchase_result(
8841
      PurchaseOrder success)
4496 mandeep.dh 8842
    {
8843
      this();
8844
      this.success = success;
8845
    }
8846
 
8847
    /**
8848
     * Performs a deep copy on <i>other</i>.
8849
     */
4555 mandeep.dh 8850
    public getPurchaseOrderForPurchase_result(getPurchaseOrderForPurchase_result other) {
8851
      if (other.isSetSuccess()) {
8852
        this.success = new PurchaseOrder(other.success);
8853
      }
4496 mandeep.dh 8854
    }
8855
 
4555 mandeep.dh 8856
    public getPurchaseOrderForPurchase_result deepCopy() {
8857
      return new getPurchaseOrderForPurchase_result(this);
4496 mandeep.dh 8858
    }
8859
 
8860
    @Override
8861
    public void clear() {
4555 mandeep.dh 8862
      this.success = null;
4496 mandeep.dh 8863
    }
8864
 
4555 mandeep.dh 8865
    public PurchaseOrder getSuccess() {
4496 mandeep.dh 8866
      return this.success;
8867
    }
8868
 
4555 mandeep.dh 8869
    public void setSuccess(PurchaseOrder success) {
4496 mandeep.dh 8870
      this.success = success;
8871
    }
8872
 
8873
    public void unsetSuccess() {
4555 mandeep.dh 8874
      this.success = null;
4496 mandeep.dh 8875
    }
8876
 
8877
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8878
    public boolean isSetSuccess() {
4555 mandeep.dh 8879
      return this.success != null;
4496 mandeep.dh 8880
    }
8881
 
8882
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 8883
      if (!value) {
8884
        this.success = null;
8885
      }
4496 mandeep.dh 8886
    }
8887
 
8888
    public void setFieldValue(_Fields field, Object value) {
8889
      switch (field) {
8890
      case SUCCESS:
8891
        if (value == null) {
8892
          unsetSuccess();
8893
        } else {
4555 mandeep.dh 8894
          setSuccess((PurchaseOrder)value);
4496 mandeep.dh 8895
        }
8896
        break;
8897
 
8898
      }
8899
    }
8900
 
8901
    public Object getFieldValue(_Fields field) {
8902
      switch (field) {
8903
      case SUCCESS:
4555 mandeep.dh 8904
        return getSuccess();
4496 mandeep.dh 8905
 
8906
      }
8907
      throw new IllegalStateException();
8908
    }
8909
 
8910
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8911
    public boolean isSet(_Fields field) {
8912
      if (field == null) {
8913
        throw new IllegalArgumentException();
8914
      }
8915
 
8916
      switch (field) {
8917
      case SUCCESS:
8918
        return isSetSuccess();
8919
      }
8920
      throw new IllegalStateException();
8921
    }
8922
 
8923
    @Override
8924
    public boolean equals(Object that) {
8925
      if (that == null)
8926
        return false;
4555 mandeep.dh 8927
      if (that instanceof getPurchaseOrderForPurchase_result)
8928
        return this.equals((getPurchaseOrderForPurchase_result)that);
4496 mandeep.dh 8929
      return false;
8930
    }
8931
 
4555 mandeep.dh 8932
    public boolean equals(getPurchaseOrderForPurchase_result that) {
4496 mandeep.dh 8933
      if (that == null)
8934
        return false;
8935
 
4555 mandeep.dh 8936
      boolean this_present_success = true && this.isSetSuccess();
8937
      boolean that_present_success = true && that.isSetSuccess();
4496 mandeep.dh 8938
      if (this_present_success || that_present_success) {
8939
        if (!(this_present_success && that_present_success))
8940
          return false;
4555 mandeep.dh 8941
        if (!this.success.equals(that.success))
4496 mandeep.dh 8942
          return false;
8943
      }
8944
 
8945
      return true;
8946
    }
8947
 
8948
    @Override
8949
    public int hashCode() {
8950
      return 0;
8951
    }
8952
 
4555 mandeep.dh 8953
    public int compareTo(getPurchaseOrderForPurchase_result other) {
4496 mandeep.dh 8954
      if (!getClass().equals(other.getClass())) {
8955
        return getClass().getName().compareTo(other.getClass().getName());
8956
      }
8957
 
8958
      int lastComparison = 0;
4555 mandeep.dh 8959
      getPurchaseOrderForPurchase_result typedOther = (getPurchaseOrderForPurchase_result)other;
4496 mandeep.dh 8960
 
8961
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8962
      if (lastComparison != 0) {
8963
        return lastComparison;
8964
      }
8965
      if (isSetSuccess()) {
8966
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8967
        if (lastComparison != 0) {
8968
          return lastComparison;
8969
        }
8970
      }
8971
      return 0;
8972
    }
8973
 
8974
    public _Fields fieldForId(int fieldId) {
8975
      return _Fields.findByThriftId(fieldId);
8976
    }
8977
 
8978
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8979
      org.apache.thrift.protocol.TField field;
8980
      iprot.readStructBegin();
8981
      while (true)
8982
      {
8983
        field = iprot.readFieldBegin();
8984
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8985
          break;
8986
        }
8987
        switch (field.id) {
8988
          case 0: // SUCCESS
4555 mandeep.dh 8989
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8990
              this.success = new PurchaseOrder();
8991
              this.success.read(iprot);
4496 mandeep.dh 8992
            } else { 
8993
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8994
            }
8995
            break;
8996
          default:
8997
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8998
        }
8999
        iprot.readFieldEnd();
9000
      }
9001
      iprot.readStructEnd();
9002
      validate();
9003
    }
9004
 
9005
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9006
      oprot.writeStructBegin(STRUCT_DESC);
9007
 
9008
      if (this.isSetSuccess()) {
9009
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 9010
        this.success.write(oprot);
4496 mandeep.dh 9011
        oprot.writeFieldEnd();
9012
      }
9013
      oprot.writeFieldStop();
9014
      oprot.writeStructEnd();
9015
    }
9016
 
9017
    @Override
9018
    public String toString() {
4555 mandeep.dh 9019
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_result(");
4496 mandeep.dh 9020
      boolean first = true;
9021
 
9022
      sb.append("success:");
4555 mandeep.dh 9023
      if (this.success == null) {
9024
        sb.append("null");
9025
      } else {
9026
        sb.append(this.success);
9027
      }
4496 mandeep.dh 9028
      first = false;
9029
      sb.append(")");
9030
      return sb.toString();
9031
    }
9032
 
9033
    public void validate() throws org.apache.thrift.TException {
9034
      // check for required fields
9035
    }
9036
 
9037
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9038
      try {
9039
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9040
      } catch (org.apache.thrift.TException te) {
9041
        throw new java.io.IOException(te);
9042
      }
9043
    }
9044
 
9045
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9046
      try {
9047
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9048
      } catch (org.apache.thrift.TException te) {
9049
        throw new java.io.IOException(te);
9050
      }
9051
    }
9052
 
9053
  }
9054
 
4754 mandeep.dh 9055
  public static class getPendingPurchaseOrders_args implements org.apache.thrift.TBase<getPendingPurchaseOrders_args, getPendingPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
9056
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_args");
9057
 
9058
    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)1);
9059
 
9060
    private long warehouseId; // required
9061
 
9062
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9063
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9064
      WAREHOUSE_ID((short)1, "warehouseId");
9065
 
9066
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9067
 
9068
      static {
9069
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9070
          byName.put(field.getFieldName(), field);
9071
        }
9072
      }
9073
 
9074
      /**
9075
       * Find the _Fields constant that matches fieldId, or null if its not found.
9076
       */
9077
      public static _Fields findByThriftId(int fieldId) {
9078
        switch(fieldId) {
9079
          case 1: // WAREHOUSE_ID
9080
            return WAREHOUSE_ID;
9081
          default:
9082
            return null;
9083
        }
9084
      }
9085
 
9086
      /**
9087
       * Find the _Fields constant that matches fieldId, throwing an exception
9088
       * if it is not found.
9089
       */
9090
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9091
        _Fields fields = findByThriftId(fieldId);
9092
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9093
        return fields;
9094
      }
9095
 
9096
      /**
9097
       * Find the _Fields constant that matches name, or null if its not found.
9098
       */
9099
      public static _Fields findByName(String name) {
9100
        return byName.get(name);
9101
      }
9102
 
9103
      private final short _thriftId;
9104
      private final String _fieldName;
9105
 
9106
      _Fields(short thriftId, String fieldName) {
9107
        _thriftId = thriftId;
9108
        _fieldName = fieldName;
9109
      }
9110
 
9111
      public short getThriftFieldId() {
9112
        return _thriftId;
9113
      }
9114
 
9115
      public String getFieldName() {
9116
        return _fieldName;
9117
      }
9118
    }
9119
 
9120
    // isset id assignments
9121
    private static final int __WAREHOUSEID_ISSET_ID = 0;
9122
    private BitSet __isset_bit_vector = new BitSet(1);
9123
 
9124
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9125
    static {
9126
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9127
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9128
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9129
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9130
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_args.class, metaDataMap);
9131
    }
9132
 
9133
    public getPendingPurchaseOrders_args() {
9134
    }
9135
 
9136
    public getPendingPurchaseOrders_args(
9137
      long warehouseId)
9138
    {
9139
      this();
9140
      this.warehouseId = warehouseId;
9141
      setWarehouseIdIsSet(true);
9142
    }
9143
 
9144
    /**
9145
     * Performs a deep copy on <i>other</i>.
9146
     */
9147
    public getPendingPurchaseOrders_args(getPendingPurchaseOrders_args other) {
9148
      __isset_bit_vector.clear();
9149
      __isset_bit_vector.or(other.__isset_bit_vector);
9150
      this.warehouseId = other.warehouseId;
9151
    }
9152
 
9153
    public getPendingPurchaseOrders_args deepCopy() {
9154
      return new getPendingPurchaseOrders_args(this);
9155
    }
9156
 
9157
    @Override
9158
    public void clear() {
9159
      setWarehouseIdIsSet(false);
9160
      this.warehouseId = 0;
9161
    }
9162
 
9163
    public long getWarehouseId() {
9164
      return this.warehouseId;
9165
    }
9166
 
9167
    public void setWarehouseId(long warehouseId) {
9168
      this.warehouseId = warehouseId;
9169
      setWarehouseIdIsSet(true);
9170
    }
9171
 
9172
    public void unsetWarehouseId() {
9173
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
9174
    }
9175
 
9176
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
9177
    public boolean isSetWarehouseId() {
9178
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
9179
    }
9180
 
9181
    public void setWarehouseIdIsSet(boolean value) {
9182
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
9183
    }
9184
 
9185
    public void setFieldValue(_Fields field, Object value) {
9186
      switch (field) {
9187
      case WAREHOUSE_ID:
9188
        if (value == null) {
9189
          unsetWarehouseId();
9190
        } else {
9191
          setWarehouseId((Long)value);
9192
        }
9193
        break;
9194
 
9195
      }
9196
    }
9197
 
9198
    public Object getFieldValue(_Fields field) {
9199
      switch (field) {
9200
      case WAREHOUSE_ID:
9201
        return Long.valueOf(getWarehouseId());
9202
 
9203
      }
9204
      throw new IllegalStateException();
9205
    }
9206
 
9207
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9208
    public boolean isSet(_Fields field) {
9209
      if (field == null) {
9210
        throw new IllegalArgumentException();
9211
      }
9212
 
9213
      switch (field) {
9214
      case WAREHOUSE_ID:
9215
        return isSetWarehouseId();
9216
      }
9217
      throw new IllegalStateException();
9218
    }
9219
 
9220
    @Override
9221
    public boolean equals(Object that) {
9222
      if (that == null)
9223
        return false;
9224
      if (that instanceof getPendingPurchaseOrders_args)
9225
        return this.equals((getPendingPurchaseOrders_args)that);
9226
      return false;
9227
    }
9228
 
9229
    public boolean equals(getPendingPurchaseOrders_args that) {
9230
      if (that == null)
9231
        return false;
9232
 
9233
      boolean this_present_warehouseId = true;
9234
      boolean that_present_warehouseId = true;
9235
      if (this_present_warehouseId || that_present_warehouseId) {
9236
        if (!(this_present_warehouseId && that_present_warehouseId))
9237
          return false;
9238
        if (this.warehouseId != that.warehouseId)
9239
          return false;
9240
      }
9241
 
9242
      return true;
9243
    }
9244
 
9245
    @Override
9246
    public int hashCode() {
9247
      return 0;
9248
    }
9249
 
9250
    public int compareTo(getPendingPurchaseOrders_args other) {
9251
      if (!getClass().equals(other.getClass())) {
9252
        return getClass().getName().compareTo(other.getClass().getName());
9253
      }
9254
 
9255
      int lastComparison = 0;
9256
      getPendingPurchaseOrders_args typedOther = (getPendingPurchaseOrders_args)other;
9257
 
9258
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
9259
      if (lastComparison != 0) {
9260
        return lastComparison;
9261
      }
9262
      if (isSetWarehouseId()) {
9263
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
9264
        if (lastComparison != 0) {
9265
          return lastComparison;
9266
        }
9267
      }
9268
      return 0;
9269
    }
9270
 
9271
    public _Fields fieldForId(int fieldId) {
9272
      return _Fields.findByThriftId(fieldId);
9273
    }
9274
 
9275
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9276
      org.apache.thrift.protocol.TField field;
9277
      iprot.readStructBegin();
9278
      while (true)
9279
      {
9280
        field = iprot.readFieldBegin();
9281
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9282
          break;
9283
        }
9284
        switch (field.id) {
9285
          case 1: // WAREHOUSE_ID
9286
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9287
              this.warehouseId = iprot.readI64();
9288
              setWarehouseIdIsSet(true);
9289
            } else { 
9290
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9291
            }
9292
            break;
9293
          default:
9294
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9295
        }
9296
        iprot.readFieldEnd();
9297
      }
9298
      iprot.readStructEnd();
9299
      validate();
9300
    }
9301
 
9302
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9303
      validate();
9304
 
9305
      oprot.writeStructBegin(STRUCT_DESC);
9306
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
9307
      oprot.writeI64(this.warehouseId);
9308
      oprot.writeFieldEnd();
9309
      oprot.writeFieldStop();
9310
      oprot.writeStructEnd();
9311
    }
9312
 
9313
    @Override
9314
    public String toString() {
9315
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_args(");
9316
      boolean first = true;
9317
 
9318
      sb.append("warehouseId:");
9319
      sb.append(this.warehouseId);
9320
      first = false;
9321
      sb.append(")");
9322
      return sb.toString();
9323
    }
9324
 
9325
    public void validate() throws org.apache.thrift.TException {
9326
      // check for required fields
9327
    }
9328
 
9329
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9330
      try {
9331
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9332
      } catch (org.apache.thrift.TException te) {
9333
        throw new java.io.IOException(te);
9334
      }
9335
    }
9336
 
9337
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9338
      try {
9339
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
9340
        __isset_bit_vector = new BitSet(1);
9341
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9342
      } catch (org.apache.thrift.TException te) {
9343
        throw new java.io.IOException(te);
9344
      }
9345
    }
9346
 
9347
  }
9348
 
9349
  public static class getPendingPurchaseOrders_result implements org.apache.thrift.TBase<getPendingPurchaseOrders_result, getPendingPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
9350
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_result");
9351
 
9352
    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);
9353
    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
9354
 
9355
    private List<PurchaseOrder> success; // required
9356
    private PurchaseServiceException e; // required
9357
 
9358
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9359
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9360
      SUCCESS((short)0, "success"),
9361
      E((short)1, "e");
9362
 
9363
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9364
 
9365
      static {
9366
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9367
          byName.put(field.getFieldName(), field);
9368
        }
9369
      }
9370
 
9371
      /**
9372
       * Find the _Fields constant that matches fieldId, or null if its not found.
9373
       */
9374
      public static _Fields findByThriftId(int fieldId) {
9375
        switch(fieldId) {
9376
          case 0: // SUCCESS
9377
            return SUCCESS;
9378
          case 1: // E
9379
            return E;
9380
          default:
9381
            return null;
9382
        }
9383
      }
9384
 
9385
      /**
9386
       * Find the _Fields constant that matches fieldId, throwing an exception
9387
       * if it is not found.
9388
       */
9389
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9390
        _Fields fields = findByThriftId(fieldId);
9391
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9392
        return fields;
9393
      }
9394
 
9395
      /**
9396
       * Find the _Fields constant that matches name, or null if its not found.
9397
       */
9398
      public static _Fields findByName(String name) {
9399
        return byName.get(name);
9400
      }
9401
 
9402
      private final short _thriftId;
9403
      private final String _fieldName;
9404
 
9405
      _Fields(short thriftId, String fieldName) {
9406
        _thriftId = thriftId;
9407
        _fieldName = fieldName;
9408
      }
9409
 
9410
      public short getThriftFieldId() {
9411
        return _thriftId;
9412
      }
9413
 
9414
      public String getFieldName() {
9415
        return _fieldName;
9416
      }
9417
    }
9418
 
9419
    // isset id assignments
9420
 
9421
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9422
    static {
9423
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9424
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9425
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
9426
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
9427
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9428
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9429
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9430
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_result.class, metaDataMap);
9431
    }
9432
 
9433
    public getPendingPurchaseOrders_result() {
9434
    }
9435
 
9436
    public getPendingPurchaseOrders_result(
9437
      List<PurchaseOrder> success,
9438
      PurchaseServiceException e)
9439
    {
9440
      this();
9441
      this.success = success;
9442
      this.e = e;
9443
    }
9444
 
9445
    /**
9446
     * Performs a deep copy on <i>other</i>.
9447
     */
9448
    public getPendingPurchaseOrders_result(getPendingPurchaseOrders_result other) {
9449
      if (other.isSetSuccess()) {
9450
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
9451
        for (PurchaseOrder other_element : other.success) {
9452
          __this__success.add(new PurchaseOrder(other_element));
9453
        }
9454
        this.success = __this__success;
9455
      }
9456
      if (other.isSetE()) {
9457
        this.e = new PurchaseServiceException(other.e);
9458
      }
9459
    }
9460
 
9461
    public getPendingPurchaseOrders_result deepCopy() {
9462
      return new getPendingPurchaseOrders_result(this);
9463
    }
9464
 
9465
    @Override
9466
    public void clear() {
9467
      this.success = null;
9468
      this.e = null;
9469
    }
9470
 
9471
    public int getSuccessSize() {
9472
      return (this.success == null) ? 0 : this.success.size();
9473
    }
9474
 
9475
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
9476
      return (this.success == null) ? null : this.success.iterator();
9477
    }
9478
 
9479
    public void addToSuccess(PurchaseOrder elem) {
9480
      if (this.success == null) {
9481
        this.success = new ArrayList<PurchaseOrder>();
9482
      }
9483
      this.success.add(elem);
9484
    }
9485
 
9486
    public List<PurchaseOrder> getSuccess() {
9487
      return this.success;
9488
    }
9489
 
9490
    public void setSuccess(List<PurchaseOrder> success) {
9491
      this.success = success;
9492
    }
9493
 
9494
    public void unsetSuccess() {
9495
      this.success = null;
9496
    }
9497
 
9498
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9499
    public boolean isSetSuccess() {
9500
      return this.success != null;
9501
    }
9502
 
9503
    public void setSuccessIsSet(boolean value) {
9504
      if (!value) {
9505
        this.success = null;
9506
      }
9507
    }
9508
 
9509
    public PurchaseServiceException getE() {
9510
      return this.e;
9511
    }
9512
 
9513
    public void setE(PurchaseServiceException e) {
9514
      this.e = e;
9515
    }
9516
 
9517
    public void unsetE() {
9518
      this.e = null;
9519
    }
9520
 
9521
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
9522
    public boolean isSetE() {
9523
      return this.e != null;
9524
    }
9525
 
9526
    public void setEIsSet(boolean value) {
9527
      if (!value) {
9528
        this.e = null;
9529
      }
9530
    }
9531
 
9532
    public void setFieldValue(_Fields field, Object value) {
9533
      switch (field) {
9534
      case SUCCESS:
9535
        if (value == null) {
9536
          unsetSuccess();
9537
        } else {
9538
          setSuccess((List<PurchaseOrder>)value);
9539
        }
9540
        break;
9541
 
9542
      case E:
9543
        if (value == null) {
9544
          unsetE();
9545
        } else {
9546
          setE((PurchaseServiceException)value);
9547
        }
9548
        break;
9549
 
9550
      }
9551
    }
9552
 
9553
    public Object getFieldValue(_Fields field) {
9554
      switch (field) {
9555
      case SUCCESS:
9556
        return getSuccess();
9557
 
9558
      case E:
9559
        return getE();
9560
 
9561
      }
9562
      throw new IllegalStateException();
9563
    }
9564
 
9565
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9566
    public boolean isSet(_Fields field) {
9567
      if (field == null) {
9568
        throw new IllegalArgumentException();
9569
      }
9570
 
9571
      switch (field) {
9572
      case SUCCESS:
9573
        return isSetSuccess();
9574
      case E:
9575
        return isSetE();
9576
      }
9577
      throw new IllegalStateException();
9578
    }
9579
 
9580
    @Override
9581
    public boolean equals(Object that) {
9582
      if (that == null)
9583
        return false;
9584
      if (that instanceof getPendingPurchaseOrders_result)
9585
        return this.equals((getPendingPurchaseOrders_result)that);
9586
      return false;
9587
    }
9588
 
9589
    public boolean equals(getPendingPurchaseOrders_result that) {
9590
      if (that == null)
9591
        return false;
9592
 
9593
      boolean this_present_success = true && this.isSetSuccess();
9594
      boolean that_present_success = true && that.isSetSuccess();
9595
      if (this_present_success || that_present_success) {
9596
        if (!(this_present_success && that_present_success))
9597
          return false;
9598
        if (!this.success.equals(that.success))
9599
          return false;
9600
      }
9601
 
9602
      boolean this_present_e = true && this.isSetE();
9603
      boolean that_present_e = true && that.isSetE();
9604
      if (this_present_e || that_present_e) {
9605
        if (!(this_present_e && that_present_e))
9606
          return false;
9607
        if (!this.e.equals(that.e))
9608
          return false;
9609
      }
9610
 
9611
      return true;
9612
    }
9613
 
9614
    @Override
9615
    public int hashCode() {
9616
      return 0;
9617
    }
9618
 
9619
    public int compareTo(getPendingPurchaseOrders_result other) {
9620
      if (!getClass().equals(other.getClass())) {
9621
        return getClass().getName().compareTo(other.getClass().getName());
9622
      }
9623
 
9624
      int lastComparison = 0;
9625
      getPendingPurchaseOrders_result typedOther = (getPendingPurchaseOrders_result)other;
9626
 
9627
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9628
      if (lastComparison != 0) {
9629
        return lastComparison;
9630
      }
9631
      if (isSetSuccess()) {
9632
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9633
        if (lastComparison != 0) {
9634
          return lastComparison;
9635
        }
9636
      }
9637
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
9638
      if (lastComparison != 0) {
9639
        return lastComparison;
9640
      }
9641
      if (isSetE()) {
9642
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
9643
        if (lastComparison != 0) {
9644
          return lastComparison;
9645
        }
9646
      }
9647
      return 0;
9648
    }
9649
 
9650
    public _Fields fieldForId(int fieldId) {
9651
      return _Fields.findByThriftId(fieldId);
9652
    }
9653
 
9654
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9655
      org.apache.thrift.protocol.TField field;
9656
      iprot.readStructBegin();
9657
      while (true)
9658
      {
9659
        field = iprot.readFieldBegin();
9660
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9661
          break;
9662
        }
9663
        switch (field.id) {
9664
          case 0: // SUCCESS
9665
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
9666
              {
6385 amar.kumar 9667
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
9668
                this.success = new ArrayList<PurchaseOrder>(_list16.size);
9669
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
4754 mandeep.dh 9670
                {
6385 amar.kumar 9671
                  PurchaseOrder _elem18; // required
9672
                  _elem18 = new PurchaseOrder();
9673
                  _elem18.read(iprot);
9674
                  this.success.add(_elem18);
4754 mandeep.dh 9675
                }
9676
                iprot.readListEnd();
9677
              }
9678
            } else { 
9679
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9680
            }
9681
            break;
9682
          case 1: // E
9683
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9684
              this.e = new PurchaseServiceException();
9685
              this.e.read(iprot);
9686
            } else { 
9687
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9688
            }
9689
            break;
9690
          default:
9691
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9692
        }
9693
        iprot.readFieldEnd();
9694
      }
9695
      iprot.readStructEnd();
9696
      validate();
9697
    }
9698
 
9699
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9700
      oprot.writeStructBegin(STRUCT_DESC);
9701
 
9702
      if (this.isSetSuccess()) {
9703
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9704
        {
9705
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 9706
          for (PurchaseOrder _iter19 : this.success)
4754 mandeep.dh 9707
          {
6385 amar.kumar 9708
            _iter19.write(oprot);
4754 mandeep.dh 9709
          }
9710
          oprot.writeListEnd();
9711
        }
9712
        oprot.writeFieldEnd();
9713
      } else if (this.isSetE()) {
9714
        oprot.writeFieldBegin(E_FIELD_DESC);
9715
        this.e.write(oprot);
9716
        oprot.writeFieldEnd();
9717
      }
9718
      oprot.writeFieldStop();
9719
      oprot.writeStructEnd();
9720
    }
9721
 
9722
    @Override
9723
    public String toString() {
9724
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_result(");
9725
      boolean first = true;
9726
 
9727
      sb.append("success:");
9728
      if (this.success == null) {
9729
        sb.append("null");
9730
      } else {
9731
        sb.append(this.success);
9732
      }
9733
      first = false;
9734
      if (!first) sb.append(", ");
9735
      sb.append("e:");
9736
      if (this.e == null) {
9737
        sb.append("null");
9738
      } else {
9739
        sb.append(this.e);
9740
      }
9741
      first = false;
9742
      sb.append(")");
9743
      return sb.toString();
9744
    }
9745
 
9746
    public void validate() throws org.apache.thrift.TException {
9747
      // check for required fields
9748
    }
9749
 
9750
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9751
      try {
9752
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9753
      } catch (org.apache.thrift.TException te) {
9754
        throw new java.io.IOException(te);
9755
      }
9756
    }
9757
 
9758
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9759
      try {
9760
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9761
      } catch (org.apache.thrift.TException te) {
9762
        throw new java.io.IOException(te);
9763
      }
9764
    }
9765
 
9766
  }
9767
 
9768
  public static class getSuppliers_args implements org.apache.thrift.TBase<getSuppliers_args, getSuppliers_args._Fields>, java.io.Serializable, Cloneable   {
9769
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_args");
9770
 
9771
 
9772
 
9773
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9774
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9775
;
9776
 
9777
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9778
 
9779
      static {
9780
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9781
          byName.put(field.getFieldName(), field);
9782
        }
9783
      }
9784
 
9785
      /**
9786
       * Find the _Fields constant that matches fieldId, or null if its not found.
9787
       */
9788
      public static _Fields findByThriftId(int fieldId) {
9789
        switch(fieldId) {
9790
          default:
9791
            return null;
9792
        }
9793
      }
9794
 
9795
      /**
9796
       * Find the _Fields constant that matches fieldId, throwing an exception
9797
       * if it is not found.
9798
       */
9799
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9800
        _Fields fields = findByThriftId(fieldId);
9801
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9802
        return fields;
9803
      }
9804
 
9805
      /**
9806
       * Find the _Fields constant that matches name, or null if its not found.
9807
       */
9808
      public static _Fields findByName(String name) {
9809
        return byName.get(name);
9810
      }
9811
 
9812
      private final short _thriftId;
9813
      private final String _fieldName;
9814
 
9815
      _Fields(short thriftId, String fieldName) {
9816
        _thriftId = thriftId;
9817
        _fieldName = fieldName;
9818
      }
9819
 
9820
      public short getThriftFieldId() {
9821
        return _thriftId;
9822
      }
9823
 
9824
      public String getFieldName() {
9825
        return _fieldName;
9826
      }
9827
    }
9828
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9829
    static {
9830
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9831
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9832
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_args.class, metaDataMap);
9833
    }
9834
 
9835
    public getSuppliers_args() {
9836
    }
9837
 
9838
    /**
9839
     * Performs a deep copy on <i>other</i>.
9840
     */
9841
    public getSuppliers_args(getSuppliers_args other) {
9842
    }
9843
 
9844
    public getSuppliers_args deepCopy() {
9845
      return new getSuppliers_args(this);
9846
    }
9847
 
9848
    @Override
9849
    public void clear() {
9850
    }
9851
 
9852
    public void setFieldValue(_Fields field, Object value) {
9853
      switch (field) {
9854
      }
9855
    }
9856
 
9857
    public Object getFieldValue(_Fields field) {
9858
      switch (field) {
9859
      }
9860
      throw new IllegalStateException();
9861
    }
9862
 
9863
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9864
    public boolean isSet(_Fields field) {
9865
      if (field == null) {
9866
        throw new IllegalArgumentException();
9867
      }
9868
 
9869
      switch (field) {
9870
      }
9871
      throw new IllegalStateException();
9872
    }
9873
 
9874
    @Override
9875
    public boolean equals(Object that) {
9876
      if (that == null)
9877
        return false;
9878
      if (that instanceof getSuppliers_args)
9879
        return this.equals((getSuppliers_args)that);
9880
      return false;
9881
    }
9882
 
9883
    public boolean equals(getSuppliers_args that) {
9884
      if (that == null)
9885
        return false;
9886
 
9887
      return true;
9888
    }
9889
 
9890
    @Override
9891
    public int hashCode() {
9892
      return 0;
9893
    }
9894
 
9895
    public int compareTo(getSuppliers_args other) {
9896
      if (!getClass().equals(other.getClass())) {
9897
        return getClass().getName().compareTo(other.getClass().getName());
9898
      }
9899
 
9900
      int lastComparison = 0;
9901
      getSuppliers_args typedOther = (getSuppliers_args)other;
9902
 
9903
      return 0;
9904
    }
9905
 
9906
    public _Fields fieldForId(int fieldId) {
9907
      return _Fields.findByThriftId(fieldId);
9908
    }
9909
 
9910
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9911
      org.apache.thrift.protocol.TField field;
9912
      iprot.readStructBegin();
9913
      while (true)
9914
      {
9915
        field = iprot.readFieldBegin();
9916
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9917
          break;
9918
        }
9919
        switch (field.id) {
9920
          default:
9921
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9922
        }
9923
        iprot.readFieldEnd();
9924
      }
9925
      iprot.readStructEnd();
9926
      validate();
9927
    }
9928
 
9929
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9930
      validate();
9931
 
9932
      oprot.writeStructBegin(STRUCT_DESC);
9933
      oprot.writeFieldStop();
9934
      oprot.writeStructEnd();
9935
    }
9936
 
9937
    @Override
9938
    public String toString() {
9939
      StringBuilder sb = new StringBuilder("getSuppliers_args(");
9940
      boolean first = true;
9941
 
9942
      sb.append(")");
9943
      return sb.toString();
9944
    }
9945
 
9946
    public void validate() throws org.apache.thrift.TException {
9947
      // check for required fields
9948
    }
9949
 
9950
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9951
      try {
9952
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9953
      } catch (org.apache.thrift.TException te) {
9954
        throw new java.io.IOException(te);
9955
      }
9956
    }
9957
 
9958
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9959
      try {
9960
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9961
      } catch (org.apache.thrift.TException te) {
9962
        throw new java.io.IOException(te);
9963
      }
9964
    }
9965
 
9966
  }
9967
 
9968
  public static class getSuppliers_result implements org.apache.thrift.TBase<getSuppliers_result, getSuppliers_result._Fields>, java.io.Serializable, Cloneable   {
9969
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_result");
9970
 
9971
    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);
9972
    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
9973
 
9974
    private List<Supplier> success; // required
9975
    private PurchaseServiceException e; // required
9976
 
9977
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9978
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9979
      SUCCESS((short)0, "success"),
9980
      E((short)1, "e");
9981
 
9982
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9983
 
9984
      static {
9985
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9986
          byName.put(field.getFieldName(), field);
9987
        }
9988
      }
9989
 
9990
      /**
9991
       * Find the _Fields constant that matches fieldId, or null if its not found.
9992
       */
9993
      public static _Fields findByThriftId(int fieldId) {
9994
        switch(fieldId) {
9995
          case 0: // SUCCESS
9996
            return SUCCESS;
9997
          case 1: // E
9998
            return E;
9999
          default:
10000
            return null;
10001
        }
10002
      }
10003
 
10004
      /**
10005
       * Find the _Fields constant that matches fieldId, throwing an exception
10006
       * if it is not found.
10007
       */
10008
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10009
        _Fields fields = findByThriftId(fieldId);
10010
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10011
        return fields;
10012
      }
10013
 
10014
      /**
10015
       * Find the _Fields constant that matches name, or null if its not found.
10016
       */
10017
      public static _Fields findByName(String name) {
10018
        return byName.get(name);
10019
      }
10020
 
10021
      private final short _thriftId;
10022
      private final String _fieldName;
10023
 
10024
      _Fields(short thriftId, String fieldName) {
10025
        _thriftId = thriftId;
10026
        _fieldName = fieldName;
10027
      }
10028
 
10029
      public short getThriftFieldId() {
10030
        return _thriftId;
10031
      }
10032
 
10033
      public String getFieldName() {
10034
        return _fieldName;
10035
      }
10036
    }
10037
 
10038
    // isset id assignments
10039
 
10040
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10041
    static {
10042
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10043
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10044
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
10045
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class))));
10046
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10047
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
10048
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10049
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_result.class, metaDataMap);
10050
    }
10051
 
10052
    public getSuppliers_result() {
10053
    }
10054
 
10055
    public getSuppliers_result(
10056
      List<Supplier> success,
10057
      PurchaseServiceException e)
10058
    {
10059
      this();
10060
      this.success = success;
10061
      this.e = e;
10062
    }
10063
 
10064
    /**
10065
     * Performs a deep copy on <i>other</i>.
10066
     */
10067
    public getSuppliers_result(getSuppliers_result other) {
10068
      if (other.isSetSuccess()) {
10069
        List<Supplier> __this__success = new ArrayList<Supplier>();
10070
        for (Supplier other_element : other.success) {
10071
          __this__success.add(new Supplier(other_element));
10072
        }
10073
        this.success = __this__success;
10074
      }
10075
      if (other.isSetE()) {
10076
        this.e = new PurchaseServiceException(other.e);
10077
      }
10078
    }
10079
 
10080
    public getSuppliers_result deepCopy() {
10081
      return new getSuppliers_result(this);
10082
    }
10083
 
10084
    @Override
10085
    public void clear() {
10086
      this.success = null;
10087
      this.e = null;
10088
    }
10089
 
10090
    public int getSuccessSize() {
10091
      return (this.success == null) ? 0 : this.success.size();
10092
    }
10093
 
10094
    public java.util.Iterator<Supplier> getSuccessIterator() {
10095
      return (this.success == null) ? null : this.success.iterator();
10096
    }
10097
 
10098
    public void addToSuccess(Supplier elem) {
10099
      if (this.success == null) {
10100
        this.success = new ArrayList<Supplier>();
10101
      }
10102
      this.success.add(elem);
10103
    }
10104
 
10105
    public List<Supplier> getSuccess() {
10106
      return this.success;
10107
    }
10108
 
10109
    public void setSuccess(List<Supplier> success) {
10110
      this.success = success;
10111
    }
10112
 
10113
    public void unsetSuccess() {
10114
      this.success = null;
10115
    }
10116
 
10117
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
10118
    public boolean isSetSuccess() {
10119
      return this.success != null;
10120
    }
10121
 
10122
    public void setSuccessIsSet(boolean value) {
10123
      if (!value) {
10124
        this.success = null;
10125
      }
10126
    }
10127
 
10128
    public PurchaseServiceException getE() {
10129
      return this.e;
10130
    }
10131
 
10132
    public void setE(PurchaseServiceException e) {
10133
      this.e = e;
10134
    }
10135
 
10136
    public void unsetE() {
10137
      this.e = null;
10138
    }
10139
 
10140
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
10141
    public boolean isSetE() {
10142
      return this.e != null;
10143
    }
10144
 
10145
    public void setEIsSet(boolean value) {
10146
      if (!value) {
10147
        this.e = null;
10148
      }
10149
    }
10150
 
10151
    public void setFieldValue(_Fields field, Object value) {
10152
      switch (field) {
10153
      case SUCCESS:
10154
        if (value == null) {
10155
          unsetSuccess();
10156
        } else {
10157
          setSuccess((List<Supplier>)value);
10158
        }
10159
        break;
10160
 
10161
      case E:
10162
        if (value == null) {
10163
          unsetE();
10164
        } else {
10165
          setE((PurchaseServiceException)value);
10166
        }
10167
        break;
10168
 
10169
      }
10170
    }
10171
 
10172
    public Object getFieldValue(_Fields field) {
10173
      switch (field) {
10174
      case SUCCESS:
10175
        return getSuccess();
10176
 
10177
      case E:
10178
        return getE();
10179
 
10180
      }
10181
      throw new IllegalStateException();
10182
    }
10183
 
10184
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10185
    public boolean isSet(_Fields field) {
10186
      if (field == null) {
10187
        throw new IllegalArgumentException();
10188
      }
10189
 
10190
      switch (field) {
10191
      case SUCCESS:
10192
        return isSetSuccess();
10193
      case E:
10194
        return isSetE();
10195
      }
10196
      throw new IllegalStateException();
10197
    }
10198
 
10199
    @Override
10200
    public boolean equals(Object that) {
10201
      if (that == null)
10202
        return false;
10203
      if (that instanceof getSuppliers_result)
10204
        return this.equals((getSuppliers_result)that);
10205
      return false;
10206
    }
10207
 
10208
    public boolean equals(getSuppliers_result that) {
10209
      if (that == null)
10210
        return false;
10211
 
10212
      boolean this_present_success = true && this.isSetSuccess();
10213
      boolean that_present_success = true && that.isSetSuccess();
10214
      if (this_present_success || that_present_success) {
10215
        if (!(this_present_success && that_present_success))
10216
          return false;
10217
        if (!this.success.equals(that.success))
10218
          return false;
10219
      }
10220
 
10221
      boolean this_present_e = true && this.isSetE();
10222
      boolean that_present_e = true && that.isSetE();
10223
      if (this_present_e || that_present_e) {
10224
        if (!(this_present_e && that_present_e))
10225
          return false;
10226
        if (!this.e.equals(that.e))
10227
          return false;
10228
      }
10229
 
10230
      return true;
10231
    }
10232
 
10233
    @Override
10234
    public int hashCode() {
10235
      return 0;
10236
    }
10237
 
10238
    public int compareTo(getSuppliers_result other) {
10239
      if (!getClass().equals(other.getClass())) {
10240
        return getClass().getName().compareTo(other.getClass().getName());
10241
      }
10242
 
10243
      int lastComparison = 0;
10244
      getSuppliers_result typedOther = (getSuppliers_result)other;
10245
 
10246
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
10247
      if (lastComparison != 0) {
10248
        return lastComparison;
10249
      }
10250
      if (isSetSuccess()) {
10251
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
10252
        if (lastComparison != 0) {
10253
          return lastComparison;
10254
        }
10255
      }
10256
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
10257
      if (lastComparison != 0) {
10258
        return lastComparison;
10259
      }
10260
      if (isSetE()) {
10261
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
10262
        if (lastComparison != 0) {
10263
          return lastComparison;
10264
        }
10265
      }
10266
      return 0;
10267
    }
10268
 
10269
    public _Fields fieldForId(int fieldId) {
10270
      return _Fields.findByThriftId(fieldId);
10271
    }
10272
 
10273
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10274
      org.apache.thrift.protocol.TField field;
10275
      iprot.readStructBegin();
10276
      while (true)
10277
      {
10278
        field = iprot.readFieldBegin();
10279
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10280
          break;
10281
        }
10282
        switch (field.id) {
10283
          case 0: // SUCCESS
10284
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
10285
              {
6385 amar.kumar 10286
                org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
10287
                this.success = new ArrayList<Supplier>(_list20.size);
10288
                for (int _i21 = 0; _i21 < _list20.size; ++_i21)
4754 mandeep.dh 10289
                {
6385 amar.kumar 10290
                  Supplier _elem22; // required
10291
                  _elem22 = new Supplier();
10292
                  _elem22.read(iprot);
10293
                  this.success.add(_elem22);
4754 mandeep.dh 10294
                }
10295
                iprot.readListEnd();
10296
              }
10297
            } else { 
10298
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10299
            }
10300
            break;
10301
          case 1: // E
10302
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10303
              this.e = new PurchaseServiceException();
10304
              this.e.read(iprot);
10305
            } else { 
10306
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10307
            }
10308
            break;
10309
          default:
10310
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10311
        }
10312
        iprot.readFieldEnd();
10313
      }
10314
      iprot.readStructEnd();
10315
      validate();
10316
    }
10317
 
10318
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10319
      oprot.writeStructBegin(STRUCT_DESC);
10320
 
10321
      if (this.isSetSuccess()) {
10322
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10323
        {
10324
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 10325
          for (Supplier _iter23 : this.success)
4754 mandeep.dh 10326
          {
6385 amar.kumar 10327
            _iter23.write(oprot);
4754 mandeep.dh 10328
          }
10329
          oprot.writeListEnd();
10330
        }
10331
        oprot.writeFieldEnd();
10332
      } else if (this.isSetE()) {
10333
        oprot.writeFieldBegin(E_FIELD_DESC);
10334
        this.e.write(oprot);
10335
        oprot.writeFieldEnd();
10336
      }
10337
      oprot.writeFieldStop();
10338
      oprot.writeStructEnd();
10339
    }
10340
 
10341
    @Override
10342
    public String toString() {
10343
      StringBuilder sb = new StringBuilder("getSuppliers_result(");
10344
      boolean first = true;
10345
 
10346
      sb.append("success:");
10347
      if (this.success == null) {
10348
        sb.append("null");
10349
      } else {
10350
        sb.append(this.success);
10351
      }
10352
      first = false;
10353
      if (!first) sb.append(", ");
10354
      sb.append("e:");
10355
      if (this.e == null) {
10356
        sb.append("null");
10357
      } else {
10358
        sb.append(this.e);
10359
      }
10360
      first = false;
10361
      sb.append(")");
10362
      return sb.toString();
10363
    }
10364
 
10365
    public void validate() throws org.apache.thrift.TException {
10366
      // check for required fields
10367
    }
10368
 
10369
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10370
      try {
10371
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10372
      } catch (org.apache.thrift.TException te) {
10373
        throw new java.io.IOException(te);
10374
      }
10375
    }
10376
 
10377
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10378
      try {
10379
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10380
      } catch (org.apache.thrift.TException te) {
10381
        throw new java.io.IOException(te);
10382
      }
10383
    }
10384
 
10385
  }
10386
 
10387
  public static class fulfillPO_args implements org.apache.thrift.TBase<fulfillPO_args, fulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
10388
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_args");
10389
 
10390
    private static final org.apache.thrift.protocol.TField PURCHASE_ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseOrderId", org.apache.thrift.protocol.TType.I64, (short)1);
10391
    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);
10392
    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);
10393
 
10394
    private long purchaseOrderId; // required
10395
    private long itemId; // required
10396
    private long quantity; // required
10397
 
10398
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10399
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10400
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
10401
      ITEM_ID((short)2, "itemId"),
10402
      QUANTITY((short)3, "quantity");
10403
 
10404
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10405
 
10406
      static {
10407
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10408
          byName.put(field.getFieldName(), field);
10409
        }
10410
      }
10411
 
10412
      /**
10413
       * Find the _Fields constant that matches fieldId, or null if its not found.
10414
       */
10415
      public static _Fields findByThriftId(int fieldId) {
10416
        switch(fieldId) {
10417
          case 1: // PURCHASE_ORDER_ID
10418
            return PURCHASE_ORDER_ID;
10419
          case 2: // ITEM_ID
10420
            return ITEM_ID;
10421
          case 3: // QUANTITY
10422
            return QUANTITY;
10423
          default:
10424
            return null;
10425
        }
10426
      }
10427
 
10428
      /**
10429
       * Find the _Fields constant that matches fieldId, throwing an exception
10430
       * if it is not found.
10431
       */
10432
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10433
        _Fields fields = findByThriftId(fieldId);
10434
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10435
        return fields;
10436
      }
10437
 
10438
      /**
10439
       * Find the _Fields constant that matches name, or null if its not found.
10440
       */
10441
      public static _Fields findByName(String name) {
10442
        return byName.get(name);
10443
      }
10444
 
10445
      private final short _thriftId;
10446
      private final String _fieldName;
10447
 
10448
      _Fields(short thriftId, String fieldName) {
10449
        _thriftId = thriftId;
10450
        _fieldName = fieldName;
10451
      }
10452
 
10453
      public short getThriftFieldId() {
10454
        return _thriftId;
10455
      }
10456
 
10457
      public String getFieldName() {
10458
        return _fieldName;
10459
      }
10460
    }
10461
 
10462
    // isset id assignments
10463
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
10464
    private static final int __ITEMID_ISSET_ID = 1;
10465
    private static final int __QUANTITY_ISSET_ID = 2;
10466
    private BitSet __isset_bit_vector = new BitSet(3);
10467
 
10468
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10469
    static {
10470
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10471
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10472
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10473
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10474
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10475
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10476
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10477
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10478
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_args.class, metaDataMap);
10479
    }
10480
 
10481
    public fulfillPO_args() {
10482
    }
10483
 
10484
    public fulfillPO_args(
10485
      long purchaseOrderId,
10486
      long itemId,
10487
      long quantity)
10488
    {
10489
      this();
10490
      this.purchaseOrderId = purchaseOrderId;
10491
      setPurchaseOrderIdIsSet(true);
10492
      this.itemId = itemId;
10493
      setItemIdIsSet(true);
10494
      this.quantity = quantity;
10495
      setQuantityIsSet(true);
10496
    }
10497
 
10498
    /**
10499
     * Performs a deep copy on <i>other</i>.
10500
     */
10501
    public fulfillPO_args(fulfillPO_args other) {
10502
      __isset_bit_vector.clear();
10503
      __isset_bit_vector.or(other.__isset_bit_vector);
10504
      this.purchaseOrderId = other.purchaseOrderId;
10505
      this.itemId = other.itemId;
10506
      this.quantity = other.quantity;
10507
    }
10508
 
10509
    public fulfillPO_args deepCopy() {
10510
      return new fulfillPO_args(this);
10511
    }
10512
 
10513
    @Override
10514
    public void clear() {
10515
      setPurchaseOrderIdIsSet(false);
10516
      this.purchaseOrderId = 0;
10517
      setItemIdIsSet(false);
10518
      this.itemId = 0;
10519
      setQuantityIsSet(false);
10520
      this.quantity = 0;
10521
    }
10522
 
10523
    public long getPurchaseOrderId() {
10524
      return this.purchaseOrderId;
10525
    }
10526
 
10527
    public void setPurchaseOrderId(long purchaseOrderId) {
10528
      this.purchaseOrderId = purchaseOrderId;
10529
      setPurchaseOrderIdIsSet(true);
10530
    }
10531
 
10532
    public void unsetPurchaseOrderId() {
10533
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
10534
    }
10535
 
10536
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
10537
    public boolean isSetPurchaseOrderId() {
10538
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
10539
    }
10540
 
10541
    public void setPurchaseOrderIdIsSet(boolean value) {
10542
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
10543
    }
10544
 
10545
    public long getItemId() {
10546
      return this.itemId;
10547
    }
10548
 
10549
    public void setItemId(long itemId) {
10550
      this.itemId = itemId;
10551
      setItemIdIsSet(true);
10552
    }
10553
 
10554
    public void unsetItemId() {
10555
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
10556
    }
10557
 
10558
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
10559
    public boolean isSetItemId() {
10560
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
10561
    }
10562
 
10563
    public void setItemIdIsSet(boolean value) {
10564
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
10565
    }
10566
 
10567
    public long getQuantity() {
10568
      return this.quantity;
10569
    }
10570
 
10571
    public void setQuantity(long quantity) {
10572
      this.quantity = quantity;
10573
      setQuantityIsSet(true);
10574
    }
10575
 
10576
    public void unsetQuantity() {
10577
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
10578
    }
10579
 
10580
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
10581
    public boolean isSetQuantity() {
10582
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
10583
    }
10584
 
10585
    public void setQuantityIsSet(boolean value) {
10586
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
10587
    }
10588
 
10589
    public void setFieldValue(_Fields field, Object value) {
10590
      switch (field) {
10591
      case PURCHASE_ORDER_ID:
10592
        if (value == null) {
10593
          unsetPurchaseOrderId();
10594
        } else {
10595
          setPurchaseOrderId((Long)value);
10596
        }
10597
        break;
10598
 
10599
      case ITEM_ID:
10600
        if (value == null) {
10601
          unsetItemId();
10602
        } else {
10603
          setItemId((Long)value);
10604
        }
10605
        break;
10606
 
10607
      case QUANTITY:
10608
        if (value == null) {
10609
          unsetQuantity();
10610
        } else {
10611
          setQuantity((Long)value);
10612
        }
10613
        break;
10614
 
10615
      }
10616
    }
10617
 
10618
    public Object getFieldValue(_Fields field) {
10619
      switch (field) {
10620
      case PURCHASE_ORDER_ID:
10621
        return Long.valueOf(getPurchaseOrderId());
10622
 
10623
      case ITEM_ID:
10624
        return Long.valueOf(getItemId());
10625
 
10626
      case QUANTITY:
10627
        return Long.valueOf(getQuantity());
10628
 
10629
      }
10630
      throw new IllegalStateException();
10631
    }
10632
 
10633
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10634
    public boolean isSet(_Fields field) {
10635
      if (field == null) {
10636
        throw new IllegalArgumentException();
10637
      }
10638
 
10639
      switch (field) {
10640
      case PURCHASE_ORDER_ID:
10641
        return isSetPurchaseOrderId();
10642
      case ITEM_ID:
10643
        return isSetItemId();
10644
      case QUANTITY:
10645
        return isSetQuantity();
10646
      }
10647
      throw new IllegalStateException();
10648
    }
10649
 
10650
    @Override
10651
    public boolean equals(Object that) {
10652
      if (that == null)
10653
        return false;
10654
      if (that instanceof fulfillPO_args)
10655
        return this.equals((fulfillPO_args)that);
10656
      return false;
10657
    }
10658
 
10659
    public boolean equals(fulfillPO_args that) {
10660
      if (that == null)
10661
        return false;
10662
 
10663
      boolean this_present_purchaseOrderId = true;
10664
      boolean that_present_purchaseOrderId = true;
10665
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
10666
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
10667
          return false;
10668
        if (this.purchaseOrderId != that.purchaseOrderId)
10669
          return false;
10670
      }
10671
 
10672
      boolean this_present_itemId = true;
10673
      boolean that_present_itemId = true;
10674
      if (this_present_itemId || that_present_itemId) {
10675
        if (!(this_present_itemId && that_present_itemId))
10676
          return false;
10677
        if (this.itemId != that.itemId)
10678
          return false;
10679
      }
10680
 
10681
      boolean this_present_quantity = true;
10682
      boolean that_present_quantity = true;
10683
      if (this_present_quantity || that_present_quantity) {
10684
        if (!(this_present_quantity && that_present_quantity))
10685
          return false;
10686
        if (this.quantity != that.quantity)
10687
          return false;
10688
      }
10689
 
10690
      return true;
10691
    }
10692
 
10693
    @Override
10694
    public int hashCode() {
10695
      return 0;
10696
    }
10697
 
10698
    public int compareTo(fulfillPO_args other) {
10699
      if (!getClass().equals(other.getClass())) {
10700
        return getClass().getName().compareTo(other.getClass().getName());
10701
      }
10702
 
10703
      int lastComparison = 0;
10704
      fulfillPO_args typedOther = (fulfillPO_args)other;
10705
 
10706
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
10707
      if (lastComparison != 0) {
10708
        return lastComparison;
10709
      }
10710
      if (isSetPurchaseOrderId()) {
10711
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
10712
        if (lastComparison != 0) {
10713
          return lastComparison;
10714
        }
10715
      }
10716
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
10717
      if (lastComparison != 0) {
10718
        return lastComparison;
10719
      }
10720
      if (isSetItemId()) {
10721
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
10722
        if (lastComparison != 0) {
10723
          return lastComparison;
10724
        }
10725
      }
10726
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
10727
      if (lastComparison != 0) {
10728
        return lastComparison;
10729
      }
10730
      if (isSetQuantity()) {
10731
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
10732
        if (lastComparison != 0) {
10733
          return lastComparison;
10734
        }
10735
      }
10736
      return 0;
10737
    }
10738
 
10739
    public _Fields fieldForId(int fieldId) {
10740
      return _Fields.findByThriftId(fieldId);
10741
    }
10742
 
10743
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10744
      org.apache.thrift.protocol.TField field;
10745
      iprot.readStructBegin();
10746
      while (true)
10747
      {
10748
        field = iprot.readFieldBegin();
10749
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10750
          break;
10751
        }
10752
        switch (field.id) {
10753
          case 1: // PURCHASE_ORDER_ID
10754
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10755
              this.purchaseOrderId = iprot.readI64();
10756
              setPurchaseOrderIdIsSet(true);
10757
            } else { 
10758
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10759
            }
10760
            break;
10761
          case 2: // ITEM_ID
10762
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10763
              this.itemId = iprot.readI64();
10764
              setItemIdIsSet(true);
10765
            } else { 
10766
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10767
            }
10768
            break;
10769
          case 3: // QUANTITY
10770
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10771
              this.quantity = iprot.readI64();
10772
              setQuantityIsSet(true);
10773
            } else { 
10774
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10775
            }
10776
            break;
10777
          default:
10778
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10779
        }
10780
        iprot.readFieldEnd();
10781
      }
10782
      iprot.readStructEnd();
10783
      validate();
10784
    }
10785
 
10786
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10787
      validate();
10788
 
10789
      oprot.writeStructBegin(STRUCT_DESC);
10790
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
10791
      oprot.writeI64(this.purchaseOrderId);
10792
      oprot.writeFieldEnd();
10793
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
10794
      oprot.writeI64(this.itemId);
10795
      oprot.writeFieldEnd();
10796
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
10797
      oprot.writeI64(this.quantity);
10798
      oprot.writeFieldEnd();
10799
      oprot.writeFieldStop();
10800
      oprot.writeStructEnd();
10801
    }
10802
 
10803
    @Override
10804
    public String toString() {
10805
      StringBuilder sb = new StringBuilder("fulfillPO_args(");
10806
      boolean first = true;
10807
 
10808
      sb.append("purchaseOrderId:");
10809
      sb.append(this.purchaseOrderId);
10810
      first = false;
10811
      if (!first) sb.append(", ");
10812
      sb.append("itemId:");
10813
      sb.append(this.itemId);
10814
      first = false;
10815
      if (!first) sb.append(", ");
10816
      sb.append("quantity:");
10817
      sb.append(this.quantity);
10818
      first = false;
10819
      sb.append(")");
10820
      return sb.toString();
10821
    }
10822
 
10823
    public void validate() throws org.apache.thrift.TException {
10824
      // check for required fields
10825
    }
10826
 
10827
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10828
      try {
10829
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10830
      } catch (org.apache.thrift.TException te) {
10831
        throw new java.io.IOException(te);
10832
      }
10833
    }
10834
 
10835
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10836
      try {
10837
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
10838
        __isset_bit_vector = new BitSet(1);
10839
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10840
      } catch (org.apache.thrift.TException te) {
10841
        throw new java.io.IOException(te);
10842
      }
10843
    }
10844
 
10845
  }
10846
 
10847
  public static class fulfillPO_result implements org.apache.thrift.TBase<fulfillPO_result, fulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
10848
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_result");
10849
 
10850
    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
10851
 
10852
    private PurchaseServiceException e; // required
10853
 
10854
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10855
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10856
      E((short)1, "e");
10857
 
10858
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10859
 
10860
      static {
10861
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10862
          byName.put(field.getFieldName(), field);
10863
        }
10864
      }
10865
 
10866
      /**
10867
       * Find the _Fields constant that matches fieldId, or null if its not found.
10868
       */
10869
      public static _Fields findByThriftId(int fieldId) {
10870
        switch(fieldId) {
10871
          case 1: // E
10872
            return E;
10873
          default:
10874
            return null;
10875
        }
10876
      }
10877
 
10878
      /**
10879
       * Find the _Fields constant that matches fieldId, throwing an exception
10880
       * if it is not found.
10881
       */
10882
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10883
        _Fields fields = findByThriftId(fieldId);
10884
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10885
        return fields;
10886
      }
10887
 
10888
      /**
10889
       * Find the _Fields constant that matches name, or null if its not found.
10890
       */
10891
      public static _Fields findByName(String name) {
10892
        return byName.get(name);
10893
      }
10894
 
10895
      private final short _thriftId;
10896
      private final String _fieldName;
10897
 
10898
      _Fields(short thriftId, String fieldName) {
10899
        _thriftId = thriftId;
10900
        _fieldName = fieldName;
10901
      }
10902
 
10903
      public short getThriftFieldId() {
10904
        return _thriftId;
10905
      }
10906
 
10907
      public String getFieldName() {
10908
        return _fieldName;
10909
      }
10910
    }
10911
 
10912
    // isset id assignments
10913
 
10914
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10915
    static {
10916
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10917
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10918
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
10919
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10920
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_result.class, metaDataMap);
10921
    }
10922
 
10923
    public fulfillPO_result() {
10924
    }
10925
 
10926
    public fulfillPO_result(
10927
      PurchaseServiceException e)
10928
    {
10929
      this();
10930
      this.e = e;
10931
    }
10932
 
10933
    /**
10934
     * Performs a deep copy on <i>other</i>.
10935
     */
10936
    public fulfillPO_result(fulfillPO_result other) {
10937
      if (other.isSetE()) {
10938
        this.e = new PurchaseServiceException(other.e);
10939
      }
10940
    }
10941
 
10942
    public fulfillPO_result deepCopy() {
10943
      return new fulfillPO_result(this);
10944
    }
10945
 
10946
    @Override
10947
    public void clear() {
10948
      this.e = null;
10949
    }
10950
 
10951
    public PurchaseServiceException getE() {
10952
      return this.e;
10953
    }
10954
 
10955
    public void setE(PurchaseServiceException e) {
10956
      this.e = e;
10957
    }
10958
 
10959
    public void unsetE() {
10960
      this.e = null;
10961
    }
10962
 
10963
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
10964
    public boolean isSetE() {
10965
      return this.e != null;
10966
    }
10967
 
10968
    public void setEIsSet(boolean value) {
10969
      if (!value) {
10970
        this.e = null;
10971
      }
10972
    }
10973
 
10974
    public void setFieldValue(_Fields field, Object value) {
10975
      switch (field) {
10976
      case E:
10977
        if (value == null) {
10978
          unsetE();
10979
        } else {
10980
          setE((PurchaseServiceException)value);
10981
        }
10982
        break;
10983
 
10984
      }
10985
    }
10986
 
10987
    public Object getFieldValue(_Fields field) {
10988
      switch (field) {
10989
      case E:
10990
        return getE();
10991
 
10992
      }
10993
      throw new IllegalStateException();
10994
    }
10995
 
10996
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10997
    public boolean isSet(_Fields field) {
10998
      if (field == null) {
10999
        throw new IllegalArgumentException();
11000
      }
11001
 
11002
      switch (field) {
11003
      case E:
11004
        return isSetE();
11005
      }
11006
      throw new IllegalStateException();
11007
    }
11008
 
11009
    @Override
11010
    public boolean equals(Object that) {
11011
      if (that == null)
11012
        return false;
11013
      if (that instanceof fulfillPO_result)
11014
        return this.equals((fulfillPO_result)that);
11015
      return false;
11016
    }
11017
 
11018
    public boolean equals(fulfillPO_result that) {
11019
      if (that == null)
11020
        return false;
11021
 
11022
      boolean this_present_e = true && this.isSetE();
11023
      boolean that_present_e = true && that.isSetE();
11024
      if (this_present_e || that_present_e) {
11025
        if (!(this_present_e && that_present_e))
11026
          return false;
11027
        if (!this.e.equals(that.e))
11028
          return false;
11029
      }
11030
 
11031
      return true;
11032
    }
11033
 
11034
    @Override
11035
    public int hashCode() {
11036
      return 0;
11037
    }
11038
 
11039
    public int compareTo(fulfillPO_result other) {
11040
      if (!getClass().equals(other.getClass())) {
11041
        return getClass().getName().compareTo(other.getClass().getName());
11042
      }
11043
 
11044
      int lastComparison = 0;
11045
      fulfillPO_result typedOther = (fulfillPO_result)other;
11046
 
11047
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
11048
      if (lastComparison != 0) {
11049
        return lastComparison;
11050
      }
11051
      if (isSetE()) {
11052
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
11053
        if (lastComparison != 0) {
11054
          return lastComparison;
11055
        }
11056
      }
11057
      return 0;
11058
    }
11059
 
11060
    public _Fields fieldForId(int fieldId) {
11061
      return _Fields.findByThriftId(fieldId);
11062
    }
11063
 
11064
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11065
      org.apache.thrift.protocol.TField field;
11066
      iprot.readStructBegin();
11067
      while (true)
11068
      {
11069
        field = iprot.readFieldBegin();
11070
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11071
          break;
11072
        }
11073
        switch (field.id) {
11074
          case 1: // E
11075
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11076
              this.e = new PurchaseServiceException();
11077
              this.e.read(iprot);
11078
            } else { 
11079
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11080
            }
11081
            break;
11082
          default:
11083
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11084
        }
11085
        iprot.readFieldEnd();
11086
      }
11087
      iprot.readStructEnd();
11088
      validate();
11089
    }
11090
 
11091
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11092
      oprot.writeStructBegin(STRUCT_DESC);
11093
 
11094
      if (this.isSetE()) {
11095
        oprot.writeFieldBegin(E_FIELD_DESC);
11096
        this.e.write(oprot);
11097
        oprot.writeFieldEnd();
11098
      }
11099
      oprot.writeFieldStop();
11100
      oprot.writeStructEnd();
11101
    }
11102
 
11103
    @Override
11104
    public String toString() {
11105
      StringBuilder sb = new StringBuilder("fulfillPO_result(");
11106
      boolean first = true;
11107
 
11108
      sb.append("e:");
11109
      if (this.e == null) {
11110
        sb.append("null");
11111
      } else {
11112
        sb.append(this.e);
11113
      }
11114
      first = false;
11115
      sb.append(")");
11116
      return sb.toString();
11117
    }
11118
 
11119
    public void validate() throws org.apache.thrift.TException {
11120
      // check for required fields
11121
    }
11122
 
11123
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11124
      try {
11125
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11126
      } catch (org.apache.thrift.TException te) {
11127
        throw new java.io.IOException(te);
11128
      }
11129
    }
11130
 
11131
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11132
      try {
11133
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11134
      } catch (org.apache.thrift.TException te) {
11135
        throw new java.io.IOException(te);
11136
      }
11137
    }
11138
 
11139
  }
11140
 
11141
  public static class updatePurchaseOrder_args implements org.apache.thrift.TBase<updatePurchaseOrder_args, updatePurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
11142
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_args");
11143
 
11144
    private static final org.apache.thrift.protocol.TField PURCHASE_ORDER_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseOrder", org.apache.thrift.protocol.TType.STRUCT, (short)1);
11145
 
11146
    private PurchaseOrder purchaseOrder; // required
11147
 
11148
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11149
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11150
      PURCHASE_ORDER((short)1, "purchaseOrder");
11151
 
11152
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11153
 
11154
      static {
11155
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11156
          byName.put(field.getFieldName(), field);
11157
        }
11158
      }
11159
 
11160
      /**
11161
       * Find the _Fields constant that matches fieldId, or null if its not found.
11162
       */
11163
      public static _Fields findByThriftId(int fieldId) {
11164
        switch(fieldId) {
11165
          case 1: // PURCHASE_ORDER
11166
            return PURCHASE_ORDER;
11167
          default:
11168
            return null;
11169
        }
11170
      }
11171
 
11172
      /**
11173
       * Find the _Fields constant that matches fieldId, throwing an exception
11174
       * if it is not found.
11175
       */
11176
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11177
        _Fields fields = findByThriftId(fieldId);
11178
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11179
        return fields;
11180
      }
11181
 
11182
      /**
11183
       * Find the _Fields constant that matches name, or null if its not found.
11184
       */
11185
      public static _Fields findByName(String name) {
11186
        return byName.get(name);
11187
      }
11188
 
11189
      private final short _thriftId;
11190
      private final String _fieldName;
11191
 
11192
      _Fields(short thriftId, String fieldName) {
11193
        _thriftId = thriftId;
11194
        _fieldName = fieldName;
11195
      }
11196
 
11197
      public short getThriftFieldId() {
11198
        return _thriftId;
11199
      }
11200
 
11201
      public String getFieldName() {
11202
        return _fieldName;
11203
      }
11204
    }
11205
 
11206
    // isset id assignments
11207
 
11208
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11209
    static {
11210
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11211
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11212
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
11213
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11214
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_args.class, metaDataMap);
11215
    }
11216
 
11217
    public updatePurchaseOrder_args() {
11218
    }
11219
 
11220
    public updatePurchaseOrder_args(
11221
      PurchaseOrder purchaseOrder)
11222
    {
11223
      this();
11224
      this.purchaseOrder = purchaseOrder;
11225
    }
11226
 
11227
    /**
11228
     * Performs a deep copy on <i>other</i>.
11229
     */
11230
    public updatePurchaseOrder_args(updatePurchaseOrder_args other) {
11231
      if (other.isSetPurchaseOrder()) {
11232
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
11233
      }
11234
    }
11235
 
11236
    public updatePurchaseOrder_args deepCopy() {
11237
      return new updatePurchaseOrder_args(this);
11238
    }
11239
 
11240
    @Override
11241
    public void clear() {
11242
      this.purchaseOrder = null;
11243
    }
11244
 
11245
    public PurchaseOrder getPurchaseOrder() {
11246
      return this.purchaseOrder;
11247
    }
11248
 
11249
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
11250
      this.purchaseOrder = purchaseOrder;
11251
    }
11252
 
11253
    public void unsetPurchaseOrder() {
11254
      this.purchaseOrder = null;
11255
    }
11256
 
11257
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
11258
    public boolean isSetPurchaseOrder() {
11259
      return this.purchaseOrder != null;
11260
    }
11261
 
11262
    public void setPurchaseOrderIsSet(boolean value) {
11263
      if (!value) {
11264
        this.purchaseOrder = null;
11265
      }
11266
    }
11267
 
11268
    public void setFieldValue(_Fields field, Object value) {
11269
      switch (field) {
11270
      case PURCHASE_ORDER:
11271
        if (value == null) {
11272
          unsetPurchaseOrder();
11273
        } else {
11274
          setPurchaseOrder((PurchaseOrder)value);
11275
        }
11276
        break;
11277
 
11278
      }
11279
    }
11280
 
11281
    public Object getFieldValue(_Fields field) {
11282
      switch (field) {
11283
      case PURCHASE_ORDER:
11284
        return getPurchaseOrder();
11285
 
11286
      }
11287
      throw new IllegalStateException();
11288
    }
11289
 
11290
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11291
    public boolean isSet(_Fields field) {
11292
      if (field == null) {
11293
        throw new IllegalArgumentException();
11294
      }
11295
 
11296
      switch (field) {
11297
      case PURCHASE_ORDER:
11298
        return isSetPurchaseOrder();
11299
      }
11300
      throw new IllegalStateException();
11301
    }
11302
 
11303
    @Override
11304
    public boolean equals(Object that) {
11305
      if (that == null)
11306
        return false;
11307
      if (that instanceof updatePurchaseOrder_args)
11308
        return this.equals((updatePurchaseOrder_args)that);
11309
      return false;
11310
    }
11311
 
11312
    public boolean equals(updatePurchaseOrder_args that) {
11313
      if (that == null)
11314
        return false;
11315
 
11316
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
11317
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
11318
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
11319
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
11320
          return false;
11321
        if (!this.purchaseOrder.equals(that.purchaseOrder))
11322
          return false;
11323
      }
11324
 
11325
      return true;
11326
    }
11327
 
11328
    @Override
11329
    public int hashCode() {
11330
      return 0;
11331
    }
11332
 
11333
    public int compareTo(updatePurchaseOrder_args other) {
11334
      if (!getClass().equals(other.getClass())) {
11335
        return getClass().getName().compareTo(other.getClass().getName());
11336
      }
11337
 
11338
      int lastComparison = 0;
11339
      updatePurchaseOrder_args typedOther = (updatePurchaseOrder_args)other;
11340
 
11341
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
11342
      if (lastComparison != 0) {
11343
        return lastComparison;
11344
      }
11345
      if (isSetPurchaseOrder()) {
11346
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
11347
        if (lastComparison != 0) {
11348
          return lastComparison;
11349
        }
11350
      }
11351
      return 0;
11352
    }
11353
 
11354
    public _Fields fieldForId(int fieldId) {
11355
      return _Fields.findByThriftId(fieldId);
11356
    }
11357
 
11358
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11359
      org.apache.thrift.protocol.TField field;
11360
      iprot.readStructBegin();
11361
      while (true)
11362
      {
11363
        field = iprot.readFieldBegin();
11364
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11365
          break;
11366
        }
11367
        switch (field.id) {
11368
          case 1: // PURCHASE_ORDER
11369
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11370
              this.purchaseOrder = new PurchaseOrder();
11371
              this.purchaseOrder.read(iprot);
11372
            } else { 
11373
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11374
            }
11375
            break;
11376
          default:
11377
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11378
        }
11379
        iprot.readFieldEnd();
11380
      }
11381
      iprot.readStructEnd();
11382
      validate();
11383
    }
11384
 
11385
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11386
      validate();
11387
 
11388
      oprot.writeStructBegin(STRUCT_DESC);
11389
      if (this.purchaseOrder != null) {
11390
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
11391
        this.purchaseOrder.write(oprot);
11392
        oprot.writeFieldEnd();
11393
      }
11394
      oprot.writeFieldStop();
11395
      oprot.writeStructEnd();
11396
    }
11397
 
11398
    @Override
11399
    public String toString() {
11400
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_args(");
11401
      boolean first = true;
11402
 
11403
      sb.append("purchaseOrder:");
11404
      if (this.purchaseOrder == null) {
11405
        sb.append("null");
11406
      } else {
11407
        sb.append(this.purchaseOrder);
11408
      }
11409
      first = false;
11410
      sb.append(")");
11411
      return sb.toString();
11412
    }
11413
 
11414
    public void validate() throws org.apache.thrift.TException {
11415
      // check for required fields
11416
    }
11417
 
11418
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11419
      try {
11420
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11421
      } catch (org.apache.thrift.TException te) {
11422
        throw new java.io.IOException(te);
11423
      }
11424
    }
11425
 
11426
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11427
      try {
11428
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11429
      } catch (org.apache.thrift.TException te) {
11430
        throw new java.io.IOException(te);
11431
      }
11432
    }
11433
 
11434
  }
11435
 
11436
  public static class updatePurchaseOrder_result implements org.apache.thrift.TBase<updatePurchaseOrder_result, updatePurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
11437
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_result");
11438
 
11439
    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
11440
 
11441
    private PurchaseServiceException e; // required
11442
 
11443
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11444
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11445
      E((short)1, "e");
11446
 
11447
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11448
 
11449
      static {
11450
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11451
          byName.put(field.getFieldName(), field);
11452
        }
11453
      }
11454
 
11455
      /**
11456
       * Find the _Fields constant that matches fieldId, or null if its not found.
11457
       */
11458
      public static _Fields findByThriftId(int fieldId) {
11459
        switch(fieldId) {
11460
          case 1: // E
11461
            return E;
11462
          default:
11463
            return null;
11464
        }
11465
      }
11466
 
11467
      /**
11468
       * Find the _Fields constant that matches fieldId, throwing an exception
11469
       * if it is not found.
11470
       */
11471
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11472
        _Fields fields = findByThriftId(fieldId);
11473
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11474
        return fields;
11475
      }
11476
 
11477
      /**
11478
       * Find the _Fields constant that matches name, or null if its not found.
11479
       */
11480
      public static _Fields findByName(String name) {
11481
        return byName.get(name);
11482
      }
11483
 
11484
      private final short _thriftId;
11485
      private final String _fieldName;
11486
 
11487
      _Fields(short thriftId, String fieldName) {
11488
        _thriftId = thriftId;
11489
        _fieldName = fieldName;
11490
      }
11491
 
11492
      public short getThriftFieldId() {
11493
        return _thriftId;
11494
      }
11495
 
11496
      public String getFieldName() {
11497
        return _fieldName;
11498
      }
11499
    }
11500
 
11501
    // isset id assignments
11502
 
11503
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11504
    static {
11505
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11506
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11507
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11508
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11509
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_result.class, metaDataMap);
11510
    }
11511
 
11512
    public updatePurchaseOrder_result() {
11513
    }
11514
 
11515
    public updatePurchaseOrder_result(
11516
      PurchaseServiceException e)
11517
    {
11518
      this();
11519
      this.e = e;
11520
    }
11521
 
11522
    /**
11523
     * Performs a deep copy on <i>other</i>.
11524
     */
11525
    public updatePurchaseOrder_result(updatePurchaseOrder_result other) {
11526
      if (other.isSetE()) {
11527
        this.e = new PurchaseServiceException(other.e);
11528
      }
11529
    }
11530
 
11531
    public updatePurchaseOrder_result deepCopy() {
11532
      return new updatePurchaseOrder_result(this);
11533
    }
11534
 
11535
    @Override
11536
    public void clear() {
11537
      this.e = null;
11538
    }
11539
 
11540
    public PurchaseServiceException getE() {
11541
      return this.e;
11542
    }
11543
 
11544
    public void setE(PurchaseServiceException e) {
11545
      this.e = e;
11546
    }
11547
 
11548
    public void unsetE() {
11549
      this.e = null;
11550
    }
11551
 
11552
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
11553
    public boolean isSetE() {
11554
      return this.e != null;
11555
    }
11556
 
11557
    public void setEIsSet(boolean value) {
11558
      if (!value) {
11559
        this.e = null;
11560
      }
11561
    }
11562
 
11563
    public void setFieldValue(_Fields field, Object value) {
11564
      switch (field) {
11565
      case E:
11566
        if (value == null) {
11567
          unsetE();
11568
        } else {
11569
          setE((PurchaseServiceException)value);
11570
        }
11571
        break;
11572
 
11573
      }
11574
    }
11575
 
11576
    public Object getFieldValue(_Fields field) {
11577
      switch (field) {
11578
      case E:
11579
        return getE();
11580
 
11581
      }
11582
      throw new IllegalStateException();
11583
    }
11584
 
11585
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11586
    public boolean isSet(_Fields field) {
11587
      if (field == null) {
11588
        throw new IllegalArgumentException();
11589
      }
11590
 
11591
      switch (field) {
11592
      case E:
11593
        return isSetE();
11594
      }
11595
      throw new IllegalStateException();
11596
    }
11597
 
11598
    @Override
11599
    public boolean equals(Object that) {
11600
      if (that == null)
11601
        return false;
11602
      if (that instanceof updatePurchaseOrder_result)
11603
        return this.equals((updatePurchaseOrder_result)that);
11604
      return false;
11605
    }
11606
 
11607
    public boolean equals(updatePurchaseOrder_result that) {
11608
      if (that == null)
11609
        return false;
11610
 
11611
      boolean this_present_e = true && this.isSetE();
11612
      boolean that_present_e = true && that.isSetE();
11613
      if (this_present_e || that_present_e) {
11614
        if (!(this_present_e && that_present_e))
11615
          return false;
11616
        if (!this.e.equals(that.e))
11617
          return false;
11618
      }
11619
 
11620
      return true;
11621
    }
11622
 
11623
    @Override
11624
    public int hashCode() {
11625
      return 0;
11626
    }
11627
 
11628
    public int compareTo(updatePurchaseOrder_result other) {
11629
      if (!getClass().equals(other.getClass())) {
11630
        return getClass().getName().compareTo(other.getClass().getName());
11631
      }
11632
 
11633
      int lastComparison = 0;
11634
      updatePurchaseOrder_result typedOther = (updatePurchaseOrder_result)other;
11635
 
11636
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
11637
      if (lastComparison != 0) {
11638
        return lastComparison;
11639
      }
11640
      if (isSetE()) {
11641
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
11642
        if (lastComparison != 0) {
11643
          return lastComparison;
11644
        }
11645
      }
11646
      return 0;
11647
    }
11648
 
11649
    public _Fields fieldForId(int fieldId) {
11650
      return _Fields.findByThriftId(fieldId);
11651
    }
11652
 
11653
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11654
      org.apache.thrift.protocol.TField field;
11655
      iprot.readStructBegin();
11656
      while (true)
11657
      {
11658
        field = iprot.readFieldBegin();
11659
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11660
          break;
11661
        }
11662
        switch (field.id) {
11663
          case 1: // E
11664
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11665
              this.e = new PurchaseServiceException();
11666
              this.e.read(iprot);
11667
            } else { 
11668
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11669
            }
11670
            break;
11671
          default:
11672
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11673
        }
11674
        iprot.readFieldEnd();
11675
      }
11676
      iprot.readStructEnd();
11677
      validate();
11678
    }
11679
 
11680
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11681
      oprot.writeStructBegin(STRUCT_DESC);
11682
 
11683
      if (this.isSetE()) {
11684
        oprot.writeFieldBegin(E_FIELD_DESC);
11685
        this.e.write(oprot);
11686
        oprot.writeFieldEnd();
11687
      }
11688
      oprot.writeFieldStop();
11689
      oprot.writeStructEnd();
11690
    }
11691
 
11692
    @Override
11693
    public String toString() {
11694
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_result(");
11695
      boolean first = true;
11696
 
11697
      sb.append("e:");
11698
      if (this.e == null) {
11699
        sb.append("null");
11700
      } else {
11701
        sb.append(this.e);
11702
      }
11703
      first = false;
11704
      sb.append(")");
11705
      return sb.toString();
11706
    }
11707
 
11708
    public void validate() throws org.apache.thrift.TException {
11709
      // check for required fields
11710
    }
11711
 
11712
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11713
      try {
11714
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11715
      } catch (org.apache.thrift.TException te) {
11716
        throw new java.io.IOException(te);
11717
      }
11718
    }
11719
 
11720
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11721
      try {
11722
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11723
      } catch (org.apache.thrift.TException te) {
11724
        throw new java.io.IOException(te);
11725
      }
11726
    }
11727
 
11728
  }
11729
 
5185 mandeep.dh 11730
  public static class unFulfillPO_args implements org.apache.thrift.TBase<unFulfillPO_args, unFulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
11731
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_args");
11732
 
11733
    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)1);
11734
    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);
11735
    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);
11736
 
11737
    private long purchaseId; // required
11738
    private long itemId; // required
11739
    private long quantity; // required
11740
 
11741
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11742
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11743
      PURCHASE_ID((short)1, "purchaseId"),
11744
      ITEM_ID((short)2, "itemId"),
11745
      QUANTITY((short)3, "quantity");
11746
 
11747
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11748
 
11749
      static {
11750
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11751
          byName.put(field.getFieldName(), field);
11752
        }
11753
      }
11754
 
11755
      /**
11756
       * Find the _Fields constant that matches fieldId, or null if its not found.
11757
       */
11758
      public static _Fields findByThriftId(int fieldId) {
11759
        switch(fieldId) {
11760
          case 1: // PURCHASE_ID
11761
            return PURCHASE_ID;
11762
          case 2: // ITEM_ID
11763
            return ITEM_ID;
11764
          case 3: // QUANTITY
11765
            return QUANTITY;
11766
          default:
11767
            return null;
11768
        }
11769
      }
11770
 
11771
      /**
11772
       * Find the _Fields constant that matches fieldId, throwing an exception
11773
       * if it is not found.
11774
       */
11775
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11776
        _Fields fields = findByThriftId(fieldId);
11777
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11778
        return fields;
11779
      }
11780
 
11781
      /**
11782
       * Find the _Fields constant that matches name, or null if its not found.
11783
       */
11784
      public static _Fields findByName(String name) {
11785
        return byName.get(name);
11786
      }
11787
 
11788
      private final short _thriftId;
11789
      private final String _fieldName;
11790
 
11791
      _Fields(short thriftId, String fieldName) {
11792
        _thriftId = thriftId;
11793
        _fieldName = fieldName;
11794
      }
11795
 
11796
      public short getThriftFieldId() {
11797
        return _thriftId;
11798
      }
11799
 
11800
      public String getFieldName() {
11801
        return _fieldName;
11802
      }
11803
    }
11804
 
11805
    // isset id assignments
11806
    private static final int __PURCHASEID_ISSET_ID = 0;
11807
    private static final int __ITEMID_ISSET_ID = 1;
11808
    private static final int __QUANTITY_ISSET_ID = 2;
11809
    private BitSet __isset_bit_vector = new BitSet(3);
11810
 
11811
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11812
    static {
11813
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11814
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11815
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11816
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11817
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11818
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11819
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11820
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11821
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_args.class, metaDataMap);
11822
    }
11823
 
11824
    public unFulfillPO_args() {
11825
    }
11826
 
11827
    public unFulfillPO_args(
11828
      long purchaseId,
11829
      long itemId,
11830
      long quantity)
11831
    {
11832
      this();
11833
      this.purchaseId = purchaseId;
11834
      setPurchaseIdIsSet(true);
11835
      this.itemId = itemId;
11836
      setItemIdIsSet(true);
11837
      this.quantity = quantity;
11838
      setQuantityIsSet(true);
11839
    }
11840
 
11841
    /**
11842
     * Performs a deep copy on <i>other</i>.
11843
     */
11844
    public unFulfillPO_args(unFulfillPO_args other) {
11845
      __isset_bit_vector.clear();
11846
      __isset_bit_vector.or(other.__isset_bit_vector);
11847
      this.purchaseId = other.purchaseId;
11848
      this.itemId = other.itemId;
11849
      this.quantity = other.quantity;
11850
    }
11851
 
11852
    public unFulfillPO_args deepCopy() {
11853
      return new unFulfillPO_args(this);
11854
    }
11855
 
11856
    @Override
11857
    public void clear() {
11858
      setPurchaseIdIsSet(false);
11859
      this.purchaseId = 0;
11860
      setItemIdIsSet(false);
11861
      this.itemId = 0;
11862
      setQuantityIsSet(false);
11863
      this.quantity = 0;
11864
    }
11865
 
11866
    public long getPurchaseId() {
11867
      return this.purchaseId;
11868
    }
11869
 
11870
    public void setPurchaseId(long purchaseId) {
11871
      this.purchaseId = purchaseId;
11872
      setPurchaseIdIsSet(true);
11873
    }
11874
 
11875
    public void unsetPurchaseId() {
11876
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
11877
    }
11878
 
11879
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
11880
    public boolean isSetPurchaseId() {
11881
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
11882
    }
11883
 
11884
    public void setPurchaseIdIsSet(boolean value) {
11885
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
11886
    }
11887
 
11888
    public long getItemId() {
11889
      return this.itemId;
11890
    }
11891
 
11892
    public void setItemId(long itemId) {
11893
      this.itemId = itemId;
11894
      setItemIdIsSet(true);
11895
    }
11896
 
11897
    public void unsetItemId() {
11898
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
11899
    }
11900
 
11901
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
11902
    public boolean isSetItemId() {
11903
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
11904
    }
11905
 
11906
    public void setItemIdIsSet(boolean value) {
11907
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
11908
    }
11909
 
11910
    public long getQuantity() {
11911
      return this.quantity;
11912
    }
11913
 
11914
    public void setQuantity(long quantity) {
11915
      this.quantity = quantity;
11916
      setQuantityIsSet(true);
11917
    }
11918
 
11919
    public void unsetQuantity() {
11920
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
11921
    }
11922
 
11923
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
11924
    public boolean isSetQuantity() {
11925
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
11926
    }
11927
 
11928
    public void setQuantityIsSet(boolean value) {
11929
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
11930
    }
11931
 
11932
    public void setFieldValue(_Fields field, Object value) {
11933
      switch (field) {
11934
      case PURCHASE_ID:
11935
        if (value == null) {
11936
          unsetPurchaseId();
11937
        } else {
11938
          setPurchaseId((Long)value);
11939
        }
11940
        break;
11941
 
11942
      case ITEM_ID:
11943
        if (value == null) {
11944
          unsetItemId();
11945
        } else {
11946
          setItemId((Long)value);
11947
        }
11948
        break;
11949
 
11950
      case QUANTITY:
11951
        if (value == null) {
11952
          unsetQuantity();
11953
        } else {
11954
          setQuantity((Long)value);
11955
        }
11956
        break;
11957
 
11958
      }
11959
    }
11960
 
11961
    public Object getFieldValue(_Fields field) {
11962
      switch (field) {
11963
      case PURCHASE_ID:
11964
        return Long.valueOf(getPurchaseId());
11965
 
11966
      case ITEM_ID:
11967
        return Long.valueOf(getItemId());
11968
 
11969
      case QUANTITY:
11970
        return Long.valueOf(getQuantity());
11971
 
11972
      }
11973
      throw new IllegalStateException();
11974
    }
11975
 
11976
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11977
    public boolean isSet(_Fields field) {
11978
      if (field == null) {
11979
        throw new IllegalArgumentException();
11980
      }
11981
 
11982
      switch (field) {
11983
      case PURCHASE_ID:
11984
        return isSetPurchaseId();
11985
      case ITEM_ID:
11986
        return isSetItemId();
11987
      case QUANTITY:
11988
        return isSetQuantity();
11989
      }
11990
      throw new IllegalStateException();
11991
    }
11992
 
11993
    @Override
11994
    public boolean equals(Object that) {
11995
      if (that == null)
11996
        return false;
11997
      if (that instanceof unFulfillPO_args)
11998
        return this.equals((unFulfillPO_args)that);
11999
      return false;
12000
    }
12001
 
12002
    public boolean equals(unFulfillPO_args that) {
12003
      if (that == null)
12004
        return false;
12005
 
12006
      boolean this_present_purchaseId = true;
12007
      boolean that_present_purchaseId = true;
12008
      if (this_present_purchaseId || that_present_purchaseId) {
12009
        if (!(this_present_purchaseId && that_present_purchaseId))
12010
          return false;
12011
        if (this.purchaseId != that.purchaseId)
12012
          return false;
12013
      }
12014
 
12015
      boolean this_present_itemId = true;
12016
      boolean that_present_itemId = true;
12017
      if (this_present_itemId || that_present_itemId) {
12018
        if (!(this_present_itemId && that_present_itemId))
12019
          return false;
12020
        if (this.itemId != that.itemId)
12021
          return false;
12022
      }
12023
 
12024
      boolean this_present_quantity = true;
12025
      boolean that_present_quantity = true;
12026
      if (this_present_quantity || that_present_quantity) {
12027
        if (!(this_present_quantity && that_present_quantity))
12028
          return false;
12029
        if (this.quantity != that.quantity)
12030
          return false;
12031
      }
12032
 
12033
      return true;
12034
    }
12035
 
12036
    @Override
12037
    public int hashCode() {
12038
      return 0;
12039
    }
12040
 
12041
    public int compareTo(unFulfillPO_args other) {
12042
      if (!getClass().equals(other.getClass())) {
12043
        return getClass().getName().compareTo(other.getClass().getName());
12044
      }
12045
 
12046
      int lastComparison = 0;
12047
      unFulfillPO_args typedOther = (unFulfillPO_args)other;
12048
 
12049
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
12050
      if (lastComparison != 0) {
12051
        return lastComparison;
12052
      }
12053
      if (isSetPurchaseId()) {
12054
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
12055
        if (lastComparison != 0) {
12056
          return lastComparison;
12057
        }
12058
      }
12059
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
12060
      if (lastComparison != 0) {
12061
        return lastComparison;
12062
      }
12063
      if (isSetItemId()) {
12064
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
12065
        if (lastComparison != 0) {
12066
          return lastComparison;
12067
        }
12068
      }
12069
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
12070
      if (lastComparison != 0) {
12071
        return lastComparison;
12072
      }
12073
      if (isSetQuantity()) {
12074
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
12075
        if (lastComparison != 0) {
12076
          return lastComparison;
12077
        }
12078
      }
12079
      return 0;
12080
    }
12081
 
12082
    public _Fields fieldForId(int fieldId) {
12083
      return _Fields.findByThriftId(fieldId);
12084
    }
12085
 
12086
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12087
      org.apache.thrift.protocol.TField field;
12088
      iprot.readStructBegin();
12089
      while (true)
12090
      {
12091
        field = iprot.readFieldBegin();
12092
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12093
          break;
12094
        }
12095
        switch (field.id) {
12096
          case 1: // PURCHASE_ID
12097
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12098
              this.purchaseId = iprot.readI64();
12099
              setPurchaseIdIsSet(true);
12100
            } else { 
12101
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12102
            }
12103
            break;
12104
          case 2: // ITEM_ID
12105
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12106
              this.itemId = iprot.readI64();
12107
              setItemIdIsSet(true);
12108
            } else { 
12109
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12110
            }
12111
            break;
12112
          case 3: // QUANTITY
12113
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12114
              this.quantity = iprot.readI64();
12115
              setQuantityIsSet(true);
12116
            } else { 
12117
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12118
            }
12119
            break;
12120
          default:
12121
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12122
        }
12123
        iprot.readFieldEnd();
12124
      }
12125
      iprot.readStructEnd();
12126
      validate();
12127
    }
12128
 
12129
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12130
      validate();
12131
 
12132
      oprot.writeStructBegin(STRUCT_DESC);
12133
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
12134
      oprot.writeI64(this.purchaseId);
12135
      oprot.writeFieldEnd();
12136
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
12137
      oprot.writeI64(this.itemId);
12138
      oprot.writeFieldEnd();
12139
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
12140
      oprot.writeI64(this.quantity);
12141
      oprot.writeFieldEnd();
12142
      oprot.writeFieldStop();
12143
      oprot.writeStructEnd();
12144
    }
12145
 
12146
    @Override
12147
    public String toString() {
12148
      StringBuilder sb = new StringBuilder("unFulfillPO_args(");
12149
      boolean first = true;
12150
 
12151
      sb.append("purchaseId:");
12152
      sb.append(this.purchaseId);
12153
      first = false;
12154
      if (!first) sb.append(", ");
12155
      sb.append("itemId:");
12156
      sb.append(this.itemId);
12157
      first = false;
12158
      if (!first) sb.append(", ");
12159
      sb.append("quantity:");
12160
      sb.append(this.quantity);
12161
      first = false;
12162
      sb.append(")");
12163
      return sb.toString();
12164
    }
12165
 
12166
    public void validate() throws org.apache.thrift.TException {
12167
      // check for required fields
12168
    }
12169
 
12170
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12171
      try {
12172
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12173
      } catch (org.apache.thrift.TException te) {
12174
        throw new java.io.IOException(te);
12175
      }
12176
    }
12177
 
12178
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12179
      try {
12180
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
12181
        __isset_bit_vector = new BitSet(1);
12182
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12183
      } catch (org.apache.thrift.TException te) {
12184
        throw new java.io.IOException(te);
12185
      }
12186
    }
12187
 
12188
  }
12189
 
12190
  public static class unFulfillPO_result implements org.apache.thrift.TBase<unFulfillPO_result, unFulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
12191
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_result");
12192
 
12193
    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
12194
 
12195
    private PurchaseServiceException e; // required
12196
 
12197
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12198
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12199
      E((short)1, "e");
12200
 
12201
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12202
 
12203
      static {
12204
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12205
          byName.put(field.getFieldName(), field);
12206
        }
12207
      }
12208
 
12209
      /**
12210
       * Find the _Fields constant that matches fieldId, or null if its not found.
12211
       */
12212
      public static _Fields findByThriftId(int fieldId) {
12213
        switch(fieldId) {
12214
          case 1: // E
12215
            return E;
12216
          default:
12217
            return null;
12218
        }
12219
      }
12220
 
12221
      /**
12222
       * Find the _Fields constant that matches fieldId, throwing an exception
12223
       * if it is not found.
12224
       */
12225
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12226
        _Fields fields = findByThriftId(fieldId);
12227
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12228
        return fields;
12229
      }
12230
 
12231
      /**
12232
       * Find the _Fields constant that matches name, or null if its not found.
12233
       */
12234
      public static _Fields findByName(String name) {
12235
        return byName.get(name);
12236
      }
12237
 
12238
      private final short _thriftId;
12239
      private final String _fieldName;
12240
 
12241
      _Fields(short thriftId, String fieldName) {
12242
        _thriftId = thriftId;
12243
        _fieldName = fieldName;
12244
      }
12245
 
12246
      public short getThriftFieldId() {
12247
        return _thriftId;
12248
      }
12249
 
12250
      public String getFieldName() {
12251
        return _fieldName;
12252
      }
12253
    }
12254
 
12255
    // isset id assignments
12256
 
12257
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12258
    static {
12259
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12260
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12261
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
12262
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12263
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_result.class, metaDataMap);
12264
    }
12265
 
12266
    public unFulfillPO_result() {
12267
    }
12268
 
12269
    public unFulfillPO_result(
12270
      PurchaseServiceException e)
12271
    {
12272
      this();
12273
      this.e = e;
12274
    }
12275
 
12276
    /**
12277
     * Performs a deep copy on <i>other</i>.
12278
     */
12279
    public unFulfillPO_result(unFulfillPO_result other) {
12280
      if (other.isSetE()) {
12281
        this.e = new PurchaseServiceException(other.e);
12282
      }
12283
    }
12284
 
12285
    public unFulfillPO_result deepCopy() {
12286
      return new unFulfillPO_result(this);
12287
    }
12288
 
12289
    @Override
12290
    public void clear() {
12291
      this.e = null;
12292
    }
12293
 
12294
    public PurchaseServiceException getE() {
12295
      return this.e;
12296
    }
12297
 
12298
    public void setE(PurchaseServiceException e) {
12299
      this.e = e;
12300
    }
12301
 
12302
    public void unsetE() {
12303
      this.e = null;
12304
    }
12305
 
12306
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
12307
    public boolean isSetE() {
12308
      return this.e != null;
12309
    }
12310
 
12311
    public void setEIsSet(boolean value) {
12312
      if (!value) {
12313
        this.e = null;
12314
      }
12315
    }
12316
 
12317
    public void setFieldValue(_Fields field, Object value) {
12318
      switch (field) {
12319
      case E:
12320
        if (value == null) {
12321
          unsetE();
12322
        } else {
12323
          setE((PurchaseServiceException)value);
12324
        }
12325
        break;
12326
 
12327
      }
12328
    }
12329
 
12330
    public Object getFieldValue(_Fields field) {
12331
      switch (field) {
12332
      case E:
12333
        return getE();
12334
 
12335
      }
12336
      throw new IllegalStateException();
12337
    }
12338
 
12339
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12340
    public boolean isSet(_Fields field) {
12341
      if (field == null) {
12342
        throw new IllegalArgumentException();
12343
      }
12344
 
12345
      switch (field) {
12346
      case E:
12347
        return isSetE();
12348
      }
12349
      throw new IllegalStateException();
12350
    }
12351
 
12352
    @Override
12353
    public boolean equals(Object that) {
12354
      if (that == null)
12355
        return false;
12356
      if (that instanceof unFulfillPO_result)
12357
        return this.equals((unFulfillPO_result)that);
12358
      return false;
12359
    }
12360
 
12361
    public boolean equals(unFulfillPO_result that) {
12362
      if (that == null)
12363
        return false;
12364
 
12365
      boolean this_present_e = true && this.isSetE();
12366
      boolean that_present_e = true && that.isSetE();
12367
      if (this_present_e || that_present_e) {
12368
        if (!(this_present_e && that_present_e))
12369
          return false;
12370
        if (!this.e.equals(that.e))
12371
          return false;
12372
      }
12373
 
12374
      return true;
12375
    }
12376
 
12377
    @Override
12378
    public int hashCode() {
12379
      return 0;
12380
    }
12381
 
12382
    public int compareTo(unFulfillPO_result other) {
12383
      if (!getClass().equals(other.getClass())) {
12384
        return getClass().getName().compareTo(other.getClass().getName());
12385
      }
12386
 
12387
      int lastComparison = 0;
12388
      unFulfillPO_result typedOther = (unFulfillPO_result)other;
12389
 
12390
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
12391
      if (lastComparison != 0) {
12392
        return lastComparison;
12393
      }
12394
      if (isSetE()) {
12395
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
12396
        if (lastComparison != 0) {
12397
          return lastComparison;
12398
        }
12399
      }
12400
      return 0;
12401
    }
12402
 
12403
    public _Fields fieldForId(int fieldId) {
12404
      return _Fields.findByThriftId(fieldId);
12405
    }
12406
 
12407
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12408
      org.apache.thrift.protocol.TField field;
12409
      iprot.readStructBegin();
12410
      while (true)
12411
      {
12412
        field = iprot.readFieldBegin();
12413
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12414
          break;
12415
        }
12416
        switch (field.id) {
12417
          case 1: // E
12418
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12419
              this.e = new PurchaseServiceException();
12420
              this.e.read(iprot);
12421
            } else { 
12422
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12423
            }
12424
            break;
12425
          default:
12426
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12427
        }
12428
        iprot.readFieldEnd();
12429
      }
12430
      iprot.readStructEnd();
12431
      validate();
12432
    }
12433
 
12434
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12435
      oprot.writeStructBegin(STRUCT_DESC);
12436
 
12437
      if (this.isSetE()) {
12438
        oprot.writeFieldBegin(E_FIELD_DESC);
12439
        this.e.write(oprot);
12440
        oprot.writeFieldEnd();
12441
      }
12442
      oprot.writeFieldStop();
12443
      oprot.writeStructEnd();
12444
    }
12445
 
12446
    @Override
12447
    public String toString() {
12448
      StringBuilder sb = new StringBuilder("unFulfillPO_result(");
12449
      boolean first = true;
12450
 
12451
      sb.append("e:");
12452
      if (this.e == null) {
12453
        sb.append("null");
12454
      } else {
12455
        sb.append(this.e);
12456
      }
12457
      first = false;
12458
      sb.append(")");
12459
      return sb.toString();
12460
    }
12461
 
12462
    public void validate() throws org.apache.thrift.TException {
12463
      // check for required fields
12464
    }
12465
 
12466
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12467
      try {
12468
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12469
      } catch (org.apache.thrift.TException te) {
12470
        throw new java.io.IOException(te);
12471
      }
12472
    }
12473
 
12474
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12475
      try {
12476
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12477
      } catch (org.apache.thrift.TException te) {
12478
        throw new java.io.IOException(te);
12479
      }
12480
    }
12481
 
12482
  }
12483
 
5443 mandeep.dh 12484
  public static class getInvoices_args implements org.apache.thrift.TBase<getInvoices_args, getInvoices_args._Fields>, java.io.Serializable, Cloneable   {
12485
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_args");
12486
 
12487
    private static final org.apache.thrift.protocol.TField DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("date", org.apache.thrift.protocol.TType.I64, (short)1);
12488
 
12489
    private long date; // required
12490
 
12491
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12492
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12493
      DATE((short)1, "date");
12494
 
12495
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12496
 
12497
      static {
12498
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12499
          byName.put(field.getFieldName(), field);
12500
        }
12501
      }
12502
 
12503
      /**
12504
       * Find the _Fields constant that matches fieldId, or null if its not found.
12505
       */
12506
      public static _Fields findByThriftId(int fieldId) {
12507
        switch(fieldId) {
12508
          case 1: // DATE
12509
            return DATE;
12510
          default:
12511
            return null;
12512
        }
12513
      }
12514
 
12515
      /**
12516
       * Find the _Fields constant that matches fieldId, throwing an exception
12517
       * if it is not found.
12518
       */
12519
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12520
        _Fields fields = findByThriftId(fieldId);
12521
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12522
        return fields;
12523
      }
12524
 
12525
      /**
12526
       * Find the _Fields constant that matches name, or null if its not found.
12527
       */
12528
      public static _Fields findByName(String name) {
12529
        return byName.get(name);
12530
      }
12531
 
12532
      private final short _thriftId;
12533
      private final String _fieldName;
12534
 
12535
      _Fields(short thriftId, String fieldName) {
12536
        _thriftId = thriftId;
12537
        _fieldName = fieldName;
12538
      }
12539
 
12540
      public short getThriftFieldId() {
12541
        return _thriftId;
12542
      }
12543
 
12544
      public String getFieldName() {
12545
        return _fieldName;
12546
      }
12547
    }
12548
 
12549
    // isset id assignments
12550
    private static final int __DATE_ISSET_ID = 0;
12551
    private BitSet __isset_bit_vector = new BitSet(1);
12552
 
12553
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12554
    static {
12555
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12556
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12557
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12558
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12559
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_args.class, metaDataMap);
12560
    }
12561
 
12562
    public getInvoices_args() {
12563
    }
12564
 
12565
    public getInvoices_args(
12566
      long date)
12567
    {
12568
      this();
12569
      this.date = date;
12570
      setDateIsSet(true);
12571
    }
12572
 
12573
    /**
12574
     * Performs a deep copy on <i>other</i>.
12575
     */
12576
    public getInvoices_args(getInvoices_args other) {
12577
      __isset_bit_vector.clear();
12578
      __isset_bit_vector.or(other.__isset_bit_vector);
12579
      this.date = other.date;
12580
    }
12581
 
12582
    public getInvoices_args deepCopy() {
12583
      return new getInvoices_args(this);
12584
    }
12585
 
12586
    @Override
12587
    public void clear() {
12588
      setDateIsSet(false);
12589
      this.date = 0;
12590
    }
12591
 
12592
    public long getDate() {
12593
      return this.date;
12594
    }
12595
 
12596
    public void setDate(long date) {
12597
      this.date = date;
12598
      setDateIsSet(true);
12599
    }
12600
 
12601
    public void unsetDate() {
12602
      __isset_bit_vector.clear(__DATE_ISSET_ID);
12603
    }
12604
 
12605
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
12606
    public boolean isSetDate() {
12607
      return __isset_bit_vector.get(__DATE_ISSET_ID);
12608
    }
12609
 
12610
    public void setDateIsSet(boolean value) {
12611
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
12612
    }
12613
 
12614
    public void setFieldValue(_Fields field, Object value) {
12615
      switch (field) {
12616
      case DATE:
12617
        if (value == null) {
12618
          unsetDate();
12619
        } else {
12620
          setDate((Long)value);
12621
        }
12622
        break;
12623
 
12624
      }
12625
    }
12626
 
12627
    public Object getFieldValue(_Fields field) {
12628
      switch (field) {
12629
      case DATE:
12630
        return Long.valueOf(getDate());
12631
 
12632
      }
12633
      throw new IllegalStateException();
12634
    }
12635
 
12636
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12637
    public boolean isSet(_Fields field) {
12638
      if (field == null) {
12639
        throw new IllegalArgumentException();
12640
      }
12641
 
12642
      switch (field) {
12643
      case DATE:
12644
        return isSetDate();
12645
      }
12646
      throw new IllegalStateException();
12647
    }
12648
 
12649
    @Override
12650
    public boolean equals(Object that) {
12651
      if (that == null)
12652
        return false;
12653
      if (that instanceof getInvoices_args)
12654
        return this.equals((getInvoices_args)that);
12655
      return false;
12656
    }
12657
 
12658
    public boolean equals(getInvoices_args that) {
12659
      if (that == null)
12660
        return false;
12661
 
12662
      boolean this_present_date = true;
12663
      boolean that_present_date = true;
12664
      if (this_present_date || that_present_date) {
12665
        if (!(this_present_date && that_present_date))
12666
          return false;
12667
        if (this.date != that.date)
12668
          return false;
12669
      }
12670
 
12671
      return true;
12672
    }
12673
 
12674
    @Override
12675
    public int hashCode() {
12676
      return 0;
12677
    }
12678
 
12679
    public int compareTo(getInvoices_args other) {
12680
      if (!getClass().equals(other.getClass())) {
12681
        return getClass().getName().compareTo(other.getClass().getName());
12682
      }
12683
 
12684
      int lastComparison = 0;
12685
      getInvoices_args typedOther = (getInvoices_args)other;
12686
 
12687
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
12688
      if (lastComparison != 0) {
12689
        return lastComparison;
12690
      }
12691
      if (isSetDate()) {
12692
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
12693
        if (lastComparison != 0) {
12694
          return lastComparison;
12695
        }
12696
      }
12697
      return 0;
12698
    }
12699
 
12700
    public _Fields fieldForId(int fieldId) {
12701
      return _Fields.findByThriftId(fieldId);
12702
    }
12703
 
12704
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12705
      org.apache.thrift.protocol.TField field;
12706
      iprot.readStructBegin();
12707
      while (true)
12708
      {
12709
        field = iprot.readFieldBegin();
12710
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12711
          break;
12712
        }
12713
        switch (field.id) {
12714
          case 1: // DATE
12715
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12716
              this.date = iprot.readI64();
12717
              setDateIsSet(true);
12718
            } else { 
12719
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12720
            }
12721
            break;
12722
          default:
12723
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12724
        }
12725
        iprot.readFieldEnd();
12726
      }
12727
      iprot.readStructEnd();
12728
      validate();
12729
    }
12730
 
12731
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12732
      validate();
12733
 
12734
      oprot.writeStructBegin(STRUCT_DESC);
12735
      oprot.writeFieldBegin(DATE_FIELD_DESC);
12736
      oprot.writeI64(this.date);
12737
      oprot.writeFieldEnd();
12738
      oprot.writeFieldStop();
12739
      oprot.writeStructEnd();
12740
    }
12741
 
12742
    @Override
12743
    public String toString() {
12744
      StringBuilder sb = new StringBuilder("getInvoices_args(");
12745
      boolean first = true;
12746
 
12747
      sb.append("date:");
12748
      sb.append(this.date);
12749
      first = false;
12750
      sb.append(")");
12751
      return sb.toString();
12752
    }
12753
 
12754
    public void validate() throws org.apache.thrift.TException {
12755
      // check for required fields
12756
    }
12757
 
12758
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12759
      try {
12760
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12761
      } catch (org.apache.thrift.TException te) {
12762
        throw new java.io.IOException(te);
12763
      }
12764
    }
12765
 
12766
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12767
      try {
12768
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
12769
        __isset_bit_vector = new BitSet(1);
12770
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12771
      } catch (org.apache.thrift.TException te) {
12772
        throw new java.io.IOException(te);
12773
      }
12774
    }
12775
 
12776
  }
12777
 
12778
  public static class getInvoices_result implements org.apache.thrift.TBase<getInvoices_result, getInvoices_result._Fields>, java.io.Serializable, Cloneable   {
12779
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_result");
12780
 
12781
    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);
12782
 
12783
    private List<Invoice> success; // required
12784
 
12785
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12786
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12787
      SUCCESS((short)0, "success");
12788
 
12789
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12790
 
12791
      static {
12792
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12793
          byName.put(field.getFieldName(), field);
12794
        }
12795
      }
12796
 
12797
      /**
12798
       * Find the _Fields constant that matches fieldId, or null if its not found.
12799
       */
12800
      public static _Fields findByThriftId(int fieldId) {
12801
        switch(fieldId) {
12802
          case 0: // SUCCESS
12803
            return SUCCESS;
12804
          default:
12805
            return null;
12806
        }
12807
      }
12808
 
12809
      /**
12810
       * Find the _Fields constant that matches fieldId, throwing an exception
12811
       * if it is not found.
12812
       */
12813
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12814
        _Fields fields = findByThriftId(fieldId);
12815
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12816
        return fields;
12817
      }
12818
 
12819
      /**
12820
       * Find the _Fields constant that matches name, or null if its not found.
12821
       */
12822
      public static _Fields findByName(String name) {
12823
        return byName.get(name);
12824
      }
12825
 
12826
      private final short _thriftId;
12827
      private final String _fieldName;
12828
 
12829
      _Fields(short thriftId, String fieldName) {
12830
        _thriftId = thriftId;
12831
        _fieldName = fieldName;
12832
      }
12833
 
12834
      public short getThriftFieldId() {
12835
        return _thriftId;
12836
      }
12837
 
12838
      public String getFieldName() {
12839
        return _fieldName;
12840
      }
12841
    }
12842
 
12843
    // isset id assignments
12844
 
12845
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12846
    static {
12847
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12848
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12849
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
12850
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class))));
12851
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12852
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_result.class, metaDataMap);
12853
    }
12854
 
12855
    public getInvoices_result() {
12856
    }
12857
 
12858
    public getInvoices_result(
12859
      List<Invoice> success)
12860
    {
12861
      this();
12862
      this.success = success;
12863
    }
12864
 
12865
    /**
12866
     * Performs a deep copy on <i>other</i>.
12867
     */
12868
    public getInvoices_result(getInvoices_result other) {
12869
      if (other.isSetSuccess()) {
12870
        List<Invoice> __this__success = new ArrayList<Invoice>();
12871
        for (Invoice other_element : other.success) {
12872
          __this__success.add(new Invoice(other_element));
12873
        }
12874
        this.success = __this__success;
12875
      }
12876
    }
12877
 
12878
    public getInvoices_result deepCopy() {
12879
      return new getInvoices_result(this);
12880
    }
12881
 
12882
    @Override
12883
    public void clear() {
12884
      this.success = null;
12885
    }
12886
 
12887
    public int getSuccessSize() {
12888
      return (this.success == null) ? 0 : this.success.size();
12889
    }
12890
 
12891
    public java.util.Iterator<Invoice> getSuccessIterator() {
12892
      return (this.success == null) ? null : this.success.iterator();
12893
    }
12894
 
12895
    public void addToSuccess(Invoice elem) {
12896
      if (this.success == null) {
12897
        this.success = new ArrayList<Invoice>();
12898
      }
12899
      this.success.add(elem);
12900
    }
12901
 
12902
    public List<Invoice> getSuccess() {
12903
      return this.success;
12904
    }
12905
 
12906
    public void setSuccess(List<Invoice> success) {
12907
      this.success = success;
12908
    }
12909
 
12910
    public void unsetSuccess() {
12911
      this.success = null;
12912
    }
12913
 
12914
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
12915
    public boolean isSetSuccess() {
12916
      return this.success != null;
12917
    }
12918
 
12919
    public void setSuccessIsSet(boolean value) {
12920
      if (!value) {
12921
        this.success = null;
12922
      }
12923
    }
12924
 
12925
    public void setFieldValue(_Fields field, Object value) {
12926
      switch (field) {
12927
      case SUCCESS:
12928
        if (value == null) {
12929
          unsetSuccess();
12930
        } else {
12931
          setSuccess((List<Invoice>)value);
12932
        }
12933
        break;
12934
 
12935
      }
12936
    }
12937
 
12938
    public Object getFieldValue(_Fields field) {
12939
      switch (field) {
12940
      case SUCCESS:
12941
        return getSuccess();
12942
 
12943
      }
12944
      throw new IllegalStateException();
12945
    }
12946
 
12947
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12948
    public boolean isSet(_Fields field) {
12949
      if (field == null) {
12950
        throw new IllegalArgumentException();
12951
      }
12952
 
12953
      switch (field) {
12954
      case SUCCESS:
12955
        return isSetSuccess();
12956
      }
12957
      throw new IllegalStateException();
12958
    }
12959
 
12960
    @Override
12961
    public boolean equals(Object that) {
12962
      if (that == null)
12963
        return false;
12964
      if (that instanceof getInvoices_result)
12965
        return this.equals((getInvoices_result)that);
12966
      return false;
12967
    }
12968
 
12969
    public boolean equals(getInvoices_result that) {
12970
      if (that == null)
12971
        return false;
12972
 
12973
      boolean this_present_success = true && this.isSetSuccess();
12974
      boolean that_present_success = true && that.isSetSuccess();
12975
      if (this_present_success || that_present_success) {
12976
        if (!(this_present_success && that_present_success))
12977
          return false;
12978
        if (!this.success.equals(that.success))
12979
          return false;
12980
      }
12981
 
12982
      return true;
12983
    }
12984
 
12985
    @Override
12986
    public int hashCode() {
12987
      return 0;
12988
    }
12989
 
12990
    public int compareTo(getInvoices_result other) {
12991
      if (!getClass().equals(other.getClass())) {
12992
        return getClass().getName().compareTo(other.getClass().getName());
12993
      }
12994
 
12995
      int lastComparison = 0;
12996
      getInvoices_result typedOther = (getInvoices_result)other;
12997
 
12998
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
12999
      if (lastComparison != 0) {
13000
        return lastComparison;
13001
      }
13002
      if (isSetSuccess()) {
13003
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
13004
        if (lastComparison != 0) {
13005
          return lastComparison;
13006
        }
13007
      }
13008
      return 0;
13009
    }
13010
 
13011
    public _Fields fieldForId(int fieldId) {
13012
      return _Fields.findByThriftId(fieldId);
13013
    }
13014
 
13015
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13016
      org.apache.thrift.protocol.TField field;
13017
      iprot.readStructBegin();
13018
      while (true)
13019
      {
13020
        field = iprot.readFieldBegin();
13021
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13022
          break;
13023
        }
13024
        switch (field.id) {
13025
          case 0: // SUCCESS
13026
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
13027
              {
6385 amar.kumar 13028
                org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
13029
                this.success = new ArrayList<Invoice>(_list24.size);
13030
                for (int _i25 = 0; _i25 < _list24.size; ++_i25)
5443 mandeep.dh 13031
                {
6385 amar.kumar 13032
                  Invoice _elem26; // required
13033
                  _elem26 = new Invoice();
13034
                  _elem26.read(iprot);
13035
                  this.success.add(_elem26);
5443 mandeep.dh 13036
                }
13037
                iprot.readListEnd();
13038
              }
13039
            } else { 
13040
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13041
            }
13042
            break;
13043
          default:
13044
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13045
        }
13046
        iprot.readFieldEnd();
13047
      }
13048
      iprot.readStructEnd();
13049
      validate();
13050
    }
13051
 
13052
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13053
      oprot.writeStructBegin(STRUCT_DESC);
13054
 
13055
      if (this.isSetSuccess()) {
13056
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13057
        {
13058
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 13059
          for (Invoice _iter27 : this.success)
5443 mandeep.dh 13060
          {
6385 amar.kumar 13061
            _iter27.write(oprot);
5443 mandeep.dh 13062
          }
13063
          oprot.writeListEnd();
13064
        }
13065
        oprot.writeFieldEnd();
13066
      }
13067
      oprot.writeFieldStop();
13068
      oprot.writeStructEnd();
13069
    }
13070
 
13071
    @Override
13072
    public String toString() {
13073
      StringBuilder sb = new StringBuilder("getInvoices_result(");
13074
      boolean first = true;
13075
 
13076
      sb.append("success:");
13077
      if (this.success == null) {
13078
        sb.append("null");
13079
      } else {
13080
        sb.append(this.success);
13081
      }
13082
      first = false;
13083
      sb.append(")");
13084
      return sb.toString();
13085
    }
13086
 
13087
    public void validate() throws org.apache.thrift.TException {
13088
      // check for required fields
13089
    }
13090
 
13091
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13092
      try {
13093
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13094
      } catch (org.apache.thrift.TException te) {
13095
        throw new java.io.IOException(te);
13096
      }
13097
    }
13098
 
13099
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13100
      try {
13101
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13102
      } catch (org.apache.thrift.TException te) {
13103
        throw new java.io.IOException(te);
13104
      }
13105
    }
13106
 
13107
  }
13108
 
7410 amar.kumar 13109
  public static class getInvoicesForWarehouse_args implements org.apache.thrift.TBase<getInvoicesForWarehouse_args, getInvoicesForWarehouse_args._Fields>, java.io.Serializable, Cloneable   {
13110
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoicesForWarehouse_args");
13111
 
13112
    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)1);
13113
    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)2);
13114
    private static final org.apache.thrift.protocol.TField DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("date", org.apache.thrift.protocol.TType.I64, (short)3);
13115
 
13116
    private long warehouseId; // required
13117
    private long supplierId; // required
13118
    private long date; // required
13119
 
13120
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13121
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13122
      WAREHOUSE_ID((short)1, "warehouseId"),
13123
      SUPPLIER_ID((short)2, "supplierId"),
13124
      DATE((short)3, "date");
13125
 
13126
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13127
 
13128
      static {
13129
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13130
          byName.put(field.getFieldName(), field);
13131
        }
13132
      }
13133
 
13134
      /**
13135
       * Find the _Fields constant that matches fieldId, or null if its not found.
13136
       */
13137
      public static _Fields findByThriftId(int fieldId) {
13138
        switch(fieldId) {
13139
          case 1: // WAREHOUSE_ID
13140
            return WAREHOUSE_ID;
13141
          case 2: // SUPPLIER_ID
13142
            return SUPPLIER_ID;
13143
          case 3: // DATE
13144
            return DATE;
13145
          default:
13146
            return null;
13147
        }
13148
      }
13149
 
13150
      /**
13151
       * Find the _Fields constant that matches fieldId, throwing an exception
13152
       * if it is not found.
13153
       */
13154
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13155
        _Fields fields = findByThriftId(fieldId);
13156
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13157
        return fields;
13158
      }
13159
 
13160
      /**
13161
       * Find the _Fields constant that matches name, or null if its not found.
13162
       */
13163
      public static _Fields findByName(String name) {
13164
        return byName.get(name);
13165
      }
13166
 
13167
      private final short _thriftId;
13168
      private final String _fieldName;
13169
 
13170
      _Fields(short thriftId, String fieldName) {
13171
        _thriftId = thriftId;
13172
        _fieldName = fieldName;
13173
      }
13174
 
13175
      public short getThriftFieldId() {
13176
        return _thriftId;
13177
      }
13178
 
13179
      public String getFieldName() {
13180
        return _fieldName;
13181
      }
13182
    }
13183
 
13184
    // isset id assignments
13185
    private static final int __WAREHOUSEID_ISSET_ID = 0;
13186
    private static final int __SUPPLIERID_ISSET_ID = 1;
13187
    private static final int __DATE_ISSET_ID = 2;
13188
    private BitSet __isset_bit_vector = new BitSet(3);
13189
 
13190
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13191
    static {
13192
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13193
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13194
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13195
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13196
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13197
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13198
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13199
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13200
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoicesForWarehouse_args.class, metaDataMap);
13201
    }
13202
 
13203
    public getInvoicesForWarehouse_args() {
13204
    }
13205
 
13206
    public getInvoicesForWarehouse_args(
13207
      long warehouseId,
13208
      long supplierId,
13209
      long date)
13210
    {
13211
      this();
13212
      this.warehouseId = warehouseId;
13213
      setWarehouseIdIsSet(true);
13214
      this.supplierId = supplierId;
13215
      setSupplierIdIsSet(true);
13216
      this.date = date;
13217
      setDateIsSet(true);
13218
    }
13219
 
13220
    /**
13221
     * Performs a deep copy on <i>other</i>.
13222
     */
13223
    public getInvoicesForWarehouse_args(getInvoicesForWarehouse_args other) {
13224
      __isset_bit_vector.clear();
13225
      __isset_bit_vector.or(other.__isset_bit_vector);
13226
      this.warehouseId = other.warehouseId;
13227
      this.supplierId = other.supplierId;
13228
      this.date = other.date;
13229
    }
13230
 
13231
    public getInvoicesForWarehouse_args deepCopy() {
13232
      return new getInvoicesForWarehouse_args(this);
13233
    }
13234
 
13235
    @Override
13236
    public void clear() {
13237
      setWarehouseIdIsSet(false);
13238
      this.warehouseId = 0;
13239
      setSupplierIdIsSet(false);
13240
      this.supplierId = 0;
13241
      setDateIsSet(false);
13242
      this.date = 0;
13243
    }
13244
 
13245
    public long getWarehouseId() {
13246
      return this.warehouseId;
13247
    }
13248
 
13249
    public void setWarehouseId(long warehouseId) {
13250
      this.warehouseId = warehouseId;
13251
      setWarehouseIdIsSet(true);
13252
    }
13253
 
13254
    public void unsetWarehouseId() {
13255
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
13256
    }
13257
 
13258
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
13259
    public boolean isSetWarehouseId() {
13260
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
13261
    }
13262
 
13263
    public void setWarehouseIdIsSet(boolean value) {
13264
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
13265
    }
13266
 
13267
    public long getSupplierId() {
13268
      return this.supplierId;
13269
    }
13270
 
13271
    public void setSupplierId(long supplierId) {
13272
      this.supplierId = supplierId;
13273
      setSupplierIdIsSet(true);
13274
    }
13275
 
13276
    public void unsetSupplierId() {
13277
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
13278
    }
13279
 
13280
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
13281
    public boolean isSetSupplierId() {
13282
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
13283
    }
13284
 
13285
    public void setSupplierIdIsSet(boolean value) {
13286
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
13287
    }
13288
 
13289
    public long getDate() {
13290
      return this.date;
13291
    }
13292
 
13293
    public void setDate(long date) {
13294
      this.date = date;
13295
      setDateIsSet(true);
13296
    }
13297
 
13298
    public void unsetDate() {
13299
      __isset_bit_vector.clear(__DATE_ISSET_ID);
13300
    }
13301
 
13302
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
13303
    public boolean isSetDate() {
13304
      return __isset_bit_vector.get(__DATE_ISSET_ID);
13305
    }
13306
 
13307
    public void setDateIsSet(boolean value) {
13308
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
13309
    }
13310
 
13311
    public void setFieldValue(_Fields field, Object value) {
13312
      switch (field) {
13313
      case WAREHOUSE_ID:
13314
        if (value == null) {
13315
          unsetWarehouseId();
13316
        } else {
13317
          setWarehouseId((Long)value);
13318
        }
13319
        break;
13320
 
13321
      case SUPPLIER_ID:
13322
        if (value == null) {
13323
          unsetSupplierId();
13324
        } else {
13325
          setSupplierId((Long)value);
13326
        }
13327
        break;
13328
 
13329
      case DATE:
13330
        if (value == null) {
13331
          unsetDate();
13332
        } else {
13333
          setDate((Long)value);
13334
        }
13335
        break;
13336
 
13337
      }
13338
    }
13339
 
13340
    public Object getFieldValue(_Fields field) {
13341
      switch (field) {
13342
      case WAREHOUSE_ID:
13343
        return Long.valueOf(getWarehouseId());
13344
 
13345
      case SUPPLIER_ID:
13346
        return Long.valueOf(getSupplierId());
13347
 
13348
      case DATE:
13349
        return Long.valueOf(getDate());
13350
 
13351
      }
13352
      throw new IllegalStateException();
13353
    }
13354
 
13355
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13356
    public boolean isSet(_Fields field) {
13357
      if (field == null) {
13358
        throw new IllegalArgumentException();
13359
      }
13360
 
13361
      switch (field) {
13362
      case WAREHOUSE_ID:
13363
        return isSetWarehouseId();
13364
      case SUPPLIER_ID:
13365
        return isSetSupplierId();
13366
      case DATE:
13367
        return isSetDate();
13368
      }
13369
      throw new IllegalStateException();
13370
    }
13371
 
13372
    @Override
13373
    public boolean equals(Object that) {
13374
      if (that == null)
13375
        return false;
13376
      if (that instanceof getInvoicesForWarehouse_args)
13377
        return this.equals((getInvoicesForWarehouse_args)that);
13378
      return false;
13379
    }
13380
 
13381
    public boolean equals(getInvoicesForWarehouse_args that) {
13382
      if (that == null)
13383
        return false;
13384
 
13385
      boolean this_present_warehouseId = true;
13386
      boolean that_present_warehouseId = true;
13387
      if (this_present_warehouseId || that_present_warehouseId) {
13388
        if (!(this_present_warehouseId && that_present_warehouseId))
13389
          return false;
13390
        if (this.warehouseId != that.warehouseId)
13391
          return false;
13392
      }
13393
 
13394
      boolean this_present_supplierId = true;
13395
      boolean that_present_supplierId = true;
13396
      if (this_present_supplierId || that_present_supplierId) {
13397
        if (!(this_present_supplierId && that_present_supplierId))
13398
          return false;
13399
        if (this.supplierId != that.supplierId)
13400
          return false;
13401
      }
13402
 
13403
      boolean this_present_date = true;
13404
      boolean that_present_date = true;
13405
      if (this_present_date || that_present_date) {
13406
        if (!(this_present_date && that_present_date))
13407
          return false;
13408
        if (this.date != that.date)
13409
          return false;
13410
      }
13411
 
13412
      return true;
13413
    }
13414
 
13415
    @Override
13416
    public int hashCode() {
13417
      return 0;
13418
    }
13419
 
13420
    public int compareTo(getInvoicesForWarehouse_args other) {
13421
      if (!getClass().equals(other.getClass())) {
13422
        return getClass().getName().compareTo(other.getClass().getName());
13423
      }
13424
 
13425
      int lastComparison = 0;
13426
      getInvoicesForWarehouse_args typedOther = (getInvoicesForWarehouse_args)other;
13427
 
13428
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
13429
      if (lastComparison != 0) {
13430
        return lastComparison;
13431
      }
13432
      if (isSetWarehouseId()) {
13433
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
13434
        if (lastComparison != 0) {
13435
          return lastComparison;
13436
        }
13437
      }
13438
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
13439
      if (lastComparison != 0) {
13440
        return lastComparison;
13441
      }
13442
      if (isSetSupplierId()) {
13443
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
13444
        if (lastComparison != 0) {
13445
          return lastComparison;
13446
        }
13447
      }
13448
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
13449
      if (lastComparison != 0) {
13450
        return lastComparison;
13451
      }
13452
      if (isSetDate()) {
13453
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
13454
        if (lastComparison != 0) {
13455
          return lastComparison;
13456
        }
13457
      }
13458
      return 0;
13459
    }
13460
 
13461
    public _Fields fieldForId(int fieldId) {
13462
      return _Fields.findByThriftId(fieldId);
13463
    }
13464
 
13465
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13466
      org.apache.thrift.protocol.TField field;
13467
      iprot.readStructBegin();
13468
      while (true)
13469
      {
13470
        field = iprot.readFieldBegin();
13471
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13472
          break;
13473
        }
13474
        switch (field.id) {
13475
          case 1: // WAREHOUSE_ID
13476
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13477
              this.warehouseId = iprot.readI64();
13478
              setWarehouseIdIsSet(true);
13479
            } else { 
13480
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13481
            }
13482
            break;
13483
          case 2: // SUPPLIER_ID
13484
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13485
              this.supplierId = iprot.readI64();
13486
              setSupplierIdIsSet(true);
13487
            } else { 
13488
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13489
            }
13490
            break;
13491
          case 3: // DATE
13492
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13493
              this.date = iprot.readI64();
13494
              setDateIsSet(true);
13495
            } else { 
13496
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13497
            }
13498
            break;
13499
          default:
13500
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13501
        }
13502
        iprot.readFieldEnd();
13503
      }
13504
      iprot.readStructEnd();
13505
      validate();
13506
    }
13507
 
13508
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13509
      validate();
13510
 
13511
      oprot.writeStructBegin(STRUCT_DESC);
13512
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
13513
      oprot.writeI64(this.warehouseId);
13514
      oprot.writeFieldEnd();
13515
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
13516
      oprot.writeI64(this.supplierId);
13517
      oprot.writeFieldEnd();
13518
      oprot.writeFieldBegin(DATE_FIELD_DESC);
13519
      oprot.writeI64(this.date);
13520
      oprot.writeFieldEnd();
13521
      oprot.writeFieldStop();
13522
      oprot.writeStructEnd();
13523
    }
13524
 
13525
    @Override
13526
    public String toString() {
13527
      StringBuilder sb = new StringBuilder("getInvoicesForWarehouse_args(");
13528
      boolean first = true;
13529
 
13530
      sb.append("warehouseId:");
13531
      sb.append(this.warehouseId);
13532
      first = false;
13533
      if (!first) sb.append(", ");
13534
      sb.append("supplierId:");
13535
      sb.append(this.supplierId);
13536
      first = false;
13537
      if (!first) sb.append(", ");
13538
      sb.append("date:");
13539
      sb.append(this.date);
13540
      first = false;
13541
      sb.append(")");
13542
      return sb.toString();
13543
    }
13544
 
13545
    public void validate() throws org.apache.thrift.TException {
13546
      // check for required fields
13547
    }
13548
 
13549
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13550
      try {
13551
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13552
      } catch (org.apache.thrift.TException te) {
13553
        throw new java.io.IOException(te);
13554
      }
13555
    }
13556
 
13557
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13558
      try {
13559
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
13560
        __isset_bit_vector = new BitSet(1);
13561
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13562
      } catch (org.apache.thrift.TException te) {
13563
        throw new java.io.IOException(te);
13564
      }
13565
    }
13566
 
13567
  }
13568
 
13569
  public static class getInvoicesForWarehouse_result implements org.apache.thrift.TBase<getInvoicesForWarehouse_result, getInvoicesForWarehouse_result._Fields>, java.io.Serializable, Cloneable   {
13570
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoicesForWarehouse_result");
13571
 
13572
    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);
13573
 
13574
    private List<Invoice> success; // required
13575
 
13576
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13577
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13578
      SUCCESS((short)0, "success");
13579
 
13580
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13581
 
13582
      static {
13583
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13584
          byName.put(field.getFieldName(), field);
13585
        }
13586
      }
13587
 
13588
      /**
13589
       * Find the _Fields constant that matches fieldId, or null if its not found.
13590
       */
13591
      public static _Fields findByThriftId(int fieldId) {
13592
        switch(fieldId) {
13593
          case 0: // SUCCESS
13594
            return SUCCESS;
13595
          default:
13596
            return null;
13597
        }
13598
      }
13599
 
13600
      /**
13601
       * Find the _Fields constant that matches fieldId, throwing an exception
13602
       * if it is not found.
13603
       */
13604
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13605
        _Fields fields = findByThriftId(fieldId);
13606
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13607
        return fields;
13608
      }
13609
 
13610
      /**
13611
       * Find the _Fields constant that matches name, or null if its not found.
13612
       */
13613
      public static _Fields findByName(String name) {
13614
        return byName.get(name);
13615
      }
13616
 
13617
      private final short _thriftId;
13618
      private final String _fieldName;
13619
 
13620
      _Fields(short thriftId, String fieldName) {
13621
        _thriftId = thriftId;
13622
        _fieldName = fieldName;
13623
      }
13624
 
13625
      public short getThriftFieldId() {
13626
        return _thriftId;
13627
      }
13628
 
13629
      public String getFieldName() {
13630
        return _fieldName;
13631
      }
13632
    }
13633
 
13634
    // isset id assignments
13635
 
13636
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13637
    static {
13638
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13639
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13640
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
13641
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class))));
13642
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13643
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoicesForWarehouse_result.class, metaDataMap);
13644
    }
13645
 
13646
    public getInvoicesForWarehouse_result() {
13647
    }
13648
 
13649
    public getInvoicesForWarehouse_result(
13650
      List<Invoice> success)
13651
    {
13652
      this();
13653
      this.success = success;
13654
    }
13655
 
13656
    /**
13657
     * Performs a deep copy on <i>other</i>.
13658
     */
13659
    public getInvoicesForWarehouse_result(getInvoicesForWarehouse_result other) {
13660
      if (other.isSetSuccess()) {
13661
        List<Invoice> __this__success = new ArrayList<Invoice>();
13662
        for (Invoice other_element : other.success) {
13663
          __this__success.add(new Invoice(other_element));
13664
        }
13665
        this.success = __this__success;
13666
      }
13667
    }
13668
 
13669
    public getInvoicesForWarehouse_result deepCopy() {
13670
      return new getInvoicesForWarehouse_result(this);
13671
    }
13672
 
13673
    @Override
13674
    public void clear() {
13675
      this.success = null;
13676
    }
13677
 
13678
    public int getSuccessSize() {
13679
      return (this.success == null) ? 0 : this.success.size();
13680
    }
13681
 
13682
    public java.util.Iterator<Invoice> getSuccessIterator() {
13683
      return (this.success == null) ? null : this.success.iterator();
13684
    }
13685
 
13686
    public void addToSuccess(Invoice elem) {
13687
      if (this.success == null) {
13688
        this.success = new ArrayList<Invoice>();
13689
      }
13690
      this.success.add(elem);
13691
    }
13692
 
13693
    public List<Invoice> getSuccess() {
13694
      return this.success;
13695
    }
13696
 
13697
    public void setSuccess(List<Invoice> success) {
13698
      this.success = success;
13699
    }
13700
 
13701
    public void unsetSuccess() {
13702
      this.success = null;
13703
    }
13704
 
13705
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
13706
    public boolean isSetSuccess() {
13707
      return this.success != null;
13708
    }
13709
 
13710
    public void setSuccessIsSet(boolean value) {
13711
      if (!value) {
13712
        this.success = null;
13713
      }
13714
    }
13715
 
13716
    public void setFieldValue(_Fields field, Object value) {
13717
      switch (field) {
13718
      case SUCCESS:
13719
        if (value == null) {
13720
          unsetSuccess();
13721
        } else {
13722
          setSuccess((List<Invoice>)value);
13723
        }
13724
        break;
13725
 
13726
      }
13727
    }
13728
 
13729
    public Object getFieldValue(_Fields field) {
13730
      switch (field) {
13731
      case SUCCESS:
13732
        return getSuccess();
13733
 
13734
      }
13735
      throw new IllegalStateException();
13736
    }
13737
 
13738
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13739
    public boolean isSet(_Fields field) {
13740
      if (field == null) {
13741
        throw new IllegalArgumentException();
13742
      }
13743
 
13744
      switch (field) {
13745
      case SUCCESS:
13746
        return isSetSuccess();
13747
      }
13748
      throw new IllegalStateException();
13749
    }
13750
 
13751
    @Override
13752
    public boolean equals(Object that) {
13753
      if (that == null)
13754
        return false;
13755
      if (that instanceof getInvoicesForWarehouse_result)
13756
        return this.equals((getInvoicesForWarehouse_result)that);
13757
      return false;
13758
    }
13759
 
13760
    public boolean equals(getInvoicesForWarehouse_result that) {
13761
      if (that == null)
13762
        return false;
13763
 
13764
      boolean this_present_success = true && this.isSetSuccess();
13765
      boolean that_present_success = true && that.isSetSuccess();
13766
      if (this_present_success || that_present_success) {
13767
        if (!(this_present_success && that_present_success))
13768
          return false;
13769
        if (!this.success.equals(that.success))
13770
          return false;
13771
      }
13772
 
13773
      return true;
13774
    }
13775
 
13776
    @Override
13777
    public int hashCode() {
13778
      return 0;
13779
    }
13780
 
13781
    public int compareTo(getInvoicesForWarehouse_result other) {
13782
      if (!getClass().equals(other.getClass())) {
13783
        return getClass().getName().compareTo(other.getClass().getName());
13784
      }
13785
 
13786
      int lastComparison = 0;
13787
      getInvoicesForWarehouse_result typedOther = (getInvoicesForWarehouse_result)other;
13788
 
13789
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
13790
      if (lastComparison != 0) {
13791
        return lastComparison;
13792
      }
13793
      if (isSetSuccess()) {
13794
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
13795
        if (lastComparison != 0) {
13796
          return lastComparison;
13797
        }
13798
      }
13799
      return 0;
13800
    }
13801
 
13802
    public _Fields fieldForId(int fieldId) {
13803
      return _Fields.findByThriftId(fieldId);
13804
    }
13805
 
13806
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13807
      org.apache.thrift.protocol.TField field;
13808
      iprot.readStructBegin();
13809
      while (true)
13810
      {
13811
        field = iprot.readFieldBegin();
13812
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13813
          break;
13814
        }
13815
        switch (field.id) {
13816
          case 0: // SUCCESS
13817
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
13818
              {
13819
                org.apache.thrift.protocol.TList _list28 = iprot.readListBegin();
13820
                this.success = new ArrayList<Invoice>(_list28.size);
13821
                for (int _i29 = 0; _i29 < _list28.size; ++_i29)
13822
                {
13823
                  Invoice _elem30; // required
13824
                  _elem30 = new Invoice();
13825
                  _elem30.read(iprot);
13826
                  this.success.add(_elem30);
13827
                }
13828
                iprot.readListEnd();
13829
              }
13830
            } else { 
13831
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13832
            }
13833
            break;
13834
          default:
13835
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13836
        }
13837
        iprot.readFieldEnd();
13838
      }
13839
      iprot.readStructEnd();
13840
      validate();
13841
    }
13842
 
13843
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13844
      oprot.writeStructBegin(STRUCT_DESC);
13845
 
13846
      if (this.isSetSuccess()) {
13847
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13848
        {
13849
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
13850
          for (Invoice _iter31 : this.success)
13851
          {
13852
            _iter31.write(oprot);
13853
          }
13854
          oprot.writeListEnd();
13855
        }
13856
        oprot.writeFieldEnd();
13857
      }
13858
      oprot.writeFieldStop();
13859
      oprot.writeStructEnd();
13860
    }
13861
 
13862
    @Override
13863
    public String toString() {
13864
      StringBuilder sb = new StringBuilder("getInvoicesForWarehouse_result(");
13865
      boolean first = true;
13866
 
13867
      sb.append("success:");
13868
      if (this.success == null) {
13869
        sb.append("null");
13870
      } else {
13871
        sb.append(this.success);
13872
      }
13873
      first = false;
13874
      sb.append(")");
13875
      return sb.toString();
13876
    }
13877
 
13878
    public void validate() throws org.apache.thrift.TException {
13879
      // check for required fields
13880
    }
13881
 
13882
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13883
      try {
13884
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13885
      } catch (org.apache.thrift.TException te) {
13886
        throw new java.io.IOException(te);
13887
      }
13888
    }
13889
 
13890
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13891
      try {
13892
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13893
      } catch (org.apache.thrift.TException te) {
13894
        throw new java.io.IOException(te);
13895
      }
13896
    }
13897
 
13898
  }
13899
 
5443 mandeep.dh 13900
  public static class createInvoice_args implements org.apache.thrift.TBase<createInvoice_args, createInvoice_args._Fields>, java.io.Serializable, Cloneable   {
13901
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_args");
13902
 
13903
    private static final org.apache.thrift.protocol.TField INVOICE_FIELD_DESC = new org.apache.thrift.protocol.TField("invoice", org.apache.thrift.protocol.TType.STRUCT, (short)1);
13904
 
13905
    private Invoice invoice; // required
13906
 
13907
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13908
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13909
      INVOICE((short)1, "invoice");
13910
 
13911
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13912
 
13913
      static {
13914
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13915
          byName.put(field.getFieldName(), field);
13916
        }
13917
      }
13918
 
13919
      /**
13920
       * Find the _Fields constant that matches fieldId, or null if its not found.
13921
       */
13922
      public static _Fields findByThriftId(int fieldId) {
13923
        switch(fieldId) {
13924
          case 1: // INVOICE
13925
            return INVOICE;
13926
          default:
13927
            return null;
13928
        }
13929
      }
13930
 
13931
      /**
13932
       * Find the _Fields constant that matches fieldId, throwing an exception
13933
       * if it is not found.
13934
       */
13935
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13936
        _Fields fields = findByThriftId(fieldId);
13937
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13938
        return fields;
13939
      }
13940
 
13941
      /**
13942
       * Find the _Fields constant that matches name, or null if its not found.
13943
       */
13944
      public static _Fields findByName(String name) {
13945
        return byName.get(name);
13946
      }
13947
 
13948
      private final short _thriftId;
13949
      private final String _fieldName;
13950
 
13951
      _Fields(short thriftId, String fieldName) {
13952
        _thriftId = thriftId;
13953
        _fieldName = fieldName;
13954
      }
13955
 
13956
      public short getThriftFieldId() {
13957
        return _thriftId;
13958
      }
13959
 
13960
      public String getFieldName() {
13961
        return _fieldName;
13962
      }
13963
    }
13964
 
13965
    // isset id assignments
13966
 
13967
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13968
    static {
13969
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13970
      tmpMap.put(_Fields.INVOICE, new org.apache.thrift.meta_data.FieldMetaData("invoice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13971
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class)));
13972
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13973
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_args.class, metaDataMap);
13974
    }
13975
 
13976
    public createInvoice_args() {
13977
    }
13978
 
13979
    public createInvoice_args(
13980
      Invoice invoice)
13981
    {
13982
      this();
13983
      this.invoice = invoice;
13984
    }
13985
 
13986
    /**
13987
     * Performs a deep copy on <i>other</i>.
13988
     */
13989
    public createInvoice_args(createInvoice_args other) {
13990
      if (other.isSetInvoice()) {
13991
        this.invoice = new Invoice(other.invoice);
13992
      }
13993
    }
13994
 
13995
    public createInvoice_args deepCopy() {
13996
      return new createInvoice_args(this);
13997
    }
13998
 
13999
    @Override
14000
    public void clear() {
14001
      this.invoice = null;
14002
    }
14003
 
14004
    public Invoice getInvoice() {
14005
      return this.invoice;
14006
    }
14007
 
14008
    public void setInvoice(Invoice invoice) {
14009
      this.invoice = invoice;
14010
    }
14011
 
14012
    public void unsetInvoice() {
14013
      this.invoice = null;
14014
    }
14015
 
14016
    /** Returns true if field invoice is set (has been assigned a value) and false otherwise */
14017
    public boolean isSetInvoice() {
14018
      return this.invoice != null;
14019
    }
14020
 
14021
    public void setInvoiceIsSet(boolean value) {
14022
      if (!value) {
14023
        this.invoice = null;
14024
      }
14025
    }
14026
 
14027
    public void setFieldValue(_Fields field, Object value) {
14028
      switch (field) {
14029
      case INVOICE:
14030
        if (value == null) {
14031
          unsetInvoice();
14032
        } else {
14033
          setInvoice((Invoice)value);
14034
        }
14035
        break;
14036
 
14037
      }
14038
    }
14039
 
14040
    public Object getFieldValue(_Fields field) {
14041
      switch (field) {
14042
      case INVOICE:
14043
        return getInvoice();
14044
 
14045
      }
14046
      throw new IllegalStateException();
14047
    }
14048
 
14049
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14050
    public boolean isSet(_Fields field) {
14051
      if (field == null) {
14052
        throw new IllegalArgumentException();
14053
      }
14054
 
14055
      switch (field) {
14056
      case INVOICE:
14057
        return isSetInvoice();
14058
      }
14059
      throw new IllegalStateException();
14060
    }
14061
 
14062
    @Override
14063
    public boolean equals(Object that) {
14064
      if (that == null)
14065
        return false;
14066
      if (that instanceof createInvoice_args)
14067
        return this.equals((createInvoice_args)that);
14068
      return false;
14069
    }
14070
 
14071
    public boolean equals(createInvoice_args that) {
14072
      if (that == null)
14073
        return false;
14074
 
14075
      boolean this_present_invoice = true && this.isSetInvoice();
14076
      boolean that_present_invoice = true && that.isSetInvoice();
14077
      if (this_present_invoice || that_present_invoice) {
14078
        if (!(this_present_invoice && that_present_invoice))
14079
          return false;
14080
        if (!this.invoice.equals(that.invoice))
14081
          return false;
14082
      }
14083
 
14084
      return true;
14085
    }
14086
 
14087
    @Override
14088
    public int hashCode() {
14089
      return 0;
14090
    }
14091
 
14092
    public int compareTo(createInvoice_args other) {
14093
      if (!getClass().equals(other.getClass())) {
14094
        return getClass().getName().compareTo(other.getClass().getName());
14095
      }
14096
 
14097
      int lastComparison = 0;
14098
      createInvoice_args typedOther = (createInvoice_args)other;
14099
 
14100
      lastComparison = Boolean.valueOf(isSetInvoice()).compareTo(typedOther.isSetInvoice());
14101
      if (lastComparison != 0) {
14102
        return lastComparison;
14103
      }
14104
      if (isSetInvoice()) {
14105
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoice, typedOther.invoice);
14106
        if (lastComparison != 0) {
14107
          return lastComparison;
14108
        }
14109
      }
14110
      return 0;
14111
    }
14112
 
14113
    public _Fields fieldForId(int fieldId) {
14114
      return _Fields.findByThriftId(fieldId);
14115
    }
14116
 
14117
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14118
      org.apache.thrift.protocol.TField field;
14119
      iprot.readStructBegin();
14120
      while (true)
14121
      {
14122
        field = iprot.readFieldBegin();
14123
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14124
          break;
14125
        }
14126
        switch (field.id) {
14127
          case 1: // INVOICE
14128
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14129
              this.invoice = new Invoice();
14130
              this.invoice.read(iprot);
14131
            } else { 
14132
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14133
            }
14134
            break;
14135
          default:
14136
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14137
        }
14138
        iprot.readFieldEnd();
14139
      }
14140
      iprot.readStructEnd();
14141
      validate();
14142
    }
14143
 
14144
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14145
      validate();
14146
 
14147
      oprot.writeStructBegin(STRUCT_DESC);
14148
      if (this.invoice != null) {
14149
        oprot.writeFieldBegin(INVOICE_FIELD_DESC);
14150
        this.invoice.write(oprot);
14151
        oprot.writeFieldEnd();
14152
      }
14153
      oprot.writeFieldStop();
14154
      oprot.writeStructEnd();
14155
    }
14156
 
14157
    @Override
14158
    public String toString() {
14159
      StringBuilder sb = new StringBuilder("createInvoice_args(");
14160
      boolean first = true;
14161
 
14162
      sb.append("invoice:");
14163
      if (this.invoice == null) {
14164
        sb.append("null");
14165
      } else {
14166
        sb.append(this.invoice);
14167
      }
14168
      first = false;
14169
      sb.append(")");
14170
      return sb.toString();
14171
    }
14172
 
14173
    public void validate() throws org.apache.thrift.TException {
14174
      // check for required fields
14175
    }
14176
 
14177
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14178
      try {
14179
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14180
      } catch (org.apache.thrift.TException te) {
14181
        throw new java.io.IOException(te);
14182
      }
14183
    }
14184
 
14185
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14186
      try {
14187
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14188
      } catch (org.apache.thrift.TException te) {
14189
        throw new java.io.IOException(te);
14190
      }
14191
    }
14192
 
14193
  }
14194
 
14195
  public static class createInvoice_result implements org.apache.thrift.TBase<createInvoice_result, createInvoice_result._Fields>, java.io.Serializable, Cloneable   {
14196
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_result");
14197
 
14198
    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
14199
 
14200
    private PurchaseServiceException e; // required
14201
 
14202
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14203
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14204
      E((short)1, "e");
14205
 
14206
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14207
 
14208
      static {
14209
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14210
          byName.put(field.getFieldName(), field);
14211
        }
14212
      }
14213
 
14214
      /**
14215
       * Find the _Fields constant that matches fieldId, or null if its not found.
14216
       */
14217
      public static _Fields findByThriftId(int fieldId) {
14218
        switch(fieldId) {
14219
          case 1: // E
14220
            return E;
14221
          default:
14222
            return null;
14223
        }
14224
      }
14225
 
14226
      /**
14227
       * Find the _Fields constant that matches fieldId, throwing an exception
14228
       * if it is not found.
14229
       */
14230
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14231
        _Fields fields = findByThriftId(fieldId);
14232
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14233
        return fields;
14234
      }
14235
 
14236
      /**
14237
       * Find the _Fields constant that matches name, or null if its not found.
14238
       */
14239
      public static _Fields findByName(String name) {
14240
        return byName.get(name);
14241
      }
14242
 
14243
      private final short _thriftId;
14244
      private final String _fieldName;
14245
 
14246
      _Fields(short thriftId, String fieldName) {
14247
        _thriftId = thriftId;
14248
        _fieldName = fieldName;
14249
      }
14250
 
14251
      public short getThriftFieldId() {
14252
        return _thriftId;
14253
      }
14254
 
14255
      public String getFieldName() {
14256
        return _fieldName;
14257
      }
14258
    }
14259
 
14260
    // isset id assignments
14261
 
14262
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14263
    static {
14264
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14265
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14266
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
14267
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14268
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_result.class, metaDataMap);
14269
    }
14270
 
14271
    public createInvoice_result() {
14272
    }
14273
 
14274
    public createInvoice_result(
14275
      PurchaseServiceException e)
14276
    {
14277
      this();
14278
      this.e = e;
14279
    }
14280
 
14281
    /**
14282
     * Performs a deep copy on <i>other</i>.
14283
     */
14284
    public createInvoice_result(createInvoice_result other) {
14285
      if (other.isSetE()) {
14286
        this.e = new PurchaseServiceException(other.e);
14287
      }
14288
    }
14289
 
14290
    public createInvoice_result deepCopy() {
14291
      return new createInvoice_result(this);
14292
    }
14293
 
14294
    @Override
14295
    public void clear() {
14296
      this.e = null;
14297
    }
14298
 
14299
    public PurchaseServiceException getE() {
14300
      return this.e;
14301
    }
14302
 
14303
    public void setE(PurchaseServiceException e) {
14304
      this.e = e;
14305
    }
14306
 
14307
    public void unsetE() {
14308
      this.e = null;
14309
    }
14310
 
14311
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
14312
    public boolean isSetE() {
14313
      return this.e != null;
14314
    }
14315
 
14316
    public void setEIsSet(boolean value) {
14317
      if (!value) {
14318
        this.e = null;
14319
      }
14320
    }
14321
 
14322
    public void setFieldValue(_Fields field, Object value) {
14323
      switch (field) {
14324
      case E:
14325
        if (value == null) {
14326
          unsetE();
14327
        } else {
14328
          setE((PurchaseServiceException)value);
14329
        }
14330
        break;
14331
 
14332
      }
14333
    }
14334
 
14335
    public Object getFieldValue(_Fields field) {
14336
      switch (field) {
14337
      case E:
14338
        return getE();
14339
 
14340
      }
14341
      throw new IllegalStateException();
14342
    }
14343
 
14344
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14345
    public boolean isSet(_Fields field) {
14346
      if (field == null) {
14347
        throw new IllegalArgumentException();
14348
      }
14349
 
14350
      switch (field) {
14351
      case E:
14352
        return isSetE();
14353
      }
14354
      throw new IllegalStateException();
14355
    }
14356
 
14357
    @Override
14358
    public boolean equals(Object that) {
14359
      if (that == null)
14360
        return false;
14361
      if (that instanceof createInvoice_result)
14362
        return this.equals((createInvoice_result)that);
14363
      return false;
14364
    }
14365
 
14366
    public boolean equals(createInvoice_result that) {
14367
      if (that == null)
14368
        return false;
14369
 
14370
      boolean this_present_e = true && this.isSetE();
14371
      boolean that_present_e = true && that.isSetE();
14372
      if (this_present_e || that_present_e) {
14373
        if (!(this_present_e && that_present_e))
14374
          return false;
14375
        if (!this.e.equals(that.e))
14376
          return false;
14377
      }
14378
 
14379
      return true;
14380
    }
14381
 
14382
    @Override
14383
    public int hashCode() {
14384
      return 0;
14385
    }
14386
 
14387
    public int compareTo(createInvoice_result other) {
14388
      if (!getClass().equals(other.getClass())) {
14389
        return getClass().getName().compareTo(other.getClass().getName());
14390
      }
14391
 
14392
      int lastComparison = 0;
14393
      createInvoice_result typedOther = (createInvoice_result)other;
14394
 
14395
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
14396
      if (lastComparison != 0) {
14397
        return lastComparison;
14398
      }
14399
      if (isSetE()) {
14400
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
14401
        if (lastComparison != 0) {
14402
          return lastComparison;
14403
        }
14404
      }
14405
      return 0;
14406
    }
14407
 
14408
    public _Fields fieldForId(int fieldId) {
14409
      return _Fields.findByThriftId(fieldId);
14410
    }
14411
 
14412
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14413
      org.apache.thrift.protocol.TField field;
14414
      iprot.readStructBegin();
14415
      while (true)
14416
      {
14417
        field = iprot.readFieldBegin();
14418
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14419
          break;
14420
        }
14421
        switch (field.id) {
14422
          case 1: // E
14423
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14424
              this.e = new PurchaseServiceException();
14425
              this.e.read(iprot);
14426
            } else { 
14427
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14428
            }
14429
            break;
14430
          default:
14431
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14432
        }
14433
        iprot.readFieldEnd();
14434
      }
14435
      iprot.readStructEnd();
14436
      validate();
14437
    }
14438
 
14439
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14440
      oprot.writeStructBegin(STRUCT_DESC);
14441
 
14442
      if (this.isSetE()) {
14443
        oprot.writeFieldBegin(E_FIELD_DESC);
14444
        this.e.write(oprot);
14445
        oprot.writeFieldEnd();
14446
      }
14447
      oprot.writeFieldStop();
14448
      oprot.writeStructEnd();
14449
    }
14450
 
14451
    @Override
14452
    public String toString() {
14453
      StringBuilder sb = new StringBuilder("createInvoice_result(");
14454
      boolean first = true;
14455
 
14456
      sb.append("e:");
14457
      if (this.e == null) {
14458
        sb.append("null");
14459
      } else {
14460
        sb.append(this.e);
14461
      }
14462
      first = false;
14463
      sb.append(")");
14464
      return sb.toString();
14465
    }
14466
 
14467
    public void validate() throws org.apache.thrift.TException {
14468
      // check for required fields
14469
    }
14470
 
14471
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14472
      try {
14473
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14474
      } catch (org.apache.thrift.TException te) {
14475
        throw new java.io.IOException(te);
14476
      }
14477
    }
14478
 
14479
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14480
      try {
14481
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14482
      } catch (org.apache.thrift.TException te) {
14483
        throw new java.io.IOException(te);
14484
      }
14485
    }
14486
 
14487
  }
14488
 
5591 mandeep.dh 14489
  public static class addSupplier_args implements org.apache.thrift.TBase<addSupplier_args, addSupplier_args._Fields>, java.io.Serializable, Cloneable   {
14490
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSupplier_args");
14491
 
14492
    private static final org.apache.thrift.protocol.TField SUPPLIER_FIELD_DESC = new org.apache.thrift.protocol.TField("supplier", org.apache.thrift.protocol.TType.STRUCT, (short)1);
14493
 
14494
    private Supplier supplier; // required
14495
 
14496
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14497
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14498
      SUPPLIER((short)1, "supplier");
14499
 
14500
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14501
 
14502
      static {
14503
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14504
          byName.put(field.getFieldName(), field);
14505
        }
14506
      }
14507
 
14508
      /**
14509
       * Find the _Fields constant that matches fieldId, or null if its not found.
14510
       */
14511
      public static _Fields findByThriftId(int fieldId) {
14512
        switch(fieldId) {
14513
          case 1: // SUPPLIER
14514
            return SUPPLIER;
14515
          default:
14516
            return null;
14517
        }
14518
      }
14519
 
14520
      /**
14521
       * Find the _Fields constant that matches fieldId, throwing an exception
14522
       * if it is not found.
14523
       */
14524
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14525
        _Fields fields = findByThriftId(fieldId);
14526
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14527
        return fields;
14528
      }
14529
 
14530
      /**
14531
       * Find the _Fields constant that matches name, or null if its not found.
14532
       */
14533
      public static _Fields findByName(String name) {
14534
        return byName.get(name);
14535
      }
14536
 
14537
      private final short _thriftId;
14538
      private final String _fieldName;
14539
 
14540
      _Fields(short thriftId, String fieldName) {
14541
        _thriftId = thriftId;
14542
        _fieldName = fieldName;
14543
      }
14544
 
14545
      public short getThriftFieldId() {
14546
        return _thriftId;
14547
      }
14548
 
14549
      public String getFieldName() {
14550
        return _fieldName;
14551
      }
14552
    }
14553
 
14554
    // isset id assignments
14555
 
14556
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14557
    static {
14558
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14559
      tmpMap.put(_Fields.SUPPLIER, new org.apache.thrift.meta_data.FieldMetaData("supplier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14560
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
14561
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14562
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSupplier_args.class, metaDataMap);
14563
    }
14564
 
14565
    public addSupplier_args() {
14566
    }
14567
 
14568
    public addSupplier_args(
14569
      Supplier supplier)
14570
    {
14571
      this();
14572
      this.supplier = supplier;
14573
    }
14574
 
14575
    /**
14576
     * Performs a deep copy on <i>other</i>.
14577
     */
14578
    public addSupplier_args(addSupplier_args other) {
14579
      if (other.isSetSupplier()) {
14580
        this.supplier = new Supplier(other.supplier);
14581
      }
14582
    }
14583
 
14584
    public addSupplier_args deepCopy() {
14585
      return new addSupplier_args(this);
14586
    }
14587
 
14588
    @Override
14589
    public void clear() {
14590
      this.supplier = null;
14591
    }
14592
 
14593
    public Supplier getSupplier() {
14594
      return this.supplier;
14595
    }
14596
 
14597
    public void setSupplier(Supplier supplier) {
14598
      this.supplier = supplier;
14599
    }
14600
 
14601
    public void unsetSupplier() {
14602
      this.supplier = null;
14603
    }
14604
 
14605
    /** Returns true if field supplier is set (has been assigned a value) and false otherwise */
14606
    public boolean isSetSupplier() {
14607
      return this.supplier != null;
14608
    }
14609
 
14610
    public void setSupplierIsSet(boolean value) {
14611
      if (!value) {
14612
        this.supplier = null;
14613
      }
14614
    }
14615
 
14616
    public void setFieldValue(_Fields field, Object value) {
14617
      switch (field) {
14618
      case SUPPLIER:
14619
        if (value == null) {
14620
          unsetSupplier();
14621
        } else {
14622
          setSupplier((Supplier)value);
14623
        }
14624
        break;
14625
 
14626
      }
14627
    }
14628
 
14629
    public Object getFieldValue(_Fields field) {
14630
      switch (field) {
14631
      case SUPPLIER:
14632
        return getSupplier();
14633
 
14634
      }
14635
      throw new IllegalStateException();
14636
    }
14637
 
14638
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14639
    public boolean isSet(_Fields field) {
14640
      if (field == null) {
14641
        throw new IllegalArgumentException();
14642
      }
14643
 
14644
      switch (field) {
14645
      case SUPPLIER:
14646
        return isSetSupplier();
14647
      }
14648
      throw new IllegalStateException();
14649
    }
14650
 
14651
    @Override
14652
    public boolean equals(Object that) {
14653
      if (that == null)
14654
        return false;
14655
      if (that instanceof addSupplier_args)
14656
        return this.equals((addSupplier_args)that);
14657
      return false;
14658
    }
14659
 
14660
    public boolean equals(addSupplier_args that) {
14661
      if (that == null)
14662
        return false;
14663
 
14664
      boolean this_present_supplier = true && this.isSetSupplier();
14665
      boolean that_present_supplier = true && that.isSetSupplier();
14666
      if (this_present_supplier || that_present_supplier) {
14667
        if (!(this_present_supplier && that_present_supplier))
14668
          return false;
14669
        if (!this.supplier.equals(that.supplier))
14670
          return false;
14671
      }
14672
 
14673
      return true;
14674
    }
14675
 
14676
    @Override
14677
    public int hashCode() {
14678
      return 0;
14679
    }
14680
 
14681
    public int compareTo(addSupplier_args other) {
14682
      if (!getClass().equals(other.getClass())) {
14683
        return getClass().getName().compareTo(other.getClass().getName());
14684
      }
14685
 
14686
      int lastComparison = 0;
14687
      addSupplier_args typedOther = (addSupplier_args)other;
14688
 
14689
      lastComparison = Boolean.valueOf(isSetSupplier()).compareTo(typedOther.isSetSupplier());
14690
      if (lastComparison != 0) {
14691
        return lastComparison;
14692
      }
14693
      if (isSetSupplier()) {
14694
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplier, typedOther.supplier);
14695
        if (lastComparison != 0) {
14696
          return lastComparison;
14697
        }
14698
      }
14699
      return 0;
14700
    }
14701
 
14702
    public _Fields fieldForId(int fieldId) {
14703
      return _Fields.findByThriftId(fieldId);
14704
    }
14705
 
14706
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14707
      org.apache.thrift.protocol.TField field;
14708
      iprot.readStructBegin();
14709
      while (true)
14710
      {
14711
        field = iprot.readFieldBegin();
14712
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14713
          break;
14714
        }
14715
        switch (field.id) {
14716
          case 1: // SUPPLIER
14717
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14718
              this.supplier = new Supplier();
14719
              this.supplier.read(iprot);
14720
            } else { 
14721
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14722
            }
14723
            break;
14724
          default:
14725
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14726
        }
14727
        iprot.readFieldEnd();
14728
      }
14729
      iprot.readStructEnd();
14730
      validate();
14731
    }
14732
 
14733
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14734
      validate();
14735
 
14736
      oprot.writeStructBegin(STRUCT_DESC);
14737
      if (this.supplier != null) {
14738
        oprot.writeFieldBegin(SUPPLIER_FIELD_DESC);
14739
        this.supplier.write(oprot);
14740
        oprot.writeFieldEnd();
14741
      }
14742
      oprot.writeFieldStop();
14743
      oprot.writeStructEnd();
14744
    }
14745
 
14746
    @Override
14747
    public String toString() {
14748
      StringBuilder sb = new StringBuilder("addSupplier_args(");
14749
      boolean first = true;
14750
 
14751
      sb.append("supplier:");
14752
      if (this.supplier == null) {
14753
        sb.append("null");
14754
      } else {
14755
        sb.append(this.supplier);
14756
      }
14757
      first = false;
14758
      sb.append(")");
14759
      return sb.toString();
14760
    }
14761
 
14762
    public void validate() throws org.apache.thrift.TException {
14763
      // check for required fields
14764
    }
14765
 
14766
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14767
      try {
14768
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14769
      } catch (org.apache.thrift.TException te) {
14770
        throw new java.io.IOException(te);
14771
      }
14772
    }
14773
 
14774
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14775
      try {
14776
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14777
      } catch (org.apache.thrift.TException te) {
14778
        throw new java.io.IOException(te);
14779
      }
14780
    }
14781
 
14782
  }
14783
 
14784
  public static class addSupplier_result implements org.apache.thrift.TBase<addSupplier_result, addSupplier_result._Fields>, java.io.Serializable, Cloneable   {
14785
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSupplier_result");
14786
 
14787
    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);
14788
 
14789
    private Supplier success; // required
14790
 
14791
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14792
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14793
      SUCCESS((short)0, "success");
14794
 
14795
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14796
 
14797
      static {
14798
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14799
          byName.put(field.getFieldName(), field);
14800
        }
14801
      }
14802
 
14803
      /**
14804
       * Find the _Fields constant that matches fieldId, or null if its not found.
14805
       */
14806
      public static _Fields findByThriftId(int fieldId) {
14807
        switch(fieldId) {
14808
          case 0: // SUCCESS
14809
            return SUCCESS;
14810
          default:
14811
            return null;
14812
        }
14813
      }
14814
 
14815
      /**
14816
       * Find the _Fields constant that matches fieldId, throwing an exception
14817
       * if it is not found.
14818
       */
14819
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14820
        _Fields fields = findByThriftId(fieldId);
14821
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14822
        return fields;
14823
      }
14824
 
14825
      /**
14826
       * Find the _Fields constant that matches name, or null if its not found.
14827
       */
14828
      public static _Fields findByName(String name) {
14829
        return byName.get(name);
14830
      }
14831
 
14832
      private final short _thriftId;
14833
      private final String _fieldName;
14834
 
14835
      _Fields(short thriftId, String fieldName) {
14836
        _thriftId = thriftId;
14837
        _fieldName = fieldName;
14838
      }
14839
 
14840
      public short getThriftFieldId() {
14841
        return _thriftId;
14842
      }
14843
 
14844
      public String getFieldName() {
14845
        return _fieldName;
14846
      }
14847
    }
14848
 
14849
    // isset id assignments
14850
 
14851
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14852
    static {
14853
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14854
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14855
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
14856
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14857
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSupplier_result.class, metaDataMap);
14858
    }
14859
 
14860
    public addSupplier_result() {
14861
    }
14862
 
14863
    public addSupplier_result(
14864
      Supplier success)
14865
    {
14866
      this();
14867
      this.success = success;
14868
    }
14869
 
14870
    /**
14871
     * Performs a deep copy on <i>other</i>.
14872
     */
14873
    public addSupplier_result(addSupplier_result other) {
14874
      if (other.isSetSuccess()) {
14875
        this.success = new Supplier(other.success);
14876
      }
14877
    }
14878
 
14879
    public addSupplier_result deepCopy() {
14880
      return new addSupplier_result(this);
14881
    }
14882
 
14883
    @Override
14884
    public void clear() {
14885
      this.success = null;
14886
    }
14887
 
14888
    public Supplier getSuccess() {
14889
      return this.success;
14890
    }
14891
 
14892
    public void setSuccess(Supplier success) {
14893
      this.success = success;
14894
    }
14895
 
14896
    public void unsetSuccess() {
14897
      this.success = null;
14898
    }
14899
 
14900
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
14901
    public boolean isSetSuccess() {
14902
      return this.success != null;
14903
    }
14904
 
14905
    public void setSuccessIsSet(boolean value) {
14906
      if (!value) {
14907
        this.success = null;
14908
      }
14909
    }
14910
 
14911
    public void setFieldValue(_Fields field, Object value) {
14912
      switch (field) {
14913
      case SUCCESS:
14914
        if (value == null) {
14915
          unsetSuccess();
14916
        } else {
14917
          setSuccess((Supplier)value);
14918
        }
14919
        break;
14920
 
14921
      }
14922
    }
14923
 
14924
    public Object getFieldValue(_Fields field) {
14925
      switch (field) {
14926
      case SUCCESS:
14927
        return getSuccess();
14928
 
14929
      }
14930
      throw new IllegalStateException();
14931
    }
14932
 
14933
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14934
    public boolean isSet(_Fields field) {
14935
      if (field == null) {
14936
        throw new IllegalArgumentException();
14937
      }
14938
 
14939
      switch (field) {
14940
      case SUCCESS:
14941
        return isSetSuccess();
14942
      }
14943
      throw new IllegalStateException();
14944
    }
14945
 
14946
    @Override
14947
    public boolean equals(Object that) {
14948
      if (that == null)
14949
        return false;
14950
      if (that instanceof addSupplier_result)
14951
        return this.equals((addSupplier_result)that);
14952
      return false;
14953
    }
14954
 
14955
    public boolean equals(addSupplier_result that) {
14956
      if (that == null)
14957
        return false;
14958
 
14959
      boolean this_present_success = true && this.isSetSuccess();
14960
      boolean that_present_success = true && that.isSetSuccess();
14961
      if (this_present_success || that_present_success) {
14962
        if (!(this_present_success && that_present_success))
14963
          return false;
14964
        if (!this.success.equals(that.success))
14965
          return false;
14966
      }
14967
 
14968
      return true;
14969
    }
14970
 
14971
    @Override
14972
    public int hashCode() {
14973
      return 0;
14974
    }
14975
 
14976
    public int compareTo(addSupplier_result other) {
14977
      if (!getClass().equals(other.getClass())) {
14978
        return getClass().getName().compareTo(other.getClass().getName());
14979
      }
14980
 
14981
      int lastComparison = 0;
14982
      addSupplier_result typedOther = (addSupplier_result)other;
14983
 
14984
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
14985
      if (lastComparison != 0) {
14986
        return lastComparison;
14987
      }
14988
      if (isSetSuccess()) {
14989
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
14990
        if (lastComparison != 0) {
14991
          return lastComparison;
14992
        }
14993
      }
14994
      return 0;
14995
    }
14996
 
14997
    public _Fields fieldForId(int fieldId) {
14998
      return _Fields.findByThriftId(fieldId);
14999
    }
15000
 
15001
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15002
      org.apache.thrift.protocol.TField field;
15003
      iprot.readStructBegin();
15004
      while (true)
15005
      {
15006
        field = iprot.readFieldBegin();
15007
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15008
          break;
15009
        }
15010
        switch (field.id) {
15011
          case 0: // SUCCESS
15012
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15013
              this.success = new Supplier();
15014
              this.success.read(iprot);
15015
            } else { 
15016
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15017
            }
15018
            break;
15019
          default:
15020
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15021
        }
15022
        iprot.readFieldEnd();
15023
      }
15024
      iprot.readStructEnd();
15025
      validate();
15026
    }
15027
 
15028
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15029
      oprot.writeStructBegin(STRUCT_DESC);
15030
 
15031
      if (this.isSetSuccess()) {
15032
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15033
        this.success.write(oprot);
15034
        oprot.writeFieldEnd();
15035
      }
15036
      oprot.writeFieldStop();
15037
      oprot.writeStructEnd();
15038
    }
15039
 
15040
    @Override
15041
    public String toString() {
15042
      StringBuilder sb = new StringBuilder("addSupplier_result(");
15043
      boolean first = true;
15044
 
15045
      sb.append("success:");
15046
      if (this.success == null) {
15047
        sb.append("null");
15048
      } else {
15049
        sb.append(this.success);
15050
      }
15051
      first = false;
15052
      sb.append(")");
15053
      return sb.toString();
15054
    }
15055
 
15056
    public void validate() throws org.apache.thrift.TException {
15057
      // check for required fields
15058
    }
15059
 
15060
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15061
      try {
15062
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15063
      } catch (org.apache.thrift.TException te) {
15064
        throw new java.io.IOException(te);
15065
      }
15066
    }
15067
 
15068
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15069
      try {
15070
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15071
      } catch (org.apache.thrift.TException te) {
15072
        throw new java.io.IOException(te);
15073
      }
15074
    }
15075
 
15076
  }
15077
 
15078
  public static class updateSupplier_args implements org.apache.thrift.TBase<updateSupplier_args, updateSupplier_args._Fields>, java.io.Serializable, Cloneable   {
15079
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSupplier_args");
15080
 
15081
    private static final org.apache.thrift.protocol.TField SUPPLIER_FIELD_DESC = new org.apache.thrift.protocol.TField("supplier", org.apache.thrift.protocol.TType.STRUCT, (short)1);
15082
 
15083
    private Supplier supplier; // required
15084
 
15085
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15086
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15087
      SUPPLIER((short)1, "supplier");
15088
 
15089
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15090
 
15091
      static {
15092
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15093
          byName.put(field.getFieldName(), field);
15094
        }
15095
      }
15096
 
15097
      /**
15098
       * Find the _Fields constant that matches fieldId, or null if its not found.
15099
       */
15100
      public static _Fields findByThriftId(int fieldId) {
15101
        switch(fieldId) {
15102
          case 1: // SUPPLIER
15103
            return SUPPLIER;
15104
          default:
15105
            return null;
15106
        }
15107
      }
15108
 
15109
      /**
15110
       * Find the _Fields constant that matches fieldId, throwing an exception
15111
       * if it is not found.
15112
       */
15113
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15114
        _Fields fields = findByThriftId(fieldId);
15115
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15116
        return fields;
15117
      }
15118
 
15119
      /**
15120
       * Find the _Fields constant that matches name, or null if its not found.
15121
       */
15122
      public static _Fields findByName(String name) {
15123
        return byName.get(name);
15124
      }
15125
 
15126
      private final short _thriftId;
15127
      private final String _fieldName;
15128
 
15129
      _Fields(short thriftId, String fieldName) {
15130
        _thriftId = thriftId;
15131
        _fieldName = fieldName;
15132
      }
15133
 
15134
      public short getThriftFieldId() {
15135
        return _thriftId;
15136
      }
15137
 
15138
      public String getFieldName() {
15139
        return _fieldName;
15140
      }
15141
    }
15142
 
15143
    // isset id assignments
15144
 
15145
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15146
    static {
15147
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15148
      tmpMap.put(_Fields.SUPPLIER, new org.apache.thrift.meta_data.FieldMetaData("supplier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15149
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
15150
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15151
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSupplier_args.class, metaDataMap);
15152
    }
15153
 
15154
    public updateSupplier_args() {
15155
    }
15156
 
15157
    public updateSupplier_args(
15158
      Supplier supplier)
15159
    {
15160
      this();
15161
      this.supplier = supplier;
15162
    }
15163
 
15164
    /**
15165
     * Performs a deep copy on <i>other</i>.
15166
     */
15167
    public updateSupplier_args(updateSupplier_args other) {
15168
      if (other.isSetSupplier()) {
15169
        this.supplier = new Supplier(other.supplier);
15170
      }
15171
    }
15172
 
15173
    public updateSupplier_args deepCopy() {
15174
      return new updateSupplier_args(this);
15175
    }
15176
 
15177
    @Override
15178
    public void clear() {
15179
      this.supplier = null;
15180
    }
15181
 
15182
    public Supplier getSupplier() {
15183
      return this.supplier;
15184
    }
15185
 
15186
    public void setSupplier(Supplier supplier) {
15187
      this.supplier = supplier;
15188
    }
15189
 
15190
    public void unsetSupplier() {
15191
      this.supplier = null;
15192
    }
15193
 
15194
    /** Returns true if field supplier is set (has been assigned a value) and false otherwise */
15195
    public boolean isSetSupplier() {
15196
      return this.supplier != null;
15197
    }
15198
 
15199
    public void setSupplierIsSet(boolean value) {
15200
      if (!value) {
15201
        this.supplier = null;
15202
      }
15203
    }
15204
 
15205
    public void setFieldValue(_Fields field, Object value) {
15206
      switch (field) {
15207
      case SUPPLIER:
15208
        if (value == null) {
15209
          unsetSupplier();
15210
        } else {
15211
          setSupplier((Supplier)value);
15212
        }
15213
        break;
15214
 
15215
      }
15216
    }
15217
 
15218
    public Object getFieldValue(_Fields field) {
15219
      switch (field) {
15220
      case SUPPLIER:
15221
        return getSupplier();
15222
 
15223
      }
15224
      throw new IllegalStateException();
15225
    }
15226
 
15227
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15228
    public boolean isSet(_Fields field) {
15229
      if (field == null) {
15230
        throw new IllegalArgumentException();
15231
      }
15232
 
15233
      switch (field) {
15234
      case SUPPLIER:
15235
        return isSetSupplier();
15236
      }
15237
      throw new IllegalStateException();
15238
    }
15239
 
15240
    @Override
15241
    public boolean equals(Object that) {
15242
      if (that == null)
15243
        return false;
15244
      if (that instanceof updateSupplier_args)
15245
        return this.equals((updateSupplier_args)that);
15246
      return false;
15247
    }
15248
 
15249
    public boolean equals(updateSupplier_args that) {
15250
      if (that == null)
15251
        return false;
15252
 
15253
      boolean this_present_supplier = true && this.isSetSupplier();
15254
      boolean that_present_supplier = true && that.isSetSupplier();
15255
      if (this_present_supplier || that_present_supplier) {
15256
        if (!(this_present_supplier && that_present_supplier))
15257
          return false;
15258
        if (!this.supplier.equals(that.supplier))
15259
          return false;
15260
      }
15261
 
15262
      return true;
15263
    }
15264
 
15265
    @Override
15266
    public int hashCode() {
15267
      return 0;
15268
    }
15269
 
15270
    public int compareTo(updateSupplier_args other) {
15271
      if (!getClass().equals(other.getClass())) {
15272
        return getClass().getName().compareTo(other.getClass().getName());
15273
      }
15274
 
15275
      int lastComparison = 0;
15276
      updateSupplier_args typedOther = (updateSupplier_args)other;
15277
 
15278
      lastComparison = Boolean.valueOf(isSetSupplier()).compareTo(typedOther.isSetSupplier());
15279
      if (lastComparison != 0) {
15280
        return lastComparison;
15281
      }
15282
      if (isSetSupplier()) {
15283
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplier, typedOther.supplier);
15284
        if (lastComparison != 0) {
15285
          return lastComparison;
15286
        }
15287
      }
15288
      return 0;
15289
    }
15290
 
15291
    public _Fields fieldForId(int fieldId) {
15292
      return _Fields.findByThriftId(fieldId);
15293
    }
15294
 
15295
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15296
      org.apache.thrift.protocol.TField field;
15297
      iprot.readStructBegin();
15298
      while (true)
15299
      {
15300
        field = iprot.readFieldBegin();
15301
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15302
          break;
15303
        }
15304
        switch (field.id) {
15305
          case 1: // SUPPLIER
15306
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15307
              this.supplier = new Supplier();
15308
              this.supplier.read(iprot);
15309
            } else { 
15310
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15311
            }
15312
            break;
15313
          default:
15314
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15315
        }
15316
        iprot.readFieldEnd();
15317
      }
15318
      iprot.readStructEnd();
15319
      validate();
15320
    }
15321
 
15322
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15323
      validate();
15324
 
15325
      oprot.writeStructBegin(STRUCT_DESC);
15326
      if (this.supplier != null) {
15327
        oprot.writeFieldBegin(SUPPLIER_FIELD_DESC);
15328
        this.supplier.write(oprot);
15329
        oprot.writeFieldEnd();
15330
      }
15331
      oprot.writeFieldStop();
15332
      oprot.writeStructEnd();
15333
    }
15334
 
15335
    @Override
15336
    public String toString() {
15337
      StringBuilder sb = new StringBuilder("updateSupplier_args(");
15338
      boolean first = true;
15339
 
15340
      sb.append("supplier:");
15341
      if (this.supplier == null) {
15342
        sb.append("null");
15343
      } else {
15344
        sb.append(this.supplier);
15345
      }
15346
      first = false;
15347
      sb.append(")");
15348
      return sb.toString();
15349
    }
15350
 
15351
    public void validate() throws org.apache.thrift.TException {
15352
      // check for required fields
15353
    }
15354
 
15355
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15356
      try {
15357
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15358
      } catch (org.apache.thrift.TException te) {
15359
        throw new java.io.IOException(te);
15360
      }
15361
    }
15362
 
15363
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15364
      try {
15365
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15366
      } catch (org.apache.thrift.TException te) {
15367
        throw new java.io.IOException(te);
15368
      }
15369
    }
15370
 
15371
  }
15372
 
15373
  public static class updateSupplier_result implements org.apache.thrift.TBase<updateSupplier_result, updateSupplier_result._Fields>, java.io.Serializable, Cloneable   {
15374
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSupplier_result");
15375
 
15376
 
15377
 
15378
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15379
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15380
;
15381
 
15382
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15383
 
15384
      static {
15385
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15386
          byName.put(field.getFieldName(), field);
15387
        }
15388
      }
15389
 
15390
      /**
15391
       * Find the _Fields constant that matches fieldId, or null if its not found.
15392
       */
15393
      public static _Fields findByThriftId(int fieldId) {
15394
        switch(fieldId) {
15395
          default:
15396
            return null;
15397
        }
15398
      }
15399
 
15400
      /**
15401
       * Find the _Fields constant that matches fieldId, throwing an exception
15402
       * if it is not found.
15403
       */
15404
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15405
        _Fields fields = findByThriftId(fieldId);
15406
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15407
        return fields;
15408
      }
15409
 
15410
      /**
15411
       * Find the _Fields constant that matches name, or null if its not found.
15412
       */
15413
      public static _Fields findByName(String name) {
15414
        return byName.get(name);
15415
      }
15416
 
15417
      private final short _thriftId;
15418
      private final String _fieldName;
15419
 
15420
      _Fields(short thriftId, String fieldName) {
15421
        _thriftId = thriftId;
15422
        _fieldName = fieldName;
15423
      }
15424
 
15425
      public short getThriftFieldId() {
15426
        return _thriftId;
15427
      }
15428
 
15429
      public String getFieldName() {
15430
        return _fieldName;
15431
      }
15432
    }
15433
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15434
    static {
15435
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15436
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15437
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSupplier_result.class, metaDataMap);
15438
    }
15439
 
15440
    public updateSupplier_result() {
15441
    }
15442
 
15443
    /**
15444
     * Performs a deep copy on <i>other</i>.
15445
     */
15446
    public updateSupplier_result(updateSupplier_result other) {
15447
    }
15448
 
15449
    public updateSupplier_result deepCopy() {
15450
      return new updateSupplier_result(this);
15451
    }
15452
 
15453
    @Override
15454
    public void clear() {
15455
    }
15456
 
15457
    public void setFieldValue(_Fields field, Object value) {
15458
      switch (field) {
15459
      }
15460
    }
15461
 
15462
    public Object getFieldValue(_Fields field) {
15463
      switch (field) {
15464
      }
15465
      throw new IllegalStateException();
15466
    }
15467
 
15468
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15469
    public boolean isSet(_Fields field) {
15470
      if (field == null) {
15471
        throw new IllegalArgumentException();
15472
      }
15473
 
15474
      switch (field) {
15475
      }
15476
      throw new IllegalStateException();
15477
    }
15478
 
15479
    @Override
15480
    public boolean equals(Object that) {
15481
      if (that == null)
15482
        return false;
15483
      if (that instanceof updateSupplier_result)
15484
        return this.equals((updateSupplier_result)that);
15485
      return false;
15486
    }
15487
 
15488
    public boolean equals(updateSupplier_result that) {
15489
      if (that == null)
15490
        return false;
15491
 
15492
      return true;
15493
    }
15494
 
15495
    @Override
15496
    public int hashCode() {
15497
      return 0;
15498
    }
15499
 
15500
    public int compareTo(updateSupplier_result other) {
15501
      if (!getClass().equals(other.getClass())) {
15502
        return getClass().getName().compareTo(other.getClass().getName());
15503
      }
15504
 
15505
      int lastComparison = 0;
15506
      updateSupplier_result typedOther = (updateSupplier_result)other;
15507
 
15508
      return 0;
15509
    }
15510
 
15511
    public _Fields fieldForId(int fieldId) {
15512
      return _Fields.findByThriftId(fieldId);
15513
    }
15514
 
15515
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15516
      org.apache.thrift.protocol.TField field;
15517
      iprot.readStructBegin();
15518
      while (true)
15519
      {
15520
        field = iprot.readFieldBegin();
15521
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15522
          break;
15523
        }
15524
        switch (field.id) {
15525
          default:
15526
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15527
        }
15528
        iprot.readFieldEnd();
15529
      }
15530
      iprot.readStructEnd();
15531
      validate();
15532
    }
15533
 
15534
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15535
      oprot.writeStructBegin(STRUCT_DESC);
15536
 
15537
      oprot.writeFieldStop();
15538
      oprot.writeStructEnd();
15539
    }
15540
 
15541
    @Override
15542
    public String toString() {
15543
      StringBuilder sb = new StringBuilder("updateSupplier_result(");
15544
      boolean first = true;
15545
 
15546
      sb.append(")");
15547
      return sb.toString();
15548
    }
15549
 
15550
    public void validate() throws org.apache.thrift.TException {
15551
      // check for required fields
15552
    }
15553
 
15554
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15555
      try {
15556
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15557
      } catch (org.apache.thrift.TException te) {
15558
        throw new java.io.IOException(te);
15559
      }
15560
    }
15561
 
15562
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15563
      try {
15564
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15565
      } catch (org.apache.thrift.TException te) {
15566
        throw new java.io.IOException(te);
15567
      }
15568
    }
15569
 
15570
  }
15571
 
6467 amar.kumar 15572
  public static class createPurchaseReturn_args implements org.apache.thrift.TBase<createPurchaseReturn_args, createPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
15573
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseReturn_args");
15574
 
15575
    private static final org.apache.thrift.protocol.TField PURCHASE_RETURN_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseReturn", org.apache.thrift.protocol.TType.STRUCT, (short)1);
15576
 
15577
    private PurchaseReturn purchaseReturn; // required
15578
 
15579
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15580
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15581
      PURCHASE_RETURN((short)1, "purchaseReturn");
15582
 
15583
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15584
 
15585
      static {
15586
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15587
          byName.put(field.getFieldName(), field);
15588
        }
15589
      }
15590
 
15591
      /**
15592
       * Find the _Fields constant that matches fieldId, or null if its not found.
15593
       */
15594
      public static _Fields findByThriftId(int fieldId) {
15595
        switch(fieldId) {
15596
          case 1: // PURCHASE_RETURN
15597
            return PURCHASE_RETURN;
15598
          default:
15599
            return null;
15600
        }
15601
      }
15602
 
15603
      /**
15604
       * Find the _Fields constant that matches fieldId, throwing an exception
15605
       * if it is not found.
15606
       */
15607
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15608
        _Fields fields = findByThriftId(fieldId);
15609
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15610
        return fields;
15611
      }
15612
 
15613
      /**
15614
       * Find the _Fields constant that matches name, or null if its not found.
15615
       */
15616
      public static _Fields findByName(String name) {
15617
        return byName.get(name);
15618
      }
15619
 
15620
      private final short _thriftId;
15621
      private final String _fieldName;
15622
 
15623
      _Fields(short thriftId, String fieldName) {
15624
        _thriftId = thriftId;
15625
        _fieldName = fieldName;
15626
      }
15627
 
15628
      public short getThriftFieldId() {
15629
        return _thriftId;
15630
      }
15631
 
15632
      public String getFieldName() {
15633
        return _fieldName;
15634
      }
15635
    }
15636
 
15637
    // isset id assignments
15638
 
15639
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15640
    static {
15641
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15642
      tmpMap.put(_Fields.PURCHASE_RETURN, new org.apache.thrift.meta_data.FieldMetaData("purchaseReturn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15643
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class)));
15644
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15645
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseReturn_args.class, metaDataMap);
15646
    }
15647
 
15648
    public createPurchaseReturn_args() {
15649
    }
15650
 
15651
    public createPurchaseReturn_args(
15652
      PurchaseReturn purchaseReturn)
15653
    {
15654
      this();
15655
      this.purchaseReturn = purchaseReturn;
15656
    }
15657
 
15658
    /**
15659
     * Performs a deep copy on <i>other</i>.
15660
     */
15661
    public createPurchaseReturn_args(createPurchaseReturn_args other) {
15662
      if (other.isSetPurchaseReturn()) {
15663
        this.purchaseReturn = new PurchaseReturn(other.purchaseReturn);
15664
      }
15665
    }
15666
 
15667
    public createPurchaseReturn_args deepCopy() {
15668
      return new createPurchaseReturn_args(this);
15669
    }
15670
 
15671
    @Override
15672
    public void clear() {
15673
      this.purchaseReturn = null;
15674
    }
15675
 
15676
    public PurchaseReturn getPurchaseReturn() {
15677
      return this.purchaseReturn;
15678
    }
15679
 
15680
    public void setPurchaseReturn(PurchaseReturn purchaseReturn) {
15681
      this.purchaseReturn = purchaseReturn;
15682
    }
15683
 
15684
    public void unsetPurchaseReturn() {
15685
      this.purchaseReturn = null;
15686
    }
15687
 
15688
    /** Returns true if field purchaseReturn is set (has been assigned a value) and false otherwise */
15689
    public boolean isSetPurchaseReturn() {
15690
      return this.purchaseReturn != null;
15691
    }
15692
 
15693
    public void setPurchaseReturnIsSet(boolean value) {
15694
      if (!value) {
15695
        this.purchaseReturn = null;
15696
      }
15697
    }
15698
 
15699
    public void setFieldValue(_Fields field, Object value) {
15700
      switch (field) {
15701
      case PURCHASE_RETURN:
15702
        if (value == null) {
15703
          unsetPurchaseReturn();
15704
        } else {
15705
          setPurchaseReturn((PurchaseReturn)value);
15706
        }
15707
        break;
15708
 
15709
      }
15710
    }
15711
 
15712
    public Object getFieldValue(_Fields field) {
15713
      switch (field) {
15714
      case PURCHASE_RETURN:
15715
        return getPurchaseReturn();
15716
 
15717
      }
15718
      throw new IllegalStateException();
15719
    }
15720
 
15721
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15722
    public boolean isSet(_Fields field) {
15723
      if (field == null) {
15724
        throw new IllegalArgumentException();
15725
      }
15726
 
15727
      switch (field) {
15728
      case PURCHASE_RETURN:
15729
        return isSetPurchaseReturn();
15730
      }
15731
      throw new IllegalStateException();
15732
    }
15733
 
15734
    @Override
15735
    public boolean equals(Object that) {
15736
      if (that == null)
15737
        return false;
15738
      if (that instanceof createPurchaseReturn_args)
15739
        return this.equals((createPurchaseReturn_args)that);
15740
      return false;
15741
    }
15742
 
15743
    public boolean equals(createPurchaseReturn_args that) {
15744
      if (that == null)
15745
        return false;
15746
 
15747
      boolean this_present_purchaseReturn = true && this.isSetPurchaseReturn();
15748
      boolean that_present_purchaseReturn = true && that.isSetPurchaseReturn();
15749
      if (this_present_purchaseReturn || that_present_purchaseReturn) {
15750
        if (!(this_present_purchaseReturn && that_present_purchaseReturn))
15751
          return false;
15752
        if (!this.purchaseReturn.equals(that.purchaseReturn))
15753
          return false;
15754
      }
15755
 
15756
      return true;
15757
    }
15758
 
15759
    @Override
15760
    public int hashCode() {
15761
      return 0;
15762
    }
15763
 
15764
    public int compareTo(createPurchaseReturn_args other) {
15765
      if (!getClass().equals(other.getClass())) {
15766
        return getClass().getName().compareTo(other.getClass().getName());
15767
      }
15768
 
15769
      int lastComparison = 0;
15770
      createPurchaseReturn_args typedOther = (createPurchaseReturn_args)other;
15771
 
15772
      lastComparison = Boolean.valueOf(isSetPurchaseReturn()).compareTo(typedOther.isSetPurchaseReturn());
15773
      if (lastComparison != 0) {
15774
        return lastComparison;
15775
      }
15776
      if (isSetPurchaseReturn()) {
15777
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseReturn, typedOther.purchaseReturn);
15778
        if (lastComparison != 0) {
15779
          return lastComparison;
15780
        }
15781
      }
15782
      return 0;
15783
    }
15784
 
15785
    public _Fields fieldForId(int fieldId) {
15786
      return _Fields.findByThriftId(fieldId);
15787
    }
15788
 
15789
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15790
      org.apache.thrift.protocol.TField field;
15791
      iprot.readStructBegin();
15792
      while (true)
15793
      {
15794
        field = iprot.readFieldBegin();
15795
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15796
          break;
15797
        }
15798
        switch (field.id) {
15799
          case 1: // PURCHASE_RETURN
15800
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15801
              this.purchaseReturn = new PurchaseReturn();
15802
              this.purchaseReturn.read(iprot);
15803
            } else { 
15804
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15805
            }
15806
            break;
15807
          default:
15808
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15809
        }
15810
        iprot.readFieldEnd();
15811
      }
15812
      iprot.readStructEnd();
15813
      validate();
15814
    }
15815
 
15816
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15817
      validate();
15818
 
15819
      oprot.writeStructBegin(STRUCT_DESC);
15820
      if (this.purchaseReturn != null) {
15821
        oprot.writeFieldBegin(PURCHASE_RETURN_FIELD_DESC);
15822
        this.purchaseReturn.write(oprot);
15823
        oprot.writeFieldEnd();
15824
      }
15825
      oprot.writeFieldStop();
15826
      oprot.writeStructEnd();
15827
    }
15828
 
15829
    @Override
15830
    public String toString() {
15831
      StringBuilder sb = new StringBuilder("createPurchaseReturn_args(");
15832
      boolean first = true;
15833
 
15834
      sb.append("purchaseReturn:");
15835
      if (this.purchaseReturn == null) {
15836
        sb.append("null");
15837
      } else {
15838
        sb.append(this.purchaseReturn);
15839
      }
15840
      first = false;
15841
      sb.append(")");
15842
      return sb.toString();
15843
    }
15844
 
15845
    public void validate() throws org.apache.thrift.TException {
15846
      // check for required fields
15847
    }
15848
 
15849
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15850
      try {
15851
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15852
      } catch (org.apache.thrift.TException te) {
15853
        throw new java.io.IOException(te);
15854
      }
15855
    }
15856
 
15857
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15858
      try {
15859
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15860
      } catch (org.apache.thrift.TException te) {
15861
        throw new java.io.IOException(te);
15862
      }
15863
    }
15864
 
15865
  }
15866
 
15867
  public static class createPurchaseReturn_result implements org.apache.thrift.TBase<createPurchaseReturn_result, createPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
15868
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseReturn_result");
15869
 
15870
    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);
15871
 
15872
    private long success; // required
15873
 
15874
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15875
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15876
      SUCCESS((short)0, "success");
15877
 
15878
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15879
 
15880
      static {
15881
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15882
          byName.put(field.getFieldName(), field);
15883
        }
15884
      }
15885
 
15886
      /**
15887
       * Find the _Fields constant that matches fieldId, or null if its not found.
15888
       */
15889
      public static _Fields findByThriftId(int fieldId) {
15890
        switch(fieldId) {
15891
          case 0: // SUCCESS
15892
            return SUCCESS;
15893
          default:
15894
            return null;
15895
        }
15896
      }
15897
 
15898
      /**
15899
       * Find the _Fields constant that matches fieldId, throwing an exception
15900
       * if it is not found.
15901
       */
15902
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15903
        _Fields fields = findByThriftId(fieldId);
15904
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15905
        return fields;
15906
      }
15907
 
15908
      /**
15909
       * Find the _Fields constant that matches name, or null if its not found.
15910
       */
15911
      public static _Fields findByName(String name) {
15912
        return byName.get(name);
15913
      }
15914
 
15915
      private final short _thriftId;
15916
      private final String _fieldName;
15917
 
15918
      _Fields(short thriftId, String fieldName) {
15919
        _thriftId = thriftId;
15920
        _fieldName = fieldName;
15921
      }
15922
 
15923
      public short getThriftFieldId() {
15924
        return _thriftId;
15925
      }
15926
 
15927
      public String getFieldName() {
15928
        return _fieldName;
15929
      }
15930
    }
15931
 
15932
    // isset id assignments
15933
    private static final int __SUCCESS_ISSET_ID = 0;
15934
    private BitSet __isset_bit_vector = new BitSet(1);
15935
 
15936
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15937
    static {
15938
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15939
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15940
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
15941
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15942
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseReturn_result.class, metaDataMap);
15943
    }
15944
 
15945
    public createPurchaseReturn_result() {
15946
    }
15947
 
15948
    public createPurchaseReturn_result(
15949
      long success)
15950
    {
15951
      this();
15952
      this.success = success;
15953
      setSuccessIsSet(true);
15954
    }
15955
 
15956
    /**
15957
     * Performs a deep copy on <i>other</i>.
15958
     */
15959
    public createPurchaseReturn_result(createPurchaseReturn_result other) {
15960
      __isset_bit_vector.clear();
15961
      __isset_bit_vector.or(other.__isset_bit_vector);
15962
      this.success = other.success;
15963
    }
15964
 
15965
    public createPurchaseReturn_result deepCopy() {
15966
      return new createPurchaseReturn_result(this);
15967
    }
15968
 
15969
    @Override
15970
    public void clear() {
15971
      setSuccessIsSet(false);
15972
      this.success = 0;
15973
    }
15974
 
15975
    public long getSuccess() {
15976
      return this.success;
15977
    }
15978
 
15979
    public void setSuccess(long success) {
15980
      this.success = success;
15981
      setSuccessIsSet(true);
15982
    }
15983
 
15984
    public void unsetSuccess() {
15985
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15986
    }
15987
 
15988
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
15989
    public boolean isSetSuccess() {
15990
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15991
    }
15992
 
15993
    public void setSuccessIsSet(boolean value) {
15994
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15995
    }
15996
 
15997
    public void setFieldValue(_Fields field, Object value) {
15998
      switch (field) {
15999
      case SUCCESS:
16000
        if (value == null) {
16001
          unsetSuccess();
16002
        } else {
16003
          setSuccess((Long)value);
16004
        }
16005
        break;
16006
 
16007
      }
16008
    }
16009
 
16010
    public Object getFieldValue(_Fields field) {
16011
      switch (field) {
16012
      case SUCCESS:
16013
        return Long.valueOf(getSuccess());
16014
 
16015
      }
16016
      throw new IllegalStateException();
16017
    }
16018
 
16019
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16020
    public boolean isSet(_Fields field) {
16021
      if (field == null) {
16022
        throw new IllegalArgumentException();
16023
      }
16024
 
16025
      switch (field) {
16026
      case SUCCESS:
16027
        return isSetSuccess();
16028
      }
16029
      throw new IllegalStateException();
16030
    }
16031
 
16032
    @Override
16033
    public boolean equals(Object that) {
16034
      if (that == null)
16035
        return false;
16036
      if (that instanceof createPurchaseReturn_result)
16037
        return this.equals((createPurchaseReturn_result)that);
16038
      return false;
16039
    }
16040
 
16041
    public boolean equals(createPurchaseReturn_result that) {
16042
      if (that == null)
16043
        return false;
16044
 
16045
      boolean this_present_success = true;
16046
      boolean that_present_success = true;
16047
      if (this_present_success || that_present_success) {
16048
        if (!(this_present_success && that_present_success))
16049
          return false;
16050
        if (this.success != that.success)
16051
          return false;
16052
      }
16053
 
16054
      return true;
16055
    }
16056
 
16057
    @Override
16058
    public int hashCode() {
16059
      return 0;
16060
    }
16061
 
16062
    public int compareTo(createPurchaseReturn_result other) {
16063
      if (!getClass().equals(other.getClass())) {
16064
        return getClass().getName().compareTo(other.getClass().getName());
16065
      }
16066
 
16067
      int lastComparison = 0;
16068
      createPurchaseReturn_result typedOther = (createPurchaseReturn_result)other;
16069
 
16070
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
16071
      if (lastComparison != 0) {
16072
        return lastComparison;
16073
      }
16074
      if (isSetSuccess()) {
16075
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
16076
        if (lastComparison != 0) {
16077
          return lastComparison;
16078
        }
16079
      }
16080
      return 0;
16081
    }
16082
 
16083
    public _Fields fieldForId(int fieldId) {
16084
      return _Fields.findByThriftId(fieldId);
16085
    }
16086
 
16087
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16088
      org.apache.thrift.protocol.TField field;
16089
      iprot.readStructBegin();
16090
      while (true)
16091
      {
16092
        field = iprot.readFieldBegin();
16093
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16094
          break;
16095
        }
16096
        switch (field.id) {
16097
          case 0: // SUCCESS
16098
            if (field.type == org.apache.thrift.protocol.TType.I64) {
16099
              this.success = iprot.readI64();
16100
              setSuccessIsSet(true);
16101
            } else { 
16102
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16103
            }
16104
            break;
16105
          default:
16106
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16107
        }
16108
        iprot.readFieldEnd();
16109
      }
16110
      iprot.readStructEnd();
16111
      validate();
16112
    }
16113
 
16114
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16115
      oprot.writeStructBegin(STRUCT_DESC);
16116
 
16117
      if (this.isSetSuccess()) {
16118
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16119
        oprot.writeI64(this.success);
16120
        oprot.writeFieldEnd();
16121
      }
16122
      oprot.writeFieldStop();
16123
      oprot.writeStructEnd();
16124
    }
16125
 
16126
    @Override
16127
    public String toString() {
16128
      StringBuilder sb = new StringBuilder("createPurchaseReturn_result(");
16129
      boolean first = true;
16130
 
16131
      sb.append("success:");
16132
      sb.append(this.success);
16133
      first = false;
16134
      sb.append(")");
16135
      return sb.toString();
16136
    }
16137
 
16138
    public void validate() throws org.apache.thrift.TException {
16139
      // check for required fields
16140
    }
16141
 
16142
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16143
      try {
16144
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16145
      } catch (org.apache.thrift.TException te) {
16146
        throw new java.io.IOException(te);
16147
      }
16148
    }
16149
 
16150
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16151
      try {
16152
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16153
      } catch (org.apache.thrift.TException te) {
16154
        throw new java.io.IOException(te);
16155
      }
16156
    }
16157
 
16158
  }
16159
 
16160
  public static class settlePurchaseReturn_args implements org.apache.thrift.TBase<settlePurchaseReturn_args, settlePurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
16161
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("settlePurchaseReturn_args");
16162
 
16163
    private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);
16164
 
16165
    private long id; // required
16166
 
16167
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16168
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16169
      ID((short)1, "id");
16170
 
16171
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16172
 
16173
      static {
16174
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16175
          byName.put(field.getFieldName(), field);
16176
        }
16177
      }
16178
 
16179
      /**
16180
       * Find the _Fields constant that matches fieldId, or null if its not found.
16181
       */
16182
      public static _Fields findByThriftId(int fieldId) {
16183
        switch(fieldId) {
16184
          case 1: // ID
16185
            return ID;
16186
          default:
16187
            return null;
16188
        }
16189
      }
16190
 
16191
      /**
16192
       * Find the _Fields constant that matches fieldId, throwing an exception
16193
       * if it is not found.
16194
       */
16195
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16196
        _Fields fields = findByThriftId(fieldId);
16197
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16198
        return fields;
16199
      }
16200
 
16201
      /**
16202
       * Find the _Fields constant that matches name, or null if its not found.
16203
       */
16204
      public static _Fields findByName(String name) {
16205
        return byName.get(name);
16206
      }
16207
 
16208
      private final short _thriftId;
16209
      private final String _fieldName;
16210
 
16211
      _Fields(short thriftId, String fieldName) {
16212
        _thriftId = thriftId;
16213
        _fieldName = fieldName;
16214
      }
16215
 
16216
      public short getThriftFieldId() {
16217
        return _thriftId;
16218
      }
16219
 
16220
      public String getFieldName() {
16221
        return _fieldName;
16222
      }
16223
    }
16224
 
16225
    // isset id assignments
16226
    private static final int __ID_ISSET_ID = 0;
16227
    private BitSet __isset_bit_vector = new BitSet(1);
16228
 
16229
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16230
    static {
16231
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16232
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16233
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
16234
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16235
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(settlePurchaseReturn_args.class, metaDataMap);
16236
    }
16237
 
16238
    public settlePurchaseReturn_args() {
16239
    }
16240
 
16241
    public settlePurchaseReturn_args(
16242
      long id)
16243
    {
16244
      this();
16245
      this.id = id;
16246
      setIdIsSet(true);
16247
    }
16248
 
16249
    /**
16250
     * Performs a deep copy on <i>other</i>.
16251
     */
16252
    public settlePurchaseReturn_args(settlePurchaseReturn_args other) {
16253
      __isset_bit_vector.clear();
16254
      __isset_bit_vector.or(other.__isset_bit_vector);
16255
      this.id = other.id;
16256
    }
16257
 
16258
    public settlePurchaseReturn_args deepCopy() {
16259
      return new settlePurchaseReturn_args(this);
16260
    }
16261
 
16262
    @Override
16263
    public void clear() {
16264
      setIdIsSet(false);
16265
      this.id = 0;
16266
    }
16267
 
16268
    public long getId() {
16269
      return this.id;
16270
    }
16271
 
16272
    public void setId(long id) {
16273
      this.id = id;
16274
      setIdIsSet(true);
16275
    }
16276
 
16277
    public void unsetId() {
16278
      __isset_bit_vector.clear(__ID_ISSET_ID);
16279
    }
16280
 
16281
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
16282
    public boolean isSetId() {
16283
      return __isset_bit_vector.get(__ID_ISSET_ID);
16284
    }
16285
 
16286
    public void setIdIsSet(boolean value) {
16287
      __isset_bit_vector.set(__ID_ISSET_ID, value);
16288
    }
16289
 
16290
    public void setFieldValue(_Fields field, Object value) {
16291
      switch (field) {
16292
      case ID:
16293
        if (value == null) {
16294
          unsetId();
16295
        } else {
16296
          setId((Long)value);
16297
        }
16298
        break;
16299
 
16300
      }
16301
    }
16302
 
16303
    public Object getFieldValue(_Fields field) {
16304
      switch (field) {
16305
      case ID:
16306
        return Long.valueOf(getId());
16307
 
16308
      }
16309
      throw new IllegalStateException();
16310
    }
16311
 
16312
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16313
    public boolean isSet(_Fields field) {
16314
      if (field == null) {
16315
        throw new IllegalArgumentException();
16316
      }
16317
 
16318
      switch (field) {
16319
      case ID:
16320
        return isSetId();
16321
      }
16322
      throw new IllegalStateException();
16323
    }
16324
 
16325
    @Override
16326
    public boolean equals(Object that) {
16327
      if (that == null)
16328
        return false;
16329
      if (that instanceof settlePurchaseReturn_args)
16330
        return this.equals((settlePurchaseReturn_args)that);
16331
      return false;
16332
    }
16333
 
16334
    public boolean equals(settlePurchaseReturn_args that) {
16335
      if (that == null)
16336
        return false;
16337
 
16338
      boolean this_present_id = true;
16339
      boolean that_present_id = true;
16340
      if (this_present_id || that_present_id) {
16341
        if (!(this_present_id && that_present_id))
16342
          return false;
16343
        if (this.id != that.id)
16344
          return false;
16345
      }
16346
 
16347
      return true;
16348
    }
16349
 
16350
    @Override
16351
    public int hashCode() {
16352
      return 0;
16353
    }
16354
 
16355
    public int compareTo(settlePurchaseReturn_args other) {
16356
      if (!getClass().equals(other.getClass())) {
16357
        return getClass().getName().compareTo(other.getClass().getName());
16358
      }
16359
 
16360
      int lastComparison = 0;
16361
      settlePurchaseReturn_args typedOther = (settlePurchaseReturn_args)other;
16362
 
16363
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
16364
      if (lastComparison != 0) {
16365
        return lastComparison;
16366
      }
16367
      if (isSetId()) {
16368
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
16369
        if (lastComparison != 0) {
16370
          return lastComparison;
16371
        }
16372
      }
16373
      return 0;
16374
    }
16375
 
16376
    public _Fields fieldForId(int fieldId) {
16377
      return _Fields.findByThriftId(fieldId);
16378
    }
16379
 
16380
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16381
      org.apache.thrift.protocol.TField field;
16382
      iprot.readStructBegin();
16383
      while (true)
16384
      {
16385
        field = iprot.readFieldBegin();
16386
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16387
          break;
16388
        }
16389
        switch (field.id) {
16390
          case 1: // ID
16391
            if (field.type == org.apache.thrift.protocol.TType.I64) {
16392
              this.id = iprot.readI64();
16393
              setIdIsSet(true);
16394
            } else { 
16395
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16396
            }
16397
            break;
16398
          default:
16399
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16400
        }
16401
        iprot.readFieldEnd();
16402
      }
16403
      iprot.readStructEnd();
16404
      validate();
16405
    }
16406
 
16407
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16408
      validate();
16409
 
16410
      oprot.writeStructBegin(STRUCT_DESC);
16411
      oprot.writeFieldBegin(ID_FIELD_DESC);
16412
      oprot.writeI64(this.id);
16413
      oprot.writeFieldEnd();
16414
      oprot.writeFieldStop();
16415
      oprot.writeStructEnd();
16416
    }
16417
 
16418
    @Override
16419
    public String toString() {
16420
      StringBuilder sb = new StringBuilder("settlePurchaseReturn_args(");
16421
      boolean first = true;
16422
 
16423
      sb.append("id:");
16424
      sb.append(this.id);
16425
      first = false;
16426
      sb.append(")");
16427
      return sb.toString();
16428
    }
16429
 
16430
    public void validate() throws org.apache.thrift.TException {
16431
      // check for required fields
16432
    }
16433
 
16434
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16435
      try {
16436
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16437
      } catch (org.apache.thrift.TException te) {
16438
        throw new java.io.IOException(te);
16439
      }
16440
    }
16441
 
16442
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16443
      try {
16444
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
16445
        __isset_bit_vector = new BitSet(1);
16446
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16447
      } catch (org.apache.thrift.TException te) {
16448
        throw new java.io.IOException(te);
16449
      }
16450
    }
16451
 
16452
  }
16453
 
16454
  public static class settlePurchaseReturn_result implements org.apache.thrift.TBase<settlePurchaseReturn_result, settlePurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
16455
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("settlePurchaseReturn_result");
16456
 
16457
 
16458
 
16459
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16460
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16461
;
16462
 
16463
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16464
 
16465
      static {
16466
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16467
          byName.put(field.getFieldName(), field);
16468
        }
16469
      }
16470
 
16471
      /**
16472
       * Find the _Fields constant that matches fieldId, or null if its not found.
16473
       */
16474
      public static _Fields findByThriftId(int fieldId) {
16475
        switch(fieldId) {
16476
          default:
16477
            return null;
16478
        }
16479
      }
16480
 
16481
      /**
16482
       * Find the _Fields constant that matches fieldId, throwing an exception
16483
       * if it is not found.
16484
       */
16485
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16486
        _Fields fields = findByThriftId(fieldId);
16487
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16488
        return fields;
16489
      }
16490
 
16491
      /**
16492
       * Find the _Fields constant that matches name, or null if its not found.
16493
       */
16494
      public static _Fields findByName(String name) {
16495
        return byName.get(name);
16496
      }
16497
 
16498
      private final short _thriftId;
16499
      private final String _fieldName;
16500
 
16501
      _Fields(short thriftId, String fieldName) {
16502
        _thriftId = thriftId;
16503
        _fieldName = fieldName;
16504
      }
16505
 
16506
      public short getThriftFieldId() {
16507
        return _thriftId;
16508
      }
16509
 
16510
      public String getFieldName() {
16511
        return _fieldName;
16512
      }
16513
    }
16514
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16515
    static {
16516
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16517
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16518
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(settlePurchaseReturn_result.class, metaDataMap);
16519
    }
16520
 
16521
    public settlePurchaseReturn_result() {
16522
    }
16523
 
16524
    /**
16525
     * Performs a deep copy on <i>other</i>.
16526
     */
16527
    public settlePurchaseReturn_result(settlePurchaseReturn_result other) {
16528
    }
16529
 
16530
    public settlePurchaseReturn_result deepCopy() {
16531
      return new settlePurchaseReturn_result(this);
16532
    }
16533
 
16534
    @Override
16535
    public void clear() {
16536
    }
16537
 
16538
    public void setFieldValue(_Fields field, Object value) {
16539
      switch (field) {
16540
      }
16541
    }
16542
 
16543
    public Object getFieldValue(_Fields field) {
16544
      switch (field) {
16545
      }
16546
      throw new IllegalStateException();
16547
    }
16548
 
16549
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16550
    public boolean isSet(_Fields field) {
16551
      if (field == null) {
16552
        throw new IllegalArgumentException();
16553
      }
16554
 
16555
      switch (field) {
16556
      }
16557
      throw new IllegalStateException();
16558
    }
16559
 
16560
    @Override
16561
    public boolean equals(Object that) {
16562
      if (that == null)
16563
        return false;
16564
      if (that instanceof settlePurchaseReturn_result)
16565
        return this.equals((settlePurchaseReturn_result)that);
16566
      return false;
16567
    }
16568
 
16569
    public boolean equals(settlePurchaseReturn_result that) {
16570
      if (that == null)
16571
        return false;
16572
 
16573
      return true;
16574
    }
16575
 
16576
    @Override
16577
    public int hashCode() {
16578
      return 0;
16579
    }
16580
 
16581
    public int compareTo(settlePurchaseReturn_result other) {
16582
      if (!getClass().equals(other.getClass())) {
16583
        return getClass().getName().compareTo(other.getClass().getName());
16584
      }
16585
 
16586
      int lastComparison = 0;
16587
      settlePurchaseReturn_result typedOther = (settlePurchaseReturn_result)other;
16588
 
16589
      return 0;
16590
    }
16591
 
16592
    public _Fields fieldForId(int fieldId) {
16593
      return _Fields.findByThriftId(fieldId);
16594
    }
16595
 
16596
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16597
      org.apache.thrift.protocol.TField field;
16598
      iprot.readStructBegin();
16599
      while (true)
16600
      {
16601
        field = iprot.readFieldBegin();
16602
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16603
          break;
16604
        }
16605
        switch (field.id) {
16606
          default:
16607
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16608
        }
16609
        iprot.readFieldEnd();
16610
      }
16611
      iprot.readStructEnd();
16612
      validate();
16613
    }
16614
 
16615
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16616
      oprot.writeStructBegin(STRUCT_DESC);
16617
 
16618
      oprot.writeFieldStop();
16619
      oprot.writeStructEnd();
16620
    }
16621
 
16622
    @Override
16623
    public String toString() {
16624
      StringBuilder sb = new StringBuilder("settlePurchaseReturn_result(");
16625
      boolean first = true;
16626
 
16627
      sb.append(")");
16628
      return sb.toString();
16629
    }
16630
 
16631
    public void validate() throws org.apache.thrift.TException {
16632
      // check for required fields
16633
    }
16634
 
16635
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16636
      try {
16637
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16638
      } catch (org.apache.thrift.TException te) {
16639
        throw new java.io.IOException(te);
16640
      }
16641
    }
16642
 
16643
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16644
      try {
16645
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16646
      } catch (org.apache.thrift.TException te) {
16647
        throw new java.io.IOException(te);
16648
      }
16649
    }
16650
 
16651
  }
16652
 
16653
  public static class getUnsettledPurchaseReturns_args implements org.apache.thrift.TBase<getUnsettledPurchaseReturns_args, getUnsettledPurchaseReturns_args._Fields>, java.io.Serializable, Cloneable   {
16654
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUnsettledPurchaseReturns_args");
16655
 
16656
 
16657
 
16658
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16659
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16660
;
16661
 
16662
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16663
 
16664
      static {
16665
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16666
          byName.put(field.getFieldName(), field);
16667
        }
16668
      }
16669
 
16670
      /**
16671
       * Find the _Fields constant that matches fieldId, or null if its not found.
16672
       */
16673
      public static _Fields findByThriftId(int fieldId) {
16674
        switch(fieldId) {
16675
          default:
16676
            return null;
16677
        }
16678
      }
16679
 
16680
      /**
16681
       * Find the _Fields constant that matches fieldId, throwing an exception
16682
       * if it is not found.
16683
       */
16684
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16685
        _Fields fields = findByThriftId(fieldId);
16686
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16687
        return fields;
16688
      }
16689
 
16690
      /**
16691
       * Find the _Fields constant that matches name, or null if its not found.
16692
       */
16693
      public static _Fields findByName(String name) {
16694
        return byName.get(name);
16695
      }
16696
 
16697
      private final short _thriftId;
16698
      private final String _fieldName;
16699
 
16700
      _Fields(short thriftId, String fieldName) {
16701
        _thriftId = thriftId;
16702
        _fieldName = fieldName;
16703
      }
16704
 
16705
      public short getThriftFieldId() {
16706
        return _thriftId;
16707
      }
16708
 
16709
      public String getFieldName() {
16710
        return _fieldName;
16711
      }
16712
    }
16713
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16714
    static {
16715
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16716
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16717
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUnsettledPurchaseReturns_args.class, metaDataMap);
16718
    }
16719
 
16720
    public getUnsettledPurchaseReturns_args() {
16721
    }
16722
 
16723
    /**
16724
     * Performs a deep copy on <i>other</i>.
16725
     */
16726
    public getUnsettledPurchaseReturns_args(getUnsettledPurchaseReturns_args other) {
16727
    }
16728
 
16729
    public getUnsettledPurchaseReturns_args deepCopy() {
16730
      return new getUnsettledPurchaseReturns_args(this);
16731
    }
16732
 
16733
    @Override
16734
    public void clear() {
16735
    }
16736
 
16737
    public void setFieldValue(_Fields field, Object value) {
16738
      switch (field) {
16739
      }
16740
    }
16741
 
16742
    public Object getFieldValue(_Fields field) {
16743
      switch (field) {
16744
      }
16745
      throw new IllegalStateException();
16746
    }
16747
 
16748
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16749
    public boolean isSet(_Fields field) {
16750
      if (field == null) {
16751
        throw new IllegalArgumentException();
16752
      }
16753
 
16754
      switch (field) {
16755
      }
16756
      throw new IllegalStateException();
16757
    }
16758
 
16759
    @Override
16760
    public boolean equals(Object that) {
16761
      if (that == null)
16762
        return false;
16763
      if (that instanceof getUnsettledPurchaseReturns_args)
16764
        return this.equals((getUnsettledPurchaseReturns_args)that);
16765
      return false;
16766
    }
16767
 
16768
    public boolean equals(getUnsettledPurchaseReturns_args that) {
16769
      if (that == null)
16770
        return false;
16771
 
16772
      return true;
16773
    }
16774
 
16775
    @Override
16776
    public int hashCode() {
16777
      return 0;
16778
    }
16779
 
16780
    public int compareTo(getUnsettledPurchaseReturns_args other) {
16781
      if (!getClass().equals(other.getClass())) {
16782
        return getClass().getName().compareTo(other.getClass().getName());
16783
      }
16784
 
16785
      int lastComparison = 0;
16786
      getUnsettledPurchaseReturns_args typedOther = (getUnsettledPurchaseReturns_args)other;
16787
 
16788
      return 0;
16789
    }
16790
 
16791
    public _Fields fieldForId(int fieldId) {
16792
      return _Fields.findByThriftId(fieldId);
16793
    }
16794
 
16795
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16796
      org.apache.thrift.protocol.TField field;
16797
      iprot.readStructBegin();
16798
      while (true)
16799
      {
16800
        field = iprot.readFieldBegin();
16801
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16802
          break;
16803
        }
16804
        switch (field.id) {
16805
          default:
16806
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16807
        }
16808
        iprot.readFieldEnd();
16809
      }
16810
      iprot.readStructEnd();
16811
      validate();
16812
    }
16813
 
16814
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16815
      validate();
16816
 
16817
      oprot.writeStructBegin(STRUCT_DESC);
16818
      oprot.writeFieldStop();
16819
      oprot.writeStructEnd();
16820
    }
16821
 
16822
    @Override
16823
    public String toString() {
16824
      StringBuilder sb = new StringBuilder("getUnsettledPurchaseReturns_args(");
16825
      boolean first = true;
16826
 
16827
      sb.append(")");
16828
      return sb.toString();
16829
    }
16830
 
16831
    public void validate() throws org.apache.thrift.TException {
16832
      // check for required fields
16833
    }
16834
 
16835
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16836
      try {
16837
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16838
      } catch (org.apache.thrift.TException te) {
16839
        throw new java.io.IOException(te);
16840
      }
16841
    }
16842
 
16843
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16844
      try {
16845
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16846
      } catch (org.apache.thrift.TException te) {
16847
        throw new java.io.IOException(te);
16848
      }
16849
    }
16850
 
16851
  }
16852
 
16853
  public static class getUnsettledPurchaseReturns_result implements org.apache.thrift.TBase<getUnsettledPurchaseReturns_result, getUnsettledPurchaseReturns_result._Fields>, java.io.Serializable, Cloneable   {
16854
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUnsettledPurchaseReturns_result");
16855
 
16856
    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);
16857
 
16858
    private List<PurchaseReturn> success; // required
16859
 
16860
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16861
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16862
      SUCCESS((short)0, "success");
16863
 
16864
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16865
 
16866
      static {
16867
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16868
          byName.put(field.getFieldName(), field);
16869
        }
16870
      }
16871
 
16872
      /**
16873
       * Find the _Fields constant that matches fieldId, or null if its not found.
16874
       */
16875
      public static _Fields findByThriftId(int fieldId) {
16876
        switch(fieldId) {
16877
          case 0: // SUCCESS
16878
            return SUCCESS;
16879
          default:
16880
            return null;
16881
        }
16882
      }
16883
 
16884
      /**
16885
       * Find the _Fields constant that matches fieldId, throwing an exception
16886
       * if it is not found.
16887
       */
16888
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16889
        _Fields fields = findByThriftId(fieldId);
16890
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16891
        return fields;
16892
      }
16893
 
16894
      /**
16895
       * Find the _Fields constant that matches name, or null if its not found.
16896
       */
16897
      public static _Fields findByName(String name) {
16898
        return byName.get(name);
16899
      }
16900
 
16901
      private final short _thriftId;
16902
      private final String _fieldName;
16903
 
16904
      _Fields(short thriftId, String fieldName) {
16905
        _thriftId = thriftId;
16906
        _fieldName = fieldName;
16907
      }
16908
 
16909
      public short getThriftFieldId() {
16910
        return _thriftId;
16911
      }
16912
 
16913
      public String getFieldName() {
16914
        return _fieldName;
16915
      }
16916
    }
16917
 
16918
    // isset id assignments
16919
 
16920
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16921
    static {
16922
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16923
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16924
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
16925
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class))));
16926
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16927
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUnsettledPurchaseReturns_result.class, metaDataMap);
16928
    }
16929
 
16930
    public getUnsettledPurchaseReturns_result() {
16931
    }
16932
 
16933
    public getUnsettledPurchaseReturns_result(
16934
      List<PurchaseReturn> success)
16935
    {
16936
      this();
16937
      this.success = success;
16938
    }
16939
 
16940
    /**
16941
     * Performs a deep copy on <i>other</i>.
16942
     */
16943
    public getUnsettledPurchaseReturns_result(getUnsettledPurchaseReturns_result other) {
16944
      if (other.isSetSuccess()) {
16945
        List<PurchaseReturn> __this__success = new ArrayList<PurchaseReturn>();
16946
        for (PurchaseReturn other_element : other.success) {
16947
          __this__success.add(new PurchaseReturn(other_element));
16948
        }
16949
        this.success = __this__success;
16950
      }
16951
    }
16952
 
16953
    public getUnsettledPurchaseReturns_result deepCopy() {
16954
      return new getUnsettledPurchaseReturns_result(this);
16955
    }
16956
 
16957
    @Override
16958
    public void clear() {
16959
      this.success = null;
16960
    }
16961
 
16962
    public int getSuccessSize() {
16963
      return (this.success == null) ? 0 : this.success.size();
16964
    }
16965
 
16966
    public java.util.Iterator<PurchaseReturn> getSuccessIterator() {
16967
      return (this.success == null) ? null : this.success.iterator();
16968
    }
16969
 
16970
    public void addToSuccess(PurchaseReturn elem) {
16971
      if (this.success == null) {
16972
        this.success = new ArrayList<PurchaseReturn>();
16973
      }
16974
      this.success.add(elem);
16975
    }
16976
 
16977
    public List<PurchaseReturn> getSuccess() {
16978
      return this.success;
16979
    }
16980
 
16981
    public void setSuccess(List<PurchaseReturn> success) {
16982
      this.success = success;
16983
    }
16984
 
16985
    public void unsetSuccess() {
16986
      this.success = null;
16987
    }
16988
 
16989
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
16990
    public boolean isSetSuccess() {
16991
      return this.success != null;
16992
    }
16993
 
16994
    public void setSuccessIsSet(boolean value) {
16995
      if (!value) {
16996
        this.success = null;
16997
      }
16998
    }
16999
 
17000
    public void setFieldValue(_Fields field, Object value) {
17001
      switch (field) {
17002
      case SUCCESS:
17003
        if (value == null) {
17004
          unsetSuccess();
17005
        } else {
17006
          setSuccess((List<PurchaseReturn>)value);
17007
        }
17008
        break;
17009
 
17010
      }
17011
    }
17012
 
17013
    public Object getFieldValue(_Fields field) {
17014
      switch (field) {
17015
      case SUCCESS:
17016
        return getSuccess();
17017
 
17018
      }
17019
      throw new IllegalStateException();
17020
    }
17021
 
17022
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17023
    public boolean isSet(_Fields field) {
17024
      if (field == null) {
17025
        throw new IllegalArgumentException();
17026
      }
17027
 
17028
      switch (field) {
17029
      case SUCCESS:
17030
        return isSetSuccess();
17031
      }
17032
      throw new IllegalStateException();
17033
    }
17034
 
17035
    @Override
17036
    public boolean equals(Object that) {
17037
      if (that == null)
17038
        return false;
17039
      if (that instanceof getUnsettledPurchaseReturns_result)
17040
        return this.equals((getUnsettledPurchaseReturns_result)that);
17041
      return false;
17042
    }
17043
 
17044
    public boolean equals(getUnsettledPurchaseReturns_result that) {
17045
      if (that == null)
17046
        return false;
17047
 
17048
      boolean this_present_success = true && this.isSetSuccess();
17049
      boolean that_present_success = true && that.isSetSuccess();
17050
      if (this_present_success || that_present_success) {
17051
        if (!(this_present_success && that_present_success))
17052
          return false;
17053
        if (!this.success.equals(that.success))
17054
          return false;
17055
      }
17056
 
17057
      return true;
17058
    }
17059
 
17060
    @Override
17061
    public int hashCode() {
17062
      return 0;
17063
    }
17064
 
17065
    public int compareTo(getUnsettledPurchaseReturns_result other) {
17066
      if (!getClass().equals(other.getClass())) {
17067
        return getClass().getName().compareTo(other.getClass().getName());
17068
      }
17069
 
17070
      int lastComparison = 0;
17071
      getUnsettledPurchaseReturns_result typedOther = (getUnsettledPurchaseReturns_result)other;
17072
 
17073
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
17074
      if (lastComparison != 0) {
17075
        return lastComparison;
17076
      }
17077
      if (isSetSuccess()) {
17078
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
17079
        if (lastComparison != 0) {
17080
          return lastComparison;
17081
        }
17082
      }
17083
      return 0;
17084
    }
17085
 
17086
    public _Fields fieldForId(int fieldId) {
17087
      return _Fields.findByThriftId(fieldId);
17088
    }
17089
 
17090
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17091
      org.apache.thrift.protocol.TField field;
17092
      iprot.readStructBegin();
17093
      while (true)
17094
      {
17095
        field = iprot.readFieldBegin();
17096
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17097
          break;
17098
        }
17099
        switch (field.id) {
17100
          case 0: // SUCCESS
17101
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
17102
              {
7410 amar.kumar 17103
                org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
17104
                this.success = new ArrayList<PurchaseReturn>(_list32.size);
17105
                for (int _i33 = 0; _i33 < _list32.size; ++_i33)
6467 amar.kumar 17106
                {
7410 amar.kumar 17107
                  PurchaseReturn _elem34; // required
17108
                  _elem34 = new PurchaseReturn();
17109
                  _elem34.read(iprot);
17110
                  this.success.add(_elem34);
6467 amar.kumar 17111
                }
17112
                iprot.readListEnd();
17113
              }
17114
            } else { 
17115
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17116
            }
17117
            break;
17118
          default:
17119
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17120
        }
17121
        iprot.readFieldEnd();
17122
      }
17123
      iprot.readStructEnd();
17124
      validate();
17125
    }
17126
 
17127
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17128
      oprot.writeStructBegin(STRUCT_DESC);
17129
 
17130
      if (this.isSetSuccess()) {
17131
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17132
        {
17133
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7410 amar.kumar 17134
          for (PurchaseReturn _iter35 : this.success)
6467 amar.kumar 17135
          {
7410 amar.kumar 17136
            _iter35.write(oprot);
6467 amar.kumar 17137
          }
17138
          oprot.writeListEnd();
17139
        }
17140
        oprot.writeFieldEnd();
17141
      }
17142
      oprot.writeFieldStop();
17143
      oprot.writeStructEnd();
17144
    }
17145
 
17146
    @Override
17147
    public String toString() {
17148
      StringBuilder sb = new StringBuilder("getUnsettledPurchaseReturns_result(");
17149
      boolean first = true;
17150
 
17151
      sb.append("success:");
17152
      if (this.success == null) {
17153
        sb.append("null");
17154
      } else {
17155
        sb.append(this.success);
17156
      }
17157
      first = false;
17158
      sb.append(")");
17159
      return sb.toString();
17160
    }
17161
 
17162
    public void validate() throws org.apache.thrift.TException {
17163
      // check for required fields
17164
    }
17165
 
17166
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17167
      try {
17168
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17169
      } catch (org.apache.thrift.TException te) {
17170
        throw new java.io.IOException(te);
17171
      }
17172
    }
17173
 
17174
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17175
      try {
17176
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17177
      } catch (org.apache.thrift.TException te) {
17178
        throw new java.io.IOException(te);
17179
      }
17180
    }
17181
 
17182
  }
17183
 
6630 amar.kumar 17184
  public static class getInvoice_args implements org.apache.thrift.TBase<getInvoice_args, getInvoice_args._Fields>, java.io.Serializable, Cloneable   {
17185
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoice_args");
17186
 
17187
    private static final org.apache.thrift.protocol.TField INVOICE_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("invoiceNumber", org.apache.thrift.protocol.TType.STRING, (short)1);
17188
    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)2);
17189
 
17190
    private String invoiceNumber; // required
17191
    private long supplierId; // required
17192
 
17193
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17194
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17195
      INVOICE_NUMBER((short)1, "invoiceNumber"),
17196
      SUPPLIER_ID((short)2, "supplierId");
17197
 
17198
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17199
 
17200
      static {
17201
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17202
          byName.put(field.getFieldName(), field);
17203
        }
17204
      }
17205
 
17206
      /**
17207
       * Find the _Fields constant that matches fieldId, or null if its not found.
17208
       */
17209
      public static _Fields findByThriftId(int fieldId) {
17210
        switch(fieldId) {
17211
          case 1: // INVOICE_NUMBER
17212
            return INVOICE_NUMBER;
17213
          case 2: // SUPPLIER_ID
17214
            return SUPPLIER_ID;
17215
          default:
17216
            return null;
17217
        }
17218
      }
17219
 
17220
      /**
17221
       * Find the _Fields constant that matches fieldId, throwing an exception
17222
       * if it is not found.
17223
       */
17224
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17225
        _Fields fields = findByThriftId(fieldId);
17226
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17227
        return fields;
17228
      }
17229
 
17230
      /**
17231
       * Find the _Fields constant that matches name, or null if its not found.
17232
       */
17233
      public static _Fields findByName(String name) {
17234
        return byName.get(name);
17235
      }
17236
 
17237
      private final short _thriftId;
17238
      private final String _fieldName;
17239
 
17240
      _Fields(short thriftId, String fieldName) {
17241
        _thriftId = thriftId;
17242
        _fieldName = fieldName;
17243
      }
17244
 
17245
      public short getThriftFieldId() {
17246
        return _thriftId;
17247
      }
17248
 
17249
      public String getFieldName() {
17250
        return _fieldName;
17251
      }
17252
    }
17253
 
17254
    // isset id assignments
17255
    private static final int __SUPPLIERID_ISSET_ID = 0;
17256
    private BitSet __isset_bit_vector = new BitSet(1);
17257
 
17258
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17259
    static {
17260
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17261
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17262
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
17263
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17264
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
17265
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17266
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoice_args.class, metaDataMap);
17267
    }
17268
 
17269
    public getInvoice_args() {
17270
    }
17271
 
17272
    public getInvoice_args(
17273
      String invoiceNumber,
17274
      long supplierId)
17275
    {
17276
      this();
17277
      this.invoiceNumber = invoiceNumber;
17278
      this.supplierId = supplierId;
17279
      setSupplierIdIsSet(true);
17280
    }
17281
 
17282
    /**
17283
     * Performs a deep copy on <i>other</i>.
17284
     */
17285
    public getInvoice_args(getInvoice_args other) {
17286
      __isset_bit_vector.clear();
17287
      __isset_bit_vector.or(other.__isset_bit_vector);
17288
      if (other.isSetInvoiceNumber()) {
17289
        this.invoiceNumber = other.invoiceNumber;
17290
      }
17291
      this.supplierId = other.supplierId;
17292
    }
17293
 
17294
    public getInvoice_args deepCopy() {
17295
      return new getInvoice_args(this);
17296
    }
17297
 
17298
    @Override
17299
    public void clear() {
17300
      this.invoiceNumber = null;
17301
      setSupplierIdIsSet(false);
17302
      this.supplierId = 0;
17303
    }
17304
 
17305
    public String getInvoiceNumber() {
17306
      return this.invoiceNumber;
17307
    }
17308
 
17309
    public void setInvoiceNumber(String invoiceNumber) {
17310
      this.invoiceNumber = invoiceNumber;
17311
    }
17312
 
17313
    public void unsetInvoiceNumber() {
17314
      this.invoiceNumber = null;
17315
    }
17316
 
17317
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
17318
    public boolean isSetInvoiceNumber() {
17319
      return this.invoiceNumber != null;
17320
    }
17321
 
17322
    public void setInvoiceNumberIsSet(boolean value) {
17323
      if (!value) {
17324
        this.invoiceNumber = null;
17325
      }
17326
    }
17327
 
17328
    public long getSupplierId() {
17329
      return this.supplierId;
17330
    }
17331
 
17332
    public void setSupplierId(long supplierId) {
17333
      this.supplierId = supplierId;
17334
      setSupplierIdIsSet(true);
17335
    }
17336
 
17337
    public void unsetSupplierId() {
17338
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
17339
    }
17340
 
17341
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
17342
    public boolean isSetSupplierId() {
17343
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
17344
    }
17345
 
17346
    public void setSupplierIdIsSet(boolean value) {
17347
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
17348
    }
17349
 
17350
    public void setFieldValue(_Fields field, Object value) {
17351
      switch (field) {
17352
      case INVOICE_NUMBER:
17353
        if (value == null) {
17354
          unsetInvoiceNumber();
17355
        } else {
17356
          setInvoiceNumber((String)value);
17357
        }
17358
        break;
17359
 
17360
      case SUPPLIER_ID:
17361
        if (value == null) {
17362
          unsetSupplierId();
17363
        } else {
17364
          setSupplierId((Long)value);
17365
        }
17366
        break;
17367
 
17368
      }
17369
    }
17370
 
17371
    public Object getFieldValue(_Fields field) {
17372
      switch (field) {
17373
      case INVOICE_NUMBER:
17374
        return getInvoiceNumber();
17375
 
17376
      case SUPPLIER_ID:
17377
        return Long.valueOf(getSupplierId());
17378
 
17379
      }
17380
      throw new IllegalStateException();
17381
    }
17382
 
17383
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17384
    public boolean isSet(_Fields field) {
17385
      if (field == null) {
17386
        throw new IllegalArgumentException();
17387
      }
17388
 
17389
      switch (field) {
17390
      case INVOICE_NUMBER:
17391
        return isSetInvoiceNumber();
17392
      case SUPPLIER_ID:
17393
        return isSetSupplierId();
17394
      }
17395
      throw new IllegalStateException();
17396
    }
17397
 
17398
    @Override
17399
    public boolean equals(Object that) {
17400
      if (that == null)
17401
        return false;
17402
      if (that instanceof getInvoice_args)
17403
        return this.equals((getInvoice_args)that);
17404
      return false;
17405
    }
17406
 
17407
    public boolean equals(getInvoice_args that) {
17408
      if (that == null)
17409
        return false;
17410
 
17411
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
17412
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
17413
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
17414
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
17415
          return false;
17416
        if (!this.invoiceNumber.equals(that.invoiceNumber))
17417
          return false;
17418
      }
17419
 
17420
      boolean this_present_supplierId = true;
17421
      boolean that_present_supplierId = true;
17422
      if (this_present_supplierId || that_present_supplierId) {
17423
        if (!(this_present_supplierId && that_present_supplierId))
17424
          return false;
17425
        if (this.supplierId != that.supplierId)
17426
          return false;
17427
      }
17428
 
17429
      return true;
17430
    }
17431
 
17432
    @Override
17433
    public int hashCode() {
17434
      return 0;
17435
    }
17436
 
17437
    public int compareTo(getInvoice_args other) {
17438
      if (!getClass().equals(other.getClass())) {
17439
        return getClass().getName().compareTo(other.getClass().getName());
17440
      }
17441
 
17442
      int lastComparison = 0;
17443
      getInvoice_args typedOther = (getInvoice_args)other;
17444
 
17445
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
17446
      if (lastComparison != 0) {
17447
        return lastComparison;
17448
      }
17449
      if (isSetInvoiceNumber()) {
17450
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
17451
        if (lastComparison != 0) {
17452
          return lastComparison;
17453
        }
17454
      }
17455
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
17456
      if (lastComparison != 0) {
17457
        return lastComparison;
17458
      }
17459
      if (isSetSupplierId()) {
17460
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
17461
        if (lastComparison != 0) {
17462
          return lastComparison;
17463
        }
17464
      }
17465
      return 0;
17466
    }
17467
 
17468
    public _Fields fieldForId(int fieldId) {
17469
      return _Fields.findByThriftId(fieldId);
17470
    }
17471
 
17472
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17473
      org.apache.thrift.protocol.TField field;
17474
      iprot.readStructBegin();
17475
      while (true)
17476
      {
17477
        field = iprot.readFieldBegin();
17478
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17479
          break;
17480
        }
17481
        switch (field.id) {
17482
          case 1: // INVOICE_NUMBER
17483
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
17484
              this.invoiceNumber = iprot.readString();
17485
            } else { 
17486
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17487
            }
17488
            break;
17489
          case 2: // SUPPLIER_ID
17490
            if (field.type == org.apache.thrift.protocol.TType.I64) {
17491
              this.supplierId = iprot.readI64();
17492
              setSupplierIdIsSet(true);
17493
            } else { 
17494
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17495
            }
17496
            break;
17497
          default:
17498
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17499
        }
17500
        iprot.readFieldEnd();
17501
      }
17502
      iprot.readStructEnd();
17503
      validate();
17504
    }
17505
 
17506
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17507
      validate();
17508
 
17509
      oprot.writeStructBegin(STRUCT_DESC);
17510
      if (this.invoiceNumber != null) {
17511
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
17512
        oprot.writeString(this.invoiceNumber);
17513
        oprot.writeFieldEnd();
17514
      }
17515
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
17516
      oprot.writeI64(this.supplierId);
17517
      oprot.writeFieldEnd();
17518
      oprot.writeFieldStop();
17519
      oprot.writeStructEnd();
17520
    }
17521
 
17522
    @Override
17523
    public String toString() {
17524
      StringBuilder sb = new StringBuilder("getInvoice_args(");
17525
      boolean first = true;
17526
 
17527
      sb.append("invoiceNumber:");
17528
      if (this.invoiceNumber == null) {
17529
        sb.append("null");
17530
      } else {
17531
        sb.append(this.invoiceNumber);
17532
      }
17533
      first = false;
17534
      if (!first) sb.append(", ");
17535
      sb.append("supplierId:");
17536
      sb.append(this.supplierId);
17537
      first = false;
17538
      sb.append(")");
17539
      return sb.toString();
17540
    }
17541
 
17542
    public void validate() throws org.apache.thrift.TException {
17543
      // check for required fields
17544
    }
17545
 
17546
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17547
      try {
17548
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17549
      } catch (org.apache.thrift.TException te) {
17550
        throw new java.io.IOException(te);
17551
      }
17552
    }
17553
 
17554
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17555
      try {
17556
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17557
      } catch (org.apache.thrift.TException te) {
17558
        throw new java.io.IOException(te);
17559
      }
17560
    }
17561
 
17562
  }
17563
 
17564
  public static class getInvoice_result implements org.apache.thrift.TBase<getInvoice_result, getInvoice_result._Fields>, java.io.Serializable, Cloneable   {
17565
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoice_result");
17566
 
17567
    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);
17568
 
17569
    private List<PurchaseReturn> success; // required
17570
 
17571
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17572
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17573
      SUCCESS((short)0, "success");
17574
 
17575
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17576
 
17577
      static {
17578
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17579
          byName.put(field.getFieldName(), field);
17580
        }
17581
      }
17582
 
17583
      /**
17584
       * Find the _Fields constant that matches fieldId, or null if its not found.
17585
       */
17586
      public static _Fields findByThriftId(int fieldId) {
17587
        switch(fieldId) {
17588
          case 0: // SUCCESS
17589
            return SUCCESS;
17590
          default:
17591
            return null;
17592
        }
17593
      }
17594
 
17595
      /**
17596
       * Find the _Fields constant that matches fieldId, throwing an exception
17597
       * if it is not found.
17598
       */
17599
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17600
        _Fields fields = findByThriftId(fieldId);
17601
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17602
        return fields;
17603
      }
17604
 
17605
      /**
17606
       * Find the _Fields constant that matches name, or null if its not found.
17607
       */
17608
      public static _Fields findByName(String name) {
17609
        return byName.get(name);
17610
      }
17611
 
17612
      private final short _thriftId;
17613
      private final String _fieldName;
17614
 
17615
      _Fields(short thriftId, String fieldName) {
17616
        _thriftId = thriftId;
17617
        _fieldName = fieldName;
17618
      }
17619
 
17620
      public short getThriftFieldId() {
17621
        return _thriftId;
17622
      }
17623
 
17624
      public String getFieldName() {
17625
        return _fieldName;
17626
      }
17627
    }
17628
 
17629
    // isset id assignments
17630
 
17631
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17632
    static {
17633
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17634
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17635
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
17636
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class))));
17637
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17638
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoice_result.class, metaDataMap);
17639
    }
17640
 
17641
    public getInvoice_result() {
17642
    }
17643
 
17644
    public getInvoice_result(
17645
      List<PurchaseReturn> success)
17646
    {
17647
      this();
17648
      this.success = success;
17649
    }
17650
 
17651
    /**
17652
     * Performs a deep copy on <i>other</i>.
17653
     */
17654
    public getInvoice_result(getInvoice_result other) {
17655
      if (other.isSetSuccess()) {
17656
        List<PurchaseReturn> __this__success = new ArrayList<PurchaseReturn>();
17657
        for (PurchaseReturn other_element : other.success) {
17658
          __this__success.add(new PurchaseReturn(other_element));
17659
        }
17660
        this.success = __this__success;
17661
      }
17662
    }
17663
 
17664
    public getInvoice_result deepCopy() {
17665
      return new getInvoice_result(this);
17666
    }
17667
 
17668
    @Override
17669
    public void clear() {
17670
      this.success = null;
17671
    }
17672
 
17673
    public int getSuccessSize() {
17674
      return (this.success == null) ? 0 : this.success.size();
17675
    }
17676
 
17677
    public java.util.Iterator<PurchaseReturn> getSuccessIterator() {
17678
      return (this.success == null) ? null : this.success.iterator();
17679
    }
17680
 
17681
    public void addToSuccess(PurchaseReturn elem) {
17682
      if (this.success == null) {
17683
        this.success = new ArrayList<PurchaseReturn>();
17684
      }
17685
      this.success.add(elem);
17686
    }
17687
 
17688
    public List<PurchaseReturn> getSuccess() {
17689
      return this.success;
17690
    }
17691
 
17692
    public void setSuccess(List<PurchaseReturn> success) {
17693
      this.success = success;
17694
    }
17695
 
17696
    public void unsetSuccess() {
17697
      this.success = null;
17698
    }
17699
 
17700
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
17701
    public boolean isSetSuccess() {
17702
      return this.success != null;
17703
    }
17704
 
17705
    public void setSuccessIsSet(boolean value) {
17706
      if (!value) {
17707
        this.success = null;
17708
      }
17709
    }
17710
 
17711
    public void setFieldValue(_Fields field, Object value) {
17712
      switch (field) {
17713
      case SUCCESS:
17714
        if (value == null) {
17715
          unsetSuccess();
17716
        } else {
17717
          setSuccess((List<PurchaseReturn>)value);
17718
        }
17719
        break;
17720
 
17721
      }
17722
    }
17723
 
17724
    public Object getFieldValue(_Fields field) {
17725
      switch (field) {
17726
      case SUCCESS:
17727
        return getSuccess();
17728
 
17729
      }
17730
      throw new IllegalStateException();
17731
    }
17732
 
17733
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17734
    public boolean isSet(_Fields field) {
17735
      if (field == null) {
17736
        throw new IllegalArgumentException();
17737
      }
17738
 
17739
      switch (field) {
17740
      case SUCCESS:
17741
        return isSetSuccess();
17742
      }
17743
      throw new IllegalStateException();
17744
    }
17745
 
17746
    @Override
17747
    public boolean equals(Object that) {
17748
      if (that == null)
17749
        return false;
17750
      if (that instanceof getInvoice_result)
17751
        return this.equals((getInvoice_result)that);
17752
      return false;
17753
    }
17754
 
17755
    public boolean equals(getInvoice_result that) {
17756
      if (that == null)
17757
        return false;
17758
 
17759
      boolean this_present_success = true && this.isSetSuccess();
17760
      boolean that_present_success = true && that.isSetSuccess();
17761
      if (this_present_success || that_present_success) {
17762
        if (!(this_present_success && that_present_success))
17763
          return false;
17764
        if (!this.success.equals(that.success))
17765
          return false;
17766
      }
17767
 
17768
      return true;
17769
    }
17770
 
17771
    @Override
17772
    public int hashCode() {
17773
      return 0;
17774
    }
17775
 
17776
    public int compareTo(getInvoice_result other) {
17777
      if (!getClass().equals(other.getClass())) {
17778
        return getClass().getName().compareTo(other.getClass().getName());
17779
      }
17780
 
17781
      int lastComparison = 0;
17782
      getInvoice_result typedOther = (getInvoice_result)other;
17783
 
17784
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
17785
      if (lastComparison != 0) {
17786
        return lastComparison;
17787
      }
17788
      if (isSetSuccess()) {
17789
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
17790
        if (lastComparison != 0) {
17791
          return lastComparison;
17792
        }
17793
      }
17794
      return 0;
17795
    }
17796
 
17797
    public _Fields fieldForId(int fieldId) {
17798
      return _Fields.findByThriftId(fieldId);
17799
    }
17800
 
17801
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17802
      org.apache.thrift.protocol.TField field;
17803
      iprot.readStructBegin();
17804
      while (true)
17805
      {
17806
        field = iprot.readFieldBegin();
17807
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17808
          break;
17809
        }
17810
        switch (field.id) {
17811
          case 0: // SUCCESS
17812
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
17813
              {
7410 amar.kumar 17814
                org.apache.thrift.protocol.TList _list36 = iprot.readListBegin();
17815
                this.success = new ArrayList<PurchaseReturn>(_list36.size);
17816
                for (int _i37 = 0; _i37 < _list36.size; ++_i37)
6630 amar.kumar 17817
                {
7410 amar.kumar 17818
                  PurchaseReturn _elem38; // required
17819
                  _elem38 = new PurchaseReturn();
17820
                  _elem38.read(iprot);
17821
                  this.success.add(_elem38);
6630 amar.kumar 17822
                }
17823
                iprot.readListEnd();
17824
              }
17825
            } else { 
17826
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17827
            }
17828
            break;
17829
          default:
17830
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17831
        }
17832
        iprot.readFieldEnd();
17833
      }
17834
      iprot.readStructEnd();
17835
      validate();
17836
    }
17837
 
17838
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17839
      oprot.writeStructBegin(STRUCT_DESC);
17840
 
17841
      if (this.isSetSuccess()) {
17842
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17843
        {
17844
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7410 amar.kumar 17845
          for (PurchaseReturn _iter39 : this.success)
6630 amar.kumar 17846
          {
7410 amar.kumar 17847
            _iter39.write(oprot);
6630 amar.kumar 17848
          }
17849
          oprot.writeListEnd();
17850
        }
17851
        oprot.writeFieldEnd();
17852
      }
17853
      oprot.writeFieldStop();
17854
      oprot.writeStructEnd();
17855
    }
17856
 
17857
    @Override
17858
    public String toString() {
17859
      StringBuilder sb = new StringBuilder("getInvoice_result(");
17860
      boolean first = true;
17861
 
17862
      sb.append("success:");
17863
      if (this.success == null) {
17864
        sb.append("null");
17865
      } else {
17866
        sb.append(this.success);
17867
      }
17868
      first = false;
17869
      sb.append(")");
17870
      return sb.toString();
17871
    }
17872
 
17873
    public void validate() throws org.apache.thrift.TException {
17874
      // check for required fields
17875
    }
17876
 
17877
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17878
      try {
17879
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17880
      } catch (org.apache.thrift.TException te) {
17881
        throw new java.io.IOException(te);
17882
      }
17883
    }
17884
 
17885
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17886
      try {
17887
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17888
      } catch (org.apache.thrift.TException te) {
17889
        throw new java.io.IOException(te);
17890
      }
17891
    }
17892
 
17893
  }
17894
 
6762 amar.kumar 17895
  public static class createPurchaseForOurExtBilling_args implements org.apache.thrift.TBase<createPurchaseForOurExtBilling_args, createPurchaseForOurExtBilling_args._Fields>, java.io.Serializable, Cloneable   {
17896
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseForOurExtBilling_args");
17897
 
17898
    private static final org.apache.thrift.protocol.TField INVOICE_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("invoiceNumber", org.apache.thrift.protocol.TType.STRING, (short)1);
17899
    private static final org.apache.thrift.protocol.TField UNIT_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("unitPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)2);
7672 rajveer 17900
    private static final org.apache.thrift.protocol.TField NLC_FIELD_DESC = new org.apache.thrift.protocol.TField("nlc", org.apache.thrift.protocol.TType.DOUBLE, (short)3);
17901
    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)4);
6762 amar.kumar 17902
 
17903
    private String invoiceNumber; // required
17904
    private double unitPrice; // required
7672 rajveer 17905
    private double nlc; // required
6762 amar.kumar 17906
    private long itemId; // required
17907
 
17908
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17909
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17910
      INVOICE_NUMBER((short)1, "invoiceNumber"),
17911
      UNIT_PRICE((short)2, "unitPrice"),
7672 rajveer 17912
      NLC((short)3, "nlc"),
17913
      ITEM_ID((short)4, "itemId");
6762 amar.kumar 17914
 
17915
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17916
 
17917
      static {
17918
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17919
          byName.put(field.getFieldName(), field);
17920
        }
17921
      }
17922
 
17923
      /**
17924
       * Find the _Fields constant that matches fieldId, or null if its not found.
17925
       */
17926
      public static _Fields findByThriftId(int fieldId) {
17927
        switch(fieldId) {
17928
          case 1: // INVOICE_NUMBER
17929
            return INVOICE_NUMBER;
17930
          case 2: // UNIT_PRICE
17931
            return UNIT_PRICE;
7672 rajveer 17932
          case 3: // NLC
17933
            return NLC;
17934
          case 4: // ITEM_ID
6762 amar.kumar 17935
            return ITEM_ID;
17936
          default:
17937
            return null;
17938
        }
17939
      }
17940
 
17941
      /**
17942
       * Find the _Fields constant that matches fieldId, throwing an exception
17943
       * if it is not found.
17944
       */
17945
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17946
        _Fields fields = findByThriftId(fieldId);
17947
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17948
        return fields;
17949
      }
17950
 
17951
      /**
17952
       * Find the _Fields constant that matches name, or null if its not found.
17953
       */
17954
      public static _Fields findByName(String name) {
17955
        return byName.get(name);
17956
      }
17957
 
17958
      private final short _thriftId;
17959
      private final String _fieldName;
17960
 
17961
      _Fields(short thriftId, String fieldName) {
17962
        _thriftId = thriftId;
17963
        _fieldName = fieldName;
17964
      }
17965
 
17966
      public short getThriftFieldId() {
17967
        return _thriftId;
17968
      }
17969
 
17970
      public String getFieldName() {
17971
        return _fieldName;
17972
      }
17973
    }
17974
 
17975
    // isset id assignments
17976
    private static final int __UNITPRICE_ISSET_ID = 0;
7672 rajveer 17977
    private static final int __NLC_ISSET_ID = 1;
17978
    private static final int __ITEMID_ISSET_ID = 2;
17979
    private BitSet __isset_bit_vector = new BitSet(3);
6762 amar.kumar 17980
 
17981
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17982
    static {
17983
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17984
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17985
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
17986
      tmpMap.put(_Fields.UNIT_PRICE, new org.apache.thrift.meta_data.FieldMetaData("unitPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17987
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
7672 rajveer 17988
      tmpMap.put(_Fields.NLC, new org.apache.thrift.meta_data.FieldMetaData("nlc", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17989
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
6762 amar.kumar 17990
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17991
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
17992
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17993
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseForOurExtBilling_args.class, metaDataMap);
17994
    }
17995
 
17996
    public createPurchaseForOurExtBilling_args() {
17997
    }
17998
 
17999
    public createPurchaseForOurExtBilling_args(
18000
      String invoiceNumber,
18001
      double unitPrice,
7672 rajveer 18002
      double nlc,
6762 amar.kumar 18003
      long itemId)
18004
    {
18005
      this();
18006
      this.invoiceNumber = invoiceNumber;
18007
      this.unitPrice = unitPrice;
18008
      setUnitPriceIsSet(true);
7672 rajveer 18009
      this.nlc = nlc;
18010
      setNlcIsSet(true);
6762 amar.kumar 18011
      this.itemId = itemId;
18012
      setItemIdIsSet(true);
18013
    }
18014
 
18015
    /**
18016
     * Performs a deep copy on <i>other</i>.
18017
     */
18018
    public createPurchaseForOurExtBilling_args(createPurchaseForOurExtBilling_args other) {
18019
      __isset_bit_vector.clear();
18020
      __isset_bit_vector.or(other.__isset_bit_vector);
18021
      if (other.isSetInvoiceNumber()) {
18022
        this.invoiceNumber = other.invoiceNumber;
18023
      }
18024
      this.unitPrice = other.unitPrice;
7672 rajveer 18025
      this.nlc = other.nlc;
6762 amar.kumar 18026
      this.itemId = other.itemId;
18027
    }
18028
 
18029
    public createPurchaseForOurExtBilling_args deepCopy() {
18030
      return new createPurchaseForOurExtBilling_args(this);
18031
    }
18032
 
18033
    @Override
18034
    public void clear() {
18035
      this.invoiceNumber = null;
18036
      setUnitPriceIsSet(false);
18037
      this.unitPrice = 0.0;
7672 rajveer 18038
      setNlcIsSet(false);
18039
      this.nlc = 0.0;
6762 amar.kumar 18040
      setItemIdIsSet(false);
18041
      this.itemId = 0;
18042
    }
18043
 
18044
    public String getInvoiceNumber() {
18045
      return this.invoiceNumber;
18046
    }
18047
 
18048
    public void setInvoiceNumber(String invoiceNumber) {
18049
      this.invoiceNumber = invoiceNumber;
18050
    }
18051
 
18052
    public void unsetInvoiceNumber() {
18053
      this.invoiceNumber = null;
18054
    }
18055
 
18056
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
18057
    public boolean isSetInvoiceNumber() {
18058
      return this.invoiceNumber != null;
18059
    }
18060
 
18061
    public void setInvoiceNumberIsSet(boolean value) {
18062
      if (!value) {
18063
        this.invoiceNumber = null;
18064
      }
18065
    }
18066
 
18067
    public double getUnitPrice() {
18068
      return this.unitPrice;
18069
    }
18070
 
18071
    public void setUnitPrice(double unitPrice) {
18072
      this.unitPrice = unitPrice;
18073
      setUnitPriceIsSet(true);
18074
    }
18075
 
18076
    public void unsetUnitPrice() {
18077
      __isset_bit_vector.clear(__UNITPRICE_ISSET_ID);
18078
    }
18079
 
18080
    /** Returns true if field unitPrice is set (has been assigned a value) and false otherwise */
18081
    public boolean isSetUnitPrice() {
18082
      return __isset_bit_vector.get(__UNITPRICE_ISSET_ID);
18083
    }
18084
 
18085
    public void setUnitPriceIsSet(boolean value) {
18086
      __isset_bit_vector.set(__UNITPRICE_ISSET_ID, value);
18087
    }
18088
 
7672 rajveer 18089
    public double getNlc() {
18090
      return this.nlc;
18091
    }
18092
 
18093
    public void setNlc(double nlc) {
18094
      this.nlc = nlc;
18095
      setNlcIsSet(true);
18096
    }
18097
 
18098
    public void unsetNlc() {
18099
      __isset_bit_vector.clear(__NLC_ISSET_ID);
18100
    }
18101
 
18102
    /** Returns true if field nlc is set (has been assigned a value) and false otherwise */
18103
    public boolean isSetNlc() {
18104
      return __isset_bit_vector.get(__NLC_ISSET_ID);
18105
    }
18106
 
18107
    public void setNlcIsSet(boolean value) {
18108
      __isset_bit_vector.set(__NLC_ISSET_ID, value);
18109
    }
18110
 
6762 amar.kumar 18111
    public long getItemId() {
18112
      return this.itemId;
18113
    }
18114
 
18115
    public void setItemId(long itemId) {
18116
      this.itemId = itemId;
18117
      setItemIdIsSet(true);
18118
    }
18119
 
18120
    public void unsetItemId() {
18121
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
18122
    }
18123
 
18124
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
18125
    public boolean isSetItemId() {
18126
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
18127
    }
18128
 
18129
    public void setItemIdIsSet(boolean value) {
18130
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
18131
    }
18132
 
18133
    public void setFieldValue(_Fields field, Object value) {
18134
      switch (field) {
18135
      case INVOICE_NUMBER:
18136
        if (value == null) {
18137
          unsetInvoiceNumber();
18138
        } else {
18139
          setInvoiceNumber((String)value);
18140
        }
18141
        break;
18142
 
18143
      case UNIT_PRICE:
18144
        if (value == null) {
18145
          unsetUnitPrice();
18146
        } else {
18147
          setUnitPrice((Double)value);
18148
        }
18149
        break;
18150
 
7672 rajveer 18151
      case NLC:
18152
        if (value == null) {
18153
          unsetNlc();
18154
        } else {
18155
          setNlc((Double)value);
18156
        }
18157
        break;
18158
 
6762 amar.kumar 18159
      case ITEM_ID:
18160
        if (value == null) {
18161
          unsetItemId();
18162
        } else {
18163
          setItemId((Long)value);
18164
        }
18165
        break;
18166
 
18167
      }
18168
    }
18169
 
18170
    public Object getFieldValue(_Fields field) {
18171
      switch (field) {
18172
      case INVOICE_NUMBER:
18173
        return getInvoiceNumber();
18174
 
18175
      case UNIT_PRICE:
18176
        return Double.valueOf(getUnitPrice());
18177
 
7672 rajveer 18178
      case NLC:
18179
        return Double.valueOf(getNlc());
18180
 
6762 amar.kumar 18181
      case ITEM_ID:
18182
        return Long.valueOf(getItemId());
18183
 
18184
      }
18185
      throw new IllegalStateException();
18186
    }
18187
 
18188
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18189
    public boolean isSet(_Fields field) {
18190
      if (field == null) {
18191
        throw new IllegalArgumentException();
18192
      }
18193
 
18194
      switch (field) {
18195
      case INVOICE_NUMBER:
18196
        return isSetInvoiceNumber();
18197
      case UNIT_PRICE:
18198
        return isSetUnitPrice();
7672 rajveer 18199
      case NLC:
18200
        return isSetNlc();
6762 amar.kumar 18201
      case ITEM_ID:
18202
        return isSetItemId();
18203
      }
18204
      throw new IllegalStateException();
18205
    }
18206
 
18207
    @Override
18208
    public boolean equals(Object that) {
18209
      if (that == null)
18210
        return false;
18211
      if (that instanceof createPurchaseForOurExtBilling_args)
18212
        return this.equals((createPurchaseForOurExtBilling_args)that);
18213
      return false;
18214
    }
18215
 
18216
    public boolean equals(createPurchaseForOurExtBilling_args that) {
18217
      if (that == null)
18218
        return false;
18219
 
18220
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
18221
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
18222
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
18223
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
18224
          return false;
18225
        if (!this.invoiceNumber.equals(that.invoiceNumber))
18226
          return false;
18227
      }
18228
 
18229
      boolean this_present_unitPrice = true;
18230
      boolean that_present_unitPrice = true;
18231
      if (this_present_unitPrice || that_present_unitPrice) {
18232
        if (!(this_present_unitPrice && that_present_unitPrice))
18233
          return false;
18234
        if (this.unitPrice != that.unitPrice)
18235
          return false;
18236
      }
18237
 
7672 rajveer 18238
      boolean this_present_nlc = true;
18239
      boolean that_present_nlc = true;
18240
      if (this_present_nlc || that_present_nlc) {
18241
        if (!(this_present_nlc && that_present_nlc))
18242
          return false;
18243
        if (this.nlc != that.nlc)
18244
          return false;
18245
      }
18246
 
6762 amar.kumar 18247
      boolean this_present_itemId = true;
18248
      boolean that_present_itemId = true;
18249
      if (this_present_itemId || that_present_itemId) {
18250
        if (!(this_present_itemId && that_present_itemId))
18251
          return false;
18252
        if (this.itemId != that.itemId)
18253
          return false;
18254
      }
18255
 
18256
      return true;
18257
    }
18258
 
18259
    @Override
18260
    public int hashCode() {
18261
      return 0;
18262
    }
18263
 
18264
    public int compareTo(createPurchaseForOurExtBilling_args other) {
18265
      if (!getClass().equals(other.getClass())) {
18266
        return getClass().getName().compareTo(other.getClass().getName());
18267
      }
18268
 
18269
      int lastComparison = 0;
18270
      createPurchaseForOurExtBilling_args typedOther = (createPurchaseForOurExtBilling_args)other;
18271
 
18272
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
18273
      if (lastComparison != 0) {
18274
        return lastComparison;
18275
      }
18276
      if (isSetInvoiceNumber()) {
18277
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
18278
        if (lastComparison != 0) {
18279
          return lastComparison;
18280
        }
18281
      }
18282
      lastComparison = Boolean.valueOf(isSetUnitPrice()).compareTo(typedOther.isSetUnitPrice());
18283
      if (lastComparison != 0) {
18284
        return lastComparison;
18285
      }
18286
      if (isSetUnitPrice()) {
18287
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unitPrice, typedOther.unitPrice);
18288
        if (lastComparison != 0) {
18289
          return lastComparison;
18290
        }
18291
      }
7672 rajveer 18292
      lastComparison = Boolean.valueOf(isSetNlc()).compareTo(typedOther.isSetNlc());
18293
      if (lastComparison != 0) {
18294
        return lastComparison;
18295
      }
18296
      if (isSetNlc()) {
18297
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nlc, typedOther.nlc);
18298
        if (lastComparison != 0) {
18299
          return lastComparison;
18300
        }
18301
      }
6762 amar.kumar 18302
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
18303
      if (lastComparison != 0) {
18304
        return lastComparison;
18305
      }
18306
      if (isSetItemId()) {
18307
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
18308
        if (lastComparison != 0) {
18309
          return lastComparison;
18310
        }
18311
      }
18312
      return 0;
18313
    }
18314
 
18315
    public _Fields fieldForId(int fieldId) {
18316
      return _Fields.findByThriftId(fieldId);
18317
    }
18318
 
18319
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18320
      org.apache.thrift.protocol.TField field;
18321
      iprot.readStructBegin();
18322
      while (true)
18323
      {
18324
        field = iprot.readFieldBegin();
18325
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18326
          break;
18327
        }
18328
        switch (field.id) {
18329
          case 1: // INVOICE_NUMBER
18330
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
18331
              this.invoiceNumber = iprot.readString();
18332
            } else { 
18333
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18334
            }
18335
            break;
18336
          case 2: // UNIT_PRICE
18337
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
18338
              this.unitPrice = iprot.readDouble();
18339
              setUnitPriceIsSet(true);
18340
            } else { 
18341
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18342
            }
18343
            break;
7672 rajveer 18344
          case 3: // NLC
18345
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
18346
              this.nlc = iprot.readDouble();
18347
              setNlcIsSet(true);
18348
            } else { 
18349
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18350
            }
18351
            break;
18352
          case 4: // ITEM_ID
6762 amar.kumar 18353
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18354
              this.itemId = iprot.readI64();
18355
              setItemIdIsSet(true);
18356
            } else { 
18357
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18358
            }
18359
            break;
18360
          default:
18361
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18362
        }
18363
        iprot.readFieldEnd();
18364
      }
18365
      iprot.readStructEnd();
18366
      validate();
18367
    }
18368
 
18369
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18370
      validate();
18371
 
18372
      oprot.writeStructBegin(STRUCT_DESC);
18373
      if (this.invoiceNumber != null) {
18374
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
18375
        oprot.writeString(this.invoiceNumber);
18376
        oprot.writeFieldEnd();
18377
      }
18378
      oprot.writeFieldBegin(UNIT_PRICE_FIELD_DESC);
18379
      oprot.writeDouble(this.unitPrice);
18380
      oprot.writeFieldEnd();
7672 rajveer 18381
      oprot.writeFieldBegin(NLC_FIELD_DESC);
18382
      oprot.writeDouble(this.nlc);
18383
      oprot.writeFieldEnd();
6762 amar.kumar 18384
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
18385
      oprot.writeI64(this.itemId);
18386
      oprot.writeFieldEnd();
18387
      oprot.writeFieldStop();
18388
      oprot.writeStructEnd();
18389
    }
18390
 
18391
    @Override
18392
    public String toString() {
18393
      StringBuilder sb = new StringBuilder("createPurchaseForOurExtBilling_args(");
18394
      boolean first = true;
18395
 
18396
      sb.append("invoiceNumber:");
18397
      if (this.invoiceNumber == null) {
18398
        sb.append("null");
18399
      } else {
18400
        sb.append(this.invoiceNumber);
18401
      }
18402
      first = false;
18403
      if (!first) sb.append(", ");
18404
      sb.append("unitPrice:");
18405
      sb.append(this.unitPrice);
18406
      first = false;
18407
      if (!first) sb.append(", ");
7672 rajveer 18408
      sb.append("nlc:");
18409
      sb.append(this.nlc);
18410
      first = false;
18411
      if (!first) sb.append(", ");
6762 amar.kumar 18412
      sb.append("itemId:");
18413
      sb.append(this.itemId);
18414
      first = false;
18415
      sb.append(")");
18416
      return sb.toString();
18417
    }
18418
 
18419
    public void validate() throws org.apache.thrift.TException {
18420
      // check for required fields
18421
    }
18422
 
18423
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18424
      try {
18425
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18426
      } catch (org.apache.thrift.TException te) {
18427
        throw new java.io.IOException(te);
18428
      }
18429
    }
18430
 
18431
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18432
      try {
18433
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
18434
        __isset_bit_vector = new BitSet(1);
18435
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18436
      } catch (org.apache.thrift.TException te) {
18437
        throw new java.io.IOException(te);
18438
      }
18439
    }
18440
 
18441
  }
18442
 
18443
  public static class createPurchaseForOurExtBilling_result implements org.apache.thrift.TBase<createPurchaseForOurExtBilling_result, createPurchaseForOurExtBilling_result._Fields>, java.io.Serializable, Cloneable   {
18444
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseForOurExtBilling_result");
18445
 
18446
    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);
18447
 
18448
    private long success; // required
18449
 
18450
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18451
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18452
      SUCCESS((short)0, "success");
18453
 
18454
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18455
 
18456
      static {
18457
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18458
          byName.put(field.getFieldName(), field);
18459
        }
18460
      }
18461
 
18462
      /**
18463
       * Find the _Fields constant that matches fieldId, or null if its not found.
18464
       */
18465
      public static _Fields findByThriftId(int fieldId) {
18466
        switch(fieldId) {
18467
          case 0: // SUCCESS
18468
            return SUCCESS;
18469
          default:
18470
            return null;
18471
        }
18472
      }
18473
 
18474
      /**
18475
       * Find the _Fields constant that matches fieldId, throwing an exception
18476
       * if it is not found.
18477
       */
18478
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18479
        _Fields fields = findByThriftId(fieldId);
18480
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18481
        return fields;
18482
      }
18483
 
18484
      /**
18485
       * Find the _Fields constant that matches name, or null if its not found.
18486
       */
18487
      public static _Fields findByName(String name) {
18488
        return byName.get(name);
18489
      }
18490
 
18491
      private final short _thriftId;
18492
      private final String _fieldName;
18493
 
18494
      _Fields(short thriftId, String fieldName) {
18495
        _thriftId = thriftId;
18496
        _fieldName = fieldName;
18497
      }
18498
 
18499
      public short getThriftFieldId() {
18500
        return _thriftId;
18501
      }
18502
 
18503
      public String getFieldName() {
18504
        return _fieldName;
18505
      }
18506
    }
18507
 
18508
    // isset id assignments
18509
    private static final int __SUCCESS_ISSET_ID = 0;
18510
    private BitSet __isset_bit_vector = new BitSet(1);
18511
 
18512
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18513
    static {
18514
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18515
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18516
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18517
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18518
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseForOurExtBilling_result.class, metaDataMap);
18519
    }
18520
 
18521
    public createPurchaseForOurExtBilling_result() {
18522
    }
18523
 
18524
    public createPurchaseForOurExtBilling_result(
18525
      long success)
18526
    {
18527
      this();
18528
      this.success = success;
18529
      setSuccessIsSet(true);
18530
    }
18531
 
18532
    /**
18533
     * Performs a deep copy on <i>other</i>.
18534
     */
18535
    public createPurchaseForOurExtBilling_result(createPurchaseForOurExtBilling_result other) {
18536
      __isset_bit_vector.clear();
18537
      __isset_bit_vector.or(other.__isset_bit_vector);
18538
      this.success = other.success;
18539
    }
18540
 
18541
    public createPurchaseForOurExtBilling_result deepCopy() {
18542
      return new createPurchaseForOurExtBilling_result(this);
18543
    }
18544
 
18545
    @Override
18546
    public void clear() {
18547
      setSuccessIsSet(false);
18548
      this.success = 0;
18549
    }
18550
 
18551
    public long getSuccess() {
18552
      return this.success;
18553
    }
18554
 
18555
    public void setSuccess(long success) {
18556
      this.success = success;
18557
      setSuccessIsSet(true);
18558
    }
18559
 
18560
    public void unsetSuccess() {
18561
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
18562
    }
18563
 
18564
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
18565
    public boolean isSetSuccess() {
18566
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
18567
    }
18568
 
18569
    public void setSuccessIsSet(boolean value) {
18570
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
18571
    }
18572
 
18573
    public void setFieldValue(_Fields field, Object value) {
18574
      switch (field) {
18575
      case SUCCESS:
18576
        if (value == null) {
18577
          unsetSuccess();
18578
        } else {
18579
          setSuccess((Long)value);
18580
        }
18581
        break;
18582
 
18583
      }
18584
    }
18585
 
18586
    public Object getFieldValue(_Fields field) {
18587
      switch (field) {
18588
      case SUCCESS:
18589
        return Long.valueOf(getSuccess());
18590
 
18591
      }
18592
      throw new IllegalStateException();
18593
    }
18594
 
18595
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18596
    public boolean isSet(_Fields field) {
18597
      if (field == null) {
18598
        throw new IllegalArgumentException();
18599
      }
18600
 
18601
      switch (field) {
18602
      case SUCCESS:
18603
        return isSetSuccess();
18604
      }
18605
      throw new IllegalStateException();
18606
    }
18607
 
18608
    @Override
18609
    public boolean equals(Object that) {
18610
      if (that == null)
18611
        return false;
18612
      if (that instanceof createPurchaseForOurExtBilling_result)
18613
        return this.equals((createPurchaseForOurExtBilling_result)that);
18614
      return false;
18615
    }
18616
 
18617
    public boolean equals(createPurchaseForOurExtBilling_result that) {
18618
      if (that == null)
18619
        return false;
18620
 
18621
      boolean this_present_success = true;
18622
      boolean that_present_success = true;
18623
      if (this_present_success || that_present_success) {
18624
        if (!(this_present_success && that_present_success))
18625
          return false;
18626
        if (this.success != that.success)
18627
          return false;
18628
      }
18629
 
18630
      return true;
18631
    }
18632
 
18633
    @Override
18634
    public int hashCode() {
18635
      return 0;
18636
    }
18637
 
18638
    public int compareTo(createPurchaseForOurExtBilling_result other) {
18639
      if (!getClass().equals(other.getClass())) {
18640
        return getClass().getName().compareTo(other.getClass().getName());
18641
      }
18642
 
18643
      int lastComparison = 0;
18644
      createPurchaseForOurExtBilling_result typedOther = (createPurchaseForOurExtBilling_result)other;
18645
 
18646
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
18647
      if (lastComparison != 0) {
18648
        return lastComparison;
18649
      }
18650
      if (isSetSuccess()) {
18651
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
18652
        if (lastComparison != 0) {
18653
          return lastComparison;
18654
        }
18655
      }
18656
      return 0;
18657
    }
18658
 
18659
    public _Fields fieldForId(int fieldId) {
18660
      return _Fields.findByThriftId(fieldId);
18661
    }
18662
 
18663
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18664
      org.apache.thrift.protocol.TField field;
18665
      iprot.readStructBegin();
18666
      while (true)
18667
      {
18668
        field = iprot.readFieldBegin();
18669
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18670
          break;
18671
        }
18672
        switch (field.id) {
18673
          case 0: // SUCCESS
18674
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18675
              this.success = iprot.readI64();
18676
              setSuccessIsSet(true);
18677
            } else { 
18678
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18679
            }
18680
            break;
18681
          default:
18682
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18683
        }
18684
        iprot.readFieldEnd();
18685
      }
18686
      iprot.readStructEnd();
18687
      validate();
18688
    }
18689
 
18690
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18691
      oprot.writeStructBegin(STRUCT_DESC);
18692
 
18693
      if (this.isSetSuccess()) {
18694
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18695
        oprot.writeI64(this.success);
18696
        oprot.writeFieldEnd();
18697
      }
18698
      oprot.writeFieldStop();
18699
      oprot.writeStructEnd();
18700
    }
18701
 
18702
    @Override
18703
    public String toString() {
18704
      StringBuilder sb = new StringBuilder("createPurchaseForOurExtBilling_result(");
18705
      boolean first = true;
18706
 
18707
      sb.append("success:");
18708
      sb.append(this.success);
18709
      first = false;
18710
      sb.append(")");
18711
      return sb.toString();
18712
    }
18713
 
18714
    public void validate() throws org.apache.thrift.TException {
18715
      // check for required fields
18716
    }
18717
 
18718
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18719
      try {
18720
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18721
      } catch (org.apache.thrift.TException te) {
18722
        throw new java.io.IOException(te);
18723
      }
18724
    }
18725
 
18726
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18727
      try {
18728
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18729
      } catch (org.apache.thrift.TException te) {
18730
        throw new java.io.IOException(te);
18731
      }
18732
    }
18733
 
18734
  }
18735
 
18736
  public static class fulfillPOForExtBilling_args implements org.apache.thrift.TBase<fulfillPOForExtBilling_args, fulfillPOForExtBilling_args._Fields>, java.io.Serializable, Cloneable   {
18737
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPOForExtBilling_args");
18738
 
18739
    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);
18740
    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);
18741
 
18742
    private long itemId; // required
18743
    private long quantity; // required
18744
 
18745
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18746
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18747
      ITEM_ID((short)1, "itemId"),
18748
      QUANTITY((short)2, "quantity");
18749
 
18750
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18751
 
18752
      static {
18753
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18754
          byName.put(field.getFieldName(), field);
18755
        }
18756
      }
18757
 
18758
      /**
18759
       * Find the _Fields constant that matches fieldId, or null if its not found.
18760
       */
18761
      public static _Fields findByThriftId(int fieldId) {
18762
        switch(fieldId) {
18763
          case 1: // ITEM_ID
18764
            return ITEM_ID;
18765
          case 2: // QUANTITY
18766
            return QUANTITY;
18767
          default:
18768
            return null;
18769
        }
18770
      }
18771
 
18772
      /**
18773
       * Find the _Fields constant that matches fieldId, throwing an exception
18774
       * if it is not found.
18775
       */
18776
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18777
        _Fields fields = findByThriftId(fieldId);
18778
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18779
        return fields;
18780
      }
18781
 
18782
      /**
18783
       * Find the _Fields constant that matches name, or null if its not found.
18784
       */
18785
      public static _Fields findByName(String name) {
18786
        return byName.get(name);
18787
      }
18788
 
18789
      private final short _thriftId;
18790
      private final String _fieldName;
18791
 
18792
      _Fields(short thriftId, String fieldName) {
18793
        _thriftId = thriftId;
18794
        _fieldName = fieldName;
18795
      }
18796
 
18797
      public short getThriftFieldId() {
18798
        return _thriftId;
18799
      }
18800
 
18801
      public String getFieldName() {
18802
        return _fieldName;
18803
      }
18804
    }
18805
 
18806
    // isset id assignments
18807
    private static final int __ITEMID_ISSET_ID = 0;
18808
    private static final int __QUANTITY_ISSET_ID = 1;
18809
    private BitSet __isset_bit_vector = new BitSet(2);
18810
 
18811
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18812
    static {
18813
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18814
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18815
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18816
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18817
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18818
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18819
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPOForExtBilling_args.class, metaDataMap);
18820
    }
18821
 
18822
    public fulfillPOForExtBilling_args() {
18823
    }
18824
 
18825
    public fulfillPOForExtBilling_args(
18826
      long itemId,
18827
      long quantity)
18828
    {
18829
      this();
18830
      this.itemId = itemId;
18831
      setItemIdIsSet(true);
18832
      this.quantity = quantity;
18833
      setQuantityIsSet(true);
18834
    }
18835
 
18836
    /**
18837
     * Performs a deep copy on <i>other</i>.
18838
     */
18839
    public fulfillPOForExtBilling_args(fulfillPOForExtBilling_args other) {
18840
      __isset_bit_vector.clear();
18841
      __isset_bit_vector.or(other.__isset_bit_vector);
18842
      this.itemId = other.itemId;
18843
      this.quantity = other.quantity;
18844
    }
18845
 
18846
    public fulfillPOForExtBilling_args deepCopy() {
18847
      return new fulfillPOForExtBilling_args(this);
18848
    }
18849
 
18850
    @Override
18851
    public void clear() {
18852
      setItemIdIsSet(false);
18853
      this.itemId = 0;
18854
      setQuantityIsSet(false);
18855
      this.quantity = 0;
18856
    }
18857
 
18858
    public long getItemId() {
18859
      return this.itemId;
18860
    }
18861
 
18862
    public void setItemId(long itemId) {
18863
      this.itemId = itemId;
18864
      setItemIdIsSet(true);
18865
    }
18866
 
18867
    public void unsetItemId() {
18868
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
18869
    }
18870
 
18871
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
18872
    public boolean isSetItemId() {
18873
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
18874
    }
18875
 
18876
    public void setItemIdIsSet(boolean value) {
18877
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
18878
    }
18879
 
18880
    public long getQuantity() {
18881
      return this.quantity;
18882
    }
18883
 
18884
    public void setQuantity(long quantity) {
18885
      this.quantity = quantity;
18886
      setQuantityIsSet(true);
18887
    }
18888
 
18889
    public void unsetQuantity() {
18890
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
18891
    }
18892
 
18893
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
18894
    public boolean isSetQuantity() {
18895
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
18896
    }
18897
 
18898
    public void setQuantityIsSet(boolean value) {
18899
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
18900
    }
18901
 
18902
    public void setFieldValue(_Fields field, Object value) {
18903
      switch (field) {
18904
      case ITEM_ID:
18905
        if (value == null) {
18906
          unsetItemId();
18907
        } else {
18908
          setItemId((Long)value);
18909
        }
18910
        break;
18911
 
18912
      case QUANTITY:
18913
        if (value == null) {
18914
          unsetQuantity();
18915
        } else {
18916
          setQuantity((Long)value);
18917
        }
18918
        break;
18919
 
18920
      }
18921
    }
18922
 
18923
    public Object getFieldValue(_Fields field) {
18924
      switch (field) {
18925
      case ITEM_ID:
18926
        return Long.valueOf(getItemId());
18927
 
18928
      case QUANTITY:
18929
        return Long.valueOf(getQuantity());
18930
 
18931
      }
18932
      throw new IllegalStateException();
18933
    }
18934
 
18935
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18936
    public boolean isSet(_Fields field) {
18937
      if (field == null) {
18938
        throw new IllegalArgumentException();
18939
      }
18940
 
18941
      switch (field) {
18942
      case ITEM_ID:
18943
        return isSetItemId();
18944
      case QUANTITY:
18945
        return isSetQuantity();
18946
      }
18947
      throw new IllegalStateException();
18948
    }
18949
 
18950
    @Override
18951
    public boolean equals(Object that) {
18952
      if (that == null)
18953
        return false;
18954
      if (that instanceof fulfillPOForExtBilling_args)
18955
        return this.equals((fulfillPOForExtBilling_args)that);
18956
      return false;
18957
    }
18958
 
18959
    public boolean equals(fulfillPOForExtBilling_args that) {
18960
      if (that == null)
18961
        return false;
18962
 
18963
      boolean this_present_itemId = true;
18964
      boolean that_present_itemId = true;
18965
      if (this_present_itemId || that_present_itemId) {
18966
        if (!(this_present_itemId && that_present_itemId))
18967
          return false;
18968
        if (this.itemId != that.itemId)
18969
          return false;
18970
      }
18971
 
18972
      boolean this_present_quantity = true;
18973
      boolean that_present_quantity = true;
18974
      if (this_present_quantity || that_present_quantity) {
18975
        if (!(this_present_quantity && that_present_quantity))
18976
          return false;
18977
        if (this.quantity != that.quantity)
18978
          return false;
18979
      }
18980
 
18981
      return true;
18982
    }
18983
 
18984
    @Override
18985
    public int hashCode() {
18986
      return 0;
18987
    }
18988
 
18989
    public int compareTo(fulfillPOForExtBilling_args other) {
18990
      if (!getClass().equals(other.getClass())) {
18991
        return getClass().getName().compareTo(other.getClass().getName());
18992
      }
18993
 
18994
      int lastComparison = 0;
18995
      fulfillPOForExtBilling_args typedOther = (fulfillPOForExtBilling_args)other;
18996
 
18997
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
18998
      if (lastComparison != 0) {
18999
        return lastComparison;
19000
      }
19001
      if (isSetItemId()) {
19002
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
19003
        if (lastComparison != 0) {
19004
          return lastComparison;
19005
        }
19006
      }
19007
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
19008
      if (lastComparison != 0) {
19009
        return lastComparison;
19010
      }
19011
      if (isSetQuantity()) {
19012
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
19013
        if (lastComparison != 0) {
19014
          return lastComparison;
19015
        }
19016
      }
19017
      return 0;
19018
    }
19019
 
19020
    public _Fields fieldForId(int fieldId) {
19021
      return _Fields.findByThriftId(fieldId);
19022
    }
19023
 
19024
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19025
      org.apache.thrift.protocol.TField field;
19026
      iprot.readStructBegin();
19027
      while (true)
19028
      {
19029
        field = iprot.readFieldBegin();
19030
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19031
          break;
19032
        }
19033
        switch (field.id) {
19034
          case 1: // ITEM_ID
19035
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19036
              this.itemId = iprot.readI64();
19037
              setItemIdIsSet(true);
19038
            } else { 
19039
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19040
            }
19041
            break;
19042
          case 2: // QUANTITY
19043
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19044
              this.quantity = iprot.readI64();
19045
              setQuantityIsSet(true);
19046
            } else { 
19047
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19048
            }
19049
            break;
19050
          default:
19051
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19052
        }
19053
        iprot.readFieldEnd();
19054
      }
19055
      iprot.readStructEnd();
19056
      validate();
19057
    }
19058
 
19059
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19060
      validate();
19061
 
19062
      oprot.writeStructBegin(STRUCT_DESC);
19063
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
19064
      oprot.writeI64(this.itemId);
19065
      oprot.writeFieldEnd();
19066
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
19067
      oprot.writeI64(this.quantity);
19068
      oprot.writeFieldEnd();
19069
      oprot.writeFieldStop();
19070
      oprot.writeStructEnd();
19071
    }
19072
 
19073
    @Override
19074
    public String toString() {
19075
      StringBuilder sb = new StringBuilder("fulfillPOForExtBilling_args(");
19076
      boolean first = true;
19077
 
19078
      sb.append("itemId:");
19079
      sb.append(this.itemId);
19080
      first = false;
19081
      if (!first) sb.append(", ");
19082
      sb.append("quantity:");
19083
      sb.append(this.quantity);
19084
      first = false;
19085
      sb.append(")");
19086
      return sb.toString();
19087
    }
19088
 
19089
    public void validate() throws org.apache.thrift.TException {
19090
      // check for required fields
19091
    }
19092
 
19093
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19094
      try {
19095
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19096
      } catch (org.apache.thrift.TException te) {
19097
        throw new java.io.IOException(te);
19098
      }
19099
    }
19100
 
19101
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19102
      try {
19103
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
19104
        __isset_bit_vector = new BitSet(1);
19105
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19106
      } catch (org.apache.thrift.TException te) {
19107
        throw new java.io.IOException(te);
19108
      }
19109
    }
19110
 
19111
  }
19112
 
19113
  public static class fulfillPOForExtBilling_result implements org.apache.thrift.TBase<fulfillPOForExtBilling_result, fulfillPOForExtBilling_result._Fields>, java.io.Serializable, Cloneable   {
19114
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPOForExtBilling_result");
19115
 
19116
 
19117
 
19118
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19119
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19120
;
19121
 
19122
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19123
 
19124
      static {
19125
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19126
          byName.put(field.getFieldName(), field);
19127
        }
19128
      }
19129
 
19130
      /**
19131
       * Find the _Fields constant that matches fieldId, or null if its not found.
19132
       */
19133
      public static _Fields findByThriftId(int fieldId) {
19134
        switch(fieldId) {
19135
          default:
19136
            return null;
19137
        }
19138
      }
19139
 
19140
      /**
19141
       * Find the _Fields constant that matches fieldId, throwing an exception
19142
       * if it is not found.
19143
       */
19144
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19145
        _Fields fields = findByThriftId(fieldId);
19146
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19147
        return fields;
19148
      }
19149
 
19150
      /**
19151
       * Find the _Fields constant that matches name, or null if its not found.
19152
       */
19153
      public static _Fields findByName(String name) {
19154
        return byName.get(name);
19155
      }
19156
 
19157
      private final short _thriftId;
19158
      private final String _fieldName;
19159
 
19160
      _Fields(short thriftId, String fieldName) {
19161
        _thriftId = thriftId;
19162
        _fieldName = fieldName;
19163
      }
19164
 
19165
      public short getThriftFieldId() {
19166
        return _thriftId;
19167
      }
19168
 
19169
      public String getFieldName() {
19170
        return _fieldName;
19171
      }
19172
    }
19173
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19174
    static {
19175
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19176
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19177
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPOForExtBilling_result.class, metaDataMap);
19178
    }
19179
 
19180
    public fulfillPOForExtBilling_result() {
19181
    }
19182
 
19183
    /**
19184
     * Performs a deep copy on <i>other</i>.
19185
     */
19186
    public fulfillPOForExtBilling_result(fulfillPOForExtBilling_result other) {
19187
    }
19188
 
19189
    public fulfillPOForExtBilling_result deepCopy() {
19190
      return new fulfillPOForExtBilling_result(this);
19191
    }
19192
 
19193
    @Override
19194
    public void clear() {
19195
    }
19196
 
19197
    public void setFieldValue(_Fields field, Object value) {
19198
      switch (field) {
19199
      }
19200
    }
19201
 
19202
    public Object getFieldValue(_Fields field) {
19203
      switch (field) {
19204
      }
19205
      throw new IllegalStateException();
19206
    }
19207
 
19208
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19209
    public boolean isSet(_Fields field) {
19210
      if (field == null) {
19211
        throw new IllegalArgumentException();
19212
      }
19213
 
19214
      switch (field) {
19215
      }
19216
      throw new IllegalStateException();
19217
    }
19218
 
19219
    @Override
19220
    public boolean equals(Object that) {
19221
      if (that == null)
19222
        return false;
19223
      if (that instanceof fulfillPOForExtBilling_result)
19224
        return this.equals((fulfillPOForExtBilling_result)that);
19225
      return false;
19226
    }
19227
 
19228
    public boolean equals(fulfillPOForExtBilling_result that) {
19229
      if (that == null)
19230
        return false;
19231
 
19232
      return true;
19233
    }
19234
 
19235
    @Override
19236
    public int hashCode() {
19237
      return 0;
19238
    }
19239
 
19240
    public int compareTo(fulfillPOForExtBilling_result other) {
19241
      if (!getClass().equals(other.getClass())) {
19242
        return getClass().getName().compareTo(other.getClass().getName());
19243
      }
19244
 
19245
      int lastComparison = 0;
19246
      fulfillPOForExtBilling_result typedOther = (fulfillPOForExtBilling_result)other;
19247
 
19248
      return 0;
19249
    }
19250
 
19251
    public _Fields fieldForId(int fieldId) {
19252
      return _Fields.findByThriftId(fieldId);
19253
    }
19254
 
19255
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19256
      org.apache.thrift.protocol.TField field;
19257
      iprot.readStructBegin();
19258
      while (true)
19259
      {
19260
        field = iprot.readFieldBegin();
19261
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19262
          break;
19263
        }
19264
        switch (field.id) {
19265
          default:
19266
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19267
        }
19268
        iprot.readFieldEnd();
19269
      }
19270
      iprot.readStructEnd();
19271
      validate();
19272
    }
19273
 
19274
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19275
      oprot.writeStructBegin(STRUCT_DESC);
19276
 
19277
      oprot.writeFieldStop();
19278
      oprot.writeStructEnd();
19279
    }
19280
 
19281
    @Override
19282
    public String toString() {
19283
      StringBuilder sb = new StringBuilder("fulfillPOForExtBilling_result(");
19284
      boolean first = true;
19285
 
19286
      sb.append(")");
19287
      return sb.toString();
19288
    }
19289
 
19290
    public void validate() throws org.apache.thrift.TException {
19291
      // check for required fields
19292
    }
19293
 
19294
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19295
      try {
19296
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19297
      } catch (org.apache.thrift.TException te) {
19298
        throw new java.io.IOException(te);
19299
      }
19300
    }
19301
 
19302
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19303
      try {
19304
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19305
      } catch (org.apache.thrift.TException te) {
19306
        throw new java.io.IOException(te);
19307
      }
19308
    }
19309
 
19310
  }
19311
 
7410 amar.kumar 19312
  public static class closePO_args implements org.apache.thrift.TBase<closePO_args, closePO_args._Fields>, java.io.Serializable, Cloneable   {
19313
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePO_args");
19314
 
19315
    private static final org.apache.thrift.protocol.TField PO_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("poId", org.apache.thrift.protocol.TType.I64, (short)1);
19316
 
19317
    private long poId; // required
19318
 
19319
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19320
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19321
      PO_ID((short)1, "poId");
19322
 
19323
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19324
 
19325
      static {
19326
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19327
          byName.put(field.getFieldName(), field);
19328
        }
19329
      }
19330
 
19331
      /**
19332
       * Find the _Fields constant that matches fieldId, or null if its not found.
19333
       */
19334
      public static _Fields findByThriftId(int fieldId) {
19335
        switch(fieldId) {
19336
          case 1: // PO_ID
19337
            return PO_ID;
19338
          default:
19339
            return null;
19340
        }
19341
      }
19342
 
19343
      /**
19344
       * Find the _Fields constant that matches fieldId, throwing an exception
19345
       * if it is not found.
19346
       */
19347
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19348
        _Fields fields = findByThriftId(fieldId);
19349
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19350
        return fields;
19351
      }
19352
 
19353
      /**
19354
       * Find the _Fields constant that matches name, or null if its not found.
19355
       */
19356
      public static _Fields findByName(String name) {
19357
        return byName.get(name);
19358
      }
19359
 
19360
      private final short _thriftId;
19361
      private final String _fieldName;
19362
 
19363
      _Fields(short thriftId, String fieldName) {
19364
        _thriftId = thriftId;
19365
        _fieldName = fieldName;
19366
      }
19367
 
19368
      public short getThriftFieldId() {
19369
        return _thriftId;
19370
      }
19371
 
19372
      public String getFieldName() {
19373
        return _fieldName;
19374
      }
19375
    }
19376
 
19377
    // isset id assignments
19378
    private static final int __POID_ISSET_ID = 0;
19379
    private BitSet __isset_bit_vector = new BitSet(1);
19380
 
19381
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19382
    static {
19383
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19384
      tmpMap.put(_Fields.PO_ID, new org.apache.thrift.meta_data.FieldMetaData("poId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19385
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19386
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19387
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePO_args.class, metaDataMap);
19388
    }
19389
 
19390
    public closePO_args() {
19391
    }
19392
 
19393
    public closePO_args(
19394
      long poId)
19395
    {
19396
      this();
19397
      this.poId = poId;
19398
      setPoIdIsSet(true);
19399
    }
19400
 
19401
    /**
19402
     * Performs a deep copy on <i>other</i>.
19403
     */
19404
    public closePO_args(closePO_args other) {
19405
      __isset_bit_vector.clear();
19406
      __isset_bit_vector.or(other.__isset_bit_vector);
19407
      this.poId = other.poId;
19408
    }
19409
 
19410
    public closePO_args deepCopy() {
19411
      return new closePO_args(this);
19412
    }
19413
 
19414
    @Override
19415
    public void clear() {
19416
      setPoIdIsSet(false);
19417
      this.poId = 0;
19418
    }
19419
 
19420
    public long getPoId() {
19421
      return this.poId;
19422
    }
19423
 
19424
    public void setPoId(long poId) {
19425
      this.poId = poId;
19426
      setPoIdIsSet(true);
19427
    }
19428
 
19429
    public void unsetPoId() {
19430
      __isset_bit_vector.clear(__POID_ISSET_ID);
19431
    }
19432
 
19433
    /** Returns true if field poId is set (has been assigned a value) and false otherwise */
19434
    public boolean isSetPoId() {
19435
      return __isset_bit_vector.get(__POID_ISSET_ID);
19436
    }
19437
 
19438
    public void setPoIdIsSet(boolean value) {
19439
      __isset_bit_vector.set(__POID_ISSET_ID, value);
19440
    }
19441
 
19442
    public void setFieldValue(_Fields field, Object value) {
19443
      switch (field) {
19444
      case PO_ID:
19445
        if (value == null) {
19446
          unsetPoId();
19447
        } else {
19448
          setPoId((Long)value);
19449
        }
19450
        break;
19451
 
19452
      }
19453
    }
19454
 
19455
    public Object getFieldValue(_Fields field) {
19456
      switch (field) {
19457
      case PO_ID:
19458
        return Long.valueOf(getPoId());
19459
 
19460
      }
19461
      throw new IllegalStateException();
19462
    }
19463
 
19464
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19465
    public boolean isSet(_Fields field) {
19466
      if (field == null) {
19467
        throw new IllegalArgumentException();
19468
      }
19469
 
19470
      switch (field) {
19471
      case PO_ID:
19472
        return isSetPoId();
19473
      }
19474
      throw new IllegalStateException();
19475
    }
19476
 
19477
    @Override
19478
    public boolean equals(Object that) {
19479
      if (that == null)
19480
        return false;
19481
      if (that instanceof closePO_args)
19482
        return this.equals((closePO_args)that);
19483
      return false;
19484
    }
19485
 
19486
    public boolean equals(closePO_args that) {
19487
      if (that == null)
19488
        return false;
19489
 
19490
      boolean this_present_poId = true;
19491
      boolean that_present_poId = true;
19492
      if (this_present_poId || that_present_poId) {
19493
        if (!(this_present_poId && that_present_poId))
19494
          return false;
19495
        if (this.poId != that.poId)
19496
          return false;
19497
      }
19498
 
19499
      return true;
19500
    }
19501
 
19502
    @Override
19503
    public int hashCode() {
19504
      return 0;
19505
    }
19506
 
19507
    public int compareTo(closePO_args other) {
19508
      if (!getClass().equals(other.getClass())) {
19509
        return getClass().getName().compareTo(other.getClass().getName());
19510
      }
19511
 
19512
      int lastComparison = 0;
19513
      closePO_args typedOther = (closePO_args)other;
19514
 
19515
      lastComparison = Boolean.valueOf(isSetPoId()).compareTo(typedOther.isSetPoId());
19516
      if (lastComparison != 0) {
19517
        return lastComparison;
19518
      }
19519
      if (isSetPoId()) {
19520
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.poId, typedOther.poId);
19521
        if (lastComparison != 0) {
19522
          return lastComparison;
19523
        }
19524
      }
19525
      return 0;
19526
    }
19527
 
19528
    public _Fields fieldForId(int fieldId) {
19529
      return _Fields.findByThriftId(fieldId);
19530
    }
19531
 
19532
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19533
      org.apache.thrift.protocol.TField field;
19534
      iprot.readStructBegin();
19535
      while (true)
19536
      {
19537
        field = iprot.readFieldBegin();
19538
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19539
          break;
19540
        }
19541
        switch (field.id) {
19542
          case 1: // PO_ID
19543
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19544
              this.poId = iprot.readI64();
19545
              setPoIdIsSet(true);
19546
            } else { 
19547
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19548
            }
19549
            break;
19550
          default:
19551
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19552
        }
19553
        iprot.readFieldEnd();
19554
      }
19555
      iprot.readStructEnd();
19556
      validate();
19557
    }
19558
 
19559
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19560
      validate();
19561
 
19562
      oprot.writeStructBegin(STRUCT_DESC);
19563
      oprot.writeFieldBegin(PO_ID_FIELD_DESC);
19564
      oprot.writeI64(this.poId);
19565
      oprot.writeFieldEnd();
19566
      oprot.writeFieldStop();
19567
      oprot.writeStructEnd();
19568
    }
19569
 
19570
    @Override
19571
    public String toString() {
19572
      StringBuilder sb = new StringBuilder("closePO_args(");
19573
      boolean first = true;
19574
 
19575
      sb.append("poId:");
19576
      sb.append(this.poId);
19577
      first = false;
19578
      sb.append(")");
19579
      return sb.toString();
19580
    }
19581
 
19582
    public void validate() throws org.apache.thrift.TException {
19583
      // check for required fields
19584
    }
19585
 
19586
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19587
      try {
19588
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19589
      } catch (org.apache.thrift.TException te) {
19590
        throw new java.io.IOException(te);
19591
      }
19592
    }
19593
 
19594
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19595
      try {
19596
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19597
      } catch (org.apache.thrift.TException te) {
19598
        throw new java.io.IOException(te);
19599
      }
19600
    }
19601
 
19602
  }
19603
 
19604
  public static class closePO_result implements org.apache.thrift.TBase<closePO_result, closePO_result._Fields>, java.io.Serializable, Cloneable   {
19605
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePO_result");
19606
 
19607
    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
19608
 
19609
    private PurchaseServiceException e; // required
19610
 
19611
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19612
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19613
      E((short)1, "e");
19614
 
19615
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19616
 
19617
      static {
19618
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19619
          byName.put(field.getFieldName(), field);
19620
        }
19621
      }
19622
 
19623
      /**
19624
       * Find the _Fields constant that matches fieldId, or null if its not found.
19625
       */
19626
      public static _Fields findByThriftId(int fieldId) {
19627
        switch(fieldId) {
19628
          case 1: // E
19629
            return E;
19630
          default:
19631
            return null;
19632
        }
19633
      }
19634
 
19635
      /**
19636
       * Find the _Fields constant that matches fieldId, throwing an exception
19637
       * if it is not found.
19638
       */
19639
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19640
        _Fields fields = findByThriftId(fieldId);
19641
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19642
        return fields;
19643
      }
19644
 
19645
      /**
19646
       * Find the _Fields constant that matches name, or null if its not found.
19647
       */
19648
      public static _Fields findByName(String name) {
19649
        return byName.get(name);
19650
      }
19651
 
19652
      private final short _thriftId;
19653
      private final String _fieldName;
19654
 
19655
      _Fields(short thriftId, String fieldName) {
19656
        _thriftId = thriftId;
19657
        _fieldName = fieldName;
19658
      }
19659
 
19660
      public short getThriftFieldId() {
19661
        return _thriftId;
19662
      }
19663
 
19664
      public String getFieldName() {
19665
        return _fieldName;
19666
      }
19667
    }
19668
 
19669
    // isset id assignments
19670
 
19671
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19672
    static {
19673
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19674
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19675
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
19676
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19677
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePO_result.class, metaDataMap);
19678
    }
19679
 
19680
    public closePO_result() {
19681
    }
19682
 
19683
    public closePO_result(
19684
      PurchaseServiceException e)
19685
    {
19686
      this();
19687
      this.e = e;
19688
    }
19689
 
19690
    /**
19691
     * Performs a deep copy on <i>other</i>.
19692
     */
19693
    public closePO_result(closePO_result other) {
19694
      if (other.isSetE()) {
19695
        this.e = new PurchaseServiceException(other.e);
19696
      }
19697
    }
19698
 
19699
    public closePO_result deepCopy() {
19700
      return new closePO_result(this);
19701
    }
19702
 
19703
    @Override
19704
    public void clear() {
19705
      this.e = null;
19706
    }
19707
 
19708
    public PurchaseServiceException getE() {
19709
      return this.e;
19710
    }
19711
 
19712
    public void setE(PurchaseServiceException e) {
19713
      this.e = e;
19714
    }
19715
 
19716
    public void unsetE() {
19717
      this.e = null;
19718
    }
19719
 
19720
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
19721
    public boolean isSetE() {
19722
      return this.e != null;
19723
    }
19724
 
19725
    public void setEIsSet(boolean value) {
19726
      if (!value) {
19727
        this.e = null;
19728
      }
19729
    }
19730
 
19731
    public void setFieldValue(_Fields field, Object value) {
19732
      switch (field) {
19733
      case E:
19734
        if (value == null) {
19735
          unsetE();
19736
        } else {
19737
          setE((PurchaseServiceException)value);
19738
        }
19739
        break;
19740
 
19741
      }
19742
    }
19743
 
19744
    public Object getFieldValue(_Fields field) {
19745
      switch (field) {
19746
      case E:
19747
        return getE();
19748
 
19749
      }
19750
      throw new IllegalStateException();
19751
    }
19752
 
19753
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19754
    public boolean isSet(_Fields field) {
19755
      if (field == null) {
19756
        throw new IllegalArgumentException();
19757
      }
19758
 
19759
      switch (field) {
19760
      case E:
19761
        return isSetE();
19762
      }
19763
      throw new IllegalStateException();
19764
    }
19765
 
19766
    @Override
19767
    public boolean equals(Object that) {
19768
      if (that == null)
19769
        return false;
19770
      if (that instanceof closePO_result)
19771
        return this.equals((closePO_result)that);
19772
      return false;
19773
    }
19774
 
19775
    public boolean equals(closePO_result that) {
19776
      if (that == null)
19777
        return false;
19778
 
19779
      boolean this_present_e = true && this.isSetE();
19780
      boolean that_present_e = true && that.isSetE();
19781
      if (this_present_e || that_present_e) {
19782
        if (!(this_present_e && that_present_e))
19783
          return false;
19784
        if (!this.e.equals(that.e))
19785
          return false;
19786
      }
19787
 
19788
      return true;
19789
    }
19790
 
19791
    @Override
19792
    public int hashCode() {
19793
      return 0;
19794
    }
19795
 
19796
    public int compareTo(closePO_result other) {
19797
      if (!getClass().equals(other.getClass())) {
19798
        return getClass().getName().compareTo(other.getClass().getName());
19799
      }
19800
 
19801
      int lastComparison = 0;
19802
      closePO_result typedOther = (closePO_result)other;
19803
 
19804
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
19805
      if (lastComparison != 0) {
19806
        return lastComparison;
19807
      }
19808
      if (isSetE()) {
19809
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
19810
        if (lastComparison != 0) {
19811
          return lastComparison;
19812
        }
19813
      }
19814
      return 0;
19815
    }
19816
 
19817
    public _Fields fieldForId(int fieldId) {
19818
      return _Fields.findByThriftId(fieldId);
19819
    }
19820
 
19821
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19822
      org.apache.thrift.protocol.TField field;
19823
      iprot.readStructBegin();
19824
      while (true)
19825
      {
19826
        field = iprot.readFieldBegin();
19827
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19828
          break;
19829
        }
19830
        switch (field.id) {
19831
          case 1: // E
19832
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
19833
              this.e = new PurchaseServiceException();
19834
              this.e.read(iprot);
19835
            } else { 
19836
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19837
            }
19838
            break;
19839
          default:
19840
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19841
        }
19842
        iprot.readFieldEnd();
19843
      }
19844
      iprot.readStructEnd();
19845
      validate();
19846
    }
19847
 
19848
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19849
      oprot.writeStructBegin(STRUCT_DESC);
19850
 
19851
      if (this.isSetE()) {
19852
        oprot.writeFieldBegin(E_FIELD_DESC);
19853
        this.e.write(oprot);
19854
        oprot.writeFieldEnd();
19855
      }
19856
      oprot.writeFieldStop();
19857
      oprot.writeStructEnd();
19858
    }
19859
 
19860
    @Override
19861
    public String toString() {
19862
      StringBuilder sb = new StringBuilder("closePO_result(");
19863
      boolean first = true;
19864
 
19865
      sb.append("e:");
19866
      if (this.e == null) {
19867
        sb.append("null");
19868
      } else {
19869
        sb.append(this.e);
19870
      }
19871
      first = false;
19872
      sb.append(")");
19873
      return sb.toString();
19874
    }
19875
 
19876
    public void validate() throws org.apache.thrift.TException {
19877
      // check for required fields
19878
    }
19879
 
19880
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19881
      try {
19882
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19883
      } catch (org.apache.thrift.TException te) {
19884
        throw new java.io.IOException(te);
19885
      }
19886
    }
19887
 
19888
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19889
      try {
19890
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19891
      } catch (org.apache.thrift.TException te) {
19892
        throw new java.io.IOException(te);
19893
      }
19894
    }
19895
 
19896
  }
19897
 
19898
  public static class isInvoiceReceived_args implements org.apache.thrift.TBase<isInvoiceReceived_args, isInvoiceReceived_args._Fields>, java.io.Serializable, Cloneable   {
19899
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isInvoiceReceived_args");
19900
 
19901
    private static final org.apache.thrift.protocol.TField INVOICE_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("invoiceNumber", org.apache.thrift.protocol.TType.STRING, (short)1);
19902
    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)2);
19903
 
19904
    private String invoiceNumber; // required
19905
    private long supplierId; // required
19906
 
19907
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19908
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19909
      INVOICE_NUMBER((short)1, "invoiceNumber"),
19910
      SUPPLIER_ID((short)2, "supplierId");
19911
 
19912
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19913
 
19914
      static {
19915
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19916
          byName.put(field.getFieldName(), field);
19917
        }
19918
      }
19919
 
19920
      /**
19921
       * Find the _Fields constant that matches fieldId, or null if its not found.
19922
       */
19923
      public static _Fields findByThriftId(int fieldId) {
19924
        switch(fieldId) {
19925
          case 1: // INVOICE_NUMBER
19926
            return INVOICE_NUMBER;
19927
          case 2: // SUPPLIER_ID
19928
            return SUPPLIER_ID;
19929
          default:
19930
            return null;
19931
        }
19932
      }
19933
 
19934
      /**
19935
       * Find the _Fields constant that matches fieldId, throwing an exception
19936
       * if it is not found.
19937
       */
19938
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19939
        _Fields fields = findByThriftId(fieldId);
19940
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19941
        return fields;
19942
      }
19943
 
19944
      /**
19945
       * Find the _Fields constant that matches name, or null if its not found.
19946
       */
19947
      public static _Fields findByName(String name) {
19948
        return byName.get(name);
19949
      }
19950
 
19951
      private final short _thriftId;
19952
      private final String _fieldName;
19953
 
19954
      _Fields(short thriftId, String fieldName) {
19955
        _thriftId = thriftId;
19956
        _fieldName = fieldName;
19957
      }
19958
 
19959
      public short getThriftFieldId() {
19960
        return _thriftId;
19961
      }
19962
 
19963
      public String getFieldName() {
19964
        return _fieldName;
19965
      }
19966
    }
19967
 
19968
    // isset id assignments
19969
    private static final int __SUPPLIERID_ISSET_ID = 0;
19970
    private BitSet __isset_bit_vector = new BitSet(1);
19971
 
19972
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19973
    static {
19974
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19975
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19976
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
19977
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19978
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19979
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19980
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isInvoiceReceived_args.class, metaDataMap);
19981
    }
19982
 
19983
    public isInvoiceReceived_args() {
19984
    }
19985
 
19986
    public isInvoiceReceived_args(
19987
      String invoiceNumber,
19988
      long supplierId)
19989
    {
19990
      this();
19991
      this.invoiceNumber = invoiceNumber;
19992
      this.supplierId = supplierId;
19993
      setSupplierIdIsSet(true);
19994
    }
19995
 
19996
    /**
19997
     * Performs a deep copy on <i>other</i>.
19998
     */
19999
    public isInvoiceReceived_args(isInvoiceReceived_args other) {
20000
      __isset_bit_vector.clear();
20001
      __isset_bit_vector.or(other.__isset_bit_vector);
20002
      if (other.isSetInvoiceNumber()) {
20003
        this.invoiceNumber = other.invoiceNumber;
20004
      }
20005
      this.supplierId = other.supplierId;
20006
    }
20007
 
20008
    public isInvoiceReceived_args deepCopy() {
20009
      return new isInvoiceReceived_args(this);
20010
    }
20011
 
20012
    @Override
20013
    public void clear() {
20014
      this.invoiceNumber = null;
20015
      setSupplierIdIsSet(false);
20016
      this.supplierId = 0;
20017
    }
20018
 
20019
    public String getInvoiceNumber() {
20020
      return this.invoiceNumber;
20021
    }
20022
 
20023
    public void setInvoiceNumber(String invoiceNumber) {
20024
      this.invoiceNumber = invoiceNumber;
20025
    }
20026
 
20027
    public void unsetInvoiceNumber() {
20028
      this.invoiceNumber = null;
20029
    }
20030
 
20031
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
20032
    public boolean isSetInvoiceNumber() {
20033
      return this.invoiceNumber != null;
20034
    }
20035
 
20036
    public void setInvoiceNumberIsSet(boolean value) {
20037
      if (!value) {
20038
        this.invoiceNumber = null;
20039
      }
20040
    }
20041
 
20042
    public long getSupplierId() {
20043
      return this.supplierId;
20044
    }
20045
 
20046
    public void setSupplierId(long supplierId) {
20047
      this.supplierId = supplierId;
20048
      setSupplierIdIsSet(true);
20049
    }
20050
 
20051
    public void unsetSupplierId() {
20052
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
20053
    }
20054
 
20055
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
20056
    public boolean isSetSupplierId() {
20057
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
20058
    }
20059
 
20060
    public void setSupplierIdIsSet(boolean value) {
20061
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
20062
    }
20063
 
20064
    public void setFieldValue(_Fields field, Object value) {
20065
      switch (field) {
20066
      case INVOICE_NUMBER:
20067
        if (value == null) {
20068
          unsetInvoiceNumber();
20069
        } else {
20070
          setInvoiceNumber((String)value);
20071
        }
20072
        break;
20073
 
20074
      case SUPPLIER_ID:
20075
        if (value == null) {
20076
          unsetSupplierId();
20077
        } else {
20078
          setSupplierId((Long)value);
20079
        }
20080
        break;
20081
 
20082
      }
20083
    }
20084
 
20085
    public Object getFieldValue(_Fields field) {
20086
      switch (field) {
20087
      case INVOICE_NUMBER:
20088
        return getInvoiceNumber();
20089
 
20090
      case SUPPLIER_ID:
20091
        return Long.valueOf(getSupplierId());
20092
 
20093
      }
20094
      throw new IllegalStateException();
20095
    }
20096
 
20097
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20098
    public boolean isSet(_Fields field) {
20099
      if (field == null) {
20100
        throw new IllegalArgumentException();
20101
      }
20102
 
20103
      switch (field) {
20104
      case INVOICE_NUMBER:
20105
        return isSetInvoiceNumber();
20106
      case SUPPLIER_ID:
20107
        return isSetSupplierId();
20108
      }
20109
      throw new IllegalStateException();
20110
    }
20111
 
20112
    @Override
20113
    public boolean equals(Object that) {
20114
      if (that == null)
20115
        return false;
20116
      if (that instanceof isInvoiceReceived_args)
20117
        return this.equals((isInvoiceReceived_args)that);
20118
      return false;
20119
    }
20120
 
20121
    public boolean equals(isInvoiceReceived_args that) {
20122
      if (that == null)
20123
        return false;
20124
 
20125
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
20126
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
20127
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
20128
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
20129
          return false;
20130
        if (!this.invoiceNumber.equals(that.invoiceNumber))
20131
          return false;
20132
      }
20133
 
20134
      boolean this_present_supplierId = true;
20135
      boolean that_present_supplierId = true;
20136
      if (this_present_supplierId || that_present_supplierId) {
20137
        if (!(this_present_supplierId && that_present_supplierId))
20138
          return false;
20139
        if (this.supplierId != that.supplierId)
20140
          return false;
20141
      }
20142
 
20143
      return true;
20144
    }
20145
 
20146
    @Override
20147
    public int hashCode() {
20148
      return 0;
20149
    }
20150
 
20151
    public int compareTo(isInvoiceReceived_args other) {
20152
      if (!getClass().equals(other.getClass())) {
20153
        return getClass().getName().compareTo(other.getClass().getName());
20154
      }
20155
 
20156
      int lastComparison = 0;
20157
      isInvoiceReceived_args typedOther = (isInvoiceReceived_args)other;
20158
 
20159
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
20160
      if (lastComparison != 0) {
20161
        return lastComparison;
20162
      }
20163
      if (isSetInvoiceNumber()) {
20164
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
20165
        if (lastComparison != 0) {
20166
          return lastComparison;
20167
        }
20168
      }
20169
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
20170
      if (lastComparison != 0) {
20171
        return lastComparison;
20172
      }
20173
      if (isSetSupplierId()) {
20174
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
20175
        if (lastComparison != 0) {
20176
          return lastComparison;
20177
        }
20178
      }
20179
      return 0;
20180
    }
20181
 
20182
    public _Fields fieldForId(int fieldId) {
20183
      return _Fields.findByThriftId(fieldId);
20184
    }
20185
 
20186
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20187
      org.apache.thrift.protocol.TField field;
20188
      iprot.readStructBegin();
20189
      while (true)
20190
      {
20191
        field = iprot.readFieldBegin();
20192
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20193
          break;
20194
        }
20195
        switch (field.id) {
20196
          case 1: // INVOICE_NUMBER
20197
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
20198
              this.invoiceNumber = iprot.readString();
20199
            } else { 
20200
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20201
            }
20202
            break;
20203
          case 2: // SUPPLIER_ID
20204
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20205
              this.supplierId = iprot.readI64();
20206
              setSupplierIdIsSet(true);
20207
            } else { 
20208
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20209
            }
20210
            break;
20211
          default:
20212
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20213
        }
20214
        iprot.readFieldEnd();
20215
      }
20216
      iprot.readStructEnd();
20217
      validate();
20218
    }
20219
 
20220
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20221
      validate();
20222
 
20223
      oprot.writeStructBegin(STRUCT_DESC);
20224
      if (this.invoiceNumber != null) {
20225
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
20226
        oprot.writeString(this.invoiceNumber);
20227
        oprot.writeFieldEnd();
20228
      }
20229
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
20230
      oprot.writeI64(this.supplierId);
20231
      oprot.writeFieldEnd();
20232
      oprot.writeFieldStop();
20233
      oprot.writeStructEnd();
20234
    }
20235
 
20236
    @Override
20237
    public String toString() {
20238
      StringBuilder sb = new StringBuilder("isInvoiceReceived_args(");
20239
      boolean first = true;
20240
 
20241
      sb.append("invoiceNumber:");
20242
      if (this.invoiceNumber == null) {
20243
        sb.append("null");
20244
      } else {
20245
        sb.append(this.invoiceNumber);
20246
      }
20247
      first = false;
20248
      if (!first) sb.append(", ");
20249
      sb.append("supplierId:");
20250
      sb.append(this.supplierId);
20251
      first = false;
20252
      sb.append(")");
20253
      return sb.toString();
20254
    }
20255
 
20256
    public void validate() throws org.apache.thrift.TException {
20257
      // check for required fields
20258
    }
20259
 
20260
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20261
      try {
20262
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20263
      } catch (org.apache.thrift.TException te) {
20264
        throw new java.io.IOException(te);
20265
      }
20266
    }
20267
 
20268
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20269
      try {
20270
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20271
      } catch (org.apache.thrift.TException te) {
20272
        throw new java.io.IOException(te);
20273
      }
20274
    }
20275
 
20276
  }
20277
 
20278
  public static class isInvoiceReceived_result implements org.apache.thrift.TBase<isInvoiceReceived_result, isInvoiceReceived_result._Fields>, java.io.Serializable, Cloneable   {
20279
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isInvoiceReceived_result");
20280
 
20281
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
20282
 
20283
    private boolean success; // required
20284
 
20285
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20286
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20287
      SUCCESS((short)0, "success");
20288
 
20289
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20290
 
20291
      static {
20292
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20293
          byName.put(field.getFieldName(), field);
20294
        }
20295
      }
20296
 
20297
      /**
20298
       * Find the _Fields constant that matches fieldId, or null if its not found.
20299
       */
20300
      public static _Fields findByThriftId(int fieldId) {
20301
        switch(fieldId) {
20302
          case 0: // SUCCESS
20303
            return SUCCESS;
20304
          default:
20305
            return null;
20306
        }
20307
      }
20308
 
20309
      /**
20310
       * Find the _Fields constant that matches fieldId, throwing an exception
20311
       * if it is not found.
20312
       */
20313
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20314
        _Fields fields = findByThriftId(fieldId);
20315
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20316
        return fields;
20317
      }
20318
 
20319
      /**
20320
       * Find the _Fields constant that matches name, or null if its not found.
20321
       */
20322
      public static _Fields findByName(String name) {
20323
        return byName.get(name);
20324
      }
20325
 
20326
      private final short _thriftId;
20327
      private final String _fieldName;
20328
 
20329
      _Fields(short thriftId, String fieldName) {
20330
        _thriftId = thriftId;
20331
        _fieldName = fieldName;
20332
      }
20333
 
20334
      public short getThriftFieldId() {
20335
        return _thriftId;
20336
      }
20337
 
20338
      public String getFieldName() {
20339
        return _fieldName;
20340
      }
20341
    }
20342
 
20343
    // isset id assignments
20344
    private static final int __SUCCESS_ISSET_ID = 0;
20345
    private BitSet __isset_bit_vector = new BitSet(1);
20346
 
20347
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20348
    static {
20349
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20350
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20351
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
20352
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20353
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isInvoiceReceived_result.class, metaDataMap);
20354
    }
20355
 
20356
    public isInvoiceReceived_result() {
20357
    }
20358
 
20359
    public isInvoiceReceived_result(
20360
      boolean success)
20361
    {
20362
      this();
20363
      this.success = success;
20364
      setSuccessIsSet(true);
20365
    }
20366
 
20367
    /**
20368
     * Performs a deep copy on <i>other</i>.
20369
     */
20370
    public isInvoiceReceived_result(isInvoiceReceived_result other) {
20371
      __isset_bit_vector.clear();
20372
      __isset_bit_vector.or(other.__isset_bit_vector);
20373
      this.success = other.success;
20374
    }
20375
 
20376
    public isInvoiceReceived_result deepCopy() {
20377
      return new isInvoiceReceived_result(this);
20378
    }
20379
 
20380
    @Override
20381
    public void clear() {
20382
      setSuccessIsSet(false);
20383
      this.success = false;
20384
    }
20385
 
20386
    public boolean isSuccess() {
20387
      return this.success;
20388
    }
20389
 
20390
    public void setSuccess(boolean success) {
20391
      this.success = success;
20392
      setSuccessIsSet(true);
20393
    }
20394
 
20395
    public void unsetSuccess() {
20396
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
20397
    }
20398
 
20399
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
20400
    public boolean isSetSuccess() {
20401
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
20402
    }
20403
 
20404
    public void setSuccessIsSet(boolean value) {
20405
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
20406
    }
20407
 
20408
    public void setFieldValue(_Fields field, Object value) {
20409
      switch (field) {
20410
      case SUCCESS:
20411
        if (value == null) {
20412
          unsetSuccess();
20413
        } else {
20414
          setSuccess((Boolean)value);
20415
        }
20416
        break;
20417
 
20418
      }
20419
    }
20420
 
20421
    public Object getFieldValue(_Fields field) {
20422
      switch (field) {
20423
      case SUCCESS:
20424
        return Boolean.valueOf(isSuccess());
20425
 
20426
      }
20427
      throw new IllegalStateException();
20428
    }
20429
 
20430
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20431
    public boolean isSet(_Fields field) {
20432
      if (field == null) {
20433
        throw new IllegalArgumentException();
20434
      }
20435
 
20436
      switch (field) {
20437
      case SUCCESS:
20438
        return isSetSuccess();
20439
      }
20440
      throw new IllegalStateException();
20441
    }
20442
 
20443
    @Override
20444
    public boolean equals(Object that) {
20445
      if (that == null)
20446
        return false;
20447
      if (that instanceof isInvoiceReceived_result)
20448
        return this.equals((isInvoiceReceived_result)that);
20449
      return false;
20450
    }
20451
 
20452
    public boolean equals(isInvoiceReceived_result that) {
20453
      if (that == null)
20454
        return false;
20455
 
20456
      boolean this_present_success = true;
20457
      boolean that_present_success = true;
20458
      if (this_present_success || that_present_success) {
20459
        if (!(this_present_success && that_present_success))
20460
          return false;
20461
        if (this.success != that.success)
20462
          return false;
20463
      }
20464
 
20465
      return true;
20466
    }
20467
 
20468
    @Override
20469
    public int hashCode() {
20470
      return 0;
20471
    }
20472
 
20473
    public int compareTo(isInvoiceReceived_result other) {
20474
      if (!getClass().equals(other.getClass())) {
20475
        return getClass().getName().compareTo(other.getClass().getName());
20476
      }
20477
 
20478
      int lastComparison = 0;
20479
      isInvoiceReceived_result typedOther = (isInvoiceReceived_result)other;
20480
 
20481
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
20482
      if (lastComparison != 0) {
20483
        return lastComparison;
20484
      }
20485
      if (isSetSuccess()) {
20486
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
20487
        if (lastComparison != 0) {
20488
          return lastComparison;
20489
        }
20490
      }
20491
      return 0;
20492
    }
20493
 
20494
    public _Fields fieldForId(int fieldId) {
20495
      return _Fields.findByThriftId(fieldId);
20496
    }
20497
 
20498
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20499
      org.apache.thrift.protocol.TField field;
20500
      iprot.readStructBegin();
20501
      while (true)
20502
      {
20503
        field = iprot.readFieldBegin();
20504
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20505
          break;
20506
        }
20507
        switch (field.id) {
20508
          case 0: // SUCCESS
20509
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
20510
              this.success = iprot.readBool();
20511
              setSuccessIsSet(true);
20512
            } else { 
20513
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20514
            }
20515
            break;
20516
          default:
20517
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20518
        }
20519
        iprot.readFieldEnd();
20520
      }
20521
      iprot.readStructEnd();
20522
      validate();
20523
    }
20524
 
20525
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20526
      oprot.writeStructBegin(STRUCT_DESC);
20527
 
20528
      if (this.isSetSuccess()) {
20529
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20530
        oprot.writeBool(this.success);
20531
        oprot.writeFieldEnd();
20532
      }
20533
      oprot.writeFieldStop();
20534
      oprot.writeStructEnd();
20535
    }
20536
 
20537
    @Override
20538
    public String toString() {
20539
      StringBuilder sb = new StringBuilder("isInvoiceReceived_result(");
20540
      boolean first = true;
20541
 
20542
      sb.append("success:");
20543
      sb.append(this.success);
20544
      first = false;
20545
      sb.append(")");
20546
      return sb.toString();
20547
    }
20548
 
20549
    public void validate() throws org.apache.thrift.TException {
20550
      // check for required fields
20551
    }
20552
 
20553
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20554
      try {
20555
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20556
      } catch (org.apache.thrift.TException te) {
20557
        throw new java.io.IOException(te);
20558
      }
20559
    }
20560
 
20561
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20562
      try {
20563
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20564
      } catch (org.apache.thrift.TException te) {
20565
        throw new java.io.IOException(te);
20566
      }
20567
    }
20568
 
20569
  }
20570
 
9829 amar.kumar 20571
  public static class changeWarehouseForPO_args implements org.apache.thrift.TBase<changeWarehouseForPO_args, changeWarehouseForPO_args._Fields>, java.io.Serializable, Cloneable   {
20572
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changeWarehouseForPO_args");
20573
 
20574
    private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);
20575
    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)2);
20576
 
20577
    private long id; // required
20578
    private long warehouseId; // required
20579
 
20580
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20581
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20582
      ID((short)1, "id"),
20583
      WAREHOUSE_ID((short)2, "warehouseId");
20584
 
20585
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20586
 
20587
      static {
20588
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20589
          byName.put(field.getFieldName(), field);
20590
        }
20591
      }
20592
 
20593
      /**
20594
       * Find the _Fields constant that matches fieldId, or null if its not found.
20595
       */
20596
      public static _Fields findByThriftId(int fieldId) {
20597
        switch(fieldId) {
20598
          case 1: // ID
20599
            return ID;
20600
          case 2: // WAREHOUSE_ID
20601
            return WAREHOUSE_ID;
20602
          default:
20603
            return null;
20604
        }
20605
      }
20606
 
20607
      /**
20608
       * Find the _Fields constant that matches fieldId, throwing an exception
20609
       * if it is not found.
20610
       */
20611
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20612
        _Fields fields = findByThriftId(fieldId);
20613
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20614
        return fields;
20615
      }
20616
 
20617
      /**
20618
       * Find the _Fields constant that matches name, or null if its not found.
20619
       */
20620
      public static _Fields findByName(String name) {
20621
        return byName.get(name);
20622
      }
20623
 
20624
      private final short _thriftId;
20625
      private final String _fieldName;
20626
 
20627
      _Fields(short thriftId, String fieldName) {
20628
        _thriftId = thriftId;
20629
        _fieldName = fieldName;
20630
      }
20631
 
20632
      public short getThriftFieldId() {
20633
        return _thriftId;
20634
      }
20635
 
20636
      public String getFieldName() {
20637
        return _fieldName;
20638
      }
20639
    }
20640
 
20641
    // isset id assignments
20642
    private static final int __ID_ISSET_ID = 0;
20643
    private static final int __WAREHOUSEID_ISSET_ID = 1;
20644
    private BitSet __isset_bit_vector = new BitSet(2);
20645
 
20646
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20647
    static {
20648
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20649
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20650
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
20651
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20652
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
20653
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20654
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changeWarehouseForPO_args.class, metaDataMap);
20655
    }
20656
 
20657
    public changeWarehouseForPO_args() {
20658
    }
20659
 
20660
    public changeWarehouseForPO_args(
20661
      long id,
20662
      long warehouseId)
20663
    {
20664
      this();
20665
      this.id = id;
20666
      setIdIsSet(true);
20667
      this.warehouseId = warehouseId;
20668
      setWarehouseIdIsSet(true);
20669
    }
20670
 
20671
    /**
20672
     * Performs a deep copy on <i>other</i>.
20673
     */
20674
    public changeWarehouseForPO_args(changeWarehouseForPO_args other) {
20675
      __isset_bit_vector.clear();
20676
      __isset_bit_vector.or(other.__isset_bit_vector);
20677
      this.id = other.id;
20678
      this.warehouseId = other.warehouseId;
20679
    }
20680
 
20681
    public changeWarehouseForPO_args deepCopy() {
20682
      return new changeWarehouseForPO_args(this);
20683
    }
20684
 
20685
    @Override
20686
    public void clear() {
20687
      setIdIsSet(false);
20688
      this.id = 0;
20689
      setWarehouseIdIsSet(false);
20690
      this.warehouseId = 0;
20691
    }
20692
 
20693
    public long getId() {
20694
      return this.id;
20695
    }
20696
 
20697
    public void setId(long id) {
20698
      this.id = id;
20699
      setIdIsSet(true);
20700
    }
20701
 
20702
    public void unsetId() {
20703
      __isset_bit_vector.clear(__ID_ISSET_ID);
20704
    }
20705
 
20706
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
20707
    public boolean isSetId() {
20708
      return __isset_bit_vector.get(__ID_ISSET_ID);
20709
    }
20710
 
20711
    public void setIdIsSet(boolean value) {
20712
      __isset_bit_vector.set(__ID_ISSET_ID, value);
20713
    }
20714
 
20715
    public long getWarehouseId() {
20716
      return this.warehouseId;
20717
    }
20718
 
20719
    public void setWarehouseId(long warehouseId) {
20720
      this.warehouseId = warehouseId;
20721
      setWarehouseIdIsSet(true);
20722
    }
20723
 
20724
    public void unsetWarehouseId() {
20725
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
20726
    }
20727
 
20728
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
20729
    public boolean isSetWarehouseId() {
20730
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
20731
    }
20732
 
20733
    public void setWarehouseIdIsSet(boolean value) {
20734
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
20735
    }
20736
 
20737
    public void setFieldValue(_Fields field, Object value) {
20738
      switch (field) {
20739
      case ID:
20740
        if (value == null) {
20741
          unsetId();
20742
        } else {
20743
          setId((Long)value);
20744
        }
20745
        break;
20746
 
20747
      case WAREHOUSE_ID:
20748
        if (value == null) {
20749
          unsetWarehouseId();
20750
        } else {
20751
          setWarehouseId((Long)value);
20752
        }
20753
        break;
20754
 
20755
      }
20756
    }
20757
 
20758
    public Object getFieldValue(_Fields field) {
20759
      switch (field) {
20760
      case ID:
20761
        return Long.valueOf(getId());
20762
 
20763
      case WAREHOUSE_ID:
20764
        return Long.valueOf(getWarehouseId());
20765
 
20766
      }
20767
      throw new IllegalStateException();
20768
    }
20769
 
20770
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20771
    public boolean isSet(_Fields field) {
20772
      if (field == null) {
20773
        throw new IllegalArgumentException();
20774
      }
20775
 
20776
      switch (field) {
20777
      case ID:
20778
        return isSetId();
20779
      case WAREHOUSE_ID:
20780
        return isSetWarehouseId();
20781
      }
20782
      throw new IllegalStateException();
20783
    }
20784
 
20785
    @Override
20786
    public boolean equals(Object that) {
20787
      if (that == null)
20788
        return false;
20789
      if (that instanceof changeWarehouseForPO_args)
20790
        return this.equals((changeWarehouseForPO_args)that);
20791
      return false;
20792
    }
20793
 
20794
    public boolean equals(changeWarehouseForPO_args that) {
20795
      if (that == null)
20796
        return false;
20797
 
20798
      boolean this_present_id = true;
20799
      boolean that_present_id = true;
20800
      if (this_present_id || that_present_id) {
20801
        if (!(this_present_id && that_present_id))
20802
          return false;
20803
        if (this.id != that.id)
20804
          return false;
20805
      }
20806
 
20807
      boolean this_present_warehouseId = true;
20808
      boolean that_present_warehouseId = true;
20809
      if (this_present_warehouseId || that_present_warehouseId) {
20810
        if (!(this_present_warehouseId && that_present_warehouseId))
20811
          return false;
20812
        if (this.warehouseId != that.warehouseId)
20813
          return false;
20814
      }
20815
 
20816
      return true;
20817
    }
20818
 
20819
    @Override
20820
    public int hashCode() {
20821
      return 0;
20822
    }
20823
 
20824
    public int compareTo(changeWarehouseForPO_args other) {
20825
      if (!getClass().equals(other.getClass())) {
20826
        return getClass().getName().compareTo(other.getClass().getName());
20827
      }
20828
 
20829
      int lastComparison = 0;
20830
      changeWarehouseForPO_args typedOther = (changeWarehouseForPO_args)other;
20831
 
20832
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
20833
      if (lastComparison != 0) {
20834
        return lastComparison;
20835
      }
20836
      if (isSetId()) {
20837
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
20838
        if (lastComparison != 0) {
20839
          return lastComparison;
20840
        }
20841
      }
20842
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
20843
      if (lastComparison != 0) {
20844
        return lastComparison;
20845
      }
20846
      if (isSetWarehouseId()) {
20847
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
20848
        if (lastComparison != 0) {
20849
          return lastComparison;
20850
        }
20851
      }
20852
      return 0;
20853
    }
20854
 
20855
    public _Fields fieldForId(int fieldId) {
20856
      return _Fields.findByThriftId(fieldId);
20857
    }
20858
 
20859
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20860
      org.apache.thrift.protocol.TField field;
20861
      iprot.readStructBegin();
20862
      while (true)
20863
      {
20864
        field = iprot.readFieldBegin();
20865
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20866
          break;
20867
        }
20868
        switch (field.id) {
20869
          case 1: // ID
20870
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20871
              this.id = iprot.readI64();
20872
              setIdIsSet(true);
20873
            } else { 
20874
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20875
            }
20876
            break;
20877
          case 2: // WAREHOUSE_ID
20878
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20879
              this.warehouseId = iprot.readI64();
20880
              setWarehouseIdIsSet(true);
20881
            } else { 
20882
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20883
            }
20884
            break;
20885
          default:
20886
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20887
        }
20888
        iprot.readFieldEnd();
20889
      }
20890
      iprot.readStructEnd();
20891
      validate();
20892
    }
20893
 
20894
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20895
      validate();
20896
 
20897
      oprot.writeStructBegin(STRUCT_DESC);
20898
      oprot.writeFieldBegin(ID_FIELD_DESC);
20899
      oprot.writeI64(this.id);
20900
      oprot.writeFieldEnd();
20901
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
20902
      oprot.writeI64(this.warehouseId);
20903
      oprot.writeFieldEnd();
20904
      oprot.writeFieldStop();
20905
      oprot.writeStructEnd();
20906
    }
20907
 
20908
    @Override
20909
    public String toString() {
20910
      StringBuilder sb = new StringBuilder("changeWarehouseForPO_args(");
20911
      boolean first = true;
20912
 
20913
      sb.append("id:");
20914
      sb.append(this.id);
20915
      first = false;
20916
      if (!first) sb.append(", ");
20917
      sb.append("warehouseId:");
20918
      sb.append(this.warehouseId);
20919
      first = false;
20920
      sb.append(")");
20921
      return sb.toString();
20922
    }
20923
 
20924
    public void validate() throws org.apache.thrift.TException {
20925
      // check for required fields
20926
    }
20927
 
20928
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20929
      try {
20930
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20931
      } catch (org.apache.thrift.TException te) {
20932
        throw new java.io.IOException(te);
20933
      }
20934
    }
20935
 
20936
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20937
      try {
20938
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20939
      } catch (org.apache.thrift.TException te) {
20940
        throw new java.io.IOException(te);
20941
      }
20942
    }
20943
 
20944
  }
20945
 
20946
  public static class changeWarehouseForPO_result implements org.apache.thrift.TBase<changeWarehouseForPO_result, changeWarehouseForPO_result._Fields>, java.io.Serializable, Cloneable   {
20947
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changeWarehouseForPO_result");
20948
 
20949
    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
20950
 
20951
    private PurchaseServiceException e; // required
20952
 
20953
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20954
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20955
      E((short)1, "e");
20956
 
20957
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20958
 
20959
      static {
20960
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20961
          byName.put(field.getFieldName(), field);
20962
        }
20963
      }
20964
 
20965
      /**
20966
       * Find the _Fields constant that matches fieldId, or null if its not found.
20967
       */
20968
      public static _Fields findByThriftId(int fieldId) {
20969
        switch(fieldId) {
20970
          case 1: // E
20971
            return E;
20972
          default:
20973
            return null;
20974
        }
20975
      }
20976
 
20977
      /**
20978
       * Find the _Fields constant that matches fieldId, throwing an exception
20979
       * if it is not found.
20980
       */
20981
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20982
        _Fields fields = findByThriftId(fieldId);
20983
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20984
        return fields;
20985
      }
20986
 
20987
      /**
20988
       * Find the _Fields constant that matches name, or null if its not found.
20989
       */
20990
      public static _Fields findByName(String name) {
20991
        return byName.get(name);
20992
      }
20993
 
20994
      private final short _thriftId;
20995
      private final String _fieldName;
20996
 
20997
      _Fields(short thriftId, String fieldName) {
20998
        _thriftId = thriftId;
20999
        _fieldName = fieldName;
21000
      }
21001
 
21002
      public short getThriftFieldId() {
21003
        return _thriftId;
21004
      }
21005
 
21006
      public String getFieldName() {
21007
        return _fieldName;
21008
      }
21009
    }
21010
 
21011
    // isset id assignments
21012
 
21013
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
21014
    static {
21015
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
21016
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21017
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
21018
      metaDataMap = Collections.unmodifiableMap(tmpMap);
21019
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changeWarehouseForPO_result.class, metaDataMap);
21020
    }
21021
 
21022
    public changeWarehouseForPO_result() {
21023
    }
21024
 
21025
    public changeWarehouseForPO_result(
21026
      PurchaseServiceException e)
21027
    {
21028
      this();
21029
      this.e = e;
21030
    }
21031
 
21032
    /**
21033
     * Performs a deep copy on <i>other</i>.
21034
     */
21035
    public changeWarehouseForPO_result(changeWarehouseForPO_result other) {
21036
      if (other.isSetE()) {
21037
        this.e = new PurchaseServiceException(other.e);
21038
      }
21039
    }
21040
 
21041
    public changeWarehouseForPO_result deepCopy() {
21042
      return new changeWarehouseForPO_result(this);
21043
    }
21044
 
21045
    @Override
21046
    public void clear() {
21047
      this.e = null;
21048
    }
21049
 
21050
    public PurchaseServiceException getE() {
21051
      return this.e;
21052
    }
21053
 
21054
    public void setE(PurchaseServiceException e) {
21055
      this.e = e;
21056
    }
21057
 
21058
    public void unsetE() {
21059
      this.e = null;
21060
    }
21061
 
21062
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
21063
    public boolean isSetE() {
21064
      return this.e != null;
21065
    }
21066
 
21067
    public void setEIsSet(boolean value) {
21068
      if (!value) {
21069
        this.e = null;
21070
      }
21071
    }
21072
 
21073
    public void setFieldValue(_Fields field, Object value) {
21074
      switch (field) {
21075
      case E:
21076
        if (value == null) {
21077
          unsetE();
21078
        } else {
21079
          setE((PurchaseServiceException)value);
21080
        }
21081
        break;
21082
 
21083
      }
21084
    }
21085
 
21086
    public Object getFieldValue(_Fields field) {
21087
      switch (field) {
21088
      case E:
21089
        return getE();
21090
 
21091
      }
21092
      throw new IllegalStateException();
21093
    }
21094
 
21095
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
21096
    public boolean isSet(_Fields field) {
21097
      if (field == null) {
21098
        throw new IllegalArgumentException();
21099
      }
21100
 
21101
      switch (field) {
21102
      case E:
21103
        return isSetE();
21104
      }
21105
      throw new IllegalStateException();
21106
    }
21107
 
21108
    @Override
21109
    public boolean equals(Object that) {
21110
      if (that == null)
21111
        return false;
21112
      if (that instanceof changeWarehouseForPO_result)
21113
        return this.equals((changeWarehouseForPO_result)that);
21114
      return false;
21115
    }
21116
 
21117
    public boolean equals(changeWarehouseForPO_result that) {
21118
      if (that == null)
21119
        return false;
21120
 
21121
      boolean this_present_e = true && this.isSetE();
21122
      boolean that_present_e = true && that.isSetE();
21123
      if (this_present_e || that_present_e) {
21124
        if (!(this_present_e && that_present_e))
21125
          return false;
21126
        if (!this.e.equals(that.e))
21127
          return false;
21128
      }
21129
 
21130
      return true;
21131
    }
21132
 
21133
    @Override
21134
    public int hashCode() {
21135
      return 0;
21136
    }
21137
 
21138
    public int compareTo(changeWarehouseForPO_result other) {
21139
      if (!getClass().equals(other.getClass())) {
21140
        return getClass().getName().compareTo(other.getClass().getName());
21141
      }
21142
 
21143
      int lastComparison = 0;
21144
      changeWarehouseForPO_result typedOther = (changeWarehouseForPO_result)other;
21145
 
21146
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
21147
      if (lastComparison != 0) {
21148
        return lastComparison;
21149
      }
21150
      if (isSetE()) {
21151
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
21152
        if (lastComparison != 0) {
21153
          return lastComparison;
21154
        }
21155
      }
21156
      return 0;
21157
    }
21158
 
21159
    public _Fields fieldForId(int fieldId) {
21160
      return _Fields.findByThriftId(fieldId);
21161
    }
21162
 
21163
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
21164
      org.apache.thrift.protocol.TField field;
21165
      iprot.readStructBegin();
21166
      while (true)
21167
      {
21168
        field = iprot.readFieldBegin();
21169
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
21170
          break;
21171
        }
21172
        switch (field.id) {
21173
          case 1: // E
21174
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
21175
              this.e = new PurchaseServiceException();
21176
              this.e.read(iprot);
21177
            } else { 
21178
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21179
            }
21180
            break;
21181
          default:
21182
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21183
        }
21184
        iprot.readFieldEnd();
21185
      }
21186
      iprot.readStructEnd();
21187
      validate();
21188
    }
21189
 
21190
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
21191
      oprot.writeStructBegin(STRUCT_DESC);
21192
 
21193
      if (this.isSetE()) {
21194
        oprot.writeFieldBegin(E_FIELD_DESC);
21195
        this.e.write(oprot);
21196
        oprot.writeFieldEnd();
21197
      }
21198
      oprot.writeFieldStop();
21199
      oprot.writeStructEnd();
21200
    }
21201
 
21202
    @Override
21203
    public String toString() {
21204
      StringBuilder sb = new StringBuilder("changeWarehouseForPO_result(");
21205
      boolean first = true;
21206
 
21207
      sb.append("e:");
21208
      if (this.e == null) {
21209
        sb.append("null");
21210
      } else {
21211
        sb.append(this.e);
21212
      }
21213
      first = false;
21214
      sb.append(")");
21215
      return sb.toString();
21216
    }
21217
 
21218
    public void validate() throws org.apache.thrift.TException {
21219
      // check for required fields
21220
    }
21221
 
21222
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21223
      try {
21224
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
21225
      } catch (org.apache.thrift.TException te) {
21226
        throw new java.io.IOException(te);
21227
      }
21228
    }
21229
 
21230
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
21231
      try {
21232
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
21233
      } catch (org.apache.thrift.TException te) {
21234
        throw new java.io.IOException(te);
21235
      }
21236
    }
21237
 
21238
  }
21239
 
9925 amar.kumar 21240
  public static class changePOStatus_args implements org.apache.thrift.TBase<changePOStatus_args, changePOStatus_args._Fields>, java.io.Serializable, Cloneable   {
21241
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changePOStatus_args");
21242
 
21243
    private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);
21244
    private static final org.apache.thrift.protocol.TField PO_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("poStatus", org.apache.thrift.protocol.TType.I32, (short)2);
21245
 
21246
    private long id; // required
21247
    private POStatus poStatus; // required
21248
 
21249
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21250
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
21251
      ID((short)1, "id"),
21252
      /**
21253
       * 
21254
       * @see POStatus
21255
       */
21256
      PO_STATUS((short)2, "poStatus");
21257
 
21258
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21259
 
21260
      static {
21261
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21262
          byName.put(field.getFieldName(), field);
21263
        }
21264
      }
21265
 
21266
      /**
21267
       * Find the _Fields constant that matches fieldId, or null if its not found.
21268
       */
21269
      public static _Fields findByThriftId(int fieldId) {
21270
        switch(fieldId) {
21271
          case 1: // ID
21272
            return ID;
21273
          case 2: // PO_STATUS
21274
            return PO_STATUS;
21275
          default:
21276
            return null;
21277
        }
21278
      }
21279
 
21280
      /**
21281
       * Find the _Fields constant that matches fieldId, throwing an exception
21282
       * if it is not found.
21283
       */
21284
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21285
        _Fields fields = findByThriftId(fieldId);
21286
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21287
        return fields;
21288
      }
21289
 
21290
      /**
21291
       * Find the _Fields constant that matches name, or null if its not found.
21292
       */
21293
      public static _Fields findByName(String name) {
21294
        return byName.get(name);
21295
      }
21296
 
21297
      private final short _thriftId;
21298
      private final String _fieldName;
21299
 
21300
      _Fields(short thriftId, String fieldName) {
21301
        _thriftId = thriftId;
21302
        _fieldName = fieldName;
21303
      }
21304
 
21305
      public short getThriftFieldId() {
21306
        return _thriftId;
21307
      }
21308
 
21309
      public String getFieldName() {
21310
        return _fieldName;
21311
      }
21312
    }
21313
 
21314
    // isset id assignments
21315
    private static final int __ID_ISSET_ID = 0;
21316
    private BitSet __isset_bit_vector = new BitSet(1);
21317
 
21318
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
21319
    static {
21320
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
21321
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21322
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
21323
      tmpMap.put(_Fields.PO_STATUS, new org.apache.thrift.meta_data.FieldMetaData("poStatus", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21324
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, POStatus.class)));
21325
      metaDataMap = Collections.unmodifiableMap(tmpMap);
21326
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changePOStatus_args.class, metaDataMap);
21327
    }
21328
 
21329
    public changePOStatus_args() {
21330
    }
21331
 
21332
    public changePOStatus_args(
21333
      long id,
21334
      POStatus poStatus)
21335
    {
21336
      this();
21337
      this.id = id;
21338
      setIdIsSet(true);
21339
      this.poStatus = poStatus;
21340
    }
21341
 
21342
    /**
21343
     * Performs a deep copy on <i>other</i>.
21344
     */
21345
    public changePOStatus_args(changePOStatus_args other) {
21346
      __isset_bit_vector.clear();
21347
      __isset_bit_vector.or(other.__isset_bit_vector);
21348
      this.id = other.id;
21349
      if (other.isSetPoStatus()) {
21350
        this.poStatus = other.poStatus;
21351
      }
21352
    }
21353
 
21354
    public changePOStatus_args deepCopy() {
21355
      return new changePOStatus_args(this);
21356
    }
21357
 
21358
    @Override
21359
    public void clear() {
21360
      setIdIsSet(false);
21361
      this.id = 0;
21362
      this.poStatus = null;
21363
    }
21364
 
21365
    public long getId() {
21366
      return this.id;
21367
    }
21368
 
21369
    public void setId(long id) {
21370
      this.id = id;
21371
      setIdIsSet(true);
21372
    }
21373
 
21374
    public void unsetId() {
21375
      __isset_bit_vector.clear(__ID_ISSET_ID);
21376
    }
21377
 
21378
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
21379
    public boolean isSetId() {
21380
      return __isset_bit_vector.get(__ID_ISSET_ID);
21381
    }
21382
 
21383
    public void setIdIsSet(boolean value) {
21384
      __isset_bit_vector.set(__ID_ISSET_ID, value);
21385
    }
21386
 
21387
    /**
21388
     * 
21389
     * @see POStatus
21390
     */
21391
    public POStatus getPoStatus() {
21392
      return this.poStatus;
21393
    }
21394
 
21395
    /**
21396
     * 
21397
     * @see POStatus
21398
     */
21399
    public void setPoStatus(POStatus poStatus) {
21400
      this.poStatus = poStatus;
21401
    }
21402
 
21403
    public void unsetPoStatus() {
21404
      this.poStatus = null;
21405
    }
21406
 
21407
    /** Returns true if field poStatus is set (has been assigned a value) and false otherwise */
21408
    public boolean isSetPoStatus() {
21409
      return this.poStatus != null;
21410
    }
21411
 
21412
    public void setPoStatusIsSet(boolean value) {
21413
      if (!value) {
21414
        this.poStatus = null;
21415
      }
21416
    }
21417
 
21418
    public void setFieldValue(_Fields field, Object value) {
21419
      switch (field) {
21420
      case ID:
21421
        if (value == null) {
21422
          unsetId();
21423
        } else {
21424
          setId((Long)value);
21425
        }
21426
        break;
21427
 
21428
      case PO_STATUS:
21429
        if (value == null) {
21430
          unsetPoStatus();
21431
        } else {
21432
          setPoStatus((POStatus)value);
21433
        }
21434
        break;
21435
 
21436
      }
21437
    }
21438
 
21439
    public Object getFieldValue(_Fields field) {
21440
      switch (field) {
21441
      case ID:
21442
        return Long.valueOf(getId());
21443
 
21444
      case PO_STATUS:
21445
        return getPoStatus();
21446
 
21447
      }
21448
      throw new IllegalStateException();
21449
    }
21450
 
21451
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
21452
    public boolean isSet(_Fields field) {
21453
      if (field == null) {
21454
        throw new IllegalArgumentException();
21455
      }
21456
 
21457
      switch (field) {
21458
      case ID:
21459
        return isSetId();
21460
      case PO_STATUS:
21461
        return isSetPoStatus();
21462
      }
21463
      throw new IllegalStateException();
21464
    }
21465
 
21466
    @Override
21467
    public boolean equals(Object that) {
21468
      if (that == null)
21469
        return false;
21470
      if (that instanceof changePOStatus_args)
21471
        return this.equals((changePOStatus_args)that);
21472
      return false;
21473
    }
21474
 
21475
    public boolean equals(changePOStatus_args that) {
21476
      if (that == null)
21477
        return false;
21478
 
21479
      boolean this_present_id = true;
21480
      boolean that_present_id = true;
21481
      if (this_present_id || that_present_id) {
21482
        if (!(this_present_id && that_present_id))
21483
          return false;
21484
        if (this.id != that.id)
21485
          return false;
21486
      }
21487
 
21488
      boolean this_present_poStatus = true && this.isSetPoStatus();
21489
      boolean that_present_poStatus = true && that.isSetPoStatus();
21490
      if (this_present_poStatus || that_present_poStatus) {
21491
        if (!(this_present_poStatus && that_present_poStatus))
21492
          return false;
21493
        if (!this.poStatus.equals(that.poStatus))
21494
          return false;
21495
      }
21496
 
21497
      return true;
21498
    }
21499
 
21500
    @Override
21501
    public int hashCode() {
21502
      return 0;
21503
    }
21504
 
21505
    public int compareTo(changePOStatus_args other) {
21506
      if (!getClass().equals(other.getClass())) {
21507
        return getClass().getName().compareTo(other.getClass().getName());
21508
      }
21509
 
21510
      int lastComparison = 0;
21511
      changePOStatus_args typedOther = (changePOStatus_args)other;
21512
 
21513
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
21514
      if (lastComparison != 0) {
21515
        return lastComparison;
21516
      }
21517
      if (isSetId()) {
21518
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
21519
        if (lastComparison != 0) {
21520
          return lastComparison;
21521
        }
21522
      }
21523
      lastComparison = Boolean.valueOf(isSetPoStatus()).compareTo(typedOther.isSetPoStatus());
21524
      if (lastComparison != 0) {
21525
        return lastComparison;
21526
      }
21527
      if (isSetPoStatus()) {
21528
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.poStatus, typedOther.poStatus);
21529
        if (lastComparison != 0) {
21530
          return lastComparison;
21531
        }
21532
      }
21533
      return 0;
21534
    }
21535
 
21536
    public _Fields fieldForId(int fieldId) {
21537
      return _Fields.findByThriftId(fieldId);
21538
    }
21539
 
21540
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
21541
      org.apache.thrift.protocol.TField field;
21542
      iprot.readStructBegin();
21543
      while (true)
21544
      {
21545
        field = iprot.readFieldBegin();
21546
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
21547
          break;
21548
        }
21549
        switch (field.id) {
21550
          case 1: // ID
21551
            if (field.type == org.apache.thrift.protocol.TType.I64) {
21552
              this.id = iprot.readI64();
21553
              setIdIsSet(true);
21554
            } else { 
21555
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21556
            }
21557
            break;
21558
          case 2: // PO_STATUS
21559
            if (field.type == org.apache.thrift.protocol.TType.I32) {
21560
              this.poStatus = POStatus.findByValue(iprot.readI32());
21561
            } else { 
21562
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21563
            }
21564
            break;
21565
          default:
21566
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21567
        }
21568
        iprot.readFieldEnd();
21569
      }
21570
      iprot.readStructEnd();
21571
      validate();
21572
    }
21573
 
21574
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
21575
      validate();
21576
 
21577
      oprot.writeStructBegin(STRUCT_DESC);
21578
      oprot.writeFieldBegin(ID_FIELD_DESC);
21579
      oprot.writeI64(this.id);
21580
      oprot.writeFieldEnd();
21581
      if (this.poStatus != null) {
21582
        oprot.writeFieldBegin(PO_STATUS_FIELD_DESC);
21583
        oprot.writeI32(this.poStatus.getValue());
21584
        oprot.writeFieldEnd();
21585
      }
21586
      oprot.writeFieldStop();
21587
      oprot.writeStructEnd();
21588
    }
21589
 
21590
    @Override
21591
    public String toString() {
21592
      StringBuilder sb = new StringBuilder("changePOStatus_args(");
21593
      boolean first = true;
21594
 
21595
      sb.append("id:");
21596
      sb.append(this.id);
21597
      first = false;
21598
      if (!first) sb.append(", ");
21599
      sb.append("poStatus:");
21600
      if (this.poStatus == null) {
21601
        sb.append("null");
21602
      } else {
21603
        sb.append(this.poStatus);
21604
      }
21605
      first = false;
21606
      sb.append(")");
21607
      return sb.toString();
21608
    }
21609
 
21610
    public void validate() throws org.apache.thrift.TException {
21611
      // check for required fields
21612
    }
21613
 
21614
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21615
      try {
21616
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
21617
      } catch (org.apache.thrift.TException te) {
21618
        throw new java.io.IOException(te);
21619
      }
21620
    }
21621
 
21622
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
21623
      try {
21624
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
21625
        __isset_bit_vector = new BitSet(1);
21626
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
21627
      } catch (org.apache.thrift.TException te) {
21628
        throw new java.io.IOException(te);
21629
      }
21630
    }
21631
 
21632
  }
21633
 
21634
  public static class changePOStatus_result implements org.apache.thrift.TBase<changePOStatus_result, changePOStatus_result._Fields>, java.io.Serializable, Cloneable   {
21635
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changePOStatus_result");
21636
 
21637
    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
21638
 
21639
    private PurchaseServiceException e; // required
21640
 
21641
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21642
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
21643
      E((short)1, "e");
21644
 
21645
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21646
 
21647
      static {
21648
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21649
          byName.put(field.getFieldName(), field);
21650
        }
21651
      }
21652
 
21653
      /**
21654
       * Find the _Fields constant that matches fieldId, or null if its not found.
21655
       */
21656
      public static _Fields findByThriftId(int fieldId) {
21657
        switch(fieldId) {
21658
          case 1: // E
21659
            return E;
21660
          default:
21661
            return null;
21662
        }
21663
      }
21664
 
21665
      /**
21666
       * Find the _Fields constant that matches fieldId, throwing an exception
21667
       * if it is not found.
21668
       */
21669
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21670
        _Fields fields = findByThriftId(fieldId);
21671
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21672
        return fields;
21673
      }
21674
 
21675
      /**
21676
       * Find the _Fields constant that matches name, or null if its not found.
21677
       */
21678
      public static _Fields findByName(String name) {
21679
        return byName.get(name);
21680
      }
21681
 
21682
      private final short _thriftId;
21683
      private final String _fieldName;
21684
 
21685
      _Fields(short thriftId, String fieldName) {
21686
        _thriftId = thriftId;
21687
        _fieldName = fieldName;
21688
      }
21689
 
21690
      public short getThriftFieldId() {
21691
        return _thriftId;
21692
      }
21693
 
21694
      public String getFieldName() {
21695
        return _fieldName;
21696
      }
21697
    }
21698
 
21699
    // isset id assignments
21700
 
21701
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
21702
    static {
21703
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
21704
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21705
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
21706
      metaDataMap = Collections.unmodifiableMap(tmpMap);
21707
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changePOStatus_result.class, metaDataMap);
21708
    }
21709
 
21710
    public changePOStatus_result() {
21711
    }
21712
 
21713
    public changePOStatus_result(
21714
      PurchaseServiceException e)
21715
    {
21716
      this();
21717
      this.e = e;
21718
    }
21719
 
21720
    /**
21721
     * Performs a deep copy on <i>other</i>.
21722
     */
21723
    public changePOStatus_result(changePOStatus_result other) {
21724
      if (other.isSetE()) {
21725
        this.e = new PurchaseServiceException(other.e);
21726
      }
21727
    }
21728
 
21729
    public changePOStatus_result deepCopy() {
21730
      return new changePOStatus_result(this);
21731
    }
21732
 
21733
    @Override
21734
    public void clear() {
21735
      this.e = null;
21736
    }
21737
 
21738
    public PurchaseServiceException getE() {
21739
      return this.e;
21740
    }
21741
 
21742
    public void setE(PurchaseServiceException e) {
21743
      this.e = e;
21744
    }
21745
 
21746
    public void unsetE() {
21747
      this.e = null;
21748
    }
21749
 
21750
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
21751
    public boolean isSetE() {
21752
      return this.e != null;
21753
    }
21754
 
21755
    public void setEIsSet(boolean value) {
21756
      if (!value) {
21757
        this.e = null;
21758
      }
21759
    }
21760
 
21761
    public void setFieldValue(_Fields field, Object value) {
21762
      switch (field) {
21763
      case E:
21764
        if (value == null) {
21765
          unsetE();
21766
        } else {
21767
          setE((PurchaseServiceException)value);
21768
        }
21769
        break;
21770
 
21771
      }
21772
    }
21773
 
21774
    public Object getFieldValue(_Fields field) {
21775
      switch (field) {
21776
      case E:
21777
        return getE();
21778
 
21779
      }
21780
      throw new IllegalStateException();
21781
    }
21782
 
21783
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
21784
    public boolean isSet(_Fields field) {
21785
      if (field == null) {
21786
        throw new IllegalArgumentException();
21787
      }
21788
 
21789
      switch (field) {
21790
      case E:
21791
        return isSetE();
21792
      }
21793
      throw new IllegalStateException();
21794
    }
21795
 
21796
    @Override
21797
    public boolean equals(Object that) {
21798
      if (that == null)
21799
        return false;
21800
      if (that instanceof changePOStatus_result)
21801
        return this.equals((changePOStatus_result)that);
21802
      return false;
21803
    }
21804
 
21805
    public boolean equals(changePOStatus_result that) {
21806
      if (that == null)
21807
        return false;
21808
 
21809
      boolean this_present_e = true && this.isSetE();
21810
      boolean that_present_e = true && that.isSetE();
21811
      if (this_present_e || that_present_e) {
21812
        if (!(this_present_e && that_present_e))
21813
          return false;
21814
        if (!this.e.equals(that.e))
21815
          return false;
21816
      }
21817
 
21818
      return true;
21819
    }
21820
 
21821
    @Override
21822
    public int hashCode() {
21823
      return 0;
21824
    }
21825
 
21826
    public int compareTo(changePOStatus_result other) {
21827
      if (!getClass().equals(other.getClass())) {
21828
        return getClass().getName().compareTo(other.getClass().getName());
21829
      }
21830
 
21831
      int lastComparison = 0;
21832
      changePOStatus_result typedOther = (changePOStatus_result)other;
21833
 
21834
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
21835
      if (lastComparison != 0) {
21836
        return lastComparison;
21837
      }
21838
      if (isSetE()) {
21839
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
21840
        if (lastComparison != 0) {
21841
          return lastComparison;
21842
        }
21843
      }
21844
      return 0;
21845
    }
21846
 
21847
    public _Fields fieldForId(int fieldId) {
21848
      return _Fields.findByThriftId(fieldId);
21849
    }
21850
 
21851
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
21852
      org.apache.thrift.protocol.TField field;
21853
      iprot.readStructBegin();
21854
      while (true)
21855
      {
21856
        field = iprot.readFieldBegin();
21857
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
21858
          break;
21859
        }
21860
        switch (field.id) {
21861
          case 1: // E
21862
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
21863
              this.e = new PurchaseServiceException();
21864
              this.e.read(iprot);
21865
            } else { 
21866
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21867
            }
21868
            break;
21869
          default:
21870
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21871
        }
21872
        iprot.readFieldEnd();
21873
      }
21874
      iprot.readStructEnd();
21875
      validate();
21876
    }
21877
 
21878
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
21879
      oprot.writeStructBegin(STRUCT_DESC);
21880
 
21881
      if (this.isSetE()) {
21882
        oprot.writeFieldBegin(E_FIELD_DESC);
21883
        this.e.write(oprot);
21884
        oprot.writeFieldEnd();
21885
      }
21886
      oprot.writeFieldStop();
21887
      oprot.writeStructEnd();
21888
    }
21889
 
21890
    @Override
21891
    public String toString() {
21892
      StringBuilder sb = new StringBuilder("changePOStatus_result(");
21893
      boolean first = true;
21894
 
21895
      sb.append("e:");
21896
      if (this.e == null) {
21897
        sb.append("null");
21898
      } else {
21899
        sb.append(this.e);
21900
      }
21901
      first = false;
21902
      sb.append(")");
21903
      return sb.toString();
21904
    }
21905
 
21906
    public void validate() throws org.apache.thrift.TException {
21907
      // check for required fields
21908
    }
21909
 
21910
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21911
      try {
21912
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
21913
      } catch (org.apache.thrift.TException te) {
21914
        throw new java.io.IOException(te);
21915
      }
21916
    }
21917
 
21918
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
21919
      try {
21920
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
21921
      } catch (org.apache.thrift.TException te) {
21922
        throw new java.io.IOException(te);
21923
      }
21924
    }
21925
 
21926
  }
21927
 
11751 manish.sha 21928
  public static class getPurchaseReturn_args implements org.apache.thrift.TBase<getPurchaseReturn_args, getPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
21929
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseReturn_args");
21930
 
21931
    private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);
21932
 
21933
    private long id; // required
21934
 
21935
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21936
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
21937
      ID((short)1, "id");
21938
 
21939
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21940
 
21941
      static {
21942
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21943
          byName.put(field.getFieldName(), field);
21944
        }
21945
      }
21946
 
21947
      /**
21948
       * Find the _Fields constant that matches fieldId, or null if its not found.
21949
       */
21950
      public static _Fields findByThriftId(int fieldId) {
21951
        switch(fieldId) {
21952
          case 1: // ID
21953
            return ID;
21954
          default:
21955
            return null;
21956
        }
21957
      }
21958
 
21959
      /**
21960
       * Find the _Fields constant that matches fieldId, throwing an exception
21961
       * if it is not found.
21962
       */
21963
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21964
        _Fields fields = findByThriftId(fieldId);
21965
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21966
        return fields;
21967
      }
21968
 
21969
      /**
21970
       * Find the _Fields constant that matches name, or null if its not found.
21971
       */
21972
      public static _Fields findByName(String name) {
21973
        return byName.get(name);
21974
      }
21975
 
21976
      private final short _thriftId;
21977
      private final String _fieldName;
21978
 
21979
      _Fields(short thriftId, String fieldName) {
21980
        _thriftId = thriftId;
21981
        _fieldName = fieldName;
21982
      }
21983
 
21984
      public short getThriftFieldId() {
21985
        return _thriftId;
21986
      }
21987
 
21988
      public String getFieldName() {
21989
        return _fieldName;
21990
      }
21991
    }
21992
 
21993
    // isset id assignments
21994
    private static final int __ID_ISSET_ID = 0;
21995
    private BitSet __isset_bit_vector = new BitSet(1);
21996
 
21997
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
21998
    static {
21999
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
22000
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22001
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
22002
      metaDataMap = Collections.unmodifiableMap(tmpMap);
22003
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseReturn_args.class, metaDataMap);
22004
    }
22005
 
22006
    public getPurchaseReturn_args() {
22007
    }
22008
 
22009
    public getPurchaseReturn_args(
22010
      long id)
22011
    {
22012
      this();
22013
      this.id = id;
22014
      setIdIsSet(true);
22015
    }
22016
 
22017
    /**
22018
     * Performs a deep copy on <i>other</i>.
22019
     */
22020
    public getPurchaseReturn_args(getPurchaseReturn_args other) {
22021
      __isset_bit_vector.clear();
22022
      __isset_bit_vector.or(other.__isset_bit_vector);
22023
      this.id = other.id;
22024
    }
22025
 
22026
    public getPurchaseReturn_args deepCopy() {
22027
      return new getPurchaseReturn_args(this);
22028
    }
22029
 
22030
    @Override
22031
    public void clear() {
22032
      setIdIsSet(false);
22033
      this.id = 0;
22034
    }
22035
 
22036
    public long getId() {
22037
      return this.id;
22038
    }
22039
 
22040
    public void setId(long id) {
22041
      this.id = id;
22042
      setIdIsSet(true);
22043
    }
22044
 
22045
    public void unsetId() {
22046
      __isset_bit_vector.clear(__ID_ISSET_ID);
22047
    }
22048
 
22049
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
22050
    public boolean isSetId() {
22051
      return __isset_bit_vector.get(__ID_ISSET_ID);
22052
    }
22053
 
22054
    public void setIdIsSet(boolean value) {
22055
      __isset_bit_vector.set(__ID_ISSET_ID, value);
22056
    }
22057
 
22058
    public void setFieldValue(_Fields field, Object value) {
22059
      switch (field) {
22060
      case ID:
22061
        if (value == null) {
22062
          unsetId();
22063
        } else {
22064
          setId((Long)value);
22065
        }
22066
        break;
22067
 
22068
      }
22069
    }
22070
 
22071
    public Object getFieldValue(_Fields field) {
22072
      switch (field) {
22073
      case ID:
22074
        return Long.valueOf(getId());
22075
 
22076
      }
22077
      throw new IllegalStateException();
22078
    }
22079
 
22080
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
22081
    public boolean isSet(_Fields field) {
22082
      if (field == null) {
22083
        throw new IllegalArgumentException();
22084
      }
22085
 
22086
      switch (field) {
22087
      case ID:
22088
        return isSetId();
22089
      }
22090
      throw new IllegalStateException();
22091
    }
22092
 
22093
    @Override
22094
    public boolean equals(Object that) {
22095
      if (that == null)
22096
        return false;
22097
      if (that instanceof getPurchaseReturn_args)
22098
        return this.equals((getPurchaseReturn_args)that);
22099
      return false;
22100
    }
22101
 
22102
    public boolean equals(getPurchaseReturn_args that) {
22103
      if (that == null)
22104
        return false;
22105
 
22106
      boolean this_present_id = true;
22107
      boolean that_present_id = true;
22108
      if (this_present_id || that_present_id) {
22109
        if (!(this_present_id && that_present_id))
22110
          return false;
22111
        if (this.id != that.id)
22112
          return false;
22113
      }
22114
 
22115
      return true;
22116
    }
22117
 
22118
    @Override
22119
    public int hashCode() {
22120
      return 0;
22121
    }
22122
 
22123
    public int compareTo(getPurchaseReturn_args other) {
22124
      if (!getClass().equals(other.getClass())) {
22125
        return getClass().getName().compareTo(other.getClass().getName());
22126
      }
22127
 
22128
      int lastComparison = 0;
22129
      getPurchaseReturn_args typedOther = (getPurchaseReturn_args)other;
22130
 
22131
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
22132
      if (lastComparison != 0) {
22133
        return lastComparison;
22134
      }
22135
      if (isSetId()) {
22136
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
22137
        if (lastComparison != 0) {
22138
          return lastComparison;
22139
        }
22140
      }
22141
      return 0;
22142
    }
22143
 
22144
    public _Fields fieldForId(int fieldId) {
22145
      return _Fields.findByThriftId(fieldId);
22146
    }
22147
 
22148
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
22149
      org.apache.thrift.protocol.TField field;
22150
      iprot.readStructBegin();
22151
      while (true)
22152
      {
22153
        field = iprot.readFieldBegin();
22154
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
22155
          break;
22156
        }
22157
        switch (field.id) {
22158
          case 1: // ID
22159
            if (field.type == org.apache.thrift.protocol.TType.I64) {
22160
              this.id = iprot.readI64();
22161
              setIdIsSet(true);
22162
            } else { 
22163
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22164
            }
22165
            break;
22166
          default:
22167
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22168
        }
22169
        iprot.readFieldEnd();
22170
      }
22171
      iprot.readStructEnd();
22172
      validate();
22173
    }
22174
 
22175
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
22176
      validate();
22177
 
22178
      oprot.writeStructBegin(STRUCT_DESC);
22179
      oprot.writeFieldBegin(ID_FIELD_DESC);
22180
      oprot.writeI64(this.id);
22181
      oprot.writeFieldEnd();
22182
      oprot.writeFieldStop();
22183
      oprot.writeStructEnd();
22184
    }
22185
 
22186
    @Override
22187
    public String toString() {
22188
      StringBuilder sb = new StringBuilder("getPurchaseReturn_args(");
22189
      boolean first = true;
22190
 
22191
      sb.append("id:");
22192
      sb.append(this.id);
22193
      first = false;
22194
      sb.append(")");
22195
      return sb.toString();
22196
    }
22197
 
22198
    public void validate() throws org.apache.thrift.TException {
22199
      // check for required fields
22200
    }
22201
 
22202
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
22203
      try {
22204
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
22205
      } catch (org.apache.thrift.TException te) {
22206
        throw new java.io.IOException(te);
22207
      }
22208
    }
22209
 
22210
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
22211
      try {
22212
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
22213
        __isset_bit_vector = new BitSet(1);
22214
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
22215
      } catch (org.apache.thrift.TException te) {
22216
        throw new java.io.IOException(te);
22217
      }
22218
    }
22219
 
22220
  }
22221
 
22222
  public static class getPurchaseReturn_result implements org.apache.thrift.TBase<getPurchaseReturn_result, getPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
22223
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseReturn_result");
22224
 
22225
    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);
22226
    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
22227
 
22228
    private PurchaseReturn success; // required
22229
    private PurchaseServiceException e; // required
22230
 
22231
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22232
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
22233
      SUCCESS((short)0, "success"),
22234
      E((short)1, "e");
22235
 
22236
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22237
 
22238
      static {
22239
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22240
          byName.put(field.getFieldName(), field);
22241
        }
22242
      }
22243
 
22244
      /**
22245
       * Find the _Fields constant that matches fieldId, or null if its not found.
22246
       */
22247
      public static _Fields findByThriftId(int fieldId) {
22248
        switch(fieldId) {
22249
          case 0: // SUCCESS
22250
            return SUCCESS;
22251
          case 1: // E
22252
            return E;
22253
          default:
22254
            return null;
22255
        }
22256
      }
22257
 
22258
      /**
22259
       * Find the _Fields constant that matches fieldId, throwing an exception
22260
       * if it is not found.
22261
       */
22262
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22263
        _Fields fields = findByThriftId(fieldId);
22264
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22265
        return fields;
22266
      }
22267
 
22268
      /**
22269
       * Find the _Fields constant that matches name, or null if its not found.
22270
       */
22271
      public static _Fields findByName(String name) {
22272
        return byName.get(name);
22273
      }
22274
 
22275
      private final short _thriftId;
22276
      private final String _fieldName;
22277
 
22278
      _Fields(short thriftId, String fieldName) {
22279
        _thriftId = thriftId;
22280
        _fieldName = fieldName;
22281
      }
22282
 
22283
      public short getThriftFieldId() {
22284
        return _thriftId;
22285
      }
22286
 
22287
      public String getFieldName() {
22288
        return _fieldName;
22289
      }
22290
    }
22291
 
22292
    // isset id assignments
22293
 
22294
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
22295
    static {
22296
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
22297
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22298
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class)));
22299
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22300
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
22301
      metaDataMap = Collections.unmodifiableMap(tmpMap);
22302
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseReturn_result.class, metaDataMap);
22303
    }
22304
 
22305
    public getPurchaseReturn_result() {
22306
    }
22307
 
22308
    public getPurchaseReturn_result(
22309
      PurchaseReturn success,
22310
      PurchaseServiceException e)
22311
    {
22312
      this();
22313
      this.success = success;
22314
      this.e = e;
22315
    }
22316
 
22317
    /**
22318
     * Performs a deep copy on <i>other</i>.
22319
     */
22320
    public getPurchaseReturn_result(getPurchaseReturn_result other) {
22321
      if (other.isSetSuccess()) {
22322
        this.success = new PurchaseReturn(other.success);
22323
      }
22324
      if (other.isSetE()) {
22325
        this.e = new PurchaseServiceException(other.e);
22326
      }
22327
    }
22328
 
22329
    public getPurchaseReturn_result deepCopy() {
22330
      return new getPurchaseReturn_result(this);
22331
    }
22332
 
22333
    @Override
22334
    public void clear() {
22335
      this.success = null;
22336
      this.e = null;
22337
    }
22338
 
22339
    public PurchaseReturn getSuccess() {
22340
      return this.success;
22341
    }
22342
 
22343
    public void setSuccess(PurchaseReturn success) {
22344
      this.success = success;
22345
    }
22346
 
22347
    public void unsetSuccess() {
22348
      this.success = null;
22349
    }
22350
 
22351
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
22352
    public boolean isSetSuccess() {
22353
      return this.success != null;
22354
    }
22355
 
22356
    public void setSuccessIsSet(boolean value) {
22357
      if (!value) {
22358
        this.success = null;
22359
      }
22360
    }
22361
 
22362
    public PurchaseServiceException getE() {
22363
      return this.e;
22364
    }
22365
 
22366
    public void setE(PurchaseServiceException e) {
22367
      this.e = e;
22368
    }
22369
 
22370
    public void unsetE() {
22371
      this.e = null;
22372
    }
22373
 
22374
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
22375
    public boolean isSetE() {
22376
      return this.e != null;
22377
    }
22378
 
22379
    public void setEIsSet(boolean value) {
22380
      if (!value) {
22381
        this.e = null;
22382
      }
22383
    }
22384
 
22385
    public void setFieldValue(_Fields field, Object value) {
22386
      switch (field) {
22387
      case SUCCESS:
22388
        if (value == null) {
22389
          unsetSuccess();
22390
        } else {
22391
          setSuccess((PurchaseReturn)value);
22392
        }
22393
        break;
22394
 
22395
      case E:
22396
        if (value == null) {
22397
          unsetE();
22398
        } else {
22399
          setE((PurchaseServiceException)value);
22400
        }
22401
        break;
22402
 
22403
      }
22404
    }
22405
 
22406
    public Object getFieldValue(_Fields field) {
22407
      switch (field) {
22408
      case SUCCESS:
22409
        return getSuccess();
22410
 
22411
      case E:
22412
        return getE();
22413
 
22414
      }
22415
      throw new IllegalStateException();
22416
    }
22417
 
22418
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
22419
    public boolean isSet(_Fields field) {
22420
      if (field == null) {
22421
        throw new IllegalArgumentException();
22422
      }
22423
 
22424
      switch (field) {
22425
      case SUCCESS:
22426
        return isSetSuccess();
22427
      case E:
22428
        return isSetE();
22429
      }
22430
      throw new IllegalStateException();
22431
    }
22432
 
22433
    @Override
22434
    public boolean equals(Object that) {
22435
      if (that == null)
22436
        return false;
22437
      if (that instanceof getPurchaseReturn_result)
22438
        return this.equals((getPurchaseReturn_result)that);
22439
      return false;
22440
    }
22441
 
22442
    public boolean equals(getPurchaseReturn_result that) {
22443
      if (that == null)
22444
        return false;
22445
 
22446
      boolean this_present_success = true && this.isSetSuccess();
22447
      boolean that_present_success = true && that.isSetSuccess();
22448
      if (this_present_success || that_present_success) {
22449
        if (!(this_present_success && that_present_success))
22450
          return false;
22451
        if (!this.success.equals(that.success))
22452
          return false;
22453
      }
22454
 
22455
      boolean this_present_e = true && this.isSetE();
22456
      boolean that_present_e = true && that.isSetE();
22457
      if (this_present_e || that_present_e) {
22458
        if (!(this_present_e && that_present_e))
22459
          return false;
22460
        if (!this.e.equals(that.e))
22461
          return false;
22462
      }
22463
 
22464
      return true;
22465
    }
22466
 
22467
    @Override
22468
    public int hashCode() {
22469
      return 0;
22470
    }
22471
 
22472
    public int compareTo(getPurchaseReturn_result other) {
22473
      if (!getClass().equals(other.getClass())) {
22474
        return getClass().getName().compareTo(other.getClass().getName());
22475
      }
22476
 
22477
      int lastComparison = 0;
22478
      getPurchaseReturn_result typedOther = (getPurchaseReturn_result)other;
22479
 
22480
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
22481
      if (lastComparison != 0) {
22482
        return lastComparison;
22483
      }
22484
      if (isSetSuccess()) {
22485
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
22486
        if (lastComparison != 0) {
22487
          return lastComparison;
22488
        }
22489
      }
22490
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
22491
      if (lastComparison != 0) {
22492
        return lastComparison;
22493
      }
22494
      if (isSetE()) {
22495
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
22496
        if (lastComparison != 0) {
22497
          return lastComparison;
22498
        }
22499
      }
22500
      return 0;
22501
    }
22502
 
22503
    public _Fields fieldForId(int fieldId) {
22504
      return _Fields.findByThriftId(fieldId);
22505
    }
22506
 
22507
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
22508
      org.apache.thrift.protocol.TField field;
22509
      iprot.readStructBegin();
22510
      while (true)
22511
      {
22512
        field = iprot.readFieldBegin();
22513
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
22514
          break;
22515
        }
22516
        switch (field.id) {
22517
          case 0: // SUCCESS
22518
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
22519
              this.success = new PurchaseReturn();
22520
              this.success.read(iprot);
22521
            } else { 
22522
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22523
            }
22524
            break;
22525
          case 1: // E
22526
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
22527
              this.e = new PurchaseServiceException();
22528
              this.e.read(iprot);
22529
            } else { 
22530
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22531
            }
22532
            break;
22533
          default:
22534
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22535
        }
22536
        iprot.readFieldEnd();
22537
      }
22538
      iprot.readStructEnd();
22539
      validate();
22540
    }
22541
 
22542
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
22543
      oprot.writeStructBegin(STRUCT_DESC);
22544
 
22545
      if (this.isSetSuccess()) {
22546
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
22547
        this.success.write(oprot);
22548
        oprot.writeFieldEnd();
22549
      } else if (this.isSetE()) {
22550
        oprot.writeFieldBegin(E_FIELD_DESC);
22551
        this.e.write(oprot);
22552
        oprot.writeFieldEnd();
22553
      }
22554
      oprot.writeFieldStop();
22555
      oprot.writeStructEnd();
22556
    }
22557
 
22558
    @Override
22559
    public String toString() {
22560
      StringBuilder sb = new StringBuilder("getPurchaseReturn_result(");
22561
      boolean first = true;
22562
 
22563
      sb.append("success:");
22564
      if (this.success == null) {
22565
        sb.append("null");
22566
      } else {
22567
        sb.append(this.success);
22568
      }
22569
      first = false;
22570
      if (!first) sb.append(", ");
22571
      sb.append("e:");
22572
      if (this.e == null) {
22573
        sb.append("null");
22574
      } else {
22575
        sb.append(this.e);
22576
      }
22577
      first = false;
22578
      sb.append(")");
22579
      return sb.toString();
22580
    }
22581
 
22582
    public void validate() throws org.apache.thrift.TException {
22583
      // check for required fields
22584
    }
22585
 
22586
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
22587
      try {
22588
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
22589
      } catch (org.apache.thrift.TException te) {
22590
        throw new java.io.IOException(te);
22591
      }
22592
    }
22593
 
22594
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
22595
      try {
22596
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
22597
      } catch (org.apache.thrift.TException te) {
22598
        throw new java.io.IOException(te);
22599
      }
22600
    }
22601
 
22602
  }
22603
 
4496 mandeep.dh 22604
}