Subversion Repositories SmartDukaan

Rev

Rev 11751 | Rev 13600 | 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
11801 manish.sha 63
     * @param purchaseComments
4496 mandeep.dh 64
     */
11801 manish.sha 65
    public long startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, String purchaseComments) throws PurchaseServiceException, org.apache.thrift.TException;
4496 mandeep.dh 66
 
67
    /**
68
     * Marks a purchase as complete and updates the receivedOn time.
69
     * Throws an exception if no such purchase exists.
70
     * 
71
     * @param purchaseId
72
     */
73
    public long closePurchase(long purchaseId) throws PurchaseServiceException, org.apache.thrift.TException;
74
 
75
    /**
76
     * Returns all open or closed purchases for the given purchase order. Throws an exception if no such purchase order exists
77
     * 
78
     * @param purchaseOrderId
79
     * @param open
80
     */
81
    public List<Purchase> getAllPurchases(long purchaseOrderId, boolean open) throws PurchaseServiceException, org.apache.thrift.TException;
82
 
83
    /**
6385 amar.kumar 84
     * Returns all purchases for the given purchase order. Throws an exception if no such purchase order exists
85
     * 
86
     * @param purchaseOrderId
87
     */
88
    public List<Purchase> getPurchasesForPO(long purchaseOrderId) throws PurchaseServiceException, org.apache.thrift.TException;
89
 
90
    /**
4555 mandeep.dh 91
     * Returns the purchase order object for a given purchase
4496 mandeep.dh 92
     * 
93
     * @param purchaseId
94
     */
4555 mandeep.dh 95
    public PurchaseOrder getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException;
4496 mandeep.dh 96
 
4754 mandeep.dh 97
    /**
98
     * Creates purchase order objects from pending orders
99
     * 
100
     * @param warehouseId
101
     */
102
    public List<PurchaseOrder> getPendingPurchaseOrders(long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException;
103
 
104
    /**
105
     * Returns all the valid suppliers
106
     */
107
    public List<Supplier> getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException;
108
 
109
    /**
110
     * Fulfills a given purchase order with an item.
111
     * 
112
     * @param purchaseOrderId
113
     * @param itemId
114
     * @param quantity
115
     */
116
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException;
117
 
118
    /**
119
     * Amends a PO as per the new lineitems passed
120
     * 
121
     * @param purchaseOrder
122
     */
123
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException;
124
 
5185 mandeep.dh 125
    /**
126
     * Fulfills a given purchase id with an item and its quantity.
127
     * 
128
     * @param purchaseId
129
     * @param itemId
130
     * @param quantity
131
     */
132
    public void unFulfillPO(long purchaseId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException;
133
 
5443 mandeep.dh 134
    /**
5530 mandeep.dh 135
     * Fetches all invoices after a given date
5443 mandeep.dh 136
     * 
137
     * @param date
138
     */
139
    public List<Invoice> getInvoices(long date) throws org.apache.thrift.TException;
140
 
141
    /**
7410 amar.kumar 142
     * Fetches all invoices after a given date
143
     * 
144
     * @param warehouseId
145
     * @param supplierId
146
     * @param date
147
     */
148
    public List<Invoice> getInvoicesForWarehouse(long warehouseId, long supplierId, long date) throws org.apache.thrift.TException;
149
 
150
    /**
5443 mandeep.dh 151
     * Creates an invoice object
152
     * 
153
     * @param invoice
154
     */
155
    public void createInvoice(Invoice invoice) throws PurchaseServiceException, org.apache.thrift.TException;
156
 
5591 mandeep.dh 157
    /**
158
     * Creates a supplier
159
     * 
160
     * @param supplier
161
     */
162
    public Supplier addSupplier(Supplier supplier) throws org.apache.thrift.TException;
163
 
164
    /**
165
     * Updates a supplier
166
     * 
167
     * @param supplier
168
     */
169
    public void updateSupplier(Supplier supplier) throws org.apache.thrift.TException;
170
 
6467 amar.kumar 171
    /**
172
     * Create a new Purchase Return
173
     * 
174
     * @param purchaseReturn
175
     */
176
    public long createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException;
177
 
178
    /**
179
     * Create a new Purchase Return
180
     * 
181
     * @param id
182
     */
183
    public void settlePurchaseReturn(long id) throws org.apache.thrift.TException;
184
 
185
    /**
186
     * Create a new Purchase Return
187
     */
188
    public List<PurchaseReturn> getUnsettledPurchaseReturns() throws org.apache.thrift.TException;
189
 
6630 amar.kumar 190
    /**
191
     * Get invoice with given supplierId and invoiceNumber
192
     * 
193
     * @param invoiceNumber
194
     * @param supplierId
195
     */
196
    public List<PurchaseReturn> getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException;
197
 
6762 amar.kumar 198
    /**
199
     *  * Inserts new Invoice/LineItem/Purchase Entries for Billed Product done through Our External Billing
200
     * *
201
     * 
202
     * @param invoiceNumber
203
     * @param unitPrice
7672 rajveer 204
     * @param nlc
6762 amar.kumar 205
     * @param itemId
206
     */
7672 rajveer 207
    public long createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId) throws org.apache.thrift.TException;
6762 amar.kumar 208
 
209
    public void fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException;
210
 
7410 amar.kumar 211
    /**
212
     * Marks a purchase order as closedcomplete and updates the receivedOn time.
213
     * 
214
     * @param poId
215
     */
216
    public void closePO(long poId) throws PurchaseServiceException, org.apache.thrift.TException;
217
 
218
    /**
219
     * Check if invoice is already received with given supplierId and invoiceNumber
220
     * 
221
     * @param invoiceNumber
222
     * @param supplierId
223
     */
224
    public boolean isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException;
225
 
9829 amar.kumar 226
    /**
227
     * Change warehouseId of PO if no items have been received yet for the PO
228
     * 
229
     * @param id
230
     * @param warehouseId
231
     */
232
    public void changeWarehouseForPO(long id, long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException;
233
 
9925 amar.kumar 234
    /**
235
     * Change status of PO
236
     * 
237
     * @param id
238
     * @param poStatus
239
     */
240
    public void changePOStatus(long id, POStatus poStatus) throws PurchaseServiceException, org.apache.thrift.TException;
241
 
11751 manish.sha 242
    /**
243
     * Get Purchase Return from Id
244
     * 
245
     * @param id
246
     */
247
    public PurchaseReturn getPurchaseReturn(long id) throws PurchaseServiceException, org.apache.thrift.TException;
248
 
4496 mandeep.dh 249
  }
250
 
251
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
252
 
253
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
254
 
255
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
256
 
257
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
258
 
259
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSupplier_call> resultHandler) throws org.apache.thrift.TException;
260
 
11801 manish.sha 261
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, String purchaseComments, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.startPurchase_call> resultHandler) throws org.apache.thrift.TException;
4496 mandeep.dh 262
 
263
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePurchase_call> resultHandler) throws org.apache.thrift.TException;
264
 
265
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchases_call> resultHandler) throws org.apache.thrift.TException;
266
 
6385 amar.kumar 267
    public void getPurchasesForPO(long purchaseOrderId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchasesForPO_call> resultHandler) throws org.apache.thrift.TException;
268
 
4555 mandeep.dh 269
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException;
4496 mandeep.dh 270
 
4754 mandeep.dh 271
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
272
 
273
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuppliers_call> resultHandler) throws org.apache.thrift.TException;
274
 
275
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fulfillPO_call> resultHandler) throws org.apache.thrift.TException;
276
 
277
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
278
 
5185 mandeep.dh 279
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.unFulfillPO_call> resultHandler) throws org.apache.thrift.TException;
280
 
5443 mandeep.dh 281
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoices_call> resultHandler) throws org.apache.thrift.TException;
282
 
7410 amar.kumar 283
    public void getInvoicesForWarehouse(long warehouseId, long supplierId, long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoicesForWarehouse_call> resultHandler) throws org.apache.thrift.TException;
284
 
5443 mandeep.dh 285
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createInvoice_call> resultHandler) throws org.apache.thrift.TException;
286
 
5591 mandeep.dh 287
    public void addSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addSupplier_call> resultHandler) throws org.apache.thrift.TException;
288
 
289
    public void updateSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateSupplier_call> resultHandler) throws org.apache.thrift.TException;
290
 
6467 amar.kumar 291
    public void createPurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
292
 
293
    public void settlePurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.settlePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
294
 
295
    public void getUnsettledPurchaseReturns(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUnsettledPurchaseReturns_call> resultHandler) throws org.apache.thrift.TException;
296
 
6630 amar.kumar 297
    public void getInvoice(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoice_call> resultHandler) throws org.apache.thrift.TException;
298
 
7672 rajveer 299
    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 300
 
301
    public void fulfillPOForExtBilling(long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fulfillPOForExtBilling_call> resultHandler) throws org.apache.thrift.TException;
302
 
7410 amar.kumar 303
    public void closePO(long poId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePO_call> resultHandler) throws org.apache.thrift.TException;
304
 
305
    public void isInvoiceReceived(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.isInvoiceReceived_call> resultHandler) throws org.apache.thrift.TException;
306
 
9829 amar.kumar 307
    public void changeWarehouseForPO(long id, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.changeWarehouseForPO_call> resultHandler) throws org.apache.thrift.TException;
308
 
9925 amar.kumar 309
    public void changePOStatus(long id, POStatus poStatus, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.changePOStatus_call> resultHandler) throws org.apache.thrift.TException;
310
 
11751 manish.sha 311
    public void getPurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
312
 
4496 mandeep.dh 313
  }
314
 
315
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
316
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
317
      public Factory() {}
318
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
319
        return new Client(prot);
320
      }
321
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
322
        return new Client(iprot, oprot);
323
      }
324
    }
325
 
326
    public Client(org.apache.thrift.protocol.TProtocol prot)
327
    {
328
      super(prot, prot);
329
    }
330
 
331
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
332
      super(iprot, oprot);
333
    }
334
 
335
    public long createPurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
336
    {
337
      send_createPurchaseOrder(purchaseOrder);
338
      return recv_createPurchaseOrder();
339
    }
340
 
341
    public void send_createPurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
342
    {
343
      createPurchaseOrder_args args = new createPurchaseOrder_args();
344
      args.setPurchaseOrder(purchaseOrder);
345
      sendBase("createPurchaseOrder", args);
346
    }
347
 
348
    public long recv_createPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
349
    {
350
      createPurchaseOrder_result result = new createPurchaseOrder_result();
351
      receiveBase(result, "createPurchaseOrder");
352
      if (result.isSetSuccess()) {
353
        return result.success;
354
      }
355
      if (result.e != null) {
356
        throw result.e;
357
      }
358
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseOrder failed: unknown result");
359
    }
360
 
361
    public PurchaseOrder getPurchaseOrder(long id) throws PurchaseServiceException, org.apache.thrift.TException
362
    {
363
      send_getPurchaseOrder(id);
364
      return recv_getPurchaseOrder();
365
    }
366
 
367
    public void send_getPurchaseOrder(long id) throws org.apache.thrift.TException
368
    {
369
      getPurchaseOrder_args args = new getPurchaseOrder_args();
370
      args.setId(id);
371
      sendBase("getPurchaseOrder", args);
372
    }
373
 
374
    public PurchaseOrder recv_getPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
375
    {
376
      getPurchaseOrder_result result = new getPurchaseOrder_result();
377
      receiveBase(result, "getPurchaseOrder");
378
      if (result.isSetSuccess()) {
379
        return result.success;
380
      }
381
      if (result.e != null) {
382
        throw result.e;
383
      }
384
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrder failed: unknown result");
385
    }
386
 
387
    public List<PurchaseOrder> getAllPurchaseOrders(POStatus status) throws PurchaseServiceException, org.apache.thrift.TException
388
    {
389
      send_getAllPurchaseOrders(status);
390
      return recv_getAllPurchaseOrders();
391
    }
392
 
393
    public void send_getAllPurchaseOrders(POStatus status) throws org.apache.thrift.TException
394
    {
395
      getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
396
      args.setStatus(status);
397
      sendBase("getAllPurchaseOrders", args);
398
    }
399
 
400
    public List<PurchaseOrder> recv_getAllPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
401
    {
402
      getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
403
      receiveBase(result, "getAllPurchaseOrders");
404
      if (result.isSetSuccess()) {
405
        return result.success;
406
      }
407
      if (result.e != null) {
408
        throw result.e;
409
      }
410
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchaseOrders failed: unknown result");
411
    }
412
 
413
    public Supplier getSupplier(long id) throws PurchaseServiceException, org.apache.thrift.TException
414
    {
415
      send_getSupplier(id);
416
      return recv_getSupplier();
417
    }
418
 
419
    public void send_getSupplier(long id) throws org.apache.thrift.TException
420
    {
421
      getSupplier_args args = new getSupplier_args();
422
      args.setId(id);
423
      sendBase("getSupplier", args);
424
    }
425
 
426
    public Supplier recv_getSupplier() throws PurchaseServiceException, org.apache.thrift.TException
427
    {
428
      getSupplier_result result = new getSupplier_result();
429
      receiveBase(result, "getSupplier");
430
      if (result.isSetSuccess()) {
431
        return result.success;
432
      }
433
      if (result.e != null) {
434
        throw result.e;
435
      }
436
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSupplier failed: unknown result");
437
    }
438
 
11801 manish.sha 439
    public long startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, String purchaseComments) throws PurchaseServiceException, org.apache.thrift.TException
4496 mandeep.dh 440
    {
11801 manish.sha 441
      send_startPurchase(purchaseOrderId, invoiceNumber, freightCharges, purchaseComments);
4496 mandeep.dh 442
      return recv_startPurchase();
443
    }
444
 
11801 manish.sha 445
    public void send_startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, String purchaseComments) throws org.apache.thrift.TException
4496 mandeep.dh 446
    {
447
      startPurchase_args args = new startPurchase_args();
448
      args.setPurchaseOrderId(purchaseOrderId);
449
      args.setInvoiceNumber(invoiceNumber);
450
      args.setFreightCharges(freightCharges);
11801 manish.sha 451
      args.setPurchaseComments(purchaseComments);
4496 mandeep.dh 452
      sendBase("startPurchase", args);
453
    }
454
 
455
    public long recv_startPurchase() throws PurchaseServiceException, org.apache.thrift.TException
456
    {
457
      startPurchase_result result = new startPurchase_result();
458
      receiveBase(result, "startPurchase");
459
      if (result.isSetSuccess()) {
460
        return result.success;
461
      }
462
      if (result.e != null) {
463
        throw result.e;
464
      }
465
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startPurchase failed: unknown result");
466
    }
467
 
468
    public long closePurchase(long purchaseId) throws PurchaseServiceException, org.apache.thrift.TException
469
    {
470
      send_closePurchase(purchaseId);
471
      return recv_closePurchase();
472
    }
473
 
474
    public void send_closePurchase(long purchaseId) throws org.apache.thrift.TException
475
    {
476
      closePurchase_args args = new closePurchase_args();
477
      args.setPurchaseId(purchaseId);
478
      sendBase("closePurchase", args);
479
    }
480
 
481
    public long recv_closePurchase() throws PurchaseServiceException, org.apache.thrift.TException
482
    {
483
      closePurchase_result result = new closePurchase_result();
484
      receiveBase(result, "closePurchase");
485
      if (result.isSetSuccess()) {
486
        return result.success;
487
      }
488
      if (result.e != null) {
489
        throw result.e;
490
      }
491
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "closePurchase failed: unknown result");
492
    }
493
 
494
    public List<Purchase> getAllPurchases(long purchaseOrderId, boolean open) throws PurchaseServiceException, org.apache.thrift.TException
495
    {
496
      send_getAllPurchases(purchaseOrderId, open);
497
      return recv_getAllPurchases();
498
    }
499
 
500
    public void send_getAllPurchases(long purchaseOrderId, boolean open) throws org.apache.thrift.TException
501
    {
502
      getAllPurchases_args args = new getAllPurchases_args();
503
      args.setPurchaseOrderId(purchaseOrderId);
504
      args.setOpen(open);
505
      sendBase("getAllPurchases", args);
506
    }
507
 
508
    public List<Purchase> recv_getAllPurchases() throws PurchaseServiceException, org.apache.thrift.TException
509
    {
510
      getAllPurchases_result result = new getAllPurchases_result();
511
      receiveBase(result, "getAllPurchases");
512
      if (result.isSetSuccess()) {
513
        return result.success;
514
      }
515
      if (result.e != null) {
516
        throw result.e;
517
      }
518
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchases failed: unknown result");
519
    }
520
 
6385 amar.kumar 521
    public List<Purchase> getPurchasesForPO(long purchaseOrderId) throws PurchaseServiceException, org.apache.thrift.TException
522
    {
523
      send_getPurchasesForPO(purchaseOrderId);
524
      return recv_getPurchasesForPO();
525
    }
526
 
527
    public void send_getPurchasesForPO(long purchaseOrderId) throws org.apache.thrift.TException
528
    {
529
      getPurchasesForPO_args args = new getPurchasesForPO_args();
530
      args.setPurchaseOrderId(purchaseOrderId);
531
      sendBase("getPurchasesForPO", args);
532
    }
533
 
534
    public List<Purchase> recv_getPurchasesForPO() throws PurchaseServiceException, org.apache.thrift.TException
535
    {
536
      getPurchasesForPO_result result = new getPurchasesForPO_result();
537
      receiveBase(result, "getPurchasesForPO");
538
      if (result.isSetSuccess()) {
539
        return result.success;
540
      }
541
      if (result.e != null) {
542
        throw result.e;
543
      }
544
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchasesForPO failed: unknown result");
545
    }
546
 
4555 mandeep.dh 547
    public PurchaseOrder getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 548
    {
4555 mandeep.dh 549
      send_getPurchaseOrderForPurchase(purchaseId);
550
      return recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 551
    }
552
 
4555 mandeep.dh 553
    public void send_getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 554
    {
4555 mandeep.dh 555
      getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 556
      args.setPurchaseId(purchaseId);
4555 mandeep.dh 557
      sendBase("getPurchaseOrderForPurchase", args);
4496 mandeep.dh 558
    }
559
 
4555 mandeep.dh 560
    public PurchaseOrder recv_getPurchaseOrderForPurchase() throws org.apache.thrift.TException
4496 mandeep.dh 561
    {
4555 mandeep.dh 562
      getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
563
      receiveBase(result, "getPurchaseOrderForPurchase");
4496 mandeep.dh 564
      if (result.isSetSuccess()) {
565
        return result.success;
566
      }
4555 mandeep.dh 567
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrderForPurchase failed: unknown result");
4496 mandeep.dh 568
    }
569
 
4754 mandeep.dh 570
    public List<PurchaseOrder> getPendingPurchaseOrders(long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException
571
    {
572
      send_getPendingPurchaseOrders(warehouseId);
573
      return recv_getPendingPurchaseOrders();
574
    }
575
 
576
    public void send_getPendingPurchaseOrders(long warehouseId) throws org.apache.thrift.TException
577
    {
578
      getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
579
      args.setWarehouseId(warehouseId);
580
      sendBase("getPendingPurchaseOrders", args);
581
    }
582
 
583
    public List<PurchaseOrder> recv_getPendingPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
584
    {
585
      getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
586
      receiveBase(result, "getPendingPurchaseOrders");
587
      if (result.isSetSuccess()) {
588
        return result.success;
589
      }
590
      if (result.e != null) {
591
        throw result.e;
592
      }
593
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPendingPurchaseOrders failed: unknown result");
594
    }
595
 
596
    public List<Supplier> getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
597
    {
598
      send_getSuppliers();
599
      return recv_getSuppliers();
600
    }
601
 
602
    public void send_getSuppliers() throws org.apache.thrift.TException
603
    {
604
      getSuppliers_args args = new getSuppliers_args();
605
      sendBase("getSuppliers", args);
606
    }
607
 
608
    public List<Supplier> recv_getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
609
    {
610
      getSuppliers_result result = new getSuppliers_result();
611
      receiveBase(result, "getSuppliers");
612
      if (result.isSetSuccess()) {
613
        return result.success;
614
      }
615
      if (result.e != null) {
616
        throw result.e;
617
      }
618
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSuppliers failed: unknown result");
619
    }
620
 
621
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
622
    {
623
      send_fulfillPO(purchaseOrderId, itemId, quantity);
624
      recv_fulfillPO();
625
    }
626
 
627
    public void send_fulfillPO(long purchaseOrderId, long itemId, long quantity) throws org.apache.thrift.TException
628
    {
629
      fulfillPO_args args = new fulfillPO_args();
630
      args.setPurchaseOrderId(purchaseOrderId);
631
      args.setItemId(itemId);
632
      args.setQuantity(quantity);
633
      sendBase("fulfillPO", args);
634
    }
635
 
636
    public void recv_fulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
637
    {
638
      fulfillPO_result result = new fulfillPO_result();
639
      receiveBase(result, "fulfillPO");
640
      if (result.e != null) {
641
        throw result.e;
642
      }
643
      return;
644
    }
645
 
646
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
647
    {
648
      send_updatePurchaseOrder(purchaseOrder);
649
      recv_updatePurchaseOrder();
650
    }
651
 
652
    public void send_updatePurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
653
    {
654
      updatePurchaseOrder_args args = new updatePurchaseOrder_args();
655
      args.setPurchaseOrder(purchaseOrder);
656
      sendBase("updatePurchaseOrder", args);
657
    }
658
 
659
    public void recv_updatePurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
660
    {
661
      updatePurchaseOrder_result result = new updatePurchaseOrder_result();
662
      receiveBase(result, "updatePurchaseOrder");
663
      if (result.e != null) {
664
        throw result.e;
665
      }
666
      return;
667
    }
668
 
5185 mandeep.dh 669
    public void unFulfillPO(long purchaseId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
670
    {
671
      send_unFulfillPO(purchaseId, itemId, quantity);
672
      recv_unFulfillPO();
673
    }
674
 
675
    public void send_unFulfillPO(long purchaseId, long itemId, long quantity) throws org.apache.thrift.TException
676
    {
677
      unFulfillPO_args args = new unFulfillPO_args();
678
      args.setPurchaseId(purchaseId);
679
      args.setItemId(itemId);
680
      args.setQuantity(quantity);
681
      sendBase("unFulfillPO", args);
682
    }
683
 
684
    public void recv_unFulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
685
    {
686
      unFulfillPO_result result = new unFulfillPO_result();
687
      receiveBase(result, "unFulfillPO");
688
      if (result.e != null) {
689
        throw result.e;
690
      }
691
      return;
692
    }
693
 
5443 mandeep.dh 694
    public List<Invoice> getInvoices(long date) throws org.apache.thrift.TException
695
    {
696
      send_getInvoices(date);
697
      return recv_getInvoices();
698
    }
699
 
700
    public void send_getInvoices(long date) throws org.apache.thrift.TException
701
    {
702
      getInvoices_args args = new getInvoices_args();
703
      args.setDate(date);
704
      sendBase("getInvoices", args);
705
    }
706
 
707
    public List<Invoice> recv_getInvoices() throws org.apache.thrift.TException
708
    {
709
      getInvoices_result result = new getInvoices_result();
710
      receiveBase(result, "getInvoices");
711
      if (result.isSetSuccess()) {
712
        return result.success;
713
      }
714
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoices failed: unknown result");
715
    }
716
 
7410 amar.kumar 717
    public List<Invoice> getInvoicesForWarehouse(long warehouseId, long supplierId, long date) throws org.apache.thrift.TException
718
    {
719
      send_getInvoicesForWarehouse(warehouseId, supplierId, date);
720
      return recv_getInvoicesForWarehouse();
721
    }
722
 
723
    public void send_getInvoicesForWarehouse(long warehouseId, long supplierId, long date) throws org.apache.thrift.TException
724
    {
725
      getInvoicesForWarehouse_args args = new getInvoicesForWarehouse_args();
726
      args.setWarehouseId(warehouseId);
727
      args.setSupplierId(supplierId);
728
      args.setDate(date);
729
      sendBase("getInvoicesForWarehouse", args);
730
    }
731
 
732
    public List<Invoice> recv_getInvoicesForWarehouse() throws org.apache.thrift.TException
733
    {
734
      getInvoicesForWarehouse_result result = new getInvoicesForWarehouse_result();
735
      receiveBase(result, "getInvoicesForWarehouse");
736
      if (result.isSetSuccess()) {
737
        return result.success;
738
      }
739
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoicesForWarehouse failed: unknown result");
740
    }
741
 
5443 mandeep.dh 742
    public void createInvoice(Invoice invoice) throws PurchaseServiceException, org.apache.thrift.TException
743
    {
744
      send_createInvoice(invoice);
745
      recv_createInvoice();
746
    }
747
 
748
    public void send_createInvoice(Invoice invoice) throws org.apache.thrift.TException
749
    {
750
      createInvoice_args args = new createInvoice_args();
751
      args.setInvoice(invoice);
752
      sendBase("createInvoice", args);
753
    }
754
 
755
    public void recv_createInvoice() throws PurchaseServiceException, org.apache.thrift.TException
756
    {
757
      createInvoice_result result = new createInvoice_result();
758
      receiveBase(result, "createInvoice");
759
      if (result.e != null) {
760
        throw result.e;
761
      }
762
      return;
763
    }
764
 
5591 mandeep.dh 765
    public Supplier addSupplier(Supplier supplier) throws org.apache.thrift.TException
766
    {
767
      send_addSupplier(supplier);
768
      return recv_addSupplier();
769
    }
770
 
771
    public void send_addSupplier(Supplier supplier) throws org.apache.thrift.TException
772
    {
773
      addSupplier_args args = new addSupplier_args();
774
      args.setSupplier(supplier);
775
      sendBase("addSupplier", args);
776
    }
777
 
778
    public Supplier recv_addSupplier() throws org.apache.thrift.TException
779
    {
780
      addSupplier_result result = new addSupplier_result();
781
      receiveBase(result, "addSupplier");
782
      if (result.isSetSuccess()) {
783
        return result.success;
784
      }
785
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addSupplier failed: unknown result");
786
    }
787
 
788
    public void updateSupplier(Supplier supplier) throws org.apache.thrift.TException
789
    {
790
      send_updateSupplier(supplier);
791
      recv_updateSupplier();
792
    }
793
 
794
    public void send_updateSupplier(Supplier supplier) throws org.apache.thrift.TException
795
    {
796
      updateSupplier_args args = new updateSupplier_args();
797
      args.setSupplier(supplier);
798
      sendBase("updateSupplier", args);
799
    }
800
 
801
    public void recv_updateSupplier() throws org.apache.thrift.TException
802
    {
803
      updateSupplier_result result = new updateSupplier_result();
804
      receiveBase(result, "updateSupplier");
805
      return;
806
    }
807
 
6467 amar.kumar 808
    public long createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
809
    {
810
      send_createPurchaseReturn(purchaseReturn);
811
      return recv_createPurchaseReturn();
812
    }
813
 
814
    public void send_createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
815
    {
816
      createPurchaseReturn_args args = new createPurchaseReturn_args();
817
      args.setPurchaseReturn(purchaseReturn);
818
      sendBase("createPurchaseReturn", args);
819
    }
820
 
821
    public long recv_createPurchaseReturn() throws org.apache.thrift.TException
822
    {
823
      createPurchaseReturn_result result = new createPurchaseReturn_result();
824
      receiveBase(result, "createPurchaseReturn");
825
      if (result.isSetSuccess()) {
826
        return result.success;
827
      }
828
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseReturn failed: unknown result");
829
    }
830
 
831
    public void settlePurchaseReturn(long id) throws org.apache.thrift.TException
832
    {
833
      send_settlePurchaseReturn(id);
834
      recv_settlePurchaseReturn();
835
    }
836
 
837
    public void send_settlePurchaseReturn(long id) throws org.apache.thrift.TException
838
    {
839
      settlePurchaseReturn_args args = new settlePurchaseReturn_args();
840
      args.setId(id);
841
      sendBase("settlePurchaseReturn", args);
842
    }
843
 
844
    public void recv_settlePurchaseReturn() throws org.apache.thrift.TException
845
    {
846
      settlePurchaseReturn_result result = new settlePurchaseReturn_result();
847
      receiveBase(result, "settlePurchaseReturn");
848
      return;
849
    }
850
 
851
    public List<PurchaseReturn> getUnsettledPurchaseReturns() throws org.apache.thrift.TException
852
    {
853
      send_getUnsettledPurchaseReturns();
854
      return recv_getUnsettledPurchaseReturns();
855
    }
856
 
857
    public void send_getUnsettledPurchaseReturns() throws org.apache.thrift.TException
858
    {
859
      getUnsettledPurchaseReturns_args args = new getUnsettledPurchaseReturns_args();
860
      sendBase("getUnsettledPurchaseReturns", args);
861
    }
862
 
863
    public List<PurchaseReturn> recv_getUnsettledPurchaseReturns() throws org.apache.thrift.TException
864
    {
865
      getUnsettledPurchaseReturns_result result = new getUnsettledPurchaseReturns_result();
866
      receiveBase(result, "getUnsettledPurchaseReturns");
867
      if (result.isSetSuccess()) {
868
        return result.success;
869
      }
870
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUnsettledPurchaseReturns failed: unknown result");
871
    }
872
 
6630 amar.kumar 873
    public List<PurchaseReturn> getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
874
    {
875
      send_getInvoice(invoiceNumber, supplierId);
876
      return recv_getInvoice();
877
    }
878
 
879
    public void send_getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
880
    {
881
      getInvoice_args args = new getInvoice_args();
882
      args.setInvoiceNumber(invoiceNumber);
883
      args.setSupplierId(supplierId);
884
      sendBase("getInvoice", args);
885
    }
886
 
887
    public List<PurchaseReturn> recv_getInvoice() throws org.apache.thrift.TException
888
    {
889
      getInvoice_result result = new getInvoice_result();
890
      receiveBase(result, "getInvoice");
891
      if (result.isSetSuccess()) {
892
        return result.success;
893
      }
894
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoice failed: unknown result");
895
    }
896
 
7672 rajveer 897
    public long createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId) throws org.apache.thrift.TException
6762 amar.kumar 898
    {
7672 rajveer 899
      send_createPurchaseForOurExtBilling(invoiceNumber, unitPrice, nlc, itemId);
6762 amar.kumar 900
      return recv_createPurchaseForOurExtBilling();
901
    }
902
 
7672 rajveer 903
    public void send_createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId) throws org.apache.thrift.TException
6762 amar.kumar 904
    {
905
      createPurchaseForOurExtBilling_args args = new createPurchaseForOurExtBilling_args();
906
      args.setInvoiceNumber(invoiceNumber);
907
      args.setUnitPrice(unitPrice);
7672 rajveer 908
      args.setNlc(nlc);
6762 amar.kumar 909
      args.setItemId(itemId);
910
      sendBase("createPurchaseForOurExtBilling", args);
911
    }
912
 
913
    public long recv_createPurchaseForOurExtBilling() throws org.apache.thrift.TException
914
    {
915
      createPurchaseForOurExtBilling_result result = new createPurchaseForOurExtBilling_result();
916
      receiveBase(result, "createPurchaseForOurExtBilling");
917
      if (result.isSetSuccess()) {
918
        return result.success;
919
      }
920
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseForOurExtBilling failed: unknown result");
921
    }
922
 
923
    public void fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException
924
    {
925
      send_fulfillPOForExtBilling(itemId, quantity);
926
      recv_fulfillPOForExtBilling();
927
    }
928
 
929
    public void send_fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException
930
    {
931
      fulfillPOForExtBilling_args args = new fulfillPOForExtBilling_args();
932
      args.setItemId(itemId);
933
      args.setQuantity(quantity);
934
      sendBase("fulfillPOForExtBilling", args);
935
    }
936
 
937
    public void recv_fulfillPOForExtBilling() throws org.apache.thrift.TException
938
    {
939
      fulfillPOForExtBilling_result result = new fulfillPOForExtBilling_result();
940
      receiveBase(result, "fulfillPOForExtBilling");
941
      return;
942
    }
943
 
7410 amar.kumar 944
    public void closePO(long poId) throws PurchaseServiceException, org.apache.thrift.TException
945
    {
946
      send_closePO(poId);
947
      recv_closePO();
948
    }
949
 
950
    public void send_closePO(long poId) throws org.apache.thrift.TException
951
    {
952
      closePO_args args = new closePO_args();
953
      args.setPoId(poId);
954
      sendBase("closePO", args);
955
    }
956
 
957
    public void recv_closePO() throws PurchaseServiceException, org.apache.thrift.TException
958
    {
959
      closePO_result result = new closePO_result();
960
      receiveBase(result, "closePO");
961
      if (result.e != null) {
962
        throw result.e;
963
      }
964
      return;
965
    }
966
 
967
    public boolean isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
968
    {
969
      send_isInvoiceReceived(invoiceNumber, supplierId);
970
      return recv_isInvoiceReceived();
971
    }
972
 
973
    public void send_isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
974
    {
975
      isInvoiceReceived_args args = new isInvoiceReceived_args();
976
      args.setInvoiceNumber(invoiceNumber);
977
      args.setSupplierId(supplierId);
978
      sendBase("isInvoiceReceived", args);
979
    }
980
 
981
    public boolean recv_isInvoiceReceived() throws org.apache.thrift.TException
982
    {
983
      isInvoiceReceived_result result = new isInvoiceReceived_result();
984
      receiveBase(result, "isInvoiceReceived");
985
      if (result.isSetSuccess()) {
986
        return result.success;
987
      }
988
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isInvoiceReceived failed: unknown result");
989
    }
990
 
9829 amar.kumar 991
    public void changeWarehouseForPO(long id, long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException
992
    {
993
      send_changeWarehouseForPO(id, warehouseId);
994
      recv_changeWarehouseForPO();
995
    }
996
 
997
    public void send_changeWarehouseForPO(long id, long warehouseId) throws org.apache.thrift.TException
998
    {
999
      changeWarehouseForPO_args args = new changeWarehouseForPO_args();
1000
      args.setId(id);
1001
      args.setWarehouseId(warehouseId);
1002
      sendBase("changeWarehouseForPO", args);
1003
    }
1004
 
1005
    public void recv_changeWarehouseForPO() throws PurchaseServiceException, org.apache.thrift.TException
1006
    {
1007
      changeWarehouseForPO_result result = new changeWarehouseForPO_result();
1008
      receiveBase(result, "changeWarehouseForPO");
1009
      if (result.e != null) {
1010
        throw result.e;
1011
      }
1012
      return;
1013
    }
1014
 
9925 amar.kumar 1015
    public void changePOStatus(long id, POStatus poStatus) throws PurchaseServiceException, org.apache.thrift.TException
1016
    {
1017
      send_changePOStatus(id, poStatus);
1018
      recv_changePOStatus();
1019
    }
1020
 
1021
    public void send_changePOStatus(long id, POStatus poStatus) throws org.apache.thrift.TException
1022
    {
1023
      changePOStatus_args args = new changePOStatus_args();
1024
      args.setId(id);
1025
      args.setPoStatus(poStatus);
1026
      sendBase("changePOStatus", args);
1027
    }
1028
 
1029
    public void recv_changePOStatus() throws PurchaseServiceException, org.apache.thrift.TException
1030
    {
1031
      changePOStatus_result result = new changePOStatus_result();
1032
      receiveBase(result, "changePOStatus");
1033
      if (result.e != null) {
1034
        throw result.e;
1035
      }
1036
      return;
1037
    }
1038
 
11751 manish.sha 1039
    public PurchaseReturn getPurchaseReturn(long id) throws PurchaseServiceException, org.apache.thrift.TException
1040
    {
1041
      send_getPurchaseReturn(id);
1042
      return recv_getPurchaseReturn();
1043
    }
1044
 
1045
    public void send_getPurchaseReturn(long id) throws org.apache.thrift.TException
1046
    {
1047
      getPurchaseReturn_args args = new getPurchaseReturn_args();
1048
      args.setId(id);
1049
      sendBase("getPurchaseReturn", args);
1050
    }
1051
 
1052
    public PurchaseReturn recv_getPurchaseReturn() throws PurchaseServiceException, org.apache.thrift.TException
1053
    {
1054
      getPurchaseReturn_result result = new getPurchaseReturn_result();
1055
      receiveBase(result, "getPurchaseReturn");
1056
      if (result.isSetSuccess()) {
1057
        return result.success;
1058
      }
1059
      if (result.e != null) {
1060
        throw result.e;
1061
      }
1062
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseReturn failed: unknown result");
1063
    }
1064
 
4496 mandeep.dh 1065
  }
1066
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
1067
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
1068
      private org.apache.thrift.async.TAsyncClientManager clientManager;
1069
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
1070
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
1071
        this.clientManager = clientManager;
1072
        this.protocolFactory = protocolFactory;
1073
      }
1074
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
1075
        return new AsyncClient(protocolFactory, clientManager, transport);
1076
      }
1077
    }
1078
 
1079
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
1080
      super(protocolFactory, clientManager, transport);
1081
    }
1082
 
1083
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1084
      checkReady();
1085
      createPurchaseOrder_call method_call = new createPurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
1086
      this.___currentMethod = method_call;
1087
      ___manager.call(method_call);
1088
    }
1089
 
1090
    public static class createPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1091
      private PurchaseOrder purchaseOrder;
1092
      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 {
1093
        super(client, protocolFactory, transport, resultHandler, false);
1094
        this.purchaseOrder = purchaseOrder;
1095
      }
1096
 
1097
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1098
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1099
        createPurchaseOrder_args args = new createPurchaseOrder_args();
1100
        args.setPurchaseOrder(purchaseOrder);
1101
        args.write(prot);
1102
        prot.writeMessageEnd();
1103
      }
1104
 
1105
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1106
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1107
          throw new IllegalStateException("Method call not finished!");
1108
        }
1109
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1110
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1111
        return (new Client(prot)).recv_createPurchaseOrder();
1112
      }
1113
    }
1114
 
1115
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1116
      checkReady();
1117
      getPurchaseOrder_call method_call = new getPurchaseOrder_call(id, resultHandler, this, ___protocolFactory, ___transport);
1118
      this.___currentMethod = method_call;
1119
      ___manager.call(method_call);
1120
    }
1121
 
1122
    public static class getPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1123
      private long id;
1124
      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 {
1125
        super(client, protocolFactory, transport, resultHandler, false);
1126
        this.id = id;
1127
      }
1128
 
1129
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1130
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1131
        getPurchaseOrder_args args = new getPurchaseOrder_args();
1132
        args.setId(id);
1133
        args.write(prot);
1134
        prot.writeMessageEnd();
1135
      }
1136
 
1137
      public PurchaseOrder getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1138
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1139
          throw new IllegalStateException("Method call not finished!");
1140
        }
1141
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1142
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1143
        return (new Client(prot)).recv_getPurchaseOrder();
1144
      }
1145
    }
1146
 
1147
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
1148
      checkReady();
1149
      getAllPurchaseOrders_call method_call = new getAllPurchaseOrders_call(status, resultHandler, this, ___protocolFactory, ___transport);
1150
      this.___currentMethod = method_call;
1151
      ___manager.call(method_call);
1152
    }
1153
 
1154
    public static class getAllPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
1155
      private POStatus status;
1156
      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 {
1157
        super(client, protocolFactory, transport, resultHandler, false);
1158
        this.status = status;
1159
      }
1160
 
1161
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1162
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
1163
        getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
1164
        args.setStatus(status);
1165
        args.write(prot);
1166
        prot.writeMessageEnd();
1167
      }
1168
 
1169
      public List<PurchaseOrder> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1170
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1171
          throw new IllegalStateException("Method call not finished!");
1172
        }
1173
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1174
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1175
        return (new Client(prot)).recv_getAllPurchaseOrders();
1176
      }
1177
    }
1178
 
1179
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<getSupplier_call> resultHandler) throws org.apache.thrift.TException {
1180
      checkReady();
1181
      getSupplier_call method_call = new getSupplier_call(id, resultHandler, this, ___protocolFactory, ___transport);
1182
      this.___currentMethod = method_call;
1183
      ___manager.call(method_call);
1184
    }
1185
 
1186
    public static class getSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1187
      private long id;
1188
      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 {
1189
        super(client, protocolFactory, transport, resultHandler, false);
1190
        this.id = id;
1191
      }
1192
 
1193
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1194
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1195
        getSupplier_args args = new getSupplier_args();
1196
        args.setId(id);
1197
        args.write(prot);
1198
        prot.writeMessageEnd();
1199
      }
1200
 
1201
      public Supplier getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1202
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1203
          throw new IllegalStateException("Method call not finished!");
1204
        }
1205
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1206
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1207
        return (new Client(prot)).recv_getSupplier();
1208
      }
1209
    }
1210
 
11801 manish.sha 1211
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, String purchaseComments, org.apache.thrift.async.AsyncMethodCallback<startPurchase_call> resultHandler) throws org.apache.thrift.TException {
4496 mandeep.dh 1212
      checkReady();
11801 manish.sha 1213
      startPurchase_call method_call = new startPurchase_call(purchaseOrderId, invoiceNumber, freightCharges, purchaseComments, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 1214
      this.___currentMethod = method_call;
1215
      ___manager.call(method_call);
1216
    }
1217
 
1218
    public static class startPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
1219
      private long purchaseOrderId;
1220
      private String invoiceNumber;
1221
      private double freightCharges;
11801 manish.sha 1222
      private String purchaseComments;
1223
      public startPurchase_call(long purchaseOrderId, String invoiceNumber, double freightCharges, String purchaseComments, 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 {
4496 mandeep.dh 1224
        super(client, protocolFactory, transport, resultHandler, false);
1225
        this.purchaseOrderId = purchaseOrderId;
1226
        this.invoiceNumber = invoiceNumber;
1227
        this.freightCharges = freightCharges;
11801 manish.sha 1228
        this.purchaseComments = purchaseComments;
4496 mandeep.dh 1229
      }
1230
 
1231
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1232
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1233
        startPurchase_args args = new startPurchase_args();
1234
        args.setPurchaseOrderId(purchaseOrderId);
1235
        args.setInvoiceNumber(invoiceNumber);
1236
        args.setFreightCharges(freightCharges);
11801 manish.sha 1237
        args.setPurchaseComments(purchaseComments);
4496 mandeep.dh 1238
        args.write(prot);
1239
        prot.writeMessageEnd();
1240
      }
1241
 
1242
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1243
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1244
          throw new IllegalStateException("Method call not finished!");
1245
        }
1246
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1247
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1248
        return (new Client(prot)).recv_startPurchase();
1249
      }
1250
    }
1251
 
1252
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<closePurchase_call> resultHandler) throws org.apache.thrift.TException {
1253
      checkReady();
1254
      closePurchase_call method_call = new closePurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
1255
      this.___currentMethod = method_call;
1256
      ___manager.call(method_call);
1257
    }
1258
 
1259
    public static class closePurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
1260
      private long purchaseId;
1261
      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 {
1262
        super(client, protocolFactory, transport, resultHandler, false);
1263
        this.purchaseId = purchaseId;
1264
      }
1265
 
1266
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1267
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closePurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1268
        closePurchase_args args = new closePurchase_args();
1269
        args.setPurchaseId(purchaseId);
1270
        args.write(prot);
1271
        prot.writeMessageEnd();
1272
      }
1273
 
1274
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1275
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1276
          throw new IllegalStateException("Method call not finished!");
1277
        }
1278
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1279
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1280
        return (new Client(prot)).recv_closePurchase();
1281
      }
1282
    }
1283
 
1284
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<getAllPurchases_call> resultHandler) throws org.apache.thrift.TException {
1285
      checkReady();
1286
      getAllPurchases_call method_call = new getAllPurchases_call(purchaseOrderId, open, resultHandler, this, ___protocolFactory, ___transport);
1287
      this.___currentMethod = method_call;
1288
      ___manager.call(method_call);
1289
    }
1290
 
1291
    public static class getAllPurchases_call extends org.apache.thrift.async.TAsyncMethodCall {
1292
      private long purchaseOrderId;
1293
      private boolean open;
1294
      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 {
1295
        super(client, protocolFactory, transport, resultHandler, false);
1296
        this.purchaseOrderId = purchaseOrderId;
1297
        this.open = open;
1298
      }
1299
 
1300
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1301
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPurchases", org.apache.thrift.protocol.TMessageType.CALL, 0));
1302
        getAllPurchases_args args = new getAllPurchases_args();
1303
        args.setPurchaseOrderId(purchaseOrderId);
1304
        args.setOpen(open);
1305
        args.write(prot);
1306
        prot.writeMessageEnd();
1307
      }
1308
 
1309
      public List<Purchase> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1310
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1311
          throw new IllegalStateException("Method call not finished!");
1312
        }
1313
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1314
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1315
        return (new Client(prot)).recv_getAllPurchases();
1316
      }
1317
    }
1318
 
6385 amar.kumar 1319
    public void getPurchasesForPO(long purchaseOrderId, org.apache.thrift.async.AsyncMethodCallback<getPurchasesForPO_call> resultHandler) throws org.apache.thrift.TException {
1320
      checkReady();
1321
      getPurchasesForPO_call method_call = new getPurchasesForPO_call(purchaseOrderId, resultHandler, this, ___protocolFactory, ___transport);
1322
      this.___currentMethod = method_call;
1323
      ___manager.call(method_call);
1324
    }
1325
 
1326
    public static class getPurchasesForPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1327
      private long purchaseOrderId;
1328
      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 {
1329
        super(client, protocolFactory, transport, resultHandler, false);
1330
        this.purchaseOrderId = purchaseOrderId;
1331
      }
1332
 
1333
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1334
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchasesForPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1335
        getPurchasesForPO_args args = new getPurchasesForPO_args();
1336
        args.setPurchaseOrderId(purchaseOrderId);
1337
        args.write(prot);
1338
        prot.writeMessageEnd();
1339
      }
1340
 
1341
      public List<Purchase> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1342
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1343
          throw new IllegalStateException("Method call not finished!");
1344
        }
1345
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1346
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1347
        return (new Client(prot)).recv_getPurchasesForPO();
1348
      }
1349
    }
1350
 
4555 mandeep.dh 1351
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException {
4496 mandeep.dh 1352
      checkReady();
4555 mandeep.dh 1353
      getPurchaseOrderForPurchase_call method_call = new getPurchaseOrderForPurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 1354
      this.___currentMethod = method_call;
1355
      ___manager.call(method_call);
1356
    }
1357
 
4555 mandeep.dh 1358
    public static class getPurchaseOrderForPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
4496 mandeep.dh 1359
      private long purchaseId;
4555 mandeep.dh 1360
      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 1361
        super(client, protocolFactory, transport, resultHandler, false);
1362
        this.purchaseId = purchaseId;
1363
      }
1364
 
1365
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4555 mandeep.dh 1366
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrderForPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1367
        getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 1368
        args.setPurchaseId(purchaseId);
1369
        args.write(prot);
1370
        prot.writeMessageEnd();
1371
      }
1372
 
4555 mandeep.dh 1373
      public PurchaseOrder getResult() throws org.apache.thrift.TException {
4496 mandeep.dh 1374
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1375
          throw new IllegalStateException("Method call not finished!");
1376
        }
1377
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1378
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4555 mandeep.dh 1379
        return (new Client(prot)).recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 1380
      }
1381
    }
1382
 
4754 mandeep.dh 1383
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
1384
      checkReady();
1385
      getPendingPurchaseOrders_call method_call = new getPendingPurchaseOrders_call(warehouseId, resultHandler, this, ___protocolFactory, ___transport);
1386
      this.___currentMethod = method_call;
1387
      ___manager.call(method_call);
1388
    }
1389
 
1390
    public static class getPendingPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
1391
      private long warehouseId;
1392
      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 {
1393
        super(client, protocolFactory, transport, resultHandler, false);
1394
        this.warehouseId = warehouseId;
1395
      }
1396
 
1397
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1398
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPendingPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
1399
        getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
1400
        args.setWarehouseId(warehouseId);
1401
        args.write(prot);
1402
        prot.writeMessageEnd();
1403
      }
1404
 
1405
      public List<PurchaseOrder> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1406
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1407
          throw new IllegalStateException("Method call not finished!");
1408
        }
1409
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1410
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1411
        return (new Client(prot)).recv_getPendingPurchaseOrders();
1412
      }
1413
    }
1414
 
1415
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<getSuppliers_call> resultHandler) throws org.apache.thrift.TException {
1416
      checkReady();
1417
      getSuppliers_call method_call = new getSuppliers_call(resultHandler, this, ___protocolFactory, ___transport);
1418
      this.___currentMethod = method_call;
1419
      ___manager.call(method_call);
1420
    }
1421
 
1422
    public static class getSuppliers_call extends org.apache.thrift.async.TAsyncMethodCall {
1423
      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 {
1424
        super(client, protocolFactory, transport, resultHandler, false);
1425
      }
1426
 
1427
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1428
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSuppliers", org.apache.thrift.protocol.TMessageType.CALL, 0));
1429
        getSuppliers_args args = new getSuppliers_args();
1430
        args.write(prot);
1431
        prot.writeMessageEnd();
1432
      }
1433
 
1434
      public List<Supplier> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1435
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1436
          throw new IllegalStateException("Method call not finished!");
1437
        }
1438
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1439
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1440
        return (new Client(prot)).recv_getSuppliers();
1441
      }
1442
    }
1443
 
1444
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPO_call> resultHandler) throws org.apache.thrift.TException {
1445
      checkReady();
1446
      fulfillPO_call method_call = new fulfillPO_call(purchaseOrderId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1447
      this.___currentMethod = method_call;
1448
      ___manager.call(method_call);
1449
    }
1450
 
1451
    public static class fulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1452
      private long purchaseOrderId;
1453
      private long itemId;
1454
      private long quantity;
1455
      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 {
1456
        super(client, protocolFactory, transport, resultHandler, false);
1457
        this.purchaseOrderId = purchaseOrderId;
1458
        this.itemId = itemId;
1459
        this.quantity = quantity;
1460
      }
1461
 
1462
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1463
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1464
        fulfillPO_args args = new fulfillPO_args();
1465
        args.setPurchaseOrderId(purchaseOrderId);
1466
        args.setItemId(itemId);
1467
        args.setQuantity(quantity);
1468
        args.write(prot);
1469
        prot.writeMessageEnd();
1470
      }
1471
 
1472
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1473
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1474
          throw new IllegalStateException("Method call not finished!");
1475
        }
1476
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1477
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1478
        (new Client(prot)).recv_fulfillPO();
1479
      }
1480
    }
1481
 
1482
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1483
      checkReady();
1484
      updatePurchaseOrder_call method_call = new updatePurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
1485
      this.___currentMethod = method_call;
1486
      ___manager.call(method_call);
1487
    }
1488
 
1489
    public static class updatePurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1490
      private PurchaseOrder purchaseOrder;
1491
      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 {
1492
        super(client, protocolFactory, transport, resultHandler, false);
1493
        this.purchaseOrder = purchaseOrder;
1494
      }
1495
 
1496
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1497
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updatePurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1498
        updatePurchaseOrder_args args = new updatePurchaseOrder_args();
1499
        args.setPurchaseOrder(purchaseOrder);
1500
        args.write(prot);
1501
        prot.writeMessageEnd();
1502
      }
1503
 
1504
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1505
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1506
          throw new IllegalStateException("Method call not finished!");
1507
        }
1508
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1509
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1510
        (new Client(prot)).recv_updatePurchaseOrder();
1511
      }
1512
    }
1513
 
5185 mandeep.dh 1514
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<unFulfillPO_call> resultHandler) throws org.apache.thrift.TException {
1515
      checkReady();
1516
      unFulfillPO_call method_call = new unFulfillPO_call(purchaseId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1517
      this.___currentMethod = method_call;
1518
      ___manager.call(method_call);
1519
    }
1520
 
1521
    public static class unFulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1522
      private long purchaseId;
1523
      private long itemId;
1524
      private long quantity;
1525
      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 {
1526
        super(client, protocolFactory, transport, resultHandler, false);
1527
        this.purchaseId = purchaseId;
1528
        this.itemId = itemId;
1529
        this.quantity = quantity;
1530
      }
1531
 
1532
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1533
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unFulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1534
        unFulfillPO_args args = new unFulfillPO_args();
1535
        args.setPurchaseId(purchaseId);
1536
        args.setItemId(itemId);
1537
        args.setQuantity(quantity);
1538
        args.write(prot);
1539
        prot.writeMessageEnd();
1540
      }
1541
 
1542
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1543
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1544
          throw new IllegalStateException("Method call not finished!");
1545
        }
1546
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1547
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1548
        (new Client(prot)).recv_unFulfillPO();
1549
      }
1550
    }
1551
 
5443 mandeep.dh 1552
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<getInvoices_call> resultHandler) throws org.apache.thrift.TException {
1553
      checkReady();
1554
      getInvoices_call method_call = new getInvoices_call(date, resultHandler, this, ___protocolFactory, ___transport);
1555
      this.___currentMethod = method_call;
1556
      ___manager.call(method_call);
1557
    }
1558
 
1559
    public static class getInvoices_call extends org.apache.thrift.async.TAsyncMethodCall {
1560
      private long date;
1561
      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 {
1562
        super(client, protocolFactory, transport, resultHandler, false);
1563
        this.date = date;
1564
      }
1565
 
1566
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1567
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoices", org.apache.thrift.protocol.TMessageType.CALL, 0));
1568
        getInvoices_args args = new getInvoices_args();
1569
        args.setDate(date);
1570
        args.write(prot);
1571
        prot.writeMessageEnd();
1572
      }
1573
 
1574
      public List<Invoice> getResult() throws org.apache.thrift.TException {
1575
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1576
          throw new IllegalStateException("Method call not finished!");
1577
        }
1578
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1579
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1580
        return (new Client(prot)).recv_getInvoices();
1581
      }
1582
    }
1583
 
7410 amar.kumar 1584
    public void getInvoicesForWarehouse(long warehouseId, long supplierId, long date, org.apache.thrift.async.AsyncMethodCallback<getInvoicesForWarehouse_call> resultHandler) throws org.apache.thrift.TException {
1585
      checkReady();
1586
      getInvoicesForWarehouse_call method_call = new getInvoicesForWarehouse_call(warehouseId, supplierId, date, resultHandler, this, ___protocolFactory, ___transport);
1587
      this.___currentMethod = method_call;
1588
      ___manager.call(method_call);
1589
    }
1590
 
1591
    public static class getInvoicesForWarehouse_call extends org.apache.thrift.async.TAsyncMethodCall {
1592
      private long warehouseId;
1593
      private long supplierId;
1594
      private long date;
1595
      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 {
1596
        super(client, protocolFactory, transport, resultHandler, false);
1597
        this.warehouseId = warehouseId;
1598
        this.supplierId = supplierId;
1599
        this.date = date;
1600
      }
1601
 
1602
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1603
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoicesForWarehouse", org.apache.thrift.protocol.TMessageType.CALL, 0));
1604
        getInvoicesForWarehouse_args args = new getInvoicesForWarehouse_args();
1605
        args.setWarehouseId(warehouseId);
1606
        args.setSupplierId(supplierId);
1607
        args.setDate(date);
1608
        args.write(prot);
1609
        prot.writeMessageEnd();
1610
      }
1611
 
1612
      public List<Invoice> getResult() throws org.apache.thrift.TException {
1613
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1614
          throw new IllegalStateException("Method call not finished!");
1615
        }
1616
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1617
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1618
        return (new Client(prot)).recv_getInvoicesForWarehouse();
1619
      }
1620
    }
1621
 
5443 mandeep.dh 1622
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<createInvoice_call> resultHandler) throws org.apache.thrift.TException {
1623
      checkReady();
1624
      createInvoice_call method_call = new createInvoice_call(invoice, resultHandler, this, ___protocolFactory, ___transport);
1625
      this.___currentMethod = method_call;
1626
      ___manager.call(method_call);
1627
    }
1628
 
1629
    public static class createInvoice_call extends org.apache.thrift.async.TAsyncMethodCall {
1630
      private Invoice invoice;
1631
      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 {
1632
        super(client, protocolFactory, transport, resultHandler, false);
1633
        this.invoice = invoice;
1634
      }
1635
 
1636
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1637
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createInvoice", org.apache.thrift.protocol.TMessageType.CALL, 0));
1638
        createInvoice_args args = new createInvoice_args();
1639
        args.setInvoice(invoice);
1640
        args.write(prot);
1641
        prot.writeMessageEnd();
1642
      }
1643
 
1644
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1645
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1646
          throw new IllegalStateException("Method call not finished!");
1647
        }
1648
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1649
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1650
        (new Client(prot)).recv_createInvoice();
1651
      }
1652
    }
1653
 
5591 mandeep.dh 1654
    public void addSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<addSupplier_call> resultHandler) throws org.apache.thrift.TException {
1655
      checkReady();
1656
      addSupplier_call method_call = new addSupplier_call(supplier, resultHandler, this, ___protocolFactory, ___transport);
1657
      this.___currentMethod = method_call;
1658
      ___manager.call(method_call);
1659
    }
1660
 
1661
    public static class addSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1662
      private Supplier supplier;
1663
      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 {
1664
        super(client, protocolFactory, transport, resultHandler, false);
1665
        this.supplier = supplier;
1666
      }
1667
 
1668
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1669
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1670
        addSupplier_args args = new addSupplier_args();
1671
        args.setSupplier(supplier);
1672
        args.write(prot);
1673
        prot.writeMessageEnd();
1674
      }
1675
 
1676
      public Supplier getResult() throws org.apache.thrift.TException {
1677
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1678
          throw new IllegalStateException("Method call not finished!");
1679
        }
1680
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1681
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1682
        return (new Client(prot)).recv_addSupplier();
1683
      }
1684
    }
1685
 
1686
    public void updateSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<updateSupplier_call> resultHandler) throws org.apache.thrift.TException {
1687
      checkReady();
1688
      updateSupplier_call method_call = new updateSupplier_call(supplier, resultHandler, this, ___protocolFactory, ___transport);
1689
      this.___currentMethod = method_call;
1690
      ___manager.call(method_call);
1691
    }
1692
 
1693
    public static class updateSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1694
      private Supplier supplier;
1695
      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 {
1696
        super(client, protocolFactory, transport, resultHandler, false);
1697
        this.supplier = supplier;
1698
      }
1699
 
1700
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1701
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1702
        updateSupplier_args args = new updateSupplier_args();
1703
        args.setSupplier(supplier);
1704
        args.write(prot);
1705
        prot.writeMessageEnd();
1706
      }
1707
 
1708
      public void getResult() throws org.apache.thrift.TException {
1709
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1710
          throw new IllegalStateException("Method call not finished!");
1711
        }
1712
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1713
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1714
        (new Client(prot)).recv_updateSupplier();
1715
      }
1716
    }
1717
 
6467 amar.kumar 1718
    public void createPurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<createPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1719
      checkReady();
1720
      createPurchaseReturn_call method_call = new createPurchaseReturn_call(purchaseReturn, resultHandler, this, ___protocolFactory, ___transport);
1721
      this.___currentMethod = method_call;
1722
      ___manager.call(method_call);
1723
    }
1724
 
1725
    public static class createPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1726
      private PurchaseReturn purchaseReturn;
1727
      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 {
1728
        super(client, protocolFactory, transport, resultHandler, false);
1729
        this.purchaseReturn = purchaseReturn;
1730
      }
1731
 
1732
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1733
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1734
        createPurchaseReturn_args args = new createPurchaseReturn_args();
1735
        args.setPurchaseReturn(purchaseReturn);
1736
        args.write(prot);
1737
        prot.writeMessageEnd();
1738
      }
1739
 
1740
      public long getResult() throws org.apache.thrift.TException {
1741
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1742
          throw new IllegalStateException("Method call not finished!");
1743
        }
1744
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1745
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1746
        return (new Client(prot)).recv_createPurchaseReturn();
1747
      }
1748
    }
1749
 
1750
    public void settlePurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<settlePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1751
      checkReady();
1752
      settlePurchaseReturn_call method_call = new settlePurchaseReturn_call(id, resultHandler, this, ___protocolFactory, ___transport);
1753
      this.___currentMethod = method_call;
1754
      ___manager.call(method_call);
1755
    }
1756
 
1757
    public static class settlePurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1758
      private long id;
1759
      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 {
1760
        super(client, protocolFactory, transport, resultHandler, false);
1761
        this.id = id;
1762
      }
1763
 
1764
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1765
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("settlePurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1766
        settlePurchaseReturn_args args = new settlePurchaseReturn_args();
1767
        args.setId(id);
1768
        args.write(prot);
1769
        prot.writeMessageEnd();
1770
      }
1771
 
1772
      public void getResult() throws org.apache.thrift.TException {
1773
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1774
          throw new IllegalStateException("Method call not finished!");
1775
        }
1776
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1777
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1778
        (new Client(prot)).recv_settlePurchaseReturn();
1779
      }
1780
    }
1781
 
1782
    public void getUnsettledPurchaseReturns(org.apache.thrift.async.AsyncMethodCallback<getUnsettledPurchaseReturns_call> resultHandler) throws org.apache.thrift.TException {
1783
      checkReady();
1784
      getUnsettledPurchaseReturns_call method_call = new getUnsettledPurchaseReturns_call(resultHandler, this, ___protocolFactory, ___transport);
1785
      this.___currentMethod = method_call;
1786
      ___manager.call(method_call);
1787
    }
1788
 
1789
    public static class getUnsettledPurchaseReturns_call extends org.apache.thrift.async.TAsyncMethodCall {
1790
      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 {
1791
        super(client, protocolFactory, transport, resultHandler, false);
1792
      }
1793
 
1794
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1795
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUnsettledPurchaseReturns", org.apache.thrift.protocol.TMessageType.CALL, 0));
1796
        getUnsettledPurchaseReturns_args args = new getUnsettledPurchaseReturns_args();
1797
        args.write(prot);
1798
        prot.writeMessageEnd();
1799
      }
1800
 
1801
      public List<PurchaseReturn> getResult() throws org.apache.thrift.TException {
1802
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1803
          throw new IllegalStateException("Method call not finished!");
1804
        }
1805
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1806
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1807
        return (new Client(prot)).recv_getUnsettledPurchaseReturns();
1808
      }
1809
    }
1810
 
6630 amar.kumar 1811
    public void getInvoice(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<getInvoice_call> resultHandler) throws org.apache.thrift.TException {
1812
      checkReady();
1813
      getInvoice_call method_call = new getInvoice_call(invoiceNumber, supplierId, resultHandler, this, ___protocolFactory, ___transport);
1814
      this.___currentMethod = method_call;
1815
      ___manager.call(method_call);
1816
    }
1817
 
1818
    public static class getInvoice_call extends org.apache.thrift.async.TAsyncMethodCall {
1819
      private String invoiceNumber;
1820
      private long supplierId;
1821
      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 {
1822
        super(client, protocolFactory, transport, resultHandler, false);
1823
        this.invoiceNumber = invoiceNumber;
1824
        this.supplierId = supplierId;
1825
      }
1826
 
1827
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1828
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoice", org.apache.thrift.protocol.TMessageType.CALL, 0));
1829
        getInvoice_args args = new getInvoice_args();
1830
        args.setInvoiceNumber(invoiceNumber);
1831
        args.setSupplierId(supplierId);
1832
        args.write(prot);
1833
        prot.writeMessageEnd();
1834
      }
1835
 
1836
      public List<PurchaseReturn> getResult() throws org.apache.thrift.TException {
1837
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1838
          throw new IllegalStateException("Method call not finished!");
1839
        }
1840
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1841
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1842
        return (new Client(prot)).recv_getInvoice();
1843
      }
1844
    }
1845
 
7672 rajveer 1846
    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 1847
      checkReady();
7672 rajveer 1848
      createPurchaseForOurExtBilling_call method_call = new createPurchaseForOurExtBilling_call(invoiceNumber, unitPrice, nlc, itemId, resultHandler, this, ___protocolFactory, ___transport);
6762 amar.kumar 1849
      this.___currentMethod = method_call;
1850
      ___manager.call(method_call);
1851
    }
1852
 
1853
    public static class createPurchaseForOurExtBilling_call extends org.apache.thrift.async.TAsyncMethodCall {
1854
      private String invoiceNumber;
1855
      private double unitPrice;
7672 rajveer 1856
      private double nlc;
6762 amar.kumar 1857
      private long itemId;
7672 rajveer 1858
      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 1859
        super(client, protocolFactory, transport, resultHandler, false);
1860
        this.invoiceNumber = invoiceNumber;
1861
        this.unitPrice = unitPrice;
7672 rajveer 1862
        this.nlc = nlc;
6762 amar.kumar 1863
        this.itemId = itemId;
1864
      }
1865
 
1866
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1867
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseForOurExtBilling", org.apache.thrift.protocol.TMessageType.CALL, 0));
1868
        createPurchaseForOurExtBilling_args args = new createPurchaseForOurExtBilling_args();
1869
        args.setInvoiceNumber(invoiceNumber);
1870
        args.setUnitPrice(unitPrice);
7672 rajveer 1871
        args.setNlc(nlc);
6762 amar.kumar 1872
        args.setItemId(itemId);
1873
        args.write(prot);
1874
        prot.writeMessageEnd();
1875
      }
1876
 
1877
      public long getResult() throws org.apache.thrift.TException {
1878
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1879
          throw new IllegalStateException("Method call not finished!");
1880
        }
1881
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1882
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1883
        return (new Client(prot)).recv_createPurchaseForOurExtBilling();
1884
      }
1885
    }
1886
 
1887
    public void fulfillPOForExtBilling(long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPOForExtBilling_call> resultHandler) throws org.apache.thrift.TException {
1888
      checkReady();
1889
      fulfillPOForExtBilling_call method_call = new fulfillPOForExtBilling_call(itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1890
      this.___currentMethod = method_call;
1891
      ___manager.call(method_call);
1892
    }
1893
 
1894
    public static class fulfillPOForExtBilling_call extends org.apache.thrift.async.TAsyncMethodCall {
1895
      private long itemId;
1896
      private long quantity;
1897
      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 {
1898
        super(client, protocolFactory, transport, resultHandler, false);
1899
        this.itemId = itemId;
1900
        this.quantity = quantity;
1901
      }
1902
 
1903
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1904
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fulfillPOForExtBilling", org.apache.thrift.protocol.TMessageType.CALL, 0));
1905
        fulfillPOForExtBilling_args args = new fulfillPOForExtBilling_args();
1906
        args.setItemId(itemId);
1907
        args.setQuantity(quantity);
1908
        args.write(prot);
1909
        prot.writeMessageEnd();
1910
      }
1911
 
1912
      public void getResult() throws org.apache.thrift.TException {
1913
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1914
          throw new IllegalStateException("Method call not finished!");
1915
        }
1916
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1917
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1918
        (new Client(prot)).recv_fulfillPOForExtBilling();
1919
      }
1920
    }
1921
 
7410 amar.kumar 1922
    public void closePO(long poId, org.apache.thrift.async.AsyncMethodCallback<closePO_call> resultHandler) throws org.apache.thrift.TException {
1923
      checkReady();
1924
      closePO_call method_call = new closePO_call(poId, resultHandler, this, ___protocolFactory, ___transport);
1925
      this.___currentMethod = method_call;
1926
      ___manager.call(method_call);
1927
    }
1928
 
1929
    public static class closePO_call extends org.apache.thrift.async.TAsyncMethodCall {
1930
      private long poId;
1931
      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 {
1932
        super(client, protocolFactory, transport, resultHandler, false);
1933
        this.poId = poId;
1934
      }
1935
 
1936
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1937
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closePO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1938
        closePO_args args = new closePO_args();
1939
        args.setPoId(poId);
1940
        args.write(prot);
1941
        prot.writeMessageEnd();
1942
      }
1943
 
1944
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1945
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1946
          throw new IllegalStateException("Method call not finished!");
1947
        }
1948
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1949
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1950
        (new Client(prot)).recv_closePO();
1951
      }
1952
    }
1953
 
1954
    public void isInvoiceReceived(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<isInvoiceReceived_call> resultHandler) throws org.apache.thrift.TException {
1955
      checkReady();
1956
      isInvoiceReceived_call method_call = new isInvoiceReceived_call(invoiceNumber, supplierId, resultHandler, this, ___protocolFactory, ___transport);
1957
      this.___currentMethod = method_call;
1958
      ___manager.call(method_call);
1959
    }
1960
 
1961
    public static class isInvoiceReceived_call extends org.apache.thrift.async.TAsyncMethodCall {
1962
      private String invoiceNumber;
1963
      private long supplierId;
1964
      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 {
1965
        super(client, protocolFactory, transport, resultHandler, false);
1966
        this.invoiceNumber = invoiceNumber;
1967
        this.supplierId = supplierId;
1968
      }
1969
 
1970
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1971
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isInvoiceReceived", org.apache.thrift.protocol.TMessageType.CALL, 0));
1972
        isInvoiceReceived_args args = new isInvoiceReceived_args();
1973
        args.setInvoiceNumber(invoiceNumber);
1974
        args.setSupplierId(supplierId);
1975
        args.write(prot);
1976
        prot.writeMessageEnd();
1977
      }
1978
 
1979
      public boolean getResult() throws org.apache.thrift.TException {
1980
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1981
          throw new IllegalStateException("Method call not finished!");
1982
        }
1983
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1984
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1985
        return (new Client(prot)).recv_isInvoiceReceived();
1986
      }
1987
    }
1988
 
9829 amar.kumar 1989
    public void changeWarehouseForPO(long id, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<changeWarehouseForPO_call> resultHandler) throws org.apache.thrift.TException {
1990
      checkReady();
1991
      changeWarehouseForPO_call method_call = new changeWarehouseForPO_call(id, warehouseId, resultHandler, this, ___protocolFactory, ___transport);
1992
      this.___currentMethod = method_call;
1993
      ___manager.call(method_call);
1994
    }
1995
 
1996
    public static class changeWarehouseForPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1997
      private long id;
1998
      private long warehouseId;
1999
      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 {
2000
        super(client, protocolFactory, transport, resultHandler, false);
2001
        this.id = id;
2002
        this.warehouseId = warehouseId;
2003
      }
2004
 
2005
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2006
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("changeWarehouseForPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
2007
        changeWarehouseForPO_args args = new changeWarehouseForPO_args();
2008
        args.setId(id);
2009
        args.setWarehouseId(warehouseId);
2010
        args.write(prot);
2011
        prot.writeMessageEnd();
2012
      }
2013
 
2014
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2015
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2016
          throw new IllegalStateException("Method call not finished!");
2017
        }
2018
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2019
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2020
        (new Client(prot)).recv_changeWarehouseForPO();
2021
      }
2022
    }
2023
 
9925 amar.kumar 2024
    public void changePOStatus(long id, POStatus poStatus, org.apache.thrift.async.AsyncMethodCallback<changePOStatus_call> resultHandler) throws org.apache.thrift.TException {
2025
      checkReady();
2026
      changePOStatus_call method_call = new changePOStatus_call(id, poStatus, resultHandler, this, ___protocolFactory, ___transport);
2027
      this.___currentMethod = method_call;
2028
      ___manager.call(method_call);
2029
    }
2030
 
2031
    public static class changePOStatus_call extends org.apache.thrift.async.TAsyncMethodCall {
2032
      private long id;
2033
      private POStatus poStatus;
2034
      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 {
2035
        super(client, protocolFactory, transport, resultHandler, false);
2036
        this.id = id;
2037
        this.poStatus = poStatus;
2038
      }
2039
 
2040
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2041
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("changePOStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
2042
        changePOStatus_args args = new changePOStatus_args();
2043
        args.setId(id);
2044
        args.setPoStatus(poStatus);
2045
        args.write(prot);
2046
        prot.writeMessageEnd();
2047
      }
2048
 
2049
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2050
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2051
          throw new IllegalStateException("Method call not finished!");
2052
        }
2053
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2054
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2055
        (new Client(prot)).recv_changePOStatus();
2056
      }
2057
    }
2058
 
11751 manish.sha 2059
    public void getPurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
2060
      checkReady();
2061
      getPurchaseReturn_call method_call = new getPurchaseReturn_call(id, resultHandler, this, ___protocolFactory, ___transport);
2062
      this.___currentMethod = method_call;
2063
      ___manager.call(method_call);
2064
    }
2065
 
2066
    public static class getPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
2067
      private long id;
2068
      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 {
2069
        super(client, protocolFactory, transport, resultHandler, false);
2070
        this.id = id;
2071
      }
2072
 
2073
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2074
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
2075
        getPurchaseReturn_args args = new getPurchaseReturn_args();
2076
        args.setId(id);
2077
        args.write(prot);
2078
        prot.writeMessageEnd();
2079
      }
2080
 
2081
      public PurchaseReturn getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2082
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2083
          throw new IllegalStateException("Method call not finished!");
2084
        }
2085
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2086
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2087
        return (new Client(prot)).recv_getPurchaseReturn();
2088
      }
2089
    }
2090
 
4496 mandeep.dh 2091
  }
2092
 
2093
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
2094
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
2095
    public Processor(I iface) {
2096
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
2097
    }
2098
 
2099
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
2100
      super(iface, getProcessMap(processMap));
2101
    }
2102
 
2103
    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) {
2104
      processMap.put("createPurchaseOrder", new createPurchaseOrder());
2105
      processMap.put("getPurchaseOrder", new getPurchaseOrder());
2106
      processMap.put("getAllPurchaseOrders", new getAllPurchaseOrders());
2107
      processMap.put("getSupplier", new getSupplier());
2108
      processMap.put("startPurchase", new startPurchase());
2109
      processMap.put("closePurchase", new closePurchase());
2110
      processMap.put("getAllPurchases", new getAllPurchases());
6385 amar.kumar 2111
      processMap.put("getPurchasesForPO", new getPurchasesForPO());
4555 mandeep.dh 2112
      processMap.put("getPurchaseOrderForPurchase", new getPurchaseOrderForPurchase());
4754 mandeep.dh 2113
      processMap.put("getPendingPurchaseOrders", new getPendingPurchaseOrders());
2114
      processMap.put("getSuppliers", new getSuppliers());
2115
      processMap.put("fulfillPO", new fulfillPO());
2116
      processMap.put("updatePurchaseOrder", new updatePurchaseOrder());
5185 mandeep.dh 2117
      processMap.put("unFulfillPO", new unFulfillPO());
5443 mandeep.dh 2118
      processMap.put("getInvoices", new getInvoices());
7410 amar.kumar 2119
      processMap.put("getInvoicesForWarehouse", new getInvoicesForWarehouse());
5443 mandeep.dh 2120
      processMap.put("createInvoice", new createInvoice());
5591 mandeep.dh 2121
      processMap.put("addSupplier", new addSupplier());
2122
      processMap.put("updateSupplier", new updateSupplier());
6467 amar.kumar 2123
      processMap.put("createPurchaseReturn", new createPurchaseReturn());
2124
      processMap.put("settlePurchaseReturn", new settlePurchaseReturn());
2125
      processMap.put("getUnsettledPurchaseReturns", new getUnsettledPurchaseReturns());
6630 amar.kumar 2126
      processMap.put("getInvoice", new getInvoice());
6762 amar.kumar 2127
      processMap.put("createPurchaseForOurExtBilling", new createPurchaseForOurExtBilling());
2128
      processMap.put("fulfillPOForExtBilling", new fulfillPOForExtBilling());
7410 amar.kumar 2129
      processMap.put("closePO", new closePO());
2130
      processMap.put("isInvoiceReceived", new isInvoiceReceived());
9829 amar.kumar 2131
      processMap.put("changeWarehouseForPO", new changeWarehouseForPO());
9925 amar.kumar 2132
      processMap.put("changePOStatus", new changePOStatus());
11751 manish.sha 2133
      processMap.put("getPurchaseReturn", new getPurchaseReturn());
4496 mandeep.dh 2134
      return processMap;
2135
    }
2136
 
2137
    private static class createPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseOrder_args> {
2138
      public createPurchaseOrder() {
2139
        super("createPurchaseOrder");
2140
      }
2141
 
2142
      protected createPurchaseOrder_args getEmptyArgsInstance() {
2143
        return new createPurchaseOrder_args();
2144
      }
2145
 
2146
      protected createPurchaseOrder_result getResult(I iface, createPurchaseOrder_args args) throws org.apache.thrift.TException {
2147
        createPurchaseOrder_result result = new createPurchaseOrder_result();
2148
        try {
2149
          result.success = iface.createPurchaseOrder(args.purchaseOrder);
2150
          result.setSuccessIsSet(true);
2151
        } catch (PurchaseServiceException e) {
2152
          result.e = e;
2153
        }
2154
        return result;
2155
      }
2156
    }
2157
 
2158
    private static class getPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrder_args> {
2159
      public getPurchaseOrder() {
2160
        super("getPurchaseOrder");
2161
      }
2162
 
2163
      protected getPurchaseOrder_args getEmptyArgsInstance() {
2164
        return new getPurchaseOrder_args();
2165
      }
2166
 
2167
      protected getPurchaseOrder_result getResult(I iface, getPurchaseOrder_args args) throws org.apache.thrift.TException {
2168
        getPurchaseOrder_result result = new getPurchaseOrder_result();
2169
        try {
2170
          result.success = iface.getPurchaseOrder(args.id);
2171
        } catch (PurchaseServiceException e) {
2172
          result.e = e;
2173
        }
2174
        return result;
2175
      }
2176
    }
2177
 
2178
    private static class getAllPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchaseOrders_args> {
2179
      public getAllPurchaseOrders() {
2180
        super("getAllPurchaseOrders");
2181
      }
2182
 
2183
      protected getAllPurchaseOrders_args getEmptyArgsInstance() {
2184
        return new getAllPurchaseOrders_args();
2185
      }
2186
 
2187
      protected getAllPurchaseOrders_result getResult(I iface, getAllPurchaseOrders_args args) throws org.apache.thrift.TException {
2188
        getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
2189
        try {
2190
          result.success = iface.getAllPurchaseOrders(args.status);
2191
        } catch (PurchaseServiceException e) {
2192
          result.e = e;
2193
        }
2194
        return result;
2195
      }
2196
    }
2197
 
2198
    private static class getSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSupplier_args> {
2199
      public getSupplier() {
2200
        super("getSupplier");
2201
      }
2202
 
2203
      protected getSupplier_args getEmptyArgsInstance() {
2204
        return new getSupplier_args();
2205
      }
2206
 
2207
      protected getSupplier_result getResult(I iface, getSupplier_args args) throws org.apache.thrift.TException {
2208
        getSupplier_result result = new getSupplier_result();
2209
        try {
2210
          result.success = iface.getSupplier(args.id);
2211
        } catch (PurchaseServiceException e) {
2212
          result.e = e;
2213
        }
2214
        return result;
2215
      }
2216
    }
2217
 
2218
    private static class startPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startPurchase_args> {
2219
      public startPurchase() {
2220
        super("startPurchase");
2221
      }
2222
 
2223
      protected startPurchase_args getEmptyArgsInstance() {
2224
        return new startPurchase_args();
2225
      }
2226
 
2227
      protected startPurchase_result getResult(I iface, startPurchase_args args) throws org.apache.thrift.TException {
2228
        startPurchase_result result = new startPurchase_result();
2229
        try {
11801 manish.sha 2230
          result.success = iface.startPurchase(args.purchaseOrderId, args.invoiceNumber, args.freightCharges, args.purchaseComments);
4496 mandeep.dh 2231
          result.setSuccessIsSet(true);
2232
        } catch (PurchaseServiceException e) {
2233
          result.e = e;
2234
        }
2235
        return result;
2236
      }
2237
    }
2238
 
2239
    private static class closePurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closePurchase_args> {
2240
      public closePurchase() {
2241
        super("closePurchase");
2242
      }
2243
 
2244
      protected closePurchase_args getEmptyArgsInstance() {
2245
        return new closePurchase_args();
2246
      }
2247
 
2248
      protected closePurchase_result getResult(I iface, closePurchase_args args) throws org.apache.thrift.TException {
2249
        closePurchase_result result = new closePurchase_result();
2250
        try {
2251
          result.success = iface.closePurchase(args.purchaseId);
2252
          result.setSuccessIsSet(true);
2253
        } catch (PurchaseServiceException e) {
2254
          result.e = e;
2255
        }
2256
        return result;
2257
      }
2258
    }
2259
 
2260
    private static class getAllPurchases<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchases_args> {
2261
      public getAllPurchases() {
2262
        super("getAllPurchases");
2263
      }
2264
 
2265
      protected getAllPurchases_args getEmptyArgsInstance() {
2266
        return new getAllPurchases_args();
2267
      }
2268
 
2269
      protected getAllPurchases_result getResult(I iface, getAllPurchases_args args) throws org.apache.thrift.TException {
2270
        getAllPurchases_result result = new getAllPurchases_result();
2271
        try {
2272
          result.success = iface.getAllPurchases(args.purchaseOrderId, args.open);
2273
        } catch (PurchaseServiceException e) {
2274
          result.e = e;
2275
        }
2276
        return result;
2277
      }
2278
    }
2279
 
6385 amar.kumar 2280
    private static class getPurchasesForPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchasesForPO_args> {
2281
      public getPurchasesForPO() {
2282
        super("getPurchasesForPO");
2283
      }
2284
 
2285
      protected getPurchasesForPO_args getEmptyArgsInstance() {
2286
        return new getPurchasesForPO_args();
2287
      }
2288
 
2289
      protected getPurchasesForPO_result getResult(I iface, getPurchasesForPO_args args) throws org.apache.thrift.TException {
2290
        getPurchasesForPO_result result = new getPurchasesForPO_result();
2291
        try {
2292
          result.success = iface.getPurchasesForPO(args.purchaseOrderId);
2293
        } catch (PurchaseServiceException e) {
2294
          result.e = e;
2295
        }
2296
        return result;
2297
      }
2298
    }
2299
 
4555 mandeep.dh 2300
    private static class getPurchaseOrderForPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrderForPurchase_args> {
2301
      public getPurchaseOrderForPurchase() {
2302
        super("getPurchaseOrderForPurchase");
4496 mandeep.dh 2303
      }
2304
 
4555 mandeep.dh 2305
      protected getPurchaseOrderForPurchase_args getEmptyArgsInstance() {
2306
        return new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 2307
      }
2308
 
4555 mandeep.dh 2309
      protected getPurchaseOrderForPurchase_result getResult(I iface, getPurchaseOrderForPurchase_args args) throws org.apache.thrift.TException {
2310
        getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
2311
        result.success = iface.getPurchaseOrderForPurchase(args.purchaseId);
4496 mandeep.dh 2312
        return result;
2313
      }
2314
    }
2315
 
4754 mandeep.dh 2316
    private static class getPendingPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPendingPurchaseOrders_args> {
2317
      public getPendingPurchaseOrders() {
2318
        super("getPendingPurchaseOrders");
2319
      }
2320
 
2321
      protected getPendingPurchaseOrders_args getEmptyArgsInstance() {
2322
        return new getPendingPurchaseOrders_args();
2323
      }
2324
 
2325
      protected getPendingPurchaseOrders_result getResult(I iface, getPendingPurchaseOrders_args args) throws org.apache.thrift.TException {
2326
        getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
2327
        try {
2328
          result.success = iface.getPendingPurchaseOrders(args.warehouseId);
2329
        } catch (PurchaseServiceException e) {
2330
          result.e = e;
2331
        }
2332
        return result;
2333
      }
2334
    }
2335
 
2336
    private static class getSuppliers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSuppliers_args> {
2337
      public getSuppliers() {
2338
        super("getSuppliers");
2339
      }
2340
 
2341
      protected getSuppliers_args getEmptyArgsInstance() {
2342
        return new getSuppliers_args();
2343
      }
2344
 
2345
      protected getSuppliers_result getResult(I iface, getSuppliers_args args) throws org.apache.thrift.TException {
2346
        getSuppliers_result result = new getSuppliers_result();
2347
        try {
2348
          result.success = iface.getSuppliers();
2349
        } catch (PurchaseServiceException e) {
2350
          result.e = e;
2351
        }
2352
        return result;
2353
      }
2354
    }
2355
 
2356
    private static class fulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fulfillPO_args> {
2357
      public fulfillPO() {
2358
        super("fulfillPO");
2359
      }
2360
 
2361
      protected fulfillPO_args getEmptyArgsInstance() {
2362
        return new fulfillPO_args();
2363
      }
2364
 
2365
      protected fulfillPO_result getResult(I iface, fulfillPO_args args) throws org.apache.thrift.TException {
2366
        fulfillPO_result result = new fulfillPO_result();
2367
        try {
2368
          iface.fulfillPO(args.purchaseOrderId, args.itemId, args.quantity);
2369
        } catch (PurchaseServiceException e) {
2370
          result.e = e;
2371
        }
2372
        return result;
2373
      }
2374
    }
2375
 
2376
    private static class updatePurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updatePurchaseOrder_args> {
2377
      public updatePurchaseOrder() {
2378
        super("updatePurchaseOrder");
2379
      }
2380
 
2381
      protected updatePurchaseOrder_args getEmptyArgsInstance() {
2382
        return new updatePurchaseOrder_args();
2383
      }
2384
 
2385
      protected updatePurchaseOrder_result getResult(I iface, updatePurchaseOrder_args args) throws org.apache.thrift.TException {
2386
        updatePurchaseOrder_result result = new updatePurchaseOrder_result();
2387
        try {
2388
          iface.updatePurchaseOrder(args.purchaseOrder);
2389
        } catch (PurchaseServiceException e) {
2390
          result.e = e;
2391
        }
2392
        return result;
2393
      }
2394
    }
2395
 
5185 mandeep.dh 2396
    private static class unFulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, unFulfillPO_args> {
2397
      public unFulfillPO() {
2398
        super("unFulfillPO");
2399
      }
2400
 
2401
      protected unFulfillPO_args getEmptyArgsInstance() {
2402
        return new unFulfillPO_args();
2403
      }
2404
 
2405
      protected unFulfillPO_result getResult(I iface, unFulfillPO_args args) throws org.apache.thrift.TException {
2406
        unFulfillPO_result result = new unFulfillPO_result();
2407
        try {
2408
          iface.unFulfillPO(args.purchaseId, args.itemId, args.quantity);
2409
        } catch (PurchaseServiceException e) {
2410
          result.e = e;
2411
        }
2412
        return result;
2413
      }
2414
    }
2415
 
5443 mandeep.dh 2416
    private static class getInvoices<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoices_args> {
2417
      public getInvoices() {
2418
        super("getInvoices");
2419
      }
2420
 
2421
      protected getInvoices_args getEmptyArgsInstance() {
2422
        return new getInvoices_args();
2423
      }
2424
 
2425
      protected getInvoices_result getResult(I iface, getInvoices_args args) throws org.apache.thrift.TException {
2426
        getInvoices_result result = new getInvoices_result();
2427
        result.success = iface.getInvoices(args.date);
2428
        return result;
2429
      }
2430
    }
2431
 
7410 amar.kumar 2432
    private static class getInvoicesForWarehouse<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoicesForWarehouse_args> {
2433
      public getInvoicesForWarehouse() {
2434
        super("getInvoicesForWarehouse");
2435
      }
2436
 
2437
      protected getInvoicesForWarehouse_args getEmptyArgsInstance() {
2438
        return new getInvoicesForWarehouse_args();
2439
      }
2440
 
2441
      protected getInvoicesForWarehouse_result getResult(I iface, getInvoicesForWarehouse_args args) throws org.apache.thrift.TException {
2442
        getInvoicesForWarehouse_result result = new getInvoicesForWarehouse_result();
2443
        result.success = iface.getInvoicesForWarehouse(args.warehouseId, args.supplierId, args.date);
2444
        return result;
2445
      }
2446
    }
2447
 
5443 mandeep.dh 2448
    private static class createInvoice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createInvoice_args> {
2449
      public createInvoice() {
2450
        super("createInvoice");
2451
      }
2452
 
2453
      protected createInvoice_args getEmptyArgsInstance() {
2454
        return new createInvoice_args();
2455
      }
2456
 
2457
      protected createInvoice_result getResult(I iface, createInvoice_args args) throws org.apache.thrift.TException {
2458
        createInvoice_result result = new createInvoice_result();
2459
        try {
2460
          iface.createInvoice(args.invoice);
2461
        } catch (PurchaseServiceException e) {
2462
          result.e = e;
2463
        }
2464
        return result;
2465
      }
2466
    }
2467
 
5591 mandeep.dh 2468
    private static class addSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addSupplier_args> {
2469
      public addSupplier() {
2470
        super("addSupplier");
2471
      }
2472
 
2473
      protected addSupplier_args getEmptyArgsInstance() {
2474
        return new addSupplier_args();
2475
      }
2476
 
2477
      protected addSupplier_result getResult(I iface, addSupplier_args args) throws org.apache.thrift.TException {
2478
        addSupplier_result result = new addSupplier_result();
2479
        result.success = iface.addSupplier(args.supplier);
2480
        return result;
2481
      }
2482
    }
2483
 
2484
    private static class updateSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateSupplier_args> {
2485
      public updateSupplier() {
2486
        super("updateSupplier");
2487
      }
2488
 
2489
      protected updateSupplier_args getEmptyArgsInstance() {
2490
        return new updateSupplier_args();
2491
      }
2492
 
2493
      protected updateSupplier_result getResult(I iface, updateSupplier_args args) throws org.apache.thrift.TException {
2494
        updateSupplier_result result = new updateSupplier_result();
2495
        iface.updateSupplier(args.supplier);
2496
        return result;
2497
      }
2498
    }
2499
 
6467 amar.kumar 2500
    private static class createPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseReturn_args> {
2501
      public createPurchaseReturn() {
2502
        super("createPurchaseReturn");
2503
      }
2504
 
2505
      protected createPurchaseReturn_args getEmptyArgsInstance() {
2506
        return new createPurchaseReturn_args();
2507
      }
2508
 
2509
      protected createPurchaseReturn_result getResult(I iface, createPurchaseReturn_args args) throws org.apache.thrift.TException {
2510
        createPurchaseReturn_result result = new createPurchaseReturn_result();
2511
        result.success = iface.createPurchaseReturn(args.purchaseReturn);
2512
        result.setSuccessIsSet(true);
2513
        return result;
2514
      }
2515
    }
2516
 
2517
    private static class settlePurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, settlePurchaseReturn_args> {
2518
      public settlePurchaseReturn() {
2519
        super("settlePurchaseReturn");
2520
      }
2521
 
2522
      protected settlePurchaseReturn_args getEmptyArgsInstance() {
2523
        return new settlePurchaseReturn_args();
2524
      }
2525
 
2526
      protected settlePurchaseReturn_result getResult(I iface, settlePurchaseReturn_args args) throws org.apache.thrift.TException {
2527
        settlePurchaseReturn_result result = new settlePurchaseReturn_result();
2528
        iface.settlePurchaseReturn(args.id);
2529
        return result;
2530
      }
2531
    }
2532
 
2533
    private static class getUnsettledPurchaseReturns<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUnsettledPurchaseReturns_args> {
2534
      public getUnsettledPurchaseReturns() {
2535
        super("getUnsettledPurchaseReturns");
2536
      }
2537
 
2538
      protected getUnsettledPurchaseReturns_args getEmptyArgsInstance() {
2539
        return new getUnsettledPurchaseReturns_args();
2540
      }
2541
 
2542
      protected getUnsettledPurchaseReturns_result getResult(I iface, getUnsettledPurchaseReturns_args args) throws org.apache.thrift.TException {
2543
        getUnsettledPurchaseReturns_result result = new getUnsettledPurchaseReturns_result();
2544
        result.success = iface.getUnsettledPurchaseReturns();
2545
        return result;
2546
      }
2547
    }
2548
 
6630 amar.kumar 2549
    private static class getInvoice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoice_args> {
2550
      public getInvoice() {
2551
        super("getInvoice");
2552
      }
2553
 
2554
      protected getInvoice_args getEmptyArgsInstance() {
2555
        return new getInvoice_args();
2556
      }
2557
 
2558
      protected getInvoice_result getResult(I iface, getInvoice_args args) throws org.apache.thrift.TException {
2559
        getInvoice_result result = new getInvoice_result();
2560
        result.success = iface.getInvoice(args.invoiceNumber, args.supplierId);
2561
        return result;
2562
      }
2563
    }
2564
 
6762 amar.kumar 2565
    private static class createPurchaseForOurExtBilling<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseForOurExtBilling_args> {
2566
      public createPurchaseForOurExtBilling() {
2567
        super("createPurchaseForOurExtBilling");
2568
      }
2569
 
2570
      protected createPurchaseForOurExtBilling_args getEmptyArgsInstance() {
2571
        return new createPurchaseForOurExtBilling_args();
2572
      }
2573
 
2574
      protected createPurchaseForOurExtBilling_result getResult(I iface, createPurchaseForOurExtBilling_args args) throws org.apache.thrift.TException {
2575
        createPurchaseForOurExtBilling_result result = new createPurchaseForOurExtBilling_result();
7672 rajveer 2576
        result.success = iface.createPurchaseForOurExtBilling(args.invoiceNumber, args.unitPrice, args.nlc, args.itemId);
6762 amar.kumar 2577
        result.setSuccessIsSet(true);
2578
        return result;
2579
      }
2580
    }
2581
 
2582
    private static class fulfillPOForExtBilling<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fulfillPOForExtBilling_args> {
2583
      public fulfillPOForExtBilling() {
2584
        super("fulfillPOForExtBilling");
2585
      }
2586
 
2587
      protected fulfillPOForExtBilling_args getEmptyArgsInstance() {
2588
        return new fulfillPOForExtBilling_args();
2589
      }
2590
 
2591
      protected fulfillPOForExtBilling_result getResult(I iface, fulfillPOForExtBilling_args args) throws org.apache.thrift.TException {
2592
        fulfillPOForExtBilling_result result = new fulfillPOForExtBilling_result();
2593
        iface.fulfillPOForExtBilling(args.itemId, args.quantity);
2594
        return result;
2595
      }
2596
    }
2597
 
7410 amar.kumar 2598
    private static class closePO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closePO_args> {
2599
      public closePO() {
2600
        super("closePO");
2601
      }
2602
 
2603
      protected closePO_args getEmptyArgsInstance() {
2604
        return new closePO_args();
2605
      }
2606
 
2607
      protected closePO_result getResult(I iface, closePO_args args) throws org.apache.thrift.TException {
2608
        closePO_result result = new closePO_result();
2609
        try {
2610
          iface.closePO(args.poId);
2611
        } catch (PurchaseServiceException e) {
2612
          result.e = e;
2613
        }
2614
        return result;
2615
      }
2616
    }
2617
 
2618
    private static class isInvoiceReceived<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isInvoiceReceived_args> {
2619
      public isInvoiceReceived() {
2620
        super("isInvoiceReceived");
2621
      }
2622
 
2623
      protected isInvoiceReceived_args getEmptyArgsInstance() {
2624
        return new isInvoiceReceived_args();
2625
      }
2626
 
2627
      protected isInvoiceReceived_result getResult(I iface, isInvoiceReceived_args args) throws org.apache.thrift.TException {
2628
        isInvoiceReceived_result result = new isInvoiceReceived_result();
2629
        result.success = iface.isInvoiceReceived(args.invoiceNumber, args.supplierId);
2630
        result.setSuccessIsSet(true);
2631
        return result;
2632
      }
2633
    }
2634
 
9829 amar.kumar 2635
    private static class changeWarehouseForPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, changeWarehouseForPO_args> {
2636
      public changeWarehouseForPO() {
2637
        super("changeWarehouseForPO");
2638
      }
2639
 
2640
      protected changeWarehouseForPO_args getEmptyArgsInstance() {
2641
        return new changeWarehouseForPO_args();
2642
      }
2643
 
2644
      protected changeWarehouseForPO_result getResult(I iface, changeWarehouseForPO_args args) throws org.apache.thrift.TException {
2645
        changeWarehouseForPO_result result = new changeWarehouseForPO_result();
2646
        try {
2647
          iface.changeWarehouseForPO(args.id, args.warehouseId);
2648
        } catch (PurchaseServiceException e) {
2649
          result.e = e;
2650
        }
2651
        return result;
2652
      }
2653
    }
2654
 
9925 amar.kumar 2655
    private static class changePOStatus<I extends Iface> extends org.apache.thrift.ProcessFunction<I, changePOStatus_args> {
2656
      public changePOStatus() {
2657
        super("changePOStatus");
2658
      }
2659
 
2660
      protected changePOStatus_args getEmptyArgsInstance() {
2661
        return new changePOStatus_args();
2662
      }
2663
 
2664
      protected changePOStatus_result getResult(I iface, changePOStatus_args args) throws org.apache.thrift.TException {
2665
        changePOStatus_result result = new changePOStatus_result();
2666
        try {
2667
          iface.changePOStatus(args.id, args.poStatus);
2668
        } catch (PurchaseServiceException e) {
2669
          result.e = e;
2670
        }
2671
        return result;
2672
      }
2673
    }
2674
 
11751 manish.sha 2675
    private static class getPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseReturn_args> {
2676
      public getPurchaseReturn() {
2677
        super("getPurchaseReturn");
2678
      }
2679
 
2680
      protected getPurchaseReturn_args getEmptyArgsInstance() {
2681
        return new getPurchaseReturn_args();
2682
      }
2683
 
2684
      protected getPurchaseReturn_result getResult(I iface, getPurchaseReturn_args args) throws org.apache.thrift.TException {
2685
        getPurchaseReturn_result result = new getPurchaseReturn_result();
2686
        try {
2687
          result.success = iface.getPurchaseReturn(args.id);
2688
        } catch (PurchaseServiceException e) {
2689
          result.e = e;
2690
        }
2691
        return result;
2692
      }
2693
    }
2694
 
4496 mandeep.dh 2695
  }
2696
 
2697
  public static class createPurchaseOrder_args implements org.apache.thrift.TBase<createPurchaseOrder_args, createPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
2698
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_args");
2699
 
2700
    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);
2701
 
2702
    private PurchaseOrder purchaseOrder; // required
2703
 
2704
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2705
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2706
      PURCHASE_ORDER((short)1, "purchaseOrder");
2707
 
2708
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2709
 
2710
      static {
2711
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2712
          byName.put(field.getFieldName(), field);
2713
        }
2714
      }
2715
 
2716
      /**
2717
       * Find the _Fields constant that matches fieldId, or null if its not found.
2718
       */
2719
      public static _Fields findByThriftId(int fieldId) {
2720
        switch(fieldId) {
2721
          case 1: // PURCHASE_ORDER
2722
            return PURCHASE_ORDER;
2723
          default:
2724
            return null;
2725
        }
2726
      }
2727
 
2728
      /**
2729
       * Find the _Fields constant that matches fieldId, throwing an exception
2730
       * if it is not found.
2731
       */
2732
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2733
        _Fields fields = findByThriftId(fieldId);
2734
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2735
        return fields;
2736
      }
2737
 
2738
      /**
2739
       * Find the _Fields constant that matches name, or null if its not found.
2740
       */
2741
      public static _Fields findByName(String name) {
2742
        return byName.get(name);
2743
      }
2744
 
2745
      private final short _thriftId;
2746
      private final String _fieldName;
2747
 
2748
      _Fields(short thriftId, String fieldName) {
2749
        _thriftId = thriftId;
2750
        _fieldName = fieldName;
2751
      }
2752
 
2753
      public short getThriftFieldId() {
2754
        return _thriftId;
2755
      }
2756
 
2757
      public String getFieldName() {
2758
        return _fieldName;
2759
      }
2760
    }
2761
 
2762
    // isset id assignments
2763
 
2764
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2765
    static {
2766
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2767
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2768
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
2769
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2770
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_args.class, metaDataMap);
2771
    }
2772
 
2773
    public createPurchaseOrder_args() {
2774
    }
2775
 
2776
    public createPurchaseOrder_args(
2777
      PurchaseOrder purchaseOrder)
2778
    {
2779
      this();
2780
      this.purchaseOrder = purchaseOrder;
2781
    }
2782
 
2783
    /**
2784
     * Performs a deep copy on <i>other</i>.
2785
     */
2786
    public createPurchaseOrder_args(createPurchaseOrder_args other) {
2787
      if (other.isSetPurchaseOrder()) {
2788
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
2789
      }
2790
    }
2791
 
2792
    public createPurchaseOrder_args deepCopy() {
2793
      return new createPurchaseOrder_args(this);
2794
    }
2795
 
2796
    @Override
2797
    public void clear() {
2798
      this.purchaseOrder = null;
2799
    }
2800
 
2801
    public PurchaseOrder getPurchaseOrder() {
2802
      return this.purchaseOrder;
2803
    }
2804
 
2805
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
2806
      this.purchaseOrder = purchaseOrder;
2807
    }
2808
 
2809
    public void unsetPurchaseOrder() {
2810
      this.purchaseOrder = null;
2811
    }
2812
 
2813
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
2814
    public boolean isSetPurchaseOrder() {
2815
      return this.purchaseOrder != null;
2816
    }
2817
 
2818
    public void setPurchaseOrderIsSet(boolean value) {
2819
      if (!value) {
2820
        this.purchaseOrder = null;
2821
      }
2822
    }
2823
 
2824
    public void setFieldValue(_Fields field, Object value) {
2825
      switch (field) {
2826
      case PURCHASE_ORDER:
2827
        if (value == null) {
2828
          unsetPurchaseOrder();
2829
        } else {
2830
          setPurchaseOrder((PurchaseOrder)value);
2831
        }
2832
        break;
2833
 
2834
      }
2835
    }
2836
 
2837
    public Object getFieldValue(_Fields field) {
2838
      switch (field) {
2839
      case PURCHASE_ORDER:
2840
        return getPurchaseOrder();
2841
 
2842
      }
2843
      throw new IllegalStateException();
2844
    }
2845
 
2846
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2847
    public boolean isSet(_Fields field) {
2848
      if (field == null) {
2849
        throw new IllegalArgumentException();
2850
      }
2851
 
2852
      switch (field) {
2853
      case PURCHASE_ORDER:
2854
        return isSetPurchaseOrder();
2855
      }
2856
      throw new IllegalStateException();
2857
    }
2858
 
2859
    @Override
2860
    public boolean equals(Object that) {
2861
      if (that == null)
2862
        return false;
2863
      if (that instanceof createPurchaseOrder_args)
2864
        return this.equals((createPurchaseOrder_args)that);
2865
      return false;
2866
    }
2867
 
2868
    public boolean equals(createPurchaseOrder_args that) {
2869
      if (that == null)
2870
        return false;
2871
 
2872
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
2873
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
2874
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
2875
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
2876
          return false;
2877
        if (!this.purchaseOrder.equals(that.purchaseOrder))
2878
          return false;
2879
      }
2880
 
2881
      return true;
2882
    }
2883
 
2884
    @Override
2885
    public int hashCode() {
2886
      return 0;
2887
    }
2888
 
2889
    public int compareTo(createPurchaseOrder_args other) {
2890
      if (!getClass().equals(other.getClass())) {
2891
        return getClass().getName().compareTo(other.getClass().getName());
2892
      }
2893
 
2894
      int lastComparison = 0;
2895
      createPurchaseOrder_args typedOther = (createPurchaseOrder_args)other;
2896
 
2897
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
2898
      if (lastComparison != 0) {
2899
        return lastComparison;
2900
      }
2901
      if (isSetPurchaseOrder()) {
2902
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
2903
        if (lastComparison != 0) {
2904
          return lastComparison;
2905
        }
2906
      }
2907
      return 0;
2908
    }
2909
 
2910
    public _Fields fieldForId(int fieldId) {
2911
      return _Fields.findByThriftId(fieldId);
2912
    }
2913
 
2914
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2915
      org.apache.thrift.protocol.TField field;
2916
      iprot.readStructBegin();
2917
      while (true)
2918
      {
2919
        field = iprot.readFieldBegin();
2920
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2921
          break;
2922
        }
2923
        switch (field.id) {
2924
          case 1: // PURCHASE_ORDER
2925
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2926
              this.purchaseOrder = new PurchaseOrder();
2927
              this.purchaseOrder.read(iprot);
2928
            } else { 
2929
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2930
            }
2931
            break;
2932
          default:
2933
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2934
        }
2935
        iprot.readFieldEnd();
2936
      }
2937
      iprot.readStructEnd();
2938
      validate();
2939
    }
2940
 
2941
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2942
      validate();
2943
 
2944
      oprot.writeStructBegin(STRUCT_DESC);
2945
      if (this.purchaseOrder != null) {
2946
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
2947
        this.purchaseOrder.write(oprot);
2948
        oprot.writeFieldEnd();
2949
      }
2950
      oprot.writeFieldStop();
2951
      oprot.writeStructEnd();
2952
    }
2953
 
2954
    @Override
2955
    public String toString() {
2956
      StringBuilder sb = new StringBuilder("createPurchaseOrder_args(");
2957
      boolean first = true;
2958
 
2959
      sb.append("purchaseOrder:");
2960
      if (this.purchaseOrder == null) {
2961
        sb.append("null");
2962
      } else {
2963
        sb.append(this.purchaseOrder);
2964
      }
2965
      first = false;
2966
      sb.append(")");
2967
      return sb.toString();
2968
    }
2969
 
2970
    public void validate() throws org.apache.thrift.TException {
2971
      // check for required fields
2972
    }
2973
 
2974
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2975
      try {
2976
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2977
      } catch (org.apache.thrift.TException te) {
2978
        throw new java.io.IOException(te);
2979
      }
2980
    }
2981
 
2982
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2983
      try {
2984
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2985
      } catch (org.apache.thrift.TException te) {
2986
        throw new java.io.IOException(te);
2987
      }
2988
    }
2989
 
2990
  }
2991
 
2992
  public static class createPurchaseOrder_result implements org.apache.thrift.TBase<createPurchaseOrder_result, createPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
2993
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_result");
2994
 
2995
    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);
2996
    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);
2997
 
2998
    private long success; // required
2999
    private PurchaseServiceException e; // required
3000
 
3001
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3002
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3003
      SUCCESS((short)0, "success"),
3004
      E((short)1, "e");
3005
 
3006
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3007
 
3008
      static {
3009
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3010
          byName.put(field.getFieldName(), field);
3011
        }
3012
      }
3013
 
3014
      /**
3015
       * Find the _Fields constant that matches fieldId, or null if its not found.
3016
       */
3017
      public static _Fields findByThriftId(int fieldId) {
3018
        switch(fieldId) {
3019
          case 0: // SUCCESS
3020
            return SUCCESS;
3021
          case 1: // E
3022
            return E;
3023
          default:
3024
            return null;
3025
        }
3026
      }
3027
 
3028
      /**
3029
       * Find the _Fields constant that matches fieldId, throwing an exception
3030
       * if it is not found.
3031
       */
3032
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3033
        _Fields fields = findByThriftId(fieldId);
3034
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3035
        return fields;
3036
      }
3037
 
3038
      /**
3039
       * Find the _Fields constant that matches name, or null if its not found.
3040
       */
3041
      public static _Fields findByName(String name) {
3042
        return byName.get(name);
3043
      }
3044
 
3045
      private final short _thriftId;
3046
      private final String _fieldName;
3047
 
3048
      _Fields(short thriftId, String fieldName) {
3049
        _thriftId = thriftId;
3050
        _fieldName = fieldName;
3051
      }
3052
 
3053
      public short getThriftFieldId() {
3054
        return _thriftId;
3055
      }
3056
 
3057
      public String getFieldName() {
3058
        return _fieldName;
3059
      }
3060
    }
3061
 
3062
    // isset id assignments
3063
    private static final int __SUCCESS_ISSET_ID = 0;
3064
    private BitSet __isset_bit_vector = new BitSet(1);
3065
 
3066
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3067
    static {
3068
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3069
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3070
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3071
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3072
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3073
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3074
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_result.class, metaDataMap);
3075
    }
3076
 
3077
    public createPurchaseOrder_result() {
3078
    }
3079
 
3080
    public createPurchaseOrder_result(
3081
      long success,
3082
      PurchaseServiceException e)
3083
    {
3084
      this();
3085
      this.success = success;
3086
      setSuccessIsSet(true);
3087
      this.e = e;
3088
    }
3089
 
3090
    /**
3091
     * Performs a deep copy on <i>other</i>.
3092
     */
3093
    public createPurchaseOrder_result(createPurchaseOrder_result other) {
3094
      __isset_bit_vector.clear();
3095
      __isset_bit_vector.or(other.__isset_bit_vector);
3096
      this.success = other.success;
3097
      if (other.isSetE()) {
3098
        this.e = new PurchaseServiceException(other.e);
3099
      }
3100
    }
3101
 
3102
    public createPurchaseOrder_result deepCopy() {
3103
      return new createPurchaseOrder_result(this);
3104
    }
3105
 
3106
    @Override
3107
    public void clear() {
3108
      setSuccessIsSet(false);
3109
      this.success = 0;
3110
      this.e = null;
3111
    }
3112
 
3113
    public long getSuccess() {
3114
      return this.success;
3115
    }
3116
 
3117
    public void setSuccess(long success) {
3118
      this.success = success;
3119
      setSuccessIsSet(true);
3120
    }
3121
 
3122
    public void unsetSuccess() {
3123
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
3124
    }
3125
 
3126
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
3127
    public boolean isSetSuccess() {
3128
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
3129
    }
3130
 
3131
    public void setSuccessIsSet(boolean value) {
3132
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
3133
    }
3134
 
3135
    public PurchaseServiceException getE() {
3136
      return this.e;
3137
    }
3138
 
3139
    public void setE(PurchaseServiceException e) {
3140
      this.e = e;
3141
    }
3142
 
3143
    public void unsetE() {
3144
      this.e = null;
3145
    }
3146
 
3147
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
3148
    public boolean isSetE() {
3149
      return this.e != null;
3150
    }
3151
 
3152
    public void setEIsSet(boolean value) {
3153
      if (!value) {
3154
        this.e = null;
3155
      }
3156
    }
3157
 
3158
    public void setFieldValue(_Fields field, Object value) {
3159
      switch (field) {
3160
      case SUCCESS:
3161
        if (value == null) {
3162
          unsetSuccess();
3163
        } else {
3164
          setSuccess((Long)value);
3165
        }
3166
        break;
3167
 
3168
      case E:
3169
        if (value == null) {
3170
          unsetE();
3171
        } else {
3172
          setE((PurchaseServiceException)value);
3173
        }
3174
        break;
3175
 
3176
      }
3177
    }
3178
 
3179
    public Object getFieldValue(_Fields field) {
3180
      switch (field) {
3181
      case SUCCESS:
3182
        return Long.valueOf(getSuccess());
3183
 
3184
      case E:
3185
        return getE();
3186
 
3187
      }
3188
      throw new IllegalStateException();
3189
    }
3190
 
3191
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3192
    public boolean isSet(_Fields field) {
3193
      if (field == null) {
3194
        throw new IllegalArgumentException();
3195
      }
3196
 
3197
      switch (field) {
3198
      case SUCCESS:
3199
        return isSetSuccess();
3200
      case E:
3201
        return isSetE();
3202
      }
3203
      throw new IllegalStateException();
3204
    }
3205
 
3206
    @Override
3207
    public boolean equals(Object that) {
3208
      if (that == null)
3209
        return false;
3210
      if (that instanceof createPurchaseOrder_result)
3211
        return this.equals((createPurchaseOrder_result)that);
3212
      return false;
3213
    }
3214
 
3215
    public boolean equals(createPurchaseOrder_result that) {
3216
      if (that == null)
3217
        return false;
3218
 
3219
      boolean this_present_success = true;
3220
      boolean that_present_success = true;
3221
      if (this_present_success || that_present_success) {
3222
        if (!(this_present_success && that_present_success))
3223
          return false;
3224
        if (this.success != that.success)
3225
          return false;
3226
      }
3227
 
3228
      boolean this_present_e = true && this.isSetE();
3229
      boolean that_present_e = true && that.isSetE();
3230
      if (this_present_e || that_present_e) {
3231
        if (!(this_present_e && that_present_e))
3232
          return false;
3233
        if (!this.e.equals(that.e))
3234
          return false;
3235
      }
3236
 
3237
      return true;
3238
    }
3239
 
3240
    @Override
3241
    public int hashCode() {
3242
      return 0;
3243
    }
3244
 
3245
    public int compareTo(createPurchaseOrder_result other) {
3246
      if (!getClass().equals(other.getClass())) {
3247
        return getClass().getName().compareTo(other.getClass().getName());
3248
      }
3249
 
3250
      int lastComparison = 0;
3251
      createPurchaseOrder_result typedOther = (createPurchaseOrder_result)other;
3252
 
3253
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3254
      if (lastComparison != 0) {
3255
        return lastComparison;
3256
      }
3257
      if (isSetSuccess()) {
3258
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3259
        if (lastComparison != 0) {
3260
          return lastComparison;
3261
        }
3262
      }
3263
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
3264
      if (lastComparison != 0) {
3265
        return lastComparison;
3266
      }
3267
      if (isSetE()) {
3268
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
3269
        if (lastComparison != 0) {
3270
          return lastComparison;
3271
        }
3272
      }
3273
      return 0;
3274
    }
3275
 
3276
    public _Fields fieldForId(int fieldId) {
3277
      return _Fields.findByThriftId(fieldId);
3278
    }
3279
 
3280
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3281
      org.apache.thrift.protocol.TField field;
3282
      iprot.readStructBegin();
3283
      while (true)
3284
      {
3285
        field = iprot.readFieldBegin();
3286
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3287
          break;
3288
        }
3289
        switch (field.id) {
3290
          case 0: // SUCCESS
3291
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3292
              this.success = iprot.readI64();
3293
              setSuccessIsSet(true);
3294
            } else { 
3295
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3296
            }
3297
            break;
3298
          case 1: // E
3299
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3300
              this.e = new PurchaseServiceException();
3301
              this.e.read(iprot);
3302
            } else { 
3303
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3304
            }
3305
            break;
3306
          default:
3307
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3308
        }
3309
        iprot.readFieldEnd();
3310
      }
3311
      iprot.readStructEnd();
3312
      validate();
3313
    }
3314
 
3315
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3316
      oprot.writeStructBegin(STRUCT_DESC);
3317
 
3318
      if (this.isSetSuccess()) {
3319
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3320
        oprot.writeI64(this.success);
3321
        oprot.writeFieldEnd();
3322
      } else if (this.isSetE()) {
3323
        oprot.writeFieldBegin(E_FIELD_DESC);
3324
        this.e.write(oprot);
3325
        oprot.writeFieldEnd();
3326
      }
3327
      oprot.writeFieldStop();
3328
      oprot.writeStructEnd();
3329
    }
3330
 
3331
    @Override
3332
    public String toString() {
3333
      StringBuilder sb = new StringBuilder("createPurchaseOrder_result(");
3334
      boolean first = true;
3335
 
3336
      sb.append("success:");
3337
      sb.append(this.success);
3338
      first = false;
3339
      if (!first) sb.append(", ");
3340
      sb.append("e:");
3341
      if (this.e == null) {
3342
        sb.append("null");
3343
      } else {
3344
        sb.append(this.e);
3345
      }
3346
      first = false;
3347
      sb.append(")");
3348
      return sb.toString();
3349
    }
3350
 
3351
    public void validate() throws org.apache.thrift.TException {
3352
      // check for required fields
3353
    }
3354
 
3355
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3356
      try {
3357
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3358
      } catch (org.apache.thrift.TException te) {
3359
        throw new java.io.IOException(te);
3360
      }
3361
    }
3362
 
3363
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3364
      try {
3365
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3366
      } catch (org.apache.thrift.TException te) {
3367
        throw new java.io.IOException(te);
3368
      }
3369
    }
3370
 
3371
  }
3372
 
3373
  public static class getPurchaseOrder_args implements org.apache.thrift.TBase<getPurchaseOrder_args, getPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
3374
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_args");
3375
 
3376
    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);
3377
 
3378
    private long id; // required
3379
 
3380
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3381
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3382
      ID((short)1, "id");
3383
 
3384
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3385
 
3386
      static {
3387
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3388
          byName.put(field.getFieldName(), field);
3389
        }
3390
      }
3391
 
3392
      /**
3393
       * Find the _Fields constant that matches fieldId, or null if its not found.
3394
       */
3395
      public static _Fields findByThriftId(int fieldId) {
3396
        switch(fieldId) {
3397
          case 1: // ID
3398
            return ID;
3399
          default:
3400
            return null;
3401
        }
3402
      }
3403
 
3404
      /**
3405
       * Find the _Fields constant that matches fieldId, throwing an exception
3406
       * if it is not found.
3407
       */
3408
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3409
        _Fields fields = findByThriftId(fieldId);
3410
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3411
        return fields;
3412
      }
3413
 
3414
      /**
3415
       * Find the _Fields constant that matches name, or null if its not found.
3416
       */
3417
      public static _Fields findByName(String name) {
3418
        return byName.get(name);
3419
      }
3420
 
3421
      private final short _thriftId;
3422
      private final String _fieldName;
3423
 
3424
      _Fields(short thriftId, String fieldName) {
3425
        _thriftId = thriftId;
3426
        _fieldName = fieldName;
3427
      }
3428
 
3429
      public short getThriftFieldId() {
3430
        return _thriftId;
3431
      }
3432
 
3433
      public String getFieldName() {
3434
        return _fieldName;
3435
      }
3436
    }
3437
 
3438
    // isset id assignments
3439
    private static final int __ID_ISSET_ID = 0;
3440
    private BitSet __isset_bit_vector = new BitSet(1);
3441
 
3442
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3443
    static {
3444
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3445
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3446
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3447
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3448
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_args.class, metaDataMap);
3449
    }
3450
 
3451
    public getPurchaseOrder_args() {
3452
    }
3453
 
3454
    public getPurchaseOrder_args(
3455
      long id)
3456
    {
3457
      this();
3458
      this.id = id;
3459
      setIdIsSet(true);
3460
    }
3461
 
3462
    /**
3463
     * Performs a deep copy on <i>other</i>.
3464
     */
3465
    public getPurchaseOrder_args(getPurchaseOrder_args other) {
3466
      __isset_bit_vector.clear();
3467
      __isset_bit_vector.or(other.__isset_bit_vector);
3468
      this.id = other.id;
3469
    }
3470
 
3471
    public getPurchaseOrder_args deepCopy() {
3472
      return new getPurchaseOrder_args(this);
3473
    }
3474
 
3475
    @Override
3476
    public void clear() {
3477
      setIdIsSet(false);
3478
      this.id = 0;
3479
    }
3480
 
3481
    public long getId() {
3482
      return this.id;
3483
    }
3484
 
3485
    public void setId(long id) {
3486
      this.id = id;
3487
      setIdIsSet(true);
3488
    }
3489
 
3490
    public void unsetId() {
3491
      __isset_bit_vector.clear(__ID_ISSET_ID);
3492
    }
3493
 
3494
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
3495
    public boolean isSetId() {
3496
      return __isset_bit_vector.get(__ID_ISSET_ID);
3497
    }
3498
 
3499
    public void setIdIsSet(boolean value) {
3500
      __isset_bit_vector.set(__ID_ISSET_ID, value);
3501
    }
3502
 
3503
    public void setFieldValue(_Fields field, Object value) {
3504
      switch (field) {
3505
      case ID:
3506
        if (value == null) {
3507
          unsetId();
3508
        } else {
3509
          setId((Long)value);
3510
        }
3511
        break;
3512
 
3513
      }
3514
    }
3515
 
3516
    public Object getFieldValue(_Fields field) {
3517
      switch (field) {
3518
      case ID:
3519
        return Long.valueOf(getId());
3520
 
3521
      }
3522
      throw new IllegalStateException();
3523
    }
3524
 
3525
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3526
    public boolean isSet(_Fields field) {
3527
      if (field == null) {
3528
        throw new IllegalArgumentException();
3529
      }
3530
 
3531
      switch (field) {
3532
      case ID:
3533
        return isSetId();
3534
      }
3535
      throw new IllegalStateException();
3536
    }
3537
 
3538
    @Override
3539
    public boolean equals(Object that) {
3540
      if (that == null)
3541
        return false;
3542
      if (that instanceof getPurchaseOrder_args)
3543
        return this.equals((getPurchaseOrder_args)that);
3544
      return false;
3545
    }
3546
 
3547
    public boolean equals(getPurchaseOrder_args that) {
3548
      if (that == null)
3549
        return false;
3550
 
3551
      boolean this_present_id = true;
3552
      boolean that_present_id = true;
3553
      if (this_present_id || that_present_id) {
3554
        if (!(this_present_id && that_present_id))
3555
          return false;
3556
        if (this.id != that.id)
3557
          return false;
3558
      }
3559
 
3560
      return true;
3561
    }
3562
 
3563
    @Override
3564
    public int hashCode() {
3565
      return 0;
3566
    }
3567
 
3568
    public int compareTo(getPurchaseOrder_args other) {
3569
      if (!getClass().equals(other.getClass())) {
3570
        return getClass().getName().compareTo(other.getClass().getName());
3571
      }
3572
 
3573
      int lastComparison = 0;
3574
      getPurchaseOrder_args typedOther = (getPurchaseOrder_args)other;
3575
 
3576
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
3577
      if (lastComparison != 0) {
3578
        return lastComparison;
3579
      }
3580
      if (isSetId()) {
3581
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
3582
        if (lastComparison != 0) {
3583
          return lastComparison;
3584
        }
3585
      }
3586
      return 0;
3587
    }
3588
 
3589
    public _Fields fieldForId(int fieldId) {
3590
      return _Fields.findByThriftId(fieldId);
3591
    }
3592
 
3593
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3594
      org.apache.thrift.protocol.TField field;
3595
      iprot.readStructBegin();
3596
      while (true)
3597
      {
3598
        field = iprot.readFieldBegin();
3599
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3600
          break;
3601
        }
3602
        switch (field.id) {
3603
          case 1: // ID
3604
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3605
              this.id = iprot.readI64();
3606
              setIdIsSet(true);
3607
            } else { 
3608
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3609
            }
3610
            break;
3611
          default:
3612
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3613
        }
3614
        iprot.readFieldEnd();
3615
      }
3616
      iprot.readStructEnd();
3617
      validate();
3618
    }
3619
 
3620
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3621
      validate();
3622
 
3623
      oprot.writeStructBegin(STRUCT_DESC);
3624
      oprot.writeFieldBegin(ID_FIELD_DESC);
3625
      oprot.writeI64(this.id);
3626
      oprot.writeFieldEnd();
3627
      oprot.writeFieldStop();
3628
      oprot.writeStructEnd();
3629
    }
3630
 
3631
    @Override
3632
    public String toString() {
3633
      StringBuilder sb = new StringBuilder("getPurchaseOrder_args(");
3634
      boolean first = true;
3635
 
3636
      sb.append("id:");
3637
      sb.append(this.id);
3638
      first = false;
3639
      sb.append(")");
3640
      return sb.toString();
3641
    }
3642
 
3643
    public void validate() throws org.apache.thrift.TException {
3644
      // check for required fields
3645
    }
3646
 
3647
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3648
      try {
3649
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3650
      } catch (org.apache.thrift.TException te) {
3651
        throw new java.io.IOException(te);
3652
      }
3653
    }
3654
 
3655
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3656
      try {
3657
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3658
      } catch (org.apache.thrift.TException te) {
3659
        throw new java.io.IOException(te);
3660
      }
3661
    }
3662
 
3663
  }
3664
 
3665
  public static class getPurchaseOrder_result implements org.apache.thrift.TBase<getPurchaseOrder_result, getPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
3666
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_result");
3667
 
3668
    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);
3669
    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);
3670
 
3671
    private PurchaseOrder success; // required
3672
    private PurchaseServiceException e; // required
3673
 
3674
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3675
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3676
      SUCCESS((short)0, "success"),
3677
      E((short)1, "e");
3678
 
3679
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3680
 
3681
      static {
3682
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3683
          byName.put(field.getFieldName(), field);
3684
        }
3685
      }
3686
 
3687
      /**
3688
       * Find the _Fields constant that matches fieldId, or null if its not found.
3689
       */
3690
      public static _Fields findByThriftId(int fieldId) {
3691
        switch(fieldId) {
3692
          case 0: // SUCCESS
3693
            return SUCCESS;
3694
          case 1: // E
3695
            return E;
3696
          default:
3697
            return null;
3698
        }
3699
      }
3700
 
3701
      /**
3702
       * Find the _Fields constant that matches fieldId, throwing an exception
3703
       * if it is not found.
3704
       */
3705
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3706
        _Fields fields = findByThriftId(fieldId);
3707
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3708
        return fields;
3709
      }
3710
 
3711
      /**
3712
       * Find the _Fields constant that matches name, or null if its not found.
3713
       */
3714
      public static _Fields findByName(String name) {
3715
        return byName.get(name);
3716
      }
3717
 
3718
      private final short _thriftId;
3719
      private final String _fieldName;
3720
 
3721
      _Fields(short thriftId, String fieldName) {
3722
        _thriftId = thriftId;
3723
        _fieldName = fieldName;
3724
      }
3725
 
3726
      public short getThriftFieldId() {
3727
        return _thriftId;
3728
      }
3729
 
3730
      public String getFieldName() {
3731
        return _fieldName;
3732
      }
3733
    }
3734
 
3735
    // isset id assignments
3736
 
3737
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3738
    static {
3739
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3740
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3741
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
3742
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3743
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3744
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3745
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_result.class, metaDataMap);
3746
    }
3747
 
3748
    public getPurchaseOrder_result() {
3749
    }
3750
 
3751
    public getPurchaseOrder_result(
3752
      PurchaseOrder success,
3753
      PurchaseServiceException e)
3754
    {
3755
      this();
3756
      this.success = success;
3757
      this.e = e;
3758
    }
3759
 
3760
    /**
3761
     * Performs a deep copy on <i>other</i>.
3762
     */
3763
    public getPurchaseOrder_result(getPurchaseOrder_result other) {
3764
      if (other.isSetSuccess()) {
3765
        this.success = new PurchaseOrder(other.success);
3766
      }
3767
      if (other.isSetE()) {
3768
        this.e = new PurchaseServiceException(other.e);
3769
      }
3770
    }
3771
 
3772
    public getPurchaseOrder_result deepCopy() {
3773
      return new getPurchaseOrder_result(this);
3774
    }
3775
 
3776
    @Override
3777
    public void clear() {
3778
      this.success = null;
3779
      this.e = null;
3780
    }
3781
 
3782
    public PurchaseOrder getSuccess() {
3783
      return this.success;
3784
    }
3785
 
3786
    public void setSuccess(PurchaseOrder success) {
3787
      this.success = success;
3788
    }
3789
 
3790
    public void unsetSuccess() {
3791
      this.success = null;
3792
    }
3793
 
3794
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
3795
    public boolean isSetSuccess() {
3796
      return this.success != null;
3797
    }
3798
 
3799
    public void setSuccessIsSet(boolean value) {
3800
      if (!value) {
3801
        this.success = null;
3802
      }
3803
    }
3804
 
3805
    public PurchaseServiceException getE() {
3806
      return this.e;
3807
    }
3808
 
3809
    public void setE(PurchaseServiceException e) {
3810
      this.e = e;
3811
    }
3812
 
3813
    public void unsetE() {
3814
      this.e = null;
3815
    }
3816
 
3817
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
3818
    public boolean isSetE() {
3819
      return this.e != null;
3820
    }
3821
 
3822
    public void setEIsSet(boolean value) {
3823
      if (!value) {
3824
        this.e = null;
3825
      }
3826
    }
3827
 
3828
    public void setFieldValue(_Fields field, Object value) {
3829
      switch (field) {
3830
      case SUCCESS:
3831
        if (value == null) {
3832
          unsetSuccess();
3833
        } else {
3834
          setSuccess((PurchaseOrder)value);
3835
        }
3836
        break;
3837
 
3838
      case E:
3839
        if (value == null) {
3840
          unsetE();
3841
        } else {
3842
          setE((PurchaseServiceException)value);
3843
        }
3844
        break;
3845
 
3846
      }
3847
    }
3848
 
3849
    public Object getFieldValue(_Fields field) {
3850
      switch (field) {
3851
      case SUCCESS:
3852
        return getSuccess();
3853
 
3854
      case E:
3855
        return getE();
3856
 
3857
      }
3858
      throw new IllegalStateException();
3859
    }
3860
 
3861
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3862
    public boolean isSet(_Fields field) {
3863
      if (field == null) {
3864
        throw new IllegalArgumentException();
3865
      }
3866
 
3867
      switch (field) {
3868
      case SUCCESS:
3869
        return isSetSuccess();
3870
      case E:
3871
        return isSetE();
3872
      }
3873
      throw new IllegalStateException();
3874
    }
3875
 
3876
    @Override
3877
    public boolean equals(Object that) {
3878
      if (that == null)
3879
        return false;
3880
      if (that instanceof getPurchaseOrder_result)
3881
        return this.equals((getPurchaseOrder_result)that);
3882
      return false;
3883
    }
3884
 
3885
    public boolean equals(getPurchaseOrder_result that) {
3886
      if (that == null)
3887
        return false;
3888
 
3889
      boolean this_present_success = true && this.isSetSuccess();
3890
      boolean that_present_success = true && that.isSetSuccess();
3891
      if (this_present_success || that_present_success) {
3892
        if (!(this_present_success && that_present_success))
3893
          return false;
3894
        if (!this.success.equals(that.success))
3895
          return false;
3896
      }
3897
 
3898
      boolean this_present_e = true && this.isSetE();
3899
      boolean that_present_e = true && that.isSetE();
3900
      if (this_present_e || that_present_e) {
3901
        if (!(this_present_e && that_present_e))
3902
          return false;
3903
        if (!this.e.equals(that.e))
3904
          return false;
3905
      }
3906
 
3907
      return true;
3908
    }
3909
 
3910
    @Override
3911
    public int hashCode() {
3912
      return 0;
3913
    }
3914
 
3915
    public int compareTo(getPurchaseOrder_result other) {
3916
      if (!getClass().equals(other.getClass())) {
3917
        return getClass().getName().compareTo(other.getClass().getName());
3918
      }
3919
 
3920
      int lastComparison = 0;
3921
      getPurchaseOrder_result typedOther = (getPurchaseOrder_result)other;
3922
 
3923
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3924
      if (lastComparison != 0) {
3925
        return lastComparison;
3926
      }
3927
      if (isSetSuccess()) {
3928
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3929
        if (lastComparison != 0) {
3930
          return lastComparison;
3931
        }
3932
      }
3933
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
3934
      if (lastComparison != 0) {
3935
        return lastComparison;
3936
      }
3937
      if (isSetE()) {
3938
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
3939
        if (lastComparison != 0) {
3940
          return lastComparison;
3941
        }
3942
      }
3943
      return 0;
3944
    }
3945
 
3946
    public _Fields fieldForId(int fieldId) {
3947
      return _Fields.findByThriftId(fieldId);
3948
    }
3949
 
3950
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3951
      org.apache.thrift.protocol.TField field;
3952
      iprot.readStructBegin();
3953
      while (true)
3954
      {
3955
        field = iprot.readFieldBegin();
3956
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3957
          break;
3958
        }
3959
        switch (field.id) {
3960
          case 0: // SUCCESS
3961
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3962
              this.success = new PurchaseOrder();
3963
              this.success.read(iprot);
3964
            } else { 
3965
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3966
            }
3967
            break;
3968
          case 1: // E
3969
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3970
              this.e = new PurchaseServiceException();
3971
              this.e.read(iprot);
3972
            } else { 
3973
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3974
            }
3975
            break;
3976
          default:
3977
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3978
        }
3979
        iprot.readFieldEnd();
3980
      }
3981
      iprot.readStructEnd();
3982
      validate();
3983
    }
3984
 
3985
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3986
      oprot.writeStructBegin(STRUCT_DESC);
3987
 
3988
      if (this.isSetSuccess()) {
3989
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3990
        this.success.write(oprot);
3991
        oprot.writeFieldEnd();
3992
      } else if (this.isSetE()) {
3993
        oprot.writeFieldBegin(E_FIELD_DESC);
3994
        this.e.write(oprot);
3995
        oprot.writeFieldEnd();
3996
      }
3997
      oprot.writeFieldStop();
3998
      oprot.writeStructEnd();
3999
    }
4000
 
4001
    @Override
4002
    public String toString() {
4003
      StringBuilder sb = new StringBuilder("getPurchaseOrder_result(");
4004
      boolean first = true;
4005
 
4006
      sb.append("success:");
4007
      if (this.success == null) {
4008
        sb.append("null");
4009
      } else {
4010
        sb.append(this.success);
4011
      }
4012
      first = false;
4013
      if (!first) sb.append(", ");
4014
      sb.append("e:");
4015
      if (this.e == null) {
4016
        sb.append("null");
4017
      } else {
4018
        sb.append(this.e);
4019
      }
4020
      first = false;
4021
      sb.append(")");
4022
      return sb.toString();
4023
    }
4024
 
4025
    public void validate() throws org.apache.thrift.TException {
4026
      // check for required fields
4027
    }
4028
 
4029
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4030
      try {
4031
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4032
      } catch (org.apache.thrift.TException te) {
4033
        throw new java.io.IOException(te);
4034
      }
4035
    }
4036
 
4037
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4038
      try {
4039
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4040
      } catch (org.apache.thrift.TException te) {
4041
        throw new java.io.IOException(te);
4042
      }
4043
    }
4044
 
4045
  }
4046
 
4047
  public static class getAllPurchaseOrders_args implements org.apache.thrift.TBase<getAllPurchaseOrders_args, getAllPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
4048
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_args");
4049
 
4050
    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);
4051
 
4052
    private POStatus status; // required
4053
 
4054
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4055
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4056
      /**
4057
       * 
4058
       * @see POStatus
4059
       */
4060
      STATUS((short)1, "status");
4061
 
4062
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4063
 
4064
      static {
4065
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4066
          byName.put(field.getFieldName(), field);
4067
        }
4068
      }
4069
 
4070
      /**
4071
       * Find the _Fields constant that matches fieldId, or null if its not found.
4072
       */
4073
      public static _Fields findByThriftId(int fieldId) {
4074
        switch(fieldId) {
4075
          case 1: // STATUS
4076
            return STATUS;
4077
          default:
4078
            return null;
4079
        }
4080
      }
4081
 
4082
      /**
4083
       * Find the _Fields constant that matches fieldId, throwing an exception
4084
       * if it is not found.
4085
       */
4086
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4087
        _Fields fields = findByThriftId(fieldId);
4088
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4089
        return fields;
4090
      }
4091
 
4092
      /**
4093
       * Find the _Fields constant that matches name, or null if its not found.
4094
       */
4095
      public static _Fields findByName(String name) {
4096
        return byName.get(name);
4097
      }
4098
 
4099
      private final short _thriftId;
4100
      private final String _fieldName;
4101
 
4102
      _Fields(short thriftId, String fieldName) {
4103
        _thriftId = thriftId;
4104
        _fieldName = fieldName;
4105
      }
4106
 
4107
      public short getThriftFieldId() {
4108
        return _thriftId;
4109
      }
4110
 
4111
      public String getFieldName() {
4112
        return _fieldName;
4113
      }
4114
    }
4115
 
4116
    // isset id assignments
4117
 
4118
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4119
    static {
4120
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4121
      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4122
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, POStatus.class)));
4123
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4124
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_args.class, metaDataMap);
4125
    }
4126
 
4127
    public getAllPurchaseOrders_args() {
4128
    }
4129
 
4130
    public getAllPurchaseOrders_args(
4131
      POStatus status)
4132
    {
4133
      this();
4134
      this.status = status;
4135
    }
4136
 
4137
    /**
4138
     * Performs a deep copy on <i>other</i>.
4139
     */
4140
    public getAllPurchaseOrders_args(getAllPurchaseOrders_args other) {
4141
      if (other.isSetStatus()) {
4142
        this.status = other.status;
4143
      }
4144
    }
4145
 
4146
    public getAllPurchaseOrders_args deepCopy() {
4147
      return new getAllPurchaseOrders_args(this);
4148
    }
4149
 
4150
    @Override
4151
    public void clear() {
4152
      this.status = null;
4153
    }
4154
 
4155
    /**
4156
     * 
4157
     * @see POStatus
4158
     */
4159
    public POStatus getStatus() {
4160
      return this.status;
4161
    }
4162
 
4163
    /**
4164
     * 
4165
     * @see POStatus
4166
     */
4167
    public void setStatus(POStatus status) {
4168
      this.status = status;
4169
    }
4170
 
4171
    public void unsetStatus() {
4172
      this.status = null;
4173
    }
4174
 
4175
    /** Returns true if field status is set (has been assigned a value) and false otherwise */
4176
    public boolean isSetStatus() {
4177
      return this.status != null;
4178
    }
4179
 
4180
    public void setStatusIsSet(boolean value) {
4181
      if (!value) {
4182
        this.status = null;
4183
      }
4184
    }
4185
 
4186
    public void setFieldValue(_Fields field, Object value) {
4187
      switch (field) {
4188
      case STATUS:
4189
        if (value == null) {
4190
          unsetStatus();
4191
        } else {
4192
          setStatus((POStatus)value);
4193
        }
4194
        break;
4195
 
4196
      }
4197
    }
4198
 
4199
    public Object getFieldValue(_Fields field) {
4200
      switch (field) {
4201
      case STATUS:
4202
        return getStatus();
4203
 
4204
      }
4205
      throw new IllegalStateException();
4206
    }
4207
 
4208
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4209
    public boolean isSet(_Fields field) {
4210
      if (field == null) {
4211
        throw new IllegalArgumentException();
4212
      }
4213
 
4214
      switch (field) {
4215
      case STATUS:
4216
        return isSetStatus();
4217
      }
4218
      throw new IllegalStateException();
4219
    }
4220
 
4221
    @Override
4222
    public boolean equals(Object that) {
4223
      if (that == null)
4224
        return false;
4225
      if (that instanceof getAllPurchaseOrders_args)
4226
        return this.equals((getAllPurchaseOrders_args)that);
4227
      return false;
4228
    }
4229
 
4230
    public boolean equals(getAllPurchaseOrders_args that) {
4231
      if (that == null)
4232
        return false;
4233
 
4234
      boolean this_present_status = true && this.isSetStatus();
4235
      boolean that_present_status = true && that.isSetStatus();
4236
      if (this_present_status || that_present_status) {
4237
        if (!(this_present_status && that_present_status))
4238
          return false;
4239
        if (!this.status.equals(that.status))
4240
          return false;
4241
      }
4242
 
4243
      return true;
4244
    }
4245
 
4246
    @Override
4247
    public int hashCode() {
4248
      return 0;
4249
    }
4250
 
4251
    public int compareTo(getAllPurchaseOrders_args other) {
4252
      if (!getClass().equals(other.getClass())) {
4253
        return getClass().getName().compareTo(other.getClass().getName());
4254
      }
4255
 
4256
      int lastComparison = 0;
4257
      getAllPurchaseOrders_args typedOther = (getAllPurchaseOrders_args)other;
4258
 
4259
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
4260
      if (lastComparison != 0) {
4261
        return lastComparison;
4262
      }
4263
      if (isSetStatus()) {
4264
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
4265
        if (lastComparison != 0) {
4266
          return lastComparison;
4267
        }
4268
      }
4269
      return 0;
4270
    }
4271
 
4272
    public _Fields fieldForId(int fieldId) {
4273
      return _Fields.findByThriftId(fieldId);
4274
    }
4275
 
4276
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4277
      org.apache.thrift.protocol.TField field;
4278
      iprot.readStructBegin();
4279
      while (true)
4280
      {
4281
        field = iprot.readFieldBegin();
4282
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4283
          break;
4284
        }
4285
        switch (field.id) {
4286
          case 1: // STATUS
4287
            if (field.type == org.apache.thrift.protocol.TType.I32) {
4288
              this.status = POStatus.findByValue(iprot.readI32());
4289
            } else { 
4290
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4291
            }
4292
            break;
4293
          default:
4294
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4295
        }
4296
        iprot.readFieldEnd();
4297
      }
4298
      iprot.readStructEnd();
4299
      validate();
4300
    }
4301
 
4302
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4303
      validate();
4304
 
4305
      oprot.writeStructBegin(STRUCT_DESC);
4306
      if (this.status != null) {
4307
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
4308
        oprot.writeI32(this.status.getValue());
4309
        oprot.writeFieldEnd();
4310
      }
4311
      oprot.writeFieldStop();
4312
      oprot.writeStructEnd();
4313
    }
4314
 
4315
    @Override
4316
    public String toString() {
4317
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_args(");
4318
      boolean first = true;
4319
 
4320
      sb.append("status:");
4321
      if (this.status == null) {
4322
        sb.append("null");
4323
      } else {
4324
        sb.append(this.status);
4325
      }
4326
      first = false;
4327
      sb.append(")");
4328
      return sb.toString();
4329
    }
4330
 
4331
    public void validate() throws org.apache.thrift.TException {
4332
      // check for required fields
4333
    }
4334
 
4335
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4336
      try {
4337
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4338
      } catch (org.apache.thrift.TException te) {
4339
        throw new java.io.IOException(te);
4340
      }
4341
    }
4342
 
4343
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4344
      try {
4345
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4346
      } catch (org.apache.thrift.TException te) {
4347
        throw new java.io.IOException(te);
4348
      }
4349
    }
4350
 
4351
  }
4352
 
4353
  public static class getAllPurchaseOrders_result implements org.apache.thrift.TBase<getAllPurchaseOrders_result, getAllPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
4354
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_result");
4355
 
4356
    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);
4357
    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);
4358
 
4359
    private List<PurchaseOrder> success; // required
4360
    private PurchaseServiceException e; // required
4361
 
4362
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4363
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4364
      SUCCESS((short)0, "success"),
4365
      E((short)1, "e");
4366
 
4367
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4368
 
4369
      static {
4370
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4371
          byName.put(field.getFieldName(), field);
4372
        }
4373
      }
4374
 
4375
      /**
4376
       * Find the _Fields constant that matches fieldId, or null if its not found.
4377
       */
4378
      public static _Fields findByThriftId(int fieldId) {
4379
        switch(fieldId) {
4380
          case 0: // SUCCESS
4381
            return SUCCESS;
4382
          case 1: // E
4383
            return E;
4384
          default:
4385
            return null;
4386
        }
4387
      }
4388
 
4389
      /**
4390
       * Find the _Fields constant that matches fieldId, throwing an exception
4391
       * if it is not found.
4392
       */
4393
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4394
        _Fields fields = findByThriftId(fieldId);
4395
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4396
        return fields;
4397
      }
4398
 
4399
      /**
4400
       * Find the _Fields constant that matches name, or null if its not found.
4401
       */
4402
      public static _Fields findByName(String name) {
4403
        return byName.get(name);
4404
      }
4405
 
4406
      private final short _thriftId;
4407
      private final String _fieldName;
4408
 
4409
      _Fields(short thriftId, String fieldName) {
4410
        _thriftId = thriftId;
4411
        _fieldName = fieldName;
4412
      }
4413
 
4414
      public short getThriftFieldId() {
4415
        return _thriftId;
4416
      }
4417
 
4418
      public String getFieldName() {
4419
        return _fieldName;
4420
      }
4421
    }
4422
 
4423
    // isset id assignments
4424
 
4425
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4426
    static {
4427
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4428
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4429
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
4430
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
4431
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4432
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4433
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4434
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_result.class, metaDataMap);
4435
    }
4436
 
4437
    public getAllPurchaseOrders_result() {
4438
    }
4439
 
4440
    public getAllPurchaseOrders_result(
4441
      List<PurchaseOrder> success,
4442
      PurchaseServiceException e)
4443
    {
4444
      this();
4445
      this.success = success;
4446
      this.e = e;
4447
    }
4448
 
4449
    /**
4450
     * Performs a deep copy on <i>other</i>.
4451
     */
4452
    public getAllPurchaseOrders_result(getAllPurchaseOrders_result other) {
4453
      if (other.isSetSuccess()) {
4454
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
4455
        for (PurchaseOrder other_element : other.success) {
4456
          __this__success.add(new PurchaseOrder(other_element));
4457
        }
4458
        this.success = __this__success;
4459
      }
4460
      if (other.isSetE()) {
4461
        this.e = new PurchaseServiceException(other.e);
4462
      }
4463
    }
4464
 
4465
    public getAllPurchaseOrders_result deepCopy() {
4466
      return new getAllPurchaseOrders_result(this);
4467
    }
4468
 
4469
    @Override
4470
    public void clear() {
4471
      this.success = null;
4472
      this.e = null;
4473
    }
4474
 
4475
    public int getSuccessSize() {
4476
      return (this.success == null) ? 0 : this.success.size();
4477
    }
4478
 
4479
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
4480
      return (this.success == null) ? null : this.success.iterator();
4481
    }
4482
 
4483
    public void addToSuccess(PurchaseOrder elem) {
4484
      if (this.success == null) {
4485
        this.success = new ArrayList<PurchaseOrder>();
4486
      }
4487
      this.success.add(elem);
4488
    }
4489
 
4490
    public List<PurchaseOrder> getSuccess() {
4491
      return this.success;
4492
    }
4493
 
4494
    public void setSuccess(List<PurchaseOrder> success) {
4495
      this.success = success;
4496
    }
4497
 
4498
    public void unsetSuccess() {
4499
      this.success = null;
4500
    }
4501
 
4502
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
4503
    public boolean isSetSuccess() {
4504
      return this.success != null;
4505
    }
4506
 
4507
    public void setSuccessIsSet(boolean value) {
4508
      if (!value) {
4509
        this.success = null;
4510
      }
4511
    }
4512
 
4513
    public PurchaseServiceException getE() {
4514
      return this.e;
4515
    }
4516
 
4517
    public void setE(PurchaseServiceException e) {
4518
      this.e = e;
4519
    }
4520
 
4521
    public void unsetE() {
4522
      this.e = null;
4523
    }
4524
 
4525
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
4526
    public boolean isSetE() {
4527
      return this.e != null;
4528
    }
4529
 
4530
    public void setEIsSet(boolean value) {
4531
      if (!value) {
4532
        this.e = null;
4533
      }
4534
    }
4535
 
4536
    public void setFieldValue(_Fields field, Object value) {
4537
      switch (field) {
4538
      case SUCCESS:
4539
        if (value == null) {
4540
          unsetSuccess();
4541
        } else {
4542
          setSuccess((List<PurchaseOrder>)value);
4543
        }
4544
        break;
4545
 
4546
      case E:
4547
        if (value == null) {
4548
          unsetE();
4549
        } else {
4550
          setE((PurchaseServiceException)value);
4551
        }
4552
        break;
4553
 
4554
      }
4555
    }
4556
 
4557
    public Object getFieldValue(_Fields field) {
4558
      switch (field) {
4559
      case SUCCESS:
4560
        return getSuccess();
4561
 
4562
      case E:
4563
        return getE();
4564
 
4565
      }
4566
      throw new IllegalStateException();
4567
    }
4568
 
4569
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4570
    public boolean isSet(_Fields field) {
4571
      if (field == null) {
4572
        throw new IllegalArgumentException();
4573
      }
4574
 
4575
      switch (field) {
4576
      case SUCCESS:
4577
        return isSetSuccess();
4578
      case E:
4579
        return isSetE();
4580
      }
4581
      throw new IllegalStateException();
4582
    }
4583
 
4584
    @Override
4585
    public boolean equals(Object that) {
4586
      if (that == null)
4587
        return false;
4588
      if (that instanceof getAllPurchaseOrders_result)
4589
        return this.equals((getAllPurchaseOrders_result)that);
4590
      return false;
4591
    }
4592
 
4593
    public boolean equals(getAllPurchaseOrders_result that) {
4594
      if (that == null)
4595
        return false;
4596
 
4597
      boolean this_present_success = true && this.isSetSuccess();
4598
      boolean that_present_success = true && that.isSetSuccess();
4599
      if (this_present_success || that_present_success) {
4600
        if (!(this_present_success && that_present_success))
4601
          return false;
4602
        if (!this.success.equals(that.success))
4603
          return false;
4604
      }
4605
 
4606
      boolean this_present_e = true && this.isSetE();
4607
      boolean that_present_e = true && that.isSetE();
4608
      if (this_present_e || that_present_e) {
4609
        if (!(this_present_e && that_present_e))
4610
          return false;
4611
        if (!this.e.equals(that.e))
4612
          return false;
4613
      }
4614
 
4615
      return true;
4616
    }
4617
 
4618
    @Override
4619
    public int hashCode() {
4620
      return 0;
4621
    }
4622
 
4623
    public int compareTo(getAllPurchaseOrders_result other) {
4624
      if (!getClass().equals(other.getClass())) {
4625
        return getClass().getName().compareTo(other.getClass().getName());
4626
      }
4627
 
4628
      int lastComparison = 0;
4629
      getAllPurchaseOrders_result typedOther = (getAllPurchaseOrders_result)other;
4630
 
4631
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
4632
      if (lastComparison != 0) {
4633
        return lastComparison;
4634
      }
4635
      if (isSetSuccess()) {
4636
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4637
        if (lastComparison != 0) {
4638
          return lastComparison;
4639
        }
4640
      }
4641
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
4642
      if (lastComparison != 0) {
4643
        return lastComparison;
4644
      }
4645
      if (isSetE()) {
4646
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
4647
        if (lastComparison != 0) {
4648
          return lastComparison;
4649
        }
4650
      }
4651
      return 0;
4652
    }
4653
 
4654
    public _Fields fieldForId(int fieldId) {
4655
      return _Fields.findByThriftId(fieldId);
4656
    }
4657
 
4658
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4659
      org.apache.thrift.protocol.TField field;
4660
      iprot.readStructBegin();
4661
      while (true)
4662
      {
4663
        field = iprot.readFieldBegin();
4664
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4665
          break;
4666
        }
4667
        switch (field.id) {
4668
          case 0: // SUCCESS
4669
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
4670
              {
4671
                org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
4672
                this.success = new ArrayList<PurchaseOrder>(_list4.size);
4673
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
4674
                {
4675
                  PurchaseOrder _elem6; // required
4676
                  _elem6 = new PurchaseOrder();
4677
                  _elem6.read(iprot);
4678
                  this.success.add(_elem6);
4679
                }
4680
                iprot.readListEnd();
4681
              }
4682
            } else { 
4683
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4684
            }
4685
            break;
4686
          case 1: // E
4687
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4688
              this.e = new PurchaseServiceException();
4689
              this.e.read(iprot);
4690
            } else { 
4691
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4692
            }
4693
            break;
4694
          default:
4695
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4696
        }
4697
        iprot.readFieldEnd();
4698
      }
4699
      iprot.readStructEnd();
4700
      validate();
4701
    }
4702
 
4703
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4704
      oprot.writeStructBegin(STRUCT_DESC);
4705
 
4706
      if (this.isSetSuccess()) {
4707
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4708
        {
4709
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
4710
          for (PurchaseOrder _iter7 : this.success)
4711
          {
4712
            _iter7.write(oprot);
4713
          }
4714
          oprot.writeListEnd();
4715
        }
4716
        oprot.writeFieldEnd();
4717
      } else if (this.isSetE()) {
4718
        oprot.writeFieldBegin(E_FIELD_DESC);
4719
        this.e.write(oprot);
4720
        oprot.writeFieldEnd();
4721
      }
4722
      oprot.writeFieldStop();
4723
      oprot.writeStructEnd();
4724
    }
4725
 
4726
    @Override
4727
    public String toString() {
4728
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_result(");
4729
      boolean first = true;
4730
 
4731
      sb.append("success:");
4732
      if (this.success == null) {
4733
        sb.append("null");
4734
      } else {
4735
        sb.append(this.success);
4736
      }
4737
      first = false;
4738
      if (!first) sb.append(", ");
4739
      sb.append("e:");
4740
      if (this.e == null) {
4741
        sb.append("null");
4742
      } else {
4743
        sb.append(this.e);
4744
      }
4745
      first = false;
4746
      sb.append(")");
4747
      return sb.toString();
4748
    }
4749
 
4750
    public void validate() throws org.apache.thrift.TException {
4751
      // check for required fields
4752
    }
4753
 
4754
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4755
      try {
4756
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4757
      } catch (org.apache.thrift.TException te) {
4758
        throw new java.io.IOException(te);
4759
      }
4760
    }
4761
 
4762
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4763
      try {
4764
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4765
      } catch (org.apache.thrift.TException te) {
4766
        throw new java.io.IOException(te);
4767
      }
4768
    }
4769
 
4770
  }
4771
 
4772
  public static class getSupplier_args implements org.apache.thrift.TBase<getSupplier_args, getSupplier_args._Fields>, java.io.Serializable, Cloneable   {
4773
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_args");
4774
 
4775
    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);
4776
 
4777
    private long id; // required
4778
 
4779
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4780
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4781
      ID((short)1, "id");
4782
 
4783
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4784
 
4785
      static {
4786
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4787
          byName.put(field.getFieldName(), field);
4788
        }
4789
      }
4790
 
4791
      /**
4792
       * Find the _Fields constant that matches fieldId, or null if its not found.
4793
       */
4794
      public static _Fields findByThriftId(int fieldId) {
4795
        switch(fieldId) {
4796
          case 1: // ID
4797
            return ID;
4798
          default:
4799
            return null;
4800
        }
4801
      }
4802
 
4803
      /**
4804
       * Find the _Fields constant that matches fieldId, throwing an exception
4805
       * if it is not found.
4806
       */
4807
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4808
        _Fields fields = findByThriftId(fieldId);
4809
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4810
        return fields;
4811
      }
4812
 
4813
      /**
4814
       * Find the _Fields constant that matches name, or null if its not found.
4815
       */
4816
      public static _Fields findByName(String name) {
4817
        return byName.get(name);
4818
      }
4819
 
4820
      private final short _thriftId;
4821
      private final String _fieldName;
4822
 
4823
      _Fields(short thriftId, String fieldName) {
4824
        _thriftId = thriftId;
4825
        _fieldName = fieldName;
4826
      }
4827
 
4828
      public short getThriftFieldId() {
4829
        return _thriftId;
4830
      }
4831
 
4832
      public String getFieldName() {
4833
        return _fieldName;
4834
      }
4835
    }
4836
 
4837
    // isset id assignments
4838
    private static final int __ID_ISSET_ID = 0;
4839
    private BitSet __isset_bit_vector = new BitSet(1);
4840
 
4841
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4842
    static {
4843
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4844
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4845
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4846
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4847
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_args.class, metaDataMap);
4848
    }
4849
 
4850
    public getSupplier_args() {
4851
    }
4852
 
4853
    public getSupplier_args(
4854
      long id)
4855
    {
4856
      this();
4857
      this.id = id;
4858
      setIdIsSet(true);
4859
    }
4860
 
4861
    /**
4862
     * Performs a deep copy on <i>other</i>.
4863
     */
4864
    public getSupplier_args(getSupplier_args other) {
4865
      __isset_bit_vector.clear();
4866
      __isset_bit_vector.or(other.__isset_bit_vector);
4867
      this.id = other.id;
4868
    }
4869
 
4870
    public getSupplier_args deepCopy() {
4871
      return new getSupplier_args(this);
4872
    }
4873
 
4874
    @Override
4875
    public void clear() {
4876
      setIdIsSet(false);
4877
      this.id = 0;
4878
    }
4879
 
4880
    public long getId() {
4881
      return this.id;
4882
    }
4883
 
4884
    public void setId(long id) {
4885
      this.id = id;
4886
      setIdIsSet(true);
4887
    }
4888
 
4889
    public void unsetId() {
4890
      __isset_bit_vector.clear(__ID_ISSET_ID);
4891
    }
4892
 
4893
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
4894
    public boolean isSetId() {
4895
      return __isset_bit_vector.get(__ID_ISSET_ID);
4896
    }
4897
 
4898
    public void setIdIsSet(boolean value) {
4899
      __isset_bit_vector.set(__ID_ISSET_ID, value);
4900
    }
4901
 
4902
    public void setFieldValue(_Fields field, Object value) {
4903
      switch (field) {
4904
      case ID:
4905
        if (value == null) {
4906
          unsetId();
4907
        } else {
4908
          setId((Long)value);
4909
        }
4910
        break;
4911
 
4912
      }
4913
    }
4914
 
4915
    public Object getFieldValue(_Fields field) {
4916
      switch (field) {
4917
      case ID:
4918
        return Long.valueOf(getId());
4919
 
4920
      }
4921
      throw new IllegalStateException();
4922
    }
4923
 
4924
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4925
    public boolean isSet(_Fields field) {
4926
      if (field == null) {
4927
        throw new IllegalArgumentException();
4928
      }
4929
 
4930
      switch (field) {
4931
      case ID:
4932
        return isSetId();
4933
      }
4934
      throw new IllegalStateException();
4935
    }
4936
 
4937
    @Override
4938
    public boolean equals(Object that) {
4939
      if (that == null)
4940
        return false;
4941
      if (that instanceof getSupplier_args)
4942
        return this.equals((getSupplier_args)that);
4943
      return false;
4944
    }
4945
 
4946
    public boolean equals(getSupplier_args that) {
4947
      if (that == null)
4948
        return false;
4949
 
4950
      boolean this_present_id = true;
4951
      boolean that_present_id = true;
4952
      if (this_present_id || that_present_id) {
4953
        if (!(this_present_id && that_present_id))
4954
          return false;
4955
        if (this.id != that.id)
4956
          return false;
4957
      }
4958
 
4959
      return true;
4960
    }
4961
 
4962
    @Override
4963
    public int hashCode() {
4964
      return 0;
4965
    }
4966
 
4967
    public int compareTo(getSupplier_args other) {
4968
      if (!getClass().equals(other.getClass())) {
4969
        return getClass().getName().compareTo(other.getClass().getName());
4970
      }
4971
 
4972
      int lastComparison = 0;
4973
      getSupplier_args typedOther = (getSupplier_args)other;
4974
 
4975
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
4976
      if (lastComparison != 0) {
4977
        return lastComparison;
4978
      }
4979
      if (isSetId()) {
4980
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
4981
        if (lastComparison != 0) {
4982
          return lastComparison;
4983
        }
4984
      }
4985
      return 0;
4986
    }
4987
 
4988
    public _Fields fieldForId(int fieldId) {
4989
      return _Fields.findByThriftId(fieldId);
4990
    }
4991
 
4992
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4993
      org.apache.thrift.protocol.TField field;
4994
      iprot.readStructBegin();
4995
      while (true)
4996
      {
4997
        field = iprot.readFieldBegin();
4998
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4999
          break;
5000
        }
5001
        switch (field.id) {
5002
          case 1: // ID
5003
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5004
              this.id = iprot.readI64();
5005
              setIdIsSet(true);
5006
            } else { 
5007
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5008
            }
5009
            break;
5010
          default:
5011
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5012
        }
5013
        iprot.readFieldEnd();
5014
      }
5015
      iprot.readStructEnd();
5016
      validate();
5017
    }
5018
 
5019
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5020
      validate();
5021
 
5022
      oprot.writeStructBegin(STRUCT_DESC);
5023
      oprot.writeFieldBegin(ID_FIELD_DESC);
5024
      oprot.writeI64(this.id);
5025
      oprot.writeFieldEnd();
5026
      oprot.writeFieldStop();
5027
      oprot.writeStructEnd();
5028
    }
5029
 
5030
    @Override
5031
    public String toString() {
5032
      StringBuilder sb = new StringBuilder("getSupplier_args(");
5033
      boolean first = true;
5034
 
5035
      sb.append("id:");
5036
      sb.append(this.id);
5037
      first = false;
5038
      sb.append(")");
5039
      return sb.toString();
5040
    }
5041
 
5042
    public void validate() throws org.apache.thrift.TException {
5043
      // check for required fields
5044
    }
5045
 
5046
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5047
      try {
5048
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5049
      } catch (org.apache.thrift.TException te) {
5050
        throw new java.io.IOException(te);
5051
      }
5052
    }
5053
 
5054
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5055
      try {
5056
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
5057
        __isset_bit_vector = new BitSet(1);
5058
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5059
      } catch (org.apache.thrift.TException te) {
5060
        throw new java.io.IOException(te);
5061
      }
5062
    }
5063
 
5064
  }
5065
 
5066
  public static class getSupplier_result implements org.apache.thrift.TBase<getSupplier_result, getSupplier_result._Fields>, java.io.Serializable, Cloneable   {
5067
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_result");
5068
 
5069
    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);
5070
    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);
5071
 
5072
    private Supplier success; // required
5073
    private PurchaseServiceException e; // required
5074
 
5075
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5076
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5077
      SUCCESS((short)0, "success"),
5078
      E((short)1, "e");
5079
 
5080
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5081
 
5082
      static {
5083
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5084
          byName.put(field.getFieldName(), field);
5085
        }
5086
      }
5087
 
5088
      /**
5089
       * Find the _Fields constant that matches fieldId, or null if its not found.
5090
       */
5091
      public static _Fields findByThriftId(int fieldId) {
5092
        switch(fieldId) {
5093
          case 0: // SUCCESS
5094
            return SUCCESS;
5095
          case 1: // E
5096
            return E;
5097
          default:
5098
            return null;
5099
        }
5100
      }
5101
 
5102
      /**
5103
       * Find the _Fields constant that matches fieldId, throwing an exception
5104
       * if it is not found.
5105
       */
5106
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5107
        _Fields fields = findByThriftId(fieldId);
5108
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5109
        return fields;
5110
      }
5111
 
5112
      /**
5113
       * Find the _Fields constant that matches name, or null if its not found.
5114
       */
5115
      public static _Fields findByName(String name) {
5116
        return byName.get(name);
5117
      }
5118
 
5119
      private final short _thriftId;
5120
      private final String _fieldName;
5121
 
5122
      _Fields(short thriftId, String fieldName) {
5123
        _thriftId = thriftId;
5124
        _fieldName = fieldName;
5125
      }
5126
 
5127
      public short getThriftFieldId() {
5128
        return _thriftId;
5129
      }
5130
 
5131
      public String getFieldName() {
5132
        return _fieldName;
5133
      }
5134
    }
5135
 
5136
    // isset id assignments
5137
 
5138
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5139
    static {
5140
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5141
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5142
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
5143
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5144
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5145
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5146
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_result.class, metaDataMap);
5147
    }
5148
 
5149
    public getSupplier_result() {
5150
    }
5151
 
5152
    public getSupplier_result(
5153
      Supplier success,
5154
      PurchaseServiceException e)
5155
    {
5156
      this();
5157
      this.success = success;
5158
      this.e = e;
5159
    }
5160
 
5161
    /**
5162
     * Performs a deep copy on <i>other</i>.
5163
     */
5164
    public getSupplier_result(getSupplier_result other) {
5165
      if (other.isSetSuccess()) {
5166
        this.success = new Supplier(other.success);
5167
      }
5168
      if (other.isSetE()) {
5169
        this.e = new PurchaseServiceException(other.e);
5170
      }
5171
    }
5172
 
5173
    public getSupplier_result deepCopy() {
5174
      return new getSupplier_result(this);
5175
    }
5176
 
5177
    @Override
5178
    public void clear() {
5179
      this.success = null;
5180
      this.e = null;
5181
    }
5182
 
5183
    public Supplier getSuccess() {
5184
      return this.success;
5185
    }
5186
 
5187
    public void setSuccess(Supplier success) {
5188
      this.success = success;
5189
    }
5190
 
5191
    public void unsetSuccess() {
5192
      this.success = null;
5193
    }
5194
 
5195
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5196
    public boolean isSetSuccess() {
5197
      return this.success != null;
5198
    }
5199
 
5200
    public void setSuccessIsSet(boolean value) {
5201
      if (!value) {
5202
        this.success = null;
5203
      }
5204
    }
5205
 
5206
    public PurchaseServiceException getE() {
5207
      return this.e;
5208
    }
5209
 
5210
    public void setE(PurchaseServiceException e) {
5211
      this.e = e;
5212
    }
5213
 
5214
    public void unsetE() {
5215
      this.e = null;
5216
    }
5217
 
5218
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
5219
    public boolean isSetE() {
5220
      return this.e != null;
5221
    }
5222
 
5223
    public void setEIsSet(boolean value) {
5224
      if (!value) {
5225
        this.e = null;
5226
      }
5227
    }
5228
 
5229
    public void setFieldValue(_Fields field, Object value) {
5230
      switch (field) {
5231
      case SUCCESS:
5232
        if (value == null) {
5233
          unsetSuccess();
5234
        } else {
5235
          setSuccess((Supplier)value);
5236
        }
5237
        break;
5238
 
5239
      case E:
5240
        if (value == null) {
5241
          unsetE();
5242
        } else {
5243
          setE((PurchaseServiceException)value);
5244
        }
5245
        break;
5246
 
5247
      }
5248
    }
5249
 
5250
    public Object getFieldValue(_Fields field) {
5251
      switch (field) {
5252
      case SUCCESS:
5253
        return getSuccess();
5254
 
5255
      case E:
5256
        return getE();
5257
 
5258
      }
5259
      throw new IllegalStateException();
5260
    }
5261
 
5262
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5263
    public boolean isSet(_Fields field) {
5264
      if (field == null) {
5265
        throw new IllegalArgumentException();
5266
      }
5267
 
5268
      switch (field) {
5269
      case SUCCESS:
5270
        return isSetSuccess();
5271
      case E:
5272
        return isSetE();
5273
      }
5274
      throw new IllegalStateException();
5275
    }
5276
 
5277
    @Override
5278
    public boolean equals(Object that) {
5279
      if (that == null)
5280
        return false;
5281
      if (that instanceof getSupplier_result)
5282
        return this.equals((getSupplier_result)that);
5283
      return false;
5284
    }
5285
 
5286
    public boolean equals(getSupplier_result that) {
5287
      if (that == null)
5288
        return false;
5289
 
5290
      boolean this_present_success = true && this.isSetSuccess();
5291
      boolean that_present_success = true && that.isSetSuccess();
5292
      if (this_present_success || that_present_success) {
5293
        if (!(this_present_success && that_present_success))
5294
          return false;
5295
        if (!this.success.equals(that.success))
5296
          return false;
5297
      }
5298
 
5299
      boolean this_present_e = true && this.isSetE();
5300
      boolean that_present_e = true && that.isSetE();
5301
      if (this_present_e || that_present_e) {
5302
        if (!(this_present_e && that_present_e))
5303
          return false;
5304
        if (!this.e.equals(that.e))
5305
          return false;
5306
      }
5307
 
5308
      return true;
5309
    }
5310
 
5311
    @Override
5312
    public int hashCode() {
5313
      return 0;
5314
    }
5315
 
5316
    public int compareTo(getSupplier_result other) {
5317
      if (!getClass().equals(other.getClass())) {
5318
        return getClass().getName().compareTo(other.getClass().getName());
5319
      }
5320
 
5321
      int lastComparison = 0;
5322
      getSupplier_result typedOther = (getSupplier_result)other;
5323
 
5324
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5325
      if (lastComparison != 0) {
5326
        return lastComparison;
5327
      }
5328
      if (isSetSuccess()) {
5329
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5330
        if (lastComparison != 0) {
5331
          return lastComparison;
5332
        }
5333
      }
5334
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
5335
      if (lastComparison != 0) {
5336
        return lastComparison;
5337
      }
5338
      if (isSetE()) {
5339
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
5340
        if (lastComparison != 0) {
5341
          return lastComparison;
5342
        }
5343
      }
5344
      return 0;
5345
    }
5346
 
5347
    public _Fields fieldForId(int fieldId) {
5348
      return _Fields.findByThriftId(fieldId);
5349
    }
5350
 
5351
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5352
      org.apache.thrift.protocol.TField field;
5353
      iprot.readStructBegin();
5354
      while (true)
5355
      {
5356
        field = iprot.readFieldBegin();
5357
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5358
          break;
5359
        }
5360
        switch (field.id) {
5361
          case 0: // SUCCESS
5362
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5363
              this.success = new Supplier();
5364
              this.success.read(iprot);
5365
            } else { 
5366
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5367
            }
5368
            break;
5369
          case 1: // E
5370
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5371
              this.e = new PurchaseServiceException();
5372
              this.e.read(iprot);
5373
            } else { 
5374
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5375
            }
5376
            break;
5377
          default:
5378
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5379
        }
5380
        iprot.readFieldEnd();
5381
      }
5382
      iprot.readStructEnd();
5383
      validate();
5384
    }
5385
 
5386
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5387
      oprot.writeStructBegin(STRUCT_DESC);
5388
 
5389
      if (this.isSetSuccess()) {
5390
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5391
        this.success.write(oprot);
5392
        oprot.writeFieldEnd();
5393
      } else if (this.isSetE()) {
5394
        oprot.writeFieldBegin(E_FIELD_DESC);
5395
        this.e.write(oprot);
5396
        oprot.writeFieldEnd();
5397
      }
5398
      oprot.writeFieldStop();
5399
      oprot.writeStructEnd();
5400
    }
5401
 
5402
    @Override
5403
    public String toString() {
5404
      StringBuilder sb = new StringBuilder("getSupplier_result(");
5405
      boolean first = true;
5406
 
5407
      sb.append("success:");
5408
      if (this.success == null) {
5409
        sb.append("null");
5410
      } else {
5411
        sb.append(this.success);
5412
      }
5413
      first = false;
5414
      if (!first) sb.append(", ");
5415
      sb.append("e:");
5416
      if (this.e == null) {
5417
        sb.append("null");
5418
      } else {
5419
        sb.append(this.e);
5420
      }
5421
      first = false;
5422
      sb.append(")");
5423
      return sb.toString();
5424
    }
5425
 
5426
    public void validate() throws org.apache.thrift.TException {
5427
      // check for required fields
5428
    }
5429
 
5430
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5431
      try {
5432
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5433
      } catch (org.apache.thrift.TException te) {
5434
        throw new java.io.IOException(te);
5435
      }
5436
    }
5437
 
5438
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5439
      try {
5440
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5441
      } catch (org.apache.thrift.TException te) {
5442
        throw new java.io.IOException(te);
5443
      }
5444
    }
5445
 
5446
  }
5447
 
5448
  public static class startPurchase_args implements org.apache.thrift.TBase<startPurchase_args, startPurchase_args._Fields>, java.io.Serializable, Cloneable   {
5449
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_args");
5450
 
5451
    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);
5452
    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);
5453
    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);
11801 manish.sha 5454
    private static final org.apache.thrift.protocol.TField PURCHASE_COMMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseComments", org.apache.thrift.protocol.TType.STRING, (short)4);
4496 mandeep.dh 5455
 
5456
    private long purchaseOrderId; // required
5457
    private String invoiceNumber; // required
5458
    private double freightCharges; // required
11801 manish.sha 5459
    private String purchaseComments; // required
4496 mandeep.dh 5460
 
5461
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5462
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5463
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
5464
      INVOICE_NUMBER((short)2, "invoiceNumber"),
11801 manish.sha 5465
      FREIGHT_CHARGES((short)3, "freightCharges"),
5466
      PURCHASE_COMMENTS((short)4, "purchaseComments");
4496 mandeep.dh 5467
 
5468
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5469
 
5470
      static {
5471
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5472
          byName.put(field.getFieldName(), field);
5473
        }
5474
      }
5475
 
5476
      /**
5477
       * Find the _Fields constant that matches fieldId, or null if its not found.
5478
       */
5479
      public static _Fields findByThriftId(int fieldId) {
5480
        switch(fieldId) {
5481
          case 1: // PURCHASE_ORDER_ID
5482
            return PURCHASE_ORDER_ID;
5483
          case 2: // INVOICE_NUMBER
5484
            return INVOICE_NUMBER;
5485
          case 3: // FREIGHT_CHARGES
5486
            return FREIGHT_CHARGES;
11801 manish.sha 5487
          case 4: // PURCHASE_COMMENTS
5488
            return PURCHASE_COMMENTS;
4496 mandeep.dh 5489
          default:
5490
            return null;
5491
        }
5492
      }
5493
 
5494
      /**
5495
       * Find the _Fields constant that matches fieldId, throwing an exception
5496
       * if it is not found.
5497
       */
5498
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5499
        _Fields fields = findByThriftId(fieldId);
5500
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5501
        return fields;
5502
      }
5503
 
5504
      /**
5505
       * Find the _Fields constant that matches name, or null if its not found.
5506
       */
5507
      public static _Fields findByName(String name) {
5508
        return byName.get(name);
5509
      }
5510
 
5511
      private final short _thriftId;
5512
      private final String _fieldName;
5513
 
5514
      _Fields(short thriftId, String fieldName) {
5515
        _thriftId = thriftId;
5516
        _fieldName = fieldName;
5517
      }
5518
 
5519
      public short getThriftFieldId() {
5520
        return _thriftId;
5521
      }
5522
 
5523
      public String getFieldName() {
5524
        return _fieldName;
5525
      }
5526
    }
5527
 
5528
    // isset id assignments
5529
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
5530
    private static final int __FREIGHTCHARGES_ISSET_ID = 1;
5531
    private BitSet __isset_bit_vector = new BitSet(2);
5532
 
5533
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5534
    static {
5535
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5536
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5537
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5538
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5539
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
5540
      tmpMap.put(_Fields.FREIGHT_CHARGES, new org.apache.thrift.meta_data.FieldMetaData("freightCharges", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5541
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
11801 manish.sha 5542
      tmpMap.put(_Fields.PURCHASE_COMMENTS, new org.apache.thrift.meta_data.FieldMetaData("purchaseComments", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5543
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
4496 mandeep.dh 5544
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5545
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_args.class, metaDataMap);
5546
    }
5547
 
5548
    public startPurchase_args() {
5549
    }
5550
 
5551
    public startPurchase_args(
5552
      long purchaseOrderId,
5553
      String invoiceNumber,
11801 manish.sha 5554
      double freightCharges,
5555
      String purchaseComments)
4496 mandeep.dh 5556
    {
5557
      this();
5558
      this.purchaseOrderId = purchaseOrderId;
5559
      setPurchaseOrderIdIsSet(true);
5560
      this.invoiceNumber = invoiceNumber;
5561
      this.freightCharges = freightCharges;
5562
      setFreightChargesIsSet(true);
11801 manish.sha 5563
      this.purchaseComments = purchaseComments;
4496 mandeep.dh 5564
    }
5565
 
5566
    /**
5567
     * Performs a deep copy on <i>other</i>.
5568
     */
5569
    public startPurchase_args(startPurchase_args other) {
5570
      __isset_bit_vector.clear();
5571
      __isset_bit_vector.or(other.__isset_bit_vector);
5572
      this.purchaseOrderId = other.purchaseOrderId;
5573
      if (other.isSetInvoiceNumber()) {
5574
        this.invoiceNumber = other.invoiceNumber;
5575
      }
5576
      this.freightCharges = other.freightCharges;
11801 manish.sha 5577
      if (other.isSetPurchaseComments()) {
5578
        this.purchaseComments = other.purchaseComments;
5579
      }
4496 mandeep.dh 5580
    }
5581
 
5582
    public startPurchase_args deepCopy() {
5583
      return new startPurchase_args(this);
5584
    }
5585
 
5586
    @Override
5587
    public void clear() {
5588
      setPurchaseOrderIdIsSet(false);
5589
      this.purchaseOrderId = 0;
5590
      this.invoiceNumber = null;
5591
      setFreightChargesIsSet(false);
5592
      this.freightCharges = 0.0;
11801 manish.sha 5593
      this.purchaseComments = null;
4496 mandeep.dh 5594
    }
5595
 
5596
    public long getPurchaseOrderId() {
5597
      return this.purchaseOrderId;
5598
    }
5599
 
5600
    public void setPurchaseOrderId(long purchaseOrderId) {
5601
      this.purchaseOrderId = purchaseOrderId;
5602
      setPurchaseOrderIdIsSet(true);
5603
    }
5604
 
5605
    public void unsetPurchaseOrderId() {
5606
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
5607
    }
5608
 
5609
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
5610
    public boolean isSetPurchaseOrderId() {
5611
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
5612
    }
5613
 
5614
    public void setPurchaseOrderIdIsSet(boolean value) {
5615
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
5616
    }
5617
 
5618
    public String getInvoiceNumber() {
5619
      return this.invoiceNumber;
5620
    }
5621
 
5622
    public void setInvoiceNumber(String invoiceNumber) {
5623
      this.invoiceNumber = invoiceNumber;
5624
    }
5625
 
5626
    public void unsetInvoiceNumber() {
5627
      this.invoiceNumber = null;
5628
    }
5629
 
5630
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
5631
    public boolean isSetInvoiceNumber() {
5632
      return this.invoiceNumber != null;
5633
    }
5634
 
5635
    public void setInvoiceNumberIsSet(boolean value) {
5636
      if (!value) {
5637
        this.invoiceNumber = null;
5638
      }
5639
    }
5640
 
5641
    public double getFreightCharges() {
5642
      return this.freightCharges;
5643
    }
5644
 
5645
    public void setFreightCharges(double freightCharges) {
5646
      this.freightCharges = freightCharges;
5647
      setFreightChargesIsSet(true);
5648
    }
5649
 
5650
    public void unsetFreightCharges() {
5651
      __isset_bit_vector.clear(__FREIGHTCHARGES_ISSET_ID);
5652
    }
5653
 
5654
    /** Returns true if field freightCharges is set (has been assigned a value) and false otherwise */
5655
    public boolean isSetFreightCharges() {
5656
      return __isset_bit_vector.get(__FREIGHTCHARGES_ISSET_ID);
5657
    }
5658
 
5659
    public void setFreightChargesIsSet(boolean value) {
5660
      __isset_bit_vector.set(__FREIGHTCHARGES_ISSET_ID, value);
5661
    }
5662
 
11801 manish.sha 5663
    public String getPurchaseComments() {
5664
      return this.purchaseComments;
5665
    }
5666
 
5667
    public void setPurchaseComments(String purchaseComments) {
5668
      this.purchaseComments = purchaseComments;
5669
    }
5670
 
5671
    public void unsetPurchaseComments() {
5672
      this.purchaseComments = null;
5673
    }
5674
 
5675
    /** Returns true if field purchaseComments is set (has been assigned a value) and false otherwise */
5676
    public boolean isSetPurchaseComments() {
5677
      return this.purchaseComments != null;
5678
    }
5679
 
5680
    public void setPurchaseCommentsIsSet(boolean value) {
5681
      if (!value) {
5682
        this.purchaseComments = null;
5683
      }
5684
    }
5685
 
4496 mandeep.dh 5686
    public void setFieldValue(_Fields field, Object value) {
5687
      switch (field) {
5688
      case PURCHASE_ORDER_ID:
5689
        if (value == null) {
5690
          unsetPurchaseOrderId();
5691
        } else {
5692
          setPurchaseOrderId((Long)value);
5693
        }
5694
        break;
5695
 
5696
      case INVOICE_NUMBER:
5697
        if (value == null) {
5698
          unsetInvoiceNumber();
5699
        } else {
5700
          setInvoiceNumber((String)value);
5701
        }
5702
        break;
5703
 
5704
      case FREIGHT_CHARGES:
5705
        if (value == null) {
5706
          unsetFreightCharges();
5707
        } else {
5708
          setFreightCharges((Double)value);
5709
        }
5710
        break;
5711
 
11801 manish.sha 5712
      case PURCHASE_COMMENTS:
5713
        if (value == null) {
5714
          unsetPurchaseComments();
5715
        } else {
5716
          setPurchaseComments((String)value);
5717
        }
5718
        break;
5719
 
4496 mandeep.dh 5720
      }
5721
    }
5722
 
5723
    public Object getFieldValue(_Fields field) {
5724
      switch (field) {
5725
      case PURCHASE_ORDER_ID:
5726
        return Long.valueOf(getPurchaseOrderId());
5727
 
5728
      case INVOICE_NUMBER:
5729
        return getInvoiceNumber();
5730
 
5731
      case FREIGHT_CHARGES:
5732
        return Double.valueOf(getFreightCharges());
5733
 
11801 manish.sha 5734
      case PURCHASE_COMMENTS:
5735
        return getPurchaseComments();
5736
 
4496 mandeep.dh 5737
      }
5738
      throw new IllegalStateException();
5739
    }
5740
 
5741
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5742
    public boolean isSet(_Fields field) {
5743
      if (field == null) {
5744
        throw new IllegalArgumentException();
5745
      }
5746
 
5747
      switch (field) {
5748
      case PURCHASE_ORDER_ID:
5749
        return isSetPurchaseOrderId();
5750
      case INVOICE_NUMBER:
5751
        return isSetInvoiceNumber();
5752
      case FREIGHT_CHARGES:
5753
        return isSetFreightCharges();
11801 manish.sha 5754
      case PURCHASE_COMMENTS:
5755
        return isSetPurchaseComments();
4496 mandeep.dh 5756
      }
5757
      throw new IllegalStateException();
5758
    }
5759
 
5760
    @Override
5761
    public boolean equals(Object that) {
5762
      if (that == null)
5763
        return false;
5764
      if (that instanceof startPurchase_args)
5765
        return this.equals((startPurchase_args)that);
5766
      return false;
5767
    }
5768
 
5769
    public boolean equals(startPurchase_args that) {
5770
      if (that == null)
5771
        return false;
5772
 
5773
      boolean this_present_purchaseOrderId = true;
5774
      boolean that_present_purchaseOrderId = true;
5775
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
5776
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
5777
          return false;
5778
        if (this.purchaseOrderId != that.purchaseOrderId)
5779
          return false;
5780
      }
5781
 
5782
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
5783
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
5784
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
5785
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
5786
          return false;
5787
        if (!this.invoiceNumber.equals(that.invoiceNumber))
5788
          return false;
5789
      }
5790
 
5791
      boolean this_present_freightCharges = true;
5792
      boolean that_present_freightCharges = true;
5793
      if (this_present_freightCharges || that_present_freightCharges) {
5794
        if (!(this_present_freightCharges && that_present_freightCharges))
5795
          return false;
5796
        if (this.freightCharges != that.freightCharges)
5797
          return false;
5798
      }
5799
 
11801 manish.sha 5800
      boolean this_present_purchaseComments = true && this.isSetPurchaseComments();
5801
      boolean that_present_purchaseComments = true && that.isSetPurchaseComments();
5802
      if (this_present_purchaseComments || that_present_purchaseComments) {
5803
        if (!(this_present_purchaseComments && that_present_purchaseComments))
5804
          return false;
5805
        if (!this.purchaseComments.equals(that.purchaseComments))
5806
          return false;
5807
      }
5808
 
4496 mandeep.dh 5809
      return true;
5810
    }
5811
 
5812
    @Override
5813
    public int hashCode() {
5814
      return 0;
5815
    }
5816
 
5817
    public int compareTo(startPurchase_args other) {
5818
      if (!getClass().equals(other.getClass())) {
5819
        return getClass().getName().compareTo(other.getClass().getName());
5820
      }
5821
 
5822
      int lastComparison = 0;
5823
      startPurchase_args typedOther = (startPurchase_args)other;
5824
 
5825
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
5826
      if (lastComparison != 0) {
5827
        return lastComparison;
5828
      }
5829
      if (isSetPurchaseOrderId()) {
5830
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
5831
        if (lastComparison != 0) {
5832
          return lastComparison;
5833
        }
5834
      }
5835
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
5836
      if (lastComparison != 0) {
5837
        return lastComparison;
5838
      }
5839
      if (isSetInvoiceNumber()) {
5840
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
5841
        if (lastComparison != 0) {
5842
          return lastComparison;
5843
        }
5844
      }
5845
      lastComparison = Boolean.valueOf(isSetFreightCharges()).compareTo(typedOther.isSetFreightCharges());
5846
      if (lastComparison != 0) {
5847
        return lastComparison;
5848
      }
5849
      if (isSetFreightCharges()) {
5850
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freightCharges, typedOther.freightCharges);
5851
        if (lastComparison != 0) {
5852
          return lastComparison;
5853
        }
5854
      }
11801 manish.sha 5855
      lastComparison = Boolean.valueOf(isSetPurchaseComments()).compareTo(typedOther.isSetPurchaseComments());
5856
      if (lastComparison != 0) {
5857
        return lastComparison;
5858
      }
5859
      if (isSetPurchaseComments()) {
5860
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseComments, typedOther.purchaseComments);
5861
        if (lastComparison != 0) {
5862
          return lastComparison;
5863
        }
5864
      }
4496 mandeep.dh 5865
      return 0;
5866
    }
5867
 
5868
    public _Fields fieldForId(int fieldId) {
5869
      return _Fields.findByThriftId(fieldId);
5870
    }
5871
 
5872
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5873
      org.apache.thrift.protocol.TField field;
5874
      iprot.readStructBegin();
5875
      while (true)
5876
      {
5877
        field = iprot.readFieldBegin();
5878
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5879
          break;
5880
        }
5881
        switch (field.id) {
5882
          case 1: // PURCHASE_ORDER_ID
5883
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5884
              this.purchaseOrderId = iprot.readI64();
5885
              setPurchaseOrderIdIsSet(true);
5886
            } else { 
5887
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5888
            }
5889
            break;
5890
          case 2: // INVOICE_NUMBER
5891
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
5892
              this.invoiceNumber = iprot.readString();
5893
            } else { 
5894
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5895
            }
5896
            break;
5897
          case 3: // FREIGHT_CHARGES
5898
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
5899
              this.freightCharges = iprot.readDouble();
5900
              setFreightChargesIsSet(true);
5901
            } else { 
5902
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5903
            }
5904
            break;
11801 manish.sha 5905
          case 4: // PURCHASE_COMMENTS
5906
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
5907
              this.purchaseComments = iprot.readString();
5908
            } else { 
5909
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5910
            }
5911
            break;
4496 mandeep.dh 5912
          default:
5913
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5914
        }
5915
        iprot.readFieldEnd();
5916
      }
5917
      iprot.readStructEnd();
5918
      validate();
5919
    }
5920
 
5921
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5922
      validate();
5923
 
5924
      oprot.writeStructBegin(STRUCT_DESC);
5925
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
5926
      oprot.writeI64(this.purchaseOrderId);
5927
      oprot.writeFieldEnd();
5928
      if (this.invoiceNumber != null) {
5929
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
5930
        oprot.writeString(this.invoiceNumber);
5931
        oprot.writeFieldEnd();
5932
      }
5933
      oprot.writeFieldBegin(FREIGHT_CHARGES_FIELD_DESC);
5934
      oprot.writeDouble(this.freightCharges);
5935
      oprot.writeFieldEnd();
11801 manish.sha 5936
      if (this.purchaseComments != null) {
5937
        oprot.writeFieldBegin(PURCHASE_COMMENTS_FIELD_DESC);
5938
        oprot.writeString(this.purchaseComments);
5939
        oprot.writeFieldEnd();
5940
      }
4496 mandeep.dh 5941
      oprot.writeFieldStop();
5942
      oprot.writeStructEnd();
5943
    }
5944
 
5945
    @Override
5946
    public String toString() {
5947
      StringBuilder sb = new StringBuilder("startPurchase_args(");
5948
      boolean first = true;
5949
 
5950
      sb.append("purchaseOrderId:");
5951
      sb.append(this.purchaseOrderId);
5952
      first = false;
5953
      if (!first) sb.append(", ");
5954
      sb.append("invoiceNumber:");
5955
      if (this.invoiceNumber == null) {
5956
        sb.append("null");
5957
      } else {
5958
        sb.append(this.invoiceNumber);
5959
      }
5960
      first = false;
5961
      if (!first) sb.append(", ");
5962
      sb.append("freightCharges:");
5963
      sb.append(this.freightCharges);
5964
      first = false;
11801 manish.sha 5965
      if (!first) sb.append(", ");
5966
      sb.append("purchaseComments:");
5967
      if (this.purchaseComments == null) {
5968
        sb.append("null");
5969
      } else {
5970
        sb.append(this.purchaseComments);
5971
      }
5972
      first = false;
4496 mandeep.dh 5973
      sb.append(")");
5974
      return sb.toString();
5975
    }
5976
 
5977
    public void validate() throws org.apache.thrift.TException {
5978
      // check for required fields
5979
    }
5980
 
5981
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5982
      try {
5983
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5984
      } catch (org.apache.thrift.TException te) {
5985
        throw new java.io.IOException(te);
5986
      }
5987
    }
5988
 
5989
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5990
      try {
5991
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5992
      } catch (org.apache.thrift.TException te) {
5993
        throw new java.io.IOException(te);
5994
      }
5995
    }
5996
 
5997
  }
5998
 
5999
  public static class startPurchase_result implements org.apache.thrift.TBase<startPurchase_result, startPurchase_result._Fields>, java.io.Serializable, Cloneable   {
6000
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_result");
6001
 
6002
    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);
6003
    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);
6004
 
6005
    private long success; // required
6006
    private PurchaseServiceException e; // required
6007
 
6008
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6009
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6010
      SUCCESS((short)0, "success"),
6011
      E((short)1, "e");
6012
 
6013
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6014
 
6015
      static {
6016
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6017
          byName.put(field.getFieldName(), field);
6018
        }
6019
      }
6020
 
6021
      /**
6022
       * Find the _Fields constant that matches fieldId, or null if its not found.
6023
       */
6024
      public static _Fields findByThriftId(int fieldId) {
6025
        switch(fieldId) {
6026
          case 0: // SUCCESS
6027
            return SUCCESS;
6028
          case 1: // E
6029
            return E;
6030
          default:
6031
            return null;
6032
        }
6033
      }
6034
 
6035
      /**
6036
       * Find the _Fields constant that matches fieldId, throwing an exception
6037
       * if it is not found.
6038
       */
6039
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6040
        _Fields fields = findByThriftId(fieldId);
6041
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6042
        return fields;
6043
      }
6044
 
6045
      /**
6046
       * Find the _Fields constant that matches name, or null if its not found.
6047
       */
6048
      public static _Fields findByName(String name) {
6049
        return byName.get(name);
6050
      }
6051
 
6052
      private final short _thriftId;
6053
      private final String _fieldName;
6054
 
6055
      _Fields(short thriftId, String fieldName) {
6056
        _thriftId = thriftId;
6057
        _fieldName = fieldName;
6058
      }
6059
 
6060
      public short getThriftFieldId() {
6061
        return _thriftId;
6062
      }
6063
 
6064
      public String getFieldName() {
6065
        return _fieldName;
6066
      }
6067
    }
6068
 
6069
    // isset id assignments
6070
    private static final int __SUCCESS_ISSET_ID = 0;
6071
    private BitSet __isset_bit_vector = new BitSet(1);
6072
 
6073
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6074
    static {
6075
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6076
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6077
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6078
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6079
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
6080
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6081
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_result.class, metaDataMap);
6082
    }
6083
 
6084
    public startPurchase_result() {
6085
    }
6086
 
6087
    public startPurchase_result(
6088
      long success,
6089
      PurchaseServiceException e)
6090
    {
6091
      this();
6092
      this.success = success;
6093
      setSuccessIsSet(true);
6094
      this.e = e;
6095
    }
6096
 
6097
    /**
6098
     * Performs a deep copy on <i>other</i>.
6099
     */
6100
    public startPurchase_result(startPurchase_result other) {
6101
      __isset_bit_vector.clear();
6102
      __isset_bit_vector.or(other.__isset_bit_vector);
6103
      this.success = other.success;
6104
      if (other.isSetE()) {
6105
        this.e = new PurchaseServiceException(other.e);
6106
      }
6107
    }
6108
 
6109
    public startPurchase_result deepCopy() {
6110
      return new startPurchase_result(this);
6111
    }
6112
 
6113
    @Override
6114
    public void clear() {
6115
      setSuccessIsSet(false);
6116
      this.success = 0;
6117
      this.e = null;
6118
    }
6119
 
6120
    public long getSuccess() {
6121
      return this.success;
6122
    }
6123
 
6124
    public void setSuccess(long success) {
6125
      this.success = success;
6126
      setSuccessIsSet(true);
6127
    }
6128
 
6129
    public void unsetSuccess() {
6130
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
6131
    }
6132
 
6133
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
6134
    public boolean isSetSuccess() {
6135
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
6136
    }
6137
 
6138
    public void setSuccessIsSet(boolean value) {
6139
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
6140
    }
6141
 
6142
    public PurchaseServiceException getE() {
6143
      return this.e;
6144
    }
6145
 
6146
    public void setE(PurchaseServiceException e) {
6147
      this.e = e;
6148
    }
6149
 
6150
    public void unsetE() {
6151
      this.e = null;
6152
    }
6153
 
6154
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
6155
    public boolean isSetE() {
6156
      return this.e != null;
6157
    }
6158
 
6159
    public void setEIsSet(boolean value) {
6160
      if (!value) {
6161
        this.e = null;
6162
      }
6163
    }
6164
 
6165
    public void setFieldValue(_Fields field, Object value) {
6166
      switch (field) {
6167
      case SUCCESS:
6168
        if (value == null) {
6169
          unsetSuccess();
6170
        } else {
6171
          setSuccess((Long)value);
6172
        }
6173
        break;
6174
 
6175
      case E:
6176
        if (value == null) {
6177
          unsetE();
6178
        } else {
6179
          setE((PurchaseServiceException)value);
6180
        }
6181
        break;
6182
 
6183
      }
6184
    }
6185
 
6186
    public Object getFieldValue(_Fields field) {
6187
      switch (field) {
6188
      case SUCCESS:
6189
        return Long.valueOf(getSuccess());
6190
 
6191
      case E:
6192
        return getE();
6193
 
6194
      }
6195
      throw new IllegalStateException();
6196
    }
6197
 
6198
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6199
    public boolean isSet(_Fields field) {
6200
      if (field == null) {
6201
        throw new IllegalArgumentException();
6202
      }
6203
 
6204
      switch (field) {
6205
      case SUCCESS:
6206
        return isSetSuccess();
6207
      case E:
6208
        return isSetE();
6209
      }
6210
      throw new IllegalStateException();
6211
    }
6212
 
6213
    @Override
6214
    public boolean equals(Object that) {
6215
      if (that == null)
6216
        return false;
6217
      if (that instanceof startPurchase_result)
6218
        return this.equals((startPurchase_result)that);
6219
      return false;
6220
    }
6221
 
6222
    public boolean equals(startPurchase_result that) {
6223
      if (that == null)
6224
        return false;
6225
 
6226
      boolean this_present_success = true;
6227
      boolean that_present_success = true;
6228
      if (this_present_success || that_present_success) {
6229
        if (!(this_present_success && that_present_success))
6230
          return false;
6231
        if (this.success != that.success)
6232
          return false;
6233
      }
6234
 
6235
      boolean this_present_e = true && this.isSetE();
6236
      boolean that_present_e = true && that.isSetE();
6237
      if (this_present_e || that_present_e) {
6238
        if (!(this_present_e && that_present_e))
6239
          return false;
6240
        if (!this.e.equals(that.e))
6241
          return false;
6242
      }
6243
 
6244
      return true;
6245
    }
6246
 
6247
    @Override
6248
    public int hashCode() {
6249
      return 0;
6250
    }
6251
 
6252
    public int compareTo(startPurchase_result other) {
6253
      if (!getClass().equals(other.getClass())) {
6254
        return getClass().getName().compareTo(other.getClass().getName());
6255
      }
6256
 
6257
      int lastComparison = 0;
6258
      startPurchase_result typedOther = (startPurchase_result)other;
6259
 
6260
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
6261
      if (lastComparison != 0) {
6262
        return lastComparison;
6263
      }
6264
      if (isSetSuccess()) {
6265
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6266
        if (lastComparison != 0) {
6267
          return lastComparison;
6268
        }
6269
      }
6270
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
6271
      if (lastComparison != 0) {
6272
        return lastComparison;
6273
      }
6274
      if (isSetE()) {
6275
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
6276
        if (lastComparison != 0) {
6277
          return lastComparison;
6278
        }
6279
      }
6280
      return 0;
6281
    }
6282
 
6283
    public _Fields fieldForId(int fieldId) {
6284
      return _Fields.findByThriftId(fieldId);
6285
    }
6286
 
6287
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6288
      org.apache.thrift.protocol.TField field;
6289
      iprot.readStructBegin();
6290
      while (true)
6291
      {
6292
        field = iprot.readFieldBegin();
6293
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6294
          break;
6295
        }
6296
        switch (field.id) {
6297
          case 0: // SUCCESS
6298
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6299
              this.success = iprot.readI64();
6300
              setSuccessIsSet(true);
6301
            } else { 
6302
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6303
            }
6304
            break;
6305
          case 1: // E
6306
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6307
              this.e = new PurchaseServiceException();
6308
              this.e.read(iprot);
6309
            } else { 
6310
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6311
            }
6312
            break;
6313
          default:
6314
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6315
        }
6316
        iprot.readFieldEnd();
6317
      }
6318
      iprot.readStructEnd();
6319
      validate();
6320
    }
6321
 
6322
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6323
      oprot.writeStructBegin(STRUCT_DESC);
6324
 
6325
      if (this.isSetSuccess()) {
6326
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6327
        oprot.writeI64(this.success);
6328
        oprot.writeFieldEnd();
6329
      } else if (this.isSetE()) {
6330
        oprot.writeFieldBegin(E_FIELD_DESC);
6331
        this.e.write(oprot);
6332
        oprot.writeFieldEnd();
6333
      }
6334
      oprot.writeFieldStop();
6335
      oprot.writeStructEnd();
6336
    }
6337
 
6338
    @Override
6339
    public String toString() {
6340
      StringBuilder sb = new StringBuilder("startPurchase_result(");
6341
      boolean first = true;
6342
 
6343
      sb.append("success:");
6344
      sb.append(this.success);
6345
      first = false;
6346
      if (!first) sb.append(", ");
6347
      sb.append("e:");
6348
      if (this.e == null) {
6349
        sb.append("null");
6350
      } else {
6351
        sb.append(this.e);
6352
      }
6353
      first = false;
6354
      sb.append(")");
6355
      return sb.toString();
6356
    }
6357
 
6358
    public void validate() throws org.apache.thrift.TException {
6359
      // check for required fields
6360
    }
6361
 
6362
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6363
      try {
6364
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6365
      } catch (org.apache.thrift.TException te) {
6366
        throw new java.io.IOException(te);
6367
      }
6368
    }
6369
 
6370
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6371
      try {
6372
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6373
      } catch (org.apache.thrift.TException te) {
6374
        throw new java.io.IOException(te);
6375
      }
6376
    }
6377
 
6378
  }
6379
 
6380
  public static class closePurchase_args implements org.apache.thrift.TBase<closePurchase_args, closePurchase_args._Fields>, java.io.Serializable, Cloneable   {
6381
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_args");
6382
 
6383
    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);
6384
 
6385
    private long purchaseId; // required
6386
 
6387
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6388
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6389
      PURCHASE_ID((short)1, "purchaseId");
6390
 
6391
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6392
 
6393
      static {
6394
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6395
          byName.put(field.getFieldName(), field);
6396
        }
6397
      }
6398
 
6399
      /**
6400
       * Find the _Fields constant that matches fieldId, or null if its not found.
6401
       */
6402
      public static _Fields findByThriftId(int fieldId) {
6403
        switch(fieldId) {
6404
          case 1: // PURCHASE_ID
6405
            return PURCHASE_ID;
6406
          default:
6407
            return null;
6408
        }
6409
      }
6410
 
6411
      /**
6412
       * Find the _Fields constant that matches fieldId, throwing an exception
6413
       * if it is not found.
6414
       */
6415
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6416
        _Fields fields = findByThriftId(fieldId);
6417
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6418
        return fields;
6419
      }
6420
 
6421
      /**
6422
       * Find the _Fields constant that matches name, or null if its not found.
6423
       */
6424
      public static _Fields findByName(String name) {
6425
        return byName.get(name);
6426
      }
6427
 
6428
      private final short _thriftId;
6429
      private final String _fieldName;
6430
 
6431
      _Fields(short thriftId, String fieldName) {
6432
        _thriftId = thriftId;
6433
        _fieldName = fieldName;
6434
      }
6435
 
6436
      public short getThriftFieldId() {
6437
        return _thriftId;
6438
      }
6439
 
6440
      public String getFieldName() {
6441
        return _fieldName;
6442
      }
6443
    }
6444
 
6445
    // isset id assignments
6446
    private static final int __PURCHASEID_ISSET_ID = 0;
6447
    private BitSet __isset_bit_vector = new BitSet(1);
6448
 
6449
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6450
    static {
6451
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6452
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6453
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6454
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6455
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_args.class, metaDataMap);
6456
    }
6457
 
6458
    public closePurchase_args() {
6459
    }
6460
 
6461
    public closePurchase_args(
6462
      long purchaseId)
6463
    {
6464
      this();
6465
      this.purchaseId = purchaseId;
6466
      setPurchaseIdIsSet(true);
6467
    }
6468
 
6469
    /**
6470
     * Performs a deep copy on <i>other</i>.
6471
     */
6472
    public closePurchase_args(closePurchase_args other) {
6473
      __isset_bit_vector.clear();
6474
      __isset_bit_vector.or(other.__isset_bit_vector);
6475
      this.purchaseId = other.purchaseId;
6476
    }
6477
 
6478
    public closePurchase_args deepCopy() {
6479
      return new closePurchase_args(this);
6480
    }
6481
 
6482
    @Override
6483
    public void clear() {
6484
      setPurchaseIdIsSet(false);
6485
      this.purchaseId = 0;
6486
    }
6487
 
6488
    public long getPurchaseId() {
6489
      return this.purchaseId;
6490
    }
6491
 
6492
    public void setPurchaseId(long purchaseId) {
6493
      this.purchaseId = purchaseId;
6494
      setPurchaseIdIsSet(true);
6495
    }
6496
 
6497
    public void unsetPurchaseId() {
6498
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
6499
    }
6500
 
6501
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
6502
    public boolean isSetPurchaseId() {
6503
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
6504
    }
6505
 
6506
    public void setPurchaseIdIsSet(boolean value) {
6507
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
6508
    }
6509
 
6510
    public void setFieldValue(_Fields field, Object value) {
6511
      switch (field) {
6512
      case PURCHASE_ID:
6513
        if (value == null) {
6514
          unsetPurchaseId();
6515
        } else {
6516
          setPurchaseId((Long)value);
6517
        }
6518
        break;
6519
 
6520
      }
6521
    }
6522
 
6523
    public Object getFieldValue(_Fields field) {
6524
      switch (field) {
6525
      case PURCHASE_ID:
6526
        return Long.valueOf(getPurchaseId());
6527
 
6528
      }
6529
      throw new IllegalStateException();
6530
    }
6531
 
6532
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6533
    public boolean isSet(_Fields field) {
6534
      if (field == null) {
6535
        throw new IllegalArgumentException();
6536
      }
6537
 
6538
      switch (field) {
6539
      case PURCHASE_ID:
6540
        return isSetPurchaseId();
6541
      }
6542
      throw new IllegalStateException();
6543
    }
6544
 
6545
    @Override
6546
    public boolean equals(Object that) {
6547
      if (that == null)
6548
        return false;
6549
      if (that instanceof closePurchase_args)
6550
        return this.equals((closePurchase_args)that);
6551
      return false;
6552
    }
6553
 
6554
    public boolean equals(closePurchase_args that) {
6555
      if (that == null)
6556
        return false;
6557
 
6558
      boolean this_present_purchaseId = true;
6559
      boolean that_present_purchaseId = true;
6560
      if (this_present_purchaseId || that_present_purchaseId) {
6561
        if (!(this_present_purchaseId && that_present_purchaseId))
6562
          return false;
6563
        if (this.purchaseId != that.purchaseId)
6564
          return false;
6565
      }
6566
 
6567
      return true;
6568
    }
6569
 
6570
    @Override
6571
    public int hashCode() {
6572
      return 0;
6573
    }
6574
 
6575
    public int compareTo(closePurchase_args other) {
6576
      if (!getClass().equals(other.getClass())) {
6577
        return getClass().getName().compareTo(other.getClass().getName());
6578
      }
6579
 
6580
      int lastComparison = 0;
6581
      closePurchase_args typedOther = (closePurchase_args)other;
6582
 
6583
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
6584
      if (lastComparison != 0) {
6585
        return lastComparison;
6586
      }
6587
      if (isSetPurchaseId()) {
6588
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
6589
        if (lastComparison != 0) {
6590
          return lastComparison;
6591
        }
6592
      }
6593
      return 0;
6594
    }
6595
 
6596
    public _Fields fieldForId(int fieldId) {
6597
      return _Fields.findByThriftId(fieldId);
6598
    }
6599
 
6600
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6601
      org.apache.thrift.protocol.TField field;
6602
      iprot.readStructBegin();
6603
      while (true)
6604
      {
6605
        field = iprot.readFieldBegin();
6606
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6607
          break;
6608
        }
6609
        switch (field.id) {
6610
          case 1: // PURCHASE_ID
6611
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6612
              this.purchaseId = iprot.readI64();
6613
              setPurchaseIdIsSet(true);
6614
            } else { 
6615
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6616
            }
6617
            break;
6618
          default:
6619
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6620
        }
6621
        iprot.readFieldEnd();
6622
      }
6623
      iprot.readStructEnd();
6624
      validate();
6625
    }
6626
 
6627
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6628
      validate();
6629
 
6630
      oprot.writeStructBegin(STRUCT_DESC);
6631
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
6632
      oprot.writeI64(this.purchaseId);
6633
      oprot.writeFieldEnd();
6634
      oprot.writeFieldStop();
6635
      oprot.writeStructEnd();
6636
    }
6637
 
6638
    @Override
6639
    public String toString() {
6640
      StringBuilder sb = new StringBuilder("closePurchase_args(");
6641
      boolean first = true;
6642
 
6643
      sb.append("purchaseId:");
6644
      sb.append(this.purchaseId);
6645
      first = false;
6646
      sb.append(")");
6647
      return sb.toString();
6648
    }
6649
 
6650
    public void validate() throws org.apache.thrift.TException {
6651
      // check for required fields
6652
    }
6653
 
6654
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6655
      try {
6656
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6657
      } catch (org.apache.thrift.TException te) {
6658
        throw new java.io.IOException(te);
6659
      }
6660
    }
6661
 
6662
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6663
      try {
6664
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6665
      } catch (org.apache.thrift.TException te) {
6666
        throw new java.io.IOException(te);
6667
      }
6668
    }
6669
 
6670
  }
6671
 
6672
  public static class closePurchase_result implements org.apache.thrift.TBase<closePurchase_result, closePurchase_result._Fields>, java.io.Serializable, Cloneable   {
6673
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_result");
6674
 
6675
    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);
6676
    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);
6677
 
6678
    private long success; // required
6679
    private PurchaseServiceException e; // required
6680
 
6681
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6682
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6683
      SUCCESS((short)0, "success"),
6684
      E((short)1, "e");
6685
 
6686
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6687
 
6688
      static {
6689
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6690
          byName.put(field.getFieldName(), field);
6691
        }
6692
      }
6693
 
6694
      /**
6695
       * Find the _Fields constant that matches fieldId, or null if its not found.
6696
       */
6697
      public static _Fields findByThriftId(int fieldId) {
6698
        switch(fieldId) {
6699
          case 0: // SUCCESS
6700
            return SUCCESS;
6701
          case 1: // E
6702
            return E;
6703
          default:
6704
            return null;
6705
        }
6706
      }
6707
 
6708
      /**
6709
       * Find the _Fields constant that matches fieldId, throwing an exception
6710
       * if it is not found.
6711
       */
6712
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6713
        _Fields fields = findByThriftId(fieldId);
6714
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6715
        return fields;
6716
      }
6717
 
6718
      /**
6719
       * Find the _Fields constant that matches name, or null if its not found.
6720
       */
6721
      public static _Fields findByName(String name) {
6722
        return byName.get(name);
6723
      }
6724
 
6725
      private final short _thriftId;
6726
      private final String _fieldName;
6727
 
6728
      _Fields(short thriftId, String fieldName) {
6729
        _thriftId = thriftId;
6730
        _fieldName = fieldName;
6731
      }
6732
 
6733
      public short getThriftFieldId() {
6734
        return _thriftId;
6735
      }
6736
 
6737
      public String getFieldName() {
6738
        return _fieldName;
6739
      }
6740
    }
6741
 
6742
    // isset id assignments
6743
    private static final int __SUCCESS_ISSET_ID = 0;
6744
    private BitSet __isset_bit_vector = new BitSet(1);
6745
 
6746
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6747
    static {
6748
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6749
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6750
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6751
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6752
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
6753
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6754
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_result.class, metaDataMap);
6755
    }
6756
 
6757
    public closePurchase_result() {
6758
    }
6759
 
6760
    public closePurchase_result(
6761
      long success,
6762
      PurchaseServiceException e)
6763
    {
6764
      this();
6765
      this.success = success;
6766
      setSuccessIsSet(true);
6767
      this.e = e;
6768
    }
6769
 
6770
    /**
6771
     * Performs a deep copy on <i>other</i>.
6772
     */
6773
    public closePurchase_result(closePurchase_result other) {
6774
      __isset_bit_vector.clear();
6775
      __isset_bit_vector.or(other.__isset_bit_vector);
6776
      this.success = other.success;
6777
      if (other.isSetE()) {
6778
        this.e = new PurchaseServiceException(other.e);
6779
      }
6780
    }
6781
 
6782
    public closePurchase_result deepCopy() {
6783
      return new closePurchase_result(this);
6784
    }
6785
 
6786
    @Override
6787
    public void clear() {
6788
      setSuccessIsSet(false);
6789
      this.success = 0;
6790
      this.e = null;
6791
    }
6792
 
6793
    public long getSuccess() {
6794
      return this.success;
6795
    }
6796
 
6797
    public void setSuccess(long success) {
6798
      this.success = success;
6799
      setSuccessIsSet(true);
6800
    }
6801
 
6802
    public void unsetSuccess() {
6803
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
6804
    }
6805
 
6806
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
6807
    public boolean isSetSuccess() {
6808
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
6809
    }
6810
 
6811
    public void setSuccessIsSet(boolean value) {
6812
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
6813
    }
6814
 
6815
    public PurchaseServiceException getE() {
6816
      return this.e;
6817
    }
6818
 
6819
    public void setE(PurchaseServiceException e) {
6820
      this.e = e;
6821
    }
6822
 
6823
    public void unsetE() {
6824
      this.e = null;
6825
    }
6826
 
6827
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
6828
    public boolean isSetE() {
6829
      return this.e != null;
6830
    }
6831
 
6832
    public void setEIsSet(boolean value) {
6833
      if (!value) {
6834
        this.e = null;
6835
      }
6836
    }
6837
 
6838
    public void setFieldValue(_Fields field, Object value) {
6839
      switch (field) {
6840
      case SUCCESS:
6841
        if (value == null) {
6842
          unsetSuccess();
6843
        } else {
6844
          setSuccess((Long)value);
6845
        }
6846
        break;
6847
 
6848
      case E:
6849
        if (value == null) {
6850
          unsetE();
6851
        } else {
6852
          setE((PurchaseServiceException)value);
6853
        }
6854
        break;
6855
 
6856
      }
6857
    }
6858
 
6859
    public Object getFieldValue(_Fields field) {
6860
      switch (field) {
6861
      case SUCCESS:
6862
        return Long.valueOf(getSuccess());
6863
 
6864
      case E:
6865
        return getE();
6866
 
6867
      }
6868
      throw new IllegalStateException();
6869
    }
6870
 
6871
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6872
    public boolean isSet(_Fields field) {
6873
      if (field == null) {
6874
        throw new IllegalArgumentException();
6875
      }
6876
 
6877
      switch (field) {
6878
      case SUCCESS:
6879
        return isSetSuccess();
6880
      case E:
6881
        return isSetE();
6882
      }
6883
      throw new IllegalStateException();
6884
    }
6885
 
6886
    @Override
6887
    public boolean equals(Object that) {
6888
      if (that == null)
6889
        return false;
6890
      if (that instanceof closePurchase_result)
6891
        return this.equals((closePurchase_result)that);
6892
      return false;
6893
    }
6894
 
6895
    public boolean equals(closePurchase_result that) {
6896
      if (that == null)
6897
        return false;
6898
 
6899
      boolean this_present_success = true;
6900
      boolean that_present_success = true;
6901
      if (this_present_success || that_present_success) {
6902
        if (!(this_present_success && that_present_success))
6903
          return false;
6904
        if (this.success != that.success)
6905
          return false;
6906
      }
6907
 
6908
      boolean this_present_e = true && this.isSetE();
6909
      boolean that_present_e = true && that.isSetE();
6910
      if (this_present_e || that_present_e) {
6911
        if (!(this_present_e && that_present_e))
6912
          return false;
6913
        if (!this.e.equals(that.e))
6914
          return false;
6915
      }
6916
 
6917
      return true;
6918
    }
6919
 
6920
    @Override
6921
    public int hashCode() {
6922
      return 0;
6923
    }
6924
 
6925
    public int compareTo(closePurchase_result other) {
6926
      if (!getClass().equals(other.getClass())) {
6927
        return getClass().getName().compareTo(other.getClass().getName());
6928
      }
6929
 
6930
      int lastComparison = 0;
6931
      closePurchase_result typedOther = (closePurchase_result)other;
6932
 
6933
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
6934
      if (lastComparison != 0) {
6935
        return lastComparison;
6936
      }
6937
      if (isSetSuccess()) {
6938
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6939
        if (lastComparison != 0) {
6940
          return lastComparison;
6941
        }
6942
      }
6943
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
6944
      if (lastComparison != 0) {
6945
        return lastComparison;
6946
      }
6947
      if (isSetE()) {
6948
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
6949
        if (lastComparison != 0) {
6950
          return lastComparison;
6951
        }
6952
      }
6953
      return 0;
6954
    }
6955
 
6956
    public _Fields fieldForId(int fieldId) {
6957
      return _Fields.findByThriftId(fieldId);
6958
    }
6959
 
6960
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6961
      org.apache.thrift.protocol.TField field;
6962
      iprot.readStructBegin();
6963
      while (true)
6964
      {
6965
        field = iprot.readFieldBegin();
6966
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6967
          break;
6968
        }
6969
        switch (field.id) {
6970
          case 0: // SUCCESS
6971
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6972
              this.success = iprot.readI64();
6973
              setSuccessIsSet(true);
6974
            } else { 
6975
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6976
            }
6977
            break;
6978
          case 1: // E
6979
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6980
              this.e = new PurchaseServiceException();
6981
              this.e.read(iprot);
6982
            } else { 
6983
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6984
            }
6985
            break;
6986
          default:
6987
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6988
        }
6989
        iprot.readFieldEnd();
6990
      }
6991
      iprot.readStructEnd();
6992
      validate();
6993
    }
6994
 
6995
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6996
      oprot.writeStructBegin(STRUCT_DESC);
6997
 
6998
      if (this.isSetSuccess()) {
6999
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7000
        oprot.writeI64(this.success);
7001
        oprot.writeFieldEnd();
7002
      } else if (this.isSetE()) {
7003
        oprot.writeFieldBegin(E_FIELD_DESC);
7004
        this.e.write(oprot);
7005
        oprot.writeFieldEnd();
7006
      }
7007
      oprot.writeFieldStop();
7008
      oprot.writeStructEnd();
7009
    }
7010
 
7011
    @Override
7012
    public String toString() {
7013
      StringBuilder sb = new StringBuilder("closePurchase_result(");
7014
      boolean first = true;
7015
 
7016
      sb.append("success:");
7017
      sb.append(this.success);
7018
      first = false;
7019
      if (!first) sb.append(", ");
7020
      sb.append("e:");
7021
      if (this.e == null) {
7022
        sb.append("null");
7023
      } else {
7024
        sb.append(this.e);
7025
      }
7026
      first = false;
7027
      sb.append(")");
7028
      return sb.toString();
7029
    }
7030
 
7031
    public void validate() throws org.apache.thrift.TException {
7032
      // check for required fields
7033
    }
7034
 
7035
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7036
      try {
7037
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7038
      } catch (org.apache.thrift.TException te) {
7039
        throw new java.io.IOException(te);
7040
      }
7041
    }
7042
 
7043
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7044
      try {
7045
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7046
      } catch (org.apache.thrift.TException te) {
7047
        throw new java.io.IOException(te);
7048
      }
7049
    }
7050
 
7051
  }
7052
 
7053
  public static class getAllPurchases_args implements org.apache.thrift.TBase<getAllPurchases_args, getAllPurchases_args._Fields>, java.io.Serializable, Cloneable   {
7054
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_args");
7055
 
7056
    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);
7057
    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);
7058
 
7059
    private long purchaseOrderId; // required
7060
    private boolean open; // required
7061
 
7062
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7063
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7064
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
7065
      OPEN((short)2, "open");
7066
 
7067
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7068
 
7069
      static {
7070
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7071
          byName.put(field.getFieldName(), field);
7072
        }
7073
      }
7074
 
7075
      /**
7076
       * Find the _Fields constant that matches fieldId, or null if its not found.
7077
       */
7078
      public static _Fields findByThriftId(int fieldId) {
7079
        switch(fieldId) {
7080
          case 1: // PURCHASE_ORDER_ID
7081
            return PURCHASE_ORDER_ID;
7082
          case 2: // OPEN
7083
            return OPEN;
7084
          default:
7085
            return null;
7086
        }
7087
      }
7088
 
7089
      /**
7090
       * Find the _Fields constant that matches fieldId, throwing an exception
7091
       * if it is not found.
7092
       */
7093
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7094
        _Fields fields = findByThriftId(fieldId);
7095
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7096
        return fields;
7097
      }
7098
 
7099
      /**
7100
       * Find the _Fields constant that matches name, or null if its not found.
7101
       */
7102
      public static _Fields findByName(String name) {
7103
        return byName.get(name);
7104
      }
7105
 
7106
      private final short _thriftId;
7107
      private final String _fieldName;
7108
 
7109
      _Fields(short thriftId, String fieldName) {
7110
        _thriftId = thriftId;
7111
        _fieldName = fieldName;
7112
      }
7113
 
7114
      public short getThriftFieldId() {
7115
        return _thriftId;
7116
      }
7117
 
7118
      public String getFieldName() {
7119
        return _fieldName;
7120
      }
7121
    }
7122
 
7123
    // isset id assignments
7124
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
7125
    private static final int __OPEN_ISSET_ID = 1;
7126
    private BitSet __isset_bit_vector = new BitSet(2);
7127
 
7128
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7129
    static {
7130
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7131
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7132
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7133
      tmpMap.put(_Fields.OPEN, new org.apache.thrift.meta_data.FieldMetaData("open", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7134
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
7135
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7136
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_args.class, metaDataMap);
7137
    }
7138
 
7139
    public getAllPurchases_args() {
7140
    }
7141
 
7142
    public getAllPurchases_args(
7143
      long purchaseOrderId,
7144
      boolean open)
7145
    {
7146
      this();
7147
      this.purchaseOrderId = purchaseOrderId;
7148
      setPurchaseOrderIdIsSet(true);
7149
      this.open = open;
7150
      setOpenIsSet(true);
7151
    }
7152
 
7153
    /**
7154
     * Performs a deep copy on <i>other</i>.
7155
     */
7156
    public getAllPurchases_args(getAllPurchases_args other) {
7157
      __isset_bit_vector.clear();
7158
      __isset_bit_vector.or(other.__isset_bit_vector);
7159
      this.purchaseOrderId = other.purchaseOrderId;
7160
      this.open = other.open;
7161
    }
7162
 
7163
    public getAllPurchases_args deepCopy() {
7164
      return new getAllPurchases_args(this);
7165
    }
7166
 
7167
    @Override
7168
    public void clear() {
7169
      setPurchaseOrderIdIsSet(false);
7170
      this.purchaseOrderId = 0;
7171
      setOpenIsSet(false);
7172
      this.open = false;
7173
    }
7174
 
7175
    public long getPurchaseOrderId() {
7176
      return this.purchaseOrderId;
7177
    }
7178
 
7179
    public void setPurchaseOrderId(long purchaseOrderId) {
7180
      this.purchaseOrderId = purchaseOrderId;
7181
      setPurchaseOrderIdIsSet(true);
7182
    }
7183
 
7184
    public void unsetPurchaseOrderId() {
7185
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
7186
    }
7187
 
7188
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
7189
    public boolean isSetPurchaseOrderId() {
7190
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
7191
    }
7192
 
7193
    public void setPurchaseOrderIdIsSet(boolean value) {
7194
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
7195
    }
7196
 
7197
    public boolean isOpen() {
7198
      return this.open;
7199
    }
7200
 
7201
    public void setOpen(boolean open) {
7202
      this.open = open;
7203
      setOpenIsSet(true);
7204
    }
7205
 
7206
    public void unsetOpen() {
7207
      __isset_bit_vector.clear(__OPEN_ISSET_ID);
7208
    }
7209
 
7210
    /** Returns true if field open is set (has been assigned a value) and false otherwise */
7211
    public boolean isSetOpen() {
7212
      return __isset_bit_vector.get(__OPEN_ISSET_ID);
7213
    }
7214
 
7215
    public void setOpenIsSet(boolean value) {
7216
      __isset_bit_vector.set(__OPEN_ISSET_ID, value);
7217
    }
7218
 
7219
    public void setFieldValue(_Fields field, Object value) {
7220
      switch (field) {
7221
      case PURCHASE_ORDER_ID:
7222
        if (value == null) {
7223
          unsetPurchaseOrderId();
7224
        } else {
7225
          setPurchaseOrderId((Long)value);
7226
        }
7227
        break;
7228
 
7229
      case OPEN:
7230
        if (value == null) {
7231
          unsetOpen();
7232
        } else {
7233
          setOpen((Boolean)value);
7234
        }
7235
        break;
7236
 
7237
      }
7238
    }
7239
 
7240
    public Object getFieldValue(_Fields field) {
7241
      switch (field) {
7242
      case PURCHASE_ORDER_ID:
7243
        return Long.valueOf(getPurchaseOrderId());
7244
 
7245
      case OPEN:
7246
        return Boolean.valueOf(isOpen());
7247
 
7248
      }
7249
      throw new IllegalStateException();
7250
    }
7251
 
7252
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7253
    public boolean isSet(_Fields field) {
7254
      if (field == null) {
7255
        throw new IllegalArgumentException();
7256
      }
7257
 
7258
      switch (field) {
7259
      case PURCHASE_ORDER_ID:
7260
        return isSetPurchaseOrderId();
7261
      case OPEN:
7262
        return isSetOpen();
7263
      }
7264
      throw new IllegalStateException();
7265
    }
7266
 
7267
    @Override
7268
    public boolean equals(Object that) {
7269
      if (that == null)
7270
        return false;
7271
      if (that instanceof getAllPurchases_args)
7272
        return this.equals((getAllPurchases_args)that);
7273
      return false;
7274
    }
7275
 
7276
    public boolean equals(getAllPurchases_args that) {
7277
      if (that == null)
7278
        return false;
7279
 
7280
      boolean this_present_purchaseOrderId = true;
7281
      boolean that_present_purchaseOrderId = true;
7282
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
7283
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
7284
          return false;
7285
        if (this.purchaseOrderId != that.purchaseOrderId)
7286
          return false;
7287
      }
7288
 
7289
      boolean this_present_open = true;
7290
      boolean that_present_open = true;
7291
      if (this_present_open || that_present_open) {
7292
        if (!(this_present_open && that_present_open))
7293
          return false;
7294
        if (this.open != that.open)
7295
          return false;
7296
      }
7297
 
7298
      return true;
7299
    }
7300
 
7301
    @Override
7302
    public int hashCode() {
7303
      return 0;
7304
    }
7305
 
7306
    public int compareTo(getAllPurchases_args other) {
7307
      if (!getClass().equals(other.getClass())) {
7308
        return getClass().getName().compareTo(other.getClass().getName());
7309
      }
7310
 
7311
      int lastComparison = 0;
7312
      getAllPurchases_args typedOther = (getAllPurchases_args)other;
7313
 
7314
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
7315
      if (lastComparison != 0) {
7316
        return lastComparison;
7317
      }
7318
      if (isSetPurchaseOrderId()) {
7319
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
7320
        if (lastComparison != 0) {
7321
          return lastComparison;
7322
        }
7323
      }
7324
      lastComparison = Boolean.valueOf(isSetOpen()).compareTo(typedOther.isSetOpen());
7325
      if (lastComparison != 0) {
7326
        return lastComparison;
7327
      }
7328
      if (isSetOpen()) {
7329
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.open, typedOther.open);
7330
        if (lastComparison != 0) {
7331
          return lastComparison;
7332
        }
7333
      }
7334
      return 0;
7335
    }
7336
 
7337
    public _Fields fieldForId(int fieldId) {
7338
      return _Fields.findByThriftId(fieldId);
7339
    }
7340
 
7341
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7342
      org.apache.thrift.protocol.TField field;
7343
      iprot.readStructBegin();
7344
      while (true)
7345
      {
7346
        field = iprot.readFieldBegin();
7347
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7348
          break;
7349
        }
7350
        switch (field.id) {
7351
          case 1: // PURCHASE_ORDER_ID
7352
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7353
              this.purchaseOrderId = iprot.readI64();
7354
              setPurchaseOrderIdIsSet(true);
7355
            } else { 
7356
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7357
            }
7358
            break;
7359
          case 2: // OPEN
7360
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
7361
              this.open = iprot.readBool();
7362
              setOpenIsSet(true);
7363
            } else { 
7364
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7365
            }
7366
            break;
7367
          default:
7368
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7369
        }
7370
        iprot.readFieldEnd();
7371
      }
7372
      iprot.readStructEnd();
7373
      validate();
7374
    }
7375
 
7376
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7377
      validate();
7378
 
7379
      oprot.writeStructBegin(STRUCT_DESC);
7380
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
7381
      oprot.writeI64(this.purchaseOrderId);
7382
      oprot.writeFieldEnd();
7383
      oprot.writeFieldBegin(OPEN_FIELD_DESC);
7384
      oprot.writeBool(this.open);
7385
      oprot.writeFieldEnd();
7386
      oprot.writeFieldStop();
7387
      oprot.writeStructEnd();
7388
    }
7389
 
7390
    @Override
7391
    public String toString() {
7392
      StringBuilder sb = new StringBuilder("getAllPurchases_args(");
7393
      boolean first = true;
7394
 
7395
      sb.append("purchaseOrderId:");
7396
      sb.append(this.purchaseOrderId);
7397
      first = false;
7398
      if (!first) sb.append(", ");
7399
      sb.append("open:");
7400
      sb.append(this.open);
7401
      first = false;
7402
      sb.append(")");
7403
      return sb.toString();
7404
    }
7405
 
7406
    public void validate() throws org.apache.thrift.TException {
7407
      // check for required fields
7408
    }
7409
 
7410
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7411
      try {
7412
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7413
      } catch (org.apache.thrift.TException te) {
7414
        throw new java.io.IOException(te);
7415
      }
7416
    }
7417
 
7418
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7419
      try {
7420
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7421
      } catch (org.apache.thrift.TException te) {
7422
        throw new java.io.IOException(te);
7423
      }
7424
    }
7425
 
7426
  }
7427
 
7428
  public static class getAllPurchases_result implements org.apache.thrift.TBase<getAllPurchases_result, getAllPurchases_result._Fields>, java.io.Serializable, Cloneable   {
7429
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_result");
7430
 
7431
    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);
7432
    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);
7433
 
7434
    private List<Purchase> success; // required
7435
    private PurchaseServiceException e; // required
7436
 
7437
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7438
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7439
      SUCCESS((short)0, "success"),
7440
      E((short)1, "e");
7441
 
7442
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7443
 
7444
      static {
7445
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7446
          byName.put(field.getFieldName(), field);
7447
        }
7448
      }
7449
 
7450
      /**
7451
       * Find the _Fields constant that matches fieldId, or null if its not found.
7452
       */
7453
      public static _Fields findByThriftId(int fieldId) {
7454
        switch(fieldId) {
7455
          case 0: // SUCCESS
7456
            return SUCCESS;
7457
          case 1: // E
7458
            return E;
7459
          default:
7460
            return null;
7461
        }
7462
      }
7463
 
7464
      /**
7465
       * Find the _Fields constant that matches fieldId, throwing an exception
7466
       * if it is not found.
7467
       */
7468
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7469
        _Fields fields = findByThriftId(fieldId);
7470
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7471
        return fields;
7472
      }
7473
 
7474
      /**
7475
       * Find the _Fields constant that matches name, or null if its not found.
7476
       */
7477
      public static _Fields findByName(String name) {
7478
        return byName.get(name);
7479
      }
7480
 
7481
      private final short _thriftId;
7482
      private final String _fieldName;
7483
 
7484
      _Fields(short thriftId, String fieldName) {
7485
        _thriftId = thriftId;
7486
        _fieldName = fieldName;
7487
      }
7488
 
7489
      public short getThriftFieldId() {
7490
        return _thriftId;
7491
      }
7492
 
7493
      public String getFieldName() {
7494
        return _fieldName;
7495
      }
7496
    }
7497
 
7498
    // isset id assignments
7499
 
7500
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7501
    static {
7502
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7503
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7504
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7505
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Purchase.class))));
7506
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7507
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7508
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7509
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_result.class, metaDataMap);
7510
    }
7511
 
7512
    public getAllPurchases_result() {
7513
    }
7514
 
7515
    public getAllPurchases_result(
7516
      List<Purchase> success,
7517
      PurchaseServiceException e)
7518
    {
7519
      this();
7520
      this.success = success;
7521
      this.e = e;
7522
    }
7523
 
7524
    /**
7525
     * Performs a deep copy on <i>other</i>.
7526
     */
7527
    public getAllPurchases_result(getAllPurchases_result other) {
7528
      if (other.isSetSuccess()) {
7529
        List<Purchase> __this__success = new ArrayList<Purchase>();
7530
        for (Purchase other_element : other.success) {
7531
          __this__success.add(new Purchase(other_element));
7532
        }
7533
        this.success = __this__success;
7534
      }
7535
      if (other.isSetE()) {
7536
        this.e = new PurchaseServiceException(other.e);
7537
      }
7538
    }
7539
 
7540
    public getAllPurchases_result deepCopy() {
7541
      return new getAllPurchases_result(this);
7542
    }
7543
 
7544
    @Override
7545
    public void clear() {
7546
      this.success = null;
7547
      this.e = null;
7548
    }
7549
 
7550
    public int getSuccessSize() {
7551
      return (this.success == null) ? 0 : this.success.size();
7552
    }
7553
 
7554
    public java.util.Iterator<Purchase> getSuccessIterator() {
7555
      return (this.success == null) ? null : this.success.iterator();
7556
    }
7557
 
7558
    public void addToSuccess(Purchase elem) {
7559
      if (this.success == null) {
7560
        this.success = new ArrayList<Purchase>();
7561
      }
7562
      this.success.add(elem);
7563
    }
7564
 
7565
    public List<Purchase> getSuccess() {
7566
      return this.success;
7567
    }
7568
 
7569
    public void setSuccess(List<Purchase> success) {
7570
      this.success = success;
7571
    }
7572
 
7573
    public void unsetSuccess() {
7574
      this.success = null;
7575
    }
7576
 
7577
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7578
    public boolean isSetSuccess() {
7579
      return this.success != null;
7580
    }
7581
 
7582
    public void setSuccessIsSet(boolean value) {
7583
      if (!value) {
7584
        this.success = null;
7585
      }
7586
    }
7587
 
7588
    public PurchaseServiceException getE() {
7589
      return this.e;
7590
    }
7591
 
7592
    public void setE(PurchaseServiceException e) {
7593
      this.e = e;
7594
    }
7595
 
7596
    public void unsetE() {
7597
      this.e = null;
7598
    }
7599
 
7600
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
7601
    public boolean isSetE() {
7602
      return this.e != null;
7603
    }
7604
 
7605
    public void setEIsSet(boolean value) {
7606
      if (!value) {
7607
        this.e = null;
7608
      }
7609
    }
7610
 
7611
    public void setFieldValue(_Fields field, Object value) {
7612
      switch (field) {
7613
      case SUCCESS:
7614
        if (value == null) {
7615
          unsetSuccess();
7616
        } else {
7617
          setSuccess((List<Purchase>)value);
7618
        }
7619
        break;
7620
 
7621
      case E:
7622
        if (value == null) {
7623
          unsetE();
7624
        } else {
7625
          setE((PurchaseServiceException)value);
7626
        }
7627
        break;
7628
 
7629
      }
7630
    }
7631
 
7632
    public Object getFieldValue(_Fields field) {
7633
      switch (field) {
7634
      case SUCCESS:
7635
        return getSuccess();
7636
 
7637
      case E:
7638
        return getE();
7639
 
7640
      }
7641
      throw new IllegalStateException();
7642
    }
7643
 
7644
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7645
    public boolean isSet(_Fields field) {
7646
      if (field == null) {
7647
        throw new IllegalArgumentException();
7648
      }
7649
 
7650
      switch (field) {
7651
      case SUCCESS:
7652
        return isSetSuccess();
7653
      case E:
7654
        return isSetE();
7655
      }
7656
      throw new IllegalStateException();
7657
    }
7658
 
7659
    @Override
7660
    public boolean equals(Object that) {
7661
      if (that == null)
7662
        return false;
7663
      if (that instanceof getAllPurchases_result)
7664
        return this.equals((getAllPurchases_result)that);
7665
      return false;
7666
    }
7667
 
7668
    public boolean equals(getAllPurchases_result that) {
7669
      if (that == null)
7670
        return false;
7671
 
7672
      boolean this_present_success = true && this.isSetSuccess();
7673
      boolean that_present_success = true && that.isSetSuccess();
7674
      if (this_present_success || that_present_success) {
7675
        if (!(this_present_success && that_present_success))
7676
          return false;
7677
        if (!this.success.equals(that.success))
7678
          return false;
7679
      }
7680
 
7681
      boolean this_present_e = true && this.isSetE();
7682
      boolean that_present_e = true && that.isSetE();
7683
      if (this_present_e || that_present_e) {
7684
        if (!(this_present_e && that_present_e))
7685
          return false;
7686
        if (!this.e.equals(that.e))
7687
          return false;
7688
      }
7689
 
7690
      return true;
7691
    }
7692
 
7693
    @Override
7694
    public int hashCode() {
7695
      return 0;
7696
    }
7697
 
7698
    public int compareTo(getAllPurchases_result other) {
7699
      if (!getClass().equals(other.getClass())) {
7700
        return getClass().getName().compareTo(other.getClass().getName());
7701
      }
7702
 
7703
      int lastComparison = 0;
7704
      getAllPurchases_result typedOther = (getAllPurchases_result)other;
7705
 
7706
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7707
      if (lastComparison != 0) {
7708
        return lastComparison;
7709
      }
7710
      if (isSetSuccess()) {
7711
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7712
        if (lastComparison != 0) {
7713
          return lastComparison;
7714
        }
7715
      }
7716
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
7717
      if (lastComparison != 0) {
7718
        return lastComparison;
7719
      }
7720
      if (isSetE()) {
7721
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
7722
        if (lastComparison != 0) {
7723
          return lastComparison;
7724
        }
7725
      }
7726
      return 0;
7727
    }
7728
 
7729
    public _Fields fieldForId(int fieldId) {
7730
      return _Fields.findByThriftId(fieldId);
7731
    }
7732
 
7733
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7734
      org.apache.thrift.protocol.TField field;
7735
      iprot.readStructBegin();
7736
      while (true)
7737
      {
7738
        field = iprot.readFieldBegin();
7739
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7740
          break;
7741
        }
7742
        switch (field.id) {
7743
          case 0: // SUCCESS
7744
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
7745
              {
7746
                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
7747
                this.success = new ArrayList<Purchase>(_list8.size);
7748
                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
7749
                {
7750
                  Purchase _elem10; // required
7751
                  _elem10 = new Purchase();
7752
                  _elem10.read(iprot);
7753
                  this.success.add(_elem10);
7754
                }
7755
                iprot.readListEnd();
7756
              }
7757
            } else { 
7758
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7759
            }
7760
            break;
7761
          case 1: // E
7762
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7763
              this.e = new PurchaseServiceException();
7764
              this.e.read(iprot);
7765
            } else { 
7766
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7767
            }
7768
            break;
7769
          default:
7770
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7771
        }
7772
        iprot.readFieldEnd();
7773
      }
7774
      iprot.readStructEnd();
7775
      validate();
7776
    }
7777
 
7778
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7779
      oprot.writeStructBegin(STRUCT_DESC);
7780
 
7781
      if (this.isSetSuccess()) {
7782
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7783
        {
7784
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7785
          for (Purchase _iter11 : this.success)
7786
          {
7787
            _iter11.write(oprot);
7788
          }
7789
          oprot.writeListEnd();
7790
        }
7791
        oprot.writeFieldEnd();
7792
      } else if (this.isSetE()) {
7793
        oprot.writeFieldBegin(E_FIELD_DESC);
7794
        this.e.write(oprot);
7795
        oprot.writeFieldEnd();
7796
      }
7797
      oprot.writeFieldStop();
7798
      oprot.writeStructEnd();
7799
    }
7800
 
7801
    @Override
7802
    public String toString() {
7803
      StringBuilder sb = new StringBuilder("getAllPurchases_result(");
7804
      boolean first = true;
7805
 
7806
      sb.append("success:");
7807
      if (this.success == null) {
7808
        sb.append("null");
7809
      } else {
7810
        sb.append(this.success);
7811
      }
7812
      first = false;
7813
      if (!first) sb.append(", ");
7814
      sb.append("e:");
7815
      if (this.e == null) {
7816
        sb.append("null");
7817
      } else {
7818
        sb.append(this.e);
7819
      }
7820
      first = false;
7821
      sb.append(")");
7822
      return sb.toString();
7823
    }
7824
 
7825
    public void validate() throws org.apache.thrift.TException {
7826
      // check for required fields
7827
    }
7828
 
7829
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7830
      try {
7831
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7832
      } catch (org.apache.thrift.TException te) {
7833
        throw new java.io.IOException(te);
7834
      }
7835
    }
7836
 
7837
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7838
      try {
7839
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7840
      } catch (org.apache.thrift.TException te) {
7841
        throw new java.io.IOException(te);
7842
      }
7843
    }
7844
 
7845
  }
7846
 
6385 amar.kumar 7847
  public static class getPurchasesForPO_args implements org.apache.thrift.TBase<getPurchasesForPO_args, getPurchasesForPO_args._Fields>, java.io.Serializable, Cloneable   {
7848
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchasesForPO_args");
7849
 
7850
    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);
7851
 
7852
    private long purchaseOrderId; // required
7853
 
7854
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7855
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7856
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId");
7857
 
7858
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7859
 
7860
      static {
7861
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7862
          byName.put(field.getFieldName(), field);
7863
        }
7864
      }
7865
 
7866
      /**
7867
       * Find the _Fields constant that matches fieldId, or null if its not found.
7868
       */
7869
      public static _Fields findByThriftId(int fieldId) {
7870
        switch(fieldId) {
7871
          case 1: // PURCHASE_ORDER_ID
7872
            return PURCHASE_ORDER_ID;
7873
          default:
7874
            return null;
7875
        }
7876
      }
7877
 
7878
      /**
7879
       * Find the _Fields constant that matches fieldId, throwing an exception
7880
       * if it is not found.
7881
       */
7882
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7883
        _Fields fields = findByThriftId(fieldId);
7884
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7885
        return fields;
7886
      }
7887
 
7888
      /**
7889
       * Find the _Fields constant that matches name, or null if its not found.
7890
       */
7891
      public static _Fields findByName(String name) {
7892
        return byName.get(name);
7893
      }
7894
 
7895
      private final short _thriftId;
7896
      private final String _fieldName;
7897
 
7898
      _Fields(short thriftId, String fieldName) {
7899
        _thriftId = thriftId;
7900
        _fieldName = fieldName;
7901
      }
7902
 
7903
      public short getThriftFieldId() {
7904
        return _thriftId;
7905
      }
7906
 
7907
      public String getFieldName() {
7908
        return _fieldName;
7909
      }
7910
    }
7911
 
7912
    // isset id assignments
7913
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
7914
    private BitSet __isset_bit_vector = new BitSet(1);
7915
 
7916
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7917
    static {
7918
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7919
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7920
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7921
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7922
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchasesForPO_args.class, metaDataMap);
7923
    }
7924
 
7925
    public getPurchasesForPO_args() {
7926
    }
7927
 
7928
    public getPurchasesForPO_args(
7929
      long purchaseOrderId)
7930
    {
7931
      this();
7932
      this.purchaseOrderId = purchaseOrderId;
7933
      setPurchaseOrderIdIsSet(true);
7934
    }
7935
 
7936
    /**
7937
     * Performs a deep copy on <i>other</i>.
7938
     */
7939
    public getPurchasesForPO_args(getPurchasesForPO_args other) {
7940
      __isset_bit_vector.clear();
7941
      __isset_bit_vector.or(other.__isset_bit_vector);
7942
      this.purchaseOrderId = other.purchaseOrderId;
7943
    }
7944
 
7945
    public getPurchasesForPO_args deepCopy() {
7946
      return new getPurchasesForPO_args(this);
7947
    }
7948
 
7949
    @Override
7950
    public void clear() {
7951
      setPurchaseOrderIdIsSet(false);
7952
      this.purchaseOrderId = 0;
7953
    }
7954
 
7955
    public long getPurchaseOrderId() {
7956
      return this.purchaseOrderId;
7957
    }
7958
 
7959
    public void setPurchaseOrderId(long purchaseOrderId) {
7960
      this.purchaseOrderId = purchaseOrderId;
7961
      setPurchaseOrderIdIsSet(true);
7962
    }
7963
 
7964
    public void unsetPurchaseOrderId() {
7965
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
7966
    }
7967
 
7968
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
7969
    public boolean isSetPurchaseOrderId() {
7970
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
7971
    }
7972
 
7973
    public void setPurchaseOrderIdIsSet(boolean value) {
7974
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
7975
    }
7976
 
7977
    public void setFieldValue(_Fields field, Object value) {
7978
      switch (field) {
7979
      case PURCHASE_ORDER_ID:
7980
        if (value == null) {
7981
          unsetPurchaseOrderId();
7982
        } else {
7983
          setPurchaseOrderId((Long)value);
7984
        }
7985
        break;
7986
 
7987
      }
7988
    }
7989
 
7990
    public Object getFieldValue(_Fields field) {
7991
      switch (field) {
7992
      case PURCHASE_ORDER_ID:
7993
        return Long.valueOf(getPurchaseOrderId());
7994
 
7995
      }
7996
      throw new IllegalStateException();
7997
    }
7998
 
7999
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8000
    public boolean isSet(_Fields field) {
8001
      if (field == null) {
8002
        throw new IllegalArgumentException();
8003
      }
8004
 
8005
      switch (field) {
8006
      case PURCHASE_ORDER_ID:
8007
        return isSetPurchaseOrderId();
8008
      }
8009
      throw new IllegalStateException();
8010
    }
8011
 
8012
    @Override
8013
    public boolean equals(Object that) {
8014
      if (that == null)
8015
        return false;
8016
      if (that instanceof getPurchasesForPO_args)
8017
        return this.equals((getPurchasesForPO_args)that);
8018
      return false;
8019
    }
8020
 
8021
    public boolean equals(getPurchasesForPO_args that) {
8022
      if (that == null)
8023
        return false;
8024
 
8025
      boolean this_present_purchaseOrderId = true;
8026
      boolean that_present_purchaseOrderId = true;
8027
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
8028
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
8029
          return false;
8030
        if (this.purchaseOrderId != that.purchaseOrderId)
8031
          return false;
8032
      }
8033
 
8034
      return true;
8035
    }
8036
 
8037
    @Override
8038
    public int hashCode() {
8039
      return 0;
8040
    }
8041
 
8042
    public int compareTo(getPurchasesForPO_args other) {
8043
      if (!getClass().equals(other.getClass())) {
8044
        return getClass().getName().compareTo(other.getClass().getName());
8045
      }
8046
 
8047
      int lastComparison = 0;
8048
      getPurchasesForPO_args typedOther = (getPurchasesForPO_args)other;
8049
 
8050
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
8051
      if (lastComparison != 0) {
8052
        return lastComparison;
8053
      }
8054
      if (isSetPurchaseOrderId()) {
8055
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
8056
        if (lastComparison != 0) {
8057
          return lastComparison;
8058
        }
8059
      }
8060
      return 0;
8061
    }
8062
 
8063
    public _Fields fieldForId(int fieldId) {
8064
      return _Fields.findByThriftId(fieldId);
8065
    }
8066
 
8067
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8068
      org.apache.thrift.protocol.TField field;
8069
      iprot.readStructBegin();
8070
      while (true)
8071
      {
8072
        field = iprot.readFieldBegin();
8073
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8074
          break;
8075
        }
8076
        switch (field.id) {
8077
          case 1: // PURCHASE_ORDER_ID
8078
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8079
              this.purchaseOrderId = iprot.readI64();
8080
              setPurchaseOrderIdIsSet(true);
8081
            } else { 
8082
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8083
            }
8084
            break;
8085
          default:
8086
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8087
        }
8088
        iprot.readFieldEnd();
8089
      }
8090
      iprot.readStructEnd();
8091
      validate();
8092
    }
8093
 
8094
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8095
      validate();
8096
 
8097
      oprot.writeStructBegin(STRUCT_DESC);
8098
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
8099
      oprot.writeI64(this.purchaseOrderId);
8100
      oprot.writeFieldEnd();
8101
      oprot.writeFieldStop();
8102
      oprot.writeStructEnd();
8103
    }
8104
 
8105
    @Override
8106
    public String toString() {
8107
      StringBuilder sb = new StringBuilder("getPurchasesForPO_args(");
8108
      boolean first = true;
8109
 
8110
      sb.append("purchaseOrderId:");
8111
      sb.append(this.purchaseOrderId);
8112
      first = false;
8113
      sb.append(")");
8114
      return sb.toString();
8115
    }
8116
 
8117
    public void validate() throws org.apache.thrift.TException {
8118
      // check for required fields
8119
    }
8120
 
8121
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8122
      try {
8123
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8124
      } catch (org.apache.thrift.TException te) {
8125
        throw new java.io.IOException(te);
8126
      }
8127
    }
8128
 
8129
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8130
      try {
8131
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8132
        __isset_bit_vector = new BitSet(1);
8133
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8134
      } catch (org.apache.thrift.TException te) {
8135
        throw new java.io.IOException(te);
8136
      }
8137
    }
8138
 
8139
  }
8140
 
8141
  public static class getPurchasesForPO_result implements org.apache.thrift.TBase<getPurchasesForPO_result, getPurchasesForPO_result._Fields>, java.io.Serializable, Cloneable   {
8142
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchasesForPO_result");
8143
 
8144
    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);
8145
    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);
8146
 
8147
    private List<Purchase> success; // required
8148
    private PurchaseServiceException e; // required
8149
 
8150
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8151
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8152
      SUCCESS((short)0, "success"),
8153
      E((short)1, "e");
8154
 
8155
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8156
 
8157
      static {
8158
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8159
          byName.put(field.getFieldName(), field);
8160
        }
8161
      }
8162
 
8163
      /**
8164
       * Find the _Fields constant that matches fieldId, or null if its not found.
8165
       */
8166
      public static _Fields findByThriftId(int fieldId) {
8167
        switch(fieldId) {
8168
          case 0: // SUCCESS
8169
            return SUCCESS;
8170
          case 1: // E
8171
            return E;
8172
          default:
8173
            return null;
8174
        }
8175
      }
8176
 
8177
      /**
8178
       * Find the _Fields constant that matches fieldId, throwing an exception
8179
       * if it is not found.
8180
       */
8181
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8182
        _Fields fields = findByThriftId(fieldId);
8183
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8184
        return fields;
8185
      }
8186
 
8187
      /**
8188
       * Find the _Fields constant that matches name, or null if its not found.
8189
       */
8190
      public static _Fields findByName(String name) {
8191
        return byName.get(name);
8192
      }
8193
 
8194
      private final short _thriftId;
8195
      private final String _fieldName;
8196
 
8197
      _Fields(short thriftId, String fieldName) {
8198
        _thriftId = thriftId;
8199
        _fieldName = fieldName;
8200
      }
8201
 
8202
      public short getThriftFieldId() {
8203
        return _thriftId;
8204
      }
8205
 
8206
      public String getFieldName() {
8207
        return _fieldName;
8208
      }
8209
    }
8210
 
8211
    // isset id assignments
8212
 
8213
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8214
    static {
8215
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8216
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8217
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
8218
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Purchase.class))));
8219
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8220
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
8221
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8222
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchasesForPO_result.class, metaDataMap);
8223
    }
8224
 
8225
    public getPurchasesForPO_result() {
8226
    }
8227
 
8228
    public getPurchasesForPO_result(
8229
      List<Purchase> success,
8230
      PurchaseServiceException e)
8231
    {
8232
      this();
8233
      this.success = success;
8234
      this.e = e;
8235
    }
8236
 
8237
    /**
8238
     * Performs a deep copy on <i>other</i>.
8239
     */
8240
    public getPurchasesForPO_result(getPurchasesForPO_result other) {
8241
      if (other.isSetSuccess()) {
8242
        List<Purchase> __this__success = new ArrayList<Purchase>();
8243
        for (Purchase other_element : other.success) {
8244
          __this__success.add(new Purchase(other_element));
8245
        }
8246
        this.success = __this__success;
8247
      }
8248
      if (other.isSetE()) {
8249
        this.e = new PurchaseServiceException(other.e);
8250
      }
8251
    }
8252
 
8253
    public getPurchasesForPO_result deepCopy() {
8254
      return new getPurchasesForPO_result(this);
8255
    }
8256
 
8257
    @Override
8258
    public void clear() {
8259
      this.success = null;
8260
      this.e = null;
8261
    }
8262
 
8263
    public int getSuccessSize() {
8264
      return (this.success == null) ? 0 : this.success.size();
8265
    }
8266
 
8267
    public java.util.Iterator<Purchase> getSuccessIterator() {
8268
      return (this.success == null) ? null : this.success.iterator();
8269
    }
8270
 
8271
    public void addToSuccess(Purchase elem) {
8272
      if (this.success == null) {
8273
        this.success = new ArrayList<Purchase>();
8274
      }
8275
      this.success.add(elem);
8276
    }
8277
 
8278
    public List<Purchase> getSuccess() {
8279
      return this.success;
8280
    }
8281
 
8282
    public void setSuccess(List<Purchase> success) {
8283
      this.success = success;
8284
    }
8285
 
8286
    public void unsetSuccess() {
8287
      this.success = null;
8288
    }
8289
 
8290
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8291
    public boolean isSetSuccess() {
8292
      return this.success != null;
8293
    }
8294
 
8295
    public void setSuccessIsSet(boolean value) {
8296
      if (!value) {
8297
        this.success = null;
8298
      }
8299
    }
8300
 
8301
    public PurchaseServiceException getE() {
8302
      return this.e;
8303
    }
8304
 
8305
    public void setE(PurchaseServiceException e) {
8306
      this.e = e;
8307
    }
8308
 
8309
    public void unsetE() {
8310
      this.e = null;
8311
    }
8312
 
8313
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
8314
    public boolean isSetE() {
8315
      return this.e != null;
8316
    }
8317
 
8318
    public void setEIsSet(boolean value) {
8319
      if (!value) {
8320
        this.e = null;
8321
      }
8322
    }
8323
 
8324
    public void setFieldValue(_Fields field, Object value) {
8325
      switch (field) {
8326
      case SUCCESS:
8327
        if (value == null) {
8328
          unsetSuccess();
8329
        } else {
8330
          setSuccess((List<Purchase>)value);
8331
        }
8332
        break;
8333
 
8334
      case E:
8335
        if (value == null) {
8336
          unsetE();
8337
        } else {
8338
          setE((PurchaseServiceException)value);
8339
        }
8340
        break;
8341
 
8342
      }
8343
    }
8344
 
8345
    public Object getFieldValue(_Fields field) {
8346
      switch (field) {
8347
      case SUCCESS:
8348
        return getSuccess();
8349
 
8350
      case E:
8351
        return getE();
8352
 
8353
      }
8354
      throw new IllegalStateException();
8355
    }
8356
 
8357
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8358
    public boolean isSet(_Fields field) {
8359
      if (field == null) {
8360
        throw new IllegalArgumentException();
8361
      }
8362
 
8363
      switch (field) {
8364
      case SUCCESS:
8365
        return isSetSuccess();
8366
      case E:
8367
        return isSetE();
8368
      }
8369
      throw new IllegalStateException();
8370
    }
8371
 
8372
    @Override
8373
    public boolean equals(Object that) {
8374
      if (that == null)
8375
        return false;
8376
      if (that instanceof getPurchasesForPO_result)
8377
        return this.equals((getPurchasesForPO_result)that);
8378
      return false;
8379
    }
8380
 
8381
    public boolean equals(getPurchasesForPO_result that) {
8382
      if (that == null)
8383
        return false;
8384
 
8385
      boolean this_present_success = true && this.isSetSuccess();
8386
      boolean that_present_success = true && that.isSetSuccess();
8387
      if (this_present_success || that_present_success) {
8388
        if (!(this_present_success && that_present_success))
8389
          return false;
8390
        if (!this.success.equals(that.success))
8391
          return false;
8392
      }
8393
 
8394
      boolean this_present_e = true && this.isSetE();
8395
      boolean that_present_e = true && that.isSetE();
8396
      if (this_present_e || that_present_e) {
8397
        if (!(this_present_e && that_present_e))
8398
          return false;
8399
        if (!this.e.equals(that.e))
8400
          return false;
8401
      }
8402
 
8403
      return true;
8404
    }
8405
 
8406
    @Override
8407
    public int hashCode() {
8408
      return 0;
8409
    }
8410
 
8411
    public int compareTo(getPurchasesForPO_result other) {
8412
      if (!getClass().equals(other.getClass())) {
8413
        return getClass().getName().compareTo(other.getClass().getName());
8414
      }
8415
 
8416
      int lastComparison = 0;
8417
      getPurchasesForPO_result typedOther = (getPurchasesForPO_result)other;
8418
 
8419
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8420
      if (lastComparison != 0) {
8421
        return lastComparison;
8422
      }
8423
      if (isSetSuccess()) {
8424
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8425
        if (lastComparison != 0) {
8426
          return lastComparison;
8427
        }
8428
      }
8429
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
8430
      if (lastComparison != 0) {
8431
        return lastComparison;
8432
      }
8433
      if (isSetE()) {
8434
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
8435
        if (lastComparison != 0) {
8436
          return lastComparison;
8437
        }
8438
      }
8439
      return 0;
8440
    }
8441
 
8442
    public _Fields fieldForId(int fieldId) {
8443
      return _Fields.findByThriftId(fieldId);
8444
    }
8445
 
8446
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8447
      org.apache.thrift.protocol.TField field;
8448
      iprot.readStructBegin();
8449
      while (true)
8450
      {
8451
        field = iprot.readFieldBegin();
8452
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8453
          break;
8454
        }
8455
        switch (field.id) {
8456
          case 0: // SUCCESS
8457
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8458
              {
8459
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
8460
                this.success = new ArrayList<Purchase>(_list12.size);
8461
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
8462
                {
8463
                  Purchase _elem14; // required
8464
                  _elem14 = new Purchase();
8465
                  _elem14.read(iprot);
8466
                  this.success.add(_elem14);
8467
                }
8468
                iprot.readListEnd();
8469
              }
8470
            } else { 
8471
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8472
            }
8473
            break;
8474
          case 1: // E
8475
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8476
              this.e = new PurchaseServiceException();
8477
              this.e.read(iprot);
8478
            } else { 
8479
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8480
            }
8481
            break;
8482
          default:
8483
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8484
        }
8485
        iprot.readFieldEnd();
8486
      }
8487
      iprot.readStructEnd();
8488
      validate();
8489
    }
8490
 
8491
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8492
      oprot.writeStructBegin(STRUCT_DESC);
8493
 
8494
      if (this.isSetSuccess()) {
8495
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8496
        {
8497
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
8498
          for (Purchase _iter15 : this.success)
8499
          {
8500
            _iter15.write(oprot);
8501
          }
8502
          oprot.writeListEnd();
8503
        }
8504
        oprot.writeFieldEnd();
8505
      } else if (this.isSetE()) {
8506
        oprot.writeFieldBegin(E_FIELD_DESC);
8507
        this.e.write(oprot);
8508
        oprot.writeFieldEnd();
8509
      }
8510
      oprot.writeFieldStop();
8511
      oprot.writeStructEnd();
8512
    }
8513
 
8514
    @Override
8515
    public String toString() {
8516
      StringBuilder sb = new StringBuilder("getPurchasesForPO_result(");
8517
      boolean first = true;
8518
 
8519
      sb.append("success:");
8520
      if (this.success == null) {
8521
        sb.append("null");
8522
      } else {
8523
        sb.append(this.success);
8524
      }
8525
      first = false;
8526
      if (!first) sb.append(", ");
8527
      sb.append("e:");
8528
      if (this.e == null) {
8529
        sb.append("null");
8530
      } else {
8531
        sb.append(this.e);
8532
      }
8533
      first = false;
8534
      sb.append(")");
8535
      return sb.toString();
8536
    }
8537
 
8538
    public void validate() throws org.apache.thrift.TException {
8539
      // check for required fields
8540
    }
8541
 
8542
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8543
      try {
8544
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8545
      } catch (org.apache.thrift.TException te) {
8546
        throw new java.io.IOException(te);
8547
      }
8548
    }
8549
 
8550
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8551
      try {
8552
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8553
      } catch (org.apache.thrift.TException te) {
8554
        throw new java.io.IOException(te);
8555
      }
8556
    }
8557
 
8558
  }
8559
 
4555 mandeep.dh 8560
  public static class getPurchaseOrderForPurchase_args implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_args, getPurchaseOrderForPurchase_args._Fields>, java.io.Serializable, Cloneable   {
8561
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_args");
4496 mandeep.dh 8562
 
8563
    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);
8564
 
8565
    private long purchaseId; // required
8566
 
8567
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8568
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4555 mandeep.dh 8569
      PURCHASE_ID((short)1, "purchaseId");
4496 mandeep.dh 8570
 
8571
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8572
 
8573
      static {
8574
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8575
          byName.put(field.getFieldName(), field);
8576
        }
8577
      }
8578
 
8579
      /**
8580
       * Find the _Fields constant that matches fieldId, or null if its not found.
8581
       */
8582
      public static _Fields findByThriftId(int fieldId) {
8583
        switch(fieldId) {
8584
          case 1: // PURCHASE_ID
8585
            return PURCHASE_ID;
8586
          default:
8587
            return null;
8588
        }
8589
      }
8590
 
8591
      /**
8592
       * Find the _Fields constant that matches fieldId, throwing an exception
8593
       * if it is not found.
8594
       */
8595
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8596
        _Fields fields = findByThriftId(fieldId);
8597
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8598
        return fields;
8599
      }
8600
 
8601
      /**
8602
       * Find the _Fields constant that matches name, or null if its not found.
8603
       */
8604
      public static _Fields findByName(String name) {
8605
        return byName.get(name);
8606
      }
8607
 
8608
      private final short _thriftId;
8609
      private final String _fieldName;
8610
 
8611
      _Fields(short thriftId, String fieldName) {
8612
        _thriftId = thriftId;
8613
        _fieldName = fieldName;
8614
      }
8615
 
8616
      public short getThriftFieldId() {
8617
        return _thriftId;
8618
      }
8619
 
8620
      public String getFieldName() {
8621
        return _fieldName;
8622
      }
8623
    }
8624
 
8625
    // isset id assignments
8626
    private static final int __PURCHASEID_ISSET_ID = 0;
4555 mandeep.dh 8627
    private BitSet __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 8628
 
8629
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8630
    static {
8631
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8632
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8633
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8634
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 8635
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_args.class, metaDataMap);
4496 mandeep.dh 8636
    }
8637
 
4555 mandeep.dh 8638
    public getPurchaseOrderForPurchase_args() {
4496 mandeep.dh 8639
    }
8640
 
4555 mandeep.dh 8641
    public getPurchaseOrderForPurchase_args(
8642
      long purchaseId)
4496 mandeep.dh 8643
    {
8644
      this();
8645
      this.purchaseId = purchaseId;
8646
      setPurchaseIdIsSet(true);
8647
    }
8648
 
8649
    /**
8650
     * Performs a deep copy on <i>other</i>.
8651
     */
4555 mandeep.dh 8652
    public getPurchaseOrderForPurchase_args(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 8653
      __isset_bit_vector.clear();
8654
      __isset_bit_vector.or(other.__isset_bit_vector);
8655
      this.purchaseId = other.purchaseId;
8656
    }
8657
 
4555 mandeep.dh 8658
    public getPurchaseOrderForPurchase_args deepCopy() {
8659
      return new getPurchaseOrderForPurchase_args(this);
4496 mandeep.dh 8660
    }
8661
 
8662
    @Override
8663
    public void clear() {
8664
      setPurchaseIdIsSet(false);
8665
      this.purchaseId = 0;
8666
    }
8667
 
8668
    public long getPurchaseId() {
8669
      return this.purchaseId;
8670
    }
8671
 
8672
    public void setPurchaseId(long purchaseId) {
8673
      this.purchaseId = purchaseId;
8674
      setPurchaseIdIsSet(true);
8675
    }
8676
 
8677
    public void unsetPurchaseId() {
8678
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
8679
    }
8680
 
8681
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
8682
    public boolean isSetPurchaseId() {
8683
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
8684
    }
8685
 
8686
    public void setPurchaseIdIsSet(boolean value) {
8687
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
8688
    }
8689
 
8690
    public void setFieldValue(_Fields field, Object value) {
8691
      switch (field) {
8692
      case PURCHASE_ID:
8693
        if (value == null) {
8694
          unsetPurchaseId();
8695
        } else {
8696
          setPurchaseId((Long)value);
8697
        }
8698
        break;
8699
 
8700
      }
8701
    }
8702
 
8703
    public Object getFieldValue(_Fields field) {
8704
      switch (field) {
8705
      case PURCHASE_ID:
8706
        return Long.valueOf(getPurchaseId());
8707
 
8708
      }
8709
      throw new IllegalStateException();
8710
    }
8711
 
8712
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8713
    public boolean isSet(_Fields field) {
8714
      if (field == null) {
8715
        throw new IllegalArgumentException();
8716
      }
8717
 
8718
      switch (field) {
8719
      case PURCHASE_ID:
8720
        return isSetPurchaseId();
8721
      }
8722
      throw new IllegalStateException();
8723
    }
8724
 
8725
    @Override
8726
    public boolean equals(Object that) {
8727
      if (that == null)
8728
        return false;
4555 mandeep.dh 8729
      if (that instanceof getPurchaseOrderForPurchase_args)
8730
        return this.equals((getPurchaseOrderForPurchase_args)that);
4496 mandeep.dh 8731
      return false;
8732
    }
8733
 
4555 mandeep.dh 8734
    public boolean equals(getPurchaseOrderForPurchase_args that) {
4496 mandeep.dh 8735
      if (that == null)
8736
        return false;
8737
 
8738
      boolean this_present_purchaseId = true;
8739
      boolean that_present_purchaseId = true;
8740
      if (this_present_purchaseId || that_present_purchaseId) {
8741
        if (!(this_present_purchaseId && that_present_purchaseId))
8742
          return false;
8743
        if (this.purchaseId != that.purchaseId)
8744
          return false;
8745
      }
8746
 
8747
      return true;
8748
    }
8749
 
8750
    @Override
8751
    public int hashCode() {
8752
      return 0;
8753
    }
8754
 
4555 mandeep.dh 8755
    public int compareTo(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 8756
      if (!getClass().equals(other.getClass())) {
8757
        return getClass().getName().compareTo(other.getClass().getName());
8758
      }
8759
 
8760
      int lastComparison = 0;
4555 mandeep.dh 8761
      getPurchaseOrderForPurchase_args typedOther = (getPurchaseOrderForPurchase_args)other;
4496 mandeep.dh 8762
 
8763
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
8764
      if (lastComparison != 0) {
8765
        return lastComparison;
8766
      }
8767
      if (isSetPurchaseId()) {
8768
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
8769
        if (lastComparison != 0) {
8770
          return lastComparison;
8771
        }
8772
      }
8773
      return 0;
8774
    }
8775
 
8776
    public _Fields fieldForId(int fieldId) {
8777
      return _Fields.findByThriftId(fieldId);
8778
    }
8779
 
8780
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8781
      org.apache.thrift.protocol.TField field;
8782
      iprot.readStructBegin();
8783
      while (true)
8784
      {
8785
        field = iprot.readFieldBegin();
8786
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8787
          break;
8788
        }
8789
        switch (field.id) {
8790
          case 1: // PURCHASE_ID
8791
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8792
              this.purchaseId = iprot.readI64();
8793
              setPurchaseIdIsSet(true);
8794
            } else { 
8795
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8796
            }
8797
            break;
8798
          default:
8799
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8800
        }
8801
        iprot.readFieldEnd();
8802
      }
8803
      iprot.readStructEnd();
8804
      validate();
8805
    }
8806
 
8807
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8808
      validate();
8809
 
8810
      oprot.writeStructBegin(STRUCT_DESC);
8811
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
8812
      oprot.writeI64(this.purchaseId);
8813
      oprot.writeFieldEnd();
8814
      oprot.writeFieldStop();
8815
      oprot.writeStructEnd();
8816
    }
8817
 
8818
    @Override
8819
    public String toString() {
4555 mandeep.dh 8820
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_args(");
4496 mandeep.dh 8821
      boolean first = true;
8822
 
8823
      sb.append("purchaseId:");
8824
      sb.append(this.purchaseId);
8825
      first = false;
8826
      sb.append(")");
8827
      return sb.toString();
8828
    }
8829
 
8830
    public void validate() throws org.apache.thrift.TException {
8831
      // check for required fields
8832
    }
8833
 
8834
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8835
      try {
8836
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8837
      } catch (org.apache.thrift.TException te) {
8838
        throw new java.io.IOException(te);
8839
      }
8840
    }
8841
 
8842
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8843
      try {
4555 mandeep.dh 8844
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8845
        __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 8846
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8847
      } catch (org.apache.thrift.TException te) {
8848
        throw new java.io.IOException(te);
8849
      }
8850
    }
8851
 
8852
  }
8853
 
4555 mandeep.dh 8854
  public static class getPurchaseOrderForPurchase_result implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_result, getPurchaseOrderForPurchase_result._Fields>, java.io.Serializable, Cloneable   {
8855
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_result");
4496 mandeep.dh 8856
 
4555 mandeep.dh 8857
    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 8858
 
4555 mandeep.dh 8859
    private PurchaseOrder success; // required
4496 mandeep.dh 8860
 
8861
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8862
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8863
      SUCCESS((short)0, "success");
8864
 
8865
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8866
 
8867
      static {
8868
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8869
          byName.put(field.getFieldName(), field);
8870
        }
8871
      }
8872
 
8873
      /**
8874
       * Find the _Fields constant that matches fieldId, or null if its not found.
8875
       */
8876
      public static _Fields findByThriftId(int fieldId) {
8877
        switch(fieldId) {
8878
          case 0: // SUCCESS
8879
            return SUCCESS;
8880
          default:
8881
            return null;
8882
        }
8883
      }
8884
 
8885
      /**
8886
       * Find the _Fields constant that matches fieldId, throwing an exception
8887
       * if it is not found.
8888
       */
8889
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8890
        _Fields fields = findByThriftId(fieldId);
8891
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8892
        return fields;
8893
      }
8894
 
8895
      /**
8896
       * Find the _Fields constant that matches name, or null if its not found.
8897
       */
8898
      public static _Fields findByName(String name) {
8899
        return byName.get(name);
8900
      }
8901
 
8902
      private final short _thriftId;
8903
      private final String _fieldName;
8904
 
8905
      _Fields(short thriftId, String fieldName) {
8906
        _thriftId = thriftId;
8907
        _fieldName = fieldName;
8908
      }
8909
 
8910
      public short getThriftFieldId() {
8911
        return _thriftId;
8912
      }
8913
 
8914
      public String getFieldName() {
8915
        return _fieldName;
8916
      }
8917
    }
8918
 
8919
    // isset id assignments
8920
 
8921
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8922
    static {
8923
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8924
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 8925
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
4496 mandeep.dh 8926
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 8927
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_result.class, metaDataMap);
4496 mandeep.dh 8928
    }
8929
 
4555 mandeep.dh 8930
    public getPurchaseOrderForPurchase_result() {
4496 mandeep.dh 8931
    }
8932
 
4555 mandeep.dh 8933
    public getPurchaseOrderForPurchase_result(
8934
      PurchaseOrder success)
4496 mandeep.dh 8935
    {
8936
      this();
8937
      this.success = success;
8938
    }
8939
 
8940
    /**
8941
     * Performs a deep copy on <i>other</i>.
8942
     */
4555 mandeep.dh 8943
    public getPurchaseOrderForPurchase_result(getPurchaseOrderForPurchase_result other) {
8944
      if (other.isSetSuccess()) {
8945
        this.success = new PurchaseOrder(other.success);
8946
      }
4496 mandeep.dh 8947
    }
8948
 
4555 mandeep.dh 8949
    public getPurchaseOrderForPurchase_result deepCopy() {
8950
      return new getPurchaseOrderForPurchase_result(this);
4496 mandeep.dh 8951
    }
8952
 
8953
    @Override
8954
    public void clear() {
4555 mandeep.dh 8955
      this.success = null;
4496 mandeep.dh 8956
    }
8957
 
4555 mandeep.dh 8958
    public PurchaseOrder getSuccess() {
4496 mandeep.dh 8959
      return this.success;
8960
    }
8961
 
4555 mandeep.dh 8962
    public void setSuccess(PurchaseOrder success) {
4496 mandeep.dh 8963
      this.success = success;
8964
    }
8965
 
8966
    public void unsetSuccess() {
4555 mandeep.dh 8967
      this.success = null;
4496 mandeep.dh 8968
    }
8969
 
8970
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8971
    public boolean isSetSuccess() {
4555 mandeep.dh 8972
      return this.success != null;
4496 mandeep.dh 8973
    }
8974
 
8975
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 8976
      if (!value) {
8977
        this.success = null;
8978
      }
4496 mandeep.dh 8979
    }
8980
 
8981
    public void setFieldValue(_Fields field, Object value) {
8982
      switch (field) {
8983
      case SUCCESS:
8984
        if (value == null) {
8985
          unsetSuccess();
8986
        } else {
4555 mandeep.dh 8987
          setSuccess((PurchaseOrder)value);
4496 mandeep.dh 8988
        }
8989
        break;
8990
 
8991
      }
8992
    }
8993
 
8994
    public Object getFieldValue(_Fields field) {
8995
      switch (field) {
8996
      case SUCCESS:
4555 mandeep.dh 8997
        return getSuccess();
4496 mandeep.dh 8998
 
8999
      }
9000
      throw new IllegalStateException();
9001
    }
9002
 
9003
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9004
    public boolean isSet(_Fields field) {
9005
      if (field == null) {
9006
        throw new IllegalArgumentException();
9007
      }
9008
 
9009
      switch (field) {
9010
      case SUCCESS:
9011
        return isSetSuccess();
9012
      }
9013
      throw new IllegalStateException();
9014
    }
9015
 
9016
    @Override
9017
    public boolean equals(Object that) {
9018
      if (that == null)
9019
        return false;
4555 mandeep.dh 9020
      if (that instanceof getPurchaseOrderForPurchase_result)
9021
        return this.equals((getPurchaseOrderForPurchase_result)that);
4496 mandeep.dh 9022
      return false;
9023
    }
9024
 
4555 mandeep.dh 9025
    public boolean equals(getPurchaseOrderForPurchase_result that) {
4496 mandeep.dh 9026
      if (that == null)
9027
        return false;
9028
 
4555 mandeep.dh 9029
      boolean this_present_success = true && this.isSetSuccess();
9030
      boolean that_present_success = true && that.isSetSuccess();
4496 mandeep.dh 9031
      if (this_present_success || that_present_success) {
9032
        if (!(this_present_success && that_present_success))
9033
          return false;
4555 mandeep.dh 9034
        if (!this.success.equals(that.success))
4496 mandeep.dh 9035
          return false;
9036
      }
9037
 
9038
      return true;
9039
    }
9040
 
9041
    @Override
9042
    public int hashCode() {
9043
      return 0;
9044
    }
9045
 
4555 mandeep.dh 9046
    public int compareTo(getPurchaseOrderForPurchase_result other) {
4496 mandeep.dh 9047
      if (!getClass().equals(other.getClass())) {
9048
        return getClass().getName().compareTo(other.getClass().getName());
9049
      }
9050
 
9051
      int lastComparison = 0;
4555 mandeep.dh 9052
      getPurchaseOrderForPurchase_result typedOther = (getPurchaseOrderForPurchase_result)other;
4496 mandeep.dh 9053
 
9054
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9055
      if (lastComparison != 0) {
9056
        return lastComparison;
9057
      }
9058
      if (isSetSuccess()) {
9059
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9060
        if (lastComparison != 0) {
9061
          return lastComparison;
9062
        }
9063
      }
9064
      return 0;
9065
    }
9066
 
9067
    public _Fields fieldForId(int fieldId) {
9068
      return _Fields.findByThriftId(fieldId);
9069
    }
9070
 
9071
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9072
      org.apache.thrift.protocol.TField field;
9073
      iprot.readStructBegin();
9074
      while (true)
9075
      {
9076
        field = iprot.readFieldBegin();
9077
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9078
          break;
9079
        }
9080
        switch (field.id) {
9081
          case 0: // SUCCESS
4555 mandeep.dh 9082
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9083
              this.success = new PurchaseOrder();
9084
              this.success.read(iprot);
4496 mandeep.dh 9085
            } else { 
9086
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9087
            }
9088
            break;
9089
          default:
9090
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9091
        }
9092
        iprot.readFieldEnd();
9093
      }
9094
      iprot.readStructEnd();
9095
      validate();
9096
    }
9097
 
9098
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9099
      oprot.writeStructBegin(STRUCT_DESC);
9100
 
9101
      if (this.isSetSuccess()) {
9102
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 9103
        this.success.write(oprot);
4496 mandeep.dh 9104
        oprot.writeFieldEnd();
9105
      }
9106
      oprot.writeFieldStop();
9107
      oprot.writeStructEnd();
9108
    }
9109
 
9110
    @Override
9111
    public String toString() {
4555 mandeep.dh 9112
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_result(");
4496 mandeep.dh 9113
      boolean first = true;
9114
 
9115
      sb.append("success:");
4555 mandeep.dh 9116
      if (this.success == null) {
9117
        sb.append("null");
9118
      } else {
9119
        sb.append(this.success);
9120
      }
4496 mandeep.dh 9121
      first = false;
9122
      sb.append(")");
9123
      return sb.toString();
9124
    }
9125
 
9126
    public void validate() throws org.apache.thrift.TException {
9127
      // check for required fields
9128
    }
9129
 
9130
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9131
      try {
9132
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9133
      } catch (org.apache.thrift.TException te) {
9134
        throw new java.io.IOException(te);
9135
      }
9136
    }
9137
 
9138
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9139
      try {
9140
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9141
      } catch (org.apache.thrift.TException te) {
9142
        throw new java.io.IOException(te);
9143
      }
9144
    }
9145
 
9146
  }
9147
 
4754 mandeep.dh 9148
  public static class getPendingPurchaseOrders_args implements org.apache.thrift.TBase<getPendingPurchaseOrders_args, getPendingPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
9149
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_args");
9150
 
9151
    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);
9152
 
9153
    private long warehouseId; // required
9154
 
9155
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9156
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9157
      WAREHOUSE_ID((short)1, "warehouseId");
9158
 
9159
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9160
 
9161
      static {
9162
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9163
          byName.put(field.getFieldName(), field);
9164
        }
9165
      }
9166
 
9167
      /**
9168
       * Find the _Fields constant that matches fieldId, or null if its not found.
9169
       */
9170
      public static _Fields findByThriftId(int fieldId) {
9171
        switch(fieldId) {
9172
          case 1: // WAREHOUSE_ID
9173
            return WAREHOUSE_ID;
9174
          default:
9175
            return null;
9176
        }
9177
      }
9178
 
9179
      /**
9180
       * Find the _Fields constant that matches fieldId, throwing an exception
9181
       * if it is not found.
9182
       */
9183
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9184
        _Fields fields = findByThriftId(fieldId);
9185
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9186
        return fields;
9187
      }
9188
 
9189
      /**
9190
       * Find the _Fields constant that matches name, or null if its not found.
9191
       */
9192
      public static _Fields findByName(String name) {
9193
        return byName.get(name);
9194
      }
9195
 
9196
      private final short _thriftId;
9197
      private final String _fieldName;
9198
 
9199
      _Fields(short thriftId, String fieldName) {
9200
        _thriftId = thriftId;
9201
        _fieldName = fieldName;
9202
      }
9203
 
9204
      public short getThriftFieldId() {
9205
        return _thriftId;
9206
      }
9207
 
9208
      public String getFieldName() {
9209
        return _fieldName;
9210
      }
9211
    }
9212
 
9213
    // isset id assignments
9214
    private static final int __WAREHOUSEID_ISSET_ID = 0;
9215
    private BitSet __isset_bit_vector = new BitSet(1);
9216
 
9217
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9218
    static {
9219
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9220
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9221
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9222
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9223
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_args.class, metaDataMap);
9224
    }
9225
 
9226
    public getPendingPurchaseOrders_args() {
9227
    }
9228
 
9229
    public getPendingPurchaseOrders_args(
9230
      long warehouseId)
9231
    {
9232
      this();
9233
      this.warehouseId = warehouseId;
9234
      setWarehouseIdIsSet(true);
9235
    }
9236
 
9237
    /**
9238
     * Performs a deep copy on <i>other</i>.
9239
     */
9240
    public getPendingPurchaseOrders_args(getPendingPurchaseOrders_args other) {
9241
      __isset_bit_vector.clear();
9242
      __isset_bit_vector.or(other.__isset_bit_vector);
9243
      this.warehouseId = other.warehouseId;
9244
    }
9245
 
9246
    public getPendingPurchaseOrders_args deepCopy() {
9247
      return new getPendingPurchaseOrders_args(this);
9248
    }
9249
 
9250
    @Override
9251
    public void clear() {
9252
      setWarehouseIdIsSet(false);
9253
      this.warehouseId = 0;
9254
    }
9255
 
9256
    public long getWarehouseId() {
9257
      return this.warehouseId;
9258
    }
9259
 
9260
    public void setWarehouseId(long warehouseId) {
9261
      this.warehouseId = warehouseId;
9262
      setWarehouseIdIsSet(true);
9263
    }
9264
 
9265
    public void unsetWarehouseId() {
9266
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
9267
    }
9268
 
9269
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
9270
    public boolean isSetWarehouseId() {
9271
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
9272
    }
9273
 
9274
    public void setWarehouseIdIsSet(boolean value) {
9275
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
9276
    }
9277
 
9278
    public void setFieldValue(_Fields field, Object value) {
9279
      switch (field) {
9280
      case WAREHOUSE_ID:
9281
        if (value == null) {
9282
          unsetWarehouseId();
9283
        } else {
9284
          setWarehouseId((Long)value);
9285
        }
9286
        break;
9287
 
9288
      }
9289
    }
9290
 
9291
    public Object getFieldValue(_Fields field) {
9292
      switch (field) {
9293
      case WAREHOUSE_ID:
9294
        return Long.valueOf(getWarehouseId());
9295
 
9296
      }
9297
      throw new IllegalStateException();
9298
    }
9299
 
9300
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9301
    public boolean isSet(_Fields field) {
9302
      if (field == null) {
9303
        throw new IllegalArgumentException();
9304
      }
9305
 
9306
      switch (field) {
9307
      case WAREHOUSE_ID:
9308
        return isSetWarehouseId();
9309
      }
9310
      throw new IllegalStateException();
9311
    }
9312
 
9313
    @Override
9314
    public boolean equals(Object that) {
9315
      if (that == null)
9316
        return false;
9317
      if (that instanceof getPendingPurchaseOrders_args)
9318
        return this.equals((getPendingPurchaseOrders_args)that);
9319
      return false;
9320
    }
9321
 
9322
    public boolean equals(getPendingPurchaseOrders_args that) {
9323
      if (that == null)
9324
        return false;
9325
 
9326
      boolean this_present_warehouseId = true;
9327
      boolean that_present_warehouseId = true;
9328
      if (this_present_warehouseId || that_present_warehouseId) {
9329
        if (!(this_present_warehouseId && that_present_warehouseId))
9330
          return false;
9331
        if (this.warehouseId != that.warehouseId)
9332
          return false;
9333
      }
9334
 
9335
      return true;
9336
    }
9337
 
9338
    @Override
9339
    public int hashCode() {
9340
      return 0;
9341
    }
9342
 
9343
    public int compareTo(getPendingPurchaseOrders_args other) {
9344
      if (!getClass().equals(other.getClass())) {
9345
        return getClass().getName().compareTo(other.getClass().getName());
9346
      }
9347
 
9348
      int lastComparison = 0;
9349
      getPendingPurchaseOrders_args typedOther = (getPendingPurchaseOrders_args)other;
9350
 
9351
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
9352
      if (lastComparison != 0) {
9353
        return lastComparison;
9354
      }
9355
      if (isSetWarehouseId()) {
9356
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
9357
        if (lastComparison != 0) {
9358
          return lastComparison;
9359
        }
9360
      }
9361
      return 0;
9362
    }
9363
 
9364
    public _Fields fieldForId(int fieldId) {
9365
      return _Fields.findByThriftId(fieldId);
9366
    }
9367
 
9368
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9369
      org.apache.thrift.protocol.TField field;
9370
      iprot.readStructBegin();
9371
      while (true)
9372
      {
9373
        field = iprot.readFieldBegin();
9374
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9375
          break;
9376
        }
9377
        switch (field.id) {
9378
          case 1: // WAREHOUSE_ID
9379
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9380
              this.warehouseId = iprot.readI64();
9381
              setWarehouseIdIsSet(true);
9382
            } else { 
9383
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9384
            }
9385
            break;
9386
          default:
9387
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9388
        }
9389
        iprot.readFieldEnd();
9390
      }
9391
      iprot.readStructEnd();
9392
      validate();
9393
    }
9394
 
9395
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9396
      validate();
9397
 
9398
      oprot.writeStructBegin(STRUCT_DESC);
9399
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
9400
      oprot.writeI64(this.warehouseId);
9401
      oprot.writeFieldEnd();
9402
      oprot.writeFieldStop();
9403
      oprot.writeStructEnd();
9404
    }
9405
 
9406
    @Override
9407
    public String toString() {
9408
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_args(");
9409
      boolean first = true;
9410
 
9411
      sb.append("warehouseId:");
9412
      sb.append(this.warehouseId);
9413
      first = false;
9414
      sb.append(")");
9415
      return sb.toString();
9416
    }
9417
 
9418
    public void validate() throws org.apache.thrift.TException {
9419
      // check for required fields
9420
    }
9421
 
9422
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9423
      try {
9424
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9425
      } catch (org.apache.thrift.TException te) {
9426
        throw new java.io.IOException(te);
9427
      }
9428
    }
9429
 
9430
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9431
      try {
9432
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
9433
        __isset_bit_vector = new BitSet(1);
9434
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9435
      } catch (org.apache.thrift.TException te) {
9436
        throw new java.io.IOException(te);
9437
      }
9438
    }
9439
 
9440
  }
9441
 
9442
  public static class getPendingPurchaseOrders_result implements org.apache.thrift.TBase<getPendingPurchaseOrders_result, getPendingPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
9443
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_result");
9444
 
9445
    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);
9446
    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);
9447
 
9448
    private List<PurchaseOrder> success; // required
9449
    private PurchaseServiceException e; // required
9450
 
9451
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9452
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9453
      SUCCESS((short)0, "success"),
9454
      E((short)1, "e");
9455
 
9456
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9457
 
9458
      static {
9459
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9460
          byName.put(field.getFieldName(), field);
9461
        }
9462
      }
9463
 
9464
      /**
9465
       * Find the _Fields constant that matches fieldId, or null if its not found.
9466
       */
9467
      public static _Fields findByThriftId(int fieldId) {
9468
        switch(fieldId) {
9469
          case 0: // SUCCESS
9470
            return SUCCESS;
9471
          case 1: // E
9472
            return E;
9473
          default:
9474
            return null;
9475
        }
9476
      }
9477
 
9478
      /**
9479
       * Find the _Fields constant that matches fieldId, throwing an exception
9480
       * if it is not found.
9481
       */
9482
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9483
        _Fields fields = findByThriftId(fieldId);
9484
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9485
        return fields;
9486
      }
9487
 
9488
      /**
9489
       * Find the _Fields constant that matches name, or null if its not found.
9490
       */
9491
      public static _Fields findByName(String name) {
9492
        return byName.get(name);
9493
      }
9494
 
9495
      private final short _thriftId;
9496
      private final String _fieldName;
9497
 
9498
      _Fields(short thriftId, String fieldName) {
9499
        _thriftId = thriftId;
9500
        _fieldName = fieldName;
9501
      }
9502
 
9503
      public short getThriftFieldId() {
9504
        return _thriftId;
9505
      }
9506
 
9507
      public String getFieldName() {
9508
        return _fieldName;
9509
      }
9510
    }
9511
 
9512
    // isset id assignments
9513
 
9514
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9515
    static {
9516
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9517
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9518
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
9519
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
9520
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9521
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9522
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9523
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_result.class, metaDataMap);
9524
    }
9525
 
9526
    public getPendingPurchaseOrders_result() {
9527
    }
9528
 
9529
    public getPendingPurchaseOrders_result(
9530
      List<PurchaseOrder> success,
9531
      PurchaseServiceException e)
9532
    {
9533
      this();
9534
      this.success = success;
9535
      this.e = e;
9536
    }
9537
 
9538
    /**
9539
     * Performs a deep copy on <i>other</i>.
9540
     */
9541
    public getPendingPurchaseOrders_result(getPendingPurchaseOrders_result other) {
9542
      if (other.isSetSuccess()) {
9543
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
9544
        for (PurchaseOrder other_element : other.success) {
9545
          __this__success.add(new PurchaseOrder(other_element));
9546
        }
9547
        this.success = __this__success;
9548
      }
9549
      if (other.isSetE()) {
9550
        this.e = new PurchaseServiceException(other.e);
9551
      }
9552
    }
9553
 
9554
    public getPendingPurchaseOrders_result deepCopy() {
9555
      return new getPendingPurchaseOrders_result(this);
9556
    }
9557
 
9558
    @Override
9559
    public void clear() {
9560
      this.success = null;
9561
      this.e = null;
9562
    }
9563
 
9564
    public int getSuccessSize() {
9565
      return (this.success == null) ? 0 : this.success.size();
9566
    }
9567
 
9568
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
9569
      return (this.success == null) ? null : this.success.iterator();
9570
    }
9571
 
9572
    public void addToSuccess(PurchaseOrder elem) {
9573
      if (this.success == null) {
9574
        this.success = new ArrayList<PurchaseOrder>();
9575
      }
9576
      this.success.add(elem);
9577
    }
9578
 
9579
    public List<PurchaseOrder> getSuccess() {
9580
      return this.success;
9581
    }
9582
 
9583
    public void setSuccess(List<PurchaseOrder> success) {
9584
      this.success = success;
9585
    }
9586
 
9587
    public void unsetSuccess() {
9588
      this.success = null;
9589
    }
9590
 
9591
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9592
    public boolean isSetSuccess() {
9593
      return this.success != null;
9594
    }
9595
 
9596
    public void setSuccessIsSet(boolean value) {
9597
      if (!value) {
9598
        this.success = null;
9599
      }
9600
    }
9601
 
9602
    public PurchaseServiceException getE() {
9603
      return this.e;
9604
    }
9605
 
9606
    public void setE(PurchaseServiceException e) {
9607
      this.e = e;
9608
    }
9609
 
9610
    public void unsetE() {
9611
      this.e = null;
9612
    }
9613
 
9614
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
9615
    public boolean isSetE() {
9616
      return this.e != null;
9617
    }
9618
 
9619
    public void setEIsSet(boolean value) {
9620
      if (!value) {
9621
        this.e = null;
9622
      }
9623
    }
9624
 
9625
    public void setFieldValue(_Fields field, Object value) {
9626
      switch (field) {
9627
      case SUCCESS:
9628
        if (value == null) {
9629
          unsetSuccess();
9630
        } else {
9631
          setSuccess((List<PurchaseOrder>)value);
9632
        }
9633
        break;
9634
 
9635
      case E:
9636
        if (value == null) {
9637
          unsetE();
9638
        } else {
9639
          setE((PurchaseServiceException)value);
9640
        }
9641
        break;
9642
 
9643
      }
9644
    }
9645
 
9646
    public Object getFieldValue(_Fields field) {
9647
      switch (field) {
9648
      case SUCCESS:
9649
        return getSuccess();
9650
 
9651
      case E:
9652
        return getE();
9653
 
9654
      }
9655
      throw new IllegalStateException();
9656
    }
9657
 
9658
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9659
    public boolean isSet(_Fields field) {
9660
      if (field == null) {
9661
        throw new IllegalArgumentException();
9662
      }
9663
 
9664
      switch (field) {
9665
      case SUCCESS:
9666
        return isSetSuccess();
9667
      case E:
9668
        return isSetE();
9669
      }
9670
      throw new IllegalStateException();
9671
    }
9672
 
9673
    @Override
9674
    public boolean equals(Object that) {
9675
      if (that == null)
9676
        return false;
9677
      if (that instanceof getPendingPurchaseOrders_result)
9678
        return this.equals((getPendingPurchaseOrders_result)that);
9679
      return false;
9680
    }
9681
 
9682
    public boolean equals(getPendingPurchaseOrders_result that) {
9683
      if (that == null)
9684
        return false;
9685
 
9686
      boolean this_present_success = true && this.isSetSuccess();
9687
      boolean that_present_success = true && that.isSetSuccess();
9688
      if (this_present_success || that_present_success) {
9689
        if (!(this_present_success && that_present_success))
9690
          return false;
9691
        if (!this.success.equals(that.success))
9692
          return false;
9693
      }
9694
 
9695
      boolean this_present_e = true && this.isSetE();
9696
      boolean that_present_e = true && that.isSetE();
9697
      if (this_present_e || that_present_e) {
9698
        if (!(this_present_e && that_present_e))
9699
          return false;
9700
        if (!this.e.equals(that.e))
9701
          return false;
9702
      }
9703
 
9704
      return true;
9705
    }
9706
 
9707
    @Override
9708
    public int hashCode() {
9709
      return 0;
9710
    }
9711
 
9712
    public int compareTo(getPendingPurchaseOrders_result other) {
9713
      if (!getClass().equals(other.getClass())) {
9714
        return getClass().getName().compareTo(other.getClass().getName());
9715
      }
9716
 
9717
      int lastComparison = 0;
9718
      getPendingPurchaseOrders_result typedOther = (getPendingPurchaseOrders_result)other;
9719
 
9720
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9721
      if (lastComparison != 0) {
9722
        return lastComparison;
9723
      }
9724
      if (isSetSuccess()) {
9725
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9726
        if (lastComparison != 0) {
9727
          return lastComparison;
9728
        }
9729
      }
9730
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
9731
      if (lastComparison != 0) {
9732
        return lastComparison;
9733
      }
9734
      if (isSetE()) {
9735
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
9736
        if (lastComparison != 0) {
9737
          return lastComparison;
9738
        }
9739
      }
9740
      return 0;
9741
    }
9742
 
9743
    public _Fields fieldForId(int fieldId) {
9744
      return _Fields.findByThriftId(fieldId);
9745
    }
9746
 
9747
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9748
      org.apache.thrift.protocol.TField field;
9749
      iprot.readStructBegin();
9750
      while (true)
9751
      {
9752
        field = iprot.readFieldBegin();
9753
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9754
          break;
9755
        }
9756
        switch (field.id) {
9757
          case 0: // SUCCESS
9758
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
9759
              {
6385 amar.kumar 9760
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
9761
                this.success = new ArrayList<PurchaseOrder>(_list16.size);
9762
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
4754 mandeep.dh 9763
                {
6385 amar.kumar 9764
                  PurchaseOrder _elem18; // required
9765
                  _elem18 = new PurchaseOrder();
9766
                  _elem18.read(iprot);
9767
                  this.success.add(_elem18);
4754 mandeep.dh 9768
                }
9769
                iprot.readListEnd();
9770
              }
9771
            } else { 
9772
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9773
            }
9774
            break;
9775
          case 1: // E
9776
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9777
              this.e = new PurchaseServiceException();
9778
              this.e.read(iprot);
9779
            } else { 
9780
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9781
            }
9782
            break;
9783
          default:
9784
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9785
        }
9786
        iprot.readFieldEnd();
9787
      }
9788
      iprot.readStructEnd();
9789
      validate();
9790
    }
9791
 
9792
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9793
      oprot.writeStructBegin(STRUCT_DESC);
9794
 
9795
      if (this.isSetSuccess()) {
9796
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9797
        {
9798
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 9799
          for (PurchaseOrder _iter19 : this.success)
4754 mandeep.dh 9800
          {
6385 amar.kumar 9801
            _iter19.write(oprot);
4754 mandeep.dh 9802
          }
9803
          oprot.writeListEnd();
9804
        }
9805
        oprot.writeFieldEnd();
9806
      } else if (this.isSetE()) {
9807
        oprot.writeFieldBegin(E_FIELD_DESC);
9808
        this.e.write(oprot);
9809
        oprot.writeFieldEnd();
9810
      }
9811
      oprot.writeFieldStop();
9812
      oprot.writeStructEnd();
9813
    }
9814
 
9815
    @Override
9816
    public String toString() {
9817
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_result(");
9818
      boolean first = true;
9819
 
9820
      sb.append("success:");
9821
      if (this.success == null) {
9822
        sb.append("null");
9823
      } else {
9824
        sb.append(this.success);
9825
      }
9826
      first = false;
9827
      if (!first) sb.append(", ");
9828
      sb.append("e:");
9829
      if (this.e == null) {
9830
        sb.append("null");
9831
      } else {
9832
        sb.append(this.e);
9833
      }
9834
      first = false;
9835
      sb.append(")");
9836
      return sb.toString();
9837
    }
9838
 
9839
    public void validate() throws org.apache.thrift.TException {
9840
      // check for required fields
9841
    }
9842
 
9843
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9844
      try {
9845
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9846
      } catch (org.apache.thrift.TException te) {
9847
        throw new java.io.IOException(te);
9848
      }
9849
    }
9850
 
9851
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9852
      try {
9853
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9854
      } catch (org.apache.thrift.TException te) {
9855
        throw new java.io.IOException(te);
9856
      }
9857
    }
9858
 
9859
  }
9860
 
9861
  public static class getSuppliers_args implements org.apache.thrift.TBase<getSuppliers_args, getSuppliers_args._Fields>, java.io.Serializable, Cloneable   {
9862
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_args");
9863
 
9864
 
9865
 
9866
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9867
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9868
;
9869
 
9870
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9871
 
9872
      static {
9873
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9874
          byName.put(field.getFieldName(), field);
9875
        }
9876
      }
9877
 
9878
      /**
9879
       * Find the _Fields constant that matches fieldId, or null if its not found.
9880
       */
9881
      public static _Fields findByThriftId(int fieldId) {
9882
        switch(fieldId) {
9883
          default:
9884
            return null;
9885
        }
9886
      }
9887
 
9888
      /**
9889
       * Find the _Fields constant that matches fieldId, throwing an exception
9890
       * if it is not found.
9891
       */
9892
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9893
        _Fields fields = findByThriftId(fieldId);
9894
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9895
        return fields;
9896
      }
9897
 
9898
      /**
9899
       * Find the _Fields constant that matches name, or null if its not found.
9900
       */
9901
      public static _Fields findByName(String name) {
9902
        return byName.get(name);
9903
      }
9904
 
9905
      private final short _thriftId;
9906
      private final String _fieldName;
9907
 
9908
      _Fields(short thriftId, String fieldName) {
9909
        _thriftId = thriftId;
9910
        _fieldName = fieldName;
9911
      }
9912
 
9913
      public short getThriftFieldId() {
9914
        return _thriftId;
9915
      }
9916
 
9917
      public String getFieldName() {
9918
        return _fieldName;
9919
      }
9920
    }
9921
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9922
    static {
9923
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9924
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9925
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_args.class, metaDataMap);
9926
    }
9927
 
9928
    public getSuppliers_args() {
9929
    }
9930
 
9931
    /**
9932
     * Performs a deep copy on <i>other</i>.
9933
     */
9934
    public getSuppliers_args(getSuppliers_args other) {
9935
    }
9936
 
9937
    public getSuppliers_args deepCopy() {
9938
      return new getSuppliers_args(this);
9939
    }
9940
 
9941
    @Override
9942
    public void clear() {
9943
    }
9944
 
9945
    public void setFieldValue(_Fields field, Object value) {
9946
      switch (field) {
9947
      }
9948
    }
9949
 
9950
    public Object getFieldValue(_Fields field) {
9951
      switch (field) {
9952
      }
9953
      throw new IllegalStateException();
9954
    }
9955
 
9956
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9957
    public boolean isSet(_Fields field) {
9958
      if (field == null) {
9959
        throw new IllegalArgumentException();
9960
      }
9961
 
9962
      switch (field) {
9963
      }
9964
      throw new IllegalStateException();
9965
    }
9966
 
9967
    @Override
9968
    public boolean equals(Object that) {
9969
      if (that == null)
9970
        return false;
9971
      if (that instanceof getSuppliers_args)
9972
        return this.equals((getSuppliers_args)that);
9973
      return false;
9974
    }
9975
 
9976
    public boolean equals(getSuppliers_args that) {
9977
      if (that == null)
9978
        return false;
9979
 
9980
      return true;
9981
    }
9982
 
9983
    @Override
9984
    public int hashCode() {
9985
      return 0;
9986
    }
9987
 
9988
    public int compareTo(getSuppliers_args other) {
9989
      if (!getClass().equals(other.getClass())) {
9990
        return getClass().getName().compareTo(other.getClass().getName());
9991
      }
9992
 
9993
      int lastComparison = 0;
9994
      getSuppliers_args typedOther = (getSuppliers_args)other;
9995
 
9996
      return 0;
9997
    }
9998
 
9999
    public _Fields fieldForId(int fieldId) {
10000
      return _Fields.findByThriftId(fieldId);
10001
    }
10002
 
10003
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10004
      org.apache.thrift.protocol.TField field;
10005
      iprot.readStructBegin();
10006
      while (true)
10007
      {
10008
        field = iprot.readFieldBegin();
10009
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10010
          break;
10011
        }
10012
        switch (field.id) {
10013
          default:
10014
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10015
        }
10016
        iprot.readFieldEnd();
10017
      }
10018
      iprot.readStructEnd();
10019
      validate();
10020
    }
10021
 
10022
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10023
      validate();
10024
 
10025
      oprot.writeStructBegin(STRUCT_DESC);
10026
      oprot.writeFieldStop();
10027
      oprot.writeStructEnd();
10028
    }
10029
 
10030
    @Override
10031
    public String toString() {
10032
      StringBuilder sb = new StringBuilder("getSuppliers_args(");
10033
      boolean first = true;
10034
 
10035
      sb.append(")");
10036
      return sb.toString();
10037
    }
10038
 
10039
    public void validate() throws org.apache.thrift.TException {
10040
      // check for required fields
10041
    }
10042
 
10043
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10044
      try {
10045
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10046
      } catch (org.apache.thrift.TException te) {
10047
        throw new java.io.IOException(te);
10048
      }
10049
    }
10050
 
10051
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10052
      try {
10053
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10054
      } catch (org.apache.thrift.TException te) {
10055
        throw new java.io.IOException(te);
10056
      }
10057
    }
10058
 
10059
  }
10060
 
10061
  public static class getSuppliers_result implements org.apache.thrift.TBase<getSuppliers_result, getSuppliers_result._Fields>, java.io.Serializable, Cloneable   {
10062
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_result");
10063
 
10064
    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);
10065
    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);
10066
 
10067
    private List<Supplier> success; // required
10068
    private PurchaseServiceException e; // required
10069
 
10070
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10071
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10072
      SUCCESS((short)0, "success"),
10073
      E((short)1, "e");
10074
 
10075
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10076
 
10077
      static {
10078
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10079
          byName.put(field.getFieldName(), field);
10080
        }
10081
      }
10082
 
10083
      /**
10084
       * Find the _Fields constant that matches fieldId, or null if its not found.
10085
       */
10086
      public static _Fields findByThriftId(int fieldId) {
10087
        switch(fieldId) {
10088
          case 0: // SUCCESS
10089
            return SUCCESS;
10090
          case 1: // E
10091
            return E;
10092
          default:
10093
            return null;
10094
        }
10095
      }
10096
 
10097
      /**
10098
       * Find the _Fields constant that matches fieldId, throwing an exception
10099
       * if it is not found.
10100
       */
10101
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10102
        _Fields fields = findByThriftId(fieldId);
10103
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10104
        return fields;
10105
      }
10106
 
10107
      /**
10108
       * Find the _Fields constant that matches name, or null if its not found.
10109
       */
10110
      public static _Fields findByName(String name) {
10111
        return byName.get(name);
10112
      }
10113
 
10114
      private final short _thriftId;
10115
      private final String _fieldName;
10116
 
10117
      _Fields(short thriftId, String fieldName) {
10118
        _thriftId = thriftId;
10119
        _fieldName = fieldName;
10120
      }
10121
 
10122
      public short getThriftFieldId() {
10123
        return _thriftId;
10124
      }
10125
 
10126
      public String getFieldName() {
10127
        return _fieldName;
10128
      }
10129
    }
10130
 
10131
    // isset id assignments
10132
 
10133
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10134
    static {
10135
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10136
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10137
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
10138
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class))));
10139
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10140
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
10141
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10142
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_result.class, metaDataMap);
10143
    }
10144
 
10145
    public getSuppliers_result() {
10146
    }
10147
 
10148
    public getSuppliers_result(
10149
      List<Supplier> success,
10150
      PurchaseServiceException e)
10151
    {
10152
      this();
10153
      this.success = success;
10154
      this.e = e;
10155
    }
10156
 
10157
    /**
10158
     * Performs a deep copy on <i>other</i>.
10159
     */
10160
    public getSuppliers_result(getSuppliers_result other) {
10161
      if (other.isSetSuccess()) {
10162
        List<Supplier> __this__success = new ArrayList<Supplier>();
10163
        for (Supplier other_element : other.success) {
10164
          __this__success.add(new Supplier(other_element));
10165
        }
10166
        this.success = __this__success;
10167
      }
10168
      if (other.isSetE()) {
10169
        this.e = new PurchaseServiceException(other.e);
10170
      }
10171
    }
10172
 
10173
    public getSuppliers_result deepCopy() {
10174
      return new getSuppliers_result(this);
10175
    }
10176
 
10177
    @Override
10178
    public void clear() {
10179
      this.success = null;
10180
      this.e = null;
10181
    }
10182
 
10183
    public int getSuccessSize() {
10184
      return (this.success == null) ? 0 : this.success.size();
10185
    }
10186
 
10187
    public java.util.Iterator<Supplier> getSuccessIterator() {
10188
      return (this.success == null) ? null : this.success.iterator();
10189
    }
10190
 
10191
    public void addToSuccess(Supplier elem) {
10192
      if (this.success == null) {
10193
        this.success = new ArrayList<Supplier>();
10194
      }
10195
      this.success.add(elem);
10196
    }
10197
 
10198
    public List<Supplier> getSuccess() {
10199
      return this.success;
10200
    }
10201
 
10202
    public void setSuccess(List<Supplier> success) {
10203
      this.success = success;
10204
    }
10205
 
10206
    public void unsetSuccess() {
10207
      this.success = null;
10208
    }
10209
 
10210
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
10211
    public boolean isSetSuccess() {
10212
      return this.success != null;
10213
    }
10214
 
10215
    public void setSuccessIsSet(boolean value) {
10216
      if (!value) {
10217
        this.success = null;
10218
      }
10219
    }
10220
 
10221
    public PurchaseServiceException getE() {
10222
      return this.e;
10223
    }
10224
 
10225
    public void setE(PurchaseServiceException e) {
10226
      this.e = e;
10227
    }
10228
 
10229
    public void unsetE() {
10230
      this.e = null;
10231
    }
10232
 
10233
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
10234
    public boolean isSetE() {
10235
      return this.e != null;
10236
    }
10237
 
10238
    public void setEIsSet(boolean value) {
10239
      if (!value) {
10240
        this.e = null;
10241
      }
10242
    }
10243
 
10244
    public void setFieldValue(_Fields field, Object value) {
10245
      switch (field) {
10246
      case SUCCESS:
10247
        if (value == null) {
10248
          unsetSuccess();
10249
        } else {
10250
          setSuccess((List<Supplier>)value);
10251
        }
10252
        break;
10253
 
10254
      case E:
10255
        if (value == null) {
10256
          unsetE();
10257
        } else {
10258
          setE((PurchaseServiceException)value);
10259
        }
10260
        break;
10261
 
10262
      }
10263
    }
10264
 
10265
    public Object getFieldValue(_Fields field) {
10266
      switch (field) {
10267
      case SUCCESS:
10268
        return getSuccess();
10269
 
10270
      case E:
10271
        return getE();
10272
 
10273
      }
10274
      throw new IllegalStateException();
10275
    }
10276
 
10277
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10278
    public boolean isSet(_Fields field) {
10279
      if (field == null) {
10280
        throw new IllegalArgumentException();
10281
      }
10282
 
10283
      switch (field) {
10284
      case SUCCESS:
10285
        return isSetSuccess();
10286
      case E:
10287
        return isSetE();
10288
      }
10289
      throw new IllegalStateException();
10290
    }
10291
 
10292
    @Override
10293
    public boolean equals(Object that) {
10294
      if (that == null)
10295
        return false;
10296
      if (that instanceof getSuppliers_result)
10297
        return this.equals((getSuppliers_result)that);
10298
      return false;
10299
    }
10300
 
10301
    public boolean equals(getSuppliers_result that) {
10302
      if (that == null)
10303
        return false;
10304
 
10305
      boolean this_present_success = true && this.isSetSuccess();
10306
      boolean that_present_success = true && that.isSetSuccess();
10307
      if (this_present_success || that_present_success) {
10308
        if (!(this_present_success && that_present_success))
10309
          return false;
10310
        if (!this.success.equals(that.success))
10311
          return false;
10312
      }
10313
 
10314
      boolean this_present_e = true && this.isSetE();
10315
      boolean that_present_e = true && that.isSetE();
10316
      if (this_present_e || that_present_e) {
10317
        if (!(this_present_e && that_present_e))
10318
          return false;
10319
        if (!this.e.equals(that.e))
10320
          return false;
10321
      }
10322
 
10323
      return true;
10324
    }
10325
 
10326
    @Override
10327
    public int hashCode() {
10328
      return 0;
10329
    }
10330
 
10331
    public int compareTo(getSuppliers_result other) {
10332
      if (!getClass().equals(other.getClass())) {
10333
        return getClass().getName().compareTo(other.getClass().getName());
10334
      }
10335
 
10336
      int lastComparison = 0;
10337
      getSuppliers_result typedOther = (getSuppliers_result)other;
10338
 
10339
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
10340
      if (lastComparison != 0) {
10341
        return lastComparison;
10342
      }
10343
      if (isSetSuccess()) {
10344
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
10345
        if (lastComparison != 0) {
10346
          return lastComparison;
10347
        }
10348
      }
10349
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
10350
      if (lastComparison != 0) {
10351
        return lastComparison;
10352
      }
10353
      if (isSetE()) {
10354
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
10355
        if (lastComparison != 0) {
10356
          return lastComparison;
10357
        }
10358
      }
10359
      return 0;
10360
    }
10361
 
10362
    public _Fields fieldForId(int fieldId) {
10363
      return _Fields.findByThriftId(fieldId);
10364
    }
10365
 
10366
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10367
      org.apache.thrift.protocol.TField field;
10368
      iprot.readStructBegin();
10369
      while (true)
10370
      {
10371
        field = iprot.readFieldBegin();
10372
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10373
          break;
10374
        }
10375
        switch (field.id) {
10376
          case 0: // SUCCESS
10377
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
10378
              {
6385 amar.kumar 10379
                org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
10380
                this.success = new ArrayList<Supplier>(_list20.size);
10381
                for (int _i21 = 0; _i21 < _list20.size; ++_i21)
4754 mandeep.dh 10382
                {
6385 amar.kumar 10383
                  Supplier _elem22; // required
10384
                  _elem22 = new Supplier();
10385
                  _elem22.read(iprot);
10386
                  this.success.add(_elem22);
4754 mandeep.dh 10387
                }
10388
                iprot.readListEnd();
10389
              }
10390
            } else { 
10391
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10392
            }
10393
            break;
10394
          case 1: // E
10395
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10396
              this.e = new PurchaseServiceException();
10397
              this.e.read(iprot);
10398
            } else { 
10399
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10400
            }
10401
            break;
10402
          default:
10403
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10404
        }
10405
        iprot.readFieldEnd();
10406
      }
10407
      iprot.readStructEnd();
10408
      validate();
10409
    }
10410
 
10411
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10412
      oprot.writeStructBegin(STRUCT_DESC);
10413
 
10414
      if (this.isSetSuccess()) {
10415
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10416
        {
10417
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 10418
          for (Supplier _iter23 : this.success)
4754 mandeep.dh 10419
          {
6385 amar.kumar 10420
            _iter23.write(oprot);
4754 mandeep.dh 10421
          }
10422
          oprot.writeListEnd();
10423
        }
10424
        oprot.writeFieldEnd();
10425
      } else if (this.isSetE()) {
10426
        oprot.writeFieldBegin(E_FIELD_DESC);
10427
        this.e.write(oprot);
10428
        oprot.writeFieldEnd();
10429
      }
10430
      oprot.writeFieldStop();
10431
      oprot.writeStructEnd();
10432
    }
10433
 
10434
    @Override
10435
    public String toString() {
10436
      StringBuilder sb = new StringBuilder("getSuppliers_result(");
10437
      boolean first = true;
10438
 
10439
      sb.append("success:");
10440
      if (this.success == null) {
10441
        sb.append("null");
10442
      } else {
10443
        sb.append(this.success);
10444
      }
10445
      first = false;
10446
      if (!first) sb.append(", ");
10447
      sb.append("e:");
10448
      if (this.e == null) {
10449
        sb.append("null");
10450
      } else {
10451
        sb.append(this.e);
10452
      }
10453
      first = false;
10454
      sb.append(")");
10455
      return sb.toString();
10456
    }
10457
 
10458
    public void validate() throws org.apache.thrift.TException {
10459
      // check for required fields
10460
    }
10461
 
10462
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10463
      try {
10464
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10465
      } catch (org.apache.thrift.TException te) {
10466
        throw new java.io.IOException(te);
10467
      }
10468
    }
10469
 
10470
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10471
      try {
10472
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10473
      } catch (org.apache.thrift.TException te) {
10474
        throw new java.io.IOException(te);
10475
      }
10476
    }
10477
 
10478
  }
10479
 
10480
  public static class fulfillPO_args implements org.apache.thrift.TBase<fulfillPO_args, fulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
10481
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_args");
10482
 
10483
    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);
10484
    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);
10485
    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);
10486
 
10487
    private long purchaseOrderId; // required
10488
    private long itemId; // required
10489
    private long quantity; // required
10490
 
10491
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10492
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10493
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
10494
      ITEM_ID((short)2, "itemId"),
10495
      QUANTITY((short)3, "quantity");
10496
 
10497
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10498
 
10499
      static {
10500
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10501
          byName.put(field.getFieldName(), field);
10502
        }
10503
      }
10504
 
10505
      /**
10506
       * Find the _Fields constant that matches fieldId, or null if its not found.
10507
       */
10508
      public static _Fields findByThriftId(int fieldId) {
10509
        switch(fieldId) {
10510
          case 1: // PURCHASE_ORDER_ID
10511
            return PURCHASE_ORDER_ID;
10512
          case 2: // ITEM_ID
10513
            return ITEM_ID;
10514
          case 3: // QUANTITY
10515
            return QUANTITY;
10516
          default:
10517
            return null;
10518
        }
10519
      }
10520
 
10521
      /**
10522
       * Find the _Fields constant that matches fieldId, throwing an exception
10523
       * if it is not found.
10524
       */
10525
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10526
        _Fields fields = findByThriftId(fieldId);
10527
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10528
        return fields;
10529
      }
10530
 
10531
      /**
10532
       * Find the _Fields constant that matches name, or null if its not found.
10533
       */
10534
      public static _Fields findByName(String name) {
10535
        return byName.get(name);
10536
      }
10537
 
10538
      private final short _thriftId;
10539
      private final String _fieldName;
10540
 
10541
      _Fields(short thriftId, String fieldName) {
10542
        _thriftId = thriftId;
10543
        _fieldName = fieldName;
10544
      }
10545
 
10546
      public short getThriftFieldId() {
10547
        return _thriftId;
10548
      }
10549
 
10550
      public String getFieldName() {
10551
        return _fieldName;
10552
      }
10553
    }
10554
 
10555
    // isset id assignments
10556
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
10557
    private static final int __ITEMID_ISSET_ID = 1;
10558
    private static final int __QUANTITY_ISSET_ID = 2;
10559
    private BitSet __isset_bit_vector = new BitSet(3);
10560
 
10561
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10562
    static {
10563
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10564
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10565
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10566
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10567
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10568
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10569
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10570
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10571
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_args.class, metaDataMap);
10572
    }
10573
 
10574
    public fulfillPO_args() {
10575
    }
10576
 
10577
    public fulfillPO_args(
10578
      long purchaseOrderId,
10579
      long itemId,
10580
      long quantity)
10581
    {
10582
      this();
10583
      this.purchaseOrderId = purchaseOrderId;
10584
      setPurchaseOrderIdIsSet(true);
10585
      this.itemId = itemId;
10586
      setItemIdIsSet(true);
10587
      this.quantity = quantity;
10588
      setQuantityIsSet(true);
10589
    }
10590
 
10591
    /**
10592
     * Performs a deep copy on <i>other</i>.
10593
     */
10594
    public fulfillPO_args(fulfillPO_args other) {
10595
      __isset_bit_vector.clear();
10596
      __isset_bit_vector.or(other.__isset_bit_vector);
10597
      this.purchaseOrderId = other.purchaseOrderId;
10598
      this.itemId = other.itemId;
10599
      this.quantity = other.quantity;
10600
    }
10601
 
10602
    public fulfillPO_args deepCopy() {
10603
      return new fulfillPO_args(this);
10604
    }
10605
 
10606
    @Override
10607
    public void clear() {
10608
      setPurchaseOrderIdIsSet(false);
10609
      this.purchaseOrderId = 0;
10610
      setItemIdIsSet(false);
10611
      this.itemId = 0;
10612
      setQuantityIsSet(false);
10613
      this.quantity = 0;
10614
    }
10615
 
10616
    public long getPurchaseOrderId() {
10617
      return this.purchaseOrderId;
10618
    }
10619
 
10620
    public void setPurchaseOrderId(long purchaseOrderId) {
10621
      this.purchaseOrderId = purchaseOrderId;
10622
      setPurchaseOrderIdIsSet(true);
10623
    }
10624
 
10625
    public void unsetPurchaseOrderId() {
10626
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
10627
    }
10628
 
10629
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
10630
    public boolean isSetPurchaseOrderId() {
10631
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
10632
    }
10633
 
10634
    public void setPurchaseOrderIdIsSet(boolean value) {
10635
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
10636
    }
10637
 
10638
    public long getItemId() {
10639
      return this.itemId;
10640
    }
10641
 
10642
    public void setItemId(long itemId) {
10643
      this.itemId = itemId;
10644
      setItemIdIsSet(true);
10645
    }
10646
 
10647
    public void unsetItemId() {
10648
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
10649
    }
10650
 
10651
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
10652
    public boolean isSetItemId() {
10653
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
10654
    }
10655
 
10656
    public void setItemIdIsSet(boolean value) {
10657
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
10658
    }
10659
 
10660
    public long getQuantity() {
10661
      return this.quantity;
10662
    }
10663
 
10664
    public void setQuantity(long quantity) {
10665
      this.quantity = quantity;
10666
      setQuantityIsSet(true);
10667
    }
10668
 
10669
    public void unsetQuantity() {
10670
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
10671
    }
10672
 
10673
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
10674
    public boolean isSetQuantity() {
10675
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
10676
    }
10677
 
10678
    public void setQuantityIsSet(boolean value) {
10679
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
10680
    }
10681
 
10682
    public void setFieldValue(_Fields field, Object value) {
10683
      switch (field) {
10684
      case PURCHASE_ORDER_ID:
10685
        if (value == null) {
10686
          unsetPurchaseOrderId();
10687
        } else {
10688
          setPurchaseOrderId((Long)value);
10689
        }
10690
        break;
10691
 
10692
      case ITEM_ID:
10693
        if (value == null) {
10694
          unsetItemId();
10695
        } else {
10696
          setItemId((Long)value);
10697
        }
10698
        break;
10699
 
10700
      case QUANTITY:
10701
        if (value == null) {
10702
          unsetQuantity();
10703
        } else {
10704
          setQuantity((Long)value);
10705
        }
10706
        break;
10707
 
10708
      }
10709
    }
10710
 
10711
    public Object getFieldValue(_Fields field) {
10712
      switch (field) {
10713
      case PURCHASE_ORDER_ID:
10714
        return Long.valueOf(getPurchaseOrderId());
10715
 
10716
      case ITEM_ID:
10717
        return Long.valueOf(getItemId());
10718
 
10719
      case QUANTITY:
10720
        return Long.valueOf(getQuantity());
10721
 
10722
      }
10723
      throw new IllegalStateException();
10724
    }
10725
 
10726
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10727
    public boolean isSet(_Fields field) {
10728
      if (field == null) {
10729
        throw new IllegalArgumentException();
10730
      }
10731
 
10732
      switch (field) {
10733
      case PURCHASE_ORDER_ID:
10734
        return isSetPurchaseOrderId();
10735
      case ITEM_ID:
10736
        return isSetItemId();
10737
      case QUANTITY:
10738
        return isSetQuantity();
10739
      }
10740
      throw new IllegalStateException();
10741
    }
10742
 
10743
    @Override
10744
    public boolean equals(Object that) {
10745
      if (that == null)
10746
        return false;
10747
      if (that instanceof fulfillPO_args)
10748
        return this.equals((fulfillPO_args)that);
10749
      return false;
10750
    }
10751
 
10752
    public boolean equals(fulfillPO_args that) {
10753
      if (that == null)
10754
        return false;
10755
 
10756
      boolean this_present_purchaseOrderId = true;
10757
      boolean that_present_purchaseOrderId = true;
10758
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
10759
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
10760
          return false;
10761
        if (this.purchaseOrderId != that.purchaseOrderId)
10762
          return false;
10763
      }
10764
 
10765
      boolean this_present_itemId = true;
10766
      boolean that_present_itemId = true;
10767
      if (this_present_itemId || that_present_itemId) {
10768
        if (!(this_present_itemId && that_present_itemId))
10769
          return false;
10770
        if (this.itemId != that.itemId)
10771
          return false;
10772
      }
10773
 
10774
      boolean this_present_quantity = true;
10775
      boolean that_present_quantity = true;
10776
      if (this_present_quantity || that_present_quantity) {
10777
        if (!(this_present_quantity && that_present_quantity))
10778
          return false;
10779
        if (this.quantity != that.quantity)
10780
          return false;
10781
      }
10782
 
10783
      return true;
10784
    }
10785
 
10786
    @Override
10787
    public int hashCode() {
10788
      return 0;
10789
    }
10790
 
10791
    public int compareTo(fulfillPO_args other) {
10792
      if (!getClass().equals(other.getClass())) {
10793
        return getClass().getName().compareTo(other.getClass().getName());
10794
      }
10795
 
10796
      int lastComparison = 0;
10797
      fulfillPO_args typedOther = (fulfillPO_args)other;
10798
 
10799
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
10800
      if (lastComparison != 0) {
10801
        return lastComparison;
10802
      }
10803
      if (isSetPurchaseOrderId()) {
10804
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
10805
        if (lastComparison != 0) {
10806
          return lastComparison;
10807
        }
10808
      }
10809
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
10810
      if (lastComparison != 0) {
10811
        return lastComparison;
10812
      }
10813
      if (isSetItemId()) {
10814
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
10815
        if (lastComparison != 0) {
10816
          return lastComparison;
10817
        }
10818
      }
10819
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
10820
      if (lastComparison != 0) {
10821
        return lastComparison;
10822
      }
10823
      if (isSetQuantity()) {
10824
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
10825
        if (lastComparison != 0) {
10826
          return lastComparison;
10827
        }
10828
      }
10829
      return 0;
10830
    }
10831
 
10832
    public _Fields fieldForId(int fieldId) {
10833
      return _Fields.findByThriftId(fieldId);
10834
    }
10835
 
10836
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10837
      org.apache.thrift.protocol.TField field;
10838
      iprot.readStructBegin();
10839
      while (true)
10840
      {
10841
        field = iprot.readFieldBegin();
10842
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10843
          break;
10844
        }
10845
        switch (field.id) {
10846
          case 1: // PURCHASE_ORDER_ID
10847
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10848
              this.purchaseOrderId = iprot.readI64();
10849
              setPurchaseOrderIdIsSet(true);
10850
            } else { 
10851
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10852
            }
10853
            break;
10854
          case 2: // ITEM_ID
10855
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10856
              this.itemId = iprot.readI64();
10857
              setItemIdIsSet(true);
10858
            } else { 
10859
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10860
            }
10861
            break;
10862
          case 3: // QUANTITY
10863
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10864
              this.quantity = iprot.readI64();
10865
              setQuantityIsSet(true);
10866
            } else { 
10867
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10868
            }
10869
            break;
10870
          default:
10871
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10872
        }
10873
        iprot.readFieldEnd();
10874
      }
10875
      iprot.readStructEnd();
10876
      validate();
10877
    }
10878
 
10879
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10880
      validate();
10881
 
10882
      oprot.writeStructBegin(STRUCT_DESC);
10883
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
10884
      oprot.writeI64(this.purchaseOrderId);
10885
      oprot.writeFieldEnd();
10886
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
10887
      oprot.writeI64(this.itemId);
10888
      oprot.writeFieldEnd();
10889
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
10890
      oprot.writeI64(this.quantity);
10891
      oprot.writeFieldEnd();
10892
      oprot.writeFieldStop();
10893
      oprot.writeStructEnd();
10894
    }
10895
 
10896
    @Override
10897
    public String toString() {
10898
      StringBuilder sb = new StringBuilder("fulfillPO_args(");
10899
      boolean first = true;
10900
 
10901
      sb.append("purchaseOrderId:");
10902
      sb.append(this.purchaseOrderId);
10903
      first = false;
10904
      if (!first) sb.append(", ");
10905
      sb.append("itemId:");
10906
      sb.append(this.itemId);
10907
      first = false;
10908
      if (!first) sb.append(", ");
10909
      sb.append("quantity:");
10910
      sb.append(this.quantity);
10911
      first = false;
10912
      sb.append(")");
10913
      return sb.toString();
10914
    }
10915
 
10916
    public void validate() throws org.apache.thrift.TException {
10917
      // check for required fields
10918
    }
10919
 
10920
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10921
      try {
10922
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10923
      } catch (org.apache.thrift.TException te) {
10924
        throw new java.io.IOException(te);
10925
      }
10926
    }
10927
 
10928
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10929
      try {
10930
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
10931
        __isset_bit_vector = new BitSet(1);
10932
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10933
      } catch (org.apache.thrift.TException te) {
10934
        throw new java.io.IOException(te);
10935
      }
10936
    }
10937
 
10938
  }
10939
 
10940
  public static class fulfillPO_result implements org.apache.thrift.TBase<fulfillPO_result, fulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
10941
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_result");
10942
 
10943
    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);
10944
 
10945
    private PurchaseServiceException e; // required
10946
 
10947
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10948
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10949
      E((short)1, "e");
10950
 
10951
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10952
 
10953
      static {
10954
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10955
          byName.put(field.getFieldName(), field);
10956
        }
10957
      }
10958
 
10959
      /**
10960
       * Find the _Fields constant that matches fieldId, or null if its not found.
10961
       */
10962
      public static _Fields findByThriftId(int fieldId) {
10963
        switch(fieldId) {
10964
          case 1: // E
10965
            return E;
10966
          default:
10967
            return null;
10968
        }
10969
      }
10970
 
10971
      /**
10972
       * Find the _Fields constant that matches fieldId, throwing an exception
10973
       * if it is not found.
10974
       */
10975
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10976
        _Fields fields = findByThriftId(fieldId);
10977
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10978
        return fields;
10979
      }
10980
 
10981
      /**
10982
       * Find the _Fields constant that matches name, or null if its not found.
10983
       */
10984
      public static _Fields findByName(String name) {
10985
        return byName.get(name);
10986
      }
10987
 
10988
      private final short _thriftId;
10989
      private final String _fieldName;
10990
 
10991
      _Fields(short thriftId, String fieldName) {
10992
        _thriftId = thriftId;
10993
        _fieldName = fieldName;
10994
      }
10995
 
10996
      public short getThriftFieldId() {
10997
        return _thriftId;
10998
      }
10999
 
11000
      public String getFieldName() {
11001
        return _fieldName;
11002
      }
11003
    }
11004
 
11005
    // isset id assignments
11006
 
11007
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11008
    static {
11009
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11010
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11011
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11012
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11013
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_result.class, metaDataMap);
11014
    }
11015
 
11016
    public fulfillPO_result() {
11017
    }
11018
 
11019
    public fulfillPO_result(
11020
      PurchaseServiceException e)
11021
    {
11022
      this();
11023
      this.e = e;
11024
    }
11025
 
11026
    /**
11027
     * Performs a deep copy on <i>other</i>.
11028
     */
11029
    public fulfillPO_result(fulfillPO_result other) {
11030
      if (other.isSetE()) {
11031
        this.e = new PurchaseServiceException(other.e);
11032
      }
11033
    }
11034
 
11035
    public fulfillPO_result deepCopy() {
11036
      return new fulfillPO_result(this);
11037
    }
11038
 
11039
    @Override
11040
    public void clear() {
11041
      this.e = null;
11042
    }
11043
 
11044
    public PurchaseServiceException getE() {
11045
      return this.e;
11046
    }
11047
 
11048
    public void setE(PurchaseServiceException e) {
11049
      this.e = e;
11050
    }
11051
 
11052
    public void unsetE() {
11053
      this.e = null;
11054
    }
11055
 
11056
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
11057
    public boolean isSetE() {
11058
      return this.e != null;
11059
    }
11060
 
11061
    public void setEIsSet(boolean value) {
11062
      if (!value) {
11063
        this.e = null;
11064
      }
11065
    }
11066
 
11067
    public void setFieldValue(_Fields field, Object value) {
11068
      switch (field) {
11069
      case E:
11070
        if (value == null) {
11071
          unsetE();
11072
        } else {
11073
          setE((PurchaseServiceException)value);
11074
        }
11075
        break;
11076
 
11077
      }
11078
    }
11079
 
11080
    public Object getFieldValue(_Fields field) {
11081
      switch (field) {
11082
      case E:
11083
        return getE();
11084
 
11085
      }
11086
      throw new IllegalStateException();
11087
    }
11088
 
11089
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11090
    public boolean isSet(_Fields field) {
11091
      if (field == null) {
11092
        throw new IllegalArgumentException();
11093
      }
11094
 
11095
      switch (field) {
11096
      case E:
11097
        return isSetE();
11098
      }
11099
      throw new IllegalStateException();
11100
    }
11101
 
11102
    @Override
11103
    public boolean equals(Object that) {
11104
      if (that == null)
11105
        return false;
11106
      if (that instanceof fulfillPO_result)
11107
        return this.equals((fulfillPO_result)that);
11108
      return false;
11109
    }
11110
 
11111
    public boolean equals(fulfillPO_result that) {
11112
      if (that == null)
11113
        return false;
11114
 
11115
      boolean this_present_e = true && this.isSetE();
11116
      boolean that_present_e = true && that.isSetE();
11117
      if (this_present_e || that_present_e) {
11118
        if (!(this_present_e && that_present_e))
11119
          return false;
11120
        if (!this.e.equals(that.e))
11121
          return false;
11122
      }
11123
 
11124
      return true;
11125
    }
11126
 
11127
    @Override
11128
    public int hashCode() {
11129
      return 0;
11130
    }
11131
 
11132
    public int compareTo(fulfillPO_result other) {
11133
      if (!getClass().equals(other.getClass())) {
11134
        return getClass().getName().compareTo(other.getClass().getName());
11135
      }
11136
 
11137
      int lastComparison = 0;
11138
      fulfillPO_result typedOther = (fulfillPO_result)other;
11139
 
11140
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
11141
      if (lastComparison != 0) {
11142
        return lastComparison;
11143
      }
11144
      if (isSetE()) {
11145
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
11146
        if (lastComparison != 0) {
11147
          return lastComparison;
11148
        }
11149
      }
11150
      return 0;
11151
    }
11152
 
11153
    public _Fields fieldForId(int fieldId) {
11154
      return _Fields.findByThriftId(fieldId);
11155
    }
11156
 
11157
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11158
      org.apache.thrift.protocol.TField field;
11159
      iprot.readStructBegin();
11160
      while (true)
11161
      {
11162
        field = iprot.readFieldBegin();
11163
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11164
          break;
11165
        }
11166
        switch (field.id) {
11167
          case 1: // E
11168
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11169
              this.e = new PurchaseServiceException();
11170
              this.e.read(iprot);
11171
            } else { 
11172
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11173
            }
11174
            break;
11175
          default:
11176
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11177
        }
11178
        iprot.readFieldEnd();
11179
      }
11180
      iprot.readStructEnd();
11181
      validate();
11182
    }
11183
 
11184
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11185
      oprot.writeStructBegin(STRUCT_DESC);
11186
 
11187
      if (this.isSetE()) {
11188
        oprot.writeFieldBegin(E_FIELD_DESC);
11189
        this.e.write(oprot);
11190
        oprot.writeFieldEnd();
11191
      }
11192
      oprot.writeFieldStop();
11193
      oprot.writeStructEnd();
11194
    }
11195
 
11196
    @Override
11197
    public String toString() {
11198
      StringBuilder sb = new StringBuilder("fulfillPO_result(");
11199
      boolean first = true;
11200
 
11201
      sb.append("e:");
11202
      if (this.e == null) {
11203
        sb.append("null");
11204
      } else {
11205
        sb.append(this.e);
11206
      }
11207
      first = false;
11208
      sb.append(")");
11209
      return sb.toString();
11210
    }
11211
 
11212
    public void validate() throws org.apache.thrift.TException {
11213
      // check for required fields
11214
    }
11215
 
11216
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11217
      try {
11218
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11219
      } catch (org.apache.thrift.TException te) {
11220
        throw new java.io.IOException(te);
11221
      }
11222
    }
11223
 
11224
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11225
      try {
11226
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11227
      } catch (org.apache.thrift.TException te) {
11228
        throw new java.io.IOException(te);
11229
      }
11230
    }
11231
 
11232
  }
11233
 
11234
  public static class updatePurchaseOrder_args implements org.apache.thrift.TBase<updatePurchaseOrder_args, updatePurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
11235
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_args");
11236
 
11237
    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);
11238
 
11239
    private PurchaseOrder purchaseOrder; // required
11240
 
11241
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11242
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11243
      PURCHASE_ORDER((short)1, "purchaseOrder");
11244
 
11245
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11246
 
11247
      static {
11248
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11249
          byName.put(field.getFieldName(), field);
11250
        }
11251
      }
11252
 
11253
      /**
11254
       * Find the _Fields constant that matches fieldId, or null if its not found.
11255
       */
11256
      public static _Fields findByThriftId(int fieldId) {
11257
        switch(fieldId) {
11258
          case 1: // PURCHASE_ORDER
11259
            return PURCHASE_ORDER;
11260
          default:
11261
            return null;
11262
        }
11263
      }
11264
 
11265
      /**
11266
       * Find the _Fields constant that matches fieldId, throwing an exception
11267
       * if it is not found.
11268
       */
11269
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11270
        _Fields fields = findByThriftId(fieldId);
11271
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11272
        return fields;
11273
      }
11274
 
11275
      /**
11276
       * Find the _Fields constant that matches name, or null if its not found.
11277
       */
11278
      public static _Fields findByName(String name) {
11279
        return byName.get(name);
11280
      }
11281
 
11282
      private final short _thriftId;
11283
      private final String _fieldName;
11284
 
11285
      _Fields(short thriftId, String fieldName) {
11286
        _thriftId = thriftId;
11287
        _fieldName = fieldName;
11288
      }
11289
 
11290
      public short getThriftFieldId() {
11291
        return _thriftId;
11292
      }
11293
 
11294
      public String getFieldName() {
11295
        return _fieldName;
11296
      }
11297
    }
11298
 
11299
    // isset id assignments
11300
 
11301
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11302
    static {
11303
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11304
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11305
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
11306
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11307
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_args.class, metaDataMap);
11308
    }
11309
 
11310
    public updatePurchaseOrder_args() {
11311
    }
11312
 
11313
    public updatePurchaseOrder_args(
11314
      PurchaseOrder purchaseOrder)
11315
    {
11316
      this();
11317
      this.purchaseOrder = purchaseOrder;
11318
    }
11319
 
11320
    /**
11321
     * Performs a deep copy on <i>other</i>.
11322
     */
11323
    public updatePurchaseOrder_args(updatePurchaseOrder_args other) {
11324
      if (other.isSetPurchaseOrder()) {
11325
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
11326
      }
11327
    }
11328
 
11329
    public updatePurchaseOrder_args deepCopy() {
11330
      return new updatePurchaseOrder_args(this);
11331
    }
11332
 
11333
    @Override
11334
    public void clear() {
11335
      this.purchaseOrder = null;
11336
    }
11337
 
11338
    public PurchaseOrder getPurchaseOrder() {
11339
      return this.purchaseOrder;
11340
    }
11341
 
11342
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
11343
      this.purchaseOrder = purchaseOrder;
11344
    }
11345
 
11346
    public void unsetPurchaseOrder() {
11347
      this.purchaseOrder = null;
11348
    }
11349
 
11350
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
11351
    public boolean isSetPurchaseOrder() {
11352
      return this.purchaseOrder != null;
11353
    }
11354
 
11355
    public void setPurchaseOrderIsSet(boolean value) {
11356
      if (!value) {
11357
        this.purchaseOrder = null;
11358
      }
11359
    }
11360
 
11361
    public void setFieldValue(_Fields field, Object value) {
11362
      switch (field) {
11363
      case PURCHASE_ORDER:
11364
        if (value == null) {
11365
          unsetPurchaseOrder();
11366
        } else {
11367
          setPurchaseOrder((PurchaseOrder)value);
11368
        }
11369
        break;
11370
 
11371
      }
11372
    }
11373
 
11374
    public Object getFieldValue(_Fields field) {
11375
      switch (field) {
11376
      case PURCHASE_ORDER:
11377
        return getPurchaseOrder();
11378
 
11379
      }
11380
      throw new IllegalStateException();
11381
    }
11382
 
11383
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11384
    public boolean isSet(_Fields field) {
11385
      if (field == null) {
11386
        throw new IllegalArgumentException();
11387
      }
11388
 
11389
      switch (field) {
11390
      case PURCHASE_ORDER:
11391
        return isSetPurchaseOrder();
11392
      }
11393
      throw new IllegalStateException();
11394
    }
11395
 
11396
    @Override
11397
    public boolean equals(Object that) {
11398
      if (that == null)
11399
        return false;
11400
      if (that instanceof updatePurchaseOrder_args)
11401
        return this.equals((updatePurchaseOrder_args)that);
11402
      return false;
11403
    }
11404
 
11405
    public boolean equals(updatePurchaseOrder_args that) {
11406
      if (that == null)
11407
        return false;
11408
 
11409
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
11410
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
11411
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
11412
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
11413
          return false;
11414
        if (!this.purchaseOrder.equals(that.purchaseOrder))
11415
          return false;
11416
      }
11417
 
11418
      return true;
11419
    }
11420
 
11421
    @Override
11422
    public int hashCode() {
11423
      return 0;
11424
    }
11425
 
11426
    public int compareTo(updatePurchaseOrder_args other) {
11427
      if (!getClass().equals(other.getClass())) {
11428
        return getClass().getName().compareTo(other.getClass().getName());
11429
      }
11430
 
11431
      int lastComparison = 0;
11432
      updatePurchaseOrder_args typedOther = (updatePurchaseOrder_args)other;
11433
 
11434
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
11435
      if (lastComparison != 0) {
11436
        return lastComparison;
11437
      }
11438
      if (isSetPurchaseOrder()) {
11439
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
11440
        if (lastComparison != 0) {
11441
          return lastComparison;
11442
        }
11443
      }
11444
      return 0;
11445
    }
11446
 
11447
    public _Fields fieldForId(int fieldId) {
11448
      return _Fields.findByThriftId(fieldId);
11449
    }
11450
 
11451
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11452
      org.apache.thrift.protocol.TField field;
11453
      iprot.readStructBegin();
11454
      while (true)
11455
      {
11456
        field = iprot.readFieldBegin();
11457
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11458
          break;
11459
        }
11460
        switch (field.id) {
11461
          case 1: // PURCHASE_ORDER
11462
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11463
              this.purchaseOrder = new PurchaseOrder();
11464
              this.purchaseOrder.read(iprot);
11465
            } else { 
11466
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11467
            }
11468
            break;
11469
          default:
11470
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11471
        }
11472
        iprot.readFieldEnd();
11473
      }
11474
      iprot.readStructEnd();
11475
      validate();
11476
    }
11477
 
11478
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11479
      validate();
11480
 
11481
      oprot.writeStructBegin(STRUCT_DESC);
11482
      if (this.purchaseOrder != null) {
11483
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
11484
        this.purchaseOrder.write(oprot);
11485
        oprot.writeFieldEnd();
11486
      }
11487
      oprot.writeFieldStop();
11488
      oprot.writeStructEnd();
11489
    }
11490
 
11491
    @Override
11492
    public String toString() {
11493
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_args(");
11494
      boolean first = true;
11495
 
11496
      sb.append("purchaseOrder:");
11497
      if (this.purchaseOrder == null) {
11498
        sb.append("null");
11499
      } else {
11500
        sb.append(this.purchaseOrder);
11501
      }
11502
      first = false;
11503
      sb.append(")");
11504
      return sb.toString();
11505
    }
11506
 
11507
    public void validate() throws org.apache.thrift.TException {
11508
      // check for required fields
11509
    }
11510
 
11511
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11512
      try {
11513
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11514
      } catch (org.apache.thrift.TException te) {
11515
        throw new java.io.IOException(te);
11516
      }
11517
    }
11518
 
11519
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11520
      try {
11521
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11522
      } catch (org.apache.thrift.TException te) {
11523
        throw new java.io.IOException(te);
11524
      }
11525
    }
11526
 
11527
  }
11528
 
11529
  public static class updatePurchaseOrder_result implements org.apache.thrift.TBase<updatePurchaseOrder_result, updatePurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
11530
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_result");
11531
 
11532
    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);
11533
 
11534
    private PurchaseServiceException e; // required
11535
 
11536
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11537
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11538
      E((short)1, "e");
11539
 
11540
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11541
 
11542
      static {
11543
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11544
          byName.put(field.getFieldName(), field);
11545
        }
11546
      }
11547
 
11548
      /**
11549
       * Find the _Fields constant that matches fieldId, or null if its not found.
11550
       */
11551
      public static _Fields findByThriftId(int fieldId) {
11552
        switch(fieldId) {
11553
          case 1: // E
11554
            return E;
11555
          default:
11556
            return null;
11557
        }
11558
      }
11559
 
11560
      /**
11561
       * Find the _Fields constant that matches fieldId, throwing an exception
11562
       * if it is not found.
11563
       */
11564
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11565
        _Fields fields = findByThriftId(fieldId);
11566
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11567
        return fields;
11568
      }
11569
 
11570
      /**
11571
       * Find the _Fields constant that matches name, or null if its not found.
11572
       */
11573
      public static _Fields findByName(String name) {
11574
        return byName.get(name);
11575
      }
11576
 
11577
      private final short _thriftId;
11578
      private final String _fieldName;
11579
 
11580
      _Fields(short thriftId, String fieldName) {
11581
        _thriftId = thriftId;
11582
        _fieldName = fieldName;
11583
      }
11584
 
11585
      public short getThriftFieldId() {
11586
        return _thriftId;
11587
      }
11588
 
11589
      public String getFieldName() {
11590
        return _fieldName;
11591
      }
11592
    }
11593
 
11594
    // isset id assignments
11595
 
11596
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11597
    static {
11598
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11599
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11600
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11601
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11602
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_result.class, metaDataMap);
11603
    }
11604
 
11605
    public updatePurchaseOrder_result() {
11606
    }
11607
 
11608
    public updatePurchaseOrder_result(
11609
      PurchaseServiceException e)
11610
    {
11611
      this();
11612
      this.e = e;
11613
    }
11614
 
11615
    /**
11616
     * Performs a deep copy on <i>other</i>.
11617
     */
11618
    public updatePurchaseOrder_result(updatePurchaseOrder_result other) {
11619
      if (other.isSetE()) {
11620
        this.e = new PurchaseServiceException(other.e);
11621
      }
11622
    }
11623
 
11624
    public updatePurchaseOrder_result deepCopy() {
11625
      return new updatePurchaseOrder_result(this);
11626
    }
11627
 
11628
    @Override
11629
    public void clear() {
11630
      this.e = null;
11631
    }
11632
 
11633
    public PurchaseServiceException getE() {
11634
      return this.e;
11635
    }
11636
 
11637
    public void setE(PurchaseServiceException e) {
11638
      this.e = e;
11639
    }
11640
 
11641
    public void unsetE() {
11642
      this.e = null;
11643
    }
11644
 
11645
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
11646
    public boolean isSetE() {
11647
      return this.e != null;
11648
    }
11649
 
11650
    public void setEIsSet(boolean value) {
11651
      if (!value) {
11652
        this.e = null;
11653
      }
11654
    }
11655
 
11656
    public void setFieldValue(_Fields field, Object value) {
11657
      switch (field) {
11658
      case E:
11659
        if (value == null) {
11660
          unsetE();
11661
        } else {
11662
          setE((PurchaseServiceException)value);
11663
        }
11664
        break;
11665
 
11666
      }
11667
    }
11668
 
11669
    public Object getFieldValue(_Fields field) {
11670
      switch (field) {
11671
      case E:
11672
        return getE();
11673
 
11674
      }
11675
      throw new IllegalStateException();
11676
    }
11677
 
11678
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11679
    public boolean isSet(_Fields field) {
11680
      if (field == null) {
11681
        throw new IllegalArgumentException();
11682
      }
11683
 
11684
      switch (field) {
11685
      case E:
11686
        return isSetE();
11687
      }
11688
      throw new IllegalStateException();
11689
    }
11690
 
11691
    @Override
11692
    public boolean equals(Object that) {
11693
      if (that == null)
11694
        return false;
11695
      if (that instanceof updatePurchaseOrder_result)
11696
        return this.equals((updatePurchaseOrder_result)that);
11697
      return false;
11698
    }
11699
 
11700
    public boolean equals(updatePurchaseOrder_result that) {
11701
      if (that == null)
11702
        return false;
11703
 
11704
      boolean this_present_e = true && this.isSetE();
11705
      boolean that_present_e = true && that.isSetE();
11706
      if (this_present_e || that_present_e) {
11707
        if (!(this_present_e && that_present_e))
11708
          return false;
11709
        if (!this.e.equals(that.e))
11710
          return false;
11711
      }
11712
 
11713
      return true;
11714
    }
11715
 
11716
    @Override
11717
    public int hashCode() {
11718
      return 0;
11719
    }
11720
 
11721
    public int compareTo(updatePurchaseOrder_result other) {
11722
      if (!getClass().equals(other.getClass())) {
11723
        return getClass().getName().compareTo(other.getClass().getName());
11724
      }
11725
 
11726
      int lastComparison = 0;
11727
      updatePurchaseOrder_result typedOther = (updatePurchaseOrder_result)other;
11728
 
11729
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
11730
      if (lastComparison != 0) {
11731
        return lastComparison;
11732
      }
11733
      if (isSetE()) {
11734
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
11735
        if (lastComparison != 0) {
11736
          return lastComparison;
11737
        }
11738
      }
11739
      return 0;
11740
    }
11741
 
11742
    public _Fields fieldForId(int fieldId) {
11743
      return _Fields.findByThriftId(fieldId);
11744
    }
11745
 
11746
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11747
      org.apache.thrift.protocol.TField field;
11748
      iprot.readStructBegin();
11749
      while (true)
11750
      {
11751
        field = iprot.readFieldBegin();
11752
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11753
          break;
11754
        }
11755
        switch (field.id) {
11756
          case 1: // E
11757
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11758
              this.e = new PurchaseServiceException();
11759
              this.e.read(iprot);
11760
            } else { 
11761
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11762
            }
11763
            break;
11764
          default:
11765
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11766
        }
11767
        iprot.readFieldEnd();
11768
      }
11769
      iprot.readStructEnd();
11770
      validate();
11771
    }
11772
 
11773
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11774
      oprot.writeStructBegin(STRUCT_DESC);
11775
 
11776
      if (this.isSetE()) {
11777
        oprot.writeFieldBegin(E_FIELD_DESC);
11778
        this.e.write(oprot);
11779
        oprot.writeFieldEnd();
11780
      }
11781
      oprot.writeFieldStop();
11782
      oprot.writeStructEnd();
11783
    }
11784
 
11785
    @Override
11786
    public String toString() {
11787
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_result(");
11788
      boolean first = true;
11789
 
11790
      sb.append("e:");
11791
      if (this.e == null) {
11792
        sb.append("null");
11793
      } else {
11794
        sb.append(this.e);
11795
      }
11796
      first = false;
11797
      sb.append(")");
11798
      return sb.toString();
11799
    }
11800
 
11801
    public void validate() throws org.apache.thrift.TException {
11802
      // check for required fields
11803
    }
11804
 
11805
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11806
      try {
11807
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11808
      } catch (org.apache.thrift.TException te) {
11809
        throw new java.io.IOException(te);
11810
      }
11811
    }
11812
 
11813
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11814
      try {
11815
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11816
      } catch (org.apache.thrift.TException te) {
11817
        throw new java.io.IOException(te);
11818
      }
11819
    }
11820
 
11821
  }
11822
 
5185 mandeep.dh 11823
  public static class unFulfillPO_args implements org.apache.thrift.TBase<unFulfillPO_args, unFulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
11824
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_args");
11825
 
11826
    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);
11827
    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);
11828
    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);
11829
 
11830
    private long purchaseId; // required
11831
    private long itemId; // required
11832
    private long quantity; // required
11833
 
11834
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11835
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11836
      PURCHASE_ID((short)1, "purchaseId"),
11837
      ITEM_ID((short)2, "itemId"),
11838
      QUANTITY((short)3, "quantity");
11839
 
11840
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11841
 
11842
      static {
11843
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11844
          byName.put(field.getFieldName(), field);
11845
        }
11846
      }
11847
 
11848
      /**
11849
       * Find the _Fields constant that matches fieldId, or null if its not found.
11850
       */
11851
      public static _Fields findByThriftId(int fieldId) {
11852
        switch(fieldId) {
11853
          case 1: // PURCHASE_ID
11854
            return PURCHASE_ID;
11855
          case 2: // ITEM_ID
11856
            return ITEM_ID;
11857
          case 3: // QUANTITY
11858
            return QUANTITY;
11859
          default:
11860
            return null;
11861
        }
11862
      }
11863
 
11864
      /**
11865
       * Find the _Fields constant that matches fieldId, throwing an exception
11866
       * if it is not found.
11867
       */
11868
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11869
        _Fields fields = findByThriftId(fieldId);
11870
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11871
        return fields;
11872
      }
11873
 
11874
      /**
11875
       * Find the _Fields constant that matches name, or null if its not found.
11876
       */
11877
      public static _Fields findByName(String name) {
11878
        return byName.get(name);
11879
      }
11880
 
11881
      private final short _thriftId;
11882
      private final String _fieldName;
11883
 
11884
      _Fields(short thriftId, String fieldName) {
11885
        _thriftId = thriftId;
11886
        _fieldName = fieldName;
11887
      }
11888
 
11889
      public short getThriftFieldId() {
11890
        return _thriftId;
11891
      }
11892
 
11893
      public String getFieldName() {
11894
        return _fieldName;
11895
      }
11896
    }
11897
 
11898
    // isset id assignments
11899
    private static final int __PURCHASEID_ISSET_ID = 0;
11900
    private static final int __ITEMID_ISSET_ID = 1;
11901
    private static final int __QUANTITY_ISSET_ID = 2;
11902
    private BitSet __isset_bit_vector = new BitSet(3);
11903
 
11904
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11905
    static {
11906
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11907
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11908
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11909
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11910
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11911
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11912
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11913
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11914
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_args.class, metaDataMap);
11915
    }
11916
 
11917
    public unFulfillPO_args() {
11918
    }
11919
 
11920
    public unFulfillPO_args(
11921
      long purchaseId,
11922
      long itemId,
11923
      long quantity)
11924
    {
11925
      this();
11926
      this.purchaseId = purchaseId;
11927
      setPurchaseIdIsSet(true);
11928
      this.itemId = itemId;
11929
      setItemIdIsSet(true);
11930
      this.quantity = quantity;
11931
      setQuantityIsSet(true);
11932
    }
11933
 
11934
    /**
11935
     * Performs a deep copy on <i>other</i>.
11936
     */
11937
    public unFulfillPO_args(unFulfillPO_args other) {
11938
      __isset_bit_vector.clear();
11939
      __isset_bit_vector.or(other.__isset_bit_vector);
11940
      this.purchaseId = other.purchaseId;
11941
      this.itemId = other.itemId;
11942
      this.quantity = other.quantity;
11943
    }
11944
 
11945
    public unFulfillPO_args deepCopy() {
11946
      return new unFulfillPO_args(this);
11947
    }
11948
 
11949
    @Override
11950
    public void clear() {
11951
      setPurchaseIdIsSet(false);
11952
      this.purchaseId = 0;
11953
      setItemIdIsSet(false);
11954
      this.itemId = 0;
11955
      setQuantityIsSet(false);
11956
      this.quantity = 0;
11957
    }
11958
 
11959
    public long getPurchaseId() {
11960
      return this.purchaseId;
11961
    }
11962
 
11963
    public void setPurchaseId(long purchaseId) {
11964
      this.purchaseId = purchaseId;
11965
      setPurchaseIdIsSet(true);
11966
    }
11967
 
11968
    public void unsetPurchaseId() {
11969
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
11970
    }
11971
 
11972
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
11973
    public boolean isSetPurchaseId() {
11974
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
11975
    }
11976
 
11977
    public void setPurchaseIdIsSet(boolean value) {
11978
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
11979
    }
11980
 
11981
    public long getItemId() {
11982
      return this.itemId;
11983
    }
11984
 
11985
    public void setItemId(long itemId) {
11986
      this.itemId = itemId;
11987
      setItemIdIsSet(true);
11988
    }
11989
 
11990
    public void unsetItemId() {
11991
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
11992
    }
11993
 
11994
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
11995
    public boolean isSetItemId() {
11996
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
11997
    }
11998
 
11999
    public void setItemIdIsSet(boolean value) {
12000
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
12001
    }
12002
 
12003
    public long getQuantity() {
12004
      return this.quantity;
12005
    }
12006
 
12007
    public void setQuantity(long quantity) {
12008
      this.quantity = quantity;
12009
      setQuantityIsSet(true);
12010
    }
12011
 
12012
    public void unsetQuantity() {
12013
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
12014
    }
12015
 
12016
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
12017
    public boolean isSetQuantity() {
12018
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
12019
    }
12020
 
12021
    public void setQuantityIsSet(boolean value) {
12022
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
12023
    }
12024
 
12025
    public void setFieldValue(_Fields field, Object value) {
12026
      switch (field) {
12027
      case PURCHASE_ID:
12028
        if (value == null) {
12029
          unsetPurchaseId();
12030
        } else {
12031
          setPurchaseId((Long)value);
12032
        }
12033
        break;
12034
 
12035
      case ITEM_ID:
12036
        if (value == null) {
12037
          unsetItemId();
12038
        } else {
12039
          setItemId((Long)value);
12040
        }
12041
        break;
12042
 
12043
      case QUANTITY:
12044
        if (value == null) {
12045
          unsetQuantity();
12046
        } else {
12047
          setQuantity((Long)value);
12048
        }
12049
        break;
12050
 
12051
      }
12052
    }
12053
 
12054
    public Object getFieldValue(_Fields field) {
12055
      switch (field) {
12056
      case PURCHASE_ID:
12057
        return Long.valueOf(getPurchaseId());
12058
 
12059
      case ITEM_ID:
12060
        return Long.valueOf(getItemId());
12061
 
12062
      case QUANTITY:
12063
        return Long.valueOf(getQuantity());
12064
 
12065
      }
12066
      throw new IllegalStateException();
12067
    }
12068
 
12069
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12070
    public boolean isSet(_Fields field) {
12071
      if (field == null) {
12072
        throw new IllegalArgumentException();
12073
      }
12074
 
12075
      switch (field) {
12076
      case PURCHASE_ID:
12077
        return isSetPurchaseId();
12078
      case ITEM_ID:
12079
        return isSetItemId();
12080
      case QUANTITY:
12081
        return isSetQuantity();
12082
      }
12083
      throw new IllegalStateException();
12084
    }
12085
 
12086
    @Override
12087
    public boolean equals(Object that) {
12088
      if (that == null)
12089
        return false;
12090
      if (that instanceof unFulfillPO_args)
12091
        return this.equals((unFulfillPO_args)that);
12092
      return false;
12093
    }
12094
 
12095
    public boolean equals(unFulfillPO_args that) {
12096
      if (that == null)
12097
        return false;
12098
 
12099
      boolean this_present_purchaseId = true;
12100
      boolean that_present_purchaseId = true;
12101
      if (this_present_purchaseId || that_present_purchaseId) {
12102
        if (!(this_present_purchaseId && that_present_purchaseId))
12103
          return false;
12104
        if (this.purchaseId != that.purchaseId)
12105
          return false;
12106
      }
12107
 
12108
      boolean this_present_itemId = true;
12109
      boolean that_present_itemId = true;
12110
      if (this_present_itemId || that_present_itemId) {
12111
        if (!(this_present_itemId && that_present_itemId))
12112
          return false;
12113
        if (this.itemId != that.itemId)
12114
          return false;
12115
      }
12116
 
12117
      boolean this_present_quantity = true;
12118
      boolean that_present_quantity = true;
12119
      if (this_present_quantity || that_present_quantity) {
12120
        if (!(this_present_quantity && that_present_quantity))
12121
          return false;
12122
        if (this.quantity != that.quantity)
12123
          return false;
12124
      }
12125
 
12126
      return true;
12127
    }
12128
 
12129
    @Override
12130
    public int hashCode() {
12131
      return 0;
12132
    }
12133
 
12134
    public int compareTo(unFulfillPO_args other) {
12135
      if (!getClass().equals(other.getClass())) {
12136
        return getClass().getName().compareTo(other.getClass().getName());
12137
      }
12138
 
12139
      int lastComparison = 0;
12140
      unFulfillPO_args typedOther = (unFulfillPO_args)other;
12141
 
12142
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
12143
      if (lastComparison != 0) {
12144
        return lastComparison;
12145
      }
12146
      if (isSetPurchaseId()) {
12147
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
12148
        if (lastComparison != 0) {
12149
          return lastComparison;
12150
        }
12151
      }
12152
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
12153
      if (lastComparison != 0) {
12154
        return lastComparison;
12155
      }
12156
      if (isSetItemId()) {
12157
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
12158
        if (lastComparison != 0) {
12159
          return lastComparison;
12160
        }
12161
      }
12162
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
12163
      if (lastComparison != 0) {
12164
        return lastComparison;
12165
      }
12166
      if (isSetQuantity()) {
12167
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
12168
        if (lastComparison != 0) {
12169
          return lastComparison;
12170
        }
12171
      }
12172
      return 0;
12173
    }
12174
 
12175
    public _Fields fieldForId(int fieldId) {
12176
      return _Fields.findByThriftId(fieldId);
12177
    }
12178
 
12179
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12180
      org.apache.thrift.protocol.TField field;
12181
      iprot.readStructBegin();
12182
      while (true)
12183
      {
12184
        field = iprot.readFieldBegin();
12185
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12186
          break;
12187
        }
12188
        switch (field.id) {
12189
          case 1: // PURCHASE_ID
12190
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12191
              this.purchaseId = iprot.readI64();
12192
              setPurchaseIdIsSet(true);
12193
            } else { 
12194
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12195
            }
12196
            break;
12197
          case 2: // ITEM_ID
12198
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12199
              this.itemId = iprot.readI64();
12200
              setItemIdIsSet(true);
12201
            } else { 
12202
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12203
            }
12204
            break;
12205
          case 3: // QUANTITY
12206
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12207
              this.quantity = iprot.readI64();
12208
              setQuantityIsSet(true);
12209
            } else { 
12210
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12211
            }
12212
            break;
12213
          default:
12214
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12215
        }
12216
        iprot.readFieldEnd();
12217
      }
12218
      iprot.readStructEnd();
12219
      validate();
12220
    }
12221
 
12222
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12223
      validate();
12224
 
12225
      oprot.writeStructBegin(STRUCT_DESC);
12226
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
12227
      oprot.writeI64(this.purchaseId);
12228
      oprot.writeFieldEnd();
12229
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
12230
      oprot.writeI64(this.itemId);
12231
      oprot.writeFieldEnd();
12232
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
12233
      oprot.writeI64(this.quantity);
12234
      oprot.writeFieldEnd();
12235
      oprot.writeFieldStop();
12236
      oprot.writeStructEnd();
12237
    }
12238
 
12239
    @Override
12240
    public String toString() {
12241
      StringBuilder sb = new StringBuilder("unFulfillPO_args(");
12242
      boolean first = true;
12243
 
12244
      sb.append("purchaseId:");
12245
      sb.append(this.purchaseId);
12246
      first = false;
12247
      if (!first) sb.append(", ");
12248
      sb.append("itemId:");
12249
      sb.append(this.itemId);
12250
      first = false;
12251
      if (!first) sb.append(", ");
12252
      sb.append("quantity:");
12253
      sb.append(this.quantity);
12254
      first = false;
12255
      sb.append(")");
12256
      return sb.toString();
12257
    }
12258
 
12259
    public void validate() throws org.apache.thrift.TException {
12260
      // check for required fields
12261
    }
12262
 
12263
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12264
      try {
12265
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12266
      } catch (org.apache.thrift.TException te) {
12267
        throw new java.io.IOException(te);
12268
      }
12269
    }
12270
 
12271
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12272
      try {
12273
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
12274
        __isset_bit_vector = new BitSet(1);
12275
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12276
      } catch (org.apache.thrift.TException te) {
12277
        throw new java.io.IOException(te);
12278
      }
12279
    }
12280
 
12281
  }
12282
 
12283
  public static class unFulfillPO_result implements org.apache.thrift.TBase<unFulfillPO_result, unFulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
12284
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_result");
12285
 
12286
    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);
12287
 
12288
    private PurchaseServiceException e; // required
12289
 
12290
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12291
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12292
      E((short)1, "e");
12293
 
12294
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12295
 
12296
      static {
12297
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12298
          byName.put(field.getFieldName(), field);
12299
        }
12300
      }
12301
 
12302
      /**
12303
       * Find the _Fields constant that matches fieldId, or null if its not found.
12304
       */
12305
      public static _Fields findByThriftId(int fieldId) {
12306
        switch(fieldId) {
12307
          case 1: // E
12308
            return E;
12309
          default:
12310
            return null;
12311
        }
12312
      }
12313
 
12314
      /**
12315
       * Find the _Fields constant that matches fieldId, throwing an exception
12316
       * if it is not found.
12317
       */
12318
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12319
        _Fields fields = findByThriftId(fieldId);
12320
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12321
        return fields;
12322
      }
12323
 
12324
      /**
12325
       * Find the _Fields constant that matches name, or null if its not found.
12326
       */
12327
      public static _Fields findByName(String name) {
12328
        return byName.get(name);
12329
      }
12330
 
12331
      private final short _thriftId;
12332
      private final String _fieldName;
12333
 
12334
      _Fields(short thriftId, String fieldName) {
12335
        _thriftId = thriftId;
12336
        _fieldName = fieldName;
12337
      }
12338
 
12339
      public short getThriftFieldId() {
12340
        return _thriftId;
12341
      }
12342
 
12343
      public String getFieldName() {
12344
        return _fieldName;
12345
      }
12346
    }
12347
 
12348
    // isset id assignments
12349
 
12350
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12351
    static {
12352
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12353
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12354
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
12355
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12356
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_result.class, metaDataMap);
12357
    }
12358
 
12359
    public unFulfillPO_result() {
12360
    }
12361
 
12362
    public unFulfillPO_result(
12363
      PurchaseServiceException e)
12364
    {
12365
      this();
12366
      this.e = e;
12367
    }
12368
 
12369
    /**
12370
     * Performs a deep copy on <i>other</i>.
12371
     */
12372
    public unFulfillPO_result(unFulfillPO_result other) {
12373
      if (other.isSetE()) {
12374
        this.e = new PurchaseServiceException(other.e);
12375
      }
12376
    }
12377
 
12378
    public unFulfillPO_result deepCopy() {
12379
      return new unFulfillPO_result(this);
12380
    }
12381
 
12382
    @Override
12383
    public void clear() {
12384
      this.e = null;
12385
    }
12386
 
12387
    public PurchaseServiceException getE() {
12388
      return this.e;
12389
    }
12390
 
12391
    public void setE(PurchaseServiceException e) {
12392
      this.e = e;
12393
    }
12394
 
12395
    public void unsetE() {
12396
      this.e = null;
12397
    }
12398
 
12399
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
12400
    public boolean isSetE() {
12401
      return this.e != null;
12402
    }
12403
 
12404
    public void setEIsSet(boolean value) {
12405
      if (!value) {
12406
        this.e = null;
12407
      }
12408
    }
12409
 
12410
    public void setFieldValue(_Fields field, Object value) {
12411
      switch (field) {
12412
      case E:
12413
        if (value == null) {
12414
          unsetE();
12415
        } else {
12416
          setE((PurchaseServiceException)value);
12417
        }
12418
        break;
12419
 
12420
      }
12421
    }
12422
 
12423
    public Object getFieldValue(_Fields field) {
12424
      switch (field) {
12425
      case E:
12426
        return getE();
12427
 
12428
      }
12429
      throw new IllegalStateException();
12430
    }
12431
 
12432
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12433
    public boolean isSet(_Fields field) {
12434
      if (field == null) {
12435
        throw new IllegalArgumentException();
12436
      }
12437
 
12438
      switch (field) {
12439
      case E:
12440
        return isSetE();
12441
      }
12442
      throw new IllegalStateException();
12443
    }
12444
 
12445
    @Override
12446
    public boolean equals(Object that) {
12447
      if (that == null)
12448
        return false;
12449
      if (that instanceof unFulfillPO_result)
12450
        return this.equals((unFulfillPO_result)that);
12451
      return false;
12452
    }
12453
 
12454
    public boolean equals(unFulfillPO_result that) {
12455
      if (that == null)
12456
        return false;
12457
 
12458
      boolean this_present_e = true && this.isSetE();
12459
      boolean that_present_e = true && that.isSetE();
12460
      if (this_present_e || that_present_e) {
12461
        if (!(this_present_e && that_present_e))
12462
          return false;
12463
        if (!this.e.equals(that.e))
12464
          return false;
12465
      }
12466
 
12467
      return true;
12468
    }
12469
 
12470
    @Override
12471
    public int hashCode() {
12472
      return 0;
12473
    }
12474
 
12475
    public int compareTo(unFulfillPO_result other) {
12476
      if (!getClass().equals(other.getClass())) {
12477
        return getClass().getName().compareTo(other.getClass().getName());
12478
      }
12479
 
12480
      int lastComparison = 0;
12481
      unFulfillPO_result typedOther = (unFulfillPO_result)other;
12482
 
12483
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
12484
      if (lastComparison != 0) {
12485
        return lastComparison;
12486
      }
12487
      if (isSetE()) {
12488
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
12489
        if (lastComparison != 0) {
12490
          return lastComparison;
12491
        }
12492
      }
12493
      return 0;
12494
    }
12495
 
12496
    public _Fields fieldForId(int fieldId) {
12497
      return _Fields.findByThriftId(fieldId);
12498
    }
12499
 
12500
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12501
      org.apache.thrift.protocol.TField field;
12502
      iprot.readStructBegin();
12503
      while (true)
12504
      {
12505
        field = iprot.readFieldBegin();
12506
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12507
          break;
12508
        }
12509
        switch (field.id) {
12510
          case 1: // E
12511
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12512
              this.e = new PurchaseServiceException();
12513
              this.e.read(iprot);
12514
            } else { 
12515
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12516
            }
12517
            break;
12518
          default:
12519
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12520
        }
12521
        iprot.readFieldEnd();
12522
      }
12523
      iprot.readStructEnd();
12524
      validate();
12525
    }
12526
 
12527
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12528
      oprot.writeStructBegin(STRUCT_DESC);
12529
 
12530
      if (this.isSetE()) {
12531
        oprot.writeFieldBegin(E_FIELD_DESC);
12532
        this.e.write(oprot);
12533
        oprot.writeFieldEnd();
12534
      }
12535
      oprot.writeFieldStop();
12536
      oprot.writeStructEnd();
12537
    }
12538
 
12539
    @Override
12540
    public String toString() {
12541
      StringBuilder sb = new StringBuilder("unFulfillPO_result(");
12542
      boolean first = true;
12543
 
12544
      sb.append("e:");
12545
      if (this.e == null) {
12546
        sb.append("null");
12547
      } else {
12548
        sb.append(this.e);
12549
      }
12550
      first = false;
12551
      sb.append(")");
12552
      return sb.toString();
12553
    }
12554
 
12555
    public void validate() throws org.apache.thrift.TException {
12556
      // check for required fields
12557
    }
12558
 
12559
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12560
      try {
12561
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12562
      } catch (org.apache.thrift.TException te) {
12563
        throw new java.io.IOException(te);
12564
      }
12565
    }
12566
 
12567
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12568
      try {
12569
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12570
      } catch (org.apache.thrift.TException te) {
12571
        throw new java.io.IOException(te);
12572
      }
12573
    }
12574
 
12575
  }
12576
 
5443 mandeep.dh 12577
  public static class getInvoices_args implements org.apache.thrift.TBase<getInvoices_args, getInvoices_args._Fields>, java.io.Serializable, Cloneable   {
12578
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_args");
12579
 
12580
    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);
12581
 
12582
    private long date; // required
12583
 
12584
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12585
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12586
      DATE((short)1, "date");
12587
 
12588
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12589
 
12590
      static {
12591
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12592
          byName.put(field.getFieldName(), field);
12593
        }
12594
      }
12595
 
12596
      /**
12597
       * Find the _Fields constant that matches fieldId, or null if its not found.
12598
       */
12599
      public static _Fields findByThriftId(int fieldId) {
12600
        switch(fieldId) {
12601
          case 1: // DATE
12602
            return DATE;
12603
          default:
12604
            return null;
12605
        }
12606
      }
12607
 
12608
      /**
12609
       * Find the _Fields constant that matches fieldId, throwing an exception
12610
       * if it is not found.
12611
       */
12612
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12613
        _Fields fields = findByThriftId(fieldId);
12614
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12615
        return fields;
12616
      }
12617
 
12618
      /**
12619
       * Find the _Fields constant that matches name, or null if its not found.
12620
       */
12621
      public static _Fields findByName(String name) {
12622
        return byName.get(name);
12623
      }
12624
 
12625
      private final short _thriftId;
12626
      private final String _fieldName;
12627
 
12628
      _Fields(short thriftId, String fieldName) {
12629
        _thriftId = thriftId;
12630
        _fieldName = fieldName;
12631
      }
12632
 
12633
      public short getThriftFieldId() {
12634
        return _thriftId;
12635
      }
12636
 
12637
      public String getFieldName() {
12638
        return _fieldName;
12639
      }
12640
    }
12641
 
12642
    // isset id assignments
12643
    private static final int __DATE_ISSET_ID = 0;
12644
    private BitSet __isset_bit_vector = new BitSet(1);
12645
 
12646
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12647
    static {
12648
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12649
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12650
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12651
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12652
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_args.class, metaDataMap);
12653
    }
12654
 
12655
    public getInvoices_args() {
12656
    }
12657
 
12658
    public getInvoices_args(
12659
      long date)
12660
    {
12661
      this();
12662
      this.date = date;
12663
      setDateIsSet(true);
12664
    }
12665
 
12666
    /**
12667
     * Performs a deep copy on <i>other</i>.
12668
     */
12669
    public getInvoices_args(getInvoices_args other) {
12670
      __isset_bit_vector.clear();
12671
      __isset_bit_vector.or(other.__isset_bit_vector);
12672
      this.date = other.date;
12673
    }
12674
 
12675
    public getInvoices_args deepCopy() {
12676
      return new getInvoices_args(this);
12677
    }
12678
 
12679
    @Override
12680
    public void clear() {
12681
      setDateIsSet(false);
12682
      this.date = 0;
12683
    }
12684
 
12685
    public long getDate() {
12686
      return this.date;
12687
    }
12688
 
12689
    public void setDate(long date) {
12690
      this.date = date;
12691
      setDateIsSet(true);
12692
    }
12693
 
12694
    public void unsetDate() {
12695
      __isset_bit_vector.clear(__DATE_ISSET_ID);
12696
    }
12697
 
12698
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
12699
    public boolean isSetDate() {
12700
      return __isset_bit_vector.get(__DATE_ISSET_ID);
12701
    }
12702
 
12703
    public void setDateIsSet(boolean value) {
12704
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
12705
    }
12706
 
12707
    public void setFieldValue(_Fields field, Object value) {
12708
      switch (field) {
12709
      case DATE:
12710
        if (value == null) {
12711
          unsetDate();
12712
        } else {
12713
          setDate((Long)value);
12714
        }
12715
        break;
12716
 
12717
      }
12718
    }
12719
 
12720
    public Object getFieldValue(_Fields field) {
12721
      switch (field) {
12722
      case DATE:
12723
        return Long.valueOf(getDate());
12724
 
12725
      }
12726
      throw new IllegalStateException();
12727
    }
12728
 
12729
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12730
    public boolean isSet(_Fields field) {
12731
      if (field == null) {
12732
        throw new IllegalArgumentException();
12733
      }
12734
 
12735
      switch (field) {
12736
      case DATE:
12737
        return isSetDate();
12738
      }
12739
      throw new IllegalStateException();
12740
    }
12741
 
12742
    @Override
12743
    public boolean equals(Object that) {
12744
      if (that == null)
12745
        return false;
12746
      if (that instanceof getInvoices_args)
12747
        return this.equals((getInvoices_args)that);
12748
      return false;
12749
    }
12750
 
12751
    public boolean equals(getInvoices_args that) {
12752
      if (that == null)
12753
        return false;
12754
 
12755
      boolean this_present_date = true;
12756
      boolean that_present_date = true;
12757
      if (this_present_date || that_present_date) {
12758
        if (!(this_present_date && that_present_date))
12759
          return false;
12760
        if (this.date != that.date)
12761
          return false;
12762
      }
12763
 
12764
      return true;
12765
    }
12766
 
12767
    @Override
12768
    public int hashCode() {
12769
      return 0;
12770
    }
12771
 
12772
    public int compareTo(getInvoices_args other) {
12773
      if (!getClass().equals(other.getClass())) {
12774
        return getClass().getName().compareTo(other.getClass().getName());
12775
      }
12776
 
12777
      int lastComparison = 0;
12778
      getInvoices_args typedOther = (getInvoices_args)other;
12779
 
12780
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
12781
      if (lastComparison != 0) {
12782
        return lastComparison;
12783
      }
12784
      if (isSetDate()) {
12785
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
12786
        if (lastComparison != 0) {
12787
          return lastComparison;
12788
        }
12789
      }
12790
      return 0;
12791
    }
12792
 
12793
    public _Fields fieldForId(int fieldId) {
12794
      return _Fields.findByThriftId(fieldId);
12795
    }
12796
 
12797
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12798
      org.apache.thrift.protocol.TField field;
12799
      iprot.readStructBegin();
12800
      while (true)
12801
      {
12802
        field = iprot.readFieldBegin();
12803
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12804
          break;
12805
        }
12806
        switch (field.id) {
12807
          case 1: // DATE
12808
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12809
              this.date = iprot.readI64();
12810
              setDateIsSet(true);
12811
            } else { 
12812
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12813
            }
12814
            break;
12815
          default:
12816
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12817
        }
12818
        iprot.readFieldEnd();
12819
      }
12820
      iprot.readStructEnd();
12821
      validate();
12822
    }
12823
 
12824
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12825
      validate();
12826
 
12827
      oprot.writeStructBegin(STRUCT_DESC);
12828
      oprot.writeFieldBegin(DATE_FIELD_DESC);
12829
      oprot.writeI64(this.date);
12830
      oprot.writeFieldEnd();
12831
      oprot.writeFieldStop();
12832
      oprot.writeStructEnd();
12833
    }
12834
 
12835
    @Override
12836
    public String toString() {
12837
      StringBuilder sb = new StringBuilder("getInvoices_args(");
12838
      boolean first = true;
12839
 
12840
      sb.append("date:");
12841
      sb.append(this.date);
12842
      first = false;
12843
      sb.append(")");
12844
      return sb.toString();
12845
    }
12846
 
12847
    public void validate() throws org.apache.thrift.TException {
12848
      // check for required fields
12849
    }
12850
 
12851
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12852
      try {
12853
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12854
      } catch (org.apache.thrift.TException te) {
12855
        throw new java.io.IOException(te);
12856
      }
12857
    }
12858
 
12859
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12860
      try {
12861
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
12862
        __isset_bit_vector = new BitSet(1);
12863
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12864
      } catch (org.apache.thrift.TException te) {
12865
        throw new java.io.IOException(te);
12866
      }
12867
    }
12868
 
12869
  }
12870
 
12871
  public static class getInvoices_result implements org.apache.thrift.TBase<getInvoices_result, getInvoices_result._Fields>, java.io.Serializable, Cloneable   {
12872
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_result");
12873
 
12874
    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);
12875
 
12876
    private List<Invoice> success; // required
12877
 
12878
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12879
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12880
      SUCCESS((short)0, "success");
12881
 
12882
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12883
 
12884
      static {
12885
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12886
          byName.put(field.getFieldName(), field);
12887
        }
12888
      }
12889
 
12890
      /**
12891
       * Find the _Fields constant that matches fieldId, or null if its not found.
12892
       */
12893
      public static _Fields findByThriftId(int fieldId) {
12894
        switch(fieldId) {
12895
          case 0: // SUCCESS
12896
            return SUCCESS;
12897
          default:
12898
            return null;
12899
        }
12900
      }
12901
 
12902
      /**
12903
       * Find the _Fields constant that matches fieldId, throwing an exception
12904
       * if it is not found.
12905
       */
12906
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12907
        _Fields fields = findByThriftId(fieldId);
12908
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12909
        return fields;
12910
      }
12911
 
12912
      /**
12913
       * Find the _Fields constant that matches name, or null if its not found.
12914
       */
12915
      public static _Fields findByName(String name) {
12916
        return byName.get(name);
12917
      }
12918
 
12919
      private final short _thriftId;
12920
      private final String _fieldName;
12921
 
12922
      _Fields(short thriftId, String fieldName) {
12923
        _thriftId = thriftId;
12924
        _fieldName = fieldName;
12925
      }
12926
 
12927
      public short getThriftFieldId() {
12928
        return _thriftId;
12929
      }
12930
 
12931
      public String getFieldName() {
12932
        return _fieldName;
12933
      }
12934
    }
12935
 
12936
    // isset id assignments
12937
 
12938
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12939
    static {
12940
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12941
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12942
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
12943
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class))));
12944
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12945
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_result.class, metaDataMap);
12946
    }
12947
 
12948
    public getInvoices_result() {
12949
    }
12950
 
12951
    public getInvoices_result(
12952
      List<Invoice> success)
12953
    {
12954
      this();
12955
      this.success = success;
12956
    }
12957
 
12958
    /**
12959
     * Performs a deep copy on <i>other</i>.
12960
     */
12961
    public getInvoices_result(getInvoices_result other) {
12962
      if (other.isSetSuccess()) {
12963
        List<Invoice> __this__success = new ArrayList<Invoice>();
12964
        for (Invoice other_element : other.success) {
12965
          __this__success.add(new Invoice(other_element));
12966
        }
12967
        this.success = __this__success;
12968
      }
12969
    }
12970
 
12971
    public getInvoices_result deepCopy() {
12972
      return new getInvoices_result(this);
12973
    }
12974
 
12975
    @Override
12976
    public void clear() {
12977
      this.success = null;
12978
    }
12979
 
12980
    public int getSuccessSize() {
12981
      return (this.success == null) ? 0 : this.success.size();
12982
    }
12983
 
12984
    public java.util.Iterator<Invoice> getSuccessIterator() {
12985
      return (this.success == null) ? null : this.success.iterator();
12986
    }
12987
 
12988
    public void addToSuccess(Invoice elem) {
12989
      if (this.success == null) {
12990
        this.success = new ArrayList<Invoice>();
12991
      }
12992
      this.success.add(elem);
12993
    }
12994
 
12995
    public List<Invoice> getSuccess() {
12996
      return this.success;
12997
    }
12998
 
12999
    public void setSuccess(List<Invoice> success) {
13000
      this.success = success;
13001
    }
13002
 
13003
    public void unsetSuccess() {
13004
      this.success = null;
13005
    }
13006
 
13007
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
13008
    public boolean isSetSuccess() {
13009
      return this.success != null;
13010
    }
13011
 
13012
    public void setSuccessIsSet(boolean value) {
13013
      if (!value) {
13014
        this.success = null;
13015
      }
13016
    }
13017
 
13018
    public void setFieldValue(_Fields field, Object value) {
13019
      switch (field) {
13020
      case SUCCESS:
13021
        if (value == null) {
13022
          unsetSuccess();
13023
        } else {
13024
          setSuccess((List<Invoice>)value);
13025
        }
13026
        break;
13027
 
13028
      }
13029
    }
13030
 
13031
    public Object getFieldValue(_Fields field) {
13032
      switch (field) {
13033
      case SUCCESS:
13034
        return getSuccess();
13035
 
13036
      }
13037
      throw new IllegalStateException();
13038
    }
13039
 
13040
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13041
    public boolean isSet(_Fields field) {
13042
      if (field == null) {
13043
        throw new IllegalArgumentException();
13044
      }
13045
 
13046
      switch (field) {
13047
      case SUCCESS:
13048
        return isSetSuccess();
13049
      }
13050
      throw new IllegalStateException();
13051
    }
13052
 
13053
    @Override
13054
    public boolean equals(Object that) {
13055
      if (that == null)
13056
        return false;
13057
      if (that instanceof getInvoices_result)
13058
        return this.equals((getInvoices_result)that);
13059
      return false;
13060
    }
13061
 
13062
    public boolean equals(getInvoices_result that) {
13063
      if (that == null)
13064
        return false;
13065
 
13066
      boolean this_present_success = true && this.isSetSuccess();
13067
      boolean that_present_success = true && that.isSetSuccess();
13068
      if (this_present_success || that_present_success) {
13069
        if (!(this_present_success && that_present_success))
13070
          return false;
13071
        if (!this.success.equals(that.success))
13072
          return false;
13073
      }
13074
 
13075
      return true;
13076
    }
13077
 
13078
    @Override
13079
    public int hashCode() {
13080
      return 0;
13081
    }
13082
 
13083
    public int compareTo(getInvoices_result other) {
13084
      if (!getClass().equals(other.getClass())) {
13085
        return getClass().getName().compareTo(other.getClass().getName());
13086
      }
13087
 
13088
      int lastComparison = 0;
13089
      getInvoices_result typedOther = (getInvoices_result)other;
13090
 
13091
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
13092
      if (lastComparison != 0) {
13093
        return lastComparison;
13094
      }
13095
      if (isSetSuccess()) {
13096
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
13097
        if (lastComparison != 0) {
13098
          return lastComparison;
13099
        }
13100
      }
13101
      return 0;
13102
    }
13103
 
13104
    public _Fields fieldForId(int fieldId) {
13105
      return _Fields.findByThriftId(fieldId);
13106
    }
13107
 
13108
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13109
      org.apache.thrift.protocol.TField field;
13110
      iprot.readStructBegin();
13111
      while (true)
13112
      {
13113
        field = iprot.readFieldBegin();
13114
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13115
          break;
13116
        }
13117
        switch (field.id) {
13118
          case 0: // SUCCESS
13119
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
13120
              {
6385 amar.kumar 13121
                org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
13122
                this.success = new ArrayList<Invoice>(_list24.size);
13123
                for (int _i25 = 0; _i25 < _list24.size; ++_i25)
5443 mandeep.dh 13124
                {
6385 amar.kumar 13125
                  Invoice _elem26; // required
13126
                  _elem26 = new Invoice();
13127
                  _elem26.read(iprot);
13128
                  this.success.add(_elem26);
5443 mandeep.dh 13129
                }
13130
                iprot.readListEnd();
13131
              }
13132
            } else { 
13133
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13134
            }
13135
            break;
13136
          default:
13137
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13138
        }
13139
        iprot.readFieldEnd();
13140
      }
13141
      iprot.readStructEnd();
13142
      validate();
13143
    }
13144
 
13145
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13146
      oprot.writeStructBegin(STRUCT_DESC);
13147
 
13148
      if (this.isSetSuccess()) {
13149
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13150
        {
13151
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 13152
          for (Invoice _iter27 : this.success)
5443 mandeep.dh 13153
          {
6385 amar.kumar 13154
            _iter27.write(oprot);
5443 mandeep.dh 13155
          }
13156
          oprot.writeListEnd();
13157
        }
13158
        oprot.writeFieldEnd();
13159
      }
13160
      oprot.writeFieldStop();
13161
      oprot.writeStructEnd();
13162
    }
13163
 
13164
    @Override
13165
    public String toString() {
13166
      StringBuilder sb = new StringBuilder("getInvoices_result(");
13167
      boolean first = true;
13168
 
13169
      sb.append("success:");
13170
      if (this.success == null) {
13171
        sb.append("null");
13172
      } else {
13173
        sb.append(this.success);
13174
      }
13175
      first = false;
13176
      sb.append(")");
13177
      return sb.toString();
13178
    }
13179
 
13180
    public void validate() throws org.apache.thrift.TException {
13181
      // check for required fields
13182
    }
13183
 
13184
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13185
      try {
13186
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13187
      } catch (org.apache.thrift.TException te) {
13188
        throw new java.io.IOException(te);
13189
      }
13190
    }
13191
 
13192
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13193
      try {
13194
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13195
      } catch (org.apache.thrift.TException te) {
13196
        throw new java.io.IOException(te);
13197
      }
13198
    }
13199
 
13200
  }
13201
 
7410 amar.kumar 13202
  public static class getInvoicesForWarehouse_args implements org.apache.thrift.TBase<getInvoicesForWarehouse_args, getInvoicesForWarehouse_args._Fields>, java.io.Serializable, Cloneable   {
13203
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoicesForWarehouse_args");
13204
 
13205
    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);
13206
    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);
13207
    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);
13208
 
13209
    private long warehouseId; // required
13210
    private long supplierId; // required
13211
    private long date; // required
13212
 
13213
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13214
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13215
      WAREHOUSE_ID((short)1, "warehouseId"),
13216
      SUPPLIER_ID((short)2, "supplierId"),
13217
      DATE((short)3, "date");
13218
 
13219
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13220
 
13221
      static {
13222
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13223
          byName.put(field.getFieldName(), field);
13224
        }
13225
      }
13226
 
13227
      /**
13228
       * Find the _Fields constant that matches fieldId, or null if its not found.
13229
       */
13230
      public static _Fields findByThriftId(int fieldId) {
13231
        switch(fieldId) {
13232
          case 1: // WAREHOUSE_ID
13233
            return WAREHOUSE_ID;
13234
          case 2: // SUPPLIER_ID
13235
            return SUPPLIER_ID;
13236
          case 3: // DATE
13237
            return DATE;
13238
          default:
13239
            return null;
13240
        }
13241
      }
13242
 
13243
      /**
13244
       * Find the _Fields constant that matches fieldId, throwing an exception
13245
       * if it is not found.
13246
       */
13247
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13248
        _Fields fields = findByThriftId(fieldId);
13249
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13250
        return fields;
13251
      }
13252
 
13253
      /**
13254
       * Find the _Fields constant that matches name, or null if its not found.
13255
       */
13256
      public static _Fields findByName(String name) {
13257
        return byName.get(name);
13258
      }
13259
 
13260
      private final short _thriftId;
13261
      private final String _fieldName;
13262
 
13263
      _Fields(short thriftId, String fieldName) {
13264
        _thriftId = thriftId;
13265
        _fieldName = fieldName;
13266
      }
13267
 
13268
      public short getThriftFieldId() {
13269
        return _thriftId;
13270
      }
13271
 
13272
      public String getFieldName() {
13273
        return _fieldName;
13274
      }
13275
    }
13276
 
13277
    // isset id assignments
13278
    private static final int __WAREHOUSEID_ISSET_ID = 0;
13279
    private static final int __SUPPLIERID_ISSET_ID = 1;
13280
    private static final int __DATE_ISSET_ID = 2;
13281
    private BitSet __isset_bit_vector = new BitSet(3);
13282
 
13283
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13284
    static {
13285
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13286
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13287
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13288
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13289
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13290
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13291
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13292
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13293
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoicesForWarehouse_args.class, metaDataMap);
13294
    }
13295
 
13296
    public getInvoicesForWarehouse_args() {
13297
    }
13298
 
13299
    public getInvoicesForWarehouse_args(
13300
      long warehouseId,
13301
      long supplierId,
13302
      long date)
13303
    {
13304
      this();
13305
      this.warehouseId = warehouseId;
13306
      setWarehouseIdIsSet(true);
13307
      this.supplierId = supplierId;
13308
      setSupplierIdIsSet(true);
13309
      this.date = date;
13310
      setDateIsSet(true);
13311
    }
13312
 
13313
    /**
13314
     * Performs a deep copy on <i>other</i>.
13315
     */
13316
    public getInvoicesForWarehouse_args(getInvoicesForWarehouse_args other) {
13317
      __isset_bit_vector.clear();
13318
      __isset_bit_vector.or(other.__isset_bit_vector);
13319
      this.warehouseId = other.warehouseId;
13320
      this.supplierId = other.supplierId;
13321
      this.date = other.date;
13322
    }
13323
 
13324
    public getInvoicesForWarehouse_args deepCopy() {
13325
      return new getInvoicesForWarehouse_args(this);
13326
    }
13327
 
13328
    @Override
13329
    public void clear() {
13330
      setWarehouseIdIsSet(false);
13331
      this.warehouseId = 0;
13332
      setSupplierIdIsSet(false);
13333
      this.supplierId = 0;
13334
      setDateIsSet(false);
13335
      this.date = 0;
13336
    }
13337
 
13338
    public long getWarehouseId() {
13339
      return this.warehouseId;
13340
    }
13341
 
13342
    public void setWarehouseId(long warehouseId) {
13343
      this.warehouseId = warehouseId;
13344
      setWarehouseIdIsSet(true);
13345
    }
13346
 
13347
    public void unsetWarehouseId() {
13348
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
13349
    }
13350
 
13351
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
13352
    public boolean isSetWarehouseId() {
13353
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
13354
    }
13355
 
13356
    public void setWarehouseIdIsSet(boolean value) {
13357
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
13358
    }
13359
 
13360
    public long getSupplierId() {
13361
      return this.supplierId;
13362
    }
13363
 
13364
    public void setSupplierId(long supplierId) {
13365
      this.supplierId = supplierId;
13366
      setSupplierIdIsSet(true);
13367
    }
13368
 
13369
    public void unsetSupplierId() {
13370
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
13371
    }
13372
 
13373
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
13374
    public boolean isSetSupplierId() {
13375
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
13376
    }
13377
 
13378
    public void setSupplierIdIsSet(boolean value) {
13379
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
13380
    }
13381
 
13382
    public long getDate() {
13383
      return this.date;
13384
    }
13385
 
13386
    public void setDate(long date) {
13387
      this.date = date;
13388
      setDateIsSet(true);
13389
    }
13390
 
13391
    public void unsetDate() {
13392
      __isset_bit_vector.clear(__DATE_ISSET_ID);
13393
    }
13394
 
13395
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
13396
    public boolean isSetDate() {
13397
      return __isset_bit_vector.get(__DATE_ISSET_ID);
13398
    }
13399
 
13400
    public void setDateIsSet(boolean value) {
13401
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
13402
    }
13403
 
13404
    public void setFieldValue(_Fields field, Object value) {
13405
      switch (field) {
13406
      case WAREHOUSE_ID:
13407
        if (value == null) {
13408
          unsetWarehouseId();
13409
        } else {
13410
          setWarehouseId((Long)value);
13411
        }
13412
        break;
13413
 
13414
      case SUPPLIER_ID:
13415
        if (value == null) {
13416
          unsetSupplierId();
13417
        } else {
13418
          setSupplierId((Long)value);
13419
        }
13420
        break;
13421
 
13422
      case DATE:
13423
        if (value == null) {
13424
          unsetDate();
13425
        } else {
13426
          setDate((Long)value);
13427
        }
13428
        break;
13429
 
13430
      }
13431
    }
13432
 
13433
    public Object getFieldValue(_Fields field) {
13434
      switch (field) {
13435
      case WAREHOUSE_ID:
13436
        return Long.valueOf(getWarehouseId());
13437
 
13438
      case SUPPLIER_ID:
13439
        return Long.valueOf(getSupplierId());
13440
 
13441
      case DATE:
13442
        return Long.valueOf(getDate());
13443
 
13444
      }
13445
      throw new IllegalStateException();
13446
    }
13447
 
13448
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13449
    public boolean isSet(_Fields field) {
13450
      if (field == null) {
13451
        throw new IllegalArgumentException();
13452
      }
13453
 
13454
      switch (field) {
13455
      case WAREHOUSE_ID:
13456
        return isSetWarehouseId();
13457
      case SUPPLIER_ID:
13458
        return isSetSupplierId();
13459
      case DATE:
13460
        return isSetDate();
13461
      }
13462
      throw new IllegalStateException();
13463
    }
13464
 
13465
    @Override
13466
    public boolean equals(Object that) {
13467
      if (that == null)
13468
        return false;
13469
      if (that instanceof getInvoicesForWarehouse_args)
13470
        return this.equals((getInvoicesForWarehouse_args)that);
13471
      return false;
13472
    }
13473
 
13474
    public boolean equals(getInvoicesForWarehouse_args that) {
13475
      if (that == null)
13476
        return false;
13477
 
13478
      boolean this_present_warehouseId = true;
13479
      boolean that_present_warehouseId = true;
13480
      if (this_present_warehouseId || that_present_warehouseId) {
13481
        if (!(this_present_warehouseId && that_present_warehouseId))
13482
          return false;
13483
        if (this.warehouseId != that.warehouseId)
13484
          return false;
13485
      }
13486
 
13487
      boolean this_present_supplierId = true;
13488
      boolean that_present_supplierId = true;
13489
      if (this_present_supplierId || that_present_supplierId) {
13490
        if (!(this_present_supplierId && that_present_supplierId))
13491
          return false;
13492
        if (this.supplierId != that.supplierId)
13493
          return false;
13494
      }
13495
 
13496
      boolean this_present_date = true;
13497
      boolean that_present_date = true;
13498
      if (this_present_date || that_present_date) {
13499
        if (!(this_present_date && that_present_date))
13500
          return false;
13501
        if (this.date != that.date)
13502
          return false;
13503
      }
13504
 
13505
      return true;
13506
    }
13507
 
13508
    @Override
13509
    public int hashCode() {
13510
      return 0;
13511
    }
13512
 
13513
    public int compareTo(getInvoicesForWarehouse_args other) {
13514
      if (!getClass().equals(other.getClass())) {
13515
        return getClass().getName().compareTo(other.getClass().getName());
13516
      }
13517
 
13518
      int lastComparison = 0;
13519
      getInvoicesForWarehouse_args typedOther = (getInvoicesForWarehouse_args)other;
13520
 
13521
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
13522
      if (lastComparison != 0) {
13523
        return lastComparison;
13524
      }
13525
      if (isSetWarehouseId()) {
13526
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
13527
        if (lastComparison != 0) {
13528
          return lastComparison;
13529
        }
13530
      }
13531
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
13532
      if (lastComparison != 0) {
13533
        return lastComparison;
13534
      }
13535
      if (isSetSupplierId()) {
13536
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
13537
        if (lastComparison != 0) {
13538
          return lastComparison;
13539
        }
13540
      }
13541
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
13542
      if (lastComparison != 0) {
13543
        return lastComparison;
13544
      }
13545
      if (isSetDate()) {
13546
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
13547
        if (lastComparison != 0) {
13548
          return lastComparison;
13549
        }
13550
      }
13551
      return 0;
13552
    }
13553
 
13554
    public _Fields fieldForId(int fieldId) {
13555
      return _Fields.findByThriftId(fieldId);
13556
    }
13557
 
13558
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13559
      org.apache.thrift.protocol.TField field;
13560
      iprot.readStructBegin();
13561
      while (true)
13562
      {
13563
        field = iprot.readFieldBegin();
13564
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13565
          break;
13566
        }
13567
        switch (field.id) {
13568
          case 1: // WAREHOUSE_ID
13569
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13570
              this.warehouseId = iprot.readI64();
13571
              setWarehouseIdIsSet(true);
13572
            } else { 
13573
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13574
            }
13575
            break;
13576
          case 2: // SUPPLIER_ID
13577
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13578
              this.supplierId = iprot.readI64();
13579
              setSupplierIdIsSet(true);
13580
            } else { 
13581
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13582
            }
13583
            break;
13584
          case 3: // DATE
13585
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13586
              this.date = iprot.readI64();
13587
              setDateIsSet(true);
13588
            } else { 
13589
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13590
            }
13591
            break;
13592
          default:
13593
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13594
        }
13595
        iprot.readFieldEnd();
13596
      }
13597
      iprot.readStructEnd();
13598
      validate();
13599
    }
13600
 
13601
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13602
      validate();
13603
 
13604
      oprot.writeStructBegin(STRUCT_DESC);
13605
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
13606
      oprot.writeI64(this.warehouseId);
13607
      oprot.writeFieldEnd();
13608
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
13609
      oprot.writeI64(this.supplierId);
13610
      oprot.writeFieldEnd();
13611
      oprot.writeFieldBegin(DATE_FIELD_DESC);
13612
      oprot.writeI64(this.date);
13613
      oprot.writeFieldEnd();
13614
      oprot.writeFieldStop();
13615
      oprot.writeStructEnd();
13616
    }
13617
 
13618
    @Override
13619
    public String toString() {
13620
      StringBuilder sb = new StringBuilder("getInvoicesForWarehouse_args(");
13621
      boolean first = true;
13622
 
13623
      sb.append("warehouseId:");
13624
      sb.append(this.warehouseId);
13625
      first = false;
13626
      if (!first) sb.append(", ");
13627
      sb.append("supplierId:");
13628
      sb.append(this.supplierId);
13629
      first = false;
13630
      if (!first) sb.append(", ");
13631
      sb.append("date:");
13632
      sb.append(this.date);
13633
      first = false;
13634
      sb.append(")");
13635
      return sb.toString();
13636
    }
13637
 
13638
    public void validate() throws org.apache.thrift.TException {
13639
      // check for required fields
13640
    }
13641
 
13642
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13643
      try {
13644
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13645
      } catch (org.apache.thrift.TException te) {
13646
        throw new java.io.IOException(te);
13647
      }
13648
    }
13649
 
13650
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13651
      try {
13652
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
13653
        __isset_bit_vector = new BitSet(1);
13654
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13655
      } catch (org.apache.thrift.TException te) {
13656
        throw new java.io.IOException(te);
13657
      }
13658
    }
13659
 
13660
  }
13661
 
13662
  public static class getInvoicesForWarehouse_result implements org.apache.thrift.TBase<getInvoicesForWarehouse_result, getInvoicesForWarehouse_result._Fields>, java.io.Serializable, Cloneable   {
13663
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoicesForWarehouse_result");
13664
 
13665
    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);
13666
 
13667
    private List<Invoice> success; // required
13668
 
13669
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13670
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13671
      SUCCESS((short)0, "success");
13672
 
13673
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13674
 
13675
      static {
13676
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13677
          byName.put(field.getFieldName(), field);
13678
        }
13679
      }
13680
 
13681
      /**
13682
       * Find the _Fields constant that matches fieldId, or null if its not found.
13683
       */
13684
      public static _Fields findByThriftId(int fieldId) {
13685
        switch(fieldId) {
13686
          case 0: // SUCCESS
13687
            return SUCCESS;
13688
          default:
13689
            return null;
13690
        }
13691
      }
13692
 
13693
      /**
13694
       * Find the _Fields constant that matches fieldId, throwing an exception
13695
       * if it is not found.
13696
       */
13697
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13698
        _Fields fields = findByThriftId(fieldId);
13699
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13700
        return fields;
13701
      }
13702
 
13703
      /**
13704
       * Find the _Fields constant that matches name, or null if its not found.
13705
       */
13706
      public static _Fields findByName(String name) {
13707
        return byName.get(name);
13708
      }
13709
 
13710
      private final short _thriftId;
13711
      private final String _fieldName;
13712
 
13713
      _Fields(short thriftId, String fieldName) {
13714
        _thriftId = thriftId;
13715
        _fieldName = fieldName;
13716
      }
13717
 
13718
      public short getThriftFieldId() {
13719
        return _thriftId;
13720
      }
13721
 
13722
      public String getFieldName() {
13723
        return _fieldName;
13724
      }
13725
    }
13726
 
13727
    // isset id assignments
13728
 
13729
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13730
    static {
13731
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13732
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13733
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
13734
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class))));
13735
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13736
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoicesForWarehouse_result.class, metaDataMap);
13737
    }
13738
 
13739
    public getInvoicesForWarehouse_result() {
13740
    }
13741
 
13742
    public getInvoicesForWarehouse_result(
13743
      List<Invoice> success)
13744
    {
13745
      this();
13746
      this.success = success;
13747
    }
13748
 
13749
    /**
13750
     * Performs a deep copy on <i>other</i>.
13751
     */
13752
    public getInvoicesForWarehouse_result(getInvoicesForWarehouse_result other) {
13753
      if (other.isSetSuccess()) {
13754
        List<Invoice> __this__success = new ArrayList<Invoice>();
13755
        for (Invoice other_element : other.success) {
13756
          __this__success.add(new Invoice(other_element));
13757
        }
13758
        this.success = __this__success;
13759
      }
13760
    }
13761
 
13762
    public getInvoicesForWarehouse_result deepCopy() {
13763
      return new getInvoicesForWarehouse_result(this);
13764
    }
13765
 
13766
    @Override
13767
    public void clear() {
13768
      this.success = null;
13769
    }
13770
 
13771
    public int getSuccessSize() {
13772
      return (this.success == null) ? 0 : this.success.size();
13773
    }
13774
 
13775
    public java.util.Iterator<Invoice> getSuccessIterator() {
13776
      return (this.success == null) ? null : this.success.iterator();
13777
    }
13778
 
13779
    public void addToSuccess(Invoice elem) {
13780
      if (this.success == null) {
13781
        this.success = new ArrayList<Invoice>();
13782
      }
13783
      this.success.add(elem);
13784
    }
13785
 
13786
    public List<Invoice> getSuccess() {
13787
      return this.success;
13788
    }
13789
 
13790
    public void setSuccess(List<Invoice> success) {
13791
      this.success = success;
13792
    }
13793
 
13794
    public void unsetSuccess() {
13795
      this.success = null;
13796
    }
13797
 
13798
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
13799
    public boolean isSetSuccess() {
13800
      return this.success != null;
13801
    }
13802
 
13803
    public void setSuccessIsSet(boolean value) {
13804
      if (!value) {
13805
        this.success = null;
13806
      }
13807
    }
13808
 
13809
    public void setFieldValue(_Fields field, Object value) {
13810
      switch (field) {
13811
      case SUCCESS:
13812
        if (value == null) {
13813
          unsetSuccess();
13814
        } else {
13815
          setSuccess((List<Invoice>)value);
13816
        }
13817
        break;
13818
 
13819
      }
13820
    }
13821
 
13822
    public Object getFieldValue(_Fields field) {
13823
      switch (field) {
13824
      case SUCCESS:
13825
        return getSuccess();
13826
 
13827
      }
13828
      throw new IllegalStateException();
13829
    }
13830
 
13831
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13832
    public boolean isSet(_Fields field) {
13833
      if (field == null) {
13834
        throw new IllegalArgumentException();
13835
      }
13836
 
13837
      switch (field) {
13838
      case SUCCESS:
13839
        return isSetSuccess();
13840
      }
13841
      throw new IllegalStateException();
13842
    }
13843
 
13844
    @Override
13845
    public boolean equals(Object that) {
13846
      if (that == null)
13847
        return false;
13848
      if (that instanceof getInvoicesForWarehouse_result)
13849
        return this.equals((getInvoicesForWarehouse_result)that);
13850
      return false;
13851
    }
13852
 
13853
    public boolean equals(getInvoicesForWarehouse_result that) {
13854
      if (that == null)
13855
        return false;
13856
 
13857
      boolean this_present_success = true && this.isSetSuccess();
13858
      boolean that_present_success = true && that.isSetSuccess();
13859
      if (this_present_success || that_present_success) {
13860
        if (!(this_present_success && that_present_success))
13861
          return false;
13862
        if (!this.success.equals(that.success))
13863
          return false;
13864
      }
13865
 
13866
      return true;
13867
    }
13868
 
13869
    @Override
13870
    public int hashCode() {
13871
      return 0;
13872
    }
13873
 
13874
    public int compareTo(getInvoicesForWarehouse_result other) {
13875
      if (!getClass().equals(other.getClass())) {
13876
        return getClass().getName().compareTo(other.getClass().getName());
13877
      }
13878
 
13879
      int lastComparison = 0;
13880
      getInvoicesForWarehouse_result typedOther = (getInvoicesForWarehouse_result)other;
13881
 
13882
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
13883
      if (lastComparison != 0) {
13884
        return lastComparison;
13885
      }
13886
      if (isSetSuccess()) {
13887
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
13888
        if (lastComparison != 0) {
13889
          return lastComparison;
13890
        }
13891
      }
13892
      return 0;
13893
    }
13894
 
13895
    public _Fields fieldForId(int fieldId) {
13896
      return _Fields.findByThriftId(fieldId);
13897
    }
13898
 
13899
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13900
      org.apache.thrift.protocol.TField field;
13901
      iprot.readStructBegin();
13902
      while (true)
13903
      {
13904
        field = iprot.readFieldBegin();
13905
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13906
          break;
13907
        }
13908
        switch (field.id) {
13909
          case 0: // SUCCESS
13910
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
13911
              {
13912
                org.apache.thrift.protocol.TList _list28 = iprot.readListBegin();
13913
                this.success = new ArrayList<Invoice>(_list28.size);
13914
                for (int _i29 = 0; _i29 < _list28.size; ++_i29)
13915
                {
13916
                  Invoice _elem30; // required
13917
                  _elem30 = new Invoice();
13918
                  _elem30.read(iprot);
13919
                  this.success.add(_elem30);
13920
                }
13921
                iprot.readListEnd();
13922
              }
13923
            } else { 
13924
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13925
            }
13926
            break;
13927
          default:
13928
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13929
        }
13930
        iprot.readFieldEnd();
13931
      }
13932
      iprot.readStructEnd();
13933
      validate();
13934
    }
13935
 
13936
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13937
      oprot.writeStructBegin(STRUCT_DESC);
13938
 
13939
      if (this.isSetSuccess()) {
13940
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13941
        {
13942
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
13943
          for (Invoice _iter31 : this.success)
13944
          {
13945
            _iter31.write(oprot);
13946
          }
13947
          oprot.writeListEnd();
13948
        }
13949
        oprot.writeFieldEnd();
13950
      }
13951
      oprot.writeFieldStop();
13952
      oprot.writeStructEnd();
13953
    }
13954
 
13955
    @Override
13956
    public String toString() {
13957
      StringBuilder sb = new StringBuilder("getInvoicesForWarehouse_result(");
13958
      boolean first = true;
13959
 
13960
      sb.append("success:");
13961
      if (this.success == null) {
13962
        sb.append("null");
13963
      } else {
13964
        sb.append(this.success);
13965
      }
13966
      first = false;
13967
      sb.append(")");
13968
      return sb.toString();
13969
    }
13970
 
13971
    public void validate() throws org.apache.thrift.TException {
13972
      // check for required fields
13973
    }
13974
 
13975
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13976
      try {
13977
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13978
      } catch (org.apache.thrift.TException te) {
13979
        throw new java.io.IOException(te);
13980
      }
13981
    }
13982
 
13983
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13984
      try {
13985
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13986
      } catch (org.apache.thrift.TException te) {
13987
        throw new java.io.IOException(te);
13988
      }
13989
    }
13990
 
13991
  }
13992
 
5443 mandeep.dh 13993
  public static class createInvoice_args implements org.apache.thrift.TBase<createInvoice_args, createInvoice_args._Fields>, java.io.Serializable, Cloneable   {
13994
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_args");
13995
 
13996
    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);
13997
 
13998
    private Invoice invoice; // required
13999
 
14000
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14001
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14002
      INVOICE((short)1, "invoice");
14003
 
14004
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14005
 
14006
      static {
14007
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14008
          byName.put(field.getFieldName(), field);
14009
        }
14010
      }
14011
 
14012
      /**
14013
       * Find the _Fields constant that matches fieldId, or null if its not found.
14014
       */
14015
      public static _Fields findByThriftId(int fieldId) {
14016
        switch(fieldId) {
14017
          case 1: // INVOICE
14018
            return INVOICE;
14019
          default:
14020
            return null;
14021
        }
14022
      }
14023
 
14024
      /**
14025
       * Find the _Fields constant that matches fieldId, throwing an exception
14026
       * if it is not found.
14027
       */
14028
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14029
        _Fields fields = findByThriftId(fieldId);
14030
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14031
        return fields;
14032
      }
14033
 
14034
      /**
14035
       * Find the _Fields constant that matches name, or null if its not found.
14036
       */
14037
      public static _Fields findByName(String name) {
14038
        return byName.get(name);
14039
      }
14040
 
14041
      private final short _thriftId;
14042
      private final String _fieldName;
14043
 
14044
      _Fields(short thriftId, String fieldName) {
14045
        _thriftId = thriftId;
14046
        _fieldName = fieldName;
14047
      }
14048
 
14049
      public short getThriftFieldId() {
14050
        return _thriftId;
14051
      }
14052
 
14053
      public String getFieldName() {
14054
        return _fieldName;
14055
      }
14056
    }
14057
 
14058
    // isset id assignments
14059
 
14060
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14061
    static {
14062
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14063
      tmpMap.put(_Fields.INVOICE, new org.apache.thrift.meta_data.FieldMetaData("invoice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14064
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class)));
14065
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14066
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_args.class, metaDataMap);
14067
    }
14068
 
14069
    public createInvoice_args() {
14070
    }
14071
 
14072
    public createInvoice_args(
14073
      Invoice invoice)
14074
    {
14075
      this();
14076
      this.invoice = invoice;
14077
    }
14078
 
14079
    /**
14080
     * Performs a deep copy on <i>other</i>.
14081
     */
14082
    public createInvoice_args(createInvoice_args other) {
14083
      if (other.isSetInvoice()) {
14084
        this.invoice = new Invoice(other.invoice);
14085
      }
14086
    }
14087
 
14088
    public createInvoice_args deepCopy() {
14089
      return new createInvoice_args(this);
14090
    }
14091
 
14092
    @Override
14093
    public void clear() {
14094
      this.invoice = null;
14095
    }
14096
 
14097
    public Invoice getInvoice() {
14098
      return this.invoice;
14099
    }
14100
 
14101
    public void setInvoice(Invoice invoice) {
14102
      this.invoice = invoice;
14103
    }
14104
 
14105
    public void unsetInvoice() {
14106
      this.invoice = null;
14107
    }
14108
 
14109
    /** Returns true if field invoice is set (has been assigned a value) and false otherwise */
14110
    public boolean isSetInvoice() {
14111
      return this.invoice != null;
14112
    }
14113
 
14114
    public void setInvoiceIsSet(boolean value) {
14115
      if (!value) {
14116
        this.invoice = null;
14117
      }
14118
    }
14119
 
14120
    public void setFieldValue(_Fields field, Object value) {
14121
      switch (field) {
14122
      case INVOICE:
14123
        if (value == null) {
14124
          unsetInvoice();
14125
        } else {
14126
          setInvoice((Invoice)value);
14127
        }
14128
        break;
14129
 
14130
      }
14131
    }
14132
 
14133
    public Object getFieldValue(_Fields field) {
14134
      switch (field) {
14135
      case INVOICE:
14136
        return getInvoice();
14137
 
14138
      }
14139
      throw new IllegalStateException();
14140
    }
14141
 
14142
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14143
    public boolean isSet(_Fields field) {
14144
      if (field == null) {
14145
        throw new IllegalArgumentException();
14146
      }
14147
 
14148
      switch (field) {
14149
      case INVOICE:
14150
        return isSetInvoice();
14151
      }
14152
      throw new IllegalStateException();
14153
    }
14154
 
14155
    @Override
14156
    public boolean equals(Object that) {
14157
      if (that == null)
14158
        return false;
14159
      if (that instanceof createInvoice_args)
14160
        return this.equals((createInvoice_args)that);
14161
      return false;
14162
    }
14163
 
14164
    public boolean equals(createInvoice_args that) {
14165
      if (that == null)
14166
        return false;
14167
 
14168
      boolean this_present_invoice = true && this.isSetInvoice();
14169
      boolean that_present_invoice = true && that.isSetInvoice();
14170
      if (this_present_invoice || that_present_invoice) {
14171
        if (!(this_present_invoice && that_present_invoice))
14172
          return false;
14173
        if (!this.invoice.equals(that.invoice))
14174
          return false;
14175
      }
14176
 
14177
      return true;
14178
    }
14179
 
14180
    @Override
14181
    public int hashCode() {
14182
      return 0;
14183
    }
14184
 
14185
    public int compareTo(createInvoice_args other) {
14186
      if (!getClass().equals(other.getClass())) {
14187
        return getClass().getName().compareTo(other.getClass().getName());
14188
      }
14189
 
14190
      int lastComparison = 0;
14191
      createInvoice_args typedOther = (createInvoice_args)other;
14192
 
14193
      lastComparison = Boolean.valueOf(isSetInvoice()).compareTo(typedOther.isSetInvoice());
14194
      if (lastComparison != 0) {
14195
        return lastComparison;
14196
      }
14197
      if (isSetInvoice()) {
14198
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoice, typedOther.invoice);
14199
        if (lastComparison != 0) {
14200
          return lastComparison;
14201
        }
14202
      }
14203
      return 0;
14204
    }
14205
 
14206
    public _Fields fieldForId(int fieldId) {
14207
      return _Fields.findByThriftId(fieldId);
14208
    }
14209
 
14210
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14211
      org.apache.thrift.protocol.TField field;
14212
      iprot.readStructBegin();
14213
      while (true)
14214
      {
14215
        field = iprot.readFieldBegin();
14216
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14217
          break;
14218
        }
14219
        switch (field.id) {
14220
          case 1: // INVOICE
14221
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14222
              this.invoice = new Invoice();
14223
              this.invoice.read(iprot);
14224
            } else { 
14225
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14226
            }
14227
            break;
14228
          default:
14229
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14230
        }
14231
        iprot.readFieldEnd();
14232
      }
14233
      iprot.readStructEnd();
14234
      validate();
14235
    }
14236
 
14237
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14238
      validate();
14239
 
14240
      oprot.writeStructBegin(STRUCT_DESC);
14241
      if (this.invoice != null) {
14242
        oprot.writeFieldBegin(INVOICE_FIELD_DESC);
14243
        this.invoice.write(oprot);
14244
        oprot.writeFieldEnd();
14245
      }
14246
      oprot.writeFieldStop();
14247
      oprot.writeStructEnd();
14248
    }
14249
 
14250
    @Override
14251
    public String toString() {
14252
      StringBuilder sb = new StringBuilder("createInvoice_args(");
14253
      boolean first = true;
14254
 
14255
      sb.append("invoice:");
14256
      if (this.invoice == null) {
14257
        sb.append("null");
14258
      } else {
14259
        sb.append(this.invoice);
14260
      }
14261
      first = false;
14262
      sb.append(")");
14263
      return sb.toString();
14264
    }
14265
 
14266
    public void validate() throws org.apache.thrift.TException {
14267
      // check for required fields
14268
    }
14269
 
14270
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14271
      try {
14272
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14273
      } catch (org.apache.thrift.TException te) {
14274
        throw new java.io.IOException(te);
14275
      }
14276
    }
14277
 
14278
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14279
      try {
14280
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14281
      } catch (org.apache.thrift.TException te) {
14282
        throw new java.io.IOException(te);
14283
      }
14284
    }
14285
 
14286
  }
14287
 
14288
  public static class createInvoice_result implements org.apache.thrift.TBase<createInvoice_result, createInvoice_result._Fields>, java.io.Serializable, Cloneable   {
14289
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_result");
14290
 
14291
    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);
14292
 
14293
    private PurchaseServiceException e; // required
14294
 
14295
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14296
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14297
      E((short)1, "e");
14298
 
14299
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14300
 
14301
      static {
14302
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14303
          byName.put(field.getFieldName(), field);
14304
        }
14305
      }
14306
 
14307
      /**
14308
       * Find the _Fields constant that matches fieldId, or null if its not found.
14309
       */
14310
      public static _Fields findByThriftId(int fieldId) {
14311
        switch(fieldId) {
14312
          case 1: // E
14313
            return E;
14314
          default:
14315
            return null;
14316
        }
14317
      }
14318
 
14319
      /**
14320
       * Find the _Fields constant that matches fieldId, throwing an exception
14321
       * if it is not found.
14322
       */
14323
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14324
        _Fields fields = findByThriftId(fieldId);
14325
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14326
        return fields;
14327
      }
14328
 
14329
      /**
14330
       * Find the _Fields constant that matches name, or null if its not found.
14331
       */
14332
      public static _Fields findByName(String name) {
14333
        return byName.get(name);
14334
      }
14335
 
14336
      private final short _thriftId;
14337
      private final String _fieldName;
14338
 
14339
      _Fields(short thriftId, String fieldName) {
14340
        _thriftId = thriftId;
14341
        _fieldName = fieldName;
14342
      }
14343
 
14344
      public short getThriftFieldId() {
14345
        return _thriftId;
14346
      }
14347
 
14348
      public String getFieldName() {
14349
        return _fieldName;
14350
      }
14351
    }
14352
 
14353
    // isset id assignments
14354
 
14355
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14356
    static {
14357
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14358
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14359
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
14360
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14361
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_result.class, metaDataMap);
14362
    }
14363
 
14364
    public createInvoice_result() {
14365
    }
14366
 
14367
    public createInvoice_result(
14368
      PurchaseServiceException e)
14369
    {
14370
      this();
14371
      this.e = e;
14372
    }
14373
 
14374
    /**
14375
     * Performs a deep copy on <i>other</i>.
14376
     */
14377
    public createInvoice_result(createInvoice_result other) {
14378
      if (other.isSetE()) {
14379
        this.e = new PurchaseServiceException(other.e);
14380
      }
14381
    }
14382
 
14383
    public createInvoice_result deepCopy() {
14384
      return new createInvoice_result(this);
14385
    }
14386
 
14387
    @Override
14388
    public void clear() {
14389
      this.e = null;
14390
    }
14391
 
14392
    public PurchaseServiceException getE() {
14393
      return this.e;
14394
    }
14395
 
14396
    public void setE(PurchaseServiceException e) {
14397
      this.e = e;
14398
    }
14399
 
14400
    public void unsetE() {
14401
      this.e = null;
14402
    }
14403
 
14404
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
14405
    public boolean isSetE() {
14406
      return this.e != null;
14407
    }
14408
 
14409
    public void setEIsSet(boolean value) {
14410
      if (!value) {
14411
        this.e = null;
14412
      }
14413
    }
14414
 
14415
    public void setFieldValue(_Fields field, Object value) {
14416
      switch (field) {
14417
      case E:
14418
        if (value == null) {
14419
          unsetE();
14420
        } else {
14421
          setE((PurchaseServiceException)value);
14422
        }
14423
        break;
14424
 
14425
      }
14426
    }
14427
 
14428
    public Object getFieldValue(_Fields field) {
14429
      switch (field) {
14430
      case E:
14431
        return getE();
14432
 
14433
      }
14434
      throw new IllegalStateException();
14435
    }
14436
 
14437
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14438
    public boolean isSet(_Fields field) {
14439
      if (field == null) {
14440
        throw new IllegalArgumentException();
14441
      }
14442
 
14443
      switch (field) {
14444
      case E:
14445
        return isSetE();
14446
      }
14447
      throw new IllegalStateException();
14448
    }
14449
 
14450
    @Override
14451
    public boolean equals(Object that) {
14452
      if (that == null)
14453
        return false;
14454
      if (that instanceof createInvoice_result)
14455
        return this.equals((createInvoice_result)that);
14456
      return false;
14457
    }
14458
 
14459
    public boolean equals(createInvoice_result that) {
14460
      if (that == null)
14461
        return false;
14462
 
14463
      boolean this_present_e = true && this.isSetE();
14464
      boolean that_present_e = true && that.isSetE();
14465
      if (this_present_e || that_present_e) {
14466
        if (!(this_present_e && that_present_e))
14467
          return false;
14468
        if (!this.e.equals(that.e))
14469
          return false;
14470
      }
14471
 
14472
      return true;
14473
    }
14474
 
14475
    @Override
14476
    public int hashCode() {
14477
      return 0;
14478
    }
14479
 
14480
    public int compareTo(createInvoice_result other) {
14481
      if (!getClass().equals(other.getClass())) {
14482
        return getClass().getName().compareTo(other.getClass().getName());
14483
      }
14484
 
14485
      int lastComparison = 0;
14486
      createInvoice_result typedOther = (createInvoice_result)other;
14487
 
14488
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
14489
      if (lastComparison != 0) {
14490
        return lastComparison;
14491
      }
14492
      if (isSetE()) {
14493
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
14494
        if (lastComparison != 0) {
14495
          return lastComparison;
14496
        }
14497
      }
14498
      return 0;
14499
    }
14500
 
14501
    public _Fields fieldForId(int fieldId) {
14502
      return _Fields.findByThriftId(fieldId);
14503
    }
14504
 
14505
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14506
      org.apache.thrift.protocol.TField field;
14507
      iprot.readStructBegin();
14508
      while (true)
14509
      {
14510
        field = iprot.readFieldBegin();
14511
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14512
          break;
14513
        }
14514
        switch (field.id) {
14515
          case 1: // E
14516
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14517
              this.e = new PurchaseServiceException();
14518
              this.e.read(iprot);
14519
            } else { 
14520
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14521
            }
14522
            break;
14523
          default:
14524
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14525
        }
14526
        iprot.readFieldEnd();
14527
      }
14528
      iprot.readStructEnd();
14529
      validate();
14530
    }
14531
 
14532
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14533
      oprot.writeStructBegin(STRUCT_DESC);
14534
 
14535
      if (this.isSetE()) {
14536
        oprot.writeFieldBegin(E_FIELD_DESC);
14537
        this.e.write(oprot);
14538
        oprot.writeFieldEnd();
14539
      }
14540
      oprot.writeFieldStop();
14541
      oprot.writeStructEnd();
14542
    }
14543
 
14544
    @Override
14545
    public String toString() {
14546
      StringBuilder sb = new StringBuilder("createInvoice_result(");
14547
      boolean first = true;
14548
 
14549
      sb.append("e:");
14550
      if (this.e == null) {
14551
        sb.append("null");
14552
      } else {
14553
        sb.append(this.e);
14554
      }
14555
      first = false;
14556
      sb.append(")");
14557
      return sb.toString();
14558
    }
14559
 
14560
    public void validate() throws org.apache.thrift.TException {
14561
      // check for required fields
14562
    }
14563
 
14564
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14565
      try {
14566
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14567
      } catch (org.apache.thrift.TException te) {
14568
        throw new java.io.IOException(te);
14569
      }
14570
    }
14571
 
14572
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14573
      try {
14574
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14575
      } catch (org.apache.thrift.TException te) {
14576
        throw new java.io.IOException(te);
14577
      }
14578
    }
14579
 
14580
  }
14581
 
5591 mandeep.dh 14582
  public static class addSupplier_args implements org.apache.thrift.TBase<addSupplier_args, addSupplier_args._Fields>, java.io.Serializable, Cloneable   {
14583
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSupplier_args");
14584
 
14585
    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);
14586
 
14587
    private Supplier supplier; // required
14588
 
14589
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14590
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14591
      SUPPLIER((short)1, "supplier");
14592
 
14593
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14594
 
14595
      static {
14596
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14597
          byName.put(field.getFieldName(), field);
14598
        }
14599
      }
14600
 
14601
      /**
14602
       * Find the _Fields constant that matches fieldId, or null if its not found.
14603
       */
14604
      public static _Fields findByThriftId(int fieldId) {
14605
        switch(fieldId) {
14606
          case 1: // SUPPLIER
14607
            return SUPPLIER;
14608
          default:
14609
            return null;
14610
        }
14611
      }
14612
 
14613
      /**
14614
       * Find the _Fields constant that matches fieldId, throwing an exception
14615
       * if it is not found.
14616
       */
14617
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14618
        _Fields fields = findByThriftId(fieldId);
14619
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14620
        return fields;
14621
      }
14622
 
14623
      /**
14624
       * Find the _Fields constant that matches name, or null if its not found.
14625
       */
14626
      public static _Fields findByName(String name) {
14627
        return byName.get(name);
14628
      }
14629
 
14630
      private final short _thriftId;
14631
      private final String _fieldName;
14632
 
14633
      _Fields(short thriftId, String fieldName) {
14634
        _thriftId = thriftId;
14635
        _fieldName = fieldName;
14636
      }
14637
 
14638
      public short getThriftFieldId() {
14639
        return _thriftId;
14640
      }
14641
 
14642
      public String getFieldName() {
14643
        return _fieldName;
14644
      }
14645
    }
14646
 
14647
    // isset id assignments
14648
 
14649
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14650
    static {
14651
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14652
      tmpMap.put(_Fields.SUPPLIER, new org.apache.thrift.meta_data.FieldMetaData("supplier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14653
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
14654
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14655
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSupplier_args.class, metaDataMap);
14656
    }
14657
 
14658
    public addSupplier_args() {
14659
    }
14660
 
14661
    public addSupplier_args(
14662
      Supplier supplier)
14663
    {
14664
      this();
14665
      this.supplier = supplier;
14666
    }
14667
 
14668
    /**
14669
     * Performs a deep copy on <i>other</i>.
14670
     */
14671
    public addSupplier_args(addSupplier_args other) {
14672
      if (other.isSetSupplier()) {
14673
        this.supplier = new Supplier(other.supplier);
14674
      }
14675
    }
14676
 
14677
    public addSupplier_args deepCopy() {
14678
      return new addSupplier_args(this);
14679
    }
14680
 
14681
    @Override
14682
    public void clear() {
14683
      this.supplier = null;
14684
    }
14685
 
14686
    public Supplier getSupplier() {
14687
      return this.supplier;
14688
    }
14689
 
14690
    public void setSupplier(Supplier supplier) {
14691
      this.supplier = supplier;
14692
    }
14693
 
14694
    public void unsetSupplier() {
14695
      this.supplier = null;
14696
    }
14697
 
14698
    /** Returns true if field supplier is set (has been assigned a value) and false otherwise */
14699
    public boolean isSetSupplier() {
14700
      return this.supplier != null;
14701
    }
14702
 
14703
    public void setSupplierIsSet(boolean value) {
14704
      if (!value) {
14705
        this.supplier = null;
14706
      }
14707
    }
14708
 
14709
    public void setFieldValue(_Fields field, Object value) {
14710
      switch (field) {
14711
      case SUPPLIER:
14712
        if (value == null) {
14713
          unsetSupplier();
14714
        } else {
14715
          setSupplier((Supplier)value);
14716
        }
14717
        break;
14718
 
14719
      }
14720
    }
14721
 
14722
    public Object getFieldValue(_Fields field) {
14723
      switch (field) {
14724
      case SUPPLIER:
14725
        return getSupplier();
14726
 
14727
      }
14728
      throw new IllegalStateException();
14729
    }
14730
 
14731
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14732
    public boolean isSet(_Fields field) {
14733
      if (field == null) {
14734
        throw new IllegalArgumentException();
14735
      }
14736
 
14737
      switch (field) {
14738
      case SUPPLIER:
14739
        return isSetSupplier();
14740
      }
14741
      throw new IllegalStateException();
14742
    }
14743
 
14744
    @Override
14745
    public boolean equals(Object that) {
14746
      if (that == null)
14747
        return false;
14748
      if (that instanceof addSupplier_args)
14749
        return this.equals((addSupplier_args)that);
14750
      return false;
14751
    }
14752
 
14753
    public boolean equals(addSupplier_args that) {
14754
      if (that == null)
14755
        return false;
14756
 
14757
      boolean this_present_supplier = true && this.isSetSupplier();
14758
      boolean that_present_supplier = true && that.isSetSupplier();
14759
      if (this_present_supplier || that_present_supplier) {
14760
        if (!(this_present_supplier && that_present_supplier))
14761
          return false;
14762
        if (!this.supplier.equals(that.supplier))
14763
          return false;
14764
      }
14765
 
14766
      return true;
14767
    }
14768
 
14769
    @Override
14770
    public int hashCode() {
14771
      return 0;
14772
    }
14773
 
14774
    public int compareTo(addSupplier_args other) {
14775
      if (!getClass().equals(other.getClass())) {
14776
        return getClass().getName().compareTo(other.getClass().getName());
14777
      }
14778
 
14779
      int lastComparison = 0;
14780
      addSupplier_args typedOther = (addSupplier_args)other;
14781
 
14782
      lastComparison = Boolean.valueOf(isSetSupplier()).compareTo(typedOther.isSetSupplier());
14783
      if (lastComparison != 0) {
14784
        return lastComparison;
14785
      }
14786
      if (isSetSupplier()) {
14787
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplier, typedOther.supplier);
14788
        if (lastComparison != 0) {
14789
          return lastComparison;
14790
        }
14791
      }
14792
      return 0;
14793
    }
14794
 
14795
    public _Fields fieldForId(int fieldId) {
14796
      return _Fields.findByThriftId(fieldId);
14797
    }
14798
 
14799
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14800
      org.apache.thrift.protocol.TField field;
14801
      iprot.readStructBegin();
14802
      while (true)
14803
      {
14804
        field = iprot.readFieldBegin();
14805
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14806
          break;
14807
        }
14808
        switch (field.id) {
14809
          case 1: // SUPPLIER
14810
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14811
              this.supplier = new Supplier();
14812
              this.supplier.read(iprot);
14813
            } else { 
14814
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14815
            }
14816
            break;
14817
          default:
14818
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14819
        }
14820
        iprot.readFieldEnd();
14821
      }
14822
      iprot.readStructEnd();
14823
      validate();
14824
    }
14825
 
14826
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14827
      validate();
14828
 
14829
      oprot.writeStructBegin(STRUCT_DESC);
14830
      if (this.supplier != null) {
14831
        oprot.writeFieldBegin(SUPPLIER_FIELD_DESC);
14832
        this.supplier.write(oprot);
14833
        oprot.writeFieldEnd();
14834
      }
14835
      oprot.writeFieldStop();
14836
      oprot.writeStructEnd();
14837
    }
14838
 
14839
    @Override
14840
    public String toString() {
14841
      StringBuilder sb = new StringBuilder("addSupplier_args(");
14842
      boolean first = true;
14843
 
14844
      sb.append("supplier:");
14845
      if (this.supplier == null) {
14846
        sb.append("null");
14847
      } else {
14848
        sb.append(this.supplier);
14849
      }
14850
      first = false;
14851
      sb.append(")");
14852
      return sb.toString();
14853
    }
14854
 
14855
    public void validate() throws org.apache.thrift.TException {
14856
      // check for required fields
14857
    }
14858
 
14859
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14860
      try {
14861
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14862
      } catch (org.apache.thrift.TException te) {
14863
        throw new java.io.IOException(te);
14864
      }
14865
    }
14866
 
14867
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14868
      try {
14869
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14870
      } catch (org.apache.thrift.TException te) {
14871
        throw new java.io.IOException(te);
14872
      }
14873
    }
14874
 
14875
  }
14876
 
14877
  public static class addSupplier_result implements org.apache.thrift.TBase<addSupplier_result, addSupplier_result._Fields>, java.io.Serializable, Cloneable   {
14878
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSupplier_result");
14879
 
14880
    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);
14881
 
14882
    private Supplier success; // required
14883
 
14884
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14885
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14886
      SUCCESS((short)0, "success");
14887
 
14888
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14889
 
14890
      static {
14891
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14892
          byName.put(field.getFieldName(), field);
14893
        }
14894
      }
14895
 
14896
      /**
14897
       * Find the _Fields constant that matches fieldId, or null if its not found.
14898
       */
14899
      public static _Fields findByThriftId(int fieldId) {
14900
        switch(fieldId) {
14901
          case 0: // SUCCESS
14902
            return SUCCESS;
14903
          default:
14904
            return null;
14905
        }
14906
      }
14907
 
14908
      /**
14909
       * Find the _Fields constant that matches fieldId, throwing an exception
14910
       * if it is not found.
14911
       */
14912
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14913
        _Fields fields = findByThriftId(fieldId);
14914
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14915
        return fields;
14916
      }
14917
 
14918
      /**
14919
       * Find the _Fields constant that matches name, or null if its not found.
14920
       */
14921
      public static _Fields findByName(String name) {
14922
        return byName.get(name);
14923
      }
14924
 
14925
      private final short _thriftId;
14926
      private final String _fieldName;
14927
 
14928
      _Fields(short thriftId, String fieldName) {
14929
        _thriftId = thriftId;
14930
        _fieldName = fieldName;
14931
      }
14932
 
14933
      public short getThriftFieldId() {
14934
        return _thriftId;
14935
      }
14936
 
14937
      public String getFieldName() {
14938
        return _fieldName;
14939
      }
14940
    }
14941
 
14942
    // isset id assignments
14943
 
14944
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14945
    static {
14946
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14947
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14948
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
14949
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14950
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSupplier_result.class, metaDataMap);
14951
    }
14952
 
14953
    public addSupplier_result() {
14954
    }
14955
 
14956
    public addSupplier_result(
14957
      Supplier success)
14958
    {
14959
      this();
14960
      this.success = success;
14961
    }
14962
 
14963
    /**
14964
     * Performs a deep copy on <i>other</i>.
14965
     */
14966
    public addSupplier_result(addSupplier_result other) {
14967
      if (other.isSetSuccess()) {
14968
        this.success = new Supplier(other.success);
14969
      }
14970
    }
14971
 
14972
    public addSupplier_result deepCopy() {
14973
      return new addSupplier_result(this);
14974
    }
14975
 
14976
    @Override
14977
    public void clear() {
14978
      this.success = null;
14979
    }
14980
 
14981
    public Supplier getSuccess() {
14982
      return this.success;
14983
    }
14984
 
14985
    public void setSuccess(Supplier success) {
14986
      this.success = success;
14987
    }
14988
 
14989
    public void unsetSuccess() {
14990
      this.success = null;
14991
    }
14992
 
14993
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
14994
    public boolean isSetSuccess() {
14995
      return this.success != null;
14996
    }
14997
 
14998
    public void setSuccessIsSet(boolean value) {
14999
      if (!value) {
15000
        this.success = null;
15001
      }
15002
    }
15003
 
15004
    public void setFieldValue(_Fields field, Object value) {
15005
      switch (field) {
15006
      case SUCCESS:
15007
        if (value == null) {
15008
          unsetSuccess();
15009
        } else {
15010
          setSuccess((Supplier)value);
15011
        }
15012
        break;
15013
 
15014
      }
15015
    }
15016
 
15017
    public Object getFieldValue(_Fields field) {
15018
      switch (field) {
15019
      case SUCCESS:
15020
        return getSuccess();
15021
 
15022
      }
15023
      throw new IllegalStateException();
15024
    }
15025
 
15026
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15027
    public boolean isSet(_Fields field) {
15028
      if (field == null) {
15029
        throw new IllegalArgumentException();
15030
      }
15031
 
15032
      switch (field) {
15033
      case SUCCESS:
15034
        return isSetSuccess();
15035
      }
15036
      throw new IllegalStateException();
15037
    }
15038
 
15039
    @Override
15040
    public boolean equals(Object that) {
15041
      if (that == null)
15042
        return false;
15043
      if (that instanceof addSupplier_result)
15044
        return this.equals((addSupplier_result)that);
15045
      return false;
15046
    }
15047
 
15048
    public boolean equals(addSupplier_result that) {
15049
      if (that == null)
15050
        return false;
15051
 
15052
      boolean this_present_success = true && this.isSetSuccess();
15053
      boolean that_present_success = true && that.isSetSuccess();
15054
      if (this_present_success || that_present_success) {
15055
        if (!(this_present_success && that_present_success))
15056
          return false;
15057
        if (!this.success.equals(that.success))
15058
          return false;
15059
      }
15060
 
15061
      return true;
15062
    }
15063
 
15064
    @Override
15065
    public int hashCode() {
15066
      return 0;
15067
    }
15068
 
15069
    public int compareTo(addSupplier_result other) {
15070
      if (!getClass().equals(other.getClass())) {
15071
        return getClass().getName().compareTo(other.getClass().getName());
15072
      }
15073
 
15074
      int lastComparison = 0;
15075
      addSupplier_result typedOther = (addSupplier_result)other;
15076
 
15077
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
15078
      if (lastComparison != 0) {
15079
        return lastComparison;
15080
      }
15081
      if (isSetSuccess()) {
15082
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
15083
        if (lastComparison != 0) {
15084
          return lastComparison;
15085
        }
15086
      }
15087
      return 0;
15088
    }
15089
 
15090
    public _Fields fieldForId(int fieldId) {
15091
      return _Fields.findByThriftId(fieldId);
15092
    }
15093
 
15094
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15095
      org.apache.thrift.protocol.TField field;
15096
      iprot.readStructBegin();
15097
      while (true)
15098
      {
15099
        field = iprot.readFieldBegin();
15100
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15101
          break;
15102
        }
15103
        switch (field.id) {
15104
          case 0: // SUCCESS
15105
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15106
              this.success = new Supplier();
15107
              this.success.read(iprot);
15108
            } else { 
15109
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15110
            }
15111
            break;
15112
          default:
15113
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15114
        }
15115
        iprot.readFieldEnd();
15116
      }
15117
      iprot.readStructEnd();
15118
      validate();
15119
    }
15120
 
15121
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15122
      oprot.writeStructBegin(STRUCT_DESC);
15123
 
15124
      if (this.isSetSuccess()) {
15125
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15126
        this.success.write(oprot);
15127
        oprot.writeFieldEnd();
15128
      }
15129
      oprot.writeFieldStop();
15130
      oprot.writeStructEnd();
15131
    }
15132
 
15133
    @Override
15134
    public String toString() {
15135
      StringBuilder sb = new StringBuilder("addSupplier_result(");
15136
      boolean first = true;
15137
 
15138
      sb.append("success:");
15139
      if (this.success == null) {
15140
        sb.append("null");
15141
      } else {
15142
        sb.append(this.success);
15143
      }
15144
      first = false;
15145
      sb.append(")");
15146
      return sb.toString();
15147
    }
15148
 
15149
    public void validate() throws org.apache.thrift.TException {
15150
      // check for required fields
15151
    }
15152
 
15153
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15154
      try {
15155
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15156
      } catch (org.apache.thrift.TException te) {
15157
        throw new java.io.IOException(te);
15158
      }
15159
    }
15160
 
15161
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15162
      try {
15163
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15164
      } catch (org.apache.thrift.TException te) {
15165
        throw new java.io.IOException(te);
15166
      }
15167
    }
15168
 
15169
  }
15170
 
15171
  public static class updateSupplier_args implements org.apache.thrift.TBase<updateSupplier_args, updateSupplier_args._Fields>, java.io.Serializable, Cloneable   {
15172
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSupplier_args");
15173
 
15174
    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);
15175
 
15176
    private Supplier supplier; // required
15177
 
15178
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15179
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15180
      SUPPLIER((short)1, "supplier");
15181
 
15182
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15183
 
15184
      static {
15185
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15186
          byName.put(field.getFieldName(), field);
15187
        }
15188
      }
15189
 
15190
      /**
15191
       * Find the _Fields constant that matches fieldId, or null if its not found.
15192
       */
15193
      public static _Fields findByThriftId(int fieldId) {
15194
        switch(fieldId) {
15195
          case 1: // SUPPLIER
15196
            return SUPPLIER;
15197
          default:
15198
            return null;
15199
        }
15200
      }
15201
 
15202
      /**
15203
       * Find the _Fields constant that matches fieldId, throwing an exception
15204
       * if it is not found.
15205
       */
15206
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15207
        _Fields fields = findByThriftId(fieldId);
15208
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15209
        return fields;
15210
      }
15211
 
15212
      /**
15213
       * Find the _Fields constant that matches name, or null if its not found.
15214
       */
15215
      public static _Fields findByName(String name) {
15216
        return byName.get(name);
15217
      }
15218
 
15219
      private final short _thriftId;
15220
      private final String _fieldName;
15221
 
15222
      _Fields(short thriftId, String fieldName) {
15223
        _thriftId = thriftId;
15224
        _fieldName = fieldName;
15225
      }
15226
 
15227
      public short getThriftFieldId() {
15228
        return _thriftId;
15229
      }
15230
 
15231
      public String getFieldName() {
15232
        return _fieldName;
15233
      }
15234
    }
15235
 
15236
    // isset id assignments
15237
 
15238
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15239
    static {
15240
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15241
      tmpMap.put(_Fields.SUPPLIER, new org.apache.thrift.meta_data.FieldMetaData("supplier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15242
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
15243
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15244
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSupplier_args.class, metaDataMap);
15245
    }
15246
 
15247
    public updateSupplier_args() {
15248
    }
15249
 
15250
    public updateSupplier_args(
15251
      Supplier supplier)
15252
    {
15253
      this();
15254
      this.supplier = supplier;
15255
    }
15256
 
15257
    /**
15258
     * Performs a deep copy on <i>other</i>.
15259
     */
15260
    public updateSupplier_args(updateSupplier_args other) {
15261
      if (other.isSetSupplier()) {
15262
        this.supplier = new Supplier(other.supplier);
15263
      }
15264
    }
15265
 
15266
    public updateSupplier_args deepCopy() {
15267
      return new updateSupplier_args(this);
15268
    }
15269
 
15270
    @Override
15271
    public void clear() {
15272
      this.supplier = null;
15273
    }
15274
 
15275
    public Supplier getSupplier() {
15276
      return this.supplier;
15277
    }
15278
 
15279
    public void setSupplier(Supplier supplier) {
15280
      this.supplier = supplier;
15281
    }
15282
 
15283
    public void unsetSupplier() {
15284
      this.supplier = null;
15285
    }
15286
 
15287
    /** Returns true if field supplier is set (has been assigned a value) and false otherwise */
15288
    public boolean isSetSupplier() {
15289
      return this.supplier != null;
15290
    }
15291
 
15292
    public void setSupplierIsSet(boolean value) {
15293
      if (!value) {
15294
        this.supplier = null;
15295
      }
15296
    }
15297
 
15298
    public void setFieldValue(_Fields field, Object value) {
15299
      switch (field) {
15300
      case SUPPLIER:
15301
        if (value == null) {
15302
          unsetSupplier();
15303
        } else {
15304
          setSupplier((Supplier)value);
15305
        }
15306
        break;
15307
 
15308
      }
15309
    }
15310
 
15311
    public Object getFieldValue(_Fields field) {
15312
      switch (field) {
15313
      case SUPPLIER:
15314
        return getSupplier();
15315
 
15316
      }
15317
      throw new IllegalStateException();
15318
    }
15319
 
15320
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15321
    public boolean isSet(_Fields field) {
15322
      if (field == null) {
15323
        throw new IllegalArgumentException();
15324
      }
15325
 
15326
      switch (field) {
15327
      case SUPPLIER:
15328
        return isSetSupplier();
15329
      }
15330
      throw new IllegalStateException();
15331
    }
15332
 
15333
    @Override
15334
    public boolean equals(Object that) {
15335
      if (that == null)
15336
        return false;
15337
      if (that instanceof updateSupplier_args)
15338
        return this.equals((updateSupplier_args)that);
15339
      return false;
15340
    }
15341
 
15342
    public boolean equals(updateSupplier_args that) {
15343
      if (that == null)
15344
        return false;
15345
 
15346
      boolean this_present_supplier = true && this.isSetSupplier();
15347
      boolean that_present_supplier = true && that.isSetSupplier();
15348
      if (this_present_supplier || that_present_supplier) {
15349
        if (!(this_present_supplier && that_present_supplier))
15350
          return false;
15351
        if (!this.supplier.equals(that.supplier))
15352
          return false;
15353
      }
15354
 
15355
      return true;
15356
    }
15357
 
15358
    @Override
15359
    public int hashCode() {
15360
      return 0;
15361
    }
15362
 
15363
    public int compareTo(updateSupplier_args other) {
15364
      if (!getClass().equals(other.getClass())) {
15365
        return getClass().getName().compareTo(other.getClass().getName());
15366
      }
15367
 
15368
      int lastComparison = 0;
15369
      updateSupplier_args typedOther = (updateSupplier_args)other;
15370
 
15371
      lastComparison = Boolean.valueOf(isSetSupplier()).compareTo(typedOther.isSetSupplier());
15372
      if (lastComparison != 0) {
15373
        return lastComparison;
15374
      }
15375
      if (isSetSupplier()) {
15376
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplier, typedOther.supplier);
15377
        if (lastComparison != 0) {
15378
          return lastComparison;
15379
        }
15380
      }
15381
      return 0;
15382
    }
15383
 
15384
    public _Fields fieldForId(int fieldId) {
15385
      return _Fields.findByThriftId(fieldId);
15386
    }
15387
 
15388
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15389
      org.apache.thrift.protocol.TField field;
15390
      iprot.readStructBegin();
15391
      while (true)
15392
      {
15393
        field = iprot.readFieldBegin();
15394
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15395
          break;
15396
        }
15397
        switch (field.id) {
15398
          case 1: // SUPPLIER
15399
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15400
              this.supplier = new Supplier();
15401
              this.supplier.read(iprot);
15402
            } else { 
15403
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15404
            }
15405
            break;
15406
          default:
15407
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15408
        }
15409
        iprot.readFieldEnd();
15410
      }
15411
      iprot.readStructEnd();
15412
      validate();
15413
    }
15414
 
15415
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15416
      validate();
15417
 
15418
      oprot.writeStructBegin(STRUCT_DESC);
15419
      if (this.supplier != null) {
15420
        oprot.writeFieldBegin(SUPPLIER_FIELD_DESC);
15421
        this.supplier.write(oprot);
15422
        oprot.writeFieldEnd();
15423
      }
15424
      oprot.writeFieldStop();
15425
      oprot.writeStructEnd();
15426
    }
15427
 
15428
    @Override
15429
    public String toString() {
15430
      StringBuilder sb = new StringBuilder("updateSupplier_args(");
15431
      boolean first = true;
15432
 
15433
      sb.append("supplier:");
15434
      if (this.supplier == null) {
15435
        sb.append("null");
15436
      } else {
15437
        sb.append(this.supplier);
15438
      }
15439
      first = false;
15440
      sb.append(")");
15441
      return sb.toString();
15442
    }
15443
 
15444
    public void validate() throws org.apache.thrift.TException {
15445
      // check for required fields
15446
    }
15447
 
15448
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15449
      try {
15450
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15451
      } catch (org.apache.thrift.TException te) {
15452
        throw new java.io.IOException(te);
15453
      }
15454
    }
15455
 
15456
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15457
      try {
15458
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15459
      } catch (org.apache.thrift.TException te) {
15460
        throw new java.io.IOException(te);
15461
      }
15462
    }
15463
 
15464
  }
15465
 
15466
  public static class updateSupplier_result implements org.apache.thrift.TBase<updateSupplier_result, updateSupplier_result._Fields>, java.io.Serializable, Cloneable   {
15467
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSupplier_result");
15468
 
15469
 
15470
 
15471
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15472
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15473
;
15474
 
15475
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15476
 
15477
      static {
15478
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15479
          byName.put(field.getFieldName(), field);
15480
        }
15481
      }
15482
 
15483
      /**
15484
       * Find the _Fields constant that matches fieldId, or null if its not found.
15485
       */
15486
      public static _Fields findByThriftId(int fieldId) {
15487
        switch(fieldId) {
15488
          default:
15489
            return null;
15490
        }
15491
      }
15492
 
15493
      /**
15494
       * Find the _Fields constant that matches fieldId, throwing an exception
15495
       * if it is not found.
15496
       */
15497
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15498
        _Fields fields = findByThriftId(fieldId);
15499
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15500
        return fields;
15501
      }
15502
 
15503
      /**
15504
       * Find the _Fields constant that matches name, or null if its not found.
15505
       */
15506
      public static _Fields findByName(String name) {
15507
        return byName.get(name);
15508
      }
15509
 
15510
      private final short _thriftId;
15511
      private final String _fieldName;
15512
 
15513
      _Fields(short thriftId, String fieldName) {
15514
        _thriftId = thriftId;
15515
        _fieldName = fieldName;
15516
      }
15517
 
15518
      public short getThriftFieldId() {
15519
        return _thriftId;
15520
      }
15521
 
15522
      public String getFieldName() {
15523
        return _fieldName;
15524
      }
15525
    }
15526
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15527
    static {
15528
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15529
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15530
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSupplier_result.class, metaDataMap);
15531
    }
15532
 
15533
    public updateSupplier_result() {
15534
    }
15535
 
15536
    /**
15537
     * Performs a deep copy on <i>other</i>.
15538
     */
15539
    public updateSupplier_result(updateSupplier_result other) {
15540
    }
15541
 
15542
    public updateSupplier_result deepCopy() {
15543
      return new updateSupplier_result(this);
15544
    }
15545
 
15546
    @Override
15547
    public void clear() {
15548
    }
15549
 
15550
    public void setFieldValue(_Fields field, Object value) {
15551
      switch (field) {
15552
      }
15553
    }
15554
 
15555
    public Object getFieldValue(_Fields field) {
15556
      switch (field) {
15557
      }
15558
      throw new IllegalStateException();
15559
    }
15560
 
15561
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15562
    public boolean isSet(_Fields field) {
15563
      if (field == null) {
15564
        throw new IllegalArgumentException();
15565
      }
15566
 
15567
      switch (field) {
15568
      }
15569
      throw new IllegalStateException();
15570
    }
15571
 
15572
    @Override
15573
    public boolean equals(Object that) {
15574
      if (that == null)
15575
        return false;
15576
      if (that instanceof updateSupplier_result)
15577
        return this.equals((updateSupplier_result)that);
15578
      return false;
15579
    }
15580
 
15581
    public boolean equals(updateSupplier_result that) {
15582
      if (that == null)
15583
        return false;
15584
 
15585
      return true;
15586
    }
15587
 
15588
    @Override
15589
    public int hashCode() {
15590
      return 0;
15591
    }
15592
 
15593
    public int compareTo(updateSupplier_result other) {
15594
      if (!getClass().equals(other.getClass())) {
15595
        return getClass().getName().compareTo(other.getClass().getName());
15596
      }
15597
 
15598
      int lastComparison = 0;
15599
      updateSupplier_result typedOther = (updateSupplier_result)other;
15600
 
15601
      return 0;
15602
    }
15603
 
15604
    public _Fields fieldForId(int fieldId) {
15605
      return _Fields.findByThriftId(fieldId);
15606
    }
15607
 
15608
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15609
      org.apache.thrift.protocol.TField field;
15610
      iprot.readStructBegin();
15611
      while (true)
15612
      {
15613
        field = iprot.readFieldBegin();
15614
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15615
          break;
15616
        }
15617
        switch (field.id) {
15618
          default:
15619
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15620
        }
15621
        iprot.readFieldEnd();
15622
      }
15623
      iprot.readStructEnd();
15624
      validate();
15625
    }
15626
 
15627
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15628
      oprot.writeStructBegin(STRUCT_DESC);
15629
 
15630
      oprot.writeFieldStop();
15631
      oprot.writeStructEnd();
15632
    }
15633
 
15634
    @Override
15635
    public String toString() {
15636
      StringBuilder sb = new StringBuilder("updateSupplier_result(");
15637
      boolean first = true;
15638
 
15639
      sb.append(")");
15640
      return sb.toString();
15641
    }
15642
 
15643
    public void validate() throws org.apache.thrift.TException {
15644
      // check for required fields
15645
    }
15646
 
15647
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15648
      try {
15649
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15650
      } catch (org.apache.thrift.TException te) {
15651
        throw new java.io.IOException(te);
15652
      }
15653
    }
15654
 
15655
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15656
      try {
15657
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15658
      } catch (org.apache.thrift.TException te) {
15659
        throw new java.io.IOException(te);
15660
      }
15661
    }
15662
 
15663
  }
15664
 
6467 amar.kumar 15665
  public static class createPurchaseReturn_args implements org.apache.thrift.TBase<createPurchaseReturn_args, createPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
15666
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseReturn_args");
15667
 
15668
    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);
15669
 
15670
    private PurchaseReturn purchaseReturn; // required
15671
 
15672
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15673
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15674
      PURCHASE_RETURN((short)1, "purchaseReturn");
15675
 
15676
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15677
 
15678
      static {
15679
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15680
          byName.put(field.getFieldName(), field);
15681
        }
15682
      }
15683
 
15684
      /**
15685
       * Find the _Fields constant that matches fieldId, or null if its not found.
15686
       */
15687
      public static _Fields findByThriftId(int fieldId) {
15688
        switch(fieldId) {
15689
          case 1: // PURCHASE_RETURN
15690
            return PURCHASE_RETURN;
15691
          default:
15692
            return null;
15693
        }
15694
      }
15695
 
15696
      /**
15697
       * Find the _Fields constant that matches fieldId, throwing an exception
15698
       * if it is not found.
15699
       */
15700
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15701
        _Fields fields = findByThriftId(fieldId);
15702
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15703
        return fields;
15704
      }
15705
 
15706
      /**
15707
       * Find the _Fields constant that matches name, or null if its not found.
15708
       */
15709
      public static _Fields findByName(String name) {
15710
        return byName.get(name);
15711
      }
15712
 
15713
      private final short _thriftId;
15714
      private final String _fieldName;
15715
 
15716
      _Fields(short thriftId, String fieldName) {
15717
        _thriftId = thriftId;
15718
        _fieldName = fieldName;
15719
      }
15720
 
15721
      public short getThriftFieldId() {
15722
        return _thriftId;
15723
      }
15724
 
15725
      public String getFieldName() {
15726
        return _fieldName;
15727
      }
15728
    }
15729
 
15730
    // isset id assignments
15731
 
15732
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15733
    static {
15734
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15735
      tmpMap.put(_Fields.PURCHASE_RETURN, new org.apache.thrift.meta_data.FieldMetaData("purchaseReturn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15736
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class)));
15737
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15738
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseReturn_args.class, metaDataMap);
15739
    }
15740
 
15741
    public createPurchaseReturn_args() {
15742
    }
15743
 
15744
    public createPurchaseReturn_args(
15745
      PurchaseReturn purchaseReturn)
15746
    {
15747
      this();
15748
      this.purchaseReturn = purchaseReturn;
15749
    }
15750
 
15751
    /**
15752
     * Performs a deep copy on <i>other</i>.
15753
     */
15754
    public createPurchaseReturn_args(createPurchaseReturn_args other) {
15755
      if (other.isSetPurchaseReturn()) {
15756
        this.purchaseReturn = new PurchaseReturn(other.purchaseReturn);
15757
      }
15758
    }
15759
 
15760
    public createPurchaseReturn_args deepCopy() {
15761
      return new createPurchaseReturn_args(this);
15762
    }
15763
 
15764
    @Override
15765
    public void clear() {
15766
      this.purchaseReturn = null;
15767
    }
15768
 
15769
    public PurchaseReturn getPurchaseReturn() {
15770
      return this.purchaseReturn;
15771
    }
15772
 
15773
    public void setPurchaseReturn(PurchaseReturn purchaseReturn) {
15774
      this.purchaseReturn = purchaseReturn;
15775
    }
15776
 
15777
    public void unsetPurchaseReturn() {
15778
      this.purchaseReturn = null;
15779
    }
15780
 
15781
    /** Returns true if field purchaseReturn is set (has been assigned a value) and false otherwise */
15782
    public boolean isSetPurchaseReturn() {
15783
      return this.purchaseReturn != null;
15784
    }
15785
 
15786
    public void setPurchaseReturnIsSet(boolean value) {
15787
      if (!value) {
15788
        this.purchaseReturn = null;
15789
      }
15790
    }
15791
 
15792
    public void setFieldValue(_Fields field, Object value) {
15793
      switch (field) {
15794
      case PURCHASE_RETURN:
15795
        if (value == null) {
15796
          unsetPurchaseReturn();
15797
        } else {
15798
          setPurchaseReturn((PurchaseReturn)value);
15799
        }
15800
        break;
15801
 
15802
      }
15803
    }
15804
 
15805
    public Object getFieldValue(_Fields field) {
15806
      switch (field) {
15807
      case PURCHASE_RETURN:
15808
        return getPurchaseReturn();
15809
 
15810
      }
15811
      throw new IllegalStateException();
15812
    }
15813
 
15814
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15815
    public boolean isSet(_Fields field) {
15816
      if (field == null) {
15817
        throw new IllegalArgumentException();
15818
      }
15819
 
15820
      switch (field) {
15821
      case PURCHASE_RETURN:
15822
        return isSetPurchaseReturn();
15823
      }
15824
      throw new IllegalStateException();
15825
    }
15826
 
15827
    @Override
15828
    public boolean equals(Object that) {
15829
      if (that == null)
15830
        return false;
15831
      if (that instanceof createPurchaseReturn_args)
15832
        return this.equals((createPurchaseReturn_args)that);
15833
      return false;
15834
    }
15835
 
15836
    public boolean equals(createPurchaseReturn_args that) {
15837
      if (that == null)
15838
        return false;
15839
 
15840
      boolean this_present_purchaseReturn = true && this.isSetPurchaseReturn();
15841
      boolean that_present_purchaseReturn = true && that.isSetPurchaseReturn();
15842
      if (this_present_purchaseReturn || that_present_purchaseReturn) {
15843
        if (!(this_present_purchaseReturn && that_present_purchaseReturn))
15844
          return false;
15845
        if (!this.purchaseReturn.equals(that.purchaseReturn))
15846
          return false;
15847
      }
15848
 
15849
      return true;
15850
    }
15851
 
15852
    @Override
15853
    public int hashCode() {
15854
      return 0;
15855
    }
15856
 
15857
    public int compareTo(createPurchaseReturn_args other) {
15858
      if (!getClass().equals(other.getClass())) {
15859
        return getClass().getName().compareTo(other.getClass().getName());
15860
      }
15861
 
15862
      int lastComparison = 0;
15863
      createPurchaseReturn_args typedOther = (createPurchaseReturn_args)other;
15864
 
15865
      lastComparison = Boolean.valueOf(isSetPurchaseReturn()).compareTo(typedOther.isSetPurchaseReturn());
15866
      if (lastComparison != 0) {
15867
        return lastComparison;
15868
      }
15869
      if (isSetPurchaseReturn()) {
15870
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseReturn, typedOther.purchaseReturn);
15871
        if (lastComparison != 0) {
15872
          return lastComparison;
15873
        }
15874
      }
15875
      return 0;
15876
    }
15877
 
15878
    public _Fields fieldForId(int fieldId) {
15879
      return _Fields.findByThriftId(fieldId);
15880
    }
15881
 
15882
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15883
      org.apache.thrift.protocol.TField field;
15884
      iprot.readStructBegin();
15885
      while (true)
15886
      {
15887
        field = iprot.readFieldBegin();
15888
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15889
          break;
15890
        }
15891
        switch (field.id) {
15892
          case 1: // PURCHASE_RETURN
15893
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15894
              this.purchaseReturn = new PurchaseReturn();
15895
              this.purchaseReturn.read(iprot);
15896
            } else { 
15897
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15898
            }
15899
            break;
15900
          default:
15901
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15902
        }
15903
        iprot.readFieldEnd();
15904
      }
15905
      iprot.readStructEnd();
15906
      validate();
15907
    }
15908
 
15909
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15910
      validate();
15911
 
15912
      oprot.writeStructBegin(STRUCT_DESC);
15913
      if (this.purchaseReturn != null) {
15914
        oprot.writeFieldBegin(PURCHASE_RETURN_FIELD_DESC);
15915
        this.purchaseReturn.write(oprot);
15916
        oprot.writeFieldEnd();
15917
      }
15918
      oprot.writeFieldStop();
15919
      oprot.writeStructEnd();
15920
    }
15921
 
15922
    @Override
15923
    public String toString() {
15924
      StringBuilder sb = new StringBuilder("createPurchaseReturn_args(");
15925
      boolean first = true;
15926
 
15927
      sb.append("purchaseReturn:");
15928
      if (this.purchaseReturn == null) {
15929
        sb.append("null");
15930
      } else {
15931
        sb.append(this.purchaseReturn);
15932
      }
15933
      first = false;
15934
      sb.append(")");
15935
      return sb.toString();
15936
    }
15937
 
15938
    public void validate() throws org.apache.thrift.TException {
15939
      // check for required fields
15940
    }
15941
 
15942
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15943
      try {
15944
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15945
      } catch (org.apache.thrift.TException te) {
15946
        throw new java.io.IOException(te);
15947
      }
15948
    }
15949
 
15950
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15951
      try {
15952
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15953
      } catch (org.apache.thrift.TException te) {
15954
        throw new java.io.IOException(te);
15955
      }
15956
    }
15957
 
15958
  }
15959
 
15960
  public static class createPurchaseReturn_result implements org.apache.thrift.TBase<createPurchaseReturn_result, createPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
15961
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseReturn_result");
15962
 
15963
    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);
15964
 
15965
    private long success; // required
15966
 
15967
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15968
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15969
      SUCCESS((short)0, "success");
15970
 
15971
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15972
 
15973
      static {
15974
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15975
          byName.put(field.getFieldName(), field);
15976
        }
15977
      }
15978
 
15979
      /**
15980
       * Find the _Fields constant that matches fieldId, or null if its not found.
15981
       */
15982
      public static _Fields findByThriftId(int fieldId) {
15983
        switch(fieldId) {
15984
          case 0: // SUCCESS
15985
            return SUCCESS;
15986
          default:
15987
            return null;
15988
        }
15989
      }
15990
 
15991
      /**
15992
       * Find the _Fields constant that matches fieldId, throwing an exception
15993
       * if it is not found.
15994
       */
15995
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15996
        _Fields fields = findByThriftId(fieldId);
15997
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15998
        return fields;
15999
      }
16000
 
16001
      /**
16002
       * Find the _Fields constant that matches name, or null if its not found.
16003
       */
16004
      public static _Fields findByName(String name) {
16005
        return byName.get(name);
16006
      }
16007
 
16008
      private final short _thriftId;
16009
      private final String _fieldName;
16010
 
16011
      _Fields(short thriftId, String fieldName) {
16012
        _thriftId = thriftId;
16013
        _fieldName = fieldName;
16014
      }
16015
 
16016
      public short getThriftFieldId() {
16017
        return _thriftId;
16018
      }
16019
 
16020
      public String getFieldName() {
16021
        return _fieldName;
16022
      }
16023
    }
16024
 
16025
    // isset id assignments
16026
    private static final int __SUCCESS_ISSET_ID = 0;
16027
    private BitSet __isset_bit_vector = new BitSet(1);
16028
 
16029
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16030
    static {
16031
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16032
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16033
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
16034
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16035
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseReturn_result.class, metaDataMap);
16036
    }
16037
 
16038
    public createPurchaseReturn_result() {
16039
    }
16040
 
16041
    public createPurchaseReturn_result(
16042
      long success)
16043
    {
16044
      this();
16045
      this.success = success;
16046
      setSuccessIsSet(true);
16047
    }
16048
 
16049
    /**
16050
     * Performs a deep copy on <i>other</i>.
16051
     */
16052
    public createPurchaseReturn_result(createPurchaseReturn_result other) {
16053
      __isset_bit_vector.clear();
16054
      __isset_bit_vector.or(other.__isset_bit_vector);
16055
      this.success = other.success;
16056
    }
16057
 
16058
    public createPurchaseReturn_result deepCopy() {
16059
      return new createPurchaseReturn_result(this);
16060
    }
16061
 
16062
    @Override
16063
    public void clear() {
16064
      setSuccessIsSet(false);
16065
      this.success = 0;
16066
    }
16067
 
16068
    public long getSuccess() {
16069
      return this.success;
16070
    }
16071
 
16072
    public void setSuccess(long success) {
16073
      this.success = success;
16074
      setSuccessIsSet(true);
16075
    }
16076
 
16077
    public void unsetSuccess() {
16078
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
16079
    }
16080
 
16081
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
16082
    public boolean isSetSuccess() {
16083
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
16084
    }
16085
 
16086
    public void setSuccessIsSet(boolean value) {
16087
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
16088
    }
16089
 
16090
    public void setFieldValue(_Fields field, Object value) {
16091
      switch (field) {
16092
      case SUCCESS:
16093
        if (value == null) {
16094
          unsetSuccess();
16095
        } else {
16096
          setSuccess((Long)value);
16097
        }
16098
        break;
16099
 
16100
      }
16101
    }
16102
 
16103
    public Object getFieldValue(_Fields field) {
16104
      switch (field) {
16105
      case SUCCESS:
16106
        return Long.valueOf(getSuccess());
16107
 
16108
      }
16109
      throw new IllegalStateException();
16110
    }
16111
 
16112
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16113
    public boolean isSet(_Fields field) {
16114
      if (field == null) {
16115
        throw new IllegalArgumentException();
16116
      }
16117
 
16118
      switch (field) {
16119
      case SUCCESS:
16120
        return isSetSuccess();
16121
      }
16122
      throw new IllegalStateException();
16123
    }
16124
 
16125
    @Override
16126
    public boolean equals(Object that) {
16127
      if (that == null)
16128
        return false;
16129
      if (that instanceof createPurchaseReturn_result)
16130
        return this.equals((createPurchaseReturn_result)that);
16131
      return false;
16132
    }
16133
 
16134
    public boolean equals(createPurchaseReturn_result that) {
16135
      if (that == null)
16136
        return false;
16137
 
16138
      boolean this_present_success = true;
16139
      boolean that_present_success = true;
16140
      if (this_present_success || that_present_success) {
16141
        if (!(this_present_success && that_present_success))
16142
          return false;
16143
        if (this.success != that.success)
16144
          return false;
16145
      }
16146
 
16147
      return true;
16148
    }
16149
 
16150
    @Override
16151
    public int hashCode() {
16152
      return 0;
16153
    }
16154
 
16155
    public int compareTo(createPurchaseReturn_result other) {
16156
      if (!getClass().equals(other.getClass())) {
16157
        return getClass().getName().compareTo(other.getClass().getName());
16158
      }
16159
 
16160
      int lastComparison = 0;
16161
      createPurchaseReturn_result typedOther = (createPurchaseReturn_result)other;
16162
 
16163
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
16164
      if (lastComparison != 0) {
16165
        return lastComparison;
16166
      }
16167
      if (isSetSuccess()) {
16168
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
16169
        if (lastComparison != 0) {
16170
          return lastComparison;
16171
        }
16172
      }
16173
      return 0;
16174
    }
16175
 
16176
    public _Fields fieldForId(int fieldId) {
16177
      return _Fields.findByThriftId(fieldId);
16178
    }
16179
 
16180
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16181
      org.apache.thrift.protocol.TField field;
16182
      iprot.readStructBegin();
16183
      while (true)
16184
      {
16185
        field = iprot.readFieldBegin();
16186
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16187
          break;
16188
        }
16189
        switch (field.id) {
16190
          case 0: // SUCCESS
16191
            if (field.type == org.apache.thrift.protocol.TType.I64) {
16192
              this.success = iprot.readI64();
16193
              setSuccessIsSet(true);
16194
            } else { 
16195
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16196
            }
16197
            break;
16198
          default:
16199
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16200
        }
16201
        iprot.readFieldEnd();
16202
      }
16203
      iprot.readStructEnd();
16204
      validate();
16205
    }
16206
 
16207
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16208
      oprot.writeStructBegin(STRUCT_DESC);
16209
 
16210
      if (this.isSetSuccess()) {
16211
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16212
        oprot.writeI64(this.success);
16213
        oprot.writeFieldEnd();
16214
      }
16215
      oprot.writeFieldStop();
16216
      oprot.writeStructEnd();
16217
    }
16218
 
16219
    @Override
16220
    public String toString() {
16221
      StringBuilder sb = new StringBuilder("createPurchaseReturn_result(");
16222
      boolean first = true;
16223
 
16224
      sb.append("success:");
16225
      sb.append(this.success);
16226
      first = false;
16227
      sb.append(")");
16228
      return sb.toString();
16229
    }
16230
 
16231
    public void validate() throws org.apache.thrift.TException {
16232
      // check for required fields
16233
    }
16234
 
16235
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16236
      try {
16237
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16238
      } catch (org.apache.thrift.TException te) {
16239
        throw new java.io.IOException(te);
16240
      }
16241
    }
16242
 
16243
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16244
      try {
16245
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16246
      } catch (org.apache.thrift.TException te) {
16247
        throw new java.io.IOException(te);
16248
      }
16249
    }
16250
 
16251
  }
16252
 
16253
  public static class settlePurchaseReturn_args implements org.apache.thrift.TBase<settlePurchaseReturn_args, settlePurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
16254
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("settlePurchaseReturn_args");
16255
 
16256
    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);
16257
 
16258
    private long id; // required
16259
 
16260
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16261
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16262
      ID((short)1, "id");
16263
 
16264
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16265
 
16266
      static {
16267
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16268
          byName.put(field.getFieldName(), field);
16269
        }
16270
      }
16271
 
16272
      /**
16273
       * Find the _Fields constant that matches fieldId, or null if its not found.
16274
       */
16275
      public static _Fields findByThriftId(int fieldId) {
16276
        switch(fieldId) {
16277
          case 1: // ID
16278
            return ID;
16279
          default:
16280
            return null;
16281
        }
16282
      }
16283
 
16284
      /**
16285
       * Find the _Fields constant that matches fieldId, throwing an exception
16286
       * if it is not found.
16287
       */
16288
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16289
        _Fields fields = findByThriftId(fieldId);
16290
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16291
        return fields;
16292
      }
16293
 
16294
      /**
16295
       * Find the _Fields constant that matches name, or null if its not found.
16296
       */
16297
      public static _Fields findByName(String name) {
16298
        return byName.get(name);
16299
      }
16300
 
16301
      private final short _thriftId;
16302
      private final String _fieldName;
16303
 
16304
      _Fields(short thriftId, String fieldName) {
16305
        _thriftId = thriftId;
16306
        _fieldName = fieldName;
16307
      }
16308
 
16309
      public short getThriftFieldId() {
16310
        return _thriftId;
16311
      }
16312
 
16313
      public String getFieldName() {
16314
        return _fieldName;
16315
      }
16316
    }
16317
 
16318
    // isset id assignments
16319
    private static final int __ID_ISSET_ID = 0;
16320
    private BitSet __isset_bit_vector = new BitSet(1);
16321
 
16322
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16323
    static {
16324
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16325
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16326
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
16327
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16328
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(settlePurchaseReturn_args.class, metaDataMap);
16329
    }
16330
 
16331
    public settlePurchaseReturn_args() {
16332
    }
16333
 
16334
    public settlePurchaseReturn_args(
16335
      long id)
16336
    {
16337
      this();
16338
      this.id = id;
16339
      setIdIsSet(true);
16340
    }
16341
 
16342
    /**
16343
     * Performs a deep copy on <i>other</i>.
16344
     */
16345
    public settlePurchaseReturn_args(settlePurchaseReturn_args other) {
16346
      __isset_bit_vector.clear();
16347
      __isset_bit_vector.or(other.__isset_bit_vector);
16348
      this.id = other.id;
16349
    }
16350
 
16351
    public settlePurchaseReturn_args deepCopy() {
16352
      return new settlePurchaseReturn_args(this);
16353
    }
16354
 
16355
    @Override
16356
    public void clear() {
16357
      setIdIsSet(false);
16358
      this.id = 0;
16359
    }
16360
 
16361
    public long getId() {
16362
      return this.id;
16363
    }
16364
 
16365
    public void setId(long id) {
16366
      this.id = id;
16367
      setIdIsSet(true);
16368
    }
16369
 
16370
    public void unsetId() {
16371
      __isset_bit_vector.clear(__ID_ISSET_ID);
16372
    }
16373
 
16374
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
16375
    public boolean isSetId() {
16376
      return __isset_bit_vector.get(__ID_ISSET_ID);
16377
    }
16378
 
16379
    public void setIdIsSet(boolean value) {
16380
      __isset_bit_vector.set(__ID_ISSET_ID, value);
16381
    }
16382
 
16383
    public void setFieldValue(_Fields field, Object value) {
16384
      switch (field) {
16385
      case ID:
16386
        if (value == null) {
16387
          unsetId();
16388
        } else {
16389
          setId((Long)value);
16390
        }
16391
        break;
16392
 
16393
      }
16394
    }
16395
 
16396
    public Object getFieldValue(_Fields field) {
16397
      switch (field) {
16398
      case ID:
16399
        return Long.valueOf(getId());
16400
 
16401
      }
16402
      throw new IllegalStateException();
16403
    }
16404
 
16405
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16406
    public boolean isSet(_Fields field) {
16407
      if (field == null) {
16408
        throw new IllegalArgumentException();
16409
      }
16410
 
16411
      switch (field) {
16412
      case ID:
16413
        return isSetId();
16414
      }
16415
      throw new IllegalStateException();
16416
    }
16417
 
16418
    @Override
16419
    public boolean equals(Object that) {
16420
      if (that == null)
16421
        return false;
16422
      if (that instanceof settlePurchaseReturn_args)
16423
        return this.equals((settlePurchaseReturn_args)that);
16424
      return false;
16425
    }
16426
 
16427
    public boolean equals(settlePurchaseReturn_args that) {
16428
      if (that == null)
16429
        return false;
16430
 
16431
      boolean this_present_id = true;
16432
      boolean that_present_id = true;
16433
      if (this_present_id || that_present_id) {
16434
        if (!(this_present_id && that_present_id))
16435
          return false;
16436
        if (this.id != that.id)
16437
          return false;
16438
      }
16439
 
16440
      return true;
16441
    }
16442
 
16443
    @Override
16444
    public int hashCode() {
16445
      return 0;
16446
    }
16447
 
16448
    public int compareTo(settlePurchaseReturn_args other) {
16449
      if (!getClass().equals(other.getClass())) {
16450
        return getClass().getName().compareTo(other.getClass().getName());
16451
      }
16452
 
16453
      int lastComparison = 0;
16454
      settlePurchaseReturn_args typedOther = (settlePurchaseReturn_args)other;
16455
 
16456
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
16457
      if (lastComparison != 0) {
16458
        return lastComparison;
16459
      }
16460
      if (isSetId()) {
16461
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
16462
        if (lastComparison != 0) {
16463
          return lastComparison;
16464
        }
16465
      }
16466
      return 0;
16467
    }
16468
 
16469
    public _Fields fieldForId(int fieldId) {
16470
      return _Fields.findByThriftId(fieldId);
16471
    }
16472
 
16473
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16474
      org.apache.thrift.protocol.TField field;
16475
      iprot.readStructBegin();
16476
      while (true)
16477
      {
16478
        field = iprot.readFieldBegin();
16479
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16480
          break;
16481
        }
16482
        switch (field.id) {
16483
          case 1: // ID
16484
            if (field.type == org.apache.thrift.protocol.TType.I64) {
16485
              this.id = iprot.readI64();
16486
              setIdIsSet(true);
16487
            } else { 
16488
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16489
            }
16490
            break;
16491
          default:
16492
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16493
        }
16494
        iprot.readFieldEnd();
16495
      }
16496
      iprot.readStructEnd();
16497
      validate();
16498
    }
16499
 
16500
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16501
      validate();
16502
 
16503
      oprot.writeStructBegin(STRUCT_DESC);
16504
      oprot.writeFieldBegin(ID_FIELD_DESC);
16505
      oprot.writeI64(this.id);
16506
      oprot.writeFieldEnd();
16507
      oprot.writeFieldStop();
16508
      oprot.writeStructEnd();
16509
    }
16510
 
16511
    @Override
16512
    public String toString() {
16513
      StringBuilder sb = new StringBuilder("settlePurchaseReturn_args(");
16514
      boolean first = true;
16515
 
16516
      sb.append("id:");
16517
      sb.append(this.id);
16518
      first = false;
16519
      sb.append(")");
16520
      return sb.toString();
16521
    }
16522
 
16523
    public void validate() throws org.apache.thrift.TException {
16524
      // check for required fields
16525
    }
16526
 
16527
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16528
      try {
16529
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16530
      } catch (org.apache.thrift.TException te) {
16531
        throw new java.io.IOException(te);
16532
      }
16533
    }
16534
 
16535
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16536
      try {
16537
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
16538
        __isset_bit_vector = new BitSet(1);
16539
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16540
      } catch (org.apache.thrift.TException te) {
16541
        throw new java.io.IOException(te);
16542
      }
16543
    }
16544
 
16545
  }
16546
 
16547
  public static class settlePurchaseReturn_result implements org.apache.thrift.TBase<settlePurchaseReturn_result, settlePurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
16548
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("settlePurchaseReturn_result");
16549
 
16550
 
16551
 
16552
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16553
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16554
;
16555
 
16556
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16557
 
16558
      static {
16559
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16560
          byName.put(field.getFieldName(), field);
16561
        }
16562
      }
16563
 
16564
      /**
16565
       * Find the _Fields constant that matches fieldId, or null if its not found.
16566
       */
16567
      public static _Fields findByThriftId(int fieldId) {
16568
        switch(fieldId) {
16569
          default:
16570
            return null;
16571
        }
16572
      }
16573
 
16574
      /**
16575
       * Find the _Fields constant that matches fieldId, throwing an exception
16576
       * if it is not found.
16577
       */
16578
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16579
        _Fields fields = findByThriftId(fieldId);
16580
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16581
        return fields;
16582
      }
16583
 
16584
      /**
16585
       * Find the _Fields constant that matches name, or null if its not found.
16586
       */
16587
      public static _Fields findByName(String name) {
16588
        return byName.get(name);
16589
      }
16590
 
16591
      private final short _thriftId;
16592
      private final String _fieldName;
16593
 
16594
      _Fields(short thriftId, String fieldName) {
16595
        _thriftId = thriftId;
16596
        _fieldName = fieldName;
16597
      }
16598
 
16599
      public short getThriftFieldId() {
16600
        return _thriftId;
16601
      }
16602
 
16603
      public String getFieldName() {
16604
        return _fieldName;
16605
      }
16606
    }
16607
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16608
    static {
16609
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16610
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16611
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(settlePurchaseReturn_result.class, metaDataMap);
16612
    }
16613
 
16614
    public settlePurchaseReturn_result() {
16615
    }
16616
 
16617
    /**
16618
     * Performs a deep copy on <i>other</i>.
16619
     */
16620
    public settlePurchaseReturn_result(settlePurchaseReturn_result other) {
16621
    }
16622
 
16623
    public settlePurchaseReturn_result deepCopy() {
16624
      return new settlePurchaseReturn_result(this);
16625
    }
16626
 
16627
    @Override
16628
    public void clear() {
16629
    }
16630
 
16631
    public void setFieldValue(_Fields field, Object value) {
16632
      switch (field) {
16633
      }
16634
    }
16635
 
16636
    public Object getFieldValue(_Fields field) {
16637
      switch (field) {
16638
      }
16639
      throw new IllegalStateException();
16640
    }
16641
 
16642
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16643
    public boolean isSet(_Fields field) {
16644
      if (field == null) {
16645
        throw new IllegalArgumentException();
16646
      }
16647
 
16648
      switch (field) {
16649
      }
16650
      throw new IllegalStateException();
16651
    }
16652
 
16653
    @Override
16654
    public boolean equals(Object that) {
16655
      if (that == null)
16656
        return false;
16657
      if (that instanceof settlePurchaseReturn_result)
16658
        return this.equals((settlePurchaseReturn_result)that);
16659
      return false;
16660
    }
16661
 
16662
    public boolean equals(settlePurchaseReturn_result that) {
16663
      if (that == null)
16664
        return false;
16665
 
16666
      return true;
16667
    }
16668
 
16669
    @Override
16670
    public int hashCode() {
16671
      return 0;
16672
    }
16673
 
16674
    public int compareTo(settlePurchaseReturn_result other) {
16675
      if (!getClass().equals(other.getClass())) {
16676
        return getClass().getName().compareTo(other.getClass().getName());
16677
      }
16678
 
16679
      int lastComparison = 0;
16680
      settlePurchaseReturn_result typedOther = (settlePurchaseReturn_result)other;
16681
 
16682
      return 0;
16683
    }
16684
 
16685
    public _Fields fieldForId(int fieldId) {
16686
      return _Fields.findByThriftId(fieldId);
16687
    }
16688
 
16689
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16690
      org.apache.thrift.protocol.TField field;
16691
      iprot.readStructBegin();
16692
      while (true)
16693
      {
16694
        field = iprot.readFieldBegin();
16695
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16696
          break;
16697
        }
16698
        switch (field.id) {
16699
          default:
16700
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16701
        }
16702
        iprot.readFieldEnd();
16703
      }
16704
      iprot.readStructEnd();
16705
      validate();
16706
    }
16707
 
16708
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16709
      oprot.writeStructBegin(STRUCT_DESC);
16710
 
16711
      oprot.writeFieldStop();
16712
      oprot.writeStructEnd();
16713
    }
16714
 
16715
    @Override
16716
    public String toString() {
16717
      StringBuilder sb = new StringBuilder("settlePurchaseReturn_result(");
16718
      boolean first = true;
16719
 
16720
      sb.append(")");
16721
      return sb.toString();
16722
    }
16723
 
16724
    public void validate() throws org.apache.thrift.TException {
16725
      // check for required fields
16726
    }
16727
 
16728
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16729
      try {
16730
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16731
      } catch (org.apache.thrift.TException te) {
16732
        throw new java.io.IOException(te);
16733
      }
16734
    }
16735
 
16736
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16737
      try {
16738
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16739
      } catch (org.apache.thrift.TException te) {
16740
        throw new java.io.IOException(te);
16741
      }
16742
    }
16743
 
16744
  }
16745
 
16746
  public static class getUnsettledPurchaseReturns_args implements org.apache.thrift.TBase<getUnsettledPurchaseReturns_args, getUnsettledPurchaseReturns_args._Fields>, java.io.Serializable, Cloneable   {
16747
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUnsettledPurchaseReturns_args");
16748
 
16749
 
16750
 
16751
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16752
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16753
;
16754
 
16755
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16756
 
16757
      static {
16758
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16759
          byName.put(field.getFieldName(), field);
16760
        }
16761
      }
16762
 
16763
      /**
16764
       * Find the _Fields constant that matches fieldId, or null if its not found.
16765
       */
16766
      public static _Fields findByThriftId(int fieldId) {
16767
        switch(fieldId) {
16768
          default:
16769
            return null;
16770
        }
16771
      }
16772
 
16773
      /**
16774
       * Find the _Fields constant that matches fieldId, throwing an exception
16775
       * if it is not found.
16776
       */
16777
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16778
        _Fields fields = findByThriftId(fieldId);
16779
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16780
        return fields;
16781
      }
16782
 
16783
      /**
16784
       * Find the _Fields constant that matches name, or null if its not found.
16785
       */
16786
      public static _Fields findByName(String name) {
16787
        return byName.get(name);
16788
      }
16789
 
16790
      private final short _thriftId;
16791
      private final String _fieldName;
16792
 
16793
      _Fields(short thriftId, String fieldName) {
16794
        _thriftId = thriftId;
16795
        _fieldName = fieldName;
16796
      }
16797
 
16798
      public short getThriftFieldId() {
16799
        return _thriftId;
16800
      }
16801
 
16802
      public String getFieldName() {
16803
        return _fieldName;
16804
      }
16805
    }
16806
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16807
    static {
16808
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16809
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16810
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUnsettledPurchaseReturns_args.class, metaDataMap);
16811
    }
16812
 
16813
    public getUnsettledPurchaseReturns_args() {
16814
    }
16815
 
16816
    /**
16817
     * Performs a deep copy on <i>other</i>.
16818
     */
16819
    public getUnsettledPurchaseReturns_args(getUnsettledPurchaseReturns_args other) {
16820
    }
16821
 
16822
    public getUnsettledPurchaseReturns_args deepCopy() {
16823
      return new getUnsettledPurchaseReturns_args(this);
16824
    }
16825
 
16826
    @Override
16827
    public void clear() {
16828
    }
16829
 
16830
    public void setFieldValue(_Fields field, Object value) {
16831
      switch (field) {
16832
      }
16833
    }
16834
 
16835
    public Object getFieldValue(_Fields field) {
16836
      switch (field) {
16837
      }
16838
      throw new IllegalStateException();
16839
    }
16840
 
16841
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16842
    public boolean isSet(_Fields field) {
16843
      if (field == null) {
16844
        throw new IllegalArgumentException();
16845
      }
16846
 
16847
      switch (field) {
16848
      }
16849
      throw new IllegalStateException();
16850
    }
16851
 
16852
    @Override
16853
    public boolean equals(Object that) {
16854
      if (that == null)
16855
        return false;
16856
      if (that instanceof getUnsettledPurchaseReturns_args)
16857
        return this.equals((getUnsettledPurchaseReturns_args)that);
16858
      return false;
16859
    }
16860
 
16861
    public boolean equals(getUnsettledPurchaseReturns_args that) {
16862
      if (that == null)
16863
        return false;
16864
 
16865
      return true;
16866
    }
16867
 
16868
    @Override
16869
    public int hashCode() {
16870
      return 0;
16871
    }
16872
 
16873
    public int compareTo(getUnsettledPurchaseReturns_args other) {
16874
      if (!getClass().equals(other.getClass())) {
16875
        return getClass().getName().compareTo(other.getClass().getName());
16876
      }
16877
 
16878
      int lastComparison = 0;
16879
      getUnsettledPurchaseReturns_args typedOther = (getUnsettledPurchaseReturns_args)other;
16880
 
16881
      return 0;
16882
    }
16883
 
16884
    public _Fields fieldForId(int fieldId) {
16885
      return _Fields.findByThriftId(fieldId);
16886
    }
16887
 
16888
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16889
      org.apache.thrift.protocol.TField field;
16890
      iprot.readStructBegin();
16891
      while (true)
16892
      {
16893
        field = iprot.readFieldBegin();
16894
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16895
          break;
16896
        }
16897
        switch (field.id) {
16898
          default:
16899
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16900
        }
16901
        iprot.readFieldEnd();
16902
      }
16903
      iprot.readStructEnd();
16904
      validate();
16905
    }
16906
 
16907
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16908
      validate();
16909
 
16910
      oprot.writeStructBegin(STRUCT_DESC);
16911
      oprot.writeFieldStop();
16912
      oprot.writeStructEnd();
16913
    }
16914
 
16915
    @Override
16916
    public String toString() {
16917
      StringBuilder sb = new StringBuilder("getUnsettledPurchaseReturns_args(");
16918
      boolean first = true;
16919
 
16920
      sb.append(")");
16921
      return sb.toString();
16922
    }
16923
 
16924
    public void validate() throws org.apache.thrift.TException {
16925
      // check for required fields
16926
    }
16927
 
16928
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16929
      try {
16930
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16931
      } catch (org.apache.thrift.TException te) {
16932
        throw new java.io.IOException(te);
16933
      }
16934
    }
16935
 
16936
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16937
      try {
16938
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16939
      } catch (org.apache.thrift.TException te) {
16940
        throw new java.io.IOException(te);
16941
      }
16942
    }
16943
 
16944
  }
16945
 
16946
  public static class getUnsettledPurchaseReturns_result implements org.apache.thrift.TBase<getUnsettledPurchaseReturns_result, getUnsettledPurchaseReturns_result._Fields>, java.io.Serializable, Cloneable   {
16947
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUnsettledPurchaseReturns_result");
16948
 
16949
    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);
16950
 
16951
    private List<PurchaseReturn> success; // required
16952
 
16953
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16954
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16955
      SUCCESS((short)0, "success");
16956
 
16957
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16958
 
16959
      static {
16960
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16961
          byName.put(field.getFieldName(), field);
16962
        }
16963
      }
16964
 
16965
      /**
16966
       * Find the _Fields constant that matches fieldId, or null if its not found.
16967
       */
16968
      public static _Fields findByThriftId(int fieldId) {
16969
        switch(fieldId) {
16970
          case 0: // SUCCESS
16971
            return SUCCESS;
16972
          default:
16973
            return null;
16974
        }
16975
      }
16976
 
16977
      /**
16978
       * Find the _Fields constant that matches fieldId, throwing an exception
16979
       * if it is not found.
16980
       */
16981
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16982
        _Fields fields = findByThriftId(fieldId);
16983
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16984
        return fields;
16985
      }
16986
 
16987
      /**
16988
       * Find the _Fields constant that matches name, or null if its not found.
16989
       */
16990
      public static _Fields findByName(String name) {
16991
        return byName.get(name);
16992
      }
16993
 
16994
      private final short _thriftId;
16995
      private final String _fieldName;
16996
 
16997
      _Fields(short thriftId, String fieldName) {
16998
        _thriftId = thriftId;
16999
        _fieldName = fieldName;
17000
      }
17001
 
17002
      public short getThriftFieldId() {
17003
        return _thriftId;
17004
      }
17005
 
17006
      public String getFieldName() {
17007
        return _fieldName;
17008
      }
17009
    }
17010
 
17011
    // isset id assignments
17012
 
17013
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17014
    static {
17015
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17016
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17017
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
17018
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class))));
17019
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17020
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUnsettledPurchaseReturns_result.class, metaDataMap);
17021
    }
17022
 
17023
    public getUnsettledPurchaseReturns_result() {
17024
    }
17025
 
17026
    public getUnsettledPurchaseReturns_result(
17027
      List<PurchaseReturn> success)
17028
    {
17029
      this();
17030
      this.success = success;
17031
    }
17032
 
17033
    /**
17034
     * Performs a deep copy on <i>other</i>.
17035
     */
17036
    public getUnsettledPurchaseReturns_result(getUnsettledPurchaseReturns_result other) {
17037
      if (other.isSetSuccess()) {
17038
        List<PurchaseReturn> __this__success = new ArrayList<PurchaseReturn>();
17039
        for (PurchaseReturn other_element : other.success) {
17040
          __this__success.add(new PurchaseReturn(other_element));
17041
        }
17042
        this.success = __this__success;
17043
      }
17044
    }
17045
 
17046
    public getUnsettledPurchaseReturns_result deepCopy() {
17047
      return new getUnsettledPurchaseReturns_result(this);
17048
    }
17049
 
17050
    @Override
17051
    public void clear() {
17052
      this.success = null;
17053
    }
17054
 
17055
    public int getSuccessSize() {
17056
      return (this.success == null) ? 0 : this.success.size();
17057
    }
17058
 
17059
    public java.util.Iterator<PurchaseReturn> getSuccessIterator() {
17060
      return (this.success == null) ? null : this.success.iterator();
17061
    }
17062
 
17063
    public void addToSuccess(PurchaseReturn elem) {
17064
      if (this.success == null) {
17065
        this.success = new ArrayList<PurchaseReturn>();
17066
      }
17067
      this.success.add(elem);
17068
    }
17069
 
17070
    public List<PurchaseReturn> getSuccess() {
17071
      return this.success;
17072
    }
17073
 
17074
    public void setSuccess(List<PurchaseReturn> success) {
17075
      this.success = success;
17076
    }
17077
 
17078
    public void unsetSuccess() {
17079
      this.success = null;
17080
    }
17081
 
17082
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
17083
    public boolean isSetSuccess() {
17084
      return this.success != null;
17085
    }
17086
 
17087
    public void setSuccessIsSet(boolean value) {
17088
      if (!value) {
17089
        this.success = null;
17090
      }
17091
    }
17092
 
17093
    public void setFieldValue(_Fields field, Object value) {
17094
      switch (field) {
17095
      case SUCCESS:
17096
        if (value == null) {
17097
          unsetSuccess();
17098
        } else {
17099
          setSuccess((List<PurchaseReturn>)value);
17100
        }
17101
        break;
17102
 
17103
      }
17104
    }
17105
 
17106
    public Object getFieldValue(_Fields field) {
17107
      switch (field) {
17108
      case SUCCESS:
17109
        return getSuccess();
17110
 
17111
      }
17112
      throw new IllegalStateException();
17113
    }
17114
 
17115
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17116
    public boolean isSet(_Fields field) {
17117
      if (field == null) {
17118
        throw new IllegalArgumentException();
17119
      }
17120
 
17121
      switch (field) {
17122
      case SUCCESS:
17123
        return isSetSuccess();
17124
      }
17125
      throw new IllegalStateException();
17126
    }
17127
 
17128
    @Override
17129
    public boolean equals(Object that) {
17130
      if (that == null)
17131
        return false;
17132
      if (that instanceof getUnsettledPurchaseReturns_result)
17133
        return this.equals((getUnsettledPurchaseReturns_result)that);
17134
      return false;
17135
    }
17136
 
17137
    public boolean equals(getUnsettledPurchaseReturns_result that) {
17138
      if (that == null)
17139
        return false;
17140
 
17141
      boolean this_present_success = true && this.isSetSuccess();
17142
      boolean that_present_success = true && that.isSetSuccess();
17143
      if (this_present_success || that_present_success) {
17144
        if (!(this_present_success && that_present_success))
17145
          return false;
17146
        if (!this.success.equals(that.success))
17147
          return false;
17148
      }
17149
 
17150
      return true;
17151
    }
17152
 
17153
    @Override
17154
    public int hashCode() {
17155
      return 0;
17156
    }
17157
 
17158
    public int compareTo(getUnsettledPurchaseReturns_result other) {
17159
      if (!getClass().equals(other.getClass())) {
17160
        return getClass().getName().compareTo(other.getClass().getName());
17161
      }
17162
 
17163
      int lastComparison = 0;
17164
      getUnsettledPurchaseReturns_result typedOther = (getUnsettledPurchaseReturns_result)other;
17165
 
17166
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
17167
      if (lastComparison != 0) {
17168
        return lastComparison;
17169
      }
17170
      if (isSetSuccess()) {
17171
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
17172
        if (lastComparison != 0) {
17173
          return lastComparison;
17174
        }
17175
      }
17176
      return 0;
17177
    }
17178
 
17179
    public _Fields fieldForId(int fieldId) {
17180
      return _Fields.findByThriftId(fieldId);
17181
    }
17182
 
17183
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17184
      org.apache.thrift.protocol.TField field;
17185
      iprot.readStructBegin();
17186
      while (true)
17187
      {
17188
        field = iprot.readFieldBegin();
17189
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17190
          break;
17191
        }
17192
        switch (field.id) {
17193
          case 0: // SUCCESS
17194
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
17195
              {
7410 amar.kumar 17196
                org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
17197
                this.success = new ArrayList<PurchaseReturn>(_list32.size);
17198
                for (int _i33 = 0; _i33 < _list32.size; ++_i33)
6467 amar.kumar 17199
                {
7410 amar.kumar 17200
                  PurchaseReturn _elem34; // required
17201
                  _elem34 = new PurchaseReturn();
17202
                  _elem34.read(iprot);
17203
                  this.success.add(_elem34);
6467 amar.kumar 17204
                }
17205
                iprot.readListEnd();
17206
              }
17207
            } else { 
17208
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17209
            }
17210
            break;
17211
          default:
17212
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17213
        }
17214
        iprot.readFieldEnd();
17215
      }
17216
      iprot.readStructEnd();
17217
      validate();
17218
    }
17219
 
17220
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17221
      oprot.writeStructBegin(STRUCT_DESC);
17222
 
17223
      if (this.isSetSuccess()) {
17224
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17225
        {
17226
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7410 amar.kumar 17227
          for (PurchaseReturn _iter35 : this.success)
6467 amar.kumar 17228
          {
7410 amar.kumar 17229
            _iter35.write(oprot);
6467 amar.kumar 17230
          }
17231
          oprot.writeListEnd();
17232
        }
17233
        oprot.writeFieldEnd();
17234
      }
17235
      oprot.writeFieldStop();
17236
      oprot.writeStructEnd();
17237
    }
17238
 
17239
    @Override
17240
    public String toString() {
17241
      StringBuilder sb = new StringBuilder("getUnsettledPurchaseReturns_result(");
17242
      boolean first = true;
17243
 
17244
      sb.append("success:");
17245
      if (this.success == null) {
17246
        sb.append("null");
17247
      } else {
17248
        sb.append(this.success);
17249
      }
17250
      first = false;
17251
      sb.append(")");
17252
      return sb.toString();
17253
    }
17254
 
17255
    public void validate() throws org.apache.thrift.TException {
17256
      // check for required fields
17257
    }
17258
 
17259
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17260
      try {
17261
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17262
      } catch (org.apache.thrift.TException te) {
17263
        throw new java.io.IOException(te);
17264
      }
17265
    }
17266
 
17267
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17268
      try {
17269
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17270
      } catch (org.apache.thrift.TException te) {
17271
        throw new java.io.IOException(te);
17272
      }
17273
    }
17274
 
17275
  }
17276
 
6630 amar.kumar 17277
  public static class getInvoice_args implements org.apache.thrift.TBase<getInvoice_args, getInvoice_args._Fields>, java.io.Serializable, Cloneable   {
17278
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoice_args");
17279
 
17280
    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);
17281
    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);
17282
 
17283
    private String invoiceNumber; // required
17284
    private long supplierId; // required
17285
 
17286
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17287
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17288
      INVOICE_NUMBER((short)1, "invoiceNumber"),
17289
      SUPPLIER_ID((short)2, "supplierId");
17290
 
17291
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17292
 
17293
      static {
17294
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17295
          byName.put(field.getFieldName(), field);
17296
        }
17297
      }
17298
 
17299
      /**
17300
       * Find the _Fields constant that matches fieldId, or null if its not found.
17301
       */
17302
      public static _Fields findByThriftId(int fieldId) {
17303
        switch(fieldId) {
17304
          case 1: // INVOICE_NUMBER
17305
            return INVOICE_NUMBER;
17306
          case 2: // SUPPLIER_ID
17307
            return SUPPLIER_ID;
17308
          default:
17309
            return null;
17310
        }
17311
      }
17312
 
17313
      /**
17314
       * Find the _Fields constant that matches fieldId, throwing an exception
17315
       * if it is not found.
17316
       */
17317
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17318
        _Fields fields = findByThriftId(fieldId);
17319
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17320
        return fields;
17321
      }
17322
 
17323
      /**
17324
       * Find the _Fields constant that matches name, or null if its not found.
17325
       */
17326
      public static _Fields findByName(String name) {
17327
        return byName.get(name);
17328
      }
17329
 
17330
      private final short _thriftId;
17331
      private final String _fieldName;
17332
 
17333
      _Fields(short thriftId, String fieldName) {
17334
        _thriftId = thriftId;
17335
        _fieldName = fieldName;
17336
      }
17337
 
17338
      public short getThriftFieldId() {
17339
        return _thriftId;
17340
      }
17341
 
17342
      public String getFieldName() {
17343
        return _fieldName;
17344
      }
17345
    }
17346
 
17347
    // isset id assignments
17348
    private static final int __SUPPLIERID_ISSET_ID = 0;
17349
    private BitSet __isset_bit_vector = new BitSet(1);
17350
 
17351
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17352
    static {
17353
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17354
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17355
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
17356
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17357
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
17358
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17359
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoice_args.class, metaDataMap);
17360
    }
17361
 
17362
    public getInvoice_args() {
17363
    }
17364
 
17365
    public getInvoice_args(
17366
      String invoiceNumber,
17367
      long supplierId)
17368
    {
17369
      this();
17370
      this.invoiceNumber = invoiceNumber;
17371
      this.supplierId = supplierId;
17372
      setSupplierIdIsSet(true);
17373
    }
17374
 
17375
    /**
17376
     * Performs a deep copy on <i>other</i>.
17377
     */
17378
    public getInvoice_args(getInvoice_args other) {
17379
      __isset_bit_vector.clear();
17380
      __isset_bit_vector.or(other.__isset_bit_vector);
17381
      if (other.isSetInvoiceNumber()) {
17382
        this.invoiceNumber = other.invoiceNumber;
17383
      }
17384
      this.supplierId = other.supplierId;
17385
    }
17386
 
17387
    public getInvoice_args deepCopy() {
17388
      return new getInvoice_args(this);
17389
    }
17390
 
17391
    @Override
17392
    public void clear() {
17393
      this.invoiceNumber = null;
17394
      setSupplierIdIsSet(false);
17395
      this.supplierId = 0;
17396
    }
17397
 
17398
    public String getInvoiceNumber() {
17399
      return this.invoiceNumber;
17400
    }
17401
 
17402
    public void setInvoiceNumber(String invoiceNumber) {
17403
      this.invoiceNumber = invoiceNumber;
17404
    }
17405
 
17406
    public void unsetInvoiceNumber() {
17407
      this.invoiceNumber = null;
17408
    }
17409
 
17410
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
17411
    public boolean isSetInvoiceNumber() {
17412
      return this.invoiceNumber != null;
17413
    }
17414
 
17415
    public void setInvoiceNumberIsSet(boolean value) {
17416
      if (!value) {
17417
        this.invoiceNumber = null;
17418
      }
17419
    }
17420
 
17421
    public long getSupplierId() {
17422
      return this.supplierId;
17423
    }
17424
 
17425
    public void setSupplierId(long supplierId) {
17426
      this.supplierId = supplierId;
17427
      setSupplierIdIsSet(true);
17428
    }
17429
 
17430
    public void unsetSupplierId() {
17431
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
17432
    }
17433
 
17434
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
17435
    public boolean isSetSupplierId() {
17436
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
17437
    }
17438
 
17439
    public void setSupplierIdIsSet(boolean value) {
17440
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
17441
    }
17442
 
17443
    public void setFieldValue(_Fields field, Object value) {
17444
      switch (field) {
17445
      case INVOICE_NUMBER:
17446
        if (value == null) {
17447
          unsetInvoiceNumber();
17448
        } else {
17449
          setInvoiceNumber((String)value);
17450
        }
17451
        break;
17452
 
17453
      case SUPPLIER_ID:
17454
        if (value == null) {
17455
          unsetSupplierId();
17456
        } else {
17457
          setSupplierId((Long)value);
17458
        }
17459
        break;
17460
 
17461
      }
17462
    }
17463
 
17464
    public Object getFieldValue(_Fields field) {
17465
      switch (field) {
17466
      case INVOICE_NUMBER:
17467
        return getInvoiceNumber();
17468
 
17469
      case SUPPLIER_ID:
17470
        return Long.valueOf(getSupplierId());
17471
 
17472
      }
17473
      throw new IllegalStateException();
17474
    }
17475
 
17476
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17477
    public boolean isSet(_Fields field) {
17478
      if (field == null) {
17479
        throw new IllegalArgumentException();
17480
      }
17481
 
17482
      switch (field) {
17483
      case INVOICE_NUMBER:
17484
        return isSetInvoiceNumber();
17485
      case SUPPLIER_ID:
17486
        return isSetSupplierId();
17487
      }
17488
      throw new IllegalStateException();
17489
    }
17490
 
17491
    @Override
17492
    public boolean equals(Object that) {
17493
      if (that == null)
17494
        return false;
17495
      if (that instanceof getInvoice_args)
17496
        return this.equals((getInvoice_args)that);
17497
      return false;
17498
    }
17499
 
17500
    public boolean equals(getInvoice_args that) {
17501
      if (that == null)
17502
        return false;
17503
 
17504
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
17505
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
17506
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
17507
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
17508
          return false;
17509
        if (!this.invoiceNumber.equals(that.invoiceNumber))
17510
          return false;
17511
      }
17512
 
17513
      boolean this_present_supplierId = true;
17514
      boolean that_present_supplierId = true;
17515
      if (this_present_supplierId || that_present_supplierId) {
17516
        if (!(this_present_supplierId && that_present_supplierId))
17517
          return false;
17518
        if (this.supplierId != that.supplierId)
17519
          return false;
17520
      }
17521
 
17522
      return true;
17523
    }
17524
 
17525
    @Override
17526
    public int hashCode() {
17527
      return 0;
17528
    }
17529
 
17530
    public int compareTo(getInvoice_args other) {
17531
      if (!getClass().equals(other.getClass())) {
17532
        return getClass().getName().compareTo(other.getClass().getName());
17533
      }
17534
 
17535
      int lastComparison = 0;
17536
      getInvoice_args typedOther = (getInvoice_args)other;
17537
 
17538
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
17539
      if (lastComparison != 0) {
17540
        return lastComparison;
17541
      }
17542
      if (isSetInvoiceNumber()) {
17543
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
17544
        if (lastComparison != 0) {
17545
          return lastComparison;
17546
        }
17547
      }
17548
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
17549
      if (lastComparison != 0) {
17550
        return lastComparison;
17551
      }
17552
      if (isSetSupplierId()) {
17553
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
17554
        if (lastComparison != 0) {
17555
          return lastComparison;
17556
        }
17557
      }
17558
      return 0;
17559
    }
17560
 
17561
    public _Fields fieldForId(int fieldId) {
17562
      return _Fields.findByThriftId(fieldId);
17563
    }
17564
 
17565
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17566
      org.apache.thrift.protocol.TField field;
17567
      iprot.readStructBegin();
17568
      while (true)
17569
      {
17570
        field = iprot.readFieldBegin();
17571
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17572
          break;
17573
        }
17574
        switch (field.id) {
17575
          case 1: // INVOICE_NUMBER
17576
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
17577
              this.invoiceNumber = iprot.readString();
17578
            } else { 
17579
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17580
            }
17581
            break;
17582
          case 2: // SUPPLIER_ID
17583
            if (field.type == org.apache.thrift.protocol.TType.I64) {
17584
              this.supplierId = iprot.readI64();
17585
              setSupplierIdIsSet(true);
17586
            } else { 
17587
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17588
            }
17589
            break;
17590
          default:
17591
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17592
        }
17593
        iprot.readFieldEnd();
17594
      }
17595
      iprot.readStructEnd();
17596
      validate();
17597
    }
17598
 
17599
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17600
      validate();
17601
 
17602
      oprot.writeStructBegin(STRUCT_DESC);
17603
      if (this.invoiceNumber != null) {
17604
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
17605
        oprot.writeString(this.invoiceNumber);
17606
        oprot.writeFieldEnd();
17607
      }
17608
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
17609
      oprot.writeI64(this.supplierId);
17610
      oprot.writeFieldEnd();
17611
      oprot.writeFieldStop();
17612
      oprot.writeStructEnd();
17613
    }
17614
 
17615
    @Override
17616
    public String toString() {
17617
      StringBuilder sb = new StringBuilder("getInvoice_args(");
17618
      boolean first = true;
17619
 
17620
      sb.append("invoiceNumber:");
17621
      if (this.invoiceNumber == null) {
17622
        sb.append("null");
17623
      } else {
17624
        sb.append(this.invoiceNumber);
17625
      }
17626
      first = false;
17627
      if (!first) sb.append(", ");
17628
      sb.append("supplierId:");
17629
      sb.append(this.supplierId);
17630
      first = false;
17631
      sb.append(")");
17632
      return sb.toString();
17633
    }
17634
 
17635
    public void validate() throws org.apache.thrift.TException {
17636
      // check for required fields
17637
    }
17638
 
17639
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17640
      try {
17641
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17642
      } catch (org.apache.thrift.TException te) {
17643
        throw new java.io.IOException(te);
17644
      }
17645
    }
17646
 
17647
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17648
      try {
17649
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17650
      } catch (org.apache.thrift.TException te) {
17651
        throw new java.io.IOException(te);
17652
      }
17653
    }
17654
 
17655
  }
17656
 
17657
  public static class getInvoice_result implements org.apache.thrift.TBase<getInvoice_result, getInvoice_result._Fields>, java.io.Serializable, Cloneable   {
17658
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoice_result");
17659
 
17660
    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);
17661
 
17662
    private List<PurchaseReturn> success; // required
17663
 
17664
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17665
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17666
      SUCCESS((short)0, "success");
17667
 
17668
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17669
 
17670
      static {
17671
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17672
          byName.put(field.getFieldName(), field);
17673
        }
17674
      }
17675
 
17676
      /**
17677
       * Find the _Fields constant that matches fieldId, or null if its not found.
17678
       */
17679
      public static _Fields findByThriftId(int fieldId) {
17680
        switch(fieldId) {
17681
          case 0: // SUCCESS
17682
            return SUCCESS;
17683
          default:
17684
            return null;
17685
        }
17686
      }
17687
 
17688
      /**
17689
       * Find the _Fields constant that matches fieldId, throwing an exception
17690
       * if it is not found.
17691
       */
17692
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17693
        _Fields fields = findByThriftId(fieldId);
17694
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17695
        return fields;
17696
      }
17697
 
17698
      /**
17699
       * Find the _Fields constant that matches name, or null if its not found.
17700
       */
17701
      public static _Fields findByName(String name) {
17702
        return byName.get(name);
17703
      }
17704
 
17705
      private final short _thriftId;
17706
      private final String _fieldName;
17707
 
17708
      _Fields(short thriftId, String fieldName) {
17709
        _thriftId = thriftId;
17710
        _fieldName = fieldName;
17711
      }
17712
 
17713
      public short getThriftFieldId() {
17714
        return _thriftId;
17715
      }
17716
 
17717
      public String getFieldName() {
17718
        return _fieldName;
17719
      }
17720
    }
17721
 
17722
    // isset id assignments
17723
 
17724
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17725
    static {
17726
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17727
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17728
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
17729
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class))));
17730
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17731
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoice_result.class, metaDataMap);
17732
    }
17733
 
17734
    public getInvoice_result() {
17735
    }
17736
 
17737
    public getInvoice_result(
17738
      List<PurchaseReturn> success)
17739
    {
17740
      this();
17741
      this.success = success;
17742
    }
17743
 
17744
    /**
17745
     * Performs a deep copy on <i>other</i>.
17746
     */
17747
    public getInvoice_result(getInvoice_result other) {
17748
      if (other.isSetSuccess()) {
17749
        List<PurchaseReturn> __this__success = new ArrayList<PurchaseReturn>();
17750
        for (PurchaseReturn other_element : other.success) {
17751
          __this__success.add(new PurchaseReturn(other_element));
17752
        }
17753
        this.success = __this__success;
17754
      }
17755
    }
17756
 
17757
    public getInvoice_result deepCopy() {
17758
      return new getInvoice_result(this);
17759
    }
17760
 
17761
    @Override
17762
    public void clear() {
17763
      this.success = null;
17764
    }
17765
 
17766
    public int getSuccessSize() {
17767
      return (this.success == null) ? 0 : this.success.size();
17768
    }
17769
 
17770
    public java.util.Iterator<PurchaseReturn> getSuccessIterator() {
17771
      return (this.success == null) ? null : this.success.iterator();
17772
    }
17773
 
17774
    public void addToSuccess(PurchaseReturn elem) {
17775
      if (this.success == null) {
17776
        this.success = new ArrayList<PurchaseReturn>();
17777
      }
17778
      this.success.add(elem);
17779
    }
17780
 
17781
    public List<PurchaseReturn> getSuccess() {
17782
      return this.success;
17783
    }
17784
 
17785
    public void setSuccess(List<PurchaseReturn> success) {
17786
      this.success = success;
17787
    }
17788
 
17789
    public void unsetSuccess() {
17790
      this.success = null;
17791
    }
17792
 
17793
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
17794
    public boolean isSetSuccess() {
17795
      return this.success != null;
17796
    }
17797
 
17798
    public void setSuccessIsSet(boolean value) {
17799
      if (!value) {
17800
        this.success = null;
17801
      }
17802
    }
17803
 
17804
    public void setFieldValue(_Fields field, Object value) {
17805
      switch (field) {
17806
      case SUCCESS:
17807
        if (value == null) {
17808
          unsetSuccess();
17809
        } else {
17810
          setSuccess((List<PurchaseReturn>)value);
17811
        }
17812
        break;
17813
 
17814
      }
17815
    }
17816
 
17817
    public Object getFieldValue(_Fields field) {
17818
      switch (field) {
17819
      case SUCCESS:
17820
        return getSuccess();
17821
 
17822
      }
17823
      throw new IllegalStateException();
17824
    }
17825
 
17826
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17827
    public boolean isSet(_Fields field) {
17828
      if (field == null) {
17829
        throw new IllegalArgumentException();
17830
      }
17831
 
17832
      switch (field) {
17833
      case SUCCESS:
17834
        return isSetSuccess();
17835
      }
17836
      throw new IllegalStateException();
17837
    }
17838
 
17839
    @Override
17840
    public boolean equals(Object that) {
17841
      if (that == null)
17842
        return false;
17843
      if (that instanceof getInvoice_result)
17844
        return this.equals((getInvoice_result)that);
17845
      return false;
17846
    }
17847
 
17848
    public boolean equals(getInvoice_result that) {
17849
      if (that == null)
17850
        return false;
17851
 
17852
      boolean this_present_success = true && this.isSetSuccess();
17853
      boolean that_present_success = true && that.isSetSuccess();
17854
      if (this_present_success || that_present_success) {
17855
        if (!(this_present_success && that_present_success))
17856
          return false;
17857
        if (!this.success.equals(that.success))
17858
          return false;
17859
      }
17860
 
17861
      return true;
17862
    }
17863
 
17864
    @Override
17865
    public int hashCode() {
17866
      return 0;
17867
    }
17868
 
17869
    public int compareTo(getInvoice_result other) {
17870
      if (!getClass().equals(other.getClass())) {
17871
        return getClass().getName().compareTo(other.getClass().getName());
17872
      }
17873
 
17874
      int lastComparison = 0;
17875
      getInvoice_result typedOther = (getInvoice_result)other;
17876
 
17877
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
17878
      if (lastComparison != 0) {
17879
        return lastComparison;
17880
      }
17881
      if (isSetSuccess()) {
17882
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
17883
        if (lastComparison != 0) {
17884
          return lastComparison;
17885
        }
17886
      }
17887
      return 0;
17888
    }
17889
 
17890
    public _Fields fieldForId(int fieldId) {
17891
      return _Fields.findByThriftId(fieldId);
17892
    }
17893
 
17894
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17895
      org.apache.thrift.protocol.TField field;
17896
      iprot.readStructBegin();
17897
      while (true)
17898
      {
17899
        field = iprot.readFieldBegin();
17900
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17901
          break;
17902
        }
17903
        switch (field.id) {
17904
          case 0: // SUCCESS
17905
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
17906
              {
7410 amar.kumar 17907
                org.apache.thrift.protocol.TList _list36 = iprot.readListBegin();
17908
                this.success = new ArrayList<PurchaseReturn>(_list36.size);
17909
                for (int _i37 = 0; _i37 < _list36.size; ++_i37)
6630 amar.kumar 17910
                {
7410 amar.kumar 17911
                  PurchaseReturn _elem38; // required
17912
                  _elem38 = new PurchaseReturn();
17913
                  _elem38.read(iprot);
17914
                  this.success.add(_elem38);
6630 amar.kumar 17915
                }
17916
                iprot.readListEnd();
17917
              }
17918
            } else { 
17919
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17920
            }
17921
            break;
17922
          default:
17923
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17924
        }
17925
        iprot.readFieldEnd();
17926
      }
17927
      iprot.readStructEnd();
17928
      validate();
17929
    }
17930
 
17931
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17932
      oprot.writeStructBegin(STRUCT_DESC);
17933
 
17934
      if (this.isSetSuccess()) {
17935
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17936
        {
17937
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7410 amar.kumar 17938
          for (PurchaseReturn _iter39 : this.success)
6630 amar.kumar 17939
          {
7410 amar.kumar 17940
            _iter39.write(oprot);
6630 amar.kumar 17941
          }
17942
          oprot.writeListEnd();
17943
        }
17944
        oprot.writeFieldEnd();
17945
      }
17946
      oprot.writeFieldStop();
17947
      oprot.writeStructEnd();
17948
    }
17949
 
17950
    @Override
17951
    public String toString() {
17952
      StringBuilder sb = new StringBuilder("getInvoice_result(");
17953
      boolean first = true;
17954
 
17955
      sb.append("success:");
17956
      if (this.success == null) {
17957
        sb.append("null");
17958
      } else {
17959
        sb.append(this.success);
17960
      }
17961
      first = false;
17962
      sb.append(")");
17963
      return sb.toString();
17964
    }
17965
 
17966
    public void validate() throws org.apache.thrift.TException {
17967
      // check for required fields
17968
    }
17969
 
17970
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17971
      try {
17972
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17973
      } catch (org.apache.thrift.TException te) {
17974
        throw new java.io.IOException(te);
17975
      }
17976
    }
17977
 
17978
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17979
      try {
17980
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17981
      } catch (org.apache.thrift.TException te) {
17982
        throw new java.io.IOException(te);
17983
      }
17984
    }
17985
 
17986
  }
17987
 
6762 amar.kumar 17988
  public static class createPurchaseForOurExtBilling_args implements org.apache.thrift.TBase<createPurchaseForOurExtBilling_args, createPurchaseForOurExtBilling_args._Fields>, java.io.Serializable, Cloneable   {
17989
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseForOurExtBilling_args");
17990
 
17991
    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);
17992
    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 17993
    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);
17994
    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 17995
 
17996
    private String invoiceNumber; // required
17997
    private double unitPrice; // required
7672 rajveer 17998
    private double nlc; // required
6762 amar.kumar 17999
    private long itemId; // required
18000
 
18001
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18002
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18003
      INVOICE_NUMBER((short)1, "invoiceNumber"),
18004
      UNIT_PRICE((short)2, "unitPrice"),
7672 rajveer 18005
      NLC((short)3, "nlc"),
18006
      ITEM_ID((short)4, "itemId");
6762 amar.kumar 18007
 
18008
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18009
 
18010
      static {
18011
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18012
          byName.put(field.getFieldName(), field);
18013
        }
18014
      }
18015
 
18016
      /**
18017
       * Find the _Fields constant that matches fieldId, or null if its not found.
18018
       */
18019
      public static _Fields findByThriftId(int fieldId) {
18020
        switch(fieldId) {
18021
          case 1: // INVOICE_NUMBER
18022
            return INVOICE_NUMBER;
18023
          case 2: // UNIT_PRICE
18024
            return UNIT_PRICE;
7672 rajveer 18025
          case 3: // NLC
18026
            return NLC;
18027
          case 4: // ITEM_ID
6762 amar.kumar 18028
            return ITEM_ID;
18029
          default:
18030
            return null;
18031
        }
18032
      }
18033
 
18034
      /**
18035
       * Find the _Fields constant that matches fieldId, throwing an exception
18036
       * if it is not found.
18037
       */
18038
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18039
        _Fields fields = findByThriftId(fieldId);
18040
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18041
        return fields;
18042
      }
18043
 
18044
      /**
18045
       * Find the _Fields constant that matches name, or null if its not found.
18046
       */
18047
      public static _Fields findByName(String name) {
18048
        return byName.get(name);
18049
      }
18050
 
18051
      private final short _thriftId;
18052
      private final String _fieldName;
18053
 
18054
      _Fields(short thriftId, String fieldName) {
18055
        _thriftId = thriftId;
18056
        _fieldName = fieldName;
18057
      }
18058
 
18059
      public short getThriftFieldId() {
18060
        return _thriftId;
18061
      }
18062
 
18063
      public String getFieldName() {
18064
        return _fieldName;
18065
      }
18066
    }
18067
 
18068
    // isset id assignments
18069
    private static final int __UNITPRICE_ISSET_ID = 0;
7672 rajveer 18070
    private static final int __NLC_ISSET_ID = 1;
18071
    private static final int __ITEMID_ISSET_ID = 2;
18072
    private BitSet __isset_bit_vector = new BitSet(3);
6762 amar.kumar 18073
 
18074
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18075
    static {
18076
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18077
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18078
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
18079
      tmpMap.put(_Fields.UNIT_PRICE, new org.apache.thrift.meta_data.FieldMetaData("unitPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18080
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
7672 rajveer 18081
      tmpMap.put(_Fields.NLC, new org.apache.thrift.meta_data.FieldMetaData("nlc", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18082
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
6762 amar.kumar 18083
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18084
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18085
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18086
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseForOurExtBilling_args.class, metaDataMap);
18087
    }
18088
 
18089
    public createPurchaseForOurExtBilling_args() {
18090
    }
18091
 
18092
    public createPurchaseForOurExtBilling_args(
18093
      String invoiceNumber,
18094
      double unitPrice,
7672 rajveer 18095
      double nlc,
6762 amar.kumar 18096
      long itemId)
18097
    {
18098
      this();
18099
      this.invoiceNumber = invoiceNumber;
18100
      this.unitPrice = unitPrice;
18101
      setUnitPriceIsSet(true);
7672 rajveer 18102
      this.nlc = nlc;
18103
      setNlcIsSet(true);
6762 amar.kumar 18104
      this.itemId = itemId;
18105
      setItemIdIsSet(true);
18106
    }
18107
 
18108
    /**
18109
     * Performs a deep copy on <i>other</i>.
18110
     */
18111
    public createPurchaseForOurExtBilling_args(createPurchaseForOurExtBilling_args other) {
18112
      __isset_bit_vector.clear();
18113
      __isset_bit_vector.or(other.__isset_bit_vector);
18114
      if (other.isSetInvoiceNumber()) {
18115
        this.invoiceNumber = other.invoiceNumber;
18116
      }
18117
      this.unitPrice = other.unitPrice;
7672 rajveer 18118
      this.nlc = other.nlc;
6762 amar.kumar 18119
      this.itemId = other.itemId;
18120
    }
18121
 
18122
    public createPurchaseForOurExtBilling_args deepCopy() {
18123
      return new createPurchaseForOurExtBilling_args(this);
18124
    }
18125
 
18126
    @Override
18127
    public void clear() {
18128
      this.invoiceNumber = null;
18129
      setUnitPriceIsSet(false);
18130
      this.unitPrice = 0.0;
7672 rajveer 18131
      setNlcIsSet(false);
18132
      this.nlc = 0.0;
6762 amar.kumar 18133
      setItemIdIsSet(false);
18134
      this.itemId = 0;
18135
    }
18136
 
18137
    public String getInvoiceNumber() {
18138
      return this.invoiceNumber;
18139
    }
18140
 
18141
    public void setInvoiceNumber(String invoiceNumber) {
18142
      this.invoiceNumber = invoiceNumber;
18143
    }
18144
 
18145
    public void unsetInvoiceNumber() {
18146
      this.invoiceNumber = null;
18147
    }
18148
 
18149
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
18150
    public boolean isSetInvoiceNumber() {
18151
      return this.invoiceNumber != null;
18152
    }
18153
 
18154
    public void setInvoiceNumberIsSet(boolean value) {
18155
      if (!value) {
18156
        this.invoiceNumber = null;
18157
      }
18158
    }
18159
 
18160
    public double getUnitPrice() {
18161
      return this.unitPrice;
18162
    }
18163
 
18164
    public void setUnitPrice(double unitPrice) {
18165
      this.unitPrice = unitPrice;
18166
      setUnitPriceIsSet(true);
18167
    }
18168
 
18169
    public void unsetUnitPrice() {
18170
      __isset_bit_vector.clear(__UNITPRICE_ISSET_ID);
18171
    }
18172
 
18173
    /** Returns true if field unitPrice is set (has been assigned a value) and false otherwise */
18174
    public boolean isSetUnitPrice() {
18175
      return __isset_bit_vector.get(__UNITPRICE_ISSET_ID);
18176
    }
18177
 
18178
    public void setUnitPriceIsSet(boolean value) {
18179
      __isset_bit_vector.set(__UNITPRICE_ISSET_ID, value);
18180
    }
18181
 
7672 rajveer 18182
    public double getNlc() {
18183
      return this.nlc;
18184
    }
18185
 
18186
    public void setNlc(double nlc) {
18187
      this.nlc = nlc;
18188
      setNlcIsSet(true);
18189
    }
18190
 
18191
    public void unsetNlc() {
18192
      __isset_bit_vector.clear(__NLC_ISSET_ID);
18193
    }
18194
 
18195
    /** Returns true if field nlc is set (has been assigned a value) and false otherwise */
18196
    public boolean isSetNlc() {
18197
      return __isset_bit_vector.get(__NLC_ISSET_ID);
18198
    }
18199
 
18200
    public void setNlcIsSet(boolean value) {
18201
      __isset_bit_vector.set(__NLC_ISSET_ID, value);
18202
    }
18203
 
6762 amar.kumar 18204
    public long getItemId() {
18205
      return this.itemId;
18206
    }
18207
 
18208
    public void setItemId(long itemId) {
18209
      this.itemId = itemId;
18210
      setItemIdIsSet(true);
18211
    }
18212
 
18213
    public void unsetItemId() {
18214
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
18215
    }
18216
 
18217
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
18218
    public boolean isSetItemId() {
18219
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
18220
    }
18221
 
18222
    public void setItemIdIsSet(boolean value) {
18223
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
18224
    }
18225
 
18226
    public void setFieldValue(_Fields field, Object value) {
18227
      switch (field) {
18228
      case INVOICE_NUMBER:
18229
        if (value == null) {
18230
          unsetInvoiceNumber();
18231
        } else {
18232
          setInvoiceNumber((String)value);
18233
        }
18234
        break;
18235
 
18236
      case UNIT_PRICE:
18237
        if (value == null) {
18238
          unsetUnitPrice();
18239
        } else {
18240
          setUnitPrice((Double)value);
18241
        }
18242
        break;
18243
 
7672 rajveer 18244
      case NLC:
18245
        if (value == null) {
18246
          unsetNlc();
18247
        } else {
18248
          setNlc((Double)value);
18249
        }
18250
        break;
18251
 
6762 amar.kumar 18252
      case ITEM_ID:
18253
        if (value == null) {
18254
          unsetItemId();
18255
        } else {
18256
          setItemId((Long)value);
18257
        }
18258
        break;
18259
 
18260
      }
18261
    }
18262
 
18263
    public Object getFieldValue(_Fields field) {
18264
      switch (field) {
18265
      case INVOICE_NUMBER:
18266
        return getInvoiceNumber();
18267
 
18268
      case UNIT_PRICE:
18269
        return Double.valueOf(getUnitPrice());
18270
 
7672 rajveer 18271
      case NLC:
18272
        return Double.valueOf(getNlc());
18273
 
6762 amar.kumar 18274
      case ITEM_ID:
18275
        return Long.valueOf(getItemId());
18276
 
18277
      }
18278
      throw new IllegalStateException();
18279
    }
18280
 
18281
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18282
    public boolean isSet(_Fields field) {
18283
      if (field == null) {
18284
        throw new IllegalArgumentException();
18285
      }
18286
 
18287
      switch (field) {
18288
      case INVOICE_NUMBER:
18289
        return isSetInvoiceNumber();
18290
      case UNIT_PRICE:
18291
        return isSetUnitPrice();
7672 rajveer 18292
      case NLC:
18293
        return isSetNlc();
6762 amar.kumar 18294
      case ITEM_ID:
18295
        return isSetItemId();
18296
      }
18297
      throw new IllegalStateException();
18298
    }
18299
 
18300
    @Override
18301
    public boolean equals(Object that) {
18302
      if (that == null)
18303
        return false;
18304
      if (that instanceof createPurchaseForOurExtBilling_args)
18305
        return this.equals((createPurchaseForOurExtBilling_args)that);
18306
      return false;
18307
    }
18308
 
18309
    public boolean equals(createPurchaseForOurExtBilling_args that) {
18310
      if (that == null)
18311
        return false;
18312
 
18313
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
18314
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
18315
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
18316
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
18317
          return false;
18318
        if (!this.invoiceNumber.equals(that.invoiceNumber))
18319
          return false;
18320
      }
18321
 
18322
      boolean this_present_unitPrice = true;
18323
      boolean that_present_unitPrice = true;
18324
      if (this_present_unitPrice || that_present_unitPrice) {
18325
        if (!(this_present_unitPrice && that_present_unitPrice))
18326
          return false;
18327
        if (this.unitPrice != that.unitPrice)
18328
          return false;
18329
      }
18330
 
7672 rajveer 18331
      boolean this_present_nlc = true;
18332
      boolean that_present_nlc = true;
18333
      if (this_present_nlc || that_present_nlc) {
18334
        if (!(this_present_nlc && that_present_nlc))
18335
          return false;
18336
        if (this.nlc != that.nlc)
18337
          return false;
18338
      }
18339
 
6762 amar.kumar 18340
      boolean this_present_itemId = true;
18341
      boolean that_present_itemId = true;
18342
      if (this_present_itemId || that_present_itemId) {
18343
        if (!(this_present_itemId && that_present_itemId))
18344
          return false;
18345
        if (this.itemId != that.itemId)
18346
          return false;
18347
      }
18348
 
18349
      return true;
18350
    }
18351
 
18352
    @Override
18353
    public int hashCode() {
18354
      return 0;
18355
    }
18356
 
18357
    public int compareTo(createPurchaseForOurExtBilling_args other) {
18358
      if (!getClass().equals(other.getClass())) {
18359
        return getClass().getName().compareTo(other.getClass().getName());
18360
      }
18361
 
18362
      int lastComparison = 0;
18363
      createPurchaseForOurExtBilling_args typedOther = (createPurchaseForOurExtBilling_args)other;
18364
 
18365
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
18366
      if (lastComparison != 0) {
18367
        return lastComparison;
18368
      }
18369
      if (isSetInvoiceNumber()) {
18370
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
18371
        if (lastComparison != 0) {
18372
          return lastComparison;
18373
        }
18374
      }
18375
      lastComparison = Boolean.valueOf(isSetUnitPrice()).compareTo(typedOther.isSetUnitPrice());
18376
      if (lastComparison != 0) {
18377
        return lastComparison;
18378
      }
18379
      if (isSetUnitPrice()) {
18380
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unitPrice, typedOther.unitPrice);
18381
        if (lastComparison != 0) {
18382
          return lastComparison;
18383
        }
18384
      }
7672 rajveer 18385
      lastComparison = Boolean.valueOf(isSetNlc()).compareTo(typedOther.isSetNlc());
18386
      if (lastComparison != 0) {
18387
        return lastComparison;
18388
      }
18389
      if (isSetNlc()) {
18390
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nlc, typedOther.nlc);
18391
        if (lastComparison != 0) {
18392
          return lastComparison;
18393
        }
18394
      }
6762 amar.kumar 18395
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
18396
      if (lastComparison != 0) {
18397
        return lastComparison;
18398
      }
18399
      if (isSetItemId()) {
18400
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
18401
        if (lastComparison != 0) {
18402
          return lastComparison;
18403
        }
18404
      }
18405
      return 0;
18406
    }
18407
 
18408
    public _Fields fieldForId(int fieldId) {
18409
      return _Fields.findByThriftId(fieldId);
18410
    }
18411
 
18412
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18413
      org.apache.thrift.protocol.TField field;
18414
      iprot.readStructBegin();
18415
      while (true)
18416
      {
18417
        field = iprot.readFieldBegin();
18418
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18419
          break;
18420
        }
18421
        switch (field.id) {
18422
          case 1: // INVOICE_NUMBER
18423
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
18424
              this.invoiceNumber = iprot.readString();
18425
            } else { 
18426
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18427
            }
18428
            break;
18429
          case 2: // UNIT_PRICE
18430
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
18431
              this.unitPrice = iprot.readDouble();
18432
              setUnitPriceIsSet(true);
18433
            } else { 
18434
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18435
            }
18436
            break;
7672 rajveer 18437
          case 3: // NLC
18438
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
18439
              this.nlc = iprot.readDouble();
18440
              setNlcIsSet(true);
18441
            } else { 
18442
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18443
            }
18444
            break;
18445
          case 4: // ITEM_ID
6762 amar.kumar 18446
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18447
              this.itemId = iprot.readI64();
18448
              setItemIdIsSet(true);
18449
            } else { 
18450
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18451
            }
18452
            break;
18453
          default:
18454
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18455
        }
18456
        iprot.readFieldEnd();
18457
      }
18458
      iprot.readStructEnd();
18459
      validate();
18460
    }
18461
 
18462
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18463
      validate();
18464
 
18465
      oprot.writeStructBegin(STRUCT_DESC);
18466
      if (this.invoiceNumber != null) {
18467
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
18468
        oprot.writeString(this.invoiceNumber);
18469
        oprot.writeFieldEnd();
18470
      }
18471
      oprot.writeFieldBegin(UNIT_PRICE_FIELD_DESC);
18472
      oprot.writeDouble(this.unitPrice);
18473
      oprot.writeFieldEnd();
7672 rajveer 18474
      oprot.writeFieldBegin(NLC_FIELD_DESC);
18475
      oprot.writeDouble(this.nlc);
18476
      oprot.writeFieldEnd();
6762 amar.kumar 18477
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
18478
      oprot.writeI64(this.itemId);
18479
      oprot.writeFieldEnd();
18480
      oprot.writeFieldStop();
18481
      oprot.writeStructEnd();
18482
    }
18483
 
18484
    @Override
18485
    public String toString() {
18486
      StringBuilder sb = new StringBuilder("createPurchaseForOurExtBilling_args(");
18487
      boolean first = true;
18488
 
18489
      sb.append("invoiceNumber:");
18490
      if (this.invoiceNumber == null) {
18491
        sb.append("null");
18492
      } else {
18493
        sb.append(this.invoiceNumber);
18494
      }
18495
      first = false;
18496
      if (!first) sb.append(", ");
18497
      sb.append("unitPrice:");
18498
      sb.append(this.unitPrice);
18499
      first = false;
18500
      if (!first) sb.append(", ");
7672 rajveer 18501
      sb.append("nlc:");
18502
      sb.append(this.nlc);
18503
      first = false;
18504
      if (!first) sb.append(", ");
6762 amar.kumar 18505
      sb.append("itemId:");
18506
      sb.append(this.itemId);
18507
      first = false;
18508
      sb.append(")");
18509
      return sb.toString();
18510
    }
18511
 
18512
    public void validate() throws org.apache.thrift.TException {
18513
      // check for required fields
18514
    }
18515
 
18516
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18517
      try {
18518
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18519
      } catch (org.apache.thrift.TException te) {
18520
        throw new java.io.IOException(te);
18521
      }
18522
    }
18523
 
18524
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18525
      try {
18526
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
18527
        __isset_bit_vector = new BitSet(1);
18528
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18529
      } catch (org.apache.thrift.TException te) {
18530
        throw new java.io.IOException(te);
18531
      }
18532
    }
18533
 
18534
  }
18535
 
18536
  public static class createPurchaseForOurExtBilling_result implements org.apache.thrift.TBase<createPurchaseForOurExtBilling_result, createPurchaseForOurExtBilling_result._Fields>, java.io.Serializable, Cloneable   {
18537
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseForOurExtBilling_result");
18538
 
18539
    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);
18540
 
18541
    private long success; // required
18542
 
18543
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18544
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18545
      SUCCESS((short)0, "success");
18546
 
18547
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18548
 
18549
      static {
18550
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18551
          byName.put(field.getFieldName(), field);
18552
        }
18553
      }
18554
 
18555
      /**
18556
       * Find the _Fields constant that matches fieldId, or null if its not found.
18557
       */
18558
      public static _Fields findByThriftId(int fieldId) {
18559
        switch(fieldId) {
18560
          case 0: // SUCCESS
18561
            return SUCCESS;
18562
          default:
18563
            return null;
18564
        }
18565
      }
18566
 
18567
      /**
18568
       * Find the _Fields constant that matches fieldId, throwing an exception
18569
       * if it is not found.
18570
       */
18571
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18572
        _Fields fields = findByThriftId(fieldId);
18573
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18574
        return fields;
18575
      }
18576
 
18577
      /**
18578
       * Find the _Fields constant that matches name, or null if its not found.
18579
       */
18580
      public static _Fields findByName(String name) {
18581
        return byName.get(name);
18582
      }
18583
 
18584
      private final short _thriftId;
18585
      private final String _fieldName;
18586
 
18587
      _Fields(short thriftId, String fieldName) {
18588
        _thriftId = thriftId;
18589
        _fieldName = fieldName;
18590
      }
18591
 
18592
      public short getThriftFieldId() {
18593
        return _thriftId;
18594
      }
18595
 
18596
      public String getFieldName() {
18597
        return _fieldName;
18598
      }
18599
    }
18600
 
18601
    // isset id assignments
18602
    private static final int __SUCCESS_ISSET_ID = 0;
18603
    private BitSet __isset_bit_vector = new BitSet(1);
18604
 
18605
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18606
    static {
18607
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18608
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18609
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18610
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18611
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseForOurExtBilling_result.class, metaDataMap);
18612
    }
18613
 
18614
    public createPurchaseForOurExtBilling_result() {
18615
    }
18616
 
18617
    public createPurchaseForOurExtBilling_result(
18618
      long success)
18619
    {
18620
      this();
18621
      this.success = success;
18622
      setSuccessIsSet(true);
18623
    }
18624
 
18625
    /**
18626
     * Performs a deep copy on <i>other</i>.
18627
     */
18628
    public createPurchaseForOurExtBilling_result(createPurchaseForOurExtBilling_result other) {
18629
      __isset_bit_vector.clear();
18630
      __isset_bit_vector.or(other.__isset_bit_vector);
18631
      this.success = other.success;
18632
    }
18633
 
18634
    public createPurchaseForOurExtBilling_result deepCopy() {
18635
      return new createPurchaseForOurExtBilling_result(this);
18636
    }
18637
 
18638
    @Override
18639
    public void clear() {
18640
      setSuccessIsSet(false);
18641
      this.success = 0;
18642
    }
18643
 
18644
    public long getSuccess() {
18645
      return this.success;
18646
    }
18647
 
18648
    public void setSuccess(long success) {
18649
      this.success = success;
18650
      setSuccessIsSet(true);
18651
    }
18652
 
18653
    public void unsetSuccess() {
18654
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
18655
    }
18656
 
18657
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
18658
    public boolean isSetSuccess() {
18659
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
18660
    }
18661
 
18662
    public void setSuccessIsSet(boolean value) {
18663
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
18664
    }
18665
 
18666
    public void setFieldValue(_Fields field, Object value) {
18667
      switch (field) {
18668
      case SUCCESS:
18669
        if (value == null) {
18670
          unsetSuccess();
18671
        } else {
18672
          setSuccess((Long)value);
18673
        }
18674
        break;
18675
 
18676
      }
18677
    }
18678
 
18679
    public Object getFieldValue(_Fields field) {
18680
      switch (field) {
18681
      case SUCCESS:
18682
        return Long.valueOf(getSuccess());
18683
 
18684
      }
18685
      throw new IllegalStateException();
18686
    }
18687
 
18688
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18689
    public boolean isSet(_Fields field) {
18690
      if (field == null) {
18691
        throw new IllegalArgumentException();
18692
      }
18693
 
18694
      switch (field) {
18695
      case SUCCESS:
18696
        return isSetSuccess();
18697
      }
18698
      throw new IllegalStateException();
18699
    }
18700
 
18701
    @Override
18702
    public boolean equals(Object that) {
18703
      if (that == null)
18704
        return false;
18705
      if (that instanceof createPurchaseForOurExtBilling_result)
18706
        return this.equals((createPurchaseForOurExtBilling_result)that);
18707
      return false;
18708
    }
18709
 
18710
    public boolean equals(createPurchaseForOurExtBilling_result that) {
18711
      if (that == null)
18712
        return false;
18713
 
18714
      boolean this_present_success = true;
18715
      boolean that_present_success = true;
18716
      if (this_present_success || that_present_success) {
18717
        if (!(this_present_success && that_present_success))
18718
          return false;
18719
        if (this.success != that.success)
18720
          return false;
18721
      }
18722
 
18723
      return true;
18724
    }
18725
 
18726
    @Override
18727
    public int hashCode() {
18728
      return 0;
18729
    }
18730
 
18731
    public int compareTo(createPurchaseForOurExtBilling_result other) {
18732
      if (!getClass().equals(other.getClass())) {
18733
        return getClass().getName().compareTo(other.getClass().getName());
18734
      }
18735
 
18736
      int lastComparison = 0;
18737
      createPurchaseForOurExtBilling_result typedOther = (createPurchaseForOurExtBilling_result)other;
18738
 
18739
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
18740
      if (lastComparison != 0) {
18741
        return lastComparison;
18742
      }
18743
      if (isSetSuccess()) {
18744
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
18745
        if (lastComparison != 0) {
18746
          return lastComparison;
18747
        }
18748
      }
18749
      return 0;
18750
    }
18751
 
18752
    public _Fields fieldForId(int fieldId) {
18753
      return _Fields.findByThriftId(fieldId);
18754
    }
18755
 
18756
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18757
      org.apache.thrift.protocol.TField field;
18758
      iprot.readStructBegin();
18759
      while (true)
18760
      {
18761
        field = iprot.readFieldBegin();
18762
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18763
          break;
18764
        }
18765
        switch (field.id) {
18766
          case 0: // SUCCESS
18767
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18768
              this.success = iprot.readI64();
18769
              setSuccessIsSet(true);
18770
            } else { 
18771
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18772
            }
18773
            break;
18774
          default:
18775
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18776
        }
18777
        iprot.readFieldEnd();
18778
      }
18779
      iprot.readStructEnd();
18780
      validate();
18781
    }
18782
 
18783
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18784
      oprot.writeStructBegin(STRUCT_DESC);
18785
 
18786
      if (this.isSetSuccess()) {
18787
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18788
        oprot.writeI64(this.success);
18789
        oprot.writeFieldEnd();
18790
      }
18791
      oprot.writeFieldStop();
18792
      oprot.writeStructEnd();
18793
    }
18794
 
18795
    @Override
18796
    public String toString() {
18797
      StringBuilder sb = new StringBuilder("createPurchaseForOurExtBilling_result(");
18798
      boolean first = true;
18799
 
18800
      sb.append("success:");
18801
      sb.append(this.success);
18802
      first = false;
18803
      sb.append(")");
18804
      return sb.toString();
18805
    }
18806
 
18807
    public void validate() throws org.apache.thrift.TException {
18808
      // check for required fields
18809
    }
18810
 
18811
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18812
      try {
18813
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18814
      } catch (org.apache.thrift.TException te) {
18815
        throw new java.io.IOException(te);
18816
      }
18817
    }
18818
 
18819
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18820
      try {
18821
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18822
      } catch (org.apache.thrift.TException te) {
18823
        throw new java.io.IOException(te);
18824
      }
18825
    }
18826
 
18827
  }
18828
 
18829
  public static class fulfillPOForExtBilling_args implements org.apache.thrift.TBase<fulfillPOForExtBilling_args, fulfillPOForExtBilling_args._Fields>, java.io.Serializable, Cloneable   {
18830
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPOForExtBilling_args");
18831
 
18832
    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);
18833
    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);
18834
 
18835
    private long itemId; // required
18836
    private long quantity; // required
18837
 
18838
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18839
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18840
      ITEM_ID((short)1, "itemId"),
18841
      QUANTITY((short)2, "quantity");
18842
 
18843
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18844
 
18845
      static {
18846
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18847
          byName.put(field.getFieldName(), field);
18848
        }
18849
      }
18850
 
18851
      /**
18852
       * Find the _Fields constant that matches fieldId, or null if its not found.
18853
       */
18854
      public static _Fields findByThriftId(int fieldId) {
18855
        switch(fieldId) {
18856
          case 1: // ITEM_ID
18857
            return ITEM_ID;
18858
          case 2: // QUANTITY
18859
            return QUANTITY;
18860
          default:
18861
            return null;
18862
        }
18863
      }
18864
 
18865
      /**
18866
       * Find the _Fields constant that matches fieldId, throwing an exception
18867
       * if it is not found.
18868
       */
18869
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18870
        _Fields fields = findByThriftId(fieldId);
18871
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18872
        return fields;
18873
      }
18874
 
18875
      /**
18876
       * Find the _Fields constant that matches name, or null if its not found.
18877
       */
18878
      public static _Fields findByName(String name) {
18879
        return byName.get(name);
18880
      }
18881
 
18882
      private final short _thriftId;
18883
      private final String _fieldName;
18884
 
18885
      _Fields(short thriftId, String fieldName) {
18886
        _thriftId = thriftId;
18887
        _fieldName = fieldName;
18888
      }
18889
 
18890
      public short getThriftFieldId() {
18891
        return _thriftId;
18892
      }
18893
 
18894
      public String getFieldName() {
18895
        return _fieldName;
18896
      }
18897
    }
18898
 
18899
    // isset id assignments
18900
    private static final int __ITEMID_ISSET_ID = 0;
18901
    private static final int __QUANTITY_ISSET_ID = 1;
18902
    private BitSet __isset_bit_vector = new BitSet(2);
18903
 
18904
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18905
    static {
18906
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18907
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18908
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18909
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18910
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18911
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18912
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPOForExtBilling_args.class, metaDataMap);
18913
    }
18914
 
18915
    public fulfillPOForExtBilling_args() {
18916
    }
18917
 
18918
    public fulfillPOForExtBilling_args(
18919
      long itemId,
18920
      long quantity)
18921
    {
18922
      this();
18923
      this.itemId = itemId;
18924
      setItemIdIsSet(true);
18925
      this.quantity = quantity;
18926
      setQuantityIsSet(true);
18927
    }
18928
 
18929
    /**
18930
     * Performs a deep copy on <i>other</i>.
18931
     */
18932
    public fulfillPOForExtBilling_args(fulfillPOForExtBilling_args other) {
18933
      __isset_bit_vector.clear();
18934
      __isset_bit_vector.or(other.__isset_bit_vector);
18935
      this.itemId = other.itemId;
18936
      this.quantity = other.quantity;
18937
    }
18938
 
18939
    public fulfillPOForExtBilling_args deepCopy() {
18940
      return new fulfillPOForExtBilling_args(this);
18941
    }
18942
 
18943
    @Override
18944
    public void clear() {
18945
      setItemIdIsSet(false);
18946
      this.itemId = 0;
18947
      setQuantityIsSet(false);
18948
      this.quantity = 0;
18949
    }
18950
 
18951
    public long getItemId() {
18952
      return this.itemId;
18953
    }
18954
 
18955
    public void setItemId(long itemId) {
18956
      this.itemId = itemId;
18957
      setItemIdIsSet(true);
18958
    }
18959
 
18960
    public void unsetItemId() {
18961
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
18962
    }
18963
 
18964
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
18965
    public boolean isSetItemId() {
18966
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
18967
    }
18968
 
18969
    public void setItemIdIsSet(boolean value) {
18970
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
18971
    }
18972
 
18973
    public long getQuantity() {
18974
      return this.quantity;
18975
    }
18976
 
18977
    public void setQuantity(long quantity) {
18978
      this.quantity = quantity;
18979
      setQuantityIsSet(true);
18980
    }
18981
 
18982
    public void unsetQuantity() {
18983
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
18984
    }
18985
 
18986
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
18987
    public boolean isSetQuantity() {
18988
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
18989
    }
18990
 
18991
    public void setQuantityIsSet(boolean value) {
18992
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
18993
    }
18994
 
18995
    public void setFieldValue(_Fields field, Object value) {
18996
      switch (field) {
18997
      case ITEM_ID:
18998
        if (value == null) {
18999
          unsetItemId();
19000
        } else {
19001
          setItemId((Long)value);
19002
        }
19003
        break;
19004
 
19005
      case QUANTITY:
19006
        if (value == null) {
19007
          unsetQuantity();
19008
        } else {
19009
          setQuantity((Long)value);
19010
        }
19011
        break;
19012
 
19013
      }
19014
    }
19015
 
19016
    public Object getFieldValue(_Fields field) {
19017
      switch (field) {
19018
      case ITEM_ID:
19019
        return Long.valueOf(getItemId());
19020
 
19021
      case QUANTITY:
19022
        return Long.valueOf(getQuantity());
19023
 
19024
      }
19025
      throw new IllegalStateException();
19026
    }
19027
 
19028
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19029
    public boolean isSet(_Fields field) {
19030
      if (field == null) {
19031
        throw new IllegalArgumentException();
19032
      }
19033
 
19034
      switch (field) {
19035
      case ITEM_ID:
19036
        return isSetItemId();
19037
      case QUANTITY:
19038
        return isSetQuantity();
19039
      }
19040
      throw new IllegalStateException();
19041
    }
19042
 
19043
    @Override
19044
    public boolean equals(Object that) {
19045
      if (that == null)
19046
        return false;
19047
      if (that instanceof fulfillPOForExtBilling_args)
19048
        return this.equals((fulfillPOForExtBilling_args)that);
19049
      return false;
19050
    }
19051
 
19052
    public boolean equals(fulfillPOForExtBilling_args that) {
19053
      if (that == null)
19054
        return false;
19055
 
19056
      boolean this_present_itemId = true;
19057
      boolean that_present_itemId = true;
19058
      if (this_present_itemId || that_present_itemId) {
19059
        if (!(this_present_itemId && that_present_itemId))
19060
          return false;
19061
        if (this.itemId != that.itemId)
19062
          return false;
19063
      }
19064
 
19065
      boolean this_present_quantity = true;
19066
      boolean that_present_quantity = true;
19067
      if (this_present_quantity || that_present_quantity) {
19068
        if (!(this_present_quantity && that_present_quantity))
19069
          return false;
19070
        if (this.quantity != that.quantity)
19071
          return false;
19072
      }
19073
 
19074
      return true;
19075
    }
19076
 
19077
    @Override
19078
    public int hashCode() {
19079
      return 0;
19080
    }
19081
 
19082
    public int compareTo(fulfillPOForExtBilling_args other) {
19083
      if (!getClass().equals(other.getClass())) {
19084
        return getClass().getName().compareTo(other.getClass().getName());
19085
      }
19086
 
19087
      int lastComparison = 0;
19088
      fulfillPOForExtBilling_args typedOther = (fulfillPOForExtBilling_args)other;
19089
 
19090
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
19091
      if (lastComparison != 0) {
19092
        return lastComparison;
19093
      }
19094
      if (isSetItemId()) {
19095
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
19096
        if (lastComparison != 0) {
19097
          return lastComparison;
19098
        }
19099
      }
19100
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
19101
      if (lastComparison != 0) {
19102
        return lastComparison;
19103
      }
19104
      if (isSetQuantity()) {
19105
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
19106
        if (lastComparison != 0) {
19107
          return lastComparison;
19108
        }
19109
      }
19110
      return 0;
19111
    }
19112
 
19113
    public _Fields fieldForId(int fieldId) {
19114
      return _Fields.findByThriftId(fieldId);
19115
    }
19116
 
19117
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19118
      org.apache.thrift.protocol.TField field;
19119
      iprot.readStructBegin();
19120
      while (true)
19121
      {
19122
        field = iprot.readFieldBegin();
19123
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19124
          break;
19125
        }
19126
        switch (field.id) {
19127
          case 1: // ITEM_ID
19128
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19129
              this.itemId = iprot.readI64();
19130
              setItemIdIsSet(true);
19131
            } else { 
19132
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19133
            }
19134
            break;
19135
          case 2: // QUANTITY
19136
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19137
              this.quantity = iprot.readI64();
19138
              setQuantityIsSet(true);
19139
            } else { 
19140
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19141
            }
19142
            break;
19143
          default:
19144
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19145
        }
19146
        iprot.readFieldEnd();
19147
      }
19148
      iprot.readStructEnd();
19149
      validate();
19150
    }
19151
 
19152
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19153
      validate();
19154
 
19155
      oprot.writeStructBegin(STRUCT_DESC);
19156
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
19157
      oprot.writeI64(this.itemId);
19158
      oprot.writeFieldEnd();
19159
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
19160
      oprot.writeI64(this.quantity);
19161
      oprot.writeFieldEnd();
19162
      oprot.writeFieldStop();
19163
      oprot.writeStructEnd();
19164
    }
19165
 
19166
    @Override
19167
    public String toString() {
19168
      StringBuilder sb = new StringBuilder("fulfillPOForExtBilling_args(");
19169
      boolean first = true;
19170
 
19171
      sb.append("itemId:");
19172
      sb.append(this.itemId);
19173
      first = false;
19174
      if (!first) sb.append(", ");
19175
      sb.append("quantity:");
19176
      sb.append(this.quantity);
19177
      first = false;
19178
      sb.append(")");
19179
      return sb.toString();
19180
    }
19181
 
19182
    public void validate() throws org.apache.thrift.TException {
19183
      // check for required fields
19184
    }
19185
 
19186
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19187
      try {
19188
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19189
      } catch (org.apache.thrift.TException te) {
19190
        throw new java.io.IOException(te);
19191
      }
19192
    }
19193
 
19194
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19195
      try {
19196
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
19197
        __isset_bit_vector = new BitSet(1);
19198
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19199
      } catch (org.apache.thrift.TException te) {
19200
        throw new java.io.IOException(te);
19201
      }
19202
    }
19203
 
19204
  }
19205
 
19206
  public static class fulfillPOForExtBilling_result implements org.apache.thrift.TBase<fulfillPOForExtBilling_result, fulfillPOForExtBilling_result._Fields>, java.io.Serializable, Cloneable   {
19207
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPOForExtBilling_result");
19208
 
19209
 
19210
 
19211
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19212
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19213
;
19214
 
19215
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19216
 
19217
      static {
19218
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19219
          byName.put(field.getFieldName(), field);
19220
        }
19221
      }
19222
 
19223
      /**
19224
       * Find the _Fields constant that matches fieldId, or null if its not found.
19225
       */
19226
      public static _Fields findByThriftId(int fieldId) {
19227
        switch(fieldId) {
19228
          default:
19229
            return null;
19230
        }
19231
      }
19232
 
19233
      /**
19234
       * Find the _Fields constant that matches fieldId, throwing an exception
19235
       * if it is not found.
19236
       */
19237
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19238
        _Fields fields = findByThriftId(fieldId);
19239
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19240
        return fields;
19241
      }
19242
 
19243
      /**
19244
       * Find the _Fields constant that matches name, or null if its not found.
19245
       */
19246
      public static _Fields findByName(String name) {
19247
        return byName.get(name);
19248
      }
19249
 
19250
      private final short _thriftId;
19251
      private final String _fieldName;
19252
 
19253
      _Fields(short thriftId, String fieldName) {
19254
        _thriftId = thriftId;
19255
        _fieldName = fieldName;
19256
      }
19257
 
19258
      public short getThriftFieldId() {
19259
        return _thriftId;
19260
      }
19261
 
19262
      public String getFieldName() {
19263
        return _fieldName;
19264
      }
19265
    }
19266
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19267
    static {
19268
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19269
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19270
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPOForExtBilling_result.class, metaDataMap);
19271
    }
19272
 
19273
    public fulfillPOForExtBilling_result() {
19274
    }
19275
 
19276
    /**
19277
     * Performs a deep copy on <i>other</i>.
19278
     */
19279
    public fulfillPOForExtBilling_result(fulfillPOForExtBilling_result other) {
19280
    }
19281
 
19282
    public fulfillPOForExtBilling_result deepCopy() {
19283
      return new fulfillPOForExtBilling_result(this);
19284
    }
19285
 
19286
    @Override
19287
    public void clear() {
19288
    }
19289
 
19290
    public void setFieldValue(_Fields field, Object value) {
19291
      switch (field) {
19292
      }
19293
    }
19294
 
19295
    public Object getFieldValue(_Fields field) {
19296
      switch (field) {
19297
      }
19298
      throw new IllegalStateException();
19299
    }
19300
 
19301
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19302
    public boolean isSet(_Fields field) {
19303
      if (field == null) {
19304
        throw new IllegalArgumentException();
19305
      }
19306
 
19307
      switch (field) {
19308
      }
19309
      throw new IllegalStateException();
19310
    }
19311
 
19312
    @Override
19313
    public boolean equals(Object that) {
19314
      if (that == null)
19315
        return false;
19316
      if (that instanceof fulfillPOForExtBilling_result)
19317
        return this.equals((fulfillPOForExtBilling_result)that);
19318
      return false;
19319
    }
19320
 
19321
    public boolean equals(fulfillPOForExtBilling_result that) {
19322
      if (that == null)
19323
        return false;
19324
 
19325
      return true;
19326
    }
19327
 
19328
    @Override
19329
    public int hashCode() {
19330
      return 0;
19331
    }
19332
 
19333
    public int compareTo(fulfillPOForExtBilling_result other) {
19334
      if (!getClass().equals(other.getClass())) {
19335
        return getClass().getName().compareTo(other.getClass().getName());
19336
      }
19337
 
19338
      int lastComparison = 0;
19339
      fulfillPOForExtBilling_result typedOther = (fulfillPOForExtBilling_result)other;
19340
 
19341
      return 0;
19342
    }
19343
 
19344
    public _Fields fieldForId(int fieldId) {
19345
      return _Fields.findByThriftId(fieldId);
19346
    }
19347
 
19348
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19349
      org.apache.thrift.protocol.TField field;
19350
      iprot.readStructBegin();
19351
      while (true)
19352
      {
19353
        field = iprot.readFieldBegin();
19354
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19355
          break;
19356
        }
19357
        switch (field.id) {
19358
          default:
19359
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19360
        }
19361
        iprot.readFieldEnd();
19362
      }
19363
      iprot.readStructEnd();
19364
      validate();
19365
    }
19366
 
19367
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19368
      oprot.writeStructBegin(STRUCT_DESC);
19369
 
19370
      oprot.writeFieldStop();
19371
      oprot.writeStructEnd();
19372
    }
19373
 
19374
    @Override
19375
    public String toString() {
19376
      StringBuilder sb = new StringBuilder("fulfillPOForExtBilling_result(");
19377
      boolean first = true;
19378
 
19379
      sb.append(")");
19380
      return sb.toString();
19381
    }
19382
 
19383
    public void validate() throws org.apache.thrift.TException {
19384
      // check for required fields
19385
    }
19386
 
19387
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19388
      try {
19389
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19390
      } catch (org.apache.thrift.TException te) {
19391
        throw new java.io.IOException(te);
19392
      }
19393
    }
19394
 
19395
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19396
      try {
19397
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19398
      } catch (org.apache.thrift.TException te) {
19399
        throw new java.io.IOException(te);
19400
      }
19401
    }
19402
 
19403
  }
19404
 
7410 amar.kumar 19405
  public static class closePO_args implements org.apache.thrift.TBase<closePO_args, closePO_args._Fields>, java.io.Serializable, Cloneable   {
19406
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePO_args");
19407
 
19408
    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);
19409
 
19410
    private long poId; // required
19411
 
19412
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19413
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19414
      PO_ID((short)1, "poId");
19415
 
19416
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19417
 
19418
      static {
19419
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19420
          byName.put(field.getFieldName(), field);
19421
        }
19422
      }
19423
 
19424
      /**
19425
       * Find the _Fields constant that matches fieldId, or null if its not found.
19426
       */
19427
      public static _Fields findByThriftId(int fieldId) {
19428
        switch(fieldId) {
19429
          case 1: // PO_ID
19430
            return PO_ID;
19431
          default:
19432
            return null;
19433
        }
19434
      }
19435
 
19436
      /**
19437
       * Find the _Fields constant that matches fieldId, throwing an exception
19438
       * if it is not found.
19439
       */
19440
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19441
        _Fields fields = findByThriftId(fieldId);
19442
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19443
        return fields;
19444
      }
19445
 
19446
      /**
19447
       * Find the _Fields constant that matches name, or null if its not found.
19448
       */
19449
      public static _Fields findByName(String name) {
19450
        return byName.get(name);
19451
      }
19452
 
19453
      private final short _thriftId;
19454
      private final String _fieldName;
19455
 
19456
      _Fields(short thriftId, String fieldName) {
19457
        _thriftId = thriftId;
19458
        _fieldName = fieldName;
19459
      }
19460
 
19461
      public short getThriftFieldId() {
19462
        return _thriftId;
19463
      }
19464
 
19465
      public String getFieldName() {
19466
        return _fieldName;
19467
      }
19468
    }
19469
 
19470
    // isset id assignments
19471
    private static final int __POID_ISSET_ID = 0;
19472
    private BitSet __isset_bit_vector = new BitSet(1);
19473
 
19474
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19475
    static {
19476
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19477
      tmpMap.put(_Fields.PO_ID, new org.apache.thrift.meta_data.FieldMetaData("poId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19478
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19479
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19480
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePO_args.class, metaDataMap);
19481
    }
19482
 
19483
    public closePO_args() {
19484
    }
19485
 
19486
    public closePO_args(
19487
      long poId)
19488
    {
19489
      this();
19490
      this.poId = poId;
19491
      setPoIdIsSet(true);
19492
    }
19493
 
19494
    /**
19495
     * Performs a deep copy on <i>other</i>.
19496
     */
19497
    public closePO_args(closePO_args other) {
19498
      __isset_bit_vector.clear();
19499
      __isset_bit_vector.or(other.__isset_bit_vector);
19500
      this.poId = other.poId;
19501
    }
19502
 
19503
    public closePO_args deepCopy() {
19504
      return new closePO_args(this);
19505
    }
19506
 
19507
    @Override
19508
    public void clear() {
19509
      setPoIdIsSet(false);
19510
      this.poId = 0;
19511
    }
19512
 
19513
    public long getPoId() {
19514
      return this.poId;
19515
    }
19516
 
19517
    public void setPoId(long poId) {
19518
      this.poId = poId;
19519
      setPoIdIsSet(true);
19520
    }
19521
 
19522
    public void unsetPoId() {
19523
      __isset_bit_vector.clear(__POID_ISSET_ID);
19524
    }
19525
 
19526
    /** Returns true if field poId is set (has been assigned a value) and false otherwise */
19527
    public boolean isSetPoId() {
19528
      return __isset_bit_vector.get(__POID_ISSET_ID);
19529
    }
19530
 
19531
    public void setPoIdIsSet(boolean value) {
19532
      __isset_bit_vector.set(__POID_ISSET_ID, value);
19533
    }
19534
 
19535
    public void setFieldValue(_Fields field, Object value) {
19536
      switch (field) {
19537
      case PO_ID:
19538
        if (value == null) {
19539
          unsetPoId();
19540
        } else {
19541
          setPoId((Long)value);
19542
        }
19543
        break;
19544
 
19545
      }
19546
    }
19547
 
19548
    public Object getFieldValue(_Fields field) {
19549
      switch (field) {
19550
      case PO_ID:
19551
        return Long.valueOf(getPoId());
19552
 
19553
      }
19554
      throw new IllegalStateException();
19555
    }
19556
 
19557
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19558
    public boolean isSet(_Fields field) {
19559
      if (field == null) {
19560
        throw new IllegalArgumentException();
19561
      }
19562
 
19563
      switch (field) {
19564
      case PO_ID:
19565
        return isSetPoId();
19566
      }
19567
      throw new IllegalStateException();
19568
    }
19569
 
19570
    @Override
19571
    public boolean equals(Object that) {
19572
      if (that == null)
19573
        return false;
19574
      if (that instanceof closePO_args)
19575
        return this.equals((closePO_args)that);
19576
      return false;
19577
    }
19578
 
19579
    public boolean equals(closePO_args that) {
19580
      if (that == null)
19581
        return false;
19582
 
19583
      boolean this_present_poId = true;
19584
      boolean that_present_poId = true;
19585
      if (this_present_poId || that_present_poId) {
19586
        if (!(this_present_poId && that_present_poId))
19587
          return false;
19588
        if (this.poId != that.poId)
19589
          return false;
19590
      }
19591
 
19592
      return true;
19593
    }
19594
 
19595
    @Override
19596
    public int hashCode() {
19597
      return 0;
19598
    }
19599
 
19600
    public int compareTo(closePO_args other) {
19601
      if (!getClass().equals(other.getClass())) {
19602
        return getClass().getName().compareTo(other.getClass().getName());
19603
      }
19604
 
19605
      int lastComparison = 0;
19606
      closePO_args typedOther = (closePO_args)other;
19607
 
19608
      lastComparison = Boolean.valueOf(isSetPoId()).compareTo(typedOther.isSetPoId());
19609
      if (lastComparison != 0) {
19610
        return lastComparison;
19611
      }
19612
      if (isSetPoId()) {
19613
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.poId, typedOther.poId);
19614
        if (lastComparison != 0) {
19615
          return lastComparison;
19616
        }
19617
      }
19618
      return 0;
19619
    }
19620
 
19621
    public _Fields fieldForId(int fieldId) {
19622
      return _Fields.findByThriftId(fieldId);
19623
    }
19624
 
19625
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19626
      org.apache.thrift.protocol.TField field;
19627
      iprot.readStructBegin();
19628
      while (true)
19629
      {
19630
        field = iprot.readFieldBegin();
19631
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19632
          break;
19633
        }
19634
        switch (field.id) {
19635
          case 1: // PO_ID
19636
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19637
              this.poId = iprot.readI64();
19638
              setPoIdIsSet(true);
19639
            } else { 
19640
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19641
            }
19642
            break;
19643
          default:
19644
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19645
        }
19646
        iprot.readFieldEnd();
19647
      }
19648
      iprot.readStructEnd();
19649
      validate();
19650
    }
19651
 
19652
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19653
      validate();
19654
 
19655
      oprot.writeStructBegin(STRUCT_DESC);
19656
      oprot.writeFieldBegin(PO_ID_FIELD_DESC);
19657
      oprot.writeI64(this.poId);
19658
      oprot.writeFieldEnd();
19659
      oprot.writeFieldStop();
19660
      oprot.writeStructEnd();
19661
    }
19662
 
19663
    @Override
19664
    public String toString() {
19665
      StringBuilder sb = new StringBuilder("closePO_args(");
19666
      boolean first = true;
19667
 
19668
      sb.append("poId:");
19669
      sb.append(this.poId);
19670
      first = false;
19671
      sb.append(")");
19672
      return sb.toString();
19673
    }
19674
 
19675
    public void validate() throws org.apache.thrift.TException {
19676
      // check for required fields
19677
    }
19678
 
19679
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19680
      try {
19681
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19682
      } catch (org.apache.thrift.TException te) {
19683
        throw new java.io.IOException(te);
19684
      }
19685
    }
19686
 
19687
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19688
      try {
19689
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19690
      } catch (org.apache.thrift.TException te) {
19691
        throw new java.io.IOException(te);
19692
      }
19693
    }
19694
 
19695
  }
19696
 
19697
  public static class closePO_result implements org.apache.thrift.TBase<closePO_result, closePO_result._Fields>, java.io.Serializable, Cloneable   {
19698
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePO_result");
19699
 
19700
    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);
19701
 
19702
    private PurchaseServiceException e; // required
19703
 
19704
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19705
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19706
      E((short)1, "e");
19707
 
19708
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19709
 
19710
      static {
19711
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19712
          byName.put(field.getFieldName(), field);
19713
        }
19714
      }
19715
 
19716
      /**
19717
       * Find the _Fields constant that matches fieldId, or null if its not found.
19718
       */
19719
      public static _Fields findByThriftId(int fieldId) {
19720
        switch(fieldId) {
19721
          case 1: // E
19722
            return E;
19723
          default:
19724
            return null;
19725
        }
19726
      }
19727
 
19728
      /**
19729
       * Find the _Fields constant that matches fieldId, throwing an exception
19730
       * if it is not found.
19731
       */
19732
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19733
        _Fields fields = findByThriftId(fieldId);
19734
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19735
        return fields;
19736
      }
19737
 
19738
      /**
19739
       * Find the _Fields constant that matches name, or null if its not found.
19740
       */
19741
      public static _Fields findByName(String name) {
19742
        return byName.get(name);
19743
      }
19744
 
19745
      private final short _thriftId;
19746
      private final String _fieldName;
19747
 
19748
      _Fields(short thriftId, String fieldName) {
19749
        _thriftId = thriftId;
19750
        _fieldName = fieldName;
19751
      }
19752
 
19753
      public short getThriftFieldId() {
19754
        return _thriftId;
19755
      }
19756
 
19757
      public String getFieldName() {
19758
        return _fieldName;
19759
      }
19760
    }
19761
 
19762
    // isset id assignments
19763
 
19764
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19765
    static {
19766
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19767
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19768
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
19769
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19770
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePO_result.class, metaDataMap);
19771
    }
19772
 
19773
    public closePO_result() {
19774
    }
19775
 
19776
    public closePO_result(
19777
      PurchaseServiceException e)
19778
    {
19779
      this();
19780
      this.e = e;
19781
    }
19782
 
19783
    /**
19784
     * Performs a deep copy on <i>other</i>.
19785
     */
19786
    public closePO_result(closePO_result other) {
19787
      if (other.isSetE()) {
19788
        this.e = new PurchaseServiceException(other.e);
19789
      }
19790
    }
19791
 
19792
    public closePO_result deepCopy() {
19793
      return new closePO_result(this);
19794
    }
19795
 
19796
    @Override
19797
    public void clear() {
19798
      this.e = null;
19799
    }
19800
 
19801
    public PurchaseServiceException getE() {
19802
      return this.e;
19803
    }
19804
 
19805
    public void setE(PurchaseServiceException e) {
19806
      this.e = e;
19807
    }
19808
 
19809
    public void unsetE() {
19810
      this.e = null;
19811
    }
19812
 
19813
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
19814
    public boolean isSetE() {
19815
      return this.e != null;
19816
    }
19817
 
19818
    public void setEIsSet(boolean value) {
19819
      if (!value) {
19820
        this.e = null;
19821
      }
19822
    }
19823
 
19824
    public void setFieldValue(_Fields field, Object value) {
19825
      switch (field) {
19826
      case E:
19827
        if (value == null) {
19828
          unsetE();
19829
        } else {
19830
          setE((PurchaseServiceException)value);
19831
        }
19832
        break;
19833
 
19834
      }
19835
    }
19836
 
19837
    public Object getFieldValue(_Fields field) {
19838
      switch (field) {
19839
      case E:
19840
        return getE();
19841
 
19842
      }
19843
      throw new IllegalStateException();
19844
    }
19845
 
19846
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19847
    public boolean isSet(_Fields field) {
19848
      if (field == null) {
19849
        throw new IllegalArgumentException();
19850
      }
19851
 
19852
      switch (field) {
19853
      case E:
19854
        return isSetE();
19855
      }
19856
      throw new IllegalStateException();
19857
    }
19858
 
19859
    @Override
19860
    public boolean equals(Object that) {
19861
      if (that == null)
19862
        return false;
19863
      if (that instanceof closePO_result)
19864
        return this.equals((closePO_result)that);
19865
      return false;
19866
    }
19867
 
19868
    public boolean equals(closePO_result that) {
19869
      if (that == null)
19870
        return false;
19871
 
19872
      boolean this_present_e = true && this.isSetE();
19873
      boolean that_present_e = true && that.isSetE();
19874
      if (this_present_e || that_present_e) {
19875
        if (!(this_present_e && that_present_e))
19876
          return false;
19877
        if (!this.e.equals(that.e))
19878
          return false;
19879
      }
19880
 
19881
      return true;
19882
    }
19883
 
19884
    @Override
19885
    public int hashCode() {
19886
      return 0;
19887
    }
19888
 
19889
    public int compareTo(closePO_result other) {
19890
      if (!getClass().equals(other.getClass())) {
19891
        return getClass().getName().compareTo(other.getClass().getName());
19892
      }
19893
 
19894
      int lastComparison = 0;
19895
      closePO_result typedOther = (closePO_result)other;
19896
 
19897
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
19898
      if (lastComparison != 0) {
19899
        return lastComparison;
19900
      }
19901
      if (isSetE()) {
19902
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
19903
        if (lastComparison != 0) {
19904
          return lastComparison;
19905
        }
19906
      }
19907
      return 0;
19908
    }
19909
 
19910
    public _Fields fieldForId(int fieldId) {
19911
      return _Fields.findByThriftId(fieldId);
19912
    }
19913
 
19914
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19915
      org.apache.thrift.protocol.TField field;
19916
      iprot.readStructBegin();
19917
      while (true)
19918
      {
19919
        field = iprot.readFieldBegin();
19920
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19921
          break;
19922
        }
19923
        switch (field.id) {
19924
          case 1: // E
19925
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
19926
              this.e = new PurchaseServiceException();
19927
              this.e.read(iprot);
19928
            } else { 
19929
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19930
            }
19931
            break;
19932
          default:
19933
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19934
        }
19935
        iprot.readFieldEnd();
19936
      }
19937
      iprot.readStructEnd();
19938
      validate();
19939
    }
19940
 
19941
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19942
      oprot.writeStructBegin(STRUCT_DESC);
19943
 
19944
      if (this.isSetE()) {
19945
        oprot.writeFieldBegin(E_FIELD_DESC);
19946
        this.e.write(oprot);
19947
        oprot.writeFieldEnd();
19948
      }
19949
      oprot.writeFieldStop();
19950
      oprot.writeStructEnd();
19951
    }
19952
 
19953
    @Override
19954
    public String toString() {
19955
      StringBuilder sb = new StringBuilder("closePO_result(");
19956
      boolean first = true;
19957
 
19958
      sb.append("e:");
19959
      if (this.e == null) {
19960
        sb.append("null");
19961
      } else {
19962
        sb.append(this.e);
19963
      }
19964
      first = false;
19965
      sb.append(")");
19966
      return sb.toString();
19967
    }
19968
 
19969
    public void validate() throws org.apache.thrift.TException {
19970
      // check for required fields
19971
    }
19972
 
19973
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19974
      try {
19975
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19976
      } catch (org.apache.thrift.TException te) {
19977
        throw new java.io.IOException(te);
19978
      }
19979
    }
19980
 
19981
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19982
      try {
19983
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19984
      } catch (org.apache.thrift.TException te) {
19985
        throw new java.io.IOException(te);
19986
      }
19987
    }
19988
 
19989
  }
19990
 
19991
  public static class isInvoiceReceived_args implements org.apache.thrift.TBase<isInvoiceReceived_args, isInvoiceReceived_args._Fields>, java.io.Serializable, Cloneable   {
19992
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isInvoiceReceived_args");
19993
 
19994
    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);
19995
    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);
19996
 
19997
    private String invoiceNumber; // required
19998
    private long supplierId; // required
19999
 
20000
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20001
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20002
      INVOICE_NUMBER((short)1, "invoiceNumber"),
20003
      SUPPLIER_ID((short)2, "supplierId");
20004
 
20005
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20006
 
20007
      static {
20008
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20009
          byName.put(field.getFieldName(), field);
20010
        }
20011
      }
20012
 
20013
      /**
20014
       * Find the _Fields constant that matches fieldId, or null if its not found.
20015
       */
20016
      public static _Fields findByThriftId(int fieldId) {
20017
        switch(fieldId) {
20018
          case 1: // INVOICE_NUMBER
20019
            return INVOICE_NUMBER;
20020
          case 2: // SUPPLIER_ID
20021
            return SUPPLIER_ID;
20022
          default:
20023
            return null;
20024
        }
20025
      }
20026
 
20027
      /**
20028
       * Find the _Fields constant that matches fieldId, throwing an exception
20029
       * if it is not found.
20030
       */
20031
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20032
        _Fields fields = findByThriftId(fieldId);
20033
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20034
        return fields;
20035
      }
20036
 
20037
      /**
20038
       * Find the _Fields constant that matches name, or null if its not found.
20039
       */
20040
      public static _Fields findByName(String name) {
20041
        return byName.get(name);
20042
      }
20043
 
20044
      private final short _thriftId;
20045
      private final String _fieldName;
20046
 
20047
      _Fields(short thriftId, String fieldName) {
20048
        _thriftId = thriftId;
20049
        _fieldName = fieldName;
20050
      }
20051
 
20052
      public short getThriftFieldId() {
20053
        return _thriftId;
20054
      }
20055
 
20056
      public String getFieldName() {
20057
        return _fieldName;
20058
      }
20059
    }
20060
 
20061
    // isset id assignments
20062
    private static final int __SUPPLIERID_ISSET_ID = 0;
20063
    private BitSet __isset_bit_vector = new BitSet(1);
20064
 
20065
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20066
    static {
20067
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20068
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20069
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
20070
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20071
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
20072
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20073
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isInvoiceReceived_args.class, metaDataMap);
20074
    }
20075
 
20076
    public isInvoiceReceived_args() {
20077
    }
20078
 
20079
    public isInvoiceReceived_args(
20080
      String invoiceNumber,
20081
      long supplierId)
20082
    {
20083
      this();
20084
      this.invoiceNumber = invoiceNumber;
20085
      this.supplierId = supplierId;
20086
      setSupplierIdIsSet(true);
20087
    }
20088
 
20089
    /**
20090
     * Performs a deep copy on <i>other</i>.
20091
     */
20092
    public isInvoiceReceived_args(isInvoiceReceived_args other) {
20093
      __isset_bit_vector.clear();
20094
      __isset_bit_vector.or(other.__isset_bit_vector);
20095
      if (other.isSetInvoiceNumber()) {
20096
        this.invoiceNumber = other.invoiceNumber;
20097
      }
20098
      this.supplierId = other.supplierId;
20099
    }
20100
 
20101
    public isInvoiceReceived_args deepCopy() {
20102
      return new isInvoiceReceived_args(this);
20103
    }
20104
 
20105
    @Override
20106
    public void clear() {
20107
      this.invoiceNumber = null;
20108
      setSupplierIdIsSet(false);
20109
      this.supplierId = 0;
20110
    }
20111
 
20112
    public String getInvoiceNumber() {
20113
      return this.invoiceNumber;
20114
    }
20115
 
20116
    public void setInvoiceNumber(String invoiceNumber) {
20117
      this.invoiceNumber = invoiceNumber;
20118
    }
20119
 
20120
    public void unsetInvoiceNumber() {
20121
      this.invoiceNumber = null;
20122
    }
20123
 
20124
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
20125
    public boolean isSetInvoiceNumber() {
20126
      return this.invoiceNumber != null;
20127
    }
20128
 
20129
    public void setInvoiceNumberIsSet(boolean value) {
20130
      if (!value) {
20131
        this.invoiceNumber = null;
20132
      }
20133
    }
20134
 
20135
    public long getSupplierId() {
20136
      return this.supplierId;
20137
    }
20138
 
20139
    public void setSupplierId(long supplierId) {
20140
      this.supplierId = supplierId;
20141
      setSupplierIdIsSet(true);
20142
    }
20143
 
20144
    public void unsetSupplierId() {
20145
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
20146
    }
20147
 
20148
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
20149
    public boolean isSetSupplierId() {
20150
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
20151
    }
20152
 
20153
    public void setSupplierIdIsSet(boolean value) {
20154
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
20155
    }
20156
 
20157
    public void setFieldValue(_Fields field, Object value) {
20158
      switch (field) {
20159
      case INVOICE_NUMBER:
20160
        if (value == null) {
20161
          unsetInvoiceNumber();
20162
        } else {
20163
          setInvoiceNumber((String)value);
20164
        }
20165
        break;
20166
 
20167
      case SUPPLIER_ID:
20168
        if (value == null) {
20169
          unsetSupplierId();
20170
        } else {
20171
          setSupplierId((Long)value);
20172
        }
20173
        break;
20174
 
20175
      }
20176
    }
20177
 
20178
    public Object getFieldValue(_Fields field) {
20179
      switch (field) {
20180
      case INVOICE_NUMBER:
20181
        return getInvoiceNumber();
20182
 
20183
      case SUPPLIER_ID:
20184
        return Long.valueOf(getSupplierId());
20185
 
20186
      }
20187
      throw new IllegalStateException();
20188
    }
20189
 
20190
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20191
    public boolean isSet(_Fields field) {
20192
      if (field == null) {
20193
        throw new IllegalArgumentException();
20194
      }
20195
 
20196
      switch (field) {
20197
      case INVOICE_NUMBER:
20198
        return isSetInvoiceNumber();
20199
      case SUPPLIER_ID:
20200
        return isSetSupplierId();
20201
      }
20202
      throw new IllegalStateException();
20203
    }
20204
 
20205
    @Override
20206
    public boolean equals(Object that) {
20207
      if (that == null)
20208
        return false;
20209
      if (that instanceof isInvoiceReceived_args)
20210
        return this.equals((isInvoiceReceived_args)that);
20211
      return false;
20212
    }
20213
 
20214
    public boolean equals(isInvoiceReceived_args that) {
20215
      if (that == null)
20216
        return false;
20217
 
20218
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
20219
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
20220
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
20221
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
20222
          return false;
20223
        if (!this.invoiceNumber.equals(that.invoiceNumber))
20224
          return false;
20225
      }
20226
 
20227
      boolean this_present_supplierId = true;
20228
      boolean that_present_supplierId = true;
20229
      if (this_present_supplierId || that_present_supplierId) {
20230
        if (!(this_present_supplierId && that_present_supplierId))
20231
          return false;
20232
        if (this.supplierId != that.supplierId)
20233
          return false;
20234
      }
20235
 
20236
      return true;
20237
    }
20238
 
20239
    @Override
20240
    public int hashCode() {
20241
      return 0;
20242
    }
20243
 
20244
    public int compareTo(isInvoiceReceived_args other) {
20245
      if (!getClass().equals(other.getClass())) {
20246
        return getClass().getName().compareTo(other.getClass().getName());
20247
      }
20248
 
20249
      int lastComparison = 0;
20250
      isInvoiceReceived_args typedOther = (isInvoiceReceived_args)other;
20251
 
20252
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
20253
      if (lastComparison != 0) {
20254
        return lastComparison;
20255
      }
20256
      if (isSetInvoiceNumber()) {
20257
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
20258
        if (lastComparison != 0) {
20259
          return lastComparison;
20260
        }
20261
      }
20262
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
20263
      if (lastComparison != 0) {
20264
        return lastComparison;
20265
      }
20266
      if (isSetSupplierId()) {
20267
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
20268
        if (lastComparison != 0) {
20269
          return lastComparison;
20270
        }
20271
      }
20272
      return 0;
20273
    }
20274
 
20275
    public _Fields fieldForId(int fieldId) {
20276
      return _Fields.findByThriftId(fieldId);
20277
    }
20278
 
20279
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20280
      org.apache.thrift.protocol.TField field;
20281
      iprot.readStructBegin();
20282
      while (true)
20283
      {
20284
        field = iprot.readFieldBegin();
20285
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20286
          break;
20287
        }
20288
        switch (field.id) {
20289
          case 1: // INVOICE_NUMBER
20290
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
20291
              this.invoiceNumber = iprot.readString();
20292
            } else { 
20293
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20294
            }
20295
            break;
20296
          case 2: // SUPPLIER_ID
20297
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20298
              this.supplierId = iprot.readI64();
20299
              setSupplierIdIsSet(true);
20300
            } else { 
20301
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20302
            }
20303
            break;
20304
          default:
20305
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20306
        }
20307
        iprot.readFieldEnd();
20308
      }
20309
      iprot.readStructEnd();
20310
      validate();
20311
    }
20312
 
20313
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20314
      validate();
20315
 
20316
      oprot.writeStructBegin(STRUCT_DESC);
20317
      if (this.invoiceNumber != null) {
20318
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
20319
        oprot.writeString(this.invoiceNumber);
20320
        oprot.writeFieldEnd();
20321
      }
20322
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
20323
      oprot.writeI64(this.supplierId);
20324
      oprot.writeFieldEnd();
20325
      oprot.writeFieldStop();
20326
      oprot.writeStructEnd();
20327
    }
20328
 
20329
    @Override
20330
    public String toString() {
20331
      StringBuilder sb = new StringBuilder("isInvoiceReceived_args(");
20332
      boolean first = true;
20333
 
20334
      sb.append("invoiceNumber:");
20335
      if (this.invoiceNumber == null) {
20336
        sb.append("null");
20337
      } else {
20338
        sb.append(this.invoiceNumber);
20339
      }
20340
      first = false;
20341
      if (!first) sb.append(", ");
20342
      sb.append("supplierId:");
20343
      sb.append(this.supplierId);
20344
      first = false;
20345
      sb.append(")");
20346
      return sb.toString();
20347
    }
20348
 
20349
    public void validate() throws org.apache.thrift.TException {
20350
      // check for required fields
20351
    }
20352
 
20353
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20354
      try {
20355
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20356
      } catch (org.apache.thrift.TException te) {
20357
        throw new java.io.IOException(te);
20358
      }
20359
    }
20360
 
20361
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20362
      try {
20363
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20364
      } catch (org.apache.thrift.TException te) {
20365
        throw new java.io.IOException(te);
20366
      }
20367
    }
20368
 
20369
  }
20370
 
20371
  public static class isInvoiceReceived_result implements org.apache.thrift.TBase<isInvoiceReceived_result, isInvoiceReceived_result._Fields>, java.io.Serializable, Cloneable   {
20372
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isInvoiceReceived_result");
20373
 
20374
    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);
20375
 
20376
    private boolean success; // required
20377
 
20378
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20379
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20380
      SUCCESS((short)0, "success");
20381
 
20382
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20383
 
20384
      static {
20385
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20386
          byName.put(field.getFieldName(), field);
20387
        }
20388
      }
20389
 
20390
      /**
20391
       * Find the _Fields constant that matches fieldId, or null if its not found.
20392
       */
20393
      public static _Fields findByThriftId(int fieldId) {
20394
        switch(fieldId) {
20395
          case 0: // SUCCESS
20396
            return SUCCESS;
20397
          default:
20398
            return null;
20399
        }
20400
      }
20401
 
20402
      /**
20403
       * Find the _Fields constant that matches fieldId, throwing an exception
20404
       * if it is not found.
20405
       */
20406
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20407
        _Fields fields = findByThriftId(fieldId);
20408
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20409
        return fields;
20410
      }
20411
 
20412
      /**
20413
       * Find the _Fields constant that matches name, or null if its not found.
20414
       */
20415
      public static _Fields findByName(String name) {
20416
        return byName.get(name);
20417
      }
20418
 
20419
      private final short _thriftId;
20420
      private final String _fieldName;
20421
 
20422
      _Fields(short thriftId, String fieldName) {
20423
        _thriftId = thriftId;
20424
        _fieldName = fieldName;
20425
      }
20426
 
20427
      public short getThriftFieldId() {
20428
        return _thriftId;
20429
      }
20430
 
20431
      public String getFieldName() {
20432
        return _fieldName;
20433
      }
20434
    }
20435
 
20436
    // isset id assignments
20437
    private static final int __SUCCESS_ISSET_ID = 0;
20438
    private BitSet __isset_bit_vector = new BitSet(1);
20439
 
20440
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20441
    static {
20442
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20443
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20444
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
20445
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20446
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isInvoiceReceived_result.class, metaDataMap);
20447
    }
20448
 
20449
    public isInvoiceReceived_result() {
20450
    }
20451
 
20452
    public isInvoiceReceived_result(
20453
      boolean success)
20454
    {
20455
      this();
20456
      this.success = success;
20457
      setSuccessIsSet(true);
20458
    }
20459
 
20460
    /**
20461
     * Performs a deep copy on <i>other</i>.
20462
     */
20463
    public isInvoiceReceived_result(isInvoiceReceived_result other) {
20464
      __isset_bit_vector.clear();
20465
      __isset_bit_vector.or(other.__isset_bit_vector);
20466
      this.success = other.success;
20467
    }
20468
 
20469
    public isInvoiceReceived_result deepCopy() {
20470
      return new isInvoiceReceived_result(this);
20471
    }
20472
 
20473
    @Override
20474
    public void clear() {
20475
      setSuccessIsSet(false);
20476
      this.success = false;
20477
    }
20478
 
20479
    public boolean isSuccess() {
20480
      return this.success;
20481
    }
20482
 
20483
    public void setSuccess(boolean success) {
20484
      this.success = success;
20485
      setSuccessIsSet(true);
20486
    }
20487
 
20488
    public void unsetSuccess() {
20489
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
20490
    }
20491
 
20492
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
20493
    public boolean isSetSuccess() {
20494
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
20495
    }
20496
 
20497
    public void setSuccessIsSet(boolean value) {
20498
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
20499
    }
20500
 
20501
    public void setFieldValue(_Fields field, Object value) {
20502
      switch (field) {
20503
      case SUCCESS:
20504
        if (value == null) {
20505
          unsetSuccess();
20506
        } else {
20507
          setSuccess((Boolean)value);
20508
        }
20509
        break;
20510
 
20511
      }
20512
    }
20513
 
20514
    public Object getFieldValue(_Fields field) {
20515
      switch (field) {
20516
      case SUCCESS:
20517
        return Boolean.valueOf(isSuccess());
20518
 
20519
      }
20520
      throw new IllegalStateException();
20521
    }
20522
 
20523
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20524
    public boolean isSet(_Fields field) {
20525
      if (field == null) {
20526
        throw new IllegalArgumentException();
20527
      }
20528
 
20529
      switch (field) {
20530
      case SUCCESS:
20531
        return isSetSuccess();
20532
      }
20533
      throw new IllegalStateException();
20534
    }
20535
 
20536
    @Override
20537
    public boolean equals(Object that) {
20538
      if (that == null)
20539
        return false;
20540
      if (that instanceof isInvoiceReceived_result)
20541
        return this.equals((isInvoiceReceived_result)that);
20542
      return false;
20543
    }
20544
 
20545
    public boolean equals(isInvoiceReceived_result that) {
20546
      if (that == null)
20547
        return false;
20548
 
20549
      boolean this_present_success = true;
20550
      boolean that_present_success = true;
20551
      if (this_present_success || that_present_success) {
20552
        if (!(this_present_success && that_present_success))
20553
          return false;
20554
        if (this.success != that.success)
20555
          return false;
20556
      }
20557
 
20558
      return true;
20559
    }
20560
 
20561
    @Override
20562
    public int hashCode() {
20563
      return 0;
20564
    }
20565
 
20566
    public int compareTo(isInvoiceReceived_result other) {
20567
      if (!getClass().equals(other.getClass())) {
20568
        return getClass().getName().compareTo(other.getClass().getName());
20569
      }
20570
 
20571
      int lastComparison = 0;
20572
      isInvoiceReceived_result typedOther = (isInvoiceReceived_result)other;
20573
 
20574
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
20575
      if (lastComparison != 0) {
20576
        return lastComparison;
20577
      }
20578
      if (isSetSuccess()) {
20579
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
20580
        if (lastComparison != 0) {
20581
          return lastComparison;
20582
        }
20583
      }
20584
      return 0;
20585
    }
20586
 
20587
    public _Fields fieldForId(int fieldId) {
20588
      return _Fields.findByThriftId(fieldId);
20589
    }
20590
 
20591
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20592
      org.apache.thrift.protocol.TField field;
20593
      iprot.readStructBegin();
20594
      while (true)
20595
      {
20596
        field = iprot.readFieldBegin();
20597
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20598
          break;
20599
        }
20600
        switch (field.id) {
20601
          case 0: // SUCCESS
20602
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
20603
              this.success = iprot.readBool();
20604
              setSuccessIsSet(true);
20605
            } else { 
20606
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20607
            }
20608
            break;
20609
          default:
20610
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20611
        }
20612
        iprot.readFieldEnd();
20613
      }
20614
      iprot.readStructEnd();
20615
      validate();
20616
    }
20617
 
20618
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20619
      oprot.writeStructBegin(STRUCT_DESC);
20620
 
20621
      if (this.isSetSuccess()) {
20622
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20623
        oprot.writeBool(this.success);
20624
        oprot.writeFieldEnd();
20625
      }
20626
      oprot.writeFieldStop();
20627
      oprot.writeStructEnd();
20628
    }
20629
 
20630
    @Override
20631
    public String toString() {
20632
      StringBuilder sb = new StringBuilder("isInvoiceReceived_result(");
20633
      boolean first = true;
20634
 
20635
      sb.append("success:");
20636
      sb.append(this.success);
20637
      first = false;
20638
      sb.append(")");
20639
      return sb.toString();
20640
    }
20641
 
20642
    public void validate() throws org.apache.thrift.TException {
20643
      // check for required fields
20644
    }
20645
 
20646
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20647
      try {
20648
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20649
      } catch (org.apache.thrift.TException te) {
20650
        throw new java.io.IOException(te);
20651
      }
20652
    }
20653
 
20654
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20655
      try {
20656
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20657
      } catch (org.apache.thrift.TException te) {
20658
        throw new java.io.IOException(te);
20659
      }
20660
    }
20661
 
20662
  }
20663
 
9829 amar.kumar 20664
  public static class changeWarehouseForPO_args implements org.apache.thrift.TBase<changeWarehouseForPO_args, changeWarehouseForPO_args._Fields>, java.io.Serializable, Cloneable   {
20665
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changeWarehouseForPO_args");
20666
 
20667
    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);
20668
    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);
20669
 
20670
    private long id; // required
20671
    private long warehouseId; // required
20672
 
20673
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20674
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20675
      ID((short)1, "id"),
20676
      WAREHOUSE_ID((short)2, "warehouseId");
20677
 
20678
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20679
 
20680
      static {
20681
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20682
          byName.put(field.getFieldName(), field);
20683
        }
20684
      }
20685
 
20686
      /**
20687
       * Find the _Fields constant that matches fieldId, or null if its not found.
20688
       */
20689
      public static _Fields findByThriftId(int fieldId) {
20690
        switch(fieldId) {
20691
          case 1: // ID
20692
            return ID;
20693
          case 2: // WAREHOUSE_ID
20694
            return WAREHOUSE_ID;
20695
          default:
20696
            return null;
20697
        }
20698
      }
20699
 
20700
      /**
20701
       * Find the _Fields constant that matches fieldId, throwing an exception
20702
       * if it is not found.
20703
       */
20704
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20705
        _Fields fields = findByThriftId(fieldId);
20706
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20707
        return fields;
20708
      }
20709
 
20710
      /**
20711
       * Find the _Fields constant that matches name, or null if its not found.
20712
       */
20713
      public static _Fields findByName(String name) {
20714
        return byName.get(name);
20715
      }
20716
 
20717
      private final short _thriftId;
20718
      private final String _fieldName;
20719
 
20720
      _Fields(short thriftId, String fieldName) {
20721
        _thriftId = thriftId;
20722
        _fieldName = fieldName;
20723
      }
20724
 
20725
      public short getThriftFieldId() {
20726
        return _thriftId;
20727
      }
20728
 
20729
      public String getFieldName() {
20730
        return _fieldName;
20731
      }
20732
    }
20733
 
20734
    // isset id assignments
20735
    private static final int __ID_ISSET_ID = 0;
20736
    private static final int __WAREHOUSEID_ISSET_ID = 1;
20737
    private BitSet __isset_bit_vector = new BitSet(2);
20738
 
20739
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20740
    static {
20741
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20742
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20743
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
20744
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20745
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
20746
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20747
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changeWarehouseForPO_args.class, metaDataMap);
20748
    }
20749
 
20750
    public changeWarehouseForPO_args() {
20751
    }
20752
 
20753
    public changeWarehouseForPO_args(
20754
      long id,
20755
      long warehouseId)
20756
    {
20757
      this();
20758
      this.id = id;
20759
      setIdIsSet(true);
20760
      this.warehouseId = warehouseId;
20761
      setWarehouseIdIsSet(true);
20762
    }
20763
 
20764
    /**
20765
     * Performs a deep copy on <i>other</i>.
20766
     */
20767
    public changeWarehouseForPO_args(changeWarehouseForPO_args other) {
20768
      __isset_bit_vector.clear();
20769
      __isset_bit_vector.or(other.__isset_bit_vector);
20770
      this.id = other.id;
20771
      this.warehouseId = other.warehouseId;
20772
    }
20773
 
20774
    public changeWarehouseForPO_args deepCopy() {
20775
      return new changeWarehouseForPO_args(this);
20776
    }
20777
 
20778
    @Override
20779
    public void clear() {
20780
      setIdIsSet(false);
20781
      this.id = 0;
20782
      setWarehouseIdIsSet(false);
20783
      this.warehouseId = 0;
20784
    }
20785
 
20786
    public long getId() {
20787
      return this.id;
20788
    }
20789
 
20790
    public void setId(long id) {
20791
      this.id = id;
20792
      setIdIsSet(true);
20793
    }
20794
 
20795
    public void unsetId() {
20796
      __isset_bit_vector.clear(__ID_ISSET_ID);
20797
    }
20798
 
20799
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
20800
    public boolean isSetId() {
20801
      return __isset_bit_vector.get(__ID_ISSET_ID);
20802
    }
20803
 
20804
    public void setIdIsSet(boolean value) {
20805
      __isset_bit_vector.set(__ID_ISSET_ID, value);
20806
    }
20807
 
20808
    public long getWarehouseId() {
20809
      return this.warehouseId;
20810
    }
20811
 
20812
    public void setWarehouseId(long warehouseId) {
20813
      this.warehouseId = warehouseId;
20814
      setWarehouseIdIsSet(true);
20815
    }
20816
 
20817
    public void unsetWarehouseId() {
20818
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
20819
    }
20820
 
20821
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
20822
    public boolean isSetWarehouseId() {
20823
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
20824
    }
20825
 
20826
    public void setWarehouseIdIsSet(boolean value) {
20827
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
20828
    }
20829
 
20830
    public void setFieldValue(_Fields field, Object value) {
20831
      switch (field) {
20832
      case ID:
20833
        if (value == null) {
20834
          unsetId();
20835
        } else {
20836
          setId((Long)value);
20837
        }
20838
        break;
20839
 
20840
      case WAREHOUSE_ID:
20841
        if (value == null) {
20842
          unsetWarehouseId();
20843
        } else {
20844
          setWarehouseId((Long)value);
20845
        }
20846
        break;
20847
 
20848
      }
20849
    }
20850
 
20851
    public Object getFieldValue(_Fields field) {
20852
      switch (field) {
20853
      case ID:
20854
        return Long.valueOf(getId());
20855
 
20856
      case WAREHOUSE_ID:
20857
        return Long.valueOf(getWarehouseId());
20858
 
20859
      }
20860
      throw new IllegalStateException();
20861
    }
20862
 
20863
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20864
    public boolean isSet(_Fields field) {
20865
      if (field == null) {
20866
        throw new IllegalArgumentException();
20867
      }
20868
 
20869
      switch (field) {
20870
      case ID:
20871
        return isSetId();
20872
      case WAREHOUSE_ID:
20873
        return isSetWarehouseId();
20874
      }
20875
      throw new IllegalStateException();
20876
    }
20877
 
20878
    @Override
20879
    public boolean equals(Object that) {
20880
      if (that == null)
20881
        return false;
20882
      if (that instanceof changeWarehouseForPO_args)
20883
        return this.equals((changeWarehouseForPO_args)that);
20884
      return false;
20885
    }
20886
 
20887
    public boolean equals(changeWarehouseForPO_args that) {
20888
      if (that == null)
20889
        return false;
20890
 
20891
      boolean this_present_id = true;
20892
      boolean that_present_id = true;
20893
      if (this_present_id || that_present_id) {
20894
        if (!(this_present_id && that_present_id))
20895
          return false;
20896
        if (this.id != that.id)
20897
          return false;
20898
      }
20899
 
20900
      boolean this_present_warehouseId = true;
20901
      boolean that_present_warehouseId = true;
20902
      if (this_present_warehouseId || that_present_warehouseId) {
20903
        if (!(this_present_warehouseId && that_present_warehouseId))
20904
          return false;
20905
        if (this.warehouseId != that.warehouseId)
20906
          return false;
20907
      }
20908
 
20909
      return true;
20910
    }
20911
 
20912
    @Override
20913
    public int hashCode() {
20914
      return 0;
20915
    }
20916
 
20917
    public int compareTo(changeWarehouseForPO_args other) {
20918
      if (!getClass().equals(other.getClass())) {
20919
        return getClass().getName().compareTo(other.getClass().getName());
20920
      }
20921
 
20922
      int lastComparison = 0;
20923
      changeWarehouseForPO_args typedOther = (changeWarehouseForPO_args)other;
20924
 
20925
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
20926
      if (lastComparison != 0) {
20927
        return lastComparison;
20928
      }
20929
      if (isSetId()) {
20930
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
20931
        if (lastComparison != 0) {
20932
          return lastComparison;
20933
        }
20934
      }
20935
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
20936
      if (lastComparison != 0) {
20937
        return lastComparison;
20938
      }
20939
      if (isSetWarehouseId()) {
20940
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
20941
        if (lastComparison != 0) {
20942
          return lastComparison;
20943
        }
20944
      }
20945
      return 0;
20946
    }
20947
 
20948
    public _Fields fieldForId(int fieldId) {
20949
      return _Fields.findByThriftId(fieldId);
20950
    }
20951
 
20952
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20953
      org.apache.thrift.protocol.TField field;
20954
      iprot.readStructBegin();
20955
      while (true)
20956
      {
20957
        field = iprot.readFieldBegin();
20958
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20959
          break;
20960
        }
20961
        switch (field.id) {
20962
          case 1: // ID
20963
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20964
              this.id = iprot.readI64();
20965
              setIdIsSet(true);
20966
            } else { 
20967
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20968
            }
20969
            break;
20970
          case 2: // WAREHOUSE_ID
20971
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20972
              this.warehouseId = iprot.readI64();
20973
              setWarehouseIdIsSet(true);
20974
            } else { 
20975
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20976
            }
20977
            break;
20978
          default:
20979
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20980
        }
20981
        iprot.readFieldEnd();
20982
      }
20983
      iprot.readStructEnd();
20984
      validate();
20985
    }
20986
 
20987
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20988
      validate();
20989
 
20990
      oprot.writeStructBegin(STRUCT_DESC);
20991
      oprot.writeFieldBegin(ID_FIELD_DESC);
20992
      oprot.writeI64(this.id);
20993
      oprot.writeFieldEnd();
20994
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
20995
      oprot.writeI64(this.warehouseId);
20996
      oprot.writeFieldEnd();
20997
      oprot.writeFieldStop();
20998
      oprot.writeStructEnd();
20999
    }
21000
 
21001
    @Override
21002
    public String toString() {
21003
      StringBuilder sb = new StringBuilder("changeWarehouseForPO_args(");
21004
      boolean first = true;
21005
 
21006
      sb.append("id:");
21007
      sb.append(this.id);
21008
      first = false;
21009
      if (!first) sb.append(", ");
21010
      sb.append("warehouseId:");
21011
      sb.append(this.warehouseId);
21012
      first = false;
21013
      sb.append(")");
21014
      return sb.toString();
21015
    }
21016
 
21017
    public void validate() throws org.apache.thrift.TException {
21018
      // check for required fields
21019
    }
21020
 
21021
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21022
      try {
21023
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
21024
      } catch (org.apache.thrift.TException te) {
21025
        throw new java.io.IOException(te);
21026
      }
21027
    }
21028
 
21029
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
21030
      try {
21031
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
21032
      } catch (org.apache.thrift.TException te) {
21033
        throw new java.io.IOException(te);
21034
      }
21035
    }
21036
 
21037
  }
21038
 
21039
  public static class changeWarehouseForPO_result implements org.apache.thrift.TBase<changeWarehouseForPO_result, changeWarehouseForPO_result._Fields>, java.io.Serializable, Cloneable   {
21040
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changeWarehouseForPO_result");
21041
 
21042
    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);
21043
 
21044
    private PurchaseServiceException e; // required
21045
 
21046
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21047
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
21048
      E((short)1, "e");
21049
 
21050
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21051
 
21052
      static {
21053
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21054
          byName.put(field.getFieldName(), field);
21055
        }
21056
      }
21057
 
21058
      /**
21059
       * Find the _Fields constant that matches fieldId, or null if its not found.
21060
       */
21061
      public static _Fields findByThriftId(int fieldId) {
21062
        switch(fieldId) {
21063
          case 1: // E
21064
            return E;
21065
          default:
21066
            return null;
21067
        }
21068
      }
21069
 
21070
      /**
21071
       * Find the _Fields constant that matches fieldId, throwing an exception
21072
       * if it is not found.
21073
       */
21074
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21075
        _Fields fields = findByThriftId(fieldId);
21076
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21077
        return fields;
21078
      }
21079
 
21080
      /**
21081
       * Find the _Fields constant that matches name, or null if its not found.
21082
       */
21083
      public static _Fields findByName(String name) {
21084
        return byName.get(name);
21085
      }
21086
 
21087
      private final short _thriftId;
21088
      private final String _fieldName;
21089
 
21090
      _Fields(short thriftId, String fieldName) {
21091
        _thriftId = thriftId;
21092
        _fieldName = fieldName;
21093
      }
21094
 
21095
      public short getThriftFieldId() {
21096
        return _thriftId;
21097
      }
21098
 
21099
      public String getFieldName() {
21100
        return _fieldName;
21101
      }
21102
    }
21103
 
21104
    // isset id assignments
21105
 
21106
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
21107
    static {
21108
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
21109
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21110
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
21111
      metaDataMap = Collections.unmodifiableMap(tmpMap);
21112
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changeWarehouseForPO_result.class, metaDataMap);
21113
    }
21114
 
21115
    public changeWarehouseForPO_result() {
21116
    }
21117
 
21118
    public changeWarehouseForPO_result(
21119
      PurchaseServiceException e)
21120
    {
21121
      this();
21122
      this.e = e;
21123
    }
21124
 
21125
    /**
21126
     * Performs a deep copy on <i>other</i>.
21127
     */
21128
    public changeWarehouseForPO_result(changeWarehouseForPO_result other) {
21129
      if (other.isSetE()) {
21130
        this.e = new PurchaseServiceException(other.e);
21131
      }
21132
    }
21133
 
21134
    public changeWarehouseForPO_result deepCopy() {
21135
      return new changeWarehouseForPO_result(this);
21136
    }
21137
 
21138
    @Override
21139
    public void clear() {
21140
      this.e = null;
21141
    }
21142
 
21143
    public PurchaseServiceException getE() {
21144
      return this.e;
21145
    }
21146
 
21147
    public void setE(PurchaseServiceException e) {
21148
      this.e = e;
21149
    }
21150
 
21151
    public void unsetE() {
21152
      this.e = null;
21153
    }
21154
 
21155
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
21156
    public boolean isSetE() {
21157
      return this.e != null;
21158
    }
21159
 
21160
    public void setEIsSet(boolean value) {
21161
      if (!value) {
21162
        this.e = null;
21163
      }
21164
    }
21165
 
21166
    public void setFieldValue(_Fields field, Object value) {
21167
      switch (field) {
21168
      case E:
21169
        if (value == null) {
21170
          unsetE();
21171
        } else {
21172
          setE((PurchaseServiceException)value);
21173
        }
21174
        break;
21175
 
21176
      }
21177
    }
21178
 
21179
    public Object getFieldValue(_Fields field) {
21180
      switch (field) {
21181
      case E:
21182
        return getE();
21183
 
21184
      }
21185
      throw new IllegalStateException();
21186
    }
21187
 
21188
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
21189
    public boolean isSet(_Fields field) {
21190
      if (field == null) {
21191
        throw new IllegalArgumentException();
21192
      }
21193
 
21194
      switch (field) {
21195
      case E:
21196
        return isSetE();
21197
      }
21198
      throw new IllegalStateException();
21199
    }
21200
 
21201
    @Override
21202
    public boolean equals(Object that) {
21203
      if (that == null)
21204
        return false;
21205
      if (that instanceof changeWarehouseForPO_result)
21206
        return this.equals((changeWarehouseForPO_result)that);
21207
      return false;
21208
    }
21209
 
21210
    public boolean equals(changeWarehouseForPO_result that) {
21211
      if (that == null)
21212
        return false;
21213
 
21214
      boolean this_present_e = true && this.isSetE();
21215
      boolean that_present_e = true && that.isSetE();
21216
      if (this_present_e || that_present_e) {
21217
        if (!(this_present_e && that_present_e))
21218
          return false;
21219
        if (!this.e.equals(that.e))
21220
          return false;
21221
      }
21222
 
21223
      return true;
21224
    }
21225
 
21226
    @Override
21227
    public int hashCode() {
21228
      return 0;
21229
    }
21230
 
21231
    public int compareTo(changeWarehouseForPO_result other) {
21232
      if (!getClass().equals(other.getClass())) {
21233
        return getClass().getName().compareTo(other.getClass().getName());
21234
      }
21235
 
21236
      int lastComparison = 0;
21237
      changeWarehouseForPO_result typedOther = (changeWarehouseForPO_result)other;
21238
 
21239
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
21240
      if (lastComparison != 0) {
21241
        return lastComparison;
21242
      }
21243
      if (isSetE()) {
21244
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
21245
        if (lastComparison != 0) {
21246
          return lastComparison;
21247
        }
21248
      }
21249
      return 0;
21250
    }
21251
 
21252
    public _Fields fieldForId(int fieldId) {
21253
      return _Fields.findByThriftId(fieldId);
21254
    }
21255
 
21256
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
21257
      org.apache.thrift.protocol.TField field;
21258
      iprot.readStructBegin();
21259
      while (true)
21260
      {
21261
        field = iprot.readFieldBegin();
21262
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
21263
          break;
21264
        }
21265
        switch (field.id) {
21266
          case 1: // E
21267
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
21268
              this.e = new PurchaseServiceException();
21269
              this.e.read(iprot);
21270
            } else { 
21271
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21272
            }
21273
            break;
21274
          default:
21275
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21276
        }
21277
        iprot.readFieldEnd();
21278
      }
21279
      iprot.readStructEnd();
21280
      validate();
21281
    }
21282
 
21283
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
21284
      oprot.writeStructBegin(STRUCT_DESC);
21285
 
21286
      if (this.isSetE()) {
21287
        oprot.writeFieldBegin(E_FIELD_DESC);
21288
        this.e.write(oprot);
21289
        oprot.writeFieldEnd();
21290
      }
21291
      oprot.writeFieldStop();
21292
      oprot.writeStructEnd();
21293
    }
21294
 
21295
    @Override
21296
    public String toString() {
21297
      StringBuilder sb = new StringBuilder("changeWarehouseForPO_result(");
21298
      boolean first = true;
21299
 
21300
      sb.append("e:");
21301
      if (this.e == null) {
21302
        sb.append("null");
21303
      } else {
21304
        sb.append(this.e);
21305
      }
21306
      first = false;
21307
      sb.append(")");
21308
      return sb.toString();
21309
    }
21310
 
21311
    public void validate() throws org.apache.thrift.TException {
21312
      // check for required fields
21313
    }
21314
 
21315
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21316
      try {
21317
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
21318
      } catch (org.apache.thrift.TException te) {
21319
        throw new java.io.IOException(te);
21320
      }
21321
    }
21322
 
21323
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
21324
      try {
21325
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
21326
      } catch (org.apache.thrift.TException te) {
21327
        throw new java.io.IOException(te);
21328
      }
21329
    }
21330
 
21331
  }
21332
 
9925 amar.kumar 21333
  public static class changePOStatus_args implements org.apache.thrift.TBase<changePOStatus_args, changePOStatus_args._Fields>, java.io.Serializable, Cloneable   {
21334
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changePOStatus_args");
21335
 
21336
    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);
21337
    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);
21338
 
21339
    private long id; // required
21340
    private POStatus poStatus; // required
21341
 
21342
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21343
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
21344
      ID((short)1, "id"),
21345
      /**
21346
       * 
21347
       * @see POStatus
21348
       */
21349
      PO_STATUS((short)2, "poStatus");
21350
 
21351
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21352
 
21353
      static {
21354
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21355
          byName.put(field.getFieldName(), field);
21356
        }
21357
      }
21358
 
21359
      /**
21360
       * Find the _Fields constant that matches fieldId, or null if its not found.
21361
       */
21362
      public static _Fields findByThriftId(int fieldId) {
21363
        switch(fieldId) {
21364
          case 1: // ID
21365
            return ID;
21366
          case 2: // PO_STATUS
21367
            return PO_STATUS;
21368
          default:
21369
            return null;
21370
        }
21371
      }
21372
 
21373
      /**
21374
       * Find the _Fields constant that matches fieldId, throwing an exception
21375
       * if it is not found.
21376
       */
21377
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21378
        _Fields fields = findByThriftId(fieldId);
21379
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21380
        return fields;
21381
      }
21382
 
21383
      /**
21384
       * Find the _Fields constant that matches name, or null if its not found.
21385
       */
21386
      public static _Fields findByName(String name) {
21387
        return byName.get(name);
21388
      }
21389
 
21390
      private final short _thriftId;
21391
      private final String _fieldName;
21392
 
21393
      _Fields(short thriftId, String fieldName) {
21394
        _thriftId = thriftId;
21395
        _fieldName = fieldName;
21396
      }
21397
 
21398
      public short getThriftFieldId() {
21399
        return _thriftId;
21400
      }
21401
 
21402
      public String getFieldName() {
21403
        return _fieldName;
21404
      }
21405
    }
21406
 
21407
    // isset id assignments
21408
    private static final int __ID_ISSET_ID = 0;
21409
    private BitSet __isset_bit_vector = new BitSet(1);
21410
 
21411
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
21412
    static {
21413
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
21414
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21415
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
21416
      tmpMap.put(_Fields.PO_STATUS, new org.apache.thrift.meta_data.FieldMetaData("poStatus", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21417
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, POStatus.class)));
21418
      metaDataMap = Collections.unmodifiableMap(tmpMap);
21419
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changePOStatus_args.class, metaDataMap);
21420
    }
21421
 
21422
    public changePOStatus_args() {
21423
    }
21424
 
21425
    public changePOStatus_args(
21426
      long id,
21427
      POStatus poStatus)
21428
    {
21429
      this();
21430
      this.id = id;
21431
      setIdIsSet(true);
21432
      this.poStatus = poStatus;
21433
    }
21434
 
21435
    /**
21436
     * Performs a deep copy on <i>other</i>.
21437
     */
21438
    public changePOStatus_args(changePOStatus_args other) {
21439
      __isset_bit_vector.clear();
21440
      __isset_bit_vector.or(other.__isset_bit_vector);
21441
      this.id = other.id;
21442
      if (other.isSetPoStatus()) {
21443
        this.poStatus = other.poStatus;
21444
      }
21445
    }
21446
 
21447
    public changePOStatus_args deepCopy() {
21448
      return new changePOStatus_args(this);
21449
    }
21450
 
21451
    @Override
21452
    public void clear() {
21453
      setIdIsSet(false);
21454
      this.id = 0;
21455
      this.poStatus = null;
21456
    }
21457
 
21458
    public long getId() {
21459
      return this.id;
21460
    }
21461
 
21462
    public void setId(long id) {
21463
      this.id = id;
21464
      setIdIsSet(true);
21465
    }
21466
 
21467
    public void unsetId() {
21468
      __isset_bit_vector.clear(__ID_ISSET_ID);
21469
    }
21470
 
21471
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
21472
    public boolean isSetId() {
21473
      return __isset_bit_vector.get(__ID_ISSET_ID);
21474
    }
21475
 
21476
    public void setIdIsSet(boolean value) {
21477
      __isset_bit_vector.set(__ID_ISSET_ID, value);
21478
    }
21479
 
21480
    /**
21481
     * 
21482
     * @see POStatus
21483
     */
21484
    public POStatus getPoStatus() {
21485
      return this.poStatus;
21486
    }
21487
 
21488
    /**
21489
     * 
21490
     * @see POStatus
21491
     */
21492
    public void setPoStatus(POStatus poStatus) {
21493
      this.poStatus = poStatus;
21494
    }
21495
 
21496
    public void unsetPoStatus() {
21497
      this.poStatus = null;
21498
    }
21499
 
21500
    /** Returns true if field poStatus is set (has been assigned a value) and false otherwise */
21501
    public boolean isSetPoStatus() {
21502
      return this.poStatus != null;
21503
    }
21504
 
21505
    public void setPoStatusIsSet(boolean value) {
21506
      if (!value) {
21507
        this.poStatus = null;
21508
      }
21509
    }
21510
 
21511
    public void setFieldValue(_Fields field, Object value) {
21512
      switch (field) {
21513
      case ID:
21514
        if (value == null) {
21515
          unsetId();
21516
        } else {
21517
          setId((Long)value);
21518
        }
21519
        break;
21520
 
21521
      case PO_STATUS:
21522
        if (value == null) {
21523
          unsetPoStatus();
21524
        } else {
21525
          setPoStatus((POStatus)value);
21526
        }
21527
        break;
21528
 
21529
      }
21530
    }
21531
 
21532
    public Object getFieldValue(_Fields field) {
21533
      switch (field) {
21534
      case ID:
21535
        return Long.valueOf(getId());
21536
 
21537
      case PO_STATUS:
21538
        return getPoStatus();
21539
 
21540
      }
21541
      throw new IllegalStateException();
21542
    }
21543
 
21544
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
21545
    public boolean isSet(_Fields field) {
21546
      if (field == null) {
21547
        throw new IllegalArgumentException();
21548
      }
21549
 
21550
      switch (field) {
21551
      case ID:
21552
        return isSetId();
21553
      case PO_STATUS:
21554
        return isSetPoStatus();
21555
      }
21556
      throw new IllegalStateException();
21557
    }
21558
 
21559
    @Override
21560
    public boolean equals(Object that) {
21561
      if (that == null)
21562
        return false;
21563
      if (that instanceof changePOStatus_args)
21564
        return this.equals((changePOStatus_args)that);
21565
      return false;
21566
    }
21567
 
21568
    public boolean equals(changePOStatus_args that) {
21569
      if (that == null)
21570
        return false;
21571
 
21572
      boolean this_present_id = true;
21573
      boolean that_present_id = true;
21574
      if (this_present_id || that_present_id) {
21575
        if (!(this_present_id && that_present_id))
21576
          return false;
21577
        if (this.id != that.id)
21578
          return false;
21579
      }
21580
 
21581
      boolean this_present_poStatus = true && this.isSetPoStatus();
21582
      boolean that_present_poStatus = true && that.isSetPoStatus();
21583
      if (this_present_poStatus || that_present_poStatus) {
21584
        if (!(this_present_poStatus && that_present_poStatus))
21585
          return false;
21586
        if (!this.poStatus.equals(that.poStatus))
21587
          return false;
21588
      }
21589
 
21590
      return true;
21591
    }
21592
 
21593
    @Override
21594
    public int hashCode() {
21595
      return 0;
21596
    }
21597
 
21598
    public int compareTo(changePOStatus_args other) {
21599
      if (!getClass().equals(other.getClass())) {
21600
        return getClass().getName().compareTo(other.getClass().getName());
21601
      }
21602
 
21603
      int lastComparison = 0;
21604
      changePOStatus_args typedOther = (changePOStatus_args)other;
21605
 
21606
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
21607
      if (lastComparison != 0) {
21608
        return lastComparison;
21609
      }
21610
      if (isSetId()) {
21611
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
21612
        if (lastComparison != 0) {
21613
          return lastComparison;
21614
        }
21615
      }
21616
      lastComparison = Boolean.valueOf(isSetPoStatus()).compareTo(typedOther.isSetPoStatus());
21617
      if (lastComparison != 0) {
21618
        return lastComparison;
21619
      }
21620
      if (isSetPoStatus()) {
21621
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.poStatus, typedOther.poStatus);
21622
        if (lastComparison != 0) {
21623
          return lastComparison;
21624
        }
21625
      }
21626
      return 0;
21627
    }
21628
 
21629
    public _Fields fieldForId(int fieldId) {
21630
      return _Fields.findByThriftId(fieldId);
21631
    }
21632
 
21633
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
21634
      org.apache.thrift.protocol.TField field;
21635
      iprot.readStructBegin();
21636
      while (true)
21637
      {
21638
        field = iprot.readFieldBegin();
21639
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
21640
          break;
21641
        }
21642
        switch (field.id) {
21643
          case 1: // ID
21644
            if (field.type == org.apache.thrift.protocol.TType.I64) {
21645
              this.id = iprot.readI64();
21646
              setIdIsSet(true);
21647
            } else { 
21648
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21649
            }
21650
            break;
21651
          case 2: // PO_STATUS
21652
            if (field.type == org.apache.thrift.protocol.TType.I32) {
21653
              this.poStatus = POStatus.findByValue(iprot.readI32());
21654
            } else { 
21655
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21656
            }
21657
            break;
21658
          default:
21659
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21660
        }
21661
        iprot.readFieldEnd();
21662
      }
21663
      iprot.readStructEnd();
21664
      validate();
21665
    }
21666
 
21667
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
21668
      validate();
21669
 
21670
      oprot.writeStructBegin(STRUCT_DESC);
21671
      oprot.writeFieldBegin(ID_FIELD_DESC);
21672
      oprot.writeI64(this.id);
21673
      oprot.writeFieldEnd();
21674
      if (this.poStatus != null) {
21675
        oprot.writeFieldBegin(PO_STATUS_FIELD_DESC);
21676
        oprot.writeI32(this.poStatus.getValue());
21677
        oprot.writeFieldEnd();
21678
      }
21679
      oprot.writeFieldStop();
21680
      oprot.writeStructEnd();
21681
    }
21682
 
21683
    @Override
21684
    public String toString() {
21685
      StringBuilder sb = new StringBuilder("changePOStatus_args(");
21686
      boolean first = true;
21687
 
21688
      sb.append("id:");
21689
      sb.append(this.id);
21690
      first = false;
21691
      if (!first) sb.append(", ");
21692
      sb.append("poStatus:");
21693
      if (this.poStatus == null) {
21694
        sb.append("null");
21695
      } else {
21696
        sb.append(this.poStatus);
21697
      }
21698
      first = false;
21699
      sb.append(")");
21700
      return sb.toString();
21701
    }
21702
 
21703
    public void validate() throws org.apache.thrift.TException {
21704
      // check for required fields
21705
    }
21706
 
21707
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21708
      try {
21709
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
21710
      } catch (org.apache.thrift.TException te) {
21711
        throw new java.io.IOException(te);
21712
      }
21713
    }
21714
 
21715
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
21716
      try {
21717
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
21718
        __isset_bit_vector = new BitSet(1);
21719
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
21720
      } catch (org.apache.thrift.TException te) {
21721
        throw new java.io.IOException(te);
21722
      }
21723
    }
21724
 
21725
  }
21726
 
21727
  public static class changePOStatus_result implements org.apache.thrift.TBase<changePOStatus_result, changePOStatus_result._Fields>, java.io.Serializable, Cloneable   {
21728
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changePOStatus_result");
21729
 
21730
    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);
21731
 
21732
    private PurchaseServiceException e; // required
21733
 
21734
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21735
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
21736
      E((short)1, "e");
21737
 
21738
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21739
 
21740
      static {
21741
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21742
          byName.put(field.getFieldName(), field);
21743
        }
21744
      }
21745
 
21746
      /**
21747
       * Find the _Fields constant that matches fieldId, or null if its not found.
21748
       */
21749
      public static _Fields findByThriftId(int fieldId) {
21750
        switch(fieldId) {
21751
          case 1: // E
21752
            return E;
21753
          default:
21754
            return null;
21755
        }
21756
      }
21757
 
21758
      /**
21759
       * Find the _Fields constant that matches fieldId, throwing an exception
21760
       * if it is not found.
21761
       */
21762
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21763
        _Fields fields = findByThriftId(fieldId);
21764
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21765
        return fields;
21766
      }
21767
 
21768
      /**
21769
       * Find the _Fields constant that matches name, or null if its not found.
21770
       */
21771
      public static _Fields findByName(String name) {
21772
        return byName.get(name);
21773
      }
21774
 
21775
      private final short _thriftId;
21776
      private final String _fieldName;
21777
 
21778
      _Fields(short thriftId, String fieldName) {
21779
        _thriftId = thriftId;
21780
        _fieldName = fieldName;
21781
      }
21782
 
21783
      public short getThriftFieldId() {
21784
        return _thriftId;
21785
      }
21786
 
21787
      public String getFieldName() {
21788
        return _fieldName;
21789
      }
21790
    }
21791
 
21792
    // isset id assignments
21793
 
21794
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
21795
    static {
21796
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
21797
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21798
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
21799
      metaDataMap = Collections.unmodifiableMap(tmpMap);
21800
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changePOStatus_result.class, metaDataMap);
21801
    }
21802
 
21803
    public changePOStatus_result() {
21804
    }
21805
 
21806
    public changePOStatus_result(
21807
      PurchaseServiceException e)
21808
    {
21809
      this();
21810
      this.e = e;
21811
    }
21812
 
21813
    /**
21814
     * Performs a deep copy on <i>other</i>.
21815
     */
21816
    public changePOStatus_result(changePOStatus_result other) {
21817
      if (other.isSetE()) {
21818
        this.e = new PurchaseServiceException(other.e);
21819
      }
21820
    }
21821
 
21822
    public changePOStatus_result deepCopy() {
21823
      return new changePOStatus_result(this);
21824
    }
21825
 
21826
    @Override
21827
    public void clear() {
21828
      this.e = null;
21829
    }
21830
 
21831
    public PurchaseServiceException getE() {
21832
      return this.e;
21833
    }
21834
 
21835
    public void setE(PurchaseServiceException e) {
21836
      this.e = e;
21837
    }
21838
 
21839
    public void unsetE() {
21840
      this.e = null;
21841
    }
21842
 
21843
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
21844
    public boolean isSetE() {
21845
      return this.e != null;
21846
    }
21847
 
21848
    public void setEIsSet(boolean value) {
21849
      if (!value) {
21850
        this.e = null;
21851
      }
21852
    }
21853
 
21854
    public void setFieldValue(_Fields field, Object value) {
21855
      switch (field) {
21856
      case E:
21857
        if (value == null) {
21858
          unsetE();
21859
        } else {
21860
          setE((PurchaseServiceException)value);
21861
        }
21862
        break;
21863
 
21864
      }
21865
    }
21866
 
21867
    public Object getFieldValue(_Fields field) {
21868
      switch (field) {
21869
      case E:
21870
        return getE();
21871
 
21872
      }
21873
      throw new IllegalStateException();
21874
    }
21875
 
21876
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
21877
    public boolean isSet(_Fields field) {
21878
      if (field == null) {
21879
        throw new IllegalArgumentException();
21880
      }
21881
 
21882
      switch (field) {
21883
      case E:
21884
        return isSetE();
21885
      }
21886
      throw new IllegalStateException();
21887
    }
21888
 
21889
    @Override
21890
    public boolean equals(Object that) {
21891
      if (that == null)
21892
        return false;
21893
      if (that instanceof changePOStatus_result)
21894
        return this.equals((changePOStatus_result)that);
21895
      return false;
21896
    }
21897
 
21898
    public boolean equals(changePOStatus_result that) {
21899
      if (that == null)
21900
        return false;
21901
 
21902
      boolean this_present_e = true && this.isSetE();
21903
      boolean that_present_e = true && that.isSetE();
21904
      if (this_present_e || that_present_e) {
21905
        if (!(this_present_e && that_present_e))
21906
          return false;
21907
        if (!this.e.equals(that.e))
21908
          return false;
21909
      }
21910
 
21911
      return true;
21912
    }
21913
 
21914
    @Override
21915
    public int hashCode() {
21916
      return 0;
21917
    }
21918
 
21919
    public int compareTo(changePOStatus_result other) {
21920
      if (!getClass().equals(other.getClass())) {
21921
        return getClass().getName().compareTo(other.getClass().getName());
21922
      }
21923
 
21924
      int lastComparison = 0;
21925
      changePOStatus_result typedOther = (changePOStatus_result)other;
21926
 
21927
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
21928
      if (lastComparison != 0) {
21929
        return lastComparison;
21930
      }
21931
      if (isSetE()) {
21932
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
21933
        if (lastComparison != 0) {
21934
          return lastComparison;
21935
        }
21936
      }
21937
      return 0;
21938
    }
21939
 
21940
    public _Fields fieldForId(int fieldId) {
21941
      return _Fields.findByThriftId(fieldId);
21942
    }
21943
 
21944
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
21945
      org.apache.thrift.protocol.TField field;
21946
      iprot.readStructBegin();
21947
      while (true)
21948
      {
21949
        field = iprot.readFieldBegin();
21950
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
21951
          break;
21952
        }
21953
        switch (field.id) {
21954
          case 1: // E
21955
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
21956
              this.e = new PurchaseServiceException();
21957
              this.e.read(iprot);
21958
            } else { 
21959
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21960
            }
21961
            break;
21962
          default:
21963
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21964
        }
21965
        iprot.readFieldEnd();
21966
      }
21967
      iprot.readStructEnd();
21968
      validate();
21969
    }
21970
 
21971
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
21972
      oprot.writeStructBegin(STRUCT_DESC);
21973
 
21974
      if (this.isSetE()) {
21975
        oprot.writeFieldBegin(E_FIELD_DESC);
21976
        this.e.write(oprot);
21977
        oprot.writeFieldEnd();
21978
      }
21979
      oprot.writeFieldStop();
21980
      oprot.writeStructEnd();
21981
    }
21982
 
21983
    @Override
21984
    public String toString() {
21985
      StringBuilder sb = new StringBuilder("changePOStatus_result(");
21986
      boolean first = true;
21987
 
21988
      sb.append("e:");
21989
      if (this.e == null) {
21990
        sb.append("null");
21991
      } else {
21992
        sb.append(this.e);
21993
      }
21994
      first = false;
21995
      sb.append(")");
21996
      return sb.toString();
21997
    }
21998
 
21999
    public void validate() throws org.apache.thrift.TException {
22000
      // check for required fields
22001
    }
22002
 
22003
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
22004
      try {
22005
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
22006
      } catch (org.apache.thrift.TException te) {
22007
        throw new java.io.IOException(te);
22008
      }
22009
    }
22010
 
22011
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
22012
      try {
22013
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
22014
      } catch (org.apache.thrift.TException te) {
22015
        throw new java.io.IOException(te);
22016
      }
22017
    }
22018
 
22019
  }
22020
 
11751 manish.sha 22021
  public static class getPurchaseReturn_args implements org.apache.thrift.TBase<getPurchaseReturn_args, getPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
22022
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseReturn_args");
22023
 
22024
    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);
22025
 
22026
    private long id; // required
22027
 
22028
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22029
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
22030
      ID((short)1, "id");
22031
 
22032
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22033
 
22034
      static {
22035
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22036
          byName.put(field.getFieldName(), field);
22037
        }
22038
      }
22039
 
22040
      /**
22041
       * Find the _Fields constant that matches fieldId, or null if its not found.
22042
       */
22043
      public static _Fields findByThriftId(int fieldId) {
22044
        switch(fieldId) {
22045
          case 1: // ID
22046
            return ID;
22047
          default:
22048
            return null;
22049
        }
22050
      }
22051
 
22052
      /**
22053
       * Find the _Fields constant that matches fieldId, throwing an exception
22054
       * if it is not found.
22055
       */
22056
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22057
        _Fields fields = findByThriftId(fieldId);
22058
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22059
        return fields;
22060
      }
22061
 
22062
      /**
22063
       * Find the _Fields constant that matches name, or null if its not found.
22064
       */
22065
      public static _Fields findByName(String name) {
22066
        return byName.get(name);
22067
      }
22068
 
22069
      private final short _thriftId;
22070
      private final String _fieldName;
22071
 
22072
      _Fields(short thriftId, String fieldName) {
22073
        _thriftId = thriftId;
22074
        _fieldName = fieldName;
22075
      }
22076
 
22077
      public short getThriftFieldId() {
22078
        return _thriftId;
22079
      }
22080
 
22081
      public String getFieldName() {
22082
        return _fieldName;
22083
      }
22084
    }
22085
 
22086
    // isset id assignments
22087
    private static final int __ID_ISSET_ID = 0;
22088
    private BitSet __isset_bit_vector = new BitSet(1);
22089
 
22090
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
22091
    static {
22092
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
22093
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22094
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
22095
      metaDataMap = Collections.unmodifiableMap(tmpMap);
22096
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseReturn_args.class, metaDataMap);
22097
    }
22098
 
22099
    public getPurchaseReturn_args() {
22100
    }
22101
 
22102
    public getPurchaseReturn_args(
22103
      long id)
22104
    {
22105
      this();
22106
      this.id = id;
22107
      setIdIsSet(true);
22108
    }
22109
 
22110
    /**
22111
     * Performs a deep copy on <i>other</i>.
22112
     */
22113
    public getPurchaseReturn_args(getPurchaseReturn_args other) {
22114
      __isset_bit_vector.clear();
22115
      __isset_bit_vector.or(other.__isset_bit_vector);
22116
      this.id = other.id;
22117
    }
22118
 
22119
    public getPurchaseReturn_args deepCopy() {
22120
      return new getPurchaseReturn_args(this);
22121
    }
22122
 
22123
    @Override
22124
    public void clear() {
22125
      setIdIsSet(false);
22126
      this.id = 0;
22127
    }
22128
 
22129
    public long getId() {
22130
      return this.id;
22131
    }
22132
 
22133
    public void setId(long id) {
22134
      this.id = id;
22135
      setIdIsSet(true);
22136
    }
22137
 
22138
    public void unsetId() {
22139
      __isset_bit_vector.clear(__ID_ISSET_ID);
22140
    }
22141
 
22142
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
22143
    public boolean isSetId() {
22144
      return __isset_bit_vector.get(__ID_ISSET_ID);
22145
    }
22146
 
22147
    public void setIdIsSet(boolean value) {
22148
      __isset_bit_vector.set(__ID_ISSET_ID, value);
22149
    }
22150
 
22151
    public void setFieldValue(_Fields field, Object value) {
22152
      switch (field) {
22153
      case ID:
22154
        if (value == null) {
22155
          unsetId();
22156
        } else {
22157
          setId((Long)value);
22158
        }
22159
        break;
22160
 
22161
      }
22162
    }
22163
 
22164
    public Object getFieldValue(_Fields field) {
22165
      switch (field) {
22166
      case ID:
22167
        return Long.valueOf(getId());
22168
 
22169
      }
22170
      throw new IllegalStateException();
22171
    }
22172
 
22173
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
22174
    public boolean isSet(_Fields field) {
22175
      if (field == null) {
22176
        throw new IllegalArgumentException();
22177
      }
22178
 
22179
      switch (field) {
22180
      case ID:
22181
        return isSetId();
22182
      }
22183
      throw new IllegalStateException();
22184
    }
22185
 
22186
    @Override
22187
    public boolean equals(Object that) {
22188
      if (that == null)
22189
        return false;
22190
      if (that instanceof getPurchaseReturn_args)
22191
        return this.equals((getPurchaseReturn_args)that);
22192
      return false;
22193
    }
22194
 
22195
    public boolean equals(getPurchaseReturn_args that) {
22196
      if (that == null)
22197
        return false;
22198
 
22199
      boolean this_present_id = true;
22200
      boolean that_present_id = true;
22201
      if (this_present_id || that_present_id) {
22202
        if (!(this_present_id && that_present_id))
22203
          return false;
22204
        if (this.id != that.id)
22205
          return false;
22206
      }
22207
 
22208
      return true;
22209
    }
22210
 
22211
    @Override
22212
    public int hashCode() {
22213
      return 0;
22214
    }
22215
 
22216
    public int compareTo(getPurchaseReturn_args other) {
22217
      if (!getClass().equals(other.getClass())) {
22218
        return getClass().getName().compareTo(other.getClass().getName());
22219
      }
22220
 
22221
      int lastComparison = 0;
22222
      getPurchaseReturn_args typedOther = (getPurchaseReturn_args)other;
22223
 
22224
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
22225
      if (lastComparison != 0) {
22226
        return lastComparison;
22227
      }
22228
      if (isSetId()) {
22229
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
22230
        if (lastComparison != 0) {
22231
          return lastComparison;
22232
        }
22233
      }
22234
      return 0;
22235
    }
22236
 
22237
    public _Fields fieldForId(int fieldId) {
22238
      return _Fields.findByThriftId(fieldId);
22239
    }
22240
 
22241
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
22242
      org.apache.thrift.protocol.TField field;
22243
      iprot.readStructBegin();
22244
      while (true)
22245
      {
22246
        field = iprot.readFieldBegin();
22247
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
22248
          break;
22249
        }
22250
        switch (field.id) {
22251
          case 1: // ID
22252
            if (field.type == org.apache.thrift.protocol.TType.I64) {
22253
              this.id = iprot.readI64();
22254
              setIdIsSet(true);
22255
            } else { 
22256
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22257
            }
22258
            break;
22259
          default:
22260
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22261
        }
22262
        iprot.readFieldEnd();
22263
      }
22264
      iprot.readStructEnd();
22265
      validate();
22266
    }
22267
 
22268
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
22269
      validate();
22270
 
22271
      oprot.writeStructBegin(STRUCT_DESC);
22272
      oprot.writeFieldBegin(ID_FIELD_DESC);
22273
      oprot.writeI64(this.id);
22274
      oprot.writeFieldEnd();
22275
      oprot.writeFieldStop();
22276
      oprot.writeStructEnd();
22277
    }
22278
 
22279
    @Override
22280
    public String toString() {
22281
      StringBuilder sb = new StringBuilder("getPurchaseReturn_args(");
22282
      boolean first = true;
22283
 
22284
      sb.append("id:");
22285
      sb.append(this.id);
22286
      first = false;
22287
      sb.append(")");
22288
      return sb.toString();
22289
    }
22290
 
22291
    public void validate() throws org.apache.thrift.TException {
22292
      // check for required fields
22293
    }
22294
 
22295
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
22296
      try {
22297
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
22298
      } catch (org.apache.thrift.TException te) {
22299
        throw new java.io.IOException(te);
22300
      }
22301
    }
22302
 
22303
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
22304
      try {
22305
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
22306
        __isset_bit_vector = new BitSet(1);
22307
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
22308
      } catch (org.apache.thrift.TException te) {
22309
        throw new java.io.IOException(te);
22310
      }
22311
    }
22312
 
22313
  }
22314
 
22315
  public static class getPurchaseReturn_result implements org.apache.thrift.TBase<getPurchaseReturn_result, getPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
22316
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseReturn_result");
22317
 
22318
    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);
22319
    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);
22320
 
22321
    private PurchaseReturn success; // required
22322
    private PurchaseServiceException e; // required
22323
 
22324
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22325
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
22326
      SUCCESS((short)0, "success"),
22327
      E((short)1, "e");
22328
 
22329
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22330
 
22331
      static {
22332
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22333
          byName.put(field.getFieldName(), field);
22334
        }
22335
      }
22336
 
22337
      /**
22338
       * Find the _Fields constant that matches fieldId, or null if its not found.
22339
       */
22340
      public static _Fields findByThriftId(int fieldId) {
22341
        switch(fieldId) {
22342
          case 0: // SUCCESS
22343
            return SUCCESS;
22344
          case 1: // E
22345
            return E;
22346
          default:
22347
            return null;
22348
        }
22349
      }
22350
 
22351
      /**
22352
       * Find the _Fields constant that matches fieldId, throwing an exception
22353
       * if it is not found.
22354
       */
22355
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22356
        _Fields fields = findByThriftId(fieldId);
22357
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22358
        return fields;
22359
      }
22360
 
22361
      /**
22362
       * Find the _Fields constant that matches name, or null if its not found.
22363
       */
22364
      public static _Fields findByName(String name) {
22365
        return byName.get(name);
22366
      }
22367
 
22368
      private final short _thriftId;
22369
      private final String _fieldName;
22370
 
22371
      _Fields(short thriftId, String fieldName) {
22372
        _thriftId = thriftId;
22373
        _fieldName = fieldName;
22374
      }
22375
 
22376
      public short getThriftFieldId() {
22377
        return _thriftId;
22378
      }
22379
 
22380
      public String getFieldName() {
22381
        return _fieldName;
22382
      }
22383
    }
22384
 
22385
    // isset id assignments
22386
 
22387
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
22388
    static {
22389
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
22390
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22391
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class)));
22392
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22393
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
22394
      metaDataMap = Collections.unmodifiableMap(tmpMap);
22395
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseReturn_result.class, metaDataMap);
22396
    }
22397
 
22398
    public getPurchaseReturn_result() {
22399
    }
22400
 
22401
    public getPurchaseReturn_result(
22402
      PurchaseReturn success,
22403
      PurchaseServiceException e)
22404
    {
22405
      this();
22406
      this.success = success;
22407
      this.e = e;
22408
    }
22409
 
22410
    /**
22411
     * Performs a deep copy on <i>other</i>.
22412
     */
22413
    public getPurchaseReturn_result(getPurchaseReturn_result other) {
22414
      if (other.isSetSuccess()) {
22415
        this.success = new PurchaseReturn(other.success);
22416
      }
22417
      if (other.isSetE()) {
22418
        this.e = new PurchaseServiceException(other.e);
22419
      }
22420
    }
22421
 
22422
    public getPurchaseReturn_result deepCopy() {
22423
      return new getPurchaseReturn_result(this);
22424
    }
22425
 
22426
    @Override
22427
    public void clear() {
22428
      this.success = null;
22429
      this.e = null;
22430
    }
22431
 
22432
    public PurchaseReturn getSuccess() {
22433
      return this.success;
22434
    }
22435
 
22436
    public void setSuccess(PurchaseReturn success) {
22437
      this.success = success;
22438
    }
22439
 
22440
    public void unsetSuccess() {
22441
      this.success = null;
22442
    }
22443
 
22444
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
22445
    public boolean isSetSuccess() {
22446
      return this.success != null;
22447
    }
22448
 
22449
    public void setSuccessIsSet(boolean value) {
22450
      if (!value) {
22451
        this.success = null;
22452
      }
22453
    }
22454
 
22455
    public PurchaseServiceException getE() {
22456
      return this.e;
22457
    }
22458
 
22459
    public void setE(PurchaseServiceException e) {
22460
      this.e = e;
22461
    }
22462
 
22463
    public void unsetE() {
22464
      this.e = null;
22465
    }
22466
 
22467
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
22468
    public boolean isSetE() {
22469
      return this.e != null;
22470
    }
22471
 
22472
    public void setEIsSet(boolean value) {
22473
      if (!value) {
22474
        this.e = null;
22475
      }
22476
    }
22477
 
22478
    public void setFieldValue(_Fields field, Object value) {
22479
      switch (field) {
22480
      case SUCCESS:
22481
        if (value == null) {
22482
          unsetSuccess();
22483
        } else {
22484
          setSuccess((PurchaseReturn)value);
22485
        }
22486
        break;
22487
 
22488
      case E:
22489
        if (value == null) {
22490
          unsetE();
22491
        } else {
22492
          setE((PurchaseServiceException)value);
22493
        }
22494
        break;
22495
 
22496
      }
22497
    }
22498
 
22499
    public Object getFieldValue(_Fields field) {
22500
      switch (field) {
22501
      case SUCCESS:
22502
        return getSuccess();
22503
 
22504
      case E:
22505
        return getE();
22506
 
22507
      }
22508
      throw new IllegalStateException();
22509
    }
22510
 
22511
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
22512
    public boolean isSet(_Fields field) {
22513
      if (field == null) {
22514
        throw new IllegalArgumentException();
22515
      }
22516
 
22517
      switch (field) {
22518
      case SUCCESS:
22519
        return isSetSuccess();
22520
      case E:
22521
        return isSetE();
22522
      }
22523
      throw new IllegalStateException();
22524
    }
22525
 
22526
    @Override
22527
    public boolean equals(Object that) {
22528
      if (that == null)
22529
        return false;
22530
      if (that instanceof getPurchaseReturn_result)
22531
        return this.equals((getPurchaseReturn_result)that);
22532
      return false;
22533
    }
22534
 
22535
    public boolean equals(getPurchaseReturn_result that) {
22536
      if (that == null)
22537
        return false;
22538
 
22539
      boolean this_present_success = true && this.isSetSuccess();
22540
      boolean that_present_success = true && that.isSetSuccess();
22541
      if (this_present_success || that_present_success) {
22542
        if (!(this_present_success && that_present_success))
22543
          return false;
22544
        if (!this.success.equals(that.success))
22545
          return false;
22546
      }
22547
 
22548
      boolean this_present_e = true && this.isSetE();
22549
      boolean that_present_e = true && that.isSetE();
22550
      if (this_present_e || that_present_e) {
22551
        if (!(this_present_e && that_present_e))
22552
          return false;
22553
        if (!this.e.equals(that.e))
22554
          return false;
22555
      }
22556
 
22557
      return true;
22558
    }
22559
 
22560
    @Override
22561
    public int hashCode() {
22562
      return 0;
22563
    }
22564
 
22565
    public int compareTo(getPurchaseReturn_result other) {
22566
      if (!getClass().equals(other.getClass())) {
22567
        return getClass().getName().compareTo(other.getClass().getName());
22568
      }
22569
 
22570
      int lastComparison = 0;
22571
      getPurchaseReturn_result typedOther = (getPurchaseReturn_result)other;
22572
 
22573
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
22574
      if (lastComparison != 0) {
22575
        return lastComparison;
22576
      }
22577
      if (isSetSuccess()) {
22578
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
22579
        if (lastComparison != 0) {
22580
          return lastComparison;
22581
        }
22582
      }
22583
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
22584
      if (lastComparison != 0) {
22585
        return lastComparison;
22586
      }
22587
      if (isSetE()) {
22588
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
22589
        if (lastComparison != 0) {
22590
          return lastComparison;
22591
        }
22592
      }
22593
      return 0;
22594
    }
22595
 
22596
    public _Fields fieldForId(int fieldId) {
22597
      return _Fields.findByThriftId(fieldId);
22598
    }
22599
 
22600
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
22601
      org.apache.thrift.protocol.TField field;
22602
      iprot.readStructBegin();
22603
      while (true)
22604
      {
22605
        field = iprot.readFieldBegin();
22606
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
22607
          break;
22608
        }
22609
        switch (field.id) {
22610
          case 0: // SUCCESS
22611
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
22612
              this.success = new PurchaseReturn();
22613
              this.success.read(iprot);
22614
            } else { 
22615
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22616
            }
22617
            break;
22618
          case 1: // E
22619
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
22620
              this.e = new PurchaseServiceException();
22621
              this.e.read(iprot);
22622
            } else { 
22623
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22624
            }
22625
            break;
22626
          default:
22627
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22628
        }
22629
        iprot.readFieldEnd();
22630
      }
22631
      iprot.readStructEnd();
22632
      validate();
22633
    }
22634
 
22635
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
22636
      oprot.writeStructBegin(STRUCT_DESC);
22637
 
22638
      if (this.isSetSuccess()) {
22639
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
22640
        this.success.write(oprot);
22641
        oprot.writeFieldEnd();
22642
      } else if (this.isSetE()) {
22643
        oprot.writeFieldBegin(E_FIELD_DESC);
22644
        this.e.write(oprot);
22645
        oprot.writeFieldEnd();
22646
      }
22647
      oprot.writeFieldStop();
22648
      oprot.writeStructEnd();
22649
    }
22650
 
22651
    @Override
22652
    public String toString() {
22653
      StringBuilder sb = new StringBuilder("getPurchaseReturn_result(");
22654
      boolean first = true;
22655
 
22656
      sb.append("success:");
22657
      if (this.success == null) {
22658
        sb.append("null");
22659
      } else {
22660
        sb.append(this.success);
22661
      }
22662
      first = false;
22663
      if (!first) sb.append(", ");
22664
      sb.append("e:");
22665
      if (this.e == null) {
22666
        sb.append("null");
22667
      } else {
22668
        sb.append(this.e);
22669
      }
22670
      first = false;
22671
      sb.append(")");
22672
      return sb.toString();
22673
    }
22674
 
22675
    public void validate() throws org.apache.thrift.TException {
22676
      // check for required fields
22677
    }
22678
 
22679
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
22680
      try {
22681
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
22682
      } catch (org.apache.thrift.TException te) {
22683
        throw new java.io.IOException(te);
22684
      }
22685
    }
22686
 
22687
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
22688
      try {
22689
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
22690
      } catch (org.apache.thrift.TException te) {
22691
        throw new java.io.IOException(te);
22692
      }
22693
    }
22694
 
22695
  }
22696
 
4496 mandeep.dh 22697
}